@carbon-labs/wc-global-header 0.74.0 → 0.75.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/es/HybridIpaasHeader-BuCMGE9O.mjs +6825 -0
- package/es/wc-global-header-react.mjs +56 -55
- package/es/wc-global-header.css +1 -1
- package/es/wc-global-header.mjs +472 -558
- package/package.json +4 -4
- package/es/HybridIpaasHeader-T48NCm_A.mjs +0 -7466
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import E from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { b as A } from "./HybridIpaasHeader-BuCMGE9O.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
5
5
|
* Copyright 2018 Google LLC
|
|
6
6
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let n =
|
|
14
|
-
|
|
15
|
-
})(t,
|
|
16
|
-
},
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
for (const [
|
|
8
|
+
const S = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), k = /* @__PURE__ */ new WeakMap(), f = (t, o, r, i, b) => {
|
|
9
|
+
const d = b == null ? void 0 : b[o];
|
|
10
|
+
d === void 0 ? (t[o] = r, r == null && o in HTMLElement.prototype && t.removeAttribute(o)) : r !== i && ((u, l, a) => {
|
|
11
|
+
let s = k.get(u);
|
|
12
|
+
s === void 0 && k.set(u, s = /* @__PURE__ */ new Map());
|
|
13
|
+
let n = s.get(l);
|
|
14
|
+
a !== void 0 ? n === void 0 ? (s.set(l, n = { handleEvent: a }), u.addEventListener(l, n)) : n.handleEvent = a : n !== void 0 && (s.delete(l), u.removeEventListener(l, n));
|
|
15
|
+
})(t, d, r);
|
|
16
|
+
}, g = ({ react: t, tagName: o, elementClass: r, events: i, displayName: b }) => {
|
|
17
|
+
const d = new Set(Object.keys(i ?? {})), u = t.forwardRef(((l, a) => {
|
|
18
|
+
const s = t.useRef(/* @__PURE__ */ new Map()), n = t.useRef(null), C = {}, p = {};
|
|
19
|
+
for (const [e, c] of Object.entries(l)) S.has(e) ? C[e === "className" ? "class" : e] = c : d.has(e) || e in r.prototype ? p[e] = c : C[e] = c;
|
|
20
20
|
return t.useLayoutEffect((() => {
|
|
21
|
-
if (n.current
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
if (n.current === null) return;
|
|
22
|
+
const e = /* @__PURE__ */ new Map();
|
|
23
|
+
for (const c in p) f(n.current, c, l[c], s.current.get(c), i), s.current.delete(c), e.set(c, l[c]);
|
|
24
|
+
for (const [c, N] of s.current) f(n.current, c, void 0, N, i);
|
|
25
|
+
s.current = e;
|
|
25
26
|
})), t.useLayoutEffect((() => {
|
|
26
|
-
var
|
|
27
|
-
(
|
|
28
|
-
}), []),
|
|
29
|
-
n.current =
|
|
30
|
-
}), [
|
|
27
|
+
var e;
|
|
28
|
+
(e = n.current) == null || e.removeAttribute("defer-hydration");
|
|
29
|
+
}), []), C.suppressHydrationWarning = !0, t.createElement(o, { ...C, ref: t.useCallback(((e) => {
|
|
30
|
+
n.current = e, typeof a == "function" ? a(e) : a !== null && (a.current = e);
|
|
31
|
+
}), [a]) });
|
|
31
32
|
}));
|
|
32
|
-
return
|
|
33
|
+
return u.displayName = b ?? r.name, u;
|
|
33
34
|
};
|
|
34
35
|
/**
|
|
35
36
|
* @license
|
|
@@ -39,56 +40,56 @@ const N = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cla
|
|
|
39
40
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
40
41
|
* LICENSE file in the root directory of this source tree.
|
|
41
42
|
*/
|
|
42
|
-
const h = "clabs-hybrid-ipaas-header-ai-callback",
|
|
43
|
+
const h = "clabs-hybrid-ipaas-header-ai-callback", m = "clabs-hybrid-ipaas-header-notification-open-callback", v = "clabs-hybrid-ipaas-logout-callback", y = "clabs-hybrid-ipaas-search-callback", L = "clabs-hybrid-ipaas-search-submit-callback", O = g({
|
|
43
44
|
tagName: "clabs-global-header-hybrid-ipaas",
|
|
44
|
-
elementClass:
|
|
45
|
+
elementClass: A,
|
|
45
46
|
react: E,
|
|
46
47
|
events: {
|
|
47
48
|
onaiCallback: h,
|
|
48
|
-
onNotificationOpenCallback:
|
|
49
|
-
onLogoutCallback:
|
|
50
|
-
onSearchCallback:
|
|
51
|
-
onSearchSubmitCallback:
|
|
49
|
+
onNotificationOpenCallback: m,
|
|
50
|
+
onLogoutCallback: v,
|
|
51
|
+
onSearchCallback: y,
|
|
52
|
+
onSearchSubmitCallback: L
|
|
52
53
|
}
|
|
53
|
-
}),
|
|
54
|
+
}), T = (t) => {
|
|
54
55
|
const {
|
|
55
|
-
aiCallback:
|
|
56
|
-
notificationOpenCallback:
|
|
57
|
-
logoutCallback:
|
|
58
|
-
searchCallback:
|
|
59
|
-
searchSubmitCallback:
|
|
60
|
-
...
|
|
56
|
+
aiCallback: o,
|
|
57
|
+
notificationOpenCallback: r,
|
|
58
|
+
logoutCallback: i,
|
|
59
|
+
searchCallback: b,
|
|
60
|
+
searchSubmitCallback: d,
|
|
61
|
+
...u
|
|
61
62
|
} = t;
|
|
62
63
|
return /* @__PURE__ */ E.createElement(
|
|
63
64
|
O,
|
|
64
65
|
{
|
|
65
66
|
role: "banner",
|
|
66
|
-
onaiCallback:
|
|
67
|
-
|
|
67
|
+
onaiCallback: o && (() => {
|
|
68
|
+
o();
|
|
68
69
|
}),
|
|
69
|
-
aiCallbackEvent:
|
|
70
|
-
onNotificationOpenCallback:
|
|
71
|
-
|
|
70
|
+
aiCallbackEvent: o && h,
|
|
71
|
+
onNotificationOpenCallback: r && (() => {
|
|
72
|
+
r();
|
|
72
73
|
}),
|
|
73
|
-
notificationOpenCallbackEvent:
|
|
74
|
-
onLogoutCallback:
|
|
75
|
-
|
|
74
|
+
notificationOpenCallbackEvent: r && m,
|
|
75
|
+
onLogoutCallback: i && (() => {
|
|
76
|
+
i();
|
|
76
77
|
}),
|
|
77
|
-
logoutCallbackEvent:
|
|
78
|
-
onSearchCallback:
|
|
79
|
-
var
|
|
80
|
-
|
|
78
|
+
logoutCallbackEvent: i && v,
|
|
79
|
+
onSearchCallback: b && ((l) => {
|
|
80
|
+
var a;
|
|
81
|
+
b(((a = l.detail) == null ? void 0 : a.value) || "");
|
|
81
82
|
}),
|
|
82
|
-
searchCallbackEvent:
|
|
83
|
-
onSearchSubmitCallback:
|
|
84
|
-
var
|
|
85
|
-
|
|
83
|
+
searchCallbackEvent: b && y,
|
|
84
|
+
onSearchSubmitCallback: d && ((l) => {
|
|
85
|
+
var a;
|
|
86
|
+
d(((a = l.detail) == null ? void 0 : a.value) || "");
|
|
86
87
|
}),
|
|
87
|
-
searchSubmitCallbackEvent:
|
|
88
|
-
...
|
|
88
|
+
searchSubmitCallbackEvent: d && L,
|
|
89
|
+
...u
|
|
89
90
|
}
|
|
90
91
|
);
|
|
91
92
|
};
|
|
92
93
|
export {
|
|
93
|
-
|
|
94
|
+
T as HybridIpaasHeaderReactWrapper
|
|
94
95
|
};
|