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