@abgov/react-components 6.11.0-dev.13 → 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
package/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var _PublicFormController_instances, updateObjectListState_fn, dispatchError_fn;
|
|
|
12
12
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
13
13
|
const jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
const react = require("react");
|
|
15
|
-
const
|
|
15
|
+
const calendarDate = require("./calendar-date-IMhR_PA6.js");
|
|
16
16
|
function GoabAccordion({
|
|
17
17
|
open,
|
|
18
18
|
onChange,
|
|
@@ -21,7 +21,7 @@ function GoabAccordion({
|
|
|
21
21
|
...rest
|
|
22
22
|
}) {
|
|
23
23
|
const ref = react.useRef(null);
|
|
24
|
-
const _props =
|
|
24
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
25
25
|
react.useEffect(() => {
|
|
26
26
|
const element = ref.current;
|
|
27
27
|
if (element && onChange) {
|
|
@@ -54,7 +54,7 @@ function GoabAppHeader({
|
|
|
54
54
|
...rest
|
|
55
55
|
}) {
|
|
56
56
|
const el = react.useRef(null);
|
|
57
|
-
const _props =
|
|
57
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
58
58
|
react.useEffect(() => {
|
|
59
59
|
if (!el.current) {
|
|
60
60
|
return;
|
|
@@ -85,7 +85,7 @@ function GoabAppHeaderMenu({
|
|
|
85
85
|
children,
|
|
86
86
|
...rest
|
|
87
87
|
}) {
|
|
88
|
-
const _props =
|
|
88
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
89
89
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-header-menu", { ..._props, children });
|
|
90
90
|
}
|
|
91
91
|
function getIconValue(icon, iconType) {
|
|
@@ -95,7 +95,7 @@ function getIconValue(icon, iconType) {
|
|
|
95
95
|
return iconType ? "true" : "false";
|
|
96
96
|
}
|
|
97
97
|
function GoabBadge({ icon, iconType, ...rest }) {
|
|
98
|
-
const _props =
|
|
98
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
99
99
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
100
100
|
"goa-badge",
|
|
101
101
|
{
|
|
@@ -210,9 +210,9 @@ function GoabBlock({
|
|
|
210
210
|
children,
|
|
211
211
|
...rest
|
|
212
212
|
}) {
|
|
213
|
-
const _props =
|
|
213
|
+
const _props = calendarDate.transformProps(
|
|
214
214
|
{ testid: testId, ...rest },
|
|
215
|
-
|
|
215
|
+
calendarDate.kebab
|
|
216
216
|
);
|
|
217
217
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-block", { ..._props, children });
|
|
218
218
|
}
|
|
@@ -225,7 +225,7 @@ function GoabButton({
|
|
|
225
225
|
...rest
|
|
226
226
|
}) {
|
|
227
227
|
const el = react.useRef(null);
|
|
228
|
-
const _props =
|
|
228
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
229
229
|
react.useEffect(() => {
|
|
230
230
|
if (!el.current) {
|
|
231
231
|
return;
|
|
@@ -258,7 +258,7 @@ function GoabButtonGroup({
|
|
|
258
258
|
children,
|
|
259
259
|
...rest
|
|
260
260
|
}) {
|
|
261
|
-
const _props =
|
|
261
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
262
262
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-button-group", { ..._props, children });
|
|
263
263
|
}
|
|
264
264
|
function GoabCalendar({
|
|
@@ -269,7 +269,7 @@ function GoabCalendar({
|
|
|
269
269
|
...rest
|
|
270
270
|
}) {
|
|
271
271
|
const ref = react.useRef(null);
|
|
272
|
-
const _props =
|
|
272
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
273
273
|
react.useEffect(() => {
|
|
274
274
|
if (!ref.current) {
|
|
275
275
|
return;
|
|
@@ -305,9 +305,9 @@ const GoabCallout = ({
|
|
|
305
305
|
children,
|
|
306
306
|
...rest
|
|
307
307
|
}) => {
|
|
308
|
-
const _props =
|
|
308
|
+
const _props = calendarDate.transformProps(
|
|
309
309
|
{ type, icontheme: iconTheme, size, arialive: ariaLive, ...rest },
|
|
310
|
-
|
|
310
|
+
calendarDate.lowercase
|
|
311
311
|
);
|
|
312
312
|
return /* @__PURE__ */ jsxRuntime.jsx("goa-callout", { ..._props, children });
|
|
313
313
|
};
|
|
@@ -325,7 +325,7 @@ function GoabCheckbox({
|
|
|
325
325
|
...rest
|
|
326
326
|
}) {
|
|
327
327
|
const el = react.useRef(null);
|
|
328
|
-
const _props =
|
|
328
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
329
329
|
react.useEffect(() => {
|
|
330
330
|
if (!el.current) {
|
|
331
331
|
return;
|
|
@@ -424,7 +424,7 @@ const GoabChip = ({
|
|
|
424
424
|
...rest
|
|
425
425
|
}) => {
|
|
426
426
|
const el = react.useRef(null);
|
|
427
|
-
const _props =
|
|
427
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
428
428
|
react.useEffect(() => {
|
|
429
429
|
if (!el.current) return;
|
|
430
430
|
if (!onClick) return;
|
|
@@ -474,7 +474,7 @@ function GoabContainer({
|
|
|
474
474
|
children,
|
|
475
475
|
...rest
|
|
476
476
|
}) {
|
|
477
|
-
const _props =
|
|
477
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
478
478
|
const headingContent = heading || title;
|
|
479
479
|
return /* @__PURE__ */ jsxRuntime.jsxs("goa-container", { ..._props, children: [
|
|
480
480
|
headingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "title", children: headingContent }),
|
|
@@ -498,1088 +498,966 @@ function GoabDataGrid({
|
|
|
498
498
|
}
|
|
499
499
|
);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
513
|
-
react.useEffect(() => {
|
|
514
|
-
if (value && typeof value !== "string") {
|
|
515
|
-
console.warn("Using a `Date` type for value is deprecated. Instead use a string of the format `yyyy-mm-dd`");
|
|
516
|
-
}
|
|
517
|
-
}, []);
|
|
518
|
-
react.useEffect(() => {
|
|
519
|
-
if (!ref.current) {
|
|
520
|
-
return;
|
|
521
|
-
}
|
|
522
|
-
const current = ref.current;
|
|
523
|
-
const handleChange = (e) => {
|
|
524
|
-
const detail = e.detail;
|
|
525
|
-
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
526
|
-
};
|
|
527
|
-
if (onChange) {
|
|
528
|
-
current.addEventListener("_change", handleChange);
|
|
529
|
-
}
|
|
530
|
-
return () => {
|
|
531
|
-
if (onChange) {
|
|
532
|
-
current.removeEventListener("_change", handleChange);
|
|
533
|
-
}
|
|
534
|
-
};
|
|
535
|
-
}, [onChange]);
|
|
536
|
-
const formatValue = (val) => {
|
|
537
|
-
if (!val) return "";
|
|
538
|
-
if (val instanceof Date) {
|
|
539
|
-
return val.toISOString();
|
|
540
|
-
}
|
|
541
|
-
return val;
|
|
542
|
-
};
|
|
543
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
544
|
-
"goa-date-picker",
|
|
545
|
-
{
|
|
546
|
-
ref,
|
|
547
|
-
value: formatValue(value) || void 0,
|
|
548
|
-
error: error ? "true" : void 0,
|
|
549
|
-
disabled: disabled ? "true" : void 0,
|
|
550
|
-
min: formatValue(min) || void 0,
|
|
551
|
-
max: formatValue(max) || void 0,
|
|
552
|
-
relative: relative ? "true" : void 0,
|
|
553
|
-
..._props
|
|
554
|
-
}
|
|
555
|
-
);
|
|
556
|
-
}
|
|
557
|
-
function GoabDetails({
|
|
558
|
-
open,
|
|
559
|
-
children,
|
|
560
|
-
...rest
|
|
561
|
-
}) {
|
|
562
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
563
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
564
|
-
"goa-details",
|
|
565
|
-
{
|
|
566
|
-
open: open ? "true" : void 0,
|
|
567
|
-
..._props,
|
|
568
|
-
children
|
|
569
|
-
}
|
|
501
|
+
function dispatch(el, eventName, detail, opts) {
|
|
502
|
+
if (!el) {
|
|
503
|
+
console.error("dispatch element is null");
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
el.dispatchEvent(
|
|
507
|
+
new CustomEvent(eventName, {
|
|
508
|
+
composed: true,
|
|
509
|
+
bubbles: opts == null ? void 0 : opts.bubbles,
|
|
510
|
+
detail
|
|
511
|
+
})
|
|
570
512
|
);
|
|
571
513
|
}
|
|
572
|
-
function
|
|
573
|
-
|
|
574
|
-
"
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
514
|
+
function relay(el, eventName, data, opts) {
|
|
515
|
+
if (!el) {
|
|
516
|
+
console.error("dispatch element is null");
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
el.dispatchEvent(
|
|
520
|
+
new CustomEvent("msg", {
|
|
521
|
+
composed: true,
|
|
522
|
+
bubbles: opts == null ? void 0 : opts.bubbles,
|
|
523
|
+
detail: {
|
|
524
|
+
action: eventName,
|
|
525
|
+
data
|
|
526
|
+
}
|
|
527
|
+
})
|
|
582
528
|
);
|
|
583
529
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
if (!(el == null ? void 0 : el.current) || !onClose) {
|
|
530
|
+
class PublicFormController {
|
|
531
|
+
constructor(type) {
|
|
532
|
+
__privateAdd(this, _PublicFormController_instances);
|
|
533
|
+
__publicField(this, "state");
|
|
534
|
+
__publicField(this, "_formData");
|
|
535
|
+
__publicField(this, "_formRef");
|
|
536
|
+
__publicField(this, "_isCompleting", false);
|
|
537
|
+
this.type = type;
|
|
538
|
+
}
|
|
539
|
+
// Obtain reference to the form element
|
|
540
|
+
init(e) {
|
|
541
|
+
if (this._formRef) {
|
|
542
|
+
console.warn("init: form element has already been set");
|
|
598
543
|
return;
|
|
599
544
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
545
|
+
this._formRef = e.detail.el;
|
|
546
|
+
this.state = {
|
|
547
|
+
uuid: crypto.randomUUID(),
|
|
548
|
+
form: {},
|
|
549
|
+
history: [],
|
|
550
|
+
editting: "",
|
|
551
|
+
status: "not-started"
|
|
604
552
|
};
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
553
|
+
}
|
|
554
|
+
initList(e) {
|
|
555
|
+
this._formRef = e.detail.el;
|
|
556
|
+
this.state = [];
|
|
557
|
+
}
|
|
558
|
+
// Public method to allow for the initialization of the state
|
|
559
|
+
initState(state, callback) {
|
|
560
|
+
relay(this._formRef, "external::init:state", state);
|
|
561
|
+
if (typeof state === "string") {
|
|
562
|
+
this.state = JSON.parse(state);
|
|
563
|
+
} else if (!Array.isArray(state)) {
|
|
564
|
+
this.state = state;
|
|
565
|
+
}
|
|
566
|
+
if (callback) {
|
|
567
|
+
setTimeout(callback, 200);
|
|
620
568
|
}
|
|
621
|
-
);
|
|
622
|
-
}
|
|
623
|
-
function stringify(value) {
|
|
624
|
-
if (typeof value === "undefined") {
|
|
625
|
-
return "";
|
|
626
569
|
}
|
|
627
|
-
|
|
628
|
-
|
|
570
|
+
updateListState(e) {
|
|
571
|
+
const detail = e.detail;
|
|
572
|
+
if (!Array.isArray(detail.data)) {
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
this.state = detail.data;
|
|
629
576
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
value,
|
|
634
|
-
onChange,
|
|
635
|
-
disabled,
|
|
636
|
-
error,
|
|
637
|
-
filterable,
|
|
638
|
-
multiselect,
|
|
639
|
-
native,
|
|
640
|
-
relative,
|
|
641
|
-
children,
|
|
642
|
-
...rest
|
|
643
|
-
}) {
|
|
644
|
-
const el = react.useRef(null);
|
|
645
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
646
|
-
react.useEffect(() => {
|
|
647
|
-
if (!el.current) {
|
|
577
|
+
updateObjectState(e) {
|
|
578
|
+
var _a, _b;
|
|
579
|
+
if (Array.isArray(this.state)) {
|
|
648
580
|
return;
|
|
649
581
|
}
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
582
|
+
const detail = e.detail;
|
|
583
|
+
if (detail.type === "list") {
|
|
584
|
+
this.state = {
|
|
585
|
+
...this.state,
|
|
586
|
+
form: { ...((_a = this.state) == null ? void 0 : _a.form) || {}, [detail.id]: detail.data }
|
|
587
|
+
};
|
|
588
|
+
} else {
|
|
589
|
+
this.state = {
|
|
590
|
+
...this.state,
|
|
591
|
+
...detail.data,
|
|
592
|
+
form: { ...((_b = this.state) == null ? void 0 : _b.form) || {}, ...detail.data.form },
|
|
593
|
+
history: detail.data.history
|
|
594
|
+
};
|
|
657
595
|
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
};
|
|
663
|
-
}, [el, onChange]);
|
|
664
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
665
|
-
"goa-dropdown",
|
|
666
|
-
{
|
|
667
|
-
ref: el,
|
|
668
|
-
value: stringify(value),
|
|
669
|
-
disabled: disabled ? "true" : void 0,
|
|
670
|
-
error: error ? "true" : void 0,
|
|
671
|
-
filterable: filterable ? "true" : void 0,
|
|
672
|
-
multiselect: multiselect ? "true" : void 0,
|
|
673
|
-
native: native ? "true" : void 0,
|
|
674
|
-
relative: relative ? "true" : void 0,
|
|
675
|
-
..._props,
|
|
676
|
-
children
|
|
596
|
+
}
|
|
597
|
+
getStateList() {
|
|
598
|
+
if (!this.state) {
|
|
599
|
+
return [];
|
|
677
600
|
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabDropdownItem, { ...props });
|
|
685
|
-
}
|
|
686
|
-
function GoabDropdownItem({
|
|
687
|
-
value,
|
|
688
|
-
label,
|
|
689
|
-
filter,
|
|
690
|
-
name,
|
|
691
|
-
mountType = "append"
|
|
692
|
-
}) {
|
|
693
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
694
|
-
"goa-dropdown-item",
|
|
695
|
-
{
|
|
696
|
-
value,
|
|
697
|
-
label,
|
|
698
|
-
filter,
|
|
699
|
-
name,
|
|
700
|
-
mount: mountType
|
|
601
|
+
if (!Array.isArray(this.state)) {
|
|
602
|
+
console.warn(
|
|
603
|
+
"Utils:getStateList: unable to update the state of a non-multi form type",
|
|
604
|
+
this.state
|
|
605
|
+
);
|
|
606
|
+
return [];
|
|
701
607
|
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
function GoabFileUploadCard({
|
|
705
|
-
onDelete,
|
|
706
|
-
onCancel,
|
|
707
|
-
filename,
|
|
708
|
-
...rest
|
|
709
|
-
}) {
|
|
710
|
-
const el = react.useRef(null);
|
|
711
|
-
const _props = parseISO.transformProps({ filename, ...rest }, parseISO.lowercase);
|
|
712
|
-
react.useEffect(() => {
|
|
713
|
-
if (!el.current) return;
|
|
714
|
-
const current = el.current;
|
|
715
|
-
const deleteHandler = (event) => onDelete == null ? void 0 : onDelete({ filename, event });
|
|
716
|
-
const cancelHandler = (event) => onCancel == null ? void 0 : onCancel({ filename, event });
|
|
717
|
-
current.addEventListener("_delete", deleteHandler);
|
|
718
|
-
current.addEventListener("_cancel", cancelHandler);
|
|
719
|
-
return () => {
|
|
720
|
-
current.removeEventListener("_delete", deleteHandler);
|
|
721
|
-
current.removeEventListener("_cancel", cancelHandler);
|
|
722
|
-
};
|
|
723
|
-
}, [el, onDelete, onCancel, filename]);
|
|
724
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-file-upload-card", { ref: el, ..._props });
|
|
725
|
-
}
|
|
726
|
-
function GoabFileUploadInput({
|
|
727
|
-
onSelectFile,
|
|
728
|
-
...rest
|
|
729
|
-
}) {
|
|
730
|
-
const el = react.useRef(null);
|
|
731
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
732
|
-
react.useEffect(() => {
|
|
733
|
-
if (!el.current) return;
|
|
734
|
-
const current = el.current;
|
|
735
|
-
const handler = (e) => {
|
|
736
|
-
const detail = e.detail;
|
|
737
|
-
onSelectFile({ ...detail, event: e });
|
|
738
|
-
};
|
|
739
|
-
current.addEventListener("_selectFile", handler);
|
|
740
|
-
return () => {
|
|
741
|
-
current.removeEventListener("_selectFile", handler);
|
|
742
|
-
};
|
|
743
|
-
}, [el, onSelectFile]);
|
|
744
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-file-upload-input", { ref: el, ..._props });
|
|
745
|
-
}
|
|
746
|
-
function GoabAppFooter({
|
|
747
|
-
children,
|
|
748
|
-
...rest
|
|
749
|
-
}) {
|
|
750
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
751
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { ..._props, children });
|
|
752
|
-
}
|
|
753
|
-
function GoabAppFooterMetaSection({
|
|
754
|
-
children,
|
|
755
|
-
...rest
|
|
756
|
-
}) {
|
|
757
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
758
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer-meta-section", { slot: "meta", ..._props, children });
|
|
759
|
-
}
|
|
760
|
-
function GoabAppFooterNavSection({
|
|
761
|
-
children,
|
|
762
|
-
...rest
|
|
763
|
-
}) {
|
|
764
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
765
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer-nav-section", { slot: "nav", ..._props, children });
|
|
766
|
-
}
|
|
767
|
-
function GoabFieldset({
|
|
768
|
-
onContinue,
|
|
769
|
-
children,
|
|
770
|
-
...rest
|
|
771
|
-
}) {
|
|
772
|
-
const ref = react.useRef(null);
|
|
773
|
-
const _props = parseISO.transformProps(rest, parseISO.kebab);
|
|
774
|
-
react.useEffect(() => {
|
|
775
|
-
if (!ref.current) return;
|
|
776
|
-
const current = ref.current;
|
|
777
|
-
const continueListener = (e) => {
|
|
778
|
-
const event = e.detail;
|
|
779
|
-
return onContinue == null ? void 0 : onContinue(event);
|
|
780
|
-
};
|
|
781
|
-
if (onContinue) {
|
|
782
|
-
current.addEventListener("_continue", continueListener);
|
|
608
|
+
if (this.state.length === 0) {
|
|
609
|
+
return [];
|
|
783
610
|
}
|
|
784
|
-
return () => {
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
611
|
+
return this.state.map((s) => {
|
|
612
|
+
return Object.values(s.form).filter((item) => {
|
|
613
|
+
var _a;
|
|
614
|
+
return ((_a = item == null ? void 0 : item.data) == null ? void 0 : _a.type) === "details";
|
|
615
|
+
}).map((item) => {
|
|
616
|
+
var _a;
|
|
617
|
+
return item.data.type === "details" && ((_a = item.data) == null ? void 0 : _a.fieldsets) || {};
|
|
618
|
+
}).reduce(
|
|
619
|
+
(acc, item) => {
|
|
620
|
+
for (const [key, value] of Object.entries(item)) {
|
|
621
|
+
acc[key] = value.value;
|
|
622
|
+
}
|
|
623
|
+
return acc;
|
|
624
|
+
},
|
|
625
|
+
{}
|
|
626
|
+
);
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
// getStateItems(group: string): Record<string, FieldsetItemState>[] {
|
|
630
|
+
// if (Array.isArray(this.state)) {
|
|
631
|
+
// console.error(
|
|
632
|
+
// "Utils:getStateItems: unable to update the state of a multi form type",
|
|
633
|
+
// );
|
|
634
|
+
// return [];
|
|
635
|
+
// }
|
|
636
|
+
// if (!this.state) {
|
|
637
|
+
// console.error("Utils:getStateItems: state has not yet been set");
|
|
638
|
+
// return [];
|
|
639
|
+
// }
|
|
640
|
+
//
|
|
641
|
+
// const data = this.state.form[group].data;
|
|
642
|
+
// if (data.type !== "list") {
|
|
643
|
+
// return [];
|
|
644
|
+
// }
|
|
645
|
+
//
|
|
646
|
+
// return data.items.;
|
|
647
|
+
// }
|
|
648
|
+
// Public method to allow for the retrieval of the state value
|
|
649
|
+
getStateValue(group, key) {
|
|
650
|
+
if (Array.isArray(this.state)) {
|
|
651
|
+
console.error("getStateValue: unable to update the state of a multi form type");
|
|
652
|
+
return "";
|
|
807
653
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
}, [ref, onContinue]);
|
|
814
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form-page", { ref, ..._props, children });
|
|
815
|
-
}
|
|
816
|
-
function GoabPublicFormSummary({
|
|
817
|
-
heading = "",
|
|
818
|
-
...rest
|
|
819
|
-
}) {
|
|
820
|
-
const _props = parseISO.transformProps(
|
|
821
|
-
{ heading, ...rest },
|
|
822
|
-
parseISO.lowercase
|
|
823
|
-
);
|
|
824
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form-summary", { ..._props });
|
|
825
|
-
}
|
|
826
|
-
function GoabPublicForm({
|
|
827
|
-
onInit,
|
|
828
|
-
onComplete,
|
|
829
|
-
onStateChange,
|
|
830
|
-
children,
|
|
831
|
-
...rest
|
|
832
|
-
}) {
|
|
833
|
-
const ref = react.useRef(null);
|
|
834
|
-
const initialized = react.useRef(false);
|
|
835
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
836
|
-
react.useLayoutEffect(() => {
|
|
837
|
-
if (!ref.current) return;
|
|
838
|
-
const current = ref.current;
|
|
839
|
-
const initListener = (e) => {
|
|
840
|
-
onInit == null ? void 0 : onInit(e);
|
|
841
|
-
};
|
|
842
|
-
if (onInit && !initialized.current) {
|
|
843
|
-
current.addEventListener("_init", initListener);
|
|
654
|
+
if (!this.state) {
|
|
655
|
+
console.error("getStateValue: state has not yet been set");
|
|
656
|
+
return "";
|
|
844
657
|
}
|
|
845
|
-
const
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
};
|
|
849
|
-
const stateChangeListener = (e) => {
|
|
850
|
-
const detail = e.detail;
|
|
851
|
-
onStateChange == null ? void 0 : onStateChange(detail.data);
|
|
852
|
-
};
|
|
853
|
-
if (onComplete) {
|
|
854
|
-
current.addEventListener("_complete", completeListener);
|
|
658
|
+
const data = this.state.form[group].data;
|
|
659
|
+
if (data.type !== "details") {
|
|
660
|
+
return "";
|
|
855
661
|
}
|
|
856
|
-
|
|
857
|
-
|
|
662
|
+
return data.fieldsets[key].value;
|
|
663
|
+
}
|
|
664
|
+
// Public method to allow for the continuing to the next page
|
|
665
|
+
continueTo(next) {
|
|
666
|
+
if (!next) {
|
|
667
|
+
console.error("continueTo [name] is undefined");
|
|
668
|
+
return;
|
|
858
669
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
670
|
+
relay(this._formRef, "external::continue", { next });
|
|
671
|
+
}
|
|
672
|
+
// Public method to perform validation and send the appropriate messages to the form elements
|
|
673
|
+
validate(e, field, validators, options) {
|
|
674
|
+
var _a;
|
|
675
|
+
const { el, state, cancelled } = e.detail;
|
|
676
|
+
const value = (_a = state == null ? void 0 : state[field]) == null ? void 0 : _a.value;
|
|
677
|
+
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
678
|
+
if (cancelled) {
|
|
679
|
+
return [true, value];
|
|
680
|
+
}
|
|
681
|
+
for (const validator of validators) {
|
|
682
|
+
const msg = validator(value);
|
|
683
|
+
__privateMethod(this, _PublicFormController_instances, dispatchError_fn).call(this, el, field, msg, options);
|
|
684
|
+
if (msg) {
|
|
685
|
+
return [false, ""];
|
|
865
686
|
}
|
|
866
|
-
|
|
867
|
-
|
|
687
|
+
}
|
|
688
|
+
return [true, value];
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* Validates a group of fields ensuring that at least `minPassCount` of the items within the group
|
|
692
|
+
* passes. This is useful in the scenario when n number fields are required out of n+m number of fields.
|
|
693
|
+
*
|
|
694
|
+
* @param {string[]} fields - An array of field names to be validated.
|
|
695
|
+
* @param {Event} e - The event object associated with the validation trigger.
|
|
696
|
+
* @param {FieldValidator[]} validators - An array of validator functions to apply to the fields.
|
|
697
|
+
* @return {[number, Record<string, boolean>]} - Returns back the number of fields that passed and a record of the fields and their pass status.
|
|
698
|
+
*/
|
|
699
|
+
validateGroup(e, fields, validators) {
|
|
700
|
+
let passCount = 0;
|
|
701
|
+
const validGroups = {};
|
|
702
|
+
for (const field of fields) {
|
|
703
|
+
const [_valid] = this.validate(e, field, validators, { grouped: true });
|
|
704
|
+
if (_valid) {
|
|
705
|
+
validGroups[field] = true;
|
|
706
|
+
passCount++;
|
|
868
707
|
}
|
|
708
|
+
}
|
|
709
|
+
return [passCount, validGroups];
|
|
710
|
+
}
|
|
711
|
+
edit(index) {
|
|
712
|
+
relay(this._formRef, "external::alter:state", { index, operation: "edit" });
|
|
713
|
+
}
|
|
714
|
+
remove(index) {
|
|
715
|
+
relay(this._formRef, "external::alter:state", {
|
|
716
|
+
index,
|
|
717
|
+
operation: "remove"
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Completes the form and triggers the onComplete callback.
|
|
722
|
+
* This method should be used when you want to complete a form without navigating to a summary page.
|
|
723
|
+
*
|
|
724
|
+
* @important Developers must validate the form before calling this method.
|
|
725
|
+
*
|
|
726
|
+
* @example
|
|
727
|
+
* // Validate first, then complete
|
|
728
|
+
* const [isValid] = this.validate(e, "firstName", [
|
|
729
|
+
* requiredValidator("First name is required.")
|
|
730
|
+
* ]);
|
|
731
|
+
* if (isValid) {
|
|
732
|
+
* this.complete();
|
|
733
|
+
* }
|
|
734
|
+
* @returns void
|
|
735
|
+
*/
|
|
736
|
+
complete() {
|
|
737
|
+
if (!this._formRef) {
|
|
738
|
+
console.error("complete: form ref is not set");
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
741
|
+
if (this._isCompleting) {
|
|
742
|
+
console.warn("complete: completion already in progress");
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
this._isCompleting = true;
|
|
746
|
+
relay(this._formRef, "fieldset::submit", null, { bubbles: true });
|
|
747
|
+
this._isCompleting = false;
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Completes a subform and returns control to the parent form.
|
|
751
|
+
* This method should be used when working with subforms that need to complete without a summary page.
|
|
752
|
+
*
|
|
753
|
+
* @important Developers must validate the subform before calling this method.
|
|
754
|
+
*
|
|
755
|
+
* @example
|
|
756
|
+
* // Validate first, then complete the subform
|
|
757
|
+
* const [isValid] = this._childFormController.validate(e, "fullName", [
|
|
758
|
+
* requiredValidator("Please enter the dependent's full name.")
|
|
759
|
+
* ]);
|
|
760
|
+
* if (isValid) {
|
|
761
|
+
* this._childFormController.completeSubform();
|
|
762
|
+
* }
|
|
763
|
+
* @returns void
|
|
764
|
+
*/
|
|
765
|
+
completeSubform() {
|
|
766
|
+
if (!this._formRef) {
|
|
767
|
+
console.error("completeSubform: form ref is not set");
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
if (this._isCompleting) {
|
|
771
|
+
console.warn("completeSubform: completion already in progress");
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
const formRef = this._formRef;
|
|
775
|
+
this._isCompleting = true;
|
|
776
|
+
const stateChangeHandler = (e) => {
|
|
777
|
+
formRef.removeEventListener("_stateChange", stateChangeHandler);
|
|
778
|
+
dispatch(formRef, "_complete", {}, { bubbles: true });
|
|
779
|
+
this._isCompleting = false;
|
|
869
780
|
};
|
|
870
|
-
|
|
871
|
-
|
|
781
|
+
formRef.addEventListener("_stateChange", stateChangeHandler);
|
|
782
|
+
dispatch(formRef, "_continue", null, { bubbles: true });
|
|
783
|
+
}
|
|
784
|
+
// removes any data collected that doesn't correspond with the final history path
|
|
785
|
+
clean(data) {
|
|
786
|
+
return data.history.reduce((acc, fieldsetId) => {
|
|
787
|
+
acc[fieldsetId] = data.form[fieldsetId];
|
|
788
|
+
return acc;
|
|
789
|
+
}, {});
|
|
790
|
+
}
|
|
872
791
|
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
792
|
+
_PublicFormController_instances = new WeakSet();
|
|
793
|
+
updateObjectListState_fn = function(detail) {
|
|
794
|
+
var _a;
|
|
795
|
+
if (!Array.isArray(detail.data)) {
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
if (Array.isArray(this.state)) {
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
this.state = {
|
|
802
|
+
...this.state,
|
|
803
|
+
form: {
|
|
804
|
+
...((_a = this.state) == null ? void 0 : _a.form) || {},
|
|
805
|
+
[detail.id]: detail.data
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
// Private method to dispatch the error message to the form element
|
|
810
|
+
dispatchError_fn = function(el, name, msg, options) {
|
|
811
|
+
el.dispatchEvent(
|
|
812
|
+
new CustomEvent("msg", {
|
|
813
|
+
composed: true,
|
|
814
|
+
detail: {
|
|
815
|
+
action: "external::set:error",
|
|
816
|
+
data: {
|
|
817
|
+
name,
|
|
818
|
+
msg,
|
|
819
|
+
grouped: options == null ? void 0 : options.grouped
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
})
|
|
823
|
+
);
|
|
824
|
+
};
|
|
825
|
+
function GoabDatePicker({
|
|
826
|
+
value,
|
|
827
|
+
error,
|
|
828
|
+
min,
|
|
829
|
+
max,
|
|
830
|
+
disabled,
|
|
831
|
+
relative,
|
|
832
|
+
onChange,
|
|
880
833
|
...rest
|
|
881
834
|
}) {
|
|
882
835
|
const ref = react.useRef(null);
|
|
883
|
-
const _props =
|
|
884
|
-
{ id, name, "continue-msg": continueMsg, ...rest },
|
|
885
|
-
parseISO.kebab
|
|
886
|
-
);
|
|
836
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
887
837
|
react.useEffect(() => {
|
|
888
|
-
if (
|
|
838
|
+
if (value && typeof value !== "string") {
|
|
839
|
+
console.warn("Using a `Date` type for value is deprecated. Instead use a string of the format `yyyy-mm-dd`");
|
|
840
|
+
}
|
|
841
|
+
}, []);
|
|
842
|
+
react.useEffect(() => {
|
|
843
|
+
if (!ref.current) {
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
889
846
|
const current = ref.current;
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
const stateChangeListener = (e) => {
|
|
894
|
-
onStateChange == null ? void 0 : onStateChange(e);
|
|
847
|
+
const handleChange = (e) => {
|
|
848
|
+
const detail = e.detail;
|
|
849
|
+
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
895
850
|
};
|
|
896
|
-
if (
|
|
897
|
-
current.addEventListener("
|
|
898
|
-
}
|
|
899
|
-
if (onStateChange) {
|
|
900
|
-
current.addEventListener("_stateChange", stateChangeListener);
|
|
851
|
+
if (onChange) {
|
|
852
|
+
current.addEventListener("_change", handleChange);
|
|
901
853
|
}
|
|
902
854
|
return () => {
|
|
903
|
-
if (
|
|
904
|
-
current.removeEventListener("
|
|
905
|
-
}
|
|
906
|
-
if (onStateChange) {
|
|
907
|
-
current.removeEventListener("_stateChange", stateChangeListener);
|
|
855
|
+
if (onChange) {
|
|
856
|
+
current.removeEventListener("_change", handleChange);
|
|
908
857
|
}
|
|
909
858
|
};
|
|
910
|
-
}, [
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
859
|
+
}, [onChange]);
|
|
860
|
+
const formatValue = (val) => {
|
|
861
|
+
if (!val) return "";
|
|
862
|
+
if (val instanceof Date) {
|
|
863
|
+
return new calendarDate.CalendarDate(val).toString();
|
|
864
|
+
}
|
|
865
|
+
return val;
|
|
866
|
+
};
|
|
867
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
868
|
+
"goa-date-picker",
|
|
869
|
+
{
|
|
870
|
+
ref,
|
|
871
|
+
value: formatValue(value) || void 0,
|
|
872
|
+
error: error ? "true" : void 0,
|
|
873
|
+
disabled: disabled ? "true" : void 0,
|
|
874
|
+
min: formatValue(min) || void 0,
|
|
875
|
+
max: formatValue(max) || void 0,
|
|
876
|
+
relative: relative ? "true" : void 0,
|
|
877
|
+
..._props
|
|
878
|
+
}
|
|
924
879
|
);
|
|
925
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-subform-index", { slot: "subform-index", ..._props, children });
|
|
926
880
|
}
|
|
927
|
-
function
|
|
928
|
-
|
|
881
|
+
function GoabDetails({
|
|
882
|
+
open,
|
|
929
883
|
children,
|
|
930
884
|
...rest
|
|
931
885
|
}) {
|
|
932
|
-
const _props =
|
|
933
|
-
|
|
934
|
-
|
|
886
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
887
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
888
|
+
"goa-details",
|
|
889
|
+
{
|
|
890
|
+
open: open ? "true" : void 0,
|
|
891
|
+
..._props,
|
|
892
|
+
children
|
|
893
|
+
}
|
|
935
894
|
);
|
|
936
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form-task", { ..._props, children });
|
|
937
895
|
}
|
|
938
|
-
function
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
896
|
+
function GoabDivider(props) {
|
|
897
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
898
|
+
"goa-divider",
|
|
899
|
+
{
|
|
900
|
+
mt: props.mt,
|
|
901
|
+
mr: props.mr,
|
|
902
|
+
mb: props.mb,
|
|
903
|
+
ml: props.ml,
|
|
904
|
+
testid: props.testId
|
|
905
|
+
}
|
|
906
|
+
);
|
|
944
907
|
}
|
|
945
|
-
function
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
908
|
+
function GoabDrawer({
|
|
909
|
+
position,
|
|
910
|
+
open,
|
|
911
|
+
heading,
|
|
912
|
+
maxSize,
|
|
913
|
+
testId,
|
|
914
|
+
actions,
|
|
949
915
|
children,
|
|
950
|
-
|
|
916
|
+
onClose
|
|
951
917
|
}) {
|
|
952
|
-
const
|
|
918
|
+
const el = react.useRef(null);
|
|
919
|
+
react.useEffect(() => {
|
|
920
|
+
var _a;
|
|
921
|
+
if (!(el == null ? void 0 : el.current) || !onClose) {
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
924
|
+
(_a = el.current) == null ? void 0 : _a.addEventListener("_close", onClose);
|
|
925
|
+
return () => {
|
|
926
|
+
var _a2;
|
|
927
|
+
(_a2 = el.current) == null ? void 0 : _a2.removeEventListener("_close", onClose);
|
|
928
|
+
};
|
|
929
|
+
}, [el, onClose]);
|
|
953
930
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
954
|
-
"goa-
|
|
931
|
+
"goa-drawer",
|
|
955
932
|
{
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
933
|
+
ref: el,
|
|
934
|
+
position,
|
|
935
|
+
open: open ? true : void 0,
|
|
936
|
+
heading: typeof heading === "string" ? heading : void 0,
|
|
937
|
+
maxsize: maxSize,
|
|
938
|
+
testid: testId,
|
|
960
939
|
children: [
|
|
961
|
-
|
|
962
|
-
|
|
940
|
+
heading && typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
941
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children: actions }),
|
|
963
942
|
children
|
|
964
943
|
]
|
|
965
944
|
}
|
|
966
945
|
);
|
|
967
946
|
}
|
|
968
|
-
function
|
|
969
|
-
|
|
947
|
+
function stringify(value) {
|
|
948
|
+
if (typeof value === "undefined") {
|
|
949
|
+
return "";
|
|
950
|
+
}
|
|
951
|
+
if (typeof value === "string") {
|
|
952
|
+
return value;
|
|
953
|
+
}
|
|
954
|
+
return JSON.stringify(value);
|
|
970
955
|
}
|
|
971
|
-
function
|
|
972
|
-
|
|
973
|
-
step,
|
|
974
|
-
mt,
|
|
975
|
-
mb,
|
|
976
|
-
ml,
|
|
977
|
-
mr,
|
|
956
|
+
function GoabDropdown({
|
|
957
|
+
value,
|
|
978
958
|
onChange,
|
|
979
|
-
|
|
959
|
+
disabled,
|
|
960
|
+
error,
|
|
961
|
+
filterable,
|
|
962
|
+
multiselect,
|
|
963
|
+
native,
|
|
964
|
+
relative,
|
|
965
|
+
children,
|
|
966
|
+
...rest
|
|
980
967
|
}) {
|
|
981
|
-
const
|
|
968
|
+
const el = react.useRef(null);
|
|
969
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
982
970
|
react.useEffect(() => {
|
|
983
|
-
if (!
|
|
971
|
+
if (!el.current) {
|
|
984
972
|
return;
|
|
985
973
|
}
|
|
986
|
-
const current =
|
|
987
|
-
const
|
|
974
|
+
const current = el.current;
|
|
975
|
+
const handler = (e) => {
|
|
988
976
|
const detail = e.detail;
|
|
989
|
-
onChange == null ? void 0 : onChange(detail);
|
|
977
|
+
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
990
978
|
};
|
|
991
|
-
|
|
979
|
+
if (onChange) {
|
|
980
|
+
current.addEventListener("_change", handler);
|
|
981
|
+
}
|
|
992
982
|
return () => {
|
|
993
|
-
|
|
983
|
+
if (onChange) {
|
|
984
|
+
current.removeEventListener("_change", handler);
|
|
985
|
+
}
|
|
994
986
|
};
|
|
995
|
-
}, [
|
|
987
|
+
}, [el, onChange]);
|
|
996
988
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
997
|
-
"goa-
|
|
989
|
+
"goa-dropdown",
|
|
998
990
|
{
|
|
999
|
-
ref,
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
991
|
+
ref: el,
|
|
992
|
+
value: stringify(value),
|
|
993
|
+
disabled: disabled ? "true" : void 0,
|
|
994
|
+
error: error ? "true" : void 0,
|
|
995
|
+
filterable: filterable ? "true" : void 0,
|
|
996
|
+
multiselect: multiselect ? "true" : void 0,
|
|
997
|
+
native: native ? "true" : void 0,
|
|
998
|
+
relative: relative ? "true" : void 0,
|
|
999
|
+
..._props,
|
|
1006
1000
|
children
|
|
1007
1001
|
}
|
|
1008
1002
|
);
|
|
1009
1003
|
}
|
|
1010
|
-
function
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1004
|
+
function GoabDropdownOption(props) {
|
|
1005
|
+
react.useEffect(() => {
|
|
1006
|
+
console.warn("GoabDropdownOption is deprecated. Please use GoabDropdownItem");
|
|
1007
|
+
}, []);
|
|
1008
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoabDropdownItem, { ...props });
|
|
1009
|
+
}
|
|
1010
|
+
function GoabDropdownItem({
|
|
1011
|
+
value,
|
|
1012
|
+
label,
|
|
1013
|
+
filter,
|
|
1014
|
+
name,
|
|
1015
|
+
mountType = "append"
|
|
1019
1016
|
}) {
|
|
1020
1017
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1021
|
-
"goa-
|
|
1018
|
+
"goa-dropdown-item",
|
|
1022
1019
|
{
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
ml,
|
|
1029
|
-
testid: testId,
|
|
1030
|
-
children
|
|
1020
|
+
value,
|
|
1021
|
+
label,
|
|
1022
|
+
filter,
|
|
1023
|
+
name,
|
|
1024
|
+
mount: mountType
|
|
1031
1025
|
}
|
|
1032
1026
|
);
|
|
1033
1027
|
}
|
|
1034
|
-
function
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1028
|
+
function GoabFileUploadCard({
|
|
1029
|
+
onDelete,
|
|
1030
|
+
onCancel,
|
|
1031
|
+
filename,
|
|
1032
|
+
...rest
|
|
1033
|
+
}) {
|
|
1034
|
+
const el = react.useRef(null);
|
|
1035
|
+
const _props = calendarDate.transformProps({ filename, ...rest }, calendarDate.lowercase);
|
|
1036
|
+
react.useEffect(() => {
|
|
1037
|
+
if (!el.current) return;
|
|
1038
|
+
const current = el.current;
|
|
1039
|
+
const deleteHandler = (event) => onDelete == null ? void 0 : onDelete({ filename, event });
|
|
1040
|
+
const cancelHandler = (event) => onCancel == null ? void 0 : onCancel({ filename, event });
|
|
1041
|
+
current.addEventListener("_delete", deleteHandler);
|
|
1042
|
+
current.addEventListener("_cancel", cancelHandler);
|
|
1043
|
+
return () => {
|
|
1044
|
+
current.removeEventListener("_delete", deleteHandler);
|
|
1045
|
+
current.removeEventListener("_cancel", cancelHandler);
|
|
1046
|
+
};
|
|
1047
|
+
}, [el, onDelete, onCancel, filename]);
|
|
1048
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-file-upload-card", { ref: el, ..._props });
|
|
1049
|
+
}
|
|
1050
|
+
function GoabFileUploadInput({
|
|
1051
|
+
onSelectFile,
|
|
1052
|
+
...rest
|
|
1053
|
+
}) {
|
|
1054
|
+
const el = react.useRef(null);
|
|
1055
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1056
|
+
react.useEffect(() => {
|
|
1057
|
+
if (!el.current) return;
|
|
1058
|
+
const current = el.current;
|
|
1059
|
+
const handler = (e) => {
|
|
1060
|
+
const detail = e.detail;
|
|
1061
|
+
onSelectFile({ ...detail, event: e });
|
|
1062
|
+
};
|
|
1063
|
+
current.addEventListener("_selectFile", handler);
|
|
1064
|
+
return () => {
|
|
1065
|
+
current.removeEventListener("_selectFile", handler);
|
|
1066
|
+
};
|
|
1067
|
+
}, [el, onSelectFile]);
|
|
1068
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-file-upload-input", { ref: el, ..._props });
|
|
1069
|
+
}
|
|
1070
|
+
function GoabAppFooter({
|
|
1041
1071
|
children,
|
|
1042
|
-
|
|
1072
|
+
...rest
|
|
1043
1073
|
}) {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
{
|
|
1047
|
-
heading,
|
|
1048
|
-
backgroundurl: backgroundUrl,
|
|
1049
|
-
minheight: minHeight,
|
|
1050
|
-
maxcontentwidth: maxContentWidth,
|
|
1051
|
-
backgroundcolor: backgroundColor,
|
|
1052
|
-
textcolor: textColor,
|
|
1053
|
-
testid: testId,
|
|
1054
|
-
children
|
|
1055
|
-
}
|
|
1056
|
-
);
|
|
1074
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1075
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { ..._props, children });
|
|
1057
1076
|
}
|
|
1058
|
-
function
|
|
1059
|
-
children
|
|
1077
|
+
function GoabAppFooterMetaSection({
|
|
1078
|
+
children,
|
|
1079
|
+
...rest
|
|
1060
1080
|
}) {
|
|
1061
|
-
|
|
1081
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1082
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer-meta-section", { slot: "meta", ..._props, children });
|
|
1062
1083
|
}
|
|
1063
|
-
function
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1084
|
+
function GoabAppFooterNavSection({
|
|
1085
|
+
children,
|
|
1086
|
+
...rest
|
|
1087
|
+
}) {
|
|
1088
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1089
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer-nav-section", { slot: "nav", ..._props, children });
|
|
1090
|
+
}
|
|
1091
|
+
function GoabFieldset({
|
|
1092
|
+
onContinue,
|
|
1070
1093
|
children,
|
|
1071
1094
|
...rest
|
|
1072
1095
|
}) {
|
|
1073
1096
|
const ref = react.useRef(null);
|
|
1074
|
-
const _props =
|
|
1075
|
-
{ variant, size, ...rest },
|
|
1076
|
-
parseISO.lowercase
|
|
1077
|
-
);
|
|
1097
|
+
const _props = calendarDate.transformProps(rest, calendarDate.kebab);
|
|
1078
1098
|
react.useEffect(() => {
|
|
1079
|
-
if (!ref.current)
|
|
1080
|
-
return;
|
|
1081
|
-
}
|
|
1082
|
-
if (!onClick) {
|
|
1083
|
-
return;
|
|
1084
|
-
}
|
|
1099
|
+
if (!ref.current) return;
|
|
1085
1100
|
const current = ref.current;
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1101
|
+
const continueListener = (e) => {
|
|
1102
|
+
const event = e.detail;
|
|
1103
|
+
return onContinue == null ? void 0 : onContinue(event);
|
|
1088
1104
|
};
|
|
1089
|
-
|
|
1105
|
+
if (onContinue) {
|
|
1106
|
+
current.addEventListener("_continue", continueListener);
|
|
1107
|
+
}
|
|
1090
1108
|
return () => {
|
|
1091
|
-
|
|
1109
|
+
if (onContinue) {
|
|
1110
|
+
current.removeEventListener("_continue", continueListener);
|
|
1111
|
+
}
|
|
1112
|
+
};
|
|
1113
|
+
}, [ref, onContinue]);
|
|
1114
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-fieldset", { ref, ..._props, children });
|
|
1115
|
+
}
|
|
1116
|
+
function GoabPublicFormPage({
|
|
1117
|
+
onContinue,
|
|
1118
|
+
children,
|
|
1119
|
+
...rest
|
|
1120
|
+
}) {
|
|
1121
|
+
const ref = react.useRef(null);
|
|
1122
|
+
const _props = calendarDate.transformProps(rest, calendarDate.kebab);
|
|
1123
|
+
react.useEffect(() => {
|
|
1124
|
+
if (!ref.current) return;
|
|
1125
|
+
const current = ref.current;
|
|
1126
|
+
const continueListener = (e) => {
|
|
1127
|
+
onContinue == null ? void 0 : onContinue(e);
|
|
1092
1128
|
};
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
"goa-icon-button",
|
|
1096
|
-
{
|
|
1097
|
-
ref,
|
|
1098
|
-
disabled: disabled ? "true" : void 0,
|
|
1099
|
-
"action-arg": actionArg,
|
|
1100
|
-
"action-args": JSON.stringify(actionArgs),
|
|
1101
|
-
..._props,
|
|
1102
|
-
children
|
|
1129
|
+
if (onContinue) {
|
|
1130
|
+
current.addEventListener("_continue", continueListener);
|
|
1103
1131
|
}
|
|
1104
|
-
|
|
1132
|
+
return () => {
|
|
1133
|
+
if (onContinue) {
|
|
1134
|
+
current.removeEventListener("_continue", continueListener);
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
}, [ref, onContinue]);
|
|
1138
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form-page", { ref, ..._props, children });
|
|
1105
1139
|
}
|
|
1106
|
-
function
|
|
1107
|
-
|
|
1140
|
+
function GoabPublicFormSummary({
|
|
1141
|
+
heading = "",
|
|
1108
1142
|
...rest
|
|
1109
1143
|
}) {
|
|
1110
|
-
const _props =
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
{
|
|
1114
|
-
inverted: typeof inverted === "boolean" ? inverted ? "true" : void 0 : inverted,
|
|
1115
|
-
..._props
|
|
1116
|
-
}
|
|
1144
|
+
const _props = calendarDate.transformProps(
|
|
1145
|
+
{ heading, ...rest },
|
|
1146
|
+
calendarDate.lowercase
|
|
1117
1147
|
);
|
|
1148
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form-summary", { ..._props });
|
|
1118
1149
|
}
|
|
1119
|
-
function
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
readonly,
|
|
1125
|
-
error,
|
|
1126
|
-
leadingContent,
|
|
1127
|
-
trailingContent,
|
|
1128
|
-
onTrailingIconClick,
|
|
1129
|
-
onChange,
|
|
1130
|
-
onFocus,
|
|
1131
|
-
onBlur,
|
|
1132
|
-
onKeyPress,
|
|
1150
|
+
function GoabPublicForm({
|
|
1151
|
+
onInit,
|
|
1152
|
+
onComplete,
|
|
1153
|
+
onStateChange,
|
|
1154
|
+
children,
|
|
1133
1155
|
...rest
|
|
1134
1156
|
}) {
|
|
1135
1157
|
const ref = react.useRef(null);
|
|
1136
|
-
const
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
}
|
|
1158
|
+
const initialized = react.useRef(false);
|
|
1159
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1160
|
+
react.useLayoutEffect(() => {
|
|
1161
|
+
if (!ref.current) return;
|
|
1141
1162
|
const current = ref.current;
|
|
1142
|
-
const
|
|
1143
|
-
|
|
1144
|
-
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
1145
|
-
};
|
|
1146
|
-
const clickListener = () => {
|
|
1147
|
-
onTrailingIconClick == null ? void 0 : onTrailingIconClick();
|
|
1148
|
-
};
|
|
1149
|
-
const focusListener = (e) => {
|
|
1150
|
-
const detail = e.detail;
|
|
1151
|
-
onFocus == null ? void 0 : onFocus({ ...detail, event: e });
|
|
1163
|
+
const initListener = (e) => {
|
|
1164
|
+
onInit == null ? void 0 : onInit(e);
|
|
1152
1165
|
};
|
|
1153
|
-
|
|
1166
|
+
if (onInit && !initialized.current) {
|
|
1167
|
+
current.addEventListener("_init", initListener);
|
|
1168
|
+
}
|
|
1169
|
+
const completeListener = (e) => {
|
|
1154
1170
|
const detail = e.detail;
|
|
1155
|
-
|
|
1171
|
+
onComplete == null ? void 0 : onComplete(detail);
|
|
1156
1172
|
};
|
|
1157
|
-
const
|
|
1173
|
+
const stateChangeListener = (e) => {
|
|
1158
1174
|
const detail = e.detail;
|
|
1159
|
-
|
|
1160
|
-
};
|
|
1161
|
-
current.addEventListener("_change", changeListener);
|
|
1162
|
-
current.addEventListener("_trailingIconClick", clickListener);
|
|
1163
|
-
current.addEventListener("_focus", focusListener);
|
|
1164
|
-
current.addEventListener("_blur", blurListener);
|
|
1165
|
-
current.addEventListener("_keyPress", keypressListener);
|
|
1166
|
-
return () => {
|
|
1167
|
-
current.removeEventListener("_change", changeListener);
|
|
1168
|
-
current.removeEventListener("_trailingIconClick", clickListener);
|
|
1169
|
-
current.removeEventListener("_focus", focusListener);
|
|
1170
|
-
current.removeEventListener("_blur", blurListener);
|
|
1171
|
-
current.removeEventListener("_keyPress", keypressListener);
|
|
1175
|
+
onStateChange == null ? void 0 : onStateChange(detail.data);
|
|
1172
1176
|
};
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
"goa-input",
|
|
1176
|
-
{
|
|
1177
|
-
ref,
|
|
1178
|
-
..._props,
|
|
1179
|
-
focused: focused ? "true" : void 0,
|
|
1180
|
-
disabled: disabled ? "true" : void 0,
|
|
1181
|
-
readonly: readonly ? "true" : void 0,
|
|
1182
|
-
error: error ? "true" : void 0,
|
|
1183
|
-
handletrailingiconclick: onTrailingIconClick ? "true" : "false",
|
|
1184
|
-
children: [
|
|
1185
|
-
leadingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "leadingContent", children: leadingContent }),
|
|
1186
|
-
trailingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "trailingContent", children: trailingContent })
|
|
1187
|
-
]
|
|
1188
|
-
}
|
|
1189
|
-
);
|
|
1190
|
-
}
|
|
1191
|
-
const onDateChangeHandler = (onChange) => {
|
|
1192
|
-
return ({ name, value, event }) => {
|
|
1193
|
-
if (!value) {
|
|
1194
|
-
onChange == null ? void 0 : onChange({ name, value: "", event });
|
|
1195
|
-
return;
|
|
1196
|
-
}
|
|
1197
|
-
if (typeof value === "string" && parseISO.isValid(new Date(value))) {
|
|
1198
|
-
onChange == null ? void 0 : onChange({ name, value: parseISO.parseISO(value), event });
|
|
1199
|
-
return;
|
|
1200
|
-
}
|
|
1201
|
-
if (parseISO.isValid(value)) {
|
|
1202
|
-
onChange == null ? void 0 : onChange({ name, value, event });
|
|
1203
|
-
return;
|
|
1204
|
-
}
|
|
1205
|
-
};
|
|
1206
|
-
};
|
|
1207
|
-
const onTimeChangeHandler = (onChange) => {
|
|
1208
|
-
return ({ name, value, event }) => {
|
|
1209
|
-
if (!value) {
|
|
1210
|
-
onChange == null ? void 0 : onChange({ name, value: "", event });
|
|
1211
|
-
return;
|
|
1212
|
-
}
|
|
1213
|
-
onChange == null ? void 0 : onChange({ name, value, event });
|
|
1214
|
-
};
|
|
1215
|
-
};
|
|
1216
|
-
function toString(value, tmpl = "yyyy-MM-dd") {
|
|
1217
|
-
if (!value) {
|
|
1218
|
-
return "";
|
|
1219
|
-
}
|
|
1220
|
-
if (typeof value === "string") {
|
|
1221
|
-
return parseISO.format(parseISO.parseISO(value), tmpl);
|
|
1222
|
-
}
|
|
1223
|
-
if (value.toISOString() === (/* @__PURE__ */ new Date(0)).toISOString()) {
|
|
1224
|
-
return "";
|
|
1225
|
-
}
|
|
1226
|
-
return parseISO.format(value, tmpl);
|
|
1227
|
-
}
|
|
1228
|
-
function GoabInputText(props) {
|
|
1229
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "text" });
|
|
1230
|
-
}
|
|
1231
|
-
function GoabInputPassword(props) {
|
|
1232
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "password" });
|
|
1233
|
-
}
|
|
1234
|
-
function GoabInputDate({
|
|
1235
|
-
value,
|
|
1236
|
-
min = "",
|
|
1237
|
-
max = "",
|
|
1238
|
-
...props
|
|
1239
|
-
}) {
|
|
1240
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1241
|
-
GoabInput,
|
|
1242
|
-
{
|
|
1243
|
-
...props,
|
|
1244
|
-
type: "date",
|
|
1245
|
-
onChange: onDateChangeHandler(props.onChange),
|
|
1246
|
-
min: toString(min),
|
|
1247
|
-
max: toString(max),
|
|
1248
|
-
value: toString(value)
|
|
1177
|
+
if (onComplete) {
|
|
1178
|
+
current.addEventListener("_complete", completeListener);
|
|
1249
1179
|
}
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
function GoabInputTime({
|
|
1253
|
-
value,
|
|
1254
|
-
min = "",
|
|
1255
|
-
max = "",
|
|
1256
|
-
...props
|
|
1257
|
-
}) {
|
|
1258
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1259
|
-
GoabInput,
|
|
1260
|
-
{
|
|
1261
|
-
...props,
|
|
1262
|
-
onChange: onTimeChangeHandler(props.onChange),
|
|
1263
|
-
value,
|
|
1264
|
-
type: "time"
|
|
1180
|
+
if (onStateChange) {
|
|
1181
|
+
current.addEventListener("_stateChange", stateChangeListener);
|
|
1265
1182
|
}
|
|
1266
|
-
|
|
1183
|
+
return () => {
|
|
1184
|
+
if (onInit) {
|
|
1185
|
+
current.removeEventListener("_init", initListener);
|
|
1186
|
+
}
|
|
1187
|
+
if (onComplete) {
|
|
1188
|
+
current.removeEventListener("_complete", completeListener);
|
|
1189
|
+
}
|
|
1190
|
+
if (onStateChange) {
|
|
1191
|
+
current.removeEventListener("_stateChange", stateChangeListener);
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
}, [onInit, onComplete, onStateChange]);
|
|
1195
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form", { ref, ..._props, children });
|
|
1267
1196
|
}
|
|
1268
|
-
function
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1197
|
+
function GoabPublicSubform({
|
|
1198
|
+
id = "",
|
|
1199
|
+
name = "",
|
|
1200
|
+
continueMsg = "",
|
|
1201
|
+
onInit,
|
|
1202
|
+
onStateChange,
|
|
1203
|
+
children,
|
|
1204
|
+
...rest
|
|
1273
1205
|
}) {
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
{
|
|
1277
|
-
|
|
1278
|
-
onChange: onDateChangeHandler(props.onChange),
|
|
1279
|
-
value: toString(value, "yyyy-MM-dd'T'HH:mm"),
|
|
1280
|
-
type: "datetime-local"
|
|
1281
|
-
}
|
|
1206
|
+
const ref = react.useRef(null);
|
|
1207
|
+
const _props = calendarDate.transformProps(
|
|
1208
|
+
{ id, name, "continue-msg": continueMsg, ...rest },
|
|
1209
|
+
calendarDate.kebab
|
|
1282
1210
|
);
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "tel" });
|
|
1295
|
-
}
|
|
1296
|
-
function GoabInputFile(props) {
|
|
1297
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1298
|
-
"input",
|
|
1299
|
-
{
|
|
1300
|
-
id: props.id,
|
|
1301
|
-
name: props.name,
|
|
1302
|
-
type: "file",
|
|
1303
|
-
onChange: (e) => {
|
|
1304
|
-
var _a;
|
|
1305
|
-
return (_a = props.onChange) == null ? void 0 : _a.call(props, {
|
|
1306
|
-
name: e.target.name,
|
|
1307
|
-
value: e.target.value,
|
|
1308
|
-
event: e.nativeEvent
|
|
1309
|
-
});
|
|
1310
|
-
},
|
|
1311
|
-
style: { backgroundColor: "revert" }
|
|
1211
|
+
react.useEffect(() => {
|
|
1212
|
+
if (!ref.current) return;
|
|
1213
|
+
const current = ref.current;
|
|
1214
|
+
const initListener = (e) => {
|
|
1215
|
+
onInit == null ? void 0 : onInit(e);
|
|
1216
|
+
};
|
|
1217
|
+
const stateChangeListener = (e) => {
|
|
1218
|
+
onStateChange == null ? void 0 : onStateChange(e);
|
|
1219
|
+
};
|
|
1220
|
+
if (onInit) {
|
|
1221
|
+
current.addEventListener("_init", initListener);
|
|
1312
1222
|
}
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1223
|
+
if (onStateChange) {
|
|
1224
|
+
current.addEventListener("_stateChange", stateChangeListener);
|
|
1225
|
+
}
|
|
1226
|
+
return () => {
|
|
1227
|
+
if (onInit) {
|
|
1228
|
+
current.removeEventListener("_init", initListener);
|
|
1229
|
+
}
|
|
1230
|
+
if (onStateChange) {
|
|
1231
|
+
current.removeEventListener("_stateChange", stateChangeListener);
|
|
1232
|
+
}
|
|
1233
|
+
};
|
|
1234
|
+
}, [ref, onInit, onStateChange]);
|
|
1235
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-subform", { ref, ..._props, children });
|
|
1317
1236
|
}
|
|
1318
|
-
function
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1237
|
+
function GoabPublicSubformIndex({
|
|
1238
|
+
heading = "",
|
|
1239
|
+
sectionTitle = "",
|
|
1240
|
+
actionButtonText = "",
|
|
1241
|
+
buttonVisibility = "hidden",
|
|
1242
|
+
children,
|
|
1243
|
+
...rest
|
|
1324
1244
|
}) {
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
};
|
|
1329
|
-
const onFocus = ({ name, value: value2, event }) => {
|
|
1330
|
-
var _a;
|
|
1331
|
-
(_a = props.onFocus) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), event });
|
|
1332
|
-
};
|
|
1333
|
-
const onBlur = ({ name, value: value2, event }) => {
|
|
1334
|
-
var _a;
|
|
1335
|
-
(_a = props.onBlur) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), event });
|
|
1336
|
-
};
|
|
1337
|
-
const onKeyPress = ({ name, value: value2, key, event }) => {
|
|
1338
|
-
var _a;
|
|
1339
|
-
(_a = props.onKeyPress) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), key: parseInt(key), event });
|
|
1340
|
-
};
|
|
1341
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1342
|
-
GoabInput,
|
|
1343
|
-
{
|
|
1344
|
-
...props,
|
|
1345
|
-
onChange: onNumberChange,
|
|
1346
|
-
min: min == null ? void 0 : min.toString(),
|
|
1347
|
-
max: max == null ? void 0 : max.toString(),
|
|
1348
|
-
value: value == null ? void 0 : value.toString(),
|
|
1349
|
-
onFocus,
|
|
1350
|
-
onBlur,
|
|
1351
|
-
type: "number",
|
|
1352
|
-
onKeyPress,
|
|
1353
|
-
textAlign
|
|
1354
|
-
}
|
|
1245
|
+
const _props = calendarDate.transformProps(
|
|
1246
|
+
{ heading, "section-title": sectionTitle, "action-button-text": actionButtonText, "button-visibility": buttonVisibility, ...rest },
|
|
1247
|
+
calendarDate.kebab
|
|
1355
1248
|
);
|
|
1249
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-subform-index", { slot: "subform-index", ..._props, children });
|
|
1356
1250
|
}
|
|
1357
|
-
function
|
|
1358
|
-
|
|
1359
|
-
}
|
|
1360
|
-
const GoabLinearProgress = ({
|
|
1361
|
-
progress,
|
|
1362
|
-
percentVisibility,
|
|
1363
|
-
ariaLabel,
|
|
1364
|
-
ariaLabelledBy,
|
|
1365
|
-
testId
|
|
1366
|
-
}) => {
|
|
1367
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1368
|
-
"goa-linear-progress",
|
|
1369
|
-
{
|
|
1370
|
-
progress,
|
|
1371
|
-
"percent-visibility": percentVisibility,
|
|
1372
|
-
"aria-label": ariaLabel,
|
|
1373
|
-
"aria-labelledby": ariaLabelledBy,
|
|
1374
|
-
testid: testId
|
|
1375
|
-
}
|
|
1376
|
-
);
|
|
1377
|
-
};
|
|
1378
|
-
function GoabLink({
|
|
1379
|
-
actionArgs,
|
|
1380
|
-
actionArg,
|
|
1251
|
+
function GoabPublicFormTask({
|
|
1252
|
+
status = "cannot-start",
|
|
1381
1253
|
children,
|
|
1382
1254
|
...rest
|
|
1383
1255
|
}) {
|
|
1384
|
-
const _props =
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
{
|
|
1388
|
-
"action-arg": actionArg,
|
|
1389
|
-
"action-args": JSON.stringify(actionArgs),
|
|
1390
|
-
..._props,
|
|
1391
|
-
children
|
|
1392
|
-
}
|
|
1256
|
+
const _props = calendarDate.transformProps(
|
|
1257
|
+
{ status, ...rest },
|
|
1258
|
+
calendarDate.lowercase
|
|
1393
1259
|
);
|
|
1260
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form-task", { ..._props, children });
|
|
1394
1261
|
}
|
|
1395
|
-
function
|
|
1396
|
-
type = "primary",
|
|
1262
|
+
function GoabPublicFormTaskList({
|
|
1397
1263
|
children,
|
|
1398
1264
|
...rest
|
|
1399
1265
|
}) {
|
|
1400
|
-
const _props =
|
|
1401
|
-
|
|
1402
|
-
parseISO.lowercase
|
|
1403
|
-
);
|
|
1404
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-link-button", { ..._props, children });
|
|
1266
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1267
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-public-form-task-list", { ..._props, children });
|
|
1405
1268
|
}
|
|
1406
|
-
function
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1269
|
+
function GoabFormItem({
|
|
1270
|
+
error,
|
|
1271
|
+
helpText,
|
|
1272
|
+
publicFormSummaryOrder,
|
|
1410
1273
|
children,
|
|
1411
1274
|
...rest
|
|
1412
1275
|
}) {
|
|
1413
|
-
const
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1276
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1277
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1278
|
+
"goa-form-item",
|
|
1279
|
+
{
|
|
1280
|
+
error: typeof error === "string" ? error : void 0,
|
|
1281
|
+
helptext: typeof helpText === "string" ? helpText : void 0,
|
|
1282
|
+
"public-form-summary-order": publicFormSummaryOrder,
|
|
1283
|
+
..._props,
|
|
1284
|
+
children: [
|
|
1285
|
+
error && typeof error !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "error", children: error }),
|
|
1286
|
+
helpText && typeof helpText !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "helptext", children: helpText }),
|
|
1287
|
+
children
|
|
1288
|
+
]
|
|
1424
1289
|
}
|
|
1425
|
-
|
|
1426
|
-
const listener = (e) => {
|
|
1427
|
-
const detail = e.detail;
|
|
1428
|
-
onAction == null ? void 0 : onAction(detail);
|
|
1429
|
-
};
|
|
1430
|
-
current.addEventListener("_action", listener);
|
|
1431
|
-
return () => {
|
|
1432
|
-
current.removeEventListener("_action", listener);
|
|
1433
|
-
};
|
|
1434
|
-
}, [el, onAction]);
|
|
1435
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-menu-button", { ..._props, ref: el, children });
|
|
1290
|
+
);
|
|
1436
1291
|
}
|
|
1437
|
-
function
|
|
1438
|
-
|
|
1439
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-menu-action", { ..._props });
|
|
1292
|
+
function GoabFormStep(props) {
|
|
1293
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-form-step", { text: props.text, status: props.status });
|
|
1440
1294
|
}
|
|
1441
|
-
function
|
|
1442
|
-
type,
|
|
1443
|
-
version,
|
|
1444
|
-
feedbackUrl,
|
|
1445
|
-
maxContentWidth,
|
|
1446
|
-
feedbackUrlTarget,
|
|
1447
|
-
headerUrlTarget,
|
|
1295
|
+
function GoabFormStepper({
|
|
1448
1296
|
testId,
|
|
1449
|
-
|
|
1297
|
+
step,
|
|
1298
|
+
mt,
|
|
1299
|
+
mb,
|
|
1300
|
+
ml,
|
|
1301
|
+
mr,
|
|
1302
|
+
onChange,
|
|
1303
|
+
children
|
|
1450
1304
|
}) {
|
|
1451
|
-
const
|
|
1305
|
+
const ref = react.useRef(null);
|
|
1452
1306
|
react.useEffect(() => {
|
|
1453
|
-
if (!
|
|
1454
|
-
return;
|
|
1455
|
-
}
|
|
1456
|
-
if (!onFeedbackClick) {
|
|
1307
|
+
if (!ref.current) {
|
|
1457
1308
|
return;
|
|
1458
1309
|
}
|
|
1459
|
-
const current =
|
|
1460
|
-
const
|
|
1461
|
-
|
|
1310
|
+
const current = ref.current;
|
|
1311
|
+
const changeListener = (e) => {
|
|
1312
|
+
const detail = e.detail;
|
|
1313
|
+
onChange == null ? void 0 : onChange(detail);
|
|
1462
1314
|
};
|
|
1463
|
-
current.addEventListener("
|
|
1315
|
+
current.addEventListener("_change", changeListener);
|
|
1464
1316
|
return () => {
|
|
1465
|
-
current.removeEventListener("
|
|
1317
|
+
current.removeEventListener("_change", changeListener);
|
|
1466
1318
|
};
|
|
1467
|
-
}, [
|
|
1319
|
+
}, [ref, onChange]);
|
|
1468
1320
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1469
|
-
"goa-
|
|
1321
|
+
"goa-form-stepper",
|
|
1470
1322
|
{
|
|
1471
|
-
ref
|
|
1472
|
-
type,
|
|
1473
|
-
version: typeof version === "string" ? version : void 0,
|
|
1474
|
-
feedbackurl: feedbackUrl,
|
|
1323
|
+
ref,
|
|
1475
1324
|
testid: testId,
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1325
|
+
step,
|
|
1326
|
+
mt,
|
|
1327
|
+
mr,
|
|
1328
|
+
mb,
|
|
1329
|
+
ml,
|
|
1330
|
+
children
|
|
1481
1331
|
}
|
|
1482
1332
|
);
|
|
1483
1333
|
}
|
|
1484
|
-
function
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
testId
|
|
1334
|
+
function GoabGrid({
|
|
1335
|
+
gap,
|
|
1336
|
+
minChildWidth,
|
|
1337
|
+
mt,
|
|
1338
|
+
mr,
|
|
1339
|
+
mb,
|
|
1340
|
+
ml,
|
|
1341
|
+
testId,
|
|
1342
|
+
children
|
|
1494
1343
|
}) {
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
if (!el.current) {
|
|
1498
|
-
return;
|
|
1499
|
-
}
|
|
1500
|
-
const current = el.current;
|
|
1501
|
-
const listener = () => {
|
|
1502
|
-
onClose == null ? void 0 : onClose();
|
|
1503
|
-
};
|
|
1504
|
-
current.addEventListener("_close", listener);
|
|
1505
|
-
return () => {
|
|
1506
|
-
current.removeEventListener("_close", listener);
|
|
1507
|
-
};
|
|
1508
|
-
}, [el, onClose]);
|
|
1509
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1510
|
-
"goa-modal",
|
|
1344
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1345
|
+
"goa-grid",
|
|
1511
1346
|
{
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
calloutvariant: calloutVariant,
|
|
1347
|
+
gap,
|
|
1348
|
+
minchildwidth: minChildWidth,
|
|
1349
|
+
mt,
|
|
1350
|
+
mr,
|
|
1351
|
+
mb,
|
|
1352
|
+
ml,
|
|
1519
1353
|
testid: testId,
|
|
1520
|
-
children
|
|
1521
|
-
heading && typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
1522
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children: actions }),
|
|
1523
|
-
children
|
|
1524
|
-
]
|
|
1354
|
+
children
|
|
1525
1355
|
}
|
|
1526
1356
|
);
|
|
1527
1357
|
}
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1358
|
+
function GoabHeroBanner({
|
|
1359
|
+
heading,
|
|
1360
|
+
backgroundUrl,
|
|
1361
|
+
minHeight,
|
|
1531
1362
|
maxContentWidth,
|
|
1363
|
+
backgroundColor,
|
|
1364
|
+
textColor,
|
|
1532
1365
|
children,
|
|
1533
|
-
testId
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1366
|
+
testId
|
|
1367
|
+
}) {
|
|
1368
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1369
|
+
"goa-hero-banner",
|
|
1370
|
+
{
|
|
1371
|
+
heading,
|
|
1372
|
+
backgroundurl: backgroundUrl,
|
|
1373
|
+
minheight: minHeight,
|
|
1374
|
+
maxcontentwidth: maxContentWidth,
|
|
1375
|
+
backgroundcolor: backgroundColor,
|
|
1376
|
+
textcolor: textColor,
|
|
1377
|
+
testid: testId,
|
|
1378
|
+
children
|
|
1379
|
+
}
|
|
1380
|
+
);
|
|
1381
|
+
}
|
|
1382
|
+
function GoabHeroBannerActions({
|
|
1383
|
+
children
|
|
1384
|
+
}) {
|
|
1385
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children });
|
|
1386
|
+
}
|
|
1387
|
+
function GoabIconButton({
|
|
1388
|
+
variant = "color",
|
|
1389
|
+
size = "medium",
|
|
1390
|
+
disabled,
|
|
1391
|
+
onClick,
|
|
1392
|
+
actionArgs,
|
|
1393
|
+
actionArg,
|
|
1394
|
+
children,
|
|
1395
|
+
...rest
|
|
1396
|
+
}) {
|
|
1397
|
+
const ref = react.useRef(null);
|
|
1398
|
+
const _props = calendarDate.transformProps(
|
|
1399
|
+
{ variant, size, ...rest },
|
|
1400
|
+
calendarDate.lowercase
|
|
1401
|
+
);
|
|
1537
1402
|
react.useEffect(() => {
|
|
1538
|
-
if (!
|
|
1403
|
+
if (!ref.current) {
|
|
1539
1404
|
return;
|
|
1540
1405
|
}
|
|
1541
|
-
|
|
1406
|
+
if (!onClick) {
|
|
1407
|
+
return;
|
|
1408
|
+
}
|
|
1409
|
+
const current = ref.current;
|
|
1542
1410
|
const listener = () => {
|
|
1543
|
-
|
|
1411
|
+
onClick == null ? void 0 : onClick();
|
|
1544
1412
|
};
|
|
1545
|
-
current.addEventListener("
|
|
1413
|
+
current.addEventListener("_click", listener);
|
|
1546
1414
|
return () => {
|
|
1547
|
-
current.removeEventListener("
|
|
1415
|
+
current.removeEventListener("_click", listener);
|
|
1548
1416
|
};
|
|
1549
|
-
}, [
|
|
1417
|
+
}, [ref, onClick]);
|
|
1550
1418
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1551
|
-
"goa-
|
|
1419
|
+
"goa-icon-button",
|
|
1552
1420
|
{
|
|
1553
|
-
ref
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1421
|
+
ref,
|
|
1422
|
+
disabled: disabled ? "true" : void 0,
|
|
1423
|
+
"action-arg": actionArg,
|
|
1424
|
+
"action-args": JSON.stringify(actionArgs),
|
|
1425
|
+
..._props,
|
|
1558
1426
|
children
|
|
1559
1427
|
}
|
|
1560
1428
|
);
|
|
1561
|
-
};
|
|
1562
|
-
function GoabOneColumnLayout(props) {
|
|
1563
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-one-column-layout", { children: props.children });
|
|
1564
|
-
}
|
|
1565
|
-
function GoabPageBlock(props) {
|
|
1566
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-page-block", { width: props.width, testid: props.testId, children: props.children });
|
|
1567
1429
|
}
|
|
1568
|
-
function
|
|
1430
|
+
function GoabIcon({
|
|
1431
|
+
inverted,
|
|
1432
|
+
...rest
|
|
1433
|
+
}) {
|
|
1434
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1569
1435
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1570
|
-
"goa-
|
|
1436
|
+
"goa-icon",
|
|
1571
1437
|
{
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
mr: props.mr,
|
|
1575
|
-
mt: props.mt,
|
|
1576
|
-
mb: props.mb,
|
|
1577
|
-
children: props.children
|
|
1438
|
+
inverted: typeof inverted === "boolean" ? inverted ? "true" : void 0 : inverted,
|
|
1439
|
+
..._props
|
|
1578
1440
|
}
|
|
1579
1441
|
);
|
|
1580
1442
|
}
|
|
1581
|
-
function
|
|
1443
|
+
function GoabInput({
|
|
1444
|
+
variant = "goa",
|
|
1445
|
+
textAlign = "left",
|
|
1446
|
+
focused,
|
|
1447
|
+
disabled,
|
|
1448
|
+
readonly,
|
|
1449
|
+
error,
|
|
1450
|
+
leadingContent,
|
|
1451
|
+
trailingContent,
|
|
1452
|
+
onTrailingIconClick,
|
|
1453
|
+
onChange,
|
|
1454
|
+
onFocus,
|
|
1455
|
+
onBlur,
|
|
1456
|
+
onKeyPress,
|
|
1457
|
+
...rest
|
|
1458
|
+
}) {
|
|
1582
1459
|
const ref = react.useRef(null);
|
|
1460
|
+
const _props = calendarDate.transformProps({ variant, textalign: textAlign, ...rest }, calendarDate.lowercase);
|
|
1583
1461
|
react.useEffect(() => {
|
|
1584
1462
|
if (!ref.current) {
|
|
1585
1463
|
return;
|
|
@@ -1587,807 +1465,929 @@ function GoabPagination({ onChange, ...props }) {
|
|
|
1587
1465
|
const current = ref.current;
|
|
1588
1466
|
const changeListener = (e) => {
|
|
1589
1467
|
const detail = e.detail;
|
|
1590
|
-
onChange(detail);
|
|
1468
|
+
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
1469
|
+
};
|
|
1470
|
+
const clickListener = () => {
|
|
1471
|
+
onTrailingIconClick == null ? void 0 : onTrailingIconClick();
|
|
1472
|
+
};
|
|
1473
|
+
const focusListener = (e) => {
|
|
1474
|
+
const detail = e.detail;
|
|
1475
|
+
onFocus == null ? void 0 : onFocus({ ...detail, event: e });
|
|
1476
|
+
};
|
|
1477
|
+
const blurListener = (e) => {
|
|
1478
|
+
const detail = e.detail;
|
|
1479
|
+
onBlur == null ? void 0 : onBlur({ ...detail, event: e });
|
|
1480
|
+
};
|
|
1481
|
+
const keypressListener = (e) => {
|
|
1482
|
+
const detail = e.detail;
|
|
1483
|
+
onKeyPress == null ? void 0 : onKeyPress({ ...detail, event: e });
|
|
1591
1484
|
};
|
|
1592
1485
|
current.addEventListener("_change", changeListener);
|
|
1486
|
+
current.addEventListener("_trailingIconClick", clickListener);
|
|
1487
|
+
current.addEventListener("_focus", focusListener);
|
|
1488
|
+
current.addEventListener("_blur", blurListener);
|
|
1489
|
+
current.addEventListener("_keyPress", keypressListener);
|
|
1593
1490
|
return () => {
|
|
1594
1491
|
current.removeEventListener("_change", changeListener);
|
|
1492
|
+
current.removeEventListener("_trailingIconClick", clickListener);
|
|
1493
|
+
current.removeEventListener("_focus", focusListener);
|
|
1494
|
+
current.removeEventListener("_blur", blurListener);
|
|
1495
|
+
current.removeEventListener("_keyPress", keypressListener);
|
|
1595
1496
|
};
|
|
1596
|
-
}, [ref, onChange]);
|
|
1597
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1598
|
-
"goa-pagination",
|
|
1599
|
-
{
|
|
1600
|
-
ref,
|
|
1601
|
-
itemcount: props.itemCount,
|
|
1602
|
-
perpagecount: props.perPageCount,
|
|
1603
|
-
pagenumber: props.pageNumber,
|
|
1604
|
-
variant: props.variant,
|
|
1605
|
-
mt: props.mt,
|
|
1606
|
-
mb: props.mb,
|
|
1607
|
-
ml: props.ml,
|
|
1608
|
-
mr: props.mr,
|
|
1609
|
-
testid: props.testId
|
|
1610
|
-
}
|
|
1611
|
-
);
|
|
1612
|
-
}
|
|
1613
|
-
function GoabPopover({
|
|
1614
|
-
target,
|
|
1615
|
-
padded,
|
|
1616
|
-
relative,
|
|
1617
|
-
children,
|
|
1618
|
-
...rest
|
|
1619
|
-
}) {
|
|
1620
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
1497
|
+
}, [ref, onChange, onTrailingIconClick, onFocus, onBlur, onKeyPress]);
|
|
1621
1498
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1622
|
-
"goa-
|
|
1499
|
+
"goa-input",
|
|
1623
1500
|
{
|
|
1624
|
-
|
|
1625
|
-
relative: relative ? "true" : void 0,
|
|
1501
|
+
ref,
|
|
1626
1502
|
..._props,
|
|
1503
|
+
focused: focused ? "true" : void 0,
|
|
1504
|
+
disabled: disabled ? "true" : void 0,
|
|
1505
|
+
readonly: readonly ? "true" : void 0,
|
|
1506
|
+
error: error ? "true" : void 0,
|
|
1507
|
+
handletrailingiconclick: onTrailingIconClick ? "true" : "false",
|
|
1627
1508
|
children: [
|
|
1628
|
-
children,
|
|
1629
|
-
|
|
1509
|
+
leadingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "leadingContent", children: leadingContent }),
|
|
1510
|
+
trailingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "trailingContent", children: trailingContent })
|
|
1630
1511
|
]
|
|
1631
1512
|
}
|
|
1632
1513
|
);
|
|
1633
1514
|
}
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
width,
|
|
1639
|
-
actions,
|
|
1640
|
-
children,
|
|
1641
|
-
onClose
|
|
1642
|
-
}) {
|
|
1643
|
-
const el = react.useRef(null);
|
|
1644
|
-
react.useEffect(() => {
|
|
1645
|
-
const elCurrent = el == null ? void 0 : el.current;
|
|
1646
|
-
if (!elCurrent || !onClose) {
|
|
1515
|
+
const onDateChangeHandler = (onChange) => {
|
|
1516
|
+
return ({ name, value, event }) => {
|
|
1517
|
+
if (!value) {
|
|
1518
|
+
onChange == null ? void 0 : onChange({ name, value: "", event });
|
|
1647
1519
|
return;
|
|
1648
1520
|
}
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1521
|
+
if (typeof value === "string" && calendarDate.isValid(new Date(value))) {
|
|
1522
|
+
onChange == null ? void 0 : onChange({ name, value: calendarDate.parseISO(value), event });
|
|
1523
|
+
return;
|
|
1524
|
+
}
|
|
1525
|
+
if (calendarDate.isValid(value)) {
|
|
1526
|
+
onChange == null ? void 0 : onChange({ name, value, event });
|
|
1527
|
+
return;
|
|
1528
|
+
}
|
|
1529
|
+
};
|
|
1530
|
+
};
|
|
1531
|
+
const onTimeChangeHandler = (onChange) => {
|
|
1532
|
+
return ({ name, value, event }) => {
|
|
1533
|
+
if (!value) {
|
|
1534
|
+
onChange == null ? void 0 : onChange({ name, value: "", event });
|
|
1535
|
+
return;
|
|
1536
|
+
}
|
|
1537
|
+
onChange == null ? void 0 : onChange({ name, value, event });
|
|
1538
|
+
};
|
|
1539
|
+
};
|
|
1540
|
+
function toString(value, tmpl = "yyyy-MM-dd") {
|
|
1541
|
+
if (!value) {
|
|
1542
|
+
return "";
|
|
1543
|
+
}
|
|
1544
|
+
if (typeof value === "string") {
|
|
1545
|
+
return calendarDate.format(calendarDate.parseISO(value), tmpl);
|
|
1546
|
+
}
|
|
1547
|
+
if (value.toISOString() === (/* @__PURE__ */ new Date(0)).toISOString()) {
|
|
1548
|
+
return "";
|
|
1549
|
+
}
|
|
1550
|
+
return calendarDate.format(value, tmpl);
|
|
1551
|
+
}
|
|
1552
|
+
function GoabInputText(props) {
|
|
1553
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "text" });
|
|
1554
|
+
}
|
|
1555
|
+
function GoabInputPassword(props) {
|
|
1556
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "password" });
|
|
1557
|
+
}
|
|
1558
|
+
function GoabInputDate({
|
|
1559
|
+
value,
|
|
1560
|
+
min = "",
|
|
1561
|
+
max = "",
|
|
1562
|
+
...props
|
|
1563
|
+
}) {
|
|
1564
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1565
|
+
GoabInput,
|
|
1566
|
+
{
|
|
1567
|
+
...props,
|
|
1568
|
+
type: "date",
|
|
1569
|
+
onChange: onDateChangeHandler(props.onChange),
|
|
1570
|
+
min: toString(min),
|
|
1571
|
+
max: toString(max),
|
|
1572
|
+
value: toString(value)
|
|
1667
1573
|
}
|
|
1668
1574
|
);
|
|
1669
1575
|
}
|
|
1670
|
-
function
|
|
1671
|
-
name,
|
|
1672
|
-
label,
|
|
1576
|
+
function GoabInputTime({
|
|
1673
1577
|
value,
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
maxWidth,
|
|
1678
|
-
disabled,
|
|
1679
|
-
checked,
|
|
1680
|
-
error,
|
|
1681
|
-
ariaLabel,
|
|
1682
|
-
children,
|
|
1683
|
-
mt,
|
|
1684
|
-
mr,
|
|
1685
|
-
mb,
|
|
1686
|
-
ml
|
|
1578
|
+
min = "",
|
|
1579
|
+
max = "",
|
|
1580
|
+
...props
|
|
1687
1581
|
}) {
|
|
1688
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1689
|
-
|
|
1582
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1583
|
+
GoabInput,
|
|
1690
1584
|
{
|
|
1691
|
-
|
|
1692
|
-
|
|
1585
|
+
...props,
|
|
1586
|
+
onChange: onTimeChangeHandler(props.onChange),
|
|
1693
1587
|
value,
|
|
1694
|
-
|
|
1695
|
-
maxwidth: maxWidth,
|
|
1696
|
-
error: error ? "true" : void 0,
|
|
1697
|
-
disabled: disabled ? "true" : void 0,
|
|
1698
|
-
checked: checked ? "true" : void 0,
|
|
1699
|
-
arialabel: ariaLabel,
|
|
1700
|
-
revealarialabel: revealAriaLabel,
|
|
1701
|
-
mt,
|
|
1702
|
-
mr,
|
|
1703
|
-
mb,
|
|
1704
|
-
ml,
|
|
1705
|
-
children: [
|
|
1706
|
-
description && typeof description !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "description", children: description }),
|
|
1707
|
-
reveal && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "reveal", children: reveal }),
|
|
1708
|
-
children
|
|
1709
|
-
]
|
|
1588
|
+
type: "time"
|
|
1710
1589
|
}
|
|
1711
1590
|
);
|
|
1712
1591
|
}
|
|
1713
|
-
function
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
children,
|
|
1719
|
-
...rest
|
|
1592
|
+
function GoabInputDateTime({
|
|
1593
|
+
value,
|
|
1594
|
+
min = "",
|
|
1595
|
+
max = "",
|
|
1596
|
+
...props
|
|
1720
1597
|
}) {
|
|
1721
|
-
const el = react.useRef(null);
|
|
1722
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
1723
|
-
react.useEffect(() => {
|
|
1724
|
-
if (!el.current) return;
|
|
1725
|
-
const listener = (e) => {
|
|
1726
|
-
const detail = e.detail;
|
|
1727
|
-
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
1728
|
-
};
|
|
1729
|
-
const currentEl = el.current;
|
|
1730
|
-
if (onChange) {
|
|
1731
|
-
currentEl.addEventListener("_change", listener);
|
|
1732
|
-
}
|
|
1733
|
-
return () => {
|
|
1734
|
-
if (onChange) {
|
|
1735
|
-
currentEl.removeEventListener("_change", listener);
|
|
1736
|
-
}
|
|
1737
|
-
};
|
|
1738
|
-
}, [name, onChange]);
|
|
1739
1598
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1740
|
-
|
|
1599
|
+
GoabInput,
|
|
1741
1600
|
{
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
error: error ? "true" : void 0,
|
|
1747
|
-
children
|
|
1601
|
+
...props,
|
|
1602
|
+
onChange: onDateChangeHandler(props.onChange),
|
|
1603
|
+
value: toString(value, "yyyy-MM-dd'T'HH:mm"),
|
|
1604
|
+
type: "datetime-local"
|
|
1748
1605
|
}
|
|
1749
1606
|
);
|
|
1750
1607
|
}
|
|
1751
|
-
function
|
|
1608
|
+
function GoabInputEmail(props) {
|
|
1609
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "email" });
|
|
1610
|
+
}
|
|
1611
|
+
function GoabInputSearch(props) {
|
|
1612
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "search", trailingIcon: "search" });
|
|
1613
|
+
}
|
|
1614
|
+
function GoabInputUrl(props) {
|
|
1615
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "url" });
|
|
1616
|
+
}
|
|
1617
|
+
function GoabInputTel(props) {
|
|
1618
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "tel" });
|
|
1619
|
+
}
|
|
1620
|
+
function GoabInputFile(props) {
|
|
1752
1621
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1753
|
-
"
|
|
1622
|
+
"input",
|
|
1754
1623
|
{
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1624
|
+
id: props.id,
|
|
1625
|
+
name: props.name,
|
|
1626
|
+
type: "file",
|
|
1627
|
+
onChange: (e) => {
|
|
1628
|
+
var _a;
|
|
1629
|
+
return (_a = props.onChange) == null ? void 0 : _a.call(props, {
|
|
1630
|
+
name: e.target.name,
|
|
1631
|
+
value: e.target.value,
|
|
1632
|
+
event: e.nativeEvent
|
|
1633
|
+
});
|
|
1634
|
+
},
|
|
1635
|
+
style: { backgroundColor: "revert" }
|
|
1763
1636
|
}
|
|
1764
1637
|
);
|
|
1765
1638
|
}
|
|
1766
|
-
function
|
|
1767
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1768
|
-
props.children,
|
|
1769
|
-
props.meta && /* @__PURE__ */ jsxRuntime.jsx("span", { slot: "meta", children: props.meta })
|
|
1770
|
-
] });
|
|
1639
|
+
function GoabInputMonth(props) {
|
|
1640
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "month" });
|
|
1771
1641
|
}
|
|
1772
|
-
function
|
|
1773
|
-
|
|
1642
|
+
function GoabInputNumber({
|
|
1643
|
+
min = Number.MIN_VALUE,
|
|
1644
|
+
max = Number.MAX_VALUE,
|
|
1645
|
+
value,
|
|
1646
|
+
textAlign = "right",
|
|
1647
|
+
...props
|
|
1648
|
+
}) {
|
|
1649
|
+
const onNumberChange = ({ name, value: value2, event }) => {
|
|
1650
|
+
var _a;
|
|
1651
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), event });
|
|
1652
|
+
};
|
|
1653
|
+
const onFocus = ({ name, value: value2, event }) => {
|
|
1654
|
+
var _a;
|
|
1655
|
+
(_a = props.onFocus) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), event });
|
|
1656
|
+
};
|
|
1657
|
+
const onBlur = ({ name, value: value2, event }) => {
|
|
1658
|
+
var _a;
|
|
1659
|
+
(_a = props.onBlur) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), event });
|
|
1660
|
+
};
|
|
1661
|
+
const onKeyPress = ({ name, value: value2, key, event }) => {
|
|
1662
|
+
var _a;
|
|
1663
|
+
(_a = props.onKeyPress) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), key: parseInt(key), event });
|
|
1664
|
+
};
|
|
1665
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1666
|
+
GoabInput,
|
|
1667
|
+
{
|
|
1668
|
+
...props,
|
|
1669
|
+
onChange: onNumberChange,
|
|
1670
|
+
min: min == null ? void 0 : min.toString(),
|
|
1671
|
+
max: max == null ? void 0 : max.toString(),
|
|
1672
|
+
value: value == null ? void 0 : value.toString(),
|
|
1673
|
+
onFocus,
|
|
1674
|
+
onBlur,
|
|
1675
|
+
type: "number",
|
|
1676
|
+
onKeyPress,
|
|
1677
|
+
textAlign
|
|
1678
|
+
}
|
|
1679
|
+
);
|
|
1774
1680
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
ml
|
|
1681
|
+
function GoabInputRange(props) {
|
|
1682
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoabInput, { ...props, type: "range" });
|
|
1683
|
+
}
|
|
1684
|
+
const GoabLinearProgress = ({
|
|
1685
|
+
progress,
|
|
1686
|
+
percentVisibility,
|
|
1687
|
+
ariaLabel,
|
|
1688
|
+
ariaLabelledBy,
|
|
1689
|
+
testId
|
|
1785
1690
|
}) => {
|
|
1786
1691
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1787
|
-
"goa-
|
|
1692
|
+
"goa-linear-progress",
|
|
1788
1693
|
{
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
mt,
|
|
1794
|
-
mr,
|
|
1795
|
-
mb,
|
|
1796
|
-
ml,
|
|
1694
|
+
progress,
|
|
1695
|
+
"percent-visibility": percentVisibility,
|
|
1696
|
+
"aria-label": ariaLabel,
|
|
1697
|
+
"aria-labelledby": ariaLabelledBy,
|
|
1797
1698
|
testid: testId
|
|
1798
1699
|
}
|
|
1799
1700
|
);
|
|
1800
1701
|
};
|
|
1801
|
-
function
|
|
1702
|
+
function GoabLink({
|
|
1703
|
+
actionArgs,
|
|
1704
|
+
actionArg,
|
|
1705
|
+
children,
|
|
1706
|
+
...rest
|
|
1707
|
+
}) {
|
|
1708
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
1802
1709
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1803
|
-
"goa-
|
|
1710
|
+
"goa-link",
|
|
1804
1711
|
{
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1712
|
+
"action-arg": actionArg,
|
|
1713
|
+
"action-args": JSON.stringify(actionArgs),
|
|
1714
|
+
..._props,
|
|
1715
|
+
children
|
|
1808
1716
|
}
|
|
1809
1717
|
);
|
|
1810
1718
|
}
|
|
1811
|
-
function
|
|
1719
|
+
function GoALinkButton({
|
|
1720
|
+
type = "primary",
|
|
1721
|
+
children,
|
|
1722
|
+
...rest
|
|
1723
|
+
}) {
|
|
1724
|
+
const _props = calendarDate.transformProps(
|
|
1725
|
+
{ type, ...rest },
|
|
1726
|
+
calendarDate.lowercase
|
|
1727
|
+
);
|
|
1728
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-link-button", { ..._props, children });
|
|
1729
|
+
}
|
|
1730
|
+
function GoabMenuButton({
|
|
1731
|
+
type = "primary",
|
|
1732
|
+
testId,
|
|
1733
|
+
onAction,
|
|
1734
|
+
children,
|
|
1735
|
+
...rest
|
|
1736
|
+
}) {
|
|
1737
|
+
const el = react.useRef(null);
|
|
1738
|
+
const _props = calendarDate.transformProps(
|
|
1739
|
+
{ type, testid: testId, ...rest },
|
|
1740
|
+
calendarDate.kebab
|
|
1741
|
+
);
|
|
1742
|
+
react.useEffect(() => {
|
|
1743
|
+
if (!el.current) {
|
|
1744
|
+
return;
|
|
1745
|
+
}
|
|
1746
|
+
if (!onAction) {
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
const current = el.current;
|
|
1750
|
+
const listener = (e) => {
|
|
1751
|
+
const detail = e.detail;
|
|
1752
|
+
onAction == null ? void 0 : onAction(detail);
|
|
1753
|
+
};
|
|
1754
|
+
current.addEventListener("_action", listener);
|
|
1755
|
+
return () => {
|
|
1756
|
+
current.removeEventListener("_action", listener);
|
|
1757
|
+
};
|
|
1758
|
+
}, [el, onAction]);
|
|
1759
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-menu-button", { ..._props, ref: el, children });
|
|
1760
|
+
}
|
|
1761
|
+
function GoabMenuAction(props) {
|
|
1762
|
+
const _props = calendarDate.transformProps(props, calendarDate.lowercase);
|
|
1763
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-menu-action", { ..._props });
|
|
1764
|
+
}
|
|
1765
|
+
function GoabMicrositeHeader({
|
|
1812
1766
|
type,
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1767
|
+
version,
|
|
1768
|
+
feedbackUrl,
|
|
1769
|
+
maxContentWidth,
|
|
1770
|
+
feedbackUrlTarget,
|
|
1771
|
+
headerUrlTarget,
|
|
1772
|
+
testId,
|
|
1773
|
+
onFeedbackClick
|
|
1817
1774
|
}) {
|
|
1818
|
-
|
|
1819
|
-
"goa-spinner",
|
|
1820
|
-
{
|
|
1821
|
-
type,
|
|
1822
|
-
size,
|
|
1823
|
-
progress,
|
|
1824
|
-
invert: invert ? "true" : void 0,
|
|
1825
|
-
testid: testId
|
|
1826
|
-
}
|
|
1827
|
-
);
|
|
1828
|
-
}
|
|
1829
|
-
function GoabTable({ onSort, ...props }) {
|
|
1830
|
-
const ref = react.useRef(null);
|
|
1775
|
+
const el = react.useRef(null);
|
|
1831
1776
|
react.useEffect(() => {
|
|
1832
|
-
if (!
|
|
1777
|
+
if (!el.current) {
|
|
1833
1778
|
return;
|
|
1834
1779
|
}
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1780
|
+
if (!onFeedbackClick) {
|
|
1781
|
+
return;
|
|
1782
|
+
}
|
|
1783
|
+
const current = el.current;
|
|
1784
|
+
const listener = () => {
|
|
1785
|
+
onFeedbackClick();
|
|
1839
1786
|
};
|
|
1840
|
-
current.addEventListener("
|
|
1787
|
+
current.addEventListener("_feedbackClick", listener);
|
|
1841
1788
|
return () => {
|
|
1842
|
-
current.removeEventListener("
|
|
1789
|
+
current.removeEventListener("_feedbackClick", listener);
|
|
1843
1790
|
};
|
|
1844
|
-
}, [
|
|
1791
|
+
}, [el, onFeedbackClick]);
|
|
1845
1792
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1846
|
-
"goa-
|
|
1793
|
+
"goa-microsite-header",
|
|
1847
1794
|
{
|
|
1848
|
-
ref,
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1795
|
+
ref: el,
|
|
1796
|
+
type,
|
|
1797
|
+
version: typeof version === "string" ? version : void 0,
|
|
1798
|
+
feedbackurl: feedbackUrl,
|
|
1799
|
+
testid: testId,
|
|
1800
|
+
maxcontentwidth: maxContentWidth,
|
|
1801
|
+
feedbackurltarget: feedbackUrlTarget,
|
|
1802
|
+
headerurltarget: headerUrlTarget,
|
|
1803
|
+
hasfeedbackhandler: onFeedbackClick ? "true" : "false",
|
|
1804
|
+
children: version && typeof version !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "version", children: version })
|
|
1857
1805
|
}
|
|
1858
1806
|
);
|
|
1859
1807
|
}
|
|
1860
|
-
function
|
|
1861
|
-
|
|
1862
|
-
...rest
|
|
1863
|
-
}) {
|
|
1864
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
1865
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-table-sort-header", { ..._props, children });
|
|
1866
|
-
}
|
|
1867
|
-
function GoabTabs({
|
|
1868
|
-
initialTab,
|
|
1808
|
+
function GoabModal({
|
|
1809
|
+
heading,
|
|
1869
1810
|
children,
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1811
|
+
maxWidth,
|
|
1812
|
+
open,
|
|
1813
|
+
actions,
|
|
1814
|
+
transition,
|
|
1815
|
+
calloutVariant,
|
|
1816
|
+
onClose,
|
|
1817
|
+
testId
|
|
1873
1818
|
}) {
|
|
1874
|
-
const
|
|
1819
|
+
const el = react.useRef(null);
|
|
1875
1820
|
react.useEffect(() => {
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
const handler = (event) => {
|
|
1879
|
-
const detail = event.detail;
|
|
1880
|
-
onChange(detail);
|
|
1881
|
-
};
|
|
1882
|
-
element.addEventListener("_change", handler);
|
|
1883
|
-
return () => {
|
|
1884
|
-
element.removeEventListener("_change", handler);
|
|
1885
|
-
};
|
|
1821
|
+
if (!el.current) {
|
|
1822
|
+
return;
|
|
1886
1823
|
}
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1824
|
+
const current = el.current;
|
|
1825
|
+
const listener = () => {
|
|
1826
|
+
onClose == null ? void 0 : onClose();
|
|
1827
|
+
};
|
|
1828
|
+
current.addEventListener("_close", listener);
|
|
1829
|
+
return () => {
|
|
1830
|
+
current.removeEventListener("_close", listener);
|
|
1831
|
+
};
|
|
1832
|
+
}, [el, onClose]);
|
|
1891
1833
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1892
|
-
"goa-
|
|
1834
|
+
"goa-modal",
|
|
1893
1835
|
{
|
|
1894
|
-
|
|
1895
|
-
|
|
1836
|
+
ref: el,
|
|
1837
|
+
open: open ? "true" : void 0,
|
|
1838
|
+
closable: onClose ? "true" : "false",
|
|
1896
1839
|
heading: typeof heading === "string" ? heading : void 0,
|
|
1840
|
+
maxwidth: maxWidth,
|
|
1841
|
+
transition,
|
|
1842
|
+
calloutvariant: calloutVariant,
|
|
1843
|
+
testid: testId,
|
|
1897
1844
|
children: [
|
|
1898
|
-
typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("
|
|
1845
|
+
heading && typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
1846
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children: actions }),
|
|
1899
1847
|
children
|
|
1900
1848
|
]
|
|
1901
1849
|
}
|
|
1902
1850
|
);
|
|
1903
1851
|
}
|
|
1904
|
-
const
|
|
1905
|
-
|
|
1906
|
-
|
|
1852
|
+
const GoabNotification = ({
|
|
1853
|
+
type = "information",
|
|
1854
|
+
ariaLive,
|
|
1855
|
+
maxContentWidth,
|
|
1856
|
+
children,
|
|
1907
1857
|
testId,
|
|
1908
|
-
|
|
1858
|
+
onDismiss
|
|
1909
1859
|
}) => {
|
|
1910
1860
|
const el = react.useRef(null);
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1861
|
+
react.useEffect(() => {
|
|
1862
|
+
if (!el.current) {
|
|
1863
|
+
return;
|
|
1864
|
+
}
|
|
1865
|
+
const current = el.current;
|
|
1866
|
+
const listener = () => {
|
|
1867
|
+
onDismiss == null ? void 0 : onDismiss();
|
|
1868
|
+
};
|
|
1869
|
+
current.addEventListener("_dismiss", listener);
|
|
1870
|
+
return () => {
|
|
1871
|
+
current.removeEventListener("_dismiss", listener);
|
|
1872
|
+
};
|
|
1873
|
+
}, [el, onDismiss]);
|
|
1915
1874
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1916
|
-
"goa-
|
|
1875
|
+
"goa-notification",
|
|
1917
1876
|
{
|
|
1918
1877
|
ref: el,
|
|
1919
|
-
|
|
1920
|
-
testid: testId
|
|
1878
|
+
type,
|
|
1879
|
+
testid: testId,
|
|
1880
|
+
maxcontentwidth: maxContentWidth,
|
|
1881
|
+
arialive: ariaLive,
|
|
1882
|
+
children
|
|
1921
1883
|
}
|
|
1922
1884
|
);
|
|
1923
1885
|
};
|
|
1924
|
-
function
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
}
|
|
1930
|
-
|
|
1886
|
+
function GoabOneColumnLayout(props) {
|
|
1887
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-one-column-layout", { children: props.children });
|
|
1888
|
+
}
|
|
1889
|
+
function GoabPageBlock(props) {
|
|
1890
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-page-block", { width: props.width, testid: props.testId, children: props.children });
|
|
1891
|
+
}
|
|
1892
|
+
function GoabPages(props) {
|
|
1931
1893
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1932
|
-
"goa-
|
|
1894
|
+
"goa-pages",
|
|
1933
1895
|
{
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1896
|
+
current: props.current,
|
|
1897
|
+
ml: props.ml,
|
|
1898
|
+
mr: props.mr,
|
|
1899
|
+
mt: props.mt,
|
|
1900
|
+
mb: props.mb,
|
|
1901
|
+
children: props.children
|
|
1937
1902
|
}
|
|
1938
1903
|
);
|
|
1939
1904
|
}
|
|
1940
|
-
function
|
|
1941
|
-
|
|
1942
|
-
disabled,
|
|
1943
|
-
error,
|
|
1944
|
-
onChange,
|
|
1945
|
-
onKeyPress,
|
|
1946
|
-
onBlur,
|
|
1947
|
-
...rest
|
|
1948
|
-
}) {
|
|
1949
|
-
const el = react.useRef(null);
|
|
1950
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
1905
|
+
function GoabPagination({ onChange, ...props }) {
|
|
1906
|
+
const ref = react.useRef(null);
|
|
1951
1907
|
react.useEffect(() => {
|
|
1952
|
-
if (!
|
|
1908
|
+
if (!ref.current) {
|
|
1953
1909
|
return;
|
|
1954
1910
|
}
|
|
1955
|
-
const current =
|
|
1911
|
+
const current = ref.current;
|
|
1956
1912
|
const changeListener = (e) => {
|
|
1957
1913
|
const detail = e.detail;
|
|
1958
|
-
onChange
|
|
1959
|
-
};
|
|
1960
|
-
const keypressListener = (e) => {
|
|
1961
|
-
const detail = e.detail;
|
|
1962
|
-
onKeyPress == null ? void 0 : onKeyPress({ ...detail, event: e });
|
|
1963
|
-
};
|
|
1964
|
-
const blurListener = (e) => {
|
|
1965
|
-
const detail = e.detail;
|
|
1966
|
-
onBlur == null ? void 0 : onBlur({ ...detail, event: e });
|
|
1914
|
+
onChange(detail);
|
|
1967
1915
|
};
|
|
1968
1916
|
current.addEventListener("_change", changeListener);
|
|
1969
|
-
current.addEventListener("_keyPress", keypressListener);
|
|
1970
|
-
current.addEventListener("_blur", blurListener);
|
|
1971
1917
|
return () => {
|
|
1972
1918
|
current.removeEventListener("_change", changeListener);
|
|
1973
|
-
current.removeEventListener("_keyPress", keypressListener);
|
|
1974
|
-
current.removeEventListener("_blur", blurListener);
|
|
1975
1919
|
};
|
|
1976
|
-
}, [
|
|
1977
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1978
|
-
"goa-
|
|
1979
|
-
{
|
|
1980
|
-
ref
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
"goa-three-column-layout",
|
|
1991
|
-
{
|
|
1992
|
-
leftcolumnwidth: props.leftColumnWidth,
|
|
1993
|
-
rightcolumnwidth: props.rightColumnWidth,
|
|
1994
|
-
maxcontentwidth: props.maxContentWidth,
|
|
1995
|
-
children: [
|
|
1996
|
-
props.header && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "header", children: props.header }),
|
|
1997
|
-
props.nav && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "nav", children: props.nav }),
|
|
1998
|
-
props.sidebar && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "side-menu", children: props.sidebar }),
|
|
1999
|
-
props.sideMenu && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "side-menu", children: props.sideMenu }),
|
|
2000
|
-
props.children,
|
|
2001
|
-
props.footer && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "footer", children: props.footer })
|
|
2002
|
-
]
|
|
1920
|
+
}, [ref, onChange]);
|
|
1921
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1922
|
+
"goa-pagination",
|
|
1923
|
+
{
|
|
1924
|
+
ref,
|
|
1925
|
+
itemcount: props.itemCount,
|
|
1926
|
+
perpagecount: props.perPageCount,
|
|
1927
|
+
pagenumber: props.pageNumber,
|
|
1928
|
+
variant: props.variant,
|
|
1929
|
+
mt: props.mt,
|
|
1930
|
+
mb: props.mb,
|
|
1931
|
+
ml: props.ml,
|
|
1932
|
+
mr: props.mr,
|
|
1933
|
+
testid: props.testId
|
|
2003
1934
|
}
|
|
2004
1935
|
);
|
|
2005
1936
|
}
|
|
2006
|
-
function
|
|
2007
|
-
|
|
1937
|
+
function GoabPopover({
|
|
1938
|
+
target,
|
|
1939
|
+
padded,
|
|
1940
|
+
relative,
|
|
2008
1941
|
children,
|
|
2009
1942
|
...rest
|
|
2010
1943
|
}) {
|
|
2011
|
-
const _props =
|
|
2012
|
-
const isStringContent = typeof content === "string";
|
|
1944
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
2013
1945
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2014
|
-
"goa-
|
|
1946
|
+
"goa-popover",
|
|
2015
1947
|
{
|
|
2016
|
-
|
|
1948
|
+
padded: typeof padded === "undefined" ? void 0 : padded ? "true" : "false",
|
|
1949
|
+
relative: relative ? "true" : void 0,
|
|
2017
1950
|
..._props,
|
|
2018
1951
|
children: [
|
|
2019
|
-
|
|
2020
|
-
children
|
|
2021
|
-
]
|
|
2022
|
-
}
|
|
2023
|
-
);
|
|
2024
|
-
}
|
|
2025
|
-
function GoabTwoColumnLayout(props) {
|
|
2026
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2027
|
-
"goa-two-column-layout",
|
|
2028
|
-
{
|
|
2029
|
-
navcolumnwidth: props.navColumnWidth,
|
|
2030
|
-
maxcontentwidth: props.maxContentWidth,
|
|
2031
|
-
children: [
|
|
2032
|
-
props.header && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "header", children: props.header }),
|
|
2033
|
-
props.nav && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "nav", children: props.nav }),
|
|
2034
|
-
props.children,
|
|
2035
|
-
props.footer && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "footer", children: props.footer })
|
|
1952
|
+
children,
|
|
1953
|
+
target && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "target", children: target })
|
|
2036
1954
|
]
|
|
2037
1955
|
}
|
|
2038
1956
|
);
|
|
2039
1957
|
}
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
1958
|
+
function GoabPushDrawer({
|
|
1959
|
+
testid,
|
|
1960
|
+
open,
|
|
1961
|
+
heading,
|
|
1962
|
+
width,
|
|
1963
|
+
actions,
|
|
1964
|
+
children,
|
|
1965
|
+
onClose
|
|
1966
|
+
}) {
|
|
2046
1967
|
const el = react.useRef(null);
|
|
2047
|
-
const _props = parseISO.transformProps(
|
|
2048
|
-
{ icontheme: iconTheme, ...rest },
|
|
2049
|
-
parseISO.lowercase
|
|
2050
|
-
);
|
|
2051
1968
|
react.useEffect(() => {
|
|
2052
|
-
|
|
2053
|
-
if (!
|
|
2054
|
-
|
|
2055
|
-
|
|
1969
|
+
const elCurrent = el == null ? void 0 : el.current;
|
|
1970
|
+
if (!elCurrent || !onClose) {
|
|
1971
|
+
return;
|
|
1972
|
+
}
|
|
1973
|
+
elCurrent.addEventListener("_close", onClose);
|
|
2056
1974
|
return () => {
|
|
2057
|
-
|
|
1975
|
+
elCurrent.removeEventListener("_close", onClose);
|
|
2058
1976
|
};
|
|
2059
|
-
}, [el,
|
|
2060
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
2061
|
-
"goa-
|
|
1977
|
+
}, [el, onClose]);
|
|
1978
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1979
|
+
"goa-push-drawer",
|
|
2062
1980
|
{
|
|
2063
1981
|
ref: el,
|
|
2064
|
-
|
|
2065
|
-
|
|
1982
|
+
testid,
|
|
1983
|
+
open: open ? true : void 0,
|
|
1984
|
+
heading: typeof heading === "string" ? heading : void 0,
|
|
1985
|
+
width,
|
|
1986
|
+
children: [
|
|
1987
|
+
heading && typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
1988
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children: actions }),
|
|
1989
|
+
children
|
|
1990
|
+
]
|
|
2066
1991
|
}
|
|
2067
1992
|
);
|
|
2068
|
-
};
|
|
2069
|
-
function dispatch(el, eventName, detail, opts) {
|
|
2070
|
-
if (!el) {
|
|
2071
|
-
console.error("dispatch element is null");
|
|
2072
|
-
return;
|
|
2073
|
-
}
|
|
2074
|
-
el.dispatchEvent(
|
|
2075
|
-
new CustomEvent(eventName, {
|
|
2076
|
-
composed: true,
|
|
2077
|
-
bubbles: opts == null ? void 0 : opts.bubbles,
|
|
2078
|
-
detail
|
|
2079
|
-
})
|
|
2080
|
-
);
|
|
2081
|
-
}
|
|
2082
|
-
function relay(el, eventName, data, opts) {
|
|
2083
|
-
if (!el) {
|
|
2084
|
-
console.error("dispatch element is null");
|
|
2085
|
-
return;
|
|
2086
|
-
}
|
|
2087
|
-
el.dispatchEvent(
|
|
2088
|
-
new CustomEvent("msg", {
|
|
2089
|
-
composed: true,
|
|
2090
|
-
bubbles: opts == null ? void 0 : opts.bubbles,
|
|
2091
|
-
detail: {
|
|
2092
|
-
action: eventName,
|
|
2093
|
-
data
|
|
2094
|
-
}
|
|
2095
|
-
})
|
|
2096
|
-
);
|
|
2097
1993
|
}
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
updateListState(e) {
|
|
2139
|
-
const detail = e.detail;
|
|
2140
|
-
if (!Array.isArray(detail.data)) {
|
|
2141
|
-
return;
|
|
2142
|
-
}
|
|
2143
|
-
this.state = detail.data;
|
|
2144
|
-
}
|
|
2145
|
-
updateObjectState(e) {
|
|
2146
|
-
var _a, _b;
|
|
2147
|
-
if (Array.isArray(this.state)) {
|
|
2148
|
-
return;
|
|
2149
|
-
}
|
|
2150
|
-
const detail = e.detail;
|
|
2151
|
-
if (detail.type === "list") {
|
|
2152
|
-
this.state = {
|
|
2153
|
-
...this.state,
|
|
2154
|
-
form: { ...((_a = this.state) == null ? void 0 : _a.form) || {}, [detail.id]: detail.data }
|
|
2155
|
-
};
|
|
2156
|
-
} else {
|
|
2157
|
-
this.state = {
|
|
2158
|
-
...this.state,
|
|
2159
|
-
...detail.data,
|
|
2160
|
-
form: { ...((_b = this.state) == null ? void 0 : _b.form) || {}, ...detail.data.form },
|
|
2161
|
-
history: detail.data.history
|
|
2162
|
-
};
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
getStateList() {
|
|
2166
|
-
if (!this.state) {
|
|
2167
|
-
return [];
|
|
2168
|
-
}
|
|
2169
|
-
if (!Array.isArray(this.state)) {
|
|
2170
|
-
console.warn(
|
|
2171
|
-
"Utils:getStateList: unable to update the state of a non-multi form type",
|
|
2172
|
-
this.state
|
|
2173
|
-
);
|
|
2174
|
-
return [];
|
|
2175
|
-
}
|
|
2176
|
-
if (this.state.length === 0) {
|
|
2177
|
-
return [];
|
|
2178
|
-
}
|
|
2179
|
-
return this.state.map((s) => {
|
|
2180
|
-
return Object.values(s.form).filter((item) => {
|
|
2181
|
-
var _a;
|
|
2182
|
-
return ((_a = item == null ? void 0 : item.data) == null ? void 0 : _a.type) === "details";
|
|
2183
|
-
}).map((item) => {
|
|
2184
|
-
var _a;
|
|
2185
|
-
return item.data.type === "details" && ((_a = item.data) == null ? void 0 : _a.fieldsets) || {};
|
|
2186
|
-
}).reduce(
|
|
2187
|
-
(acc, item) => {
|
|
2188
|
-
for (const [key, value] of Object.entries(item)) {
|
|
2189
|
-
acc[key] = value.value;
|
|
2190
|
-
}
|
|
2191
|
-
return acc;
|
|
2192
|
-
},
|
|
2193
|
-
{}
|
|
2194
|
-
);
|
|
2195
|
-
});
|
|
2196
|
-
}
|
|
2197
|
-
// getStateItems(group: string): Record<string, FieldsetItemState>[] {
|
|
2198
|
-
// if (Array.isArray(this.state)) {
|
|
2199
|
-
// console.error(
|
|
2200
|
-
// "Utils:getStateItems: unable to update the state of a multi form type",
|
|
2201
|
-
// );
|
|
2202
|
-
// return [];
|
|
2203
|
-
// }
|
|
2204
|
-
// if (!this.state) {
|
|
2205
|
-
// console.error("Utils:getStateItems: state has not yet been set");
|
|
2206
|
-
// return [];
|
|
2207
|
-
// }
|
|
2208
|
-
//
|
|
2209
|
-
// const data = this.state.form[group].data;
|
|
2210
|
-
// if (data.type !== "list") {
|
|
2211
|
-
// return [];
|
|
2212
|
-
// }
|
|
2213
|
-
//
|
|
2214
|
-
// return data.items.;
|
|
2215
|
-
// }
|
|
2216
|
-
// Public method to allow for the retrieval of the state value
|
|
2217
|
-
getStateValue(group, key) {
|
|
2218
|
-
if (Array.isArray(this.state)) {
|
|
2219
|
-
console.error("getStateValue: unable to update the state of a multi form type");
|
|
2220
|
-
return "";
|
|
1994
|
+
function GoabRadioItem({
|
|
1995
|
+
name,
|
|
1996
|
+
label,
|
|
1997
|
+
value,
|
|
1998
|
+
description,
|
|
1999
|
+
reveal,
|
|
2000
|
+
revealAriaLabel,
|
|
2001
|
+
maxWidth,
|
|
2002
|
+
disabled,
|
|
2003
|
+
checked,
|
|
2004
|
+
error,
|
|
2005
|
+
ariaLabel,
|
|
2006
|
+
children,
|
|
2007
|
+
mt,
|
|
2008
|
+
mr,
|
|
2009
|
+
mb,
|
|
2010
|
+
ml
|
|
2011
|
+
}) {
|
|
2012
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2013
|
+
"goa-radio-item",
|
|
2014
|
+
{
|
|
2015
|
+
name,
|
|
2016
|
+
label,
|
|
2017
|
+
value,
|
|
2018
|
+
description: typeof description === "string" ? description : void 0,
|
|
2019
|
+
maxwidth: maxWidth,
|
|
2020
|
+
error: error ? "true" : void 0,
|
|
2021
|
+
disabled: disabled ? "true" : void 0,
|
|
2022
|
+
checked: checked ? "true" : void 0,
|
|
2023
|
+
arialabel: ariaLabel,
|
|
2024
|
+
revealarialabel: revealAriaLabel,
|
|
2025
|
+
mt,
|
|
2026
|
+
mr,
|
|
2027
|
+
mb,
|
|
2028
|
+
ml,
|
|
2029
|
+
children: [
|
|
2030
|
+
description && typeof description !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "description", children: description }),
|
|
2031
|
+
reveal && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "reveal", children: reveal }),
|
|
2032
|
+
children
|
|
2033
|
+
]
|
|
2221
2034
|
}
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2035
|
+
);
|
|
2036
|
+
}
|
|
2037
|
+
function GoabRadioGroup({
|
|
2038
|
+
disabled,
|
|
2039
|
+
error,
|
|
2040
|
+
onChange,
|
|
2041
|
+
name,
|
|
2042
|
+
children,
|
|
2043
|
+
...rest
|
|
2044
|
+
}) {
|
|
2045
|
+
const el = react.useRef(null);
|
|
2046
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
2047
|
+
react.useEffect(() => {
|
|
2048
|
+
if (!el.current) return;
|
|
2049
|
+
const listener = (e) => {
|
|
2050
|
+
const detail = e.detail;
|
|
2051
|
+
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
2052
|
+
};
|
|
2053
|
+
const currentEl = el.current;
|
|
2054
|
+
if (onChange) {
|
|
2055
|
+
currentEl.addEventListener("_change", listener);
|
|
2225
2056
|
}
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2057
|
+
return () => {
|
|
2058
|
+
if (onChange) {
|
|
2059
|
+
currentEl.removeEventListener("_change", listener);
|
|
2060
|
+
}
|
|
2061
|
+
};
|
|
2062
|
+
}, [name, onChange]);
|
|
2063
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2064
|
+
"goa-radio-group",
|
|
2065
|
+
{
|
|
2066
|
+
ref: el,
|
|
2067
|
+
..._props,
|
|
2068
|
+
name,
|
|
2069
|
+
disabled: disabled ? "true" : void 0,
|
|
2070
|
+
error: error ? "true" : void 0,
|
|
2071
|
+
children
|
|
2229
2072
|
}
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2073
|
+
);
|
|
2074
|
+
}
|
|
2075
|
+
function GoabSideMenuGroup(props) {
|
|
2076
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2077
|
+
"goa-side-menu-group",
|
|
2078
|
+
{
|
|
2079
|
+
heading: props.heading,
|
|
2080
|
+
icon: props.icon,
|
|
2081
|
+
testid: props.testId,
|
|
2082
|
+
mt: props.mt,
|
|
2083
|
+
mr: props.mr,
|
|
2084
|
+
mb: props.mb,
|
|
2085
|
+
ml: props.ml,
|
|
2086
|
+
children: props.children
|
|
2237
2087
|
}
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2088
|
+
);
|
|
2089
|
+
}
|
|
2090
|
+
function GoabSideMenuHeading(props) {
|
|
2091
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("goa-side-menu-heading", { icon: props.icon, testid: props.testId, children: [
|
|
2092
|
+
props.children,
|
|
2093
|
+
props.meta && /* @__PURE__ */ jsxRuntime.jsx("span", { slot: "meta", children: props.meta })
|
|
2094
|
+
] });
|
|
2095
|
+
}
|
|
2096
|
+
function GoabSideMenu(props) {
|
|
2097
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", { testid: props.testId, children: props.children });
|
|
2098
|
+
}
|
|
2099
|
+
const GoabSkeleton = ({
|
|
2100
|
+
maxWidth,
|
|
2101
|
+
size,
|
|
2102
|
+
lineCount,
|
|
2103
|
+
type,
|
|
2104
|
+
testId,
|
|
2105
|
+
mt,
|
|
2106
|
+
mr,
|
|
2107
|
+
mb,
|
|
2108
|
+
ml
|
|
2109
|
+
}) => {
|
|
2110
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2111
|
+
"goa-skeleton",
|
|
2112
|
+
{
|
|
2113
|
+
maxwidth: maxWidth,
|
|
2114
|
+
linecount: lineCount,
|
|
2115
|
+
type,
|
|
2116
|
+
size,
|
|
2117
|
+
mt,
|
|
2118
|
+
mr,
|
|
2119
|
+
mb,
|
|
2120
|
+
ml,
|
|
2121
|
+
testid: testId
|
|
2248
2122
|
}
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2123
|
+
);
|
|
2124
|
+
};
|
|
2125
|
+
function GoabSpacer(props) {
|
|
2126
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2127
|
+
"goa-spacer",
|
|
2128
|
+
{
|
|
2129
|
+
hspacing: props.hSpacing,
|
|
2130
|
+
vspacing: props.vSpacing,
|
|
2131
|
+
testid: props.testId
|
|
2255
2132
|
}
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
validGroups[field] = true;
|
|
2274
|
-
passCount++;
|
|
2275
|
-
}
|
|
2133
|
+
);
|
|
2134
|
+
}
|
|
2135
|
+
function GoabSpinner({
|
|
2136
|
+
type,
|
|
2137
|
+
size,
|
|
2138
|
+
progress,
|
|
2139
|
+
invert,
|
|
2140
|
+
testId
|
|
2141
|
+
}) {
|
|
2142
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2143
|
+
"goa-spinner",
|
|
2144
|
+
{
|
|
2145
|
+
type,
|
|
2146
|
+
size,
|
|
2147
|
+
progress,
|
|
2148
|
+
invert: invert ? "true" : void 0,
|
|
2149
|
+
testid: testId
|
|
2276
2150
|
}
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
relay(this._formRef, "external::alter:state", {
|
|
2284
|
-
index,
|
|
2285
|
-
operation: "remove"
|
|
2286
|
-
});
|
|
2287
|
-
}
|
|
2288
|
-
/**
|
|
2289
|
-
* Completes the form and triggers the onComplete callback.
|
|
2290
|
-
* This method should be used when you want to complete a form without navigating to a summary page.
|
|
2291
|
-
*
|
|
2292
|
-
* @important Developers must validate the form before calling this method.
|
|
2293
|
-
*
|
|
2294
|
-
* @example
|
|
2295
|
-
* // Validate first, then complete
|
|
2296
|
-
* const [isValid] = this.validate(e, "firstName", [
|
|
2297
|
-
* requiredValidator("First name is required.")
|
|
2298
|
-
* ]);
|
|
2299
|
-
* if (isValid) {
|
|
2300
|
-
* this.complete();
|
|
2301
|
-
* }
|
|
2302
|
-
* @returns void
|
|
2303
|
-
*/
|
|
2304
|
-
complete() {
|
|
2305
|
-
if (!this._formRef) {
|
|
2306
|
-
console.error("complete: form ref is not set");
|
|
2151
|
+
);
|
|
2152
|
+
}
|
|
2153
|
+
function GoabTable({ onSort, ...props }) {
|
|
2154
|
+
const ref = react.useRef(null);
|
|
2155
|
+
react.useEffect(() => {
|
|
2156
|
+
if (!ref.current) {
|
|
2307
2157
|
return;
|
|
2308
2158
|
}
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2159
|
+
const current = ref.current;
|
|
2160
|
+
const sortListener = (e) => {
|
|
2161
|
+
const detail = e.detail;
|
|
2162
|
+
onSort == null ? void 0 : onSort(detail);
|
|
2163
|
+
};
|
|
2164
|
+
current.addEventListener("_sort", sortListener);
|
|
2165
|
+
return () => {
|
|
2166
|
+
current.removeEventListener("_sort", sortListener);
|
|
2167
|
+
};
|
|
2168
|
+
}, [ref, onSort]);
|
|
2169
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2170
|
+
"goa-table",
|
|
2171
|
+
{
|
|
2172
|
+
ref,
|
|
2173
|
+
width: props.width,
|
|
2174
|
+
variant: props.variant,
|
|
2175
|
+
testid: props.testId,
|
|
2176
|
+
mt: props.mt,
|
|
2177
|
+
mb: props.mb,
|
|
2178
|
+
ml: props.ml,
|
|
2179
|
+
mr: props.mr,
|
|
2180
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%" }, children: props.children })
|
|
2181
|
+
}
|
|
2182
|
+
);
|
|
2183
|
+
}
|
|
2184
|
+
function GoabTableSortHeader({
|
|
2185
|
+
children,
|
|
2186
|
+
...rest
|
|
2187
|
+
}) {
|
|
2188
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
2189
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-table-sort-header", { ..._props, children });
|
|
2190
|
+
}
|
|
2191
|
+
function GoabTabs({
|
|
2192
|
+
initialTab,
|
|
2193
|
+
children,
|
|
2194
|
+
testId,
|
|
2195
|
+
variant,
|
|
2196
|
+
onChange
|
|
2197
|
+
}) {
|
|
2198
|
+
const ref = react.useRef(null);
|
|
2199
|
+
react.useEffect(() => {
|
|
2200
|
+
const element = ref.current;
|
|
2201
|
+
if (element && onChange) {
|
|
2202
|
+
const handler = (event) => {
|
|
2203
|
+
const detail = event.detail;
|
|
2204
|
+
onChange(detail);
|
|
2205
|
+
};
|
|
2206
|
+
element.addEventListener("_change", handler);
|
|
2207
|
+
return () => {
|
|
2208
|
+
element.removeEventListener("_change", handler);
|
|
2209
|
+
};
|
|
2210
|
+
}
|
|
2211
|
+
}, [onChange]);
|
|
2212
|
+
return /* @__PURE__ */ jsxRuntime.jsx("goa-tabs", { ref, initialtab: initialTab, testid: testId, variant, children });
|
|
2213
|
+
}
|
|
2214
|
+
function GoabTab({ heading, disabled, slug, children }) {
|
|
2215
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2216
|
+
"goa-tab",
|
|
2217
|
+
{
|
|
2218
|
+
slug,
|
|
2219
|
+
disabled: disabled ? "true" : void 0,
|
|
2220
|
+
heading: typeof heading === "string" ? heading : void 0,
|
|
2221
|
+
children: [
|
|
2222
|
+
typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("span", { slot: "heading", children: heading }),
|
|
2223
|
+
children
|
|
2224
|
+
]
|
|
2312
2225
|
}
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
*/
|
|
2333
|
-
completeSubform() {
|
|
2334
|
-
if (!this._formRef) {
|
|
2335
|
-
console.error("completeSubform: form ref is not set");
|
|
2336
|
-
return;
|
|
2226
|
+
);
|
|
2227
|
+
}
|
|
2228
|
+
const GoabTemporaryNotificationCtrl = ({
|
|
2229
|
+
verticalPosition = "bottom",
|
|
2230
|
+
horizontalPosition = "center",
|
|
2231
|
+
testId,
|
|
2232
|
+
...rest
|
|
2233
|
+
}) => {
|
|
2234
|
+
const el = react.useRef(null);
|
|
2235
|
+
const _props = calendarDate.transformProps(
|
|
2236
|
+
{ "vertical-position": verticalPosition, "horizontal-position": horizontalPosition, ...rest },
|
|
2237
|
+
calendarDate.kebab
|
|
2238
|
+
);
|
|
2239
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2240
|
+
"goa-temp-notification-ctrl",
|
|
2241
|
+
{
|
|
2242
|
+
ref: el,
|
|
2243
|
+
..._props,
|
|
2244
|
+
testid: testId
|
|
2337
2245
|
}
|
|
2338
|
-
|
|
2339
|
-
|
|
2246
|
+
);
|
|
2247
|
+
};
|
|
2248
|
+
function GoabText({
|
|
2249
|
+
as,
|
|
2250
|
+
tag,
|
|
2251
|
+
children,
|
|
2252
|
+
...rest
|
|
2253
|
+
}) {
|
|
2254
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
2255
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2256
|
+
"goa-text",
|
|
2257
|
+
{
|
|
2258
|
+
as: tag || as,
|
|
2259
|
+
..._props,
|
|
2260
|
+
children
|
|
2261
|
+
}
|
|
2262
|
+
);
|
|
2263
|
+
}
|
|
2264
|
+
function GoabTextArea({
|
|
2265
|
+
readOnly,
|
|
2266
|
+
disabled,
|
|
2267
|
+
error,
|
|
2268
|
+
onChange,
|
|
2269
|
+
onKeyPress,
|
|
2270
|
+
onBlur,
|
|
2271
|
+
...rest
|
|
2272
|
+
}) {
|
|
2273
|
+
const el = react.useRef(null);
|
|
2274
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
2275
|
+
react.useEffect(() => {
|
|
2276
|
+
if (!el.current) {
|
|
2340
2277
|
return;
|
|
2341
2278
|
}
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
dispatch(formRef, "_complete", {}, { bubbles: true });
|
|
2347
|
-
this._isCompleting = false;
|
|
2279
|
+
const current = el.current;
|
|
2280
|
+
const changeListener = (e) => {
|
|
2281
|
+
const detail = e.detail;
|
|
2282
|
+
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
2348
2283
|
};
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2284
|
+
const keypressListener = (e) => {
|
|
2285
|
+
const detail = e.detail;
|
|
2286
|
+
onKeyPress == null ? void 0 : onKeyPress({ ...detail, event: e });
|
|
2287
|
+
};
|
|
2288
|
+
const blurListener = (e) => {
|
|
2289
|
+
const detail = e.detail;
|
|
2290
|
+
onBlur == null ? void 0 : onBlur({ ...detail, event: e });
|
|
2291
|
+
};
|
|
2292
|
+
current.addEventListener("_change", changeListener);
|
|
2293
|
+
current.addEventListener("_keyPress", keypressListener);
|
|
2294
|
+
current.addEventListener("_blur", blurListener);
|
|
2295
|
+
return () => {
|
|
2296
|
+
current.removeEventListener("_change", changeListener);
|
|
2297
|
+
current.removeEventListener("_keyPress", keypressListener);
|
|
2298
|
+
current.removeEventListener("_blur", blurListener);
|
|
2299
|
+
};
|
|
2300
|
+
}, [el, onChange, onKeyPress, onBlur]);
|
|
2301
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2302
|
+
"goa-textarea",
|
|
2303
|
+
{
|
|
2304
|
+
ref: el,
|
|
2305
|
+
readOnly: readOnly ? "true" : void 0,
|
|
2306
|
+
disabled: disabled ? "true" : void 0,
|
|
2307
|
+
error: error ? "true" : void 0,
|
|
2308
|
+
..._props
|
|
2309
|
+
}
|
|
2310
|
+
);
|
|
2359
2311
|
}
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2312
|
+
function GoabThreeColumnLayout(props) {
|
|
2313
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2314
|
+
"goa-three-column-layout",
|
|
2315
|
+
{
|
|
2316
|
+
leftcolumnwidth: props.leftColumnWidth,
|
|
2317
|
+
rightcolumnwidth: props.rightColumnWidth,
|
|
2318
|
+
maxcontentwidth: props.maxContentWidth,
|
|
2319
|
+
children: [
|
|
2320
|
+
props.header && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "header", children: props.header }),
|
|
2321
|
+
props.nav && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "nav", children: props.nav }),
|
|
2322
|
+
props.sidebar && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "side-menu", children: props.sidebar }),
|
|
2323
|
+
props.sideMenu && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "side-menu", children: props.sideMenu }),
|
|
2324
|
+
props.children,
|
|
2325
|
+
props.footer && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "footer", children: props.footer })
|
|
2326
|
+
]
|
|
2327
|
+
}
|
|
2328
|
+
);
|
|
2329
|
+
}
|
|
2330
|
+
function GoabTooltip({
|
|
2331
|
+
content,
|
|
2332
|
+
children,
|
|
2333
|
+
...rest
|
|
2334
|
+
}) {
|
|
2335
|
+
const _props = calendarDate.transformProps(rest, calendarDate.lowercase);
|
|
2336
|
+
const isStringContent = typeof content === "string";
|
|
2337
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2338
|
+
"goa-tooltip",
|
|
2339
|
+
{
|
|
2340
|
+
content: isStringContent ? content : void 0,
|
|
2341
|
+
..._props,
|
|
2342
|
+
children: [
|
|
2343
|
+
!isStringContent && content && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "content", children: content }),
|
|
2344
|
+
children
|
|
2345
|
+
]
|
|
2346
|
+
}
|
|
2347
|
+
);
|
|
2348
|
+
}
|
|
2349
|
+
function GoabTwoColumnLayout(props) {
|
|
2350
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2351
|
+
"goa-two-column-layout",
|
|
2352
|
+
{
|
|
2353
|
+
navcolumnwidth: props.navColumnWidth,
|
|
2354
|
+
maxcontentwidth: props.maxContentWidth,
|
|
2355
|
+
children: [
|
|
2356
|
+
props.header && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "header", children: props.header }),
|
|
2357
|
+
props.nav && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "nav", children: props.nav }),
|
|
2358
|
+
props.children,
|
|
2359
|
+
props.footer && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "footer", children: props.footer })
|
|
2360
|
+
]
|
|
2361
|
+
}
|
|
2362
|
+
);
|
|
2363
|
+
}
|
|
2364
|
+
const GoabFilterChip = ({
|
|
2365
|
+
iconTheme = "outline",
|
|
2366
|
+
error,
|
|
2367
|
+
onClick,
|
|
2368
|
+
...rest
|
|
2369
|
+
}) => {
|
|
2370
|
+
const el = react.useRef(null);
|
|
2371
|
+
const _props = calendarDate.transformProps(
|
|
2372
|
+
{ icontheme: iconTheme, ...rest },
|
|
2373
|
+
calendarDate.lowercase
|
|
2374
|
+
);
|
|
2375
|
+
react.useEffect(() => {
|
|
2376
|
+
if (!el.current) return;
|
|
2377
|
+
if (!onClick) return;
|
|
2378
|
+
const current = el.current;
|
|
2379
|
+
current.addEventListener("_click", onClick);
|
|
2380
|
+
return () => {
|
|
2381
|
+
current.removeEventListener("_click", onClick);
|
|
2382
|
+
};
|
|
2383
|
+
}, [el, onClick]);
|
|
2384
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2385
|
+
"goa-filter-chip",
|
|
2386
|
+
{
|
|
2387
|
+
ref: el,
|
|
2388
|
+
error: error ? "true" : void 0,
|
|
2389
|
+
..._props
|
|
2374
2390
|
}
|
|
2375
|
-
};
|
|
2376
|
-
};
|
|
2377
|
-
// Private method to dispatch the error message to the form element
|
|
2378
|
-
dispatchError_fn = function(el, name, msg, options) {
|
|
2379
|
-
el.dispatchEvent(
|
|
2380
|
-
new CustomEvent("msg", {
|
|
2381
|
-
composed: true,
|
|
2382
|
-
detail: {
|
|
2383
|
-
action: "external::set:error",
|
|
2384
|
-
data: {
|
|
2385
|
-
name,
|
|
2386
|
-
msg,
|
|
2387
|
-
grouped: options == null ? void 0 : options.grouped
|
|
2388
|
-
}
|
|
2389
|
-
}
|
|
2390
|
-
})
|
|
2391
2391
|
);
|
|
2392
2392
|
};
|
|
2393
2393
|
function usePublicFormController(type = "details") {
|