solid-panes 5.1.0-2 → 5.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.
- package/README.md +6 -0
- package/dist/RDFXMLPane.d.ts.map +1 -1
- package/dist/RDFXMLPane2.cjs.js +1 -1
- package/dist/RDFXMLPane2.cjs.js.map +1 -1
- package/dist/RDFXMLPane2.esm.js +3 -3
- package/dist/RDFXMLPane2.esm.js.map +1 -1
- package/dist/components/editor-card/EditorCard.cjs.js +2 -2
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
- package/dist/components/editor-card/EditorCard.d.ts +2 -0
- package/dist/components/editor-card/EditorCard.d.ts.map +1 -1
- package/dist/components/editor-card/EditorCard.esm.js +68 -43
- package/dist/components/editor-card/EditorCard.esm.js.map +1 -1
- package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -1
- package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -1
- package/dist/components/header/Header.cjs.js.map +1 -1
- package/dist/components/header/Header.esm.js.map +1 -1
- package/dist/components/header/Header.styles.cjs.js.map +1 -1
- package/dist/components/header/Header.styles.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.esm.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.cjs.js +6 -6
- package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.d.ts +4 -0
- package/dist/components/profile-heading/ProfileHeading.d.ts.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.esm.js +123 -107
- package/dist/components/profile-heading/ProfileHeading.esm.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.styles.cjs.js +1 -1
- package/dist/components/profile-heading/ProfileHeading.styles.cjs.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.styles.esm.js +1 -1
- package/dist/components/profile-heading/ProfileHeading.styles.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +19 -19
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +86 -86
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js +1 -1
- package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +61 -61
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/textUtils.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/textUtils.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/texts/messageTexts.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
- package/dist/components/profile-heading/friendActions.cjs.js +1 -1
- package/dist/components/profile-heading/friendActions.cjs.js.map +1 -1
- package/dist/components/profile-heading/friendActions.esm.js +5 -5
- package/dist/components/profile-heading/profileHeadingData.cjs.js.map +1 -1
- package/dist/components/resource-action-dialog/ResourceActionDialog.cjs.js +33 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.cjs.js.map +1 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.d.ts +16 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.d.ts.map +1 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.esm.js +309 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.esm.js.map +1 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.styles.cjs.js +2 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.styles.cjs.js.map +1 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.styles.esm.js +6 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.styles.esm.js.map +1 -0
- package/dist/dataContentPane.d.ts.map +1 -1
- package/dist/dataContentPane2.cjs.js +1 -1
- package/dist/dataContentPane2.cjs.js.map +1 -1
- package/dist/dataContentPane2.esm.js +90 -78
- package/dist/dataContentPane2.esm.js.map +1 -1
- package/dist/humanReadablePane.d.ts +1 -0
- package/dist/humanReadablePane.d.ts.map +1 -1
- package/dist/humanReadablePane2.cjs.js +147 -15
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js +281 -114
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/imagePane.d.ts.map +1 -1
- package/dist/imagePane2.cjs.js +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/imagePane2.esm.js +9 -7
- package/dist/imagePane2.esm.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +16 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/internal/internalPane.d.ts.map +1 -1
- package/dist/internal/internalPane2.cjs.js +1 -1
- package/dist/internal/internalPane2.cjs.js.map +1 -1
- package/dist/internal/internalPane2.esm.js +55 -60
- package/dist/internal/internalPane2.esm.js.map +1 -1
- package/dist/mainPage/header.cjs.js +1 -1
- package/dist/mainPage/header.esm.js +2 -2
- package/dist/mainPage/index.cjs.js +1 -1
- package/dist/mainPage/index.cjs.js.map +1 -1
- package/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.esm.js +44 -24
- package/dist/mainPage/index.esm.js.map +1 -1
- package/dist/mainPage/navbar.cjs.js +1 -1
- package/dist/mainPage/navbar.cjs.js.map +1 -1
- package/dist/mainPage/navbar.esm.js +15 -15
- package/dist/mainPage/navigation.cjs.js +1 -1
- package/dist/mainPage/navigation.cjs.js.map +1 -1
- package/dist/mainPage/navigation.esm.js +4 -4
- package/dist/mainPage/profileHeading.d.ts +2 -1
- package/dist/mainPage/profileHeading.d.ts.map +1 -1
- package/dist/mainPage/profileHeading2.cjs.js +1 -1
- package/dist/mainPage/profileHeading2.cjs.js.map +1 -1
- package/dist/mainPage/profileHeading2.esm.js +76 -76
- package/dist/mainPage/profileHeading2.esm.js.map +1 -1
- package/dist/n3Pane.d.ts.map +1 -1
- package/dist/n3Pane2.cjs.js +1 -1
- package/dist/n3Pane2.cjs.js.map +1 -1
- package/dist/n3Pane2.esm.js +1 -1
- package/dist/n3Pane2.esm.js.map +1 -1
- package/dist/navigation/browserEvents.cjs.js +1 -1
- package/dist/navigation/browserEvents.cjs.js.map +1 -1
- package/dist/navigation/browserEvents.d.ts.map +1 -1
- package/dist/navigation/browserEvents.esm.js +17 -17
- package/dist/navigation/browserEvents.esm.js.map +1 -1
- package/dist/navigation/chrome.cjs.js +1 -1
- package/dist/navigation/chrome.cjs.js.map +1 -1
- package/dist/navigation/chrome.d.ts +20 -2
- package/dist/navigation/chrome.d.ts.map +1 -1
- package/dist/navigation/chrome.esm.js +14 -8
- package/dist/navigation/chrome.esm.js.map +1 -1
- package/dist/navigation/controller.cjs.js +1 -1
- package/dist/navigation/controller.cjs.js.map +1 -1
- package/dist/navigation/controller.d.ts +3 -0
- package/dist/navigation/controller.d.ts.map +1 -1
- package/dist/navigation/controller.esm.js +50 -29
- package/dist/navigation/controller.esm.js.map +1 -1
- package/dist/navigation/options.cjs.js +1 -1
- package/dist/navigation/options.cjs.js.map +1 -1
- package/dist/navigation/options.d.ts +12 -0
- package/dist/navigation/options.d.ts.map +1 -1
- package/dist/navigation/options.esm.js +4 -1
- package/dist/navigation/options.esm.js.map +1 -1
- package/dist/navigation/podContext.cjs.js +1 -1
- package/dist/navigation/podContext.cjs.js.map +1 -1
- package/dist/navigation/podContext.d.ts.map +1 -1
- package/dist/navigation/podContext.esm.js +17 -17
- package/dist/navigation/podContext.esm.js.map +1 -1
- package/dist/navigation/state.cjs.js +1 -1
- package/dist/navigation/state.cjs.js.map +1 -1
- package/dist/navigation/state.d.ts +4 -0
- package/dist/navigation/state.d.ts.map +1 -1
- package/dist/navigation/state.esm.js +18 -5
- package/dist/navigation/state.esm.js.map +1 -1
- package/dist/outline/fileExplorerHelpers.cjs.js +1 -1
- package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -1
- package/dist/outline/fileExplorerHelpers.d.ts +2 -5
- package/dist/outline/fileExplorerHelpers.d.ts.map +1 -1
- package/dist/outline/fileExplorerHelpers.esm.js +11 -13
- package/dist/outline/fileExplorerHelpers.esm.js.map +1 -1
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +355 -296
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/registerPanes.cjs.js +1 -1
- package/dist/registerPanes.cjs.js.map +1 -1
- package/dist/registerPanes.esm.js +1 -1
- package/dist/registerPanes.esm.js.map +1 -1
- package/dist/slideshow/slideshowPane.cjs.js +1 -1
- package/dist/slideshow/slideshowPane.cjs.js.map +1 -1
- package/dist/slideshow/slideshowPane.esm.js +30 -30
- package/dist/slideshow/slideshowPane.esm.js.map +1 -1
- package/dist/social/socialPane2.cjs.js +1 -1
- package/dist/social/socialPane2.esm.js +1 -1
- package/dist/social/socialSections.cjs.js +1 -1
- package/dist/social/socialSections.esm.js +1 -1
- package/dist/utils/paneUtils.cjs.js +1 -1
- package/dist/utils/paneUtils.cjs.js.map +1 -1
- package/dist/utils/paneUtils.esm.js +15 -15
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +9 -9
- package/dist/versionInfo.esm.js.map +1 -1
- package/package.json +11 -12
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import { addFriend as n, checkFriend as r, friendTexts as i } from "./friendActions.esm.js";
|
|
1
|
+
import { createHeadingEditDialog as e } from "./editor/sections/heading/HeadingEditDialog.esm.js";
|
|
2
|
+
import { addFriend as t, checkFriend as n, friendTexts as r } from "./friendActions.esm.js";
|
|
3
|
+
import { formatDisplayError as i } from "./editor/utils/errorDisplay.esm.js";
|
|
5
4
|
import "../../_virtual/~icons/lucide/cake.esm.js";
|
|
5
|
+
import "../../_virtual/~icons/lucide/circle-user-round.esm.js";
|
|
6
6
|
import "../../_virtual/~icons/lucide/mail.esm.js";
|
|
7
7
|
import "../../_virtual/~icons/lucide/map-pin.esm.js";
|
|
8
8
|
import "../../_virtual/~icons/lucide/pencil.esm.js";
|
|
9
9
|
import "../../_virtual/~icons/lucide/phone.esm.js";
|
|
10
10
|
import "../../_virtual/~icons/lucide/user-round-plus.esm.js";
|
|
11
11
|
import a from "./ProfileHeading.styles.esm.js";
|
|
12
|
-
import { WebComponent as o, customElement as s } from "solid-ui";
|
|
13
|
-
import { authn as
|
|
12
|
+
import { WebComponent as o, customElement as s, widgets as c } from "solid-ui";
|
|
13
|
+
import { authn as l, store as u } from "solid-logic";
|
|
14
14
|
import "solid-ui/components/button";
|
|
15
|
-
import { html as
|
|
16
|
-
import { property as
|
|
15
|
+
import { html as d, nothing as f } from "lit";
|
|
16
|
+
import { property as p, state as m } from "lit/decorators.js";
|
|
17
17
|
// src/components/profile-heading/ProfileHeading.ts
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
|
|
18
|
+
var h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, M, N, P, F, I, ee, L, R, z, B, V, H, U, W, G, K, q;
|
|
19
|
+
function J(e, t, n) {
|
|
20
|
+
te(e, t), t.set(e, n);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function te(e, t) {
|
|
23
23
|
if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return e.set(
|
|
25
|
+
function Y(e, t, n) {
|
|
26
|
+
return e.set(Z(e, t), n), n;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return e.get(
|
|
28
|
+
function X(e, t) {
|
|
29
|
+
return e.get(Z(e, t));
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Z(e, t, n) {
|
|
32
32
|
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
33
33
|
throw TypeError("Private element is not present on this object");
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return (t =
|
|
35
|
+
function Q(e, t, n) {
|
|
36
|
+
return (t = re(t)) in e ? Object.defineProperty(e, t, {
|
|
37
37
|
value: n,
|
|
38
38
|
enumerable: !0,
|
|
39
39
|
configurable: !0,
|
|
40
40
|
writable: !0
|
|
41
41
|
}) : e[t] = n, e;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ne(e, t, n, r, i, a) {
|
|
44
44
|
function o(e, t, n) {
|
|
45
45
|
return function(r, i) {
|
|
46
46
|
return n && n(r), e[t].call(r, i);
|
|
@@ -63,13 +63,13 @@ function te(e, t, n, r, i, a) {
|
|
|
63
63
|
n || Array.isArray(_) || (_ = [_]);
|
|
64
64
|
var b = {}, x = [], S = i === 3 ? "get" : i === 4 || p ? "set" : "value";
|
|
65
65
|
d ? (f || p ? b = {
|
|
66
|
-
get:
|
|
66
|
+
get: ae(function() {
|
|
67
67
|
return v(this);
|
|
68
68
|
}, r, "get"),
|
|
69
69
|
set: function(e) {
|
|
70
70
|
t[4](this, e);
|
|
71
71
|
}
|
|
72
|
-
} : b[S] = v, f ||
|
|
72
|
+
} : b[S] = v, f || ae(b[S], r, i === 2 ? "" : S)) : f || (b = Object.getOwnPropertyDescriptor(e, r));
|
|
73
73
|
}
|
|
74
74
|
for (var C = e, w = _.length - 1; w >= 0; w -= n ? 2 : 1) {
|
|
75
75
|
var T = _[w], E = n ? _[w - 1] : void 0, D = {}, O = {
|
|
@@ -129,7 +129,7 @@ function te(e, t, n, r, i, a) {
|
|
|
129
129
|
if (arguments.length >= 6) var d = a[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
130
130
|
var f = Object.create(d ?? null), p = function(e, t, n, r) {
|
|
131
131
|
var i, a, o = [], c = function(t) {
|
|
132
|
-
return
|
|
132
|
+
return oe(t) === e;
|
|
133
133
|
}, u = /* @__PURE__ */ new Map();
|
|
134
134
|
function d(e) {
|
|
135
135
|
e && o.push(s.bind(null, e));
|
|
@@ -143,7 +143,7 @@ function te(e, t, n, r, i, a) {
|
|
|
143
143
|
if (!0 === x || x === 3 && m !== 4 || x === 4 && m !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h);
|
|
144
144
|
u.set(b, !(m > 2) || m);
|
|
145
145
|
}
|
|
146
|
-
l(v ? e : e.prototype, p, _, g ? "#" + h :
|
|
146
|
+
l(v ? e : e.prototype, p, _, g ? "#" + h : re(h), m, r, v ? a ||= [] : i ||= [], o, v, g, y, m === 1, v && g ? c : n);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
return d(i), d(a), o;
|
|
@@ -156,11 +156,11 @@ function te(e, t, n, r, i, a) {
|
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
var t =
|
|
159
|
+
function re(e) {
|
|
160
|
+
var t = ie(e, "string");
|
|
161
161
|
return typeof t == "symbol" ? t : t + "";
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function ie(e, t) {
|
|
164
164
|
if (typeof e != "object" || !e) return e;
|
|
165
165
|
var n;
|
|
166
166
|
if (typeof Symbol < "u" && (n = e[Symbol.toPrimitive]) !== void 0) {
|
|
@@ -170,7 +170,7 @@ function ne(e, t) {
|
|
|
170
170
|
}
|
|
171
171
|
return (t === "string" ? String : Number)(e);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function ae(e, t, n) {
|
|
174
174
|
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
175
175
|
try {
|
|
176
176
|
Object.defineProperty(e, "name", {
|
|
@@ -180,38 +180,38 @@ function Z(e, t, n) {
|
|
|
180
180
|
} catch {}
|
|
181
181
|
return e;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function oe(e) {
|
|
184
184
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
|
|
185
185
|
return e;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function se(e) {
|
|
188
188
|
return e;
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
var
|
|
192
|
-
new (
|
|
190
|
+
O = [s("solid-panes-profile-heading")];
|
|
191
|
+
var $;
|
|
192
|
+
new (K = (_ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y = /*#__PURE__*/ new WeakMap(), b = /*#__PURE__*/ new WeakMap(), x = /*#__PURE__*/ new WeakMap(), S = /*#__PURE__*/ new WeakMap(), C = /*#__PURE__*/ new WeakMap(), w = /*#__PURE__*/ new WeakMap(), T = /*#__PURE__*/ new WeakMap(), q = (k = p({ attribute: !1 }), j = p({ attribute: !1 }), N = p({ attribute: !1 }), F = p({ attribute: !1 }), ee = p({
|
|
193
193
|
type: Boolean,
|
|
194
194
|
reflect: !0
|
|
195
|
-
}),
|
|
196
|
-
constructor(...
|
|
197
|
-
super(...
|
|
195
|
+
}), R = m(), B = m(), H = m(), W = m(), "profileData"), g = class extends o {
|
|
196
|
+
constructor(...n) {
|
|
197
|
+
super(...n), J(this, _, (E(this), A(this, void 0))), J(this, v, M(this, void 0)), J(this, y, P(this, void 0)), J(this, b, I(this, void 0)), J(this, x, L(this, !1)), J(this, S, z(this, void 0)), J(this, C, V(this, "loading")), J(this, w, U(this, "")), J(this, T, G(this, !1)), Q(this, "friendRequest", 0), Q(this, "friendRequestInterrupted", !1), Q(this, "friendMessageTimer", void 0), Q(this, "draggableSubject", { uri: "" }), Q(this, "draggableElementsAttached", !1), Q(this, "handleAddFriend", async (e) => {
|
|
198
198
|
if (e.preventDefault(), this.friendState !== "available" && this.friendState !== "error") return;
|
|
199
|
-
let
|
|
200
|
-
if (!
|
|
201
|
-
let
|
|
199
|
+
let n = this.friendSubject;
|
|
200
|
+
if (!n) return;
|
|
201
|
+
let i = this.friendRequest;
|
|
202
202
|
this.friendState = "saving", this.clearFriendMessage();
|
|
203
203
|
try {
|
|
204
|
-
let e =
|
|
205
|
-
if (!e) throw Error(
|
|
206
|
-
if (await
|
|
207
|
-
this.friendState = "exists", await this.showFriendMessage(
|
|
204
|
+
let e = l.currentUser();
|
|
205
|
+
if (!e) throw Error(r.loginRequired);
|
|
206
|
+
if (await t(e, n), i !== this.friendRequest || this.friendSubject !== n) return;
|
|
207
|
+
this.friendState = "exists", await this.showFriendMessage(r.success, !1);
|
|
208
208
|
} catch (e) {
|
|
209
|
-
if (
|
|
209
|
+
if (i !== this.friendRequest || this.friendSubject !== n) return;
|
|
210
210
|
this.friendState = "error", await this.showFriendMessage(e, !0);
|
|
211
211
|
}
|
|
212
|
-
}),
|
|
212
|
+
}), Q(this, "handleEdit", (t) => {
|
|
213
213
|
let n = this.editContext;
|
|
214
|
-
n && t
|
|
214
|
+
n && e(t, u, n.subject, n.profileData, n.viewerMode, async () => {
|
|
215
215
|
this.dispatchEvent(new CustomEvent("profile-heading-saved", {
|
|
216
216
|
bubbles: !0,
|
|
217
217
|
composed: !0,
|
|
@@ -220,57 +220,63 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
220
220
|
}).catch((e) => {
|
|
221
221
|
console.error("Failed to edit profile heading.", e);
|
|
222
222
|
});
|
|
223
|
-
}),
|
|
223
|
+
}), Q(this, "handleImageError", (e) => {
|
|
224
224
|
this.failedImageSrc = e.currentTarget.getAttribute("src") ?? void 0;
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
|
-
get [
|
|
228
|
-
return
|
|
227
|
+
get [q]() {
|
|
228
|
+
return X(_, this);
|
|
229
229
|
}
|
|
230
230
|
set profileData(e) {
|
|
231
|
-
|
|
231
|
+
Y(_, this, e);
|
|
232
|
+
}
|
|
233
|
+
get subject() {
|
|
234
|
+
return X(v, this);
|
|
235
|
+
}
|
|
236
|
+
set subject(e) {
|
|
237
|
+
Y(v, this, e);
|
|
232
238
|
}
|
|
233
239
|
get editContext() {
|
|
234
|
-
return
|
|
240
|
+
return X(y, this);
|
|
235
241
|
}
|
|
236
242
|
set editContext(e) {
|
|
237
|
-
|
|
243
|
+
Y(y, this, e);
|
|
238
244
|
}
|
|
239
245
|
get friendSubject() {
|
|
240
|
-
return
|
|
246
|
+
return X(b, this);
|
|
241
247
|
}
|
|
242
248
|
set friendSubject(e) {
|
|
243
|
-
|
|
249
|
+
Y(b, this, e);
|
|
244
250
|
}
|
|
245
251
|
get compact() {
|
|
246
|
-
return
|
|
252
|
+
return X(x, this);
|
|
247
253
|
}
|
|
248
254
|
set compact(e) {
|
|
249
|
-
|
|
255
|
+
Y(x, this, e);
|
|
250
256
|
}
|
|
251
257
|
get failedImageSrc() {
|
|
252
|
-
return
|
|
258
|
+
return X(S, this);
|
|
253
259
|
}
|
|
254
260
|
set failedImageSrc(e) {
|
|
255
|
-
|
|
261
|
+
Y(S, this, e);
|
|
256
262
|
}
|
|
257
263
|
get friendState() {
|
|
258
|
-
return
|
|
264
|
+
return X(C, this);
|
|
259
265
|
}
|
|
260
266
|
set friendState(e) {
|
|
261
|
-
|
|
267
|
+
Y(C, this, e);
|
|
262
268
|
}
|
|
263
269
|
get friendMessage() {
|
|
264
|
-
return
|
|
270
|
+
return X(w, this);
|
|
265
271
|
}
|
|
266
272
|
set friendMessage(e) {
|
|
267
|
-
|
|
273
|
+
Y(w, this, e);
|
|
268
274
|
}
|
|
269
275
|
get friendError() {
|
|
270
|
-
return
|
|
276
|
+
return X(T, this);
|
|
271
277
|
}
|
|
272
278
|
set friendError(e) {
|
|
273
|
-
|
|
279
|
+
Y(T, this, e);
|
|
274
280
|
}
|
|
275
281
|
connectedCallback() {
|
|
276
282
|
super.connectedCallback(), this.friendRequestInterrupted && (this.friendRequestInterrupted = !1, this.startFriendCheck());
|
|
@@ -284,30 +290,35 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
284
290
|
willUpdate(e) {
|
|
285
291
|
super.willUpdate(e), e.has("profileData") && e.get("profileData")?.imageSrc !== this.profileData?.imageSrc && (this.failedImageSrc = void 0), e.has("friendSubject") && (this.friendRequestInterrupted = !1, this.startFriendCheck());
|
|
286
292
|
}
|
|
293
|
+
updated() {
|
|
294
|
+
if (this.subject && (this.draggableSubject.uri = this.subject.value), this.draggableElementsAttached || !this.subject) return;
|
|
295
|
+
let e = this.shadowRoot?.querySelector(".profile-heading"), t = this.shadowRoot?.querySelector(".name");
|
|
296
|
+
e && t && (c.makeDraggable(e, this.draggableSubject), c.makeDraggable(t, this.draggableSubject), this.draggableElementsAttached = !0);
|
|
297
|
+
}
|
|
287
298
|
startFriendCheck() {
|
|
288
299
|
let e = ++this.friendRequest;
|
|
289
300
|
this.friendState = "loading", this.clearFriendMessage(), this.friendError = !1;
|
|
290
|
-
let t = this.friendSubject,
|
|
291
|
-
t &&
|
|
301
|
+
let t = this.friendSubject, r = l.currentUser();
|
|
302
|
+
t && r && !r.sameTerm(t) && n(r, t).then((n) => {
|
|
292
303
|
e === this.friendRequest && this.friendSubject === t && (this.friendState = n ? "exists" : "available");
|
|
293
304
|
}).catch((n) => {
|
|
294
305
|
e === this.friendRequest && this.friendSubject === t && (this.friendState = "error", this.showFriendMessage(n, !0));
|
|
295
306
|
});
|
|
296
307
|
}
|
|
297
|
-
async showFriendMessage(
|
|
298
|
-
this.clearFriendMessage(), this.friendMessage = e
|
|
308
|
+
async showFriendMessage(e, t) {
|
|
309
|
+
this.clearFriendMessage(), this.friendMessage = i(e), this.friendError = t, this.friendMessageTimer = setTimeout(() => {
|
|
299
310
|
this.clearFriendMessage();
|
|
300
311
|
}, 1e4), await this.updateComplete, this.shadowRoot?.querySelector(".friend-message")?.focus();
|
|
301
312
|
}
|
|
302
313
|
render() {
|
|
303
314
|
let e = this.profileData;
|
|
304
|
-
if (!e) return
|
|
305
|
-
let t =
|
|
306
|
-
return
|
|
315
|
+
if (!e) return d``;
|
|
316
|
+
let t = ce(e.primaryPhone?.valueNode).replace(/^tel:/i, ""), n = ce(e.primaryEmail?.valueNode).replace(/^mailto:/i, ""), i = le(e.dateOfBirth), a = !!(e.imageSrc && this.failedImageSrc !== e.imageSrc), o = l.currentUser(), s = !!(this.friendSubject && o && !o.sameTerm(this.friendSubject));
|
|
317
|
+
return d`
|
|
307
318
|
<section class="profile-heading" aria-labelledby="profile-heading-name">
|
|
308
319
|
<div class="avatar">
|
|
309
320
|
<div class="image-frame ${a ? "" : "image-frame--fallback"}">
|
|
310
|
-
${a ?
|
|
321
|
+
${a ? d`<img
|
|
311
322
|
class="hero"
|
|
312
323
|
src=${e.imageSrc}
|
|
313
324
|
alt=${e.name}
|
|
@@ -315,7 +326,7 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
315
326
|
height="140"
|
|
316
327
|
loading="eager"
|
|
317
328
|
@error=${this.handleImageError}
|
|
318
|
-
/>` :
|
|
329
|
+
/>` : f}
|
|
319
330
|
<div class="hero-fallback" role="img" aria-label=${e.name}>
|
|
320
331
|
<icon-lucide-circle-user-round aria-hidden="true"></icon-lucide-circle-user-round>
|
|
321
332
|
</div>
|
|
@@ -326,15 +337,15 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
326
337
|
<header class="header-bar">
|
|
327
338
|
<div class="identity" role="group" aria-label=${this.compact ? "Name" : "Name and pronouns"}>
|
|
328
339
|
<h1 id="profile-heading-name" class="name">${e.name}</h1>
|
|
329
|
-
${e.pronouns ?
|
|
340
|
+
${e.pronouns ? d`<span class="pronouns" ?hidden=${this.compact}>(${e.pronouns})</span>` : f}
|
|
330
341
|
</div>
|
|
331
|
-
${e.jobTitle ?
|
|
342
|
+
${e.jobTitle ? d`<div class="role">${e.jobTitle}</div>` : f}
|
|
332
343
|
</header>
|
|
333
344
|
</div>
|
|
334
345
|
|
|
335
|
-
${
|
|
346
|
+
${this.editContext && !this.compact || s ? d`
|
|
336
347
|
<div class="profile__actions profile__heading-edit-action">
|
|
337
|
-
${s ?
|
|
348
|
+
${s ? d`
|
|
338
349
|
<div class="profile-friends-button__section" role="group" aria-label="Friend relationship actions">
|
|
339
350
|
<solid-ui-button
|
|
340
351
|
variant="secondary"
|
|
@@ -342,15 +353,15 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
342
353
|
?disabled=${this.friendState === "loading" || this.friendState === "saving" || this.friendState === "exists"}
|
|
343
354
|
aria-busy=${this.friendState === "loading" || this.friendState === "saving" ? "true" : "false"}
|
|
344
355
|
@click=${this.handleAddFriend}
|
|
345
|
-
>${this.friendState === "exists" ?
|
|
346
|
-
${this.friendMessage ?
|
|
356
|
+
>${this.friendState === "exists" ? f : d`<icon-lucide-user-round-plus slot="icon" class="profile__btn-friends-icon" aria-hidden="true"></icon-lucide-user-round-plus>`}${this.friendState === "exists" ? r.exists : r.add}</solid-ui-button>
|
|
357
|
+
${this.friendMessage ? d`
|
|
347
358
|
<div class="friend-message" role=${this.friendError ? "alert" : "status"}
|
|
348
359
|
aria-live=${this.friendError ? "assertive" : "polite"} tabindex="0">
|
|
349
360
|
${this.friendMessage}
|
|
350
|
-
</div>` :
|
|
361
|
+
</div>` : f}
|
|
351
362
|
</div>
|
|
352
|
-
` :
|
|
353
|
-
${this.editContext ?
|
|
363
|
+
` : f}
|
|
364
|
+
${this.editContext && !this.compact ? d`
|
|
354
365
|
<solid-ui-button
|
|
355
366
|
variant="tertiary"
|
|
356
367
|
class="profile-section-collapsible__edit-button desktop-edit-button"
|
|
@@ -372,14 +383,14 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
372
383
|
${this.renderEditIcon()}
|
|
373
384
|
</span>
|
|
374
385
|
</solid-ui-button>
|
|
375
|
-
` :
|
|
386
|
+
` : f}
|
|
376
387
|
</div>
|
|
377
|
-
` :
|
|
388
|
+
` : f}
|
|
378
389
|
|
|
379
390
|
<div class="details-collapse" aria-hidden=${this.compact ? "true" : "false"} ?inert=${this.compact}>
|
|
380
391
|
<div class="details">
|
|
381
392
|
<div class="detail-row" role="group" aria-label="Additional profile information">
|
|
382
|
-
${this.renderLine(
|
|
393
|
+
${this.renderLine(i, "birthday")}
|
|
383
394
|
${this.renderLine(e.location, "location")}
|
|
384
395
|
</div>
|
|
385
396
|
<div class="detail-row" role="group" aria-label="Contact information">
|
|
@@ -392,76 +403,81 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
392
403
|
`;
|
|
393
404
|
}
|
|
394
405
|
renderLine(e, t) {
|
|
395
|
-
return e ?
|
|
406
|
+
return e ? d`
|
|
396
407
|
<div class="detail-item">
|
|
397
408
|
<span class="detail-icon" aria-hidden="true">
|
|
398
409
|
${this.renderIcon(t)}
|
|
399
410
|
</span>
|
|
400
411
|
<span class="detail-value">${e}</span>
|
|
401
412
|
</div>
|
|
402
|
-
` :
|
|
413
|
+
` : f;
|
|
403
414
|
}
|
|
404
415
|
renderIcon(e) {
|
|
405
416
|
switch (e) {
|
|
406
|
-
case "birthday": return
|
|
407
|
-
case "location": return
|
|
408
|
-
case "phone": return
|
|
409
|
-
case "email": return
|
|
417
|
+
case "birthday": return d`<icon-lucide-cake aria-hidden="true"></icon-lucide-cake>`;
|
|
418
|
+
case "location": return d`<icon-lucide-map-pin aria-hidden="true"></icon-lucide-map-pin>`;
|
|
419
|
+
case "phone": return d`<icon-lucide-phone aria-hidden="true"></icon-lucide-phone>`;
|
|
420
|
+
case "email": return d`<icon-lucide-mail aria-hidden="true"></icon-lucide-mail>`;
|
|
410
421
|
}
|
|
411
422
|
}
|
|
412
423
|
renderEditIcon() {
|
|
413
|
-
return
|
|
424
|
+
return d`<icon-lucide-pencil aria-hidden="true"></icon-lucide-pencil>`;
|
|
414
425
|
}
|
|
415
|
-
}, {e: [
|
|
426
|
+
}, {e: [A, M, P, I, L, z, V, U, G, E], c: [$, D]} = ne(g, [
|
|
416
427
|
[
|
|
417
|
-
|
|
428
|
+
k,
|
|
418
429
|
1,
|
|
419
430
|
"profileData"
|
|
420
431
|
],
|
|
421
432
|
[
|
|
422
|
-
|
|
433
|
+
j,
|
|
434
|
+
1,
|
|
435
|
+
"subject"
|
|
436
|
+
],
|
|
437
|
+
[
|
|
438
|
+
N,
|
|
423
439
|
1,
|
|
424
440
|
"editContext"
|
|
425
441
|
],
|
|
426
442
|
[
|
|
427
|
-
|
|
443
|
+
F,
|
|
428
444
|
1,
|
|
429
445
|
"friendSubject"
|
|
430
446
|
],
|
|
431
447
|
[
|
|
432
|
-
|
|
448
|
+
ee,
|
|
433
449
|
1,
|
|
434
450
|
"compact"
|
|
435
451
|
],
|
|
436
452
|
[
|
|
437
|
-
|
|
453
|
+
R,
|
|
438
454
|
1,
|
|
439
455
|
"failedImageSrc"
|
|
440
456
|
],
|
|
441
457
|
[
|
|
442
|
-
|
|
458
|
+
B,
|
|
443
459
|
1,
|
|
444
460
|
"friendState"
|
|
445
461
|
],
|
|
446
462
|
[
|
|
447
|
-
|
|
463
|
+
H,
|
|
448
464
|
1,
|
|
449
465
|
"friendMessage"
|
|
450
466
|
],
|
|
451
467
|
[
|
|
452
|
-
|
|
468
|
+
W,
|
|
453
469
|
1,
|
|
454
470
|
"friendError"
|
|
455
471
|
]
|
|
456
|
-
],
|
|
472
|
+
], O, 0, void 0, o), g), h = class extends se {
|
|
457
473
|
constructor() {
|
|
458
|
-
super(
|
|
474
|
+
super($), Q(this, "styles", a), D();
|
|
459
475
|
}
|
|
460
|
-
},
|
|
461
|
-
function
|
|
476
|
+
}, Q(h, K, void 0), h)();
|
|
477
|
+
function ce(e) {
|
|
462
478
|
return e?.value ?? "";
|
|
463
479
|
}
|
|
464
|
-
function
|
|
480
|
+
function le(e) {
|
|
465
481
|
let t = (e || "").trim(), n = t.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
466
482
|
if (n) {
|
|
467
483
|
let [, e, t, r] = n;
|
|
@@ -474,6 +490,6 @@ function ae(e) {
|
|
|
474
490
|
}
|
|
475
491
|
return t;
|
|
476
492
|
}
|
|
477
|
-
export {
|
|
493
|
+
export { $ as default };
|
|
478
494
|
|
|
479
495
|
//# sourceMappingURL=ProfileHeading.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileHeading.esm.js","names":["authn","store","customElement","WebComponent","html","nothing","property","state","createHeadingEditDialog","addFriend","checkFriend","friendTexts","formatDisplayError","styles","_classDecs","_ProfileHeading","_ProfileHeading2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_ref","_profileDataDecs","attribute","_editContextDecs","_friendSubjectDecs","_compactDecs","type","Boolean","reflect","_failedImageSrcDecs","_friendStateDecs","_friendMessageDecs","_friendErrorDecs","_ProfileHeading3","ProfileHeading","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_profileData","undefined","_init_editContext","_init_friendSubject","_init_compact","_init_failedImageSrc","_init_friendState","_init_friendMessage","_init_friendError","_defineProperty","event","preventDefault","friendState","subject","friendSubject","request","friendRequest","clearFriendMessage","viewer","currentUser","Error","loginRequired","showFriendMessage","success","error","context","editContext","profileData","viewerMode","dispatchEvent","CustomEvent","bubbles","composed","detail","subjectUri","value","onSaved","catch","console","failedImageSrc","currentTarget","getAttribute","_classPrivateFieldGet","v","_classPrivateFieldSet","compact","friendMessage","friendError","connectedCallback","friendRequestInterrupted","startFriendCheck","disconnectedCallback","clearTimeout","friendMessageTimer","willUpdate","changed","has","get","imageSrc","sameTerm","then","exists","message","setTimeout","updateComplete","shadowRoot","querySelector","focus","render","profile","phone","textValue","primaryPhone","valueNode","replace","email","primaryEmail","dateOfBirth","displayDate","showImage","showFriend","name","handleImageError","pronouns","jobTitle","handleAddFriend","add","handleEdit","renderEditIcon","renderLine","location","icon","renderIcon","e","c","_initClass","_applyDecs","_Class","_identity","default","raw","trim","isoDate","match","year","month","day","dmyDate","styles","ProfileHeading_styles_default","_Class","_ProfileHeading3","_A","_B","_C","_D","_E","_F","_G","_H","_initProto","_initClass","_classDecs","_profileDataDecs","_init_profileData","_editContextDecs","_init_editContext","_friendSubjectDecs","_init_friendSubject","_compactDecs","_init_compact","_failedImageSrcDecs","_init_failedImageSrc","_friendStateDecs","_init_friendState","_friendMessageDecs","_init_friendMessage","_friendErrorDecs","_init_friendError","_ProfileHeading2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","customElement","_ProfileHeading","property","state","WebComponent","args","event","subject","request","viewer","authn","friendTexts","addFriend","error","context","createHeadingEditDialog","store","changed","checkFriend","exists","formatDisplayError","message","profile","phone","textValue","email","dateOfBirth","displayDate","showImage","showFriend","nothing","value","icon","raw","isoDate","year","month","day","dmyDate"],"sources":["../../../src/components/profile-heading/ProfileHeading.ts"],"sourcesContent":["import { authn, store } from 'solid-logic'\nimport type { NamedNode, Node } from 'rdflib'\nimport { customElement, WebComponent } from 'solid-ui'\nimport { html, nothing, type PropertyValues, type TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { createHeadingEditDialog } from './editor/sections/heading/HeadingEditDialog'\nimport type { ProfileDetails, ProfilePresentation } from './editor/sections/heading/types'\nimport type { PointDetails } from './editor/sections/contactInfo/types'\nimport type { ViewerMode } from '../../types'\nimport { addFriend, checkFriend, friendTexts } from './friendActions'\nimport { formatDisplayError } from './editor/utils/errorDisplay'\nimport 'solid-ui/components/button'\nimport '~icons/lucide/cake'\nimport '~icons/lucide/circle-user-round'\nimport '~icons/lucide/mail'\nimport '~icons/lucide/map-pin'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/phone'\nimport '~icons/lucide/user-round-plus'\nimport styles from './ProfileHeading.styles.css'\n\nexport type ProfileHeadingPoint = Pick<PointDetails, 'valueNode'>\n\n// The heading renders a subset of the shared presentation model used by the editor.\nexport type ProfileHeadingData =\n Pick<ProfilePresentation, 'name' | 'imageSrc' | 'location' | 'pronouns' | 'dateOfBirth' | 'jobTitle'> & {\n primaryPhone?: ProfileHeadingPoint\n primaryEmail?: ProfileHeadingPoint\n }\n\nexport interface ProfileHeadingEditContext {\n subject: NamedNode\n profileData: ProfileDetails\n viewerMode: ViewerMode\n onSaved: () => Promise<void> | void\n}\n\n@customElement('solid-panes-profile-heading')\nexport default class ProfileHeading extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor profileData: ProfileHeadingData | undefined = undefined\n\n @property({ attribute: false })\n accessor editContext: ProfileHeadingEditContext | undefined = undefined\n\n @property({ attribute: false })\n accessor friendSubject: NamedNode | undefined = undefined\n\n @property({ type: Boolean, reflect: true })\n accessor compact = false\n\n @state()\n accessor failedImageSrc: string | undefined = undefined\n\n @state()\n accessor friendState: 'loading' | 'available' | 'exists' | 'saving' | 'error' = 'loading'\n\n @state()\n accessor friendMessage = ''\n\n @state()\n accessor friendError = false\n\n private friendRequest = 0\n private friendRequestInterrupted = false\n private friendMessageTimer: ReturnType<typeof setTimeout> | undefined\n\n connectedCallback (): void {\n super.connectedCallback()\n if (this.friendRequestInterrupted) {\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n }\n\n disconnectedCallback (): void {\n super.disconnectedCallback()\n this.friendRequest++\n if (this.friendState === 'loading' || this.friendState === 'saving') {\n this.friendRequestInterrupted = true\n }\n this.clearFriendMessage()\n }\n\n private clearFriendMessage (): void {\n clearTimeout(this.friendMessageTimer)\n this.friendMessageTimer = undefined\n this.friendMessage = ''\n }\n\n protected willUpdate (changed: PropertyValues<this>): void {\n super.willUpdate(changed)\n if (changed.has('profileData') && changed.get('profileData')?.imageSrc !== this.profileData?.imageSrc) {\n this.failedImageSrc = undefined\n }\n if (!changed.has('friendSubject')) return\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n\n private startFriendCheck (): void {\n const request = ++this.friendRequest\n this.friendState = 'loading'\n this.clearFriendMessage()\n this.friendError = false\n const subject = this.friendSubject\n const viewer = authn.currentUser()\n if (!subject || !viewer || viewer.sameTerm(subject)) return\n\n checkFriend(viewer, subject).then((exists) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = exists ? 'exists' : 'available'\n }).catch((error: unknown) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n this.showFriendMessage(error, true)\n })\n }\n\n private async showFriendMessage (message: unknown, error: boolean): Promise<void> {\n this.clearFriendMessage()\n this.friendMessage = formatDisplayError(message)\n this.friendError = error\n this.friendMessageTimer = setTimeout(() => {\n this.clearFriendMessage()\n }, 10000)\n await this.updateComplete\n this.shadowRoot?.querySelector<HTMLElement>('.friend-message')?.focus()\n }\n\n private handleAddFriend = async (event: Event): Promise<void> => {\n event.preventDefault()\n if (this.friendState !== 'available' && this.friendState !== 'error') return\n const subject = this.friendSubject\n if (!subject) return\n const request = this.friendRequest\n this.friendState = 'saving'\n this.clearFriendMessage()\n try {\n const viewer = authn.currentUser()\n if (!viewer) throw new Error(friendTexts.loginRequired)\n await addFriend(viewer, subject)\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'exists'\n await this.showFriendMessage(friendTexts.success, false)\n } catch (error: unknown) {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n await this.showFriendMessage(error, true)\n }\n }\n\n private handleEdit = (event: Event) => {\n const context = this.editContext\n if (!context) return\n\n createHeadingEditDialog(\n event,\n store,\n context.subject,\n context.profileData,\n context.viewerMode,\n async () => {\n this.dispatchEvent(new CustomEvent('profile-heading-saved', {\n bubbles: true,\n composed: true,\n detail: { subjectUri: context.subject.value }\n }))\n await context.onSaved()\n }\n ).catch((error: unknown) => {\n console.error('Failed to edit profile heading.', error)\n })\n }\n\n private handleImageError = (event: Event) => {\n this.failedImageSrc = (event.currentTarget as HTMLImageElement).getAttribute('src') ?? undefined\n }\n\n render (): TemplateResult<1> {\n const profile = this.profileData\n if (!profile) return html``\n\n const phone = textValue(profile.primaryPhone?.valueNode).replace(/^tel:/i, '')\n const email = textValue(profile.primaryEmail?.valueNode).replace(/^mailto:/i, '')\n const dateOfBirth = displayDate(profile.dateOfBirth)\n const showImage = Boolean(profile.imageSrc && this.failedImageSrc !== profile.imageSrc)\n const viewer = authn.currentUser()\n const showFriend = Boolean(this.friendSubject && viewer && !viewer.sameTerm(this.friendSubject))\n\n return html`\n <section class=\"profile-heading\" aria-labelledby=\"profile-heading-name\">\n <div class=\"avatar\">\n <div class=\"image-frame ${showImage ? '' : 'image-frame--fallback'}\">\n ${showImage\n ? html`<img\n class=\"hero\"\n src=${profile.imageSrc}\n alt=${profile.name}\n width=\"140\"\n height=\"140\"\n loading=\"eager\"\n @error=${this.handleImageError}\n />`\n : nothing}\n <div class=\"hero-fallback\" role=\"img\" aria-label=${profile.name}>\n <icon-lucide-circle-user-round aria-hidden=\"true\"></icon-lucide-circle-user-round>\n </div>\n </div>\n </div>\n\n <div class=\"info\">\n <header class=\"header-bar\">\n <div class=\"identity\" role=\"group\" aria-label=${this.compact ? 'Name' : 'Name and pronouns'}>\n <h1 id=\"profile-heading-name\" class=\"name\">${profile.name}</h1>\n ${profile.pronouns ? html`<span class=\"pronouns\" ?hidden=${this.compact}>(${profile.pronouns})</span>` : nothing}\n </div>\n ${profile.jobTitle ? html`<div class=\"role\">${profile.jobTitle}</div>` : nothing}\n </header>\n </div>\n\n ${(this.editContext || showFriend) && !this.compact\n ? html`\n <div class=\"profile__actions profile__heading-edit-action\">\n ${showFriend\n ? html`\n <div class=\"profile-friends-button__section\" role=\"group\" aria-label=\"Friend relationship actions\">\n <solid-ui-button\n variant=\"secondary\"\n class=\"profile__btn-friends\"\n ?disabled=${this.friendState === 'loading' || this.friendState === 'saving' || this.friendState === 'exists'}\n aria-busy=${this.friendState === 'loading' || this.friendState === 'saving' ? 'true' : 'false'}\n @click=${this.handleAddFriend}\n >${this.friendState === 'exists'\n ? nothing\n : html`<icon-lucide-user-round-plus slot=\"icon\" class=\"profile__btn-friends-icon\" aria-hidden=\"true\"></icon-lucide-user-round-plus>`}${this.friendState === 'exists' ? friendTexts.exists : friendTexts.add}</solid-ui-button>\n ${this.friendMessage\n ? html`\n <div class=\"friend-message\" role=${this.friendError ? 'alert' : 'status'}\n aria-live=${this.friendError ? 'assertive' : 'polite'} tabindex=\"0\">\n ${this.friendMessage}\n </div>`\n : nothing}\n </div>\n `\n : nothing}\n ${this.editContext\n ? html`\n <solid-ui-button\n variant=\"tertiary\"\n class=\"profile-section-collapsible__edit-button desktop-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"left-icon\" class=\"profile-section-collapsible__action-label profile__add-more-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n <span class=\"profile-section-collapsible__action-label edit-label\">Edit</span>\n </solid-ui-button>\n <solid-ui-button\n variant=\"ghost\"\n class=\"profile-section-collapsible__edit-button mobile-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"icon\" class=\"profile-section-collapsible__edit-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n </solid-ui-button>\n `\n : nothing}\n </div>\n `\n : nothing}\n\n <div class=\"details-collapse\" aria-hidden=${this.compact ? 'true' : 'false'} ?inert=${this.compact}>\n <div class=\"details\">\n <div class=\"detail-row\" role=\"group\" aria-label=\"Additional profile information\">\n ${this.renderLine(dateOfBirth, 'birthday')}\n ${this.renderLine(profile.location, 'location')}\n </div>\n <div class=\"detail-row\" role=\"group\" aria-label=\"Contact information\">\n ${this.renderLine(phone, 'phone')}\n ${this.renderLine(email, 'email')}\n </div>\n </div>\n </div>\n </section>\n `\n }\n\n private renderLine (value: string | undefined, icon: 'birthday' | 'location' | 'phone' | 'email') {\n if (!value) return nothing\n\n return html`\n <div class=\"detail-item\">\n <span class=\"detail-icon\" aria-hidden=\"true\">\n ${this.renderIcon(icon)}\n </span>\n <span class=\"detail-value\">${value}</span>\n </div>\n `\n }\n\n private renderIcon (icon: 'birthday' | 'location' | 'phone' | 'email'): TemplateResult {\n switch (icon) {\n case 'birthday':\n return html`<icon-lucide-cake aria-hidden=\"true\"></icon-lucide-cake>`\n case 'location':\n return html`<icon-lucide-map-pin aria-hidden=\"true\"></icon-lucide-map-pin>`\n case 'phone':\n return html`<icon-lucide-phone aria-hidden=\"true\"></icon-lucide-phone>`\n case 'email':\n return html`<icon-lucide-mail aria-hidden=\"true\"></icon-lucide-mail>`\n }\n }\n\n private renderEditIcon (): TemplateResult {\n return html`<icon-lucide-pencil aria-hidden=\"true\"></icon-lucide-pencil>`\n }\n}\n\nfunction textValue (value: Node | undefined): string {\n return value?.value ?? ''\n}\n\nfunction displayDate (value?: string): string {\n const raw = (value || '').trim()\n const isoDate = raw.match(/^(\\d{4})-(\\d{2})-(\\d{2})/)\n if (isoDate) {\n const [, year, month, day] = isoDate\n return `${day}-${month}-${year}`\n }\n\n const dmyDate = raw.match(/^(\\d{2})[/-](\\d{2})[/-](\\d{4})$/)\n if (dmyDate) {\n const [, day, month, year] = dmyDate\n return `${day}-${month}-${year}`\n }\n\n return raw\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBAc,IAAA,CAcCZ,EAAc,6BAA6B,CAAC;AAAA,IAAAa;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kBAAA,IAAAH,QAAA,GAAAI,kBAAA,IAAAJ,QAAA,GAAAK,kBAAA,IAAAL,QAAA,G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,CAAY,GAAAoC,IAAAuG,IAAA,cAAAC,GAAA;CAAAtG,cAAA;EAAA,MAAA1B,CAAA,GAAAuC,EAAA,MAAA,UACtCzC,CAAM,GAAA+H,EAAA;CAAA;AAAA,GAAAtF,EAAAwF,GAAA9H,GAAA,KAAA,CAAA,GAAA8H,GAAA;AA6RxB,SAAS1B,EAAWpC,GAAiC;CACnD,OAAOA,GAAOA,SAAS;AACzB;AAEA,SAAS2C,GAAa3C,GAAwB;CAC5C,IAAMiE,KAAOjE,KAAS,GAAA,CAAIkE,KAAK,GACzBC,IAAUF,EAAIG,MAAM,0BAA0B;CACpD,IAAID,GAAS;EACX,IAAM,GAAGE,GAAMC,GAAOC,KAAOJ;EAC7B,OAAO,GAAGI,EAAG,GAAID,EAAK,GAAID;CAC5B;CAEA,IAAMG,IAAUP,EAAIG,MAAM,iCAAiC;CAC3D,IAAII,GAAS;EACX,IAAM,GAAGD,GAAKD,GAAOD,KAAQG;EAC7B,OAAO,GAAGD,EAAG,GAAID,EAAK,GAAID;CAC5B;CAEA,OAAOJ;AACT"}
|
|
1
|
+
{"version":3,"file":"ProfileHeading.esm.js","names":["authn","store","customElement","WebComponent","widgets","html","nothing","property","state","createHeadingEditDialog","addFriend","checkFriend","friendTexts","formatDisplayError","styles","_classDecs","_ProfileHeading","_ProfileHeading2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_ref","_profileDataDecs","attribute","_subjectDecs","_editContextDecs","_friendSubjectDecs","_compactDecs","type","Boolean","reflect","_failedImageSrcDecs","_friendStateDecs","_friendMessageDecs","_friendErrorDecs","_ProfileHeading3","ProfileHeading","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_profileData","undefined","_init_subject","_init_editContext","_init_friendSubject","_init_compact","_init_failedImageSrc","_init_friendState","_init_friendMessage","_init_friendError","_defineProperty","uri","event","preventDefault","friendState","subject","friendSubject","request","friendRequest","clearFriendMessage","viewer","currentUser","Error","loginRequired","showFriendMessage","success","error","context","editContext","profileData","viewerMode","dispatchEvent","CustomEvent","bubbles","composed","detail","subjectUri","value","onSaved","catch","console","failedImageSrc","currentTarget","getAttribute","_classPrivateFieldGet","v","_classPrivateFieldSet","compact","friendMessage","friendError","connectedCallback","friendRequestInterrupted","startFriendCheck","disconnectedCallback","clearTimeout","friendMessageTimer","willUpdate","changed","has","get","imageSrc","updated","draggableSubject","draggableElementsAttached","heading","shadowRoot","querySelector","name","makeDraggable","sameTerm","then","exists","message","setTimeout","updateComplete","focus","render","profile","phone","textValue","primaryPhone","valueNode","replace","email","primaryEmail","dateOfBirth","displayDate","showImage","showFriend","handleImageError","pronouns","jobTitle","handleAddFriend","add","handleEdit","renderEditIcon","renderLine","location","icon","renderIcon","e","c","_initClass","_applyDecs","_Class","_identity","raw","trim","isoDate","match","year","month","day","dmyDate","ProfileHeading_styles_default","_Class","_ProfileHeading3","_A","_B","_C","_D","_E","_F","_G","_H","_I","_initProto","_initClass","_classDecs","_profileDataDecs","_init_profileData","_subjectDecs","_init_subject","_editContextDecs","_init_editContext","_friendSubjectDecs","_init_friendSubject","_compactDecs","_init_compact","_failedImageSrcDecs","_init_failedImageSrc","_friendStateDecs","_init_friendState","_friendMessageDecs","_init_friendMessage","_friendErrorDecs","_init_friendError","_ProfileHeading2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","customElement","_ProfileHeading","property","state","WebComponent","args","event","subject","request","viewer","authn","friendTexts","addFriend","error","context","createHeadingEditDialog","store","changed","heading","name","widgets","checkFriend","exists","formatDisplayError","message","profile","phone","textValue","email","dateOfBirth","displayDate","showImage","showFriend","nothing","value","icon","raw","isoDate","year","month","day","dmyDate"],"sources":["../../../src/components/profile-heading/ProfileHeading.ts"],"sourcesContent":["import { authn, store } from 'solid-logic'\nimport type { NamedNode, Node } from 'rdflib'\nimport { customElement, WebComponent, widgets } from 'solid-ui'\nimport { html, nothing, type PropertyValues, type TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { createHeadingEditDialog } from './editor/sections/heading/HeadingEditDialog'\nimport type { ProfileDetails, ProfilePresentation } from './editor/sections/heading/types'\nimport type { PointDetails } from './editor/sections/contactInfo/types'\nimport type { ViewerMode } from '../../types'\nimport { addFriend, checkFriend, friendTexts } from './friendActions'\nimport { formatDisplayError } from './editor/utils/errorDisplay'\nimport 'solid-ui/components/button'\nimport '~icons/lucide/cake'\nimport '~icons/lucide/circle-user-round'\nimport '~icons/lucide/mail'\nimport '~icons/lucide/map-pin'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/phone'\nimport '~icons/lucide/user-round-plus'\nimport styles from './ProfileHeading.styles.css'\n\nexport type ProfileHeadingPoint = Pick<PointDetails, 'valueNode'>\n\n// The heading renders a subset of the shared presentation model used by the editor.\nexport type ProfileHeadingData =\n Pick<ProfilePresentation, 'name' | 'imageSrc' | 'location' | 'pronouns' | 'dateOfBirth' | 'jobTitle'> & {\n primaryPhone?: ProfileHeadingPoint\n primaryEmail?: ProfileHeadingPoint\n }\n\nexport interface ProfileHeadingEditContext {\n subject: NamedNode\n profileData: ProfileDetails\n viewerMode: ViewerMode\n onSaved: () => Promise<void> | void\n}\n\n@customElement('solid-panes-profile-heading')\nexport default class ProfileHeading extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor profileData: ProfileHeadingData | undefined = undefined\n\n @property({ attribute: false })\n accessor subject: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor editContext: ProfileHeadingEditContext | undefined = undefined\n\n @property({ attribute: false })\n accessor friendSubject: NamedNode | undefined = undefined\n\n @property({ type: Boolean, reflect: true })\n accessor compact = false\n\n @state()\n accessor failedImageSrc: string | undefined = undefined\n\n @state()\n accessor friendState: 'loading' | 'available' | 'exists' | 'saving' | 'error' = 'loading'\n\n @state()\n accessor friendMessage = ''\n\n @state()\n accessor friendError = false\n\n private friendRequest = 0\n private friendRequestInterrupted = false\n private friendMessageTimer: ReturnType<typeof setTimeout> | undefined\n private readonly draggableSubject = { uri: '' }\n private draggableElementsAttached = false\n\n connectedCallback (): void {\n super.connectedCallback()\n if (this.friendRequestInterrupted) {\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n }\n\n disconnectedCallback (): void {\n super.disconnectedCallback()\n this.friendRequest++\n if (this.friendState === 'loading' || this.friendState === 'saving') {\n this.friendRequestInterrupted = true\n }\n this.clearFriendMessage()\n }\n\n private clearFriendMessage (): void {\n clearTimeout(this.friendMessageTimer)\n this.friendMessageTimer = undefined\n this.friendMessage = ''\n }\n\n protected willUpdate (changed: PropertyValues<this>): void {\n super.willUpdate(changed)\n if (changed.has('profileData') && changed.get('profileData')?.imageSrc !== this.profileData?.imageSrc) {\n this.failedImageSrc = undefined\n }\n if (!changed.has('friendSubject')) return\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n\n protected updated (): void {\n if (this.subject) this.draggableSubject.uri = this.subject.value\n if (this.draggableElementsAttached || !this.subject) return\n\n const heading = this.shadowRoot?.querySelector<HTMLElement>('.profile-heading')\n const name = this.shadowRoot?.querySelector<HTMLElement>('.name')\n if (!heading || !name) return\n\n widgets.makeDraggable(heading, this.draggableSubject)\n widgets.makeDraggable(name, this.draggableSubject)\n this.draggableElementsAttached = true\n }\n\n private startFriendCheck (): void {\n const request = ++this.friendRequest\n this.friendState = 'loading'\n this.clearFriendMessage()\n this.friendError = false\n const subject = this.friendSubject\n const viewer = authn.currentUser()\n if (!subject || !viewer || viewer.sameTerm(subject)) return\n\n checkFriend(viewer, subject).then((exists) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = exists ? 'exists' : 'available'\n }).catch((error: unknown) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n this.showFriendMessage(error, true)\n })\n }\n\n private async showFriendMessage (message: unknown, error: boolean): Promise<void> {\n this.clearFriendMessage()\n this.friendMessage = formatDisplayError(message)\n this.friendError = error\n this.friendMessageTimer = setTimeout(() => {\n this.clearFriendMessage()\n }, 10000)\n await this.updateComplete\n this.shadowRoot?.querySelector<HTMLElement>('.friend-message')?.focus()\n }\n\n private handleAddFriend = async (event: Event): Promise<void> => {\n event.preventDefault()\n if (this.friendState !== 'available' && this.friendState !== 'error') return\n const subject = this.friendSubject\n if (!subject) return\n const request = this.friendRequest\n this.friendState = 'saving'\n this.clearFriendMessage()\n try {\n const viewer = authn.currentUser()\n if (!viewer) throw new Error(friendTexts.loginRequired)\n await addFriend(viewer, subject)\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'exists'\n await this.showFriendMessage(friendTexts.success, false)\n } catch (error: unknown) {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n await this.showFriendMessage(error, true)\n }\n }\n\n private handleEdit = (event: Event) => {\n const context = this.editContext\n if (!context) return\n\n createHeadingEditDialog(\n event,\n store,\n context.subject,\n context.profileData,\n context.viewerMode,\n async () => {\n this.dispatchEvent(new CustomEvent('profile-heading-saved', {\n bubbles: true,\n composed: true,\n detail: { subjectUri: context.subject.value }\n }))\n await context.onSaved()\n }\n ).catch((error: unknown) => {\n console.error('Failed to edit profile heading.', error)\n })\n }\n\n private handleImageError = (event: Event) => {\n this.failedImageSrc = (event.currentTarget as HTMLImageElement).getAttribute('src') ?? undefined\n }\n\n render (): TemplateResult<1> {\n const profile = this.profileData\n if (!profile) return html``\n\n const phone = textValue(profile.primaryPhone?.valueNode).replace(/^tel:/i, '')\n const email = textValue(profile.primaryEmail?.valueNode).replace(/^mailto:/i, '')\n const dateOfBirth = displayDate(profile.dateOfBirth)\n const showImage = Boolean(profile.imageSrc && this.failedImageSrc !== profile.imageSrc)\n const viewer = authn.currentUser()\n const showFriend = Boolean(this.friendSubject && viewer && !viewer.sameTerm(this.friendSubject))\n\n return html`\n <section class=\"profile-heading\" aria-labelledby=\"profile-heading-name\">\n <div class=\"avatar\">\n <div class=\"image-frame ${showImage ? '' : 'image-frame--fallback'}\">\n ${showImage\n ? html`<img\n class=\"hero\"\n src=${profile.imageSrc}\n alt=${profile.name}\n width=\"140\"\n height=\"140\"\n loading=\"eager\"\n @error=${this.handleImageError}\n />`\n : nothing}\n <div class=\"hero-fallback\" role=\"img\" aria-label=${profile.name}>\n <icon-lucide-circle-user-round aria-hidden=\"true\"></icon-lucide-circle-user-round>\n </div>\n </div>\n </div>\n\n <div class=\"info\">\n <header class=\"header-bar\">\n <div class=\"identity\" role=\"group\" aria-label=${this.compact ? 'Name' : 'Name and pronouns'}>\n <h1 id=\"profile-heading-name\" class=\"name\">${profile.name}</h1>\n ${profile.pronouns ? html`<span class=\"pronouns\" ?hidden=${this.compact}>(${profile.pronouns})</span>` : nothing}\n </div>\n ${profile.jobTitle ? html`<div class=\"role\">${profile.jobTitle}</div>` : nothing}\n </header>\n </div>\n\n ${(this.editContext && !this.compact) || showFriend\n ? html`\n <div class=\"profile__actions profile__heading-edit-action\">\n ${showFriend\n ? html`\n <div class=\"profile-friends-button__section\" role=\"group\" aria-label=\"Friend relationship actions\">\n <solid-ui-button\n variant=\"secondary\"\n class=\"profile__btn-friends\"\n ?disabled=${this.friendState === 'loading' || this.friendState === 'saving' || this.friendState === 'exists'}\n aria-busy=${this.friendState === 'loading' || this.friendState === 'saving' ? 'true' : 'false'}\n @click=${this.handleAddFriend}\n >${this.friendState === 'exists'\n ? nothing\n : html`<icon-lucide-user-round-plus slot=\"icon\" class=\"profile__btn-friends-icon\" aria-hidden=\"true\"></icon-lucide-user-round-plus>`}${this.friendState === 'exists' ? friendTexts.exists : friendTexts.add}</solid-ui-button>\n ${this.friendMessage\n ? html`\n <div class=\"friend-message\" role=${this.friendError ? 'alert' : 'status'}\n aria-live=${this.friendError ? 'assertive' : 'polite'} tabindex=\"0\">\n ${this.friendMessage}\n </div>`\n : nothing}\n </div>\n `\n : nothing}\n ${this.editContext && !this.compact\n ? html`\n <solid-ui-button\n variant=\"tertiary\"\n class=\"profile-section-collapsible__edit-button desktop-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"left-icon\" class=\"profile-section-collapsible__action-label profile__add-more-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n <span class=\"profile-section-collapsible__action-label edit-label\">Edit</span>\n </solid-ui-button>\n <solid-ui-button\n variant=\"ghost\"\n class=\"profile-section-collapsible__edit-button mobile-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"icon\" class=\"profile-section-collapsible__edit-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n </solid-ui-button>\n `\n : nothing}\n </div>\n `\n : nothing}\n\n <div class=\"details-collapse\" aria-hidden=${this.compact ? 'true' : 'false'} ?inert=${this.compact}>\n <div class=\"details\">\n <div class=\"detail-row\" role=\"group\" aria-label=\"Additional profile information\">\n ${this.renderLine(dateOfBirth, 'birthday')}\n ${this.renderLine(profile.location, 'location')}\n </div>\n <div class=\"detail-row\" role=\"group\" aria-label=\"Contact information\">\n ${this.renderLine(phone, 'phone')}\n ${this.renderLine(email, 'email')}\n </div>\n </div>\n </div>\n </section>\n `\n }\n\n private renderLine (value: string | undefined, icon: 'birthday' | 'location' | 'phone' | 'email') {\n if (!value) return nothing\n\n return html`\n <div class=\"detail-item\">\n <span class=\"detail-icon\" aria-hidden=\"true\">\n ${this.renderIcon(icon)}\n </span>\n <span class=\"detail-value\">${value}</span>\n </div>\n `\n }\n\n private renderIcon (icon: 'birthday' | 'location' | 'phone' | 'email'): TemplateResult {\n switch (icon) {\n case 'birthday':\n return html`<icon-lucide-cake aria-hidden=\"true\"></icon-lucide-cake>`\n case 'location':\n return html`<icon-lucide-map-pin aria-hidden=\"true\"></icon-lucide-map-pin>`\n case 'phone':\n return html`<icon-lucide-phone aria-hidden=\"true\"></icon-lucide-phone>`\n case 'email':\n return html`<icon-lucide-mail aria-hidden=\"true\"></icon-lucide-mail>`\n }\n }\n\n private renderEditIcon (): TemplateResult {\n return html`<icon-lucide-pencil aria-hidden=\"true\"></icon-lucide-pencil>`\n }\n}\n\nfunction textValue (value: Node | undefined): string {\n return value?.value ?? ''\n}\n\nfunction displayDate (value?: string): string {\n const raw = (value || '').trim()\n const isoDate = raw.match(/^(\\d{4})-(\\d{2})-(\\d{2})/)\n if (isoDate) {\n const [, year, month, day] = isoDate\n return `${day}-${month}-${year}`\n }\n\n const dmyDate = raw.match(/^(\\d{2})[/-](\\d{2})[/-](\\d{4})$/)\n if (dmyDate) {\n const [, day, month, year] = dmyDate\n return `${day}-${month}-${year}`\n }\n\n return raw\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBAe,IAAA,CAcCb,EAAc,6BAA6B,CAAC;AAAA,IAAAc;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kBAAA,IAAAH,QAAA,GAAAI,kBAAA,IAAAJ,QAAA,GAAAK,kBAAA,IAAAL,QAAA,GAAAM,kBAAA,IAAAN,QAAA,GAAAO,kBAAA,IAAAP,QAAA,GAAAQ,kBAAA,IAAAR,QAAA,GAAAS,KAAAC,IAI1CtB,EAAS,EAAEuB,WAAW,GAAM,CAAC,GAACC,IAG9BxB,EAAS,EAAEuB,WAAW,GAAM,CAAC,GAACE,IAG9BzB,EAAS,EAAEuB,WAAW,GAAM,CAAC,GAACG,IAG9B1B,EAAS,EAAEuB,WAAW,GAAM,CAA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