@abgov/react-components 6.11.0-dev.12 → 6.11.0-dev.15
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/{parseISO-BHUUf1QW.mjs → calendar-date-Chmr7h4a.mjs} +202 -1
- package/calendar-date-Chmr7h4a.mjs.map +1 -0
- package/{parseISO-Dj57mwuH.js → calendar-date-IMhR_PA6.js} +202 -1
- package/calendar-date-IMhR_PA6.js.map +1 -0
- package/experimental/app-header/app-header.d.ts +33 -0
- package/experimental/app-header-menu/app-header-menu.d.ts +11 -0
- package/experimental/index.d.ts +5 -0
- package/experimental/push-drawer/push-drawer.d.ts +28 -0
- package/experimental/tabs/tabs.d.ts +4 -2
- package/experimental/work-side-menu/work-side-menu.d.ts +2 -1
- package/experimental/work-side-menu-group/work-side-menu-group.d.ts +2 -2
- package/experimental/work-side-menu-item/work-side-menu-item.d.ts +3 -2
- package/experimental/work-side-notification-item/work-side-notification-item.d.ts +31 -0
- package/experimental/work-side-notification-panel/work-side-notification-panel.d.ts +25 -0
- package/experimental.js +215 -35
- package/experimental.js.map +1 -1
- package/experimental.mjs +187 -7
- package/experimental.mjs.map +1 -1
- package/index.js +1590 -1590
- package/index.js.map +1 -1
- package/index.mjs +1583 -1583
- package/index.mjs.map +1 -1
- package/lib/app-header/app-header.d.ts +0 -17
- package/lib/push-drawer/push-drawer.d.ts +0 -14
- package/package.json +1 -1
- package/parseISO-BHUUf1QW.mjs.map +0 -1
- package/parseISO-Dj57mwuH.js.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { GoabWorkSideNotificationItemType, GoabWorkSideNotificationReadStatus, GoabWorkSideNotificationPriority } from '@abgov/ui-components-common';
|
|
3
|
+
interface WCProps {
|
|
4
|
+
type?: GoabWorkSideNotificationItemType;
|
|
5
|
+
timestamp?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
description: string;
|
|
8
|
+
"read-status"?: GoabWorkSideNotificationReadStatus;
|
|
9
|
+
priority?: GoabWorkSideNotificationPriority;
|
|
10
|
+
testid?: string;
|
|
11
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
12
|
+
}
|
|
13
|
+
declare module "react" {
|
|
14
|
+
namespace JSX {
|
|
15
|
+
interface IntrinsicElements {
|
|
16
|
+
"goa-work-side-notification-item": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export interface GoabWorkSideNotificationItemProps {
|
|
21
|
+
type?: GoabWorkSideNotificationItemType;
|
|
22
|
+
timestamp?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
description: string;
|
|
25
|
+
readStatus?: GoabWorkSideNotificationReadStatus;
|
|
26
|
+
priority?: GoabWorkSideNotificationPriority;
|
|
27
|
+
testId?: string;
|
|
28
|
+
onClick?: () => void;
|
|
29
|
+
}
|
|
30
|
+
export declare function GoabxWorkSideNotificationItem({ type, timestamp, title, description, readStatus, priority, testId, onClick, }: GoabWorkSideNotificationItemProps): JSX.Element;
|
|
31
|
+
export default GoabxWorkSideNotificationItem;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode, JSX } from 'react';
|
|
2
|
+
import { GoabWorkSideNotificationActiveTabType } from '@abgov/ui-components-common';
|
|
3
|
+
interface WCProps {
|
|
4
|
+
heading?: string;
|
|
5
|
+
"active-tab"?: GoabWorkSideNotificationActiveTabType;
|
|
6
|
+
testid?: string;
|
|
7
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
8
|
+
}
|
|
9
|
+
declare module "react" {
|
|
10
|
+
namespace JSX {
|
|
11
|
+
interface IntrinsicElements {
|
|
12
|
+
"goa-work-side-notification-panel": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export interface GoabWorkSideNotificationPanelProps {
|
|
17
|
+
heading?: string;
|
|
18
|
+
activeTab?: GoabWorkSideNotificationActiveTabType;
|
|
19
|
+
testId?: string;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
onMarkAllRead?: () => void;
|
|
22
|
+
onViewAll?: () => void;
|
|
23
|
+
}
|
|
24
|
+
export declare function GoabxWorkSideNotificationPanel({ heading, activeTab, testId, children, onMarkAllRead, onViewAll, }: GoabWorkSideNotificationPanelProps): JSX.Element;
|
|
25
|
+
export default GoabxWorkSideNotificationPanel;
|
package/experimental.js
CHANGED
|
@@ -1,8 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const parseISO = require("./parseISO-Dj57mwuH.js");
|
|
5
4
|
const react = require("react");
|
|
5
|
+
const calendarDate = require("./calendar-date-IMhR_PA6.js");
|
|
6
|
+
function GoabxAppHeader({
|
|
7
|
+
onMenuClick,
|
|
8
|
+
children,
|
|
9
|
+
secondaryText,
|
|
10
|
+
...rest
|
|
11
|
+
}) {
|
|
12
|
+
const el = react.useRef(null);
|
|
13
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
14
|
+
react.useEffect(() => {
|
|
15
|
+
if (!el.current) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (!onMenuClick) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const current = el.current;
|
|
22
|
+
const listener = () => {
|
|
23
|
+
onMenuClick == null ? void 0 : onMenuClick();
|
|
24
|
+
};
|
|
25
|
+
current.addEventListener("_menuClick", listener);
|
|
26
|
+
return () => {
|
|
27
|
+
current.removeEventListener("_menuClick", listener);
|
|
28
|
+
};
|
|
29
|
+
}, [el, onMenuClick]);
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
+
"goa-app-header",
|
|
32
|
+
{
|
|
33
|
+
ref: el,
|
|
34
|
+
hasmenuclickhandler: onMenuClick ? "true" : "false",
|
|
35
|
+
secondarytext: secondaryText,
|
|
36
|
+
..._props,
|
|
37
|
+
version: "2",
|
|
38
|
+
children
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
function GoabxAppHeaderMenu({
|
|
43
|
+
children,
|
|
44
|
+
slotName,
|
|
45
|
+
...rest
|
|
46
|
+
}) {
|
|
47
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-header-menu", { slot: slotName, ..._props, children });
|
|
49
|
+
}
|
|
6
50
|
function getIconValue(icon, iconType) {
|
|
7
51
|
if (icon !== void 0) {
|
|
8
52
|
return icon ? "true" : "false";
|
|
@@ -17,7 +61,7 @@ function GoabxBadge({
|
|
|
17
61
|
version = "2",
|
|
18
62
|
...rest
|
|
19
63
|
}) {
|
|
20
|
-
const _props =
|
|
64
|
+
const _props = calendarDate.transformProps({ size, emphasis, ...rest }, calendarDate.lowercase);
|
|
21
65
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
66
|
"goa-badge",
|
|
23
67
|
{
|
|
@@ -40,7 +84,7 @@ function GoabxButton({
|
|
|
40
84
|
...rest
|
|
41
85
|
}) {
|
|
42
86
|
const el = react.useRef(null);
|
|
43
|
-
const _props =
|
|
87
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
44
88
|
react.useEffect(() => {
|
|
45
89
|
if (!el.current) {
|
|
46
90
|
return;
|
|
@@ -79,7 +123,7 @@ function GoabxCalendar({
|
|
|
79
123
|
...rest
|
|
80
124
|
}) {
|
|
81
125
|
const ref = react.useRef(null);
|
|
82
|
-
const _props =
|
|
126
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
83
127
|
react.useEffect(() => {
|
|
84
128
|
if (!ref.current) {
|
|
85
129
|
return;
|
|
@@ -118,9 +162,9 @@ const GoabxCallout = ({
|
|
|
118
162
|
version = "2",
|
|
119
163
|
...rest
|
|
120
164
|
}) => {
|
|
121
|
-
const _props =
|
|
165
|
+
const _props = calendarDate.transformProps(
|
|
122
166
|
{ type, icontheme: iconTheme, size, arialive: ariaLive, emphasis, ...rest },
|
|
123
|
-
|
|
167
|
+
calendarDate.lowercase
|
|
124
168
|
);
|
|
125
169
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-callout", { ..._props, version, children });
|
|
126
170
|
};
|
|
@@ -140,7 +184,7 @@ function GoabxCheckbox({
|
|
|
140
184
|
...rest
|
|
141
185
|
}) {
|
|
142
186
|
const el = react.useRef(null);
|
|
143
|
-
const _props =
|
|
187
|
+
const _props = calendarDate.transformProps({ size, ...rest }, calendarDate.lowercase);
|
|
144
188
|
react.useEffect(() => {
|
|
145
189
|
if (!el.current) {
|
|
146
190
|
return;
|
|
@@ -236,7 +280,7 @@ function GoabxDatePicker({
|
|
|
236
280
|
...rest
|
|
237
281
|
}) {
|
|
238
282
|
const ref = react.useRef(null);
|
|
239
|
-
const _props =
|
|
283
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
240
284
|
react.useEffect(() => {
|
|
241
285
|
if (value && typeof value !== "string") {
|
|
242
286
|
console.warn(
|
|
@@ -265,7 +309,7 @@ function GoabxDatePicker({
|
|
|
265
309
|
const formatValue = (val) => {
|
|
266
310
|
if (!val) return "";
|
|
267
311
|
if (val instanceof Date) {
|
|
268
|
-
return val.
|
|
312
|
+
return new calendarDate.CalendarDate(val).toString();
|
|
269
313
|
}
|
|
270
314
|
return val;
|
|
271
315
|
};
|
|
@@ -325,6 +369,45 @@ function GoabxDrawer({
|
|
|
325
369
|
}
|
|
326
370
|
);
|
|
327
371
|
}
|
|
372
|
+
function GoabxPushDrawer({
|
|
373
|
+
open,
|
|
374
|
+
heading,
|
|
375
|
+
width,
|
|
376
|
+
testId,
|
|
377
|
+
actions,
|
|
378
|
+
children,
|
|
379
|
+
onClose,
|
|
380
|
+
version = "2"
|
|
381
|
+
}) {
|
|
382
|
+
const el = react.useRef(null);
|
|
383
|
+
react.useEffect(() => {
|
|
384
|
+
var _a;
|
|
385
|
+
if (!(el == null ? void 0 : el.current) || !onClose) {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
(_a = el.current) == null ? void 0 : _a.addEventListener("_close", onClose);
|
|
389
|
+
return () => {
|
|
390
|
+
var _a2;
|
|
391
|
+
(_a2 = el.current) == null ? void 0 : _a2.removeEventListener("_close", onClose);
|
|
392
|
+
};
|
|
393
|
+
}, [el, onClose]);
|
|
394
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
395
|
+
"goa-push-drawer",
|
|
396
|
+
{
|
|
397
|
+
ref: el,
|
|
398
|
+
open: open ? true : void 0,
|
|
399
|
+
heading: typeof heading === "string" ? heading : void 0,
|
|
400
|
+
width,
|
|
401
|
+
testid: testId,
|
|
402
|
+
version,
|
|
403
|
+
children: [
|
|
404
|
+
heading && typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
405
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children: actions }),
|
|
406
|
+
children
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
);
|
|
410
|
+
}
|
|
328
411
|
function stringify(value) {
|
|
329
412
|
if (typeof value === "undefined") {
|
|
330
413
|
return "";
|
|
@@ -349,7 +432,7 @@ function GoabxDropdown({
|
|
|
349
432
|
...rest
|
|
350
433
|
}) {
|
|
351
434
|
const el = react.useRef(null);
|
|
352
|
-
const _props =
|
|
435
|
+
const _props = calendarDate.transformProps({ size, ...rest }, calendarDate.lowercase);
|
|
353
436
|
react.useEffect(() => {
|
|
354
437
|
if (!el.current) {
|
|
355
438
|
return;
|
|
@@ -417,7 +500,7 @@ function GoabxFileUploadCard({
|
|
|
417
500
|
...rest
|
|
418
501
|
}) {
|
|
419
502
|
const el = react.useRef(null);
|
|
420
|
-
const _props =
|
|
503
|
+
const _props = calendarDate.transformProps({ filename, ...rest }, calendarDate.lowercase);
|
|
421
504
|
react.useEffect(() => {
|
|
422
505
|
if (!el.current) return;
|
|
423
506
|
const current = el.current;
|
|
@@ -438,7 +521,7 @@ function GoabxFileUploadInput({
|
|
|
438
521
|
...rest
|
|
439
522
|
}) {
|
|
440
523
|
const el = react.useRef(null);
|
|
441
|
-
const _props =
|
|
524
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
442
525
|
react.useEffect(() => {
|
|
443
526
|
if (!el.current) return;
|
|
444
527
|
const current = el.current;
|
|
@@ -461,9 +544,9 @@ const GoabxFilterChip = ({
|
|
|
461
544
|
...rest
|
|
462
545
|
}) => {
|
|
463
546
|
const el = react.useRef(null);
|
|
464
|
-
const _props =
|
|
547
|
+
const _props = calendarDate.transformProps(
|
|
465
548
|
{ icontheme: iconTheme, ...rest },
|
|
466
|
-
|
|
549
|
+
calendarDate.lowercase
|
|
467
550
|
);
|
|
468
551
|
react.useEffect(() => {
|
|
469
552
|
if (!el.current) return;
|
|
@@ -493,7 +576,7 @@ function GoabxFormItem({
|
|
|
493
576
|
version = "2",
|
|
494
577
|
...rest
|
|
495
578
|
}) {
|
|
496
|
-
const _props =
|
|
579
|
+
const _props = calendarDate.transformProps({ type, ...rest }, calendarDate.lowercase);
|
|
497
580
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
498
581
|
"goa-form-item",
|
|
499
582
|
{
|
|
@@ -511,21 +594,21 @@ function GoabxFormItem({
|
|
|
511
594
|
);
|
|
512
595
|
}
|
|
513
596
|
function GoabxAppFooter({ children, ...rest }) {
|
|
514
|
-
const _props =
|
|
597
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
515
598
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { ..._props, version: "2", children });
|
|
516
599
|
}
|
|
517
600
|
function GoabxAppFooterMetaSection({
|
|
518
601
|
children,
|
|
519
602
|
...rest
|
|
520
603
|
}) {
|
|
521
|
-
const _props =
|
|
604
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
522
605
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer-meta-section", { slot: "meta", ..._props, children });
|
|
523
606
|
}
|
|
524
607
|
function GoabxAppFooterNavSection({
|
|
525
608
|
children,
|
|
526
609
|
...rest
|
|
527
610
|
}) {
|
|
528
|
-
const _props =
|
|
611
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
529
612
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer-nav-section", { slot: "nav", ..._props, children });
|
|
530
613
|
}
|
|
531
614
|
function GoabxInput({
|
|
@@ -547,9 +630,9 @@ function GoabxInput({
|
|
|
547
630
|
...rest
|
|
548
631
|
}) {
|
|
549
632
|
const ref = react.useRef(null);
|
|
550
|
-
const _props =
|
|
633
|
+
const _props = calendarDate.transformProps(
|
|
551
634
|
{ variant, textalign: textAlign, size, ...rest },
|
|
552
|
-
|
|
635
|
+
calendarDate.lowercase
|
|
553
636
|
);
|
|
554
637
|
react.useEffect(() => {
|
|
555
638
|
if (!ref.current) {
|
|
@@ -612,11 +695,11 @@ const onDateChangeHandler = (onChange) => {
|
|
|
612
695
|
onChange == null ? void 0 : onChange({ name, value: "", event });
|
|
613
696
|
return;
|
|
614
697
|
}
|
|
615
|
-
if (typeof value === "string" &&
|
|
616
|
-
onChange == null ? void 0 : onChange({ name, value:
|
|
698
|
+
if (typeof value === "string" && calendarDate.isValid(new Date(value))) {
|
|
699
|
+
onChange == null ? void 0 : onChange({ name, value: calendarDate.parseISO(value), event });
|
|
617
700
|
return;
|
|
618
701
|
}
|
|
619
|
-
if (
|
|
702
|
+
if (calendarDate.isValid(value)) {
|
|
620
703
|
onChange == null ? void 0 : onChange({ name, value, event });
|
|
621
704
|
return;
|
|
622
705
|
}
|
|
@@ -636,12 +719,12 @@ function toString(value, tmpl = "yyyy-MM-dd") {
|
|
|
636
719
|
return "";
|
|
637
720
|
}
|
|
638
721
|
if (typeof value === "string") {
|
|
639
|
-
return
|
|
722
|
+
return calendarDate.format(calendarDate.parseISO(value), tmpl);
|
|
640
723
|
}
|
|
641
724
|
if (value.toISOString() === (/* @__PURE__ */ new Date(0)).toISOString()) {
|
|
642
725
|
return "";
|
|
643
726
|
}
|
|
644
|
-
return
|
|
727
|
+
return calendarDate.format(value, tmpl);
|
|
645
728
|
}
|
|
646
729
|
function GoabxInputText(props) {
|
|
647
730
|
return /* @__PURE__ */ jsxRuntime.jsx(GoabxInput, { ...props, type: "text" });
|
|
@@ -783,7 +866,7 @@ function GoabxLink({
|
|
|
783
866
|
children,
|
|
784
867
|
...rest
|
|
785
868
|
}) {
|
|
786
|
-
const _props =
|
|
869
|
+
const _props = calendarDate.transformProps({ color, size, ...rest }, calendarDate.lowercase);
|
|
787
870
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
788
871
|
"goa-link",
|
|
789
872
|
{
|
|
@@ -795,7 +878,7 @@ function GoabxLink({
|
|
|
795
878
|
);
|
|
796
879
|
}
|
|
797
880
|
function GoabxMenuAction(props) {
|
|
798
|
-
const _props =
|
|
881
|
+
const _props = calendarDate.transformProps(props, calendarDate.lowercase);
|
|
799
882
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-menu-action", { ..._props });
|
|
800
883
|
}
|
|
801
884
|
function GoabxMenuButton({
|
|
@@ -806,9 +889,9 @@ function GoabxMenuButton({
|
|
|
806
889
|
...rest
|
|
807
890
|
}) {
|
|
808
891
|
const el = react.useRef(null);
|
|
809
|
-
const _props =
|
|
892
|
+
const _props = calendarDate.transformProps(
|
|
810
893
|
{ type, testid: testId, ...rest },
|
|
811
|
-
|
|
894
|
+
calendarDate.kebab
|
|
812
895
|
);
|
|
813
896
|
react.useEffect(() => {
|
|
814
897
|
if (!el.current) {
|
|
@@ -1013,7 +1096,7 @@ function GoabxRadioGroup({
|
|
|
1013
1096
|
...rest
|
|
1014
1097
|
}) {
|
|
1015
1098
|
const el = react.useRef(null);
|
|
1016
|
-
const _props =
|
|
1099
|
+
const _props = calendarDate.transformProps({ size, ...rest }, calendarDate.lowercase);
|
|
1017
1100
|
react.useEffect(() => {
|
|
1018
1101
|
if (!el.current) return;
|
|
1019
1102
|
const listener = (e) => {
|
|
@@ -1157,7 +1240,8 @@ function GoabxTabs({
|
|
|
1157
1240
|
testId,
|
|
1158
1241
|
onChange,
|
|
1159
1242
|
variant,
|
|
1160
|
-
orientation
|
|
1243
|
+
orientation,
|
|
1244
|
+
navigation
|
|
1161
1245
|
}) {
|
|
1162
1246
|
const ref = react.useRef(null);
|
|
1163
1247
|
react.useEffect(() => {
|
|
@@ -1182,6 +1266,7 @@ function GoabxTabs({
|
|
|
1182
1266
|
variant,
|
|
1183
1267
|
version: "2",
|
|
1184
1268
|
orientation,
|
|
1269
|
+
navigation,
|
|
1185
1270
|
children
|
|
1186
1271
|
}
|
|
1187
1272
|
);
|
|
@@ -1197,7 +1282,7 @@ function GoabxTextArea({
|
|
|
1197
1282
|
...rest
|
|
1198
1283
|
}) {
|
|
1199
1284
|
const el = react.useRef(null);
|
|
1200
|
-
const _props =
|
|
1285
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1201
1286
|
react.useEffect(() => {
|
|
1202
1287
|
if (!el.current) {
|
|
1203
1288
|
return;
|
|
@@ -1246,7 +1331,8 @@ function GoabxWorkSideMenu({
|
|
|
1246
1331
|
secondaryContent,
|
|
1247
1332
|
accountContent,
|
|
1248
1333
|
open,
|
|
1249
|
-
onToggle
|
|
1334
|
+
onToggle,
|
|
1335
|
+
onNavigate
|
|
1250
1336
|
}) {
|
|
1251
1337
|
const el = react.useRef(null);
|
|
1252
1338
|
react.useEffect(() => {
|
|
@@ -1260,6 +1346,20 @@ function GoabxWorkSideMenu({
|
|
|
1260
1346
|
(_a2 = el.current) == null ? void 0 : _a2.removeEventListener("_toggle", onToggle);
|
|
1261
1347
|
};
|
|
1262
1348
|
}, [el, onToggle]);
|
|
1349
|
+
react.useEffect(() => {
|
|
1350
|
+
var _a;
|
|
1351
|
+
if (!(el == null ? void 0 : el.current) || !onNavigate) {
|
|
1352
|
+
return;
|
|
1353
|
+
}
|
|
1354
|
+
const handler = (e) => {
|
|
1355
|
+
onNavigate(e.detail.url);
|
|
1356
|
+
};
|
|
1357
|
+
(_a = el.current) == null ? void 0 : _a.addEventListener("_navigate", handler);
|
|
1358
|
+
return () => {
|
|
1359
|
+
var _a2;
|
|
1360
|
+
(_a2 = el.current) == null ? void 0 : _a2.removeEventListener("_navigate", handler);
|
|
1361
|
+
};
|
|
1362
|
+
}, [el, onNavigate]);
|
|
1263
1363
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1264
1364
|
"goa-work-side-menu",
|
|
1265
1365
|
{
|
|
@@ -1279,7 +1379,7 @@ function GoabxWorkSideMenu({
|
|
|
1279
1379
|
);
|
|
1280
1380
|
}
|
|
1281
1381
|
function GoabxWorkSideMenuItem(props) {
|
|
1282
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1382
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1283
1383
|
"goa-work-side-menu-item",
|
|
1284
1384
|
{
|
|
1285
1385
|
label: props.label,
|
|
@@ -1290,7 +1390,10 @@ function GoabxWorkSideMenuItem(props) {
|
|
|
1290
1390
|
icon: props.icon,
|
|
1291
1391
|
testid: props.testId,
|
|
1292
1392
|
type: props.type,
|
|
1293
|
-
children:
|
|
1393
|
+
children: [
|
|
1394
|
+
props.popoverContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "popoverContent", children: props.popoverContent }),
|
|
1395
|
+
props.children
|
|
1396
|
+
]
|
|
1294
1397
|
}
|
|
1295
1398
|
);
|
|
1296
1399
|
}
|
|
@@ -1306,9 +1409,83 @@ function GoabxWorkSideMenuGroup(props) {
|
|
|
1306
1409
|
}
|
|
1307
1410
|
);
|
|
1308
1411
|
}
|
|
1412
|
+
function GoabxWorkSideNotificationPanel({
|
|
1413
|
+
heading,
|
|
1414
|
+
activeTab,
|
|
1415
|
+
testId,
|
|
1416
|
+
children,
|
|
1417
|
+
onMarkAllRead,
|
|
1418
|
+
onViewAll
|
|
1419
|
+
}) {
|
|
1420
|
+
const el = react.useRef(null);
|
|
1421
|
+
react.useEffect(() => {
|
|
1422
|
+
if (!el.current) return;
|
|
1423
|
+
const handleMarkAllRead = () => {
|
|
1424
|
+
onMarkAllRead == null ? void 0 : onMarkAllRead();
|
|
1425
|
+
};
|
|
1426
|
+
const handleViewAll = () => {
|
|
1427
|
+
onViewAll == null ? void 0 : onViewAll();
|
|
1428
|
+
};
|
|
1429
|
+
el.current.addEventListener("_markAllRead", handleMarkAllRead);
|
|
1430
|
+
el.current.addEventListener("_viewAll", handleViewAll);
|
|
1431
|
+
return () => {
|
|
1432
|
+
var _a, _b;
|
|
1433
|
+
(_a = el.current) == null ? void 0 : _a.removeEventListener("_markAllRead", handleMarkAllRead);
|
|
1434
|
+
(_b = el.current) == null ? void 0 : _b.removeEventListener("_viewAll", handleViewAll);
|
|
1435
|
+
};
|
|
1436
|
+
}, [el, onMarkAllRead, onViewAll]);
|
|
1437
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1438
|
+
"goa-work-side-notification-panel",
|
|
1439
|
+
{
|
|
1440
|
+
ref: el,
|
|
1441
|
+
heading,
|
|
1442
|
+
"active-tab": activeTab,
|
|
1443
|
+
testid: testId,
|
|
1444
|
+
children
|
|
1445
|
+
}
|
|
1446
|
+
);
|
|
1447
|
+
}
|
|
1448
|
+
function GoabxWorkSideNotificationItem({
|
|
1449
|
+
type,
|
|
1450
|
+
timestamp,
|
|
1451
|
+
title,
|
|
1452
|
+
description,
|
|
1453
|
+
readStatus,
|
|
1454
|
+
priority,
|
|
1455
|
+
testId,
|
|
1456
|
+
onClick
|
|
1457
|
+
}) {
|
|
1458
|
+
const el = react.useRef(null);
|
|
1459
|
+
react.useEffect(() => {
|
|
1460
|
+
if (!el.current) return;
|
|
1461
|
+
const handleClick = () => {
|
|
1462
|
+
onClick == null ? void 0 : onClick();
|
|
1463
|
+
};
|
|
1464
|
+
el.current.addEventListener("_click", handleClick);
|
|
1465
|
+
return () => {
|
|
1466
|
+
var _a;
|
|
1467
|
+
(_a = el.current) == null ? void 0 : _a.removeEventListener("_click", handleClick);
|
|
1468
|
+
};
|
|
1469
|
+
}, [el, onClick]);
|
|
1470
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1471
|
+
"goa-work-side-notification-item",
|
|
1472
|
+
{
|
|
1473
|
+
ref: el,
|
|
1474
|
+
type,
|
|
1475
|
+
timestamp,
|
|
1476
|
+
title,
|
|
1477
|
+
description,
|
|
1478
|
+
"read-status": readStatus,
|
|
1479
|
+
priority,
|
|
1480
|
+
testid: testId
|
|
1481
|
+
}
|
|
1482
|
+
);
|
|
1483
|
+
}
|
|
1309
1484
|
exports.GoabxAppFooter = GoabxAppFooter;
|
|
1310
1485
|
exports.GoabxAppFooterMetaSection = GoabxAppFooterMetaSection;
|
|
1311
1486
|
exports.GoabxAppFooterNavSection = GoabxAppFooterNavSection;
|
|
1487
|
+
exports.GoabxAppHeader = GoabxAppHeader;
|
|
1488
|
+
exports.GoabxAppHeaderMenu = GoabxAppHeaderMenu;
|
|
1312
1489
|
exports.GoabxBadge = GoabxBadge;
|
|
1313
1490
|
exports.GoabxButton = GoabxButton;
|
|
1314
1491
|
exports.GoabxCalendar = GoabxCalendar;
|
|
@@ -1344,6 +1521,7 @@ exports.GoabxMenuButton = GoabxMenuButton;
|
|
|
1344
1521
|
exports.GoabxModal = GoabxModal;
|
|
1345
1522
|
exports.GoabxNotification = GoabxNotification;
|
|
1346
1523
|
exports.GoabxPagination = GoabxPagination;
|
|
1524
|
+
exports.GoabxPushDrawer = GoabxPushDrawer;
|
|
1347
1525
|
exports.GoabxRadioGroup = GoabxRadioGroup;
|
|
1348
1526
|
exports.GoabxRadioItem = GoabxRadioItem;
|
|
1349
1527
|
exports.GoabxSideMenu = GoabxSideMenu;
|
|
@@ -1357,4 +1535,6 @@ exports.GoabxTextArea = GoabxTextArea;
|
|
|
1357
1535
|
exports.GoabxWorkSideMenu = GoabxWorkSideMenu;
|
|
1358
1536
|
exports.GoabxWorkSideMenuGroup = GoabxWorkSideMenuGroup;
|
|
1359
1537
|
exports.GoabxWorkSideMenuItem = GoabxWorkSideMenuItem;
|
|
1538
|
+
exports.GoabxWorkSideNotificationItem = GoabxWorkSideNotificationItem;
|
|
1539
|
+
exports.GoabxWorkSideNotificationPanel = GoabxWorkSideNotificationPanel;
|
|
1360
1540
|
//# sourceMappingURL=experimental.js.map
|