@innspel/react-native 0.5.0 → 0.5.1
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/dist/index.cjs +292 -272
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +298 -278
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -718,229 +718,240 @@ function Felt({
|
|
|
718
718
|
return verdi2 && !fjernedeFelter.includes(felt) ? { felt, etikett, verdi: verdi2 } : null;
|
|
719
719
|
}).filter((x) => x !== null);
|
|
720
720
|
}, [kontekst, fjernedeFelter]);
|
|
721
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { style: {
|
|
722
|
-
|
|
723
|
-
import_react_native3.
|
|
721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { testID: "skjema", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
722
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
723
|
+
import_react_native3.ScrollView,
|
|
724
724
|
{
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
minHeight: tema.touch,
|
|
730
|
-
borderWidth: tema.hairline,
|
|
731
|
-
borderColor: tema.color.borderInteractive,
|
|
732
|
-
borderRadius: tema.radius.pill,
|
|
733
|
-
paddingLeft: tema.space.md,
|
|
734
|
-
paddingRight: tema.space.xs
|
|
735
|
-
},
|
|
725
|
+
testID: "skjema-kropp",
|
|
726
|
+
style: { flexGrow: 0, flexShrink: 1 },
|
|
727
|
+
contentContainerStyle: { gap: tema.space.md },
|
|
728
|
+
keyboardShouldPersistTaps: "handled",
|
|
736
729
|
children: [
|
|
737
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
738
|
-
|
|
739
|
-
import_react_native3.Pressable,
|
|
730
|
+
lenketTil ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
731
|
+
import_react_native3.View,
|
|
740
732
|
{
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
733
|
+
style: {
|
|
734
|
+
flexDirection: "row",
|
|
735
|
+
alignItems: "center",
|
|
736
|
+
gap: tema.space.sm,
|
|
737
|
+
minHeight: tema.touch,
|
|
738
|
+
borderWidth: tema.hairline,
|
|
739
|
+
borderColor: tema.color.borderInteractive,
|
|
740
|
+
borderRadius: tema.radius.pill,
|
|
741
|
+
paddingLeft: tema.space.md,
|
|
742
|
+
paddingRight: tema.space.xs
|
|
743
|
+
},
|
|
744
|
+
children: [
|
|
745
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.lenketTil(lenketTil.title) }),
|
|
746
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
747
|
+
import_react_native3.Pressable,
|
|
748
|
+
{
|
|
749
|
+
testID: "fjern-lenke",
|
|
750
|
+
accessibilityRole: "button",
|
|
751
|
+
accessibilityLabel: tekst.fjernLenke,
|
|
752
|
+
onPress: onFjernLenke,
|
|
753
|
+
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
754
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
|
|
755
|
+
}
|
|
756
|
+
)
|
|
757
|
+
]
|
|
747
758
|
}
|
|
748
|
-
)
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
759
|
+
) : null,
|
|
760
|
+
uavklart ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
761
|
+
import_react_native3.View,
|
|
762
|
+
{
|
|
763
|
+
style: {
|
|
764
|
+
gap: tema.space.sm,
|
|
765
|
+
backgroundColor: tema.color.warningBg,
|
|
766
|
+
borderRadius: tema.radius.md,
|
|
767
|
+
padding: tema.space.md
|
|
768
|
+
},
|
|
769
|
+
children: [
|
|
770
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
771
|
+
import_react_native3.Text,
|
|
772
|
+
{
|
|
773
|
+
accessibilityRole: "alert",
|
|
774
|
+
accessibilityLiveRegion: "polite",
|
|
775
|
+
style: {
|
|
776
|
+
color: tema.color.warning,
|
|
777
|
+
fontSize: tema.font.small,
|
|
778
|
+
lineHeight: tema.lineHeight.small,
|
|
779
|
+
fontWeight: tema.weight.medium
|
|
780
|
+
},
|
|
781
|
+
children: tekst.monsterSpm[uavklart.kind]
|
|
782
|
+
}
|
|
783
|
+
),
|
|
784
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
785
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
786
|
+
Btn,
|
|
787
|
+
{
|
|
788
|
+
grow: true,
|
|
789
|
+
variant: "secondary",
|
|
790
|
+
testID: "monster-fjern",
|
|
791
|
+
label: tekst.monsterFjern,
|
|
792
|
+
onPress: () => onEndre(verdi.slice(0, uavklart.start) + verdi.slice(uavklart.end))
|
|
793
|
+
}
|
|
794
|
+
),
|
|
795
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
796
|
+
Btn,
|
|
797
|
+
{
|
|
798
|
+
grow: true,
|
|
799
|
+
variant: "ghost",
|
|
800
|
+
testID: "monster-behold",
|
|
801
|
+
label: tekst.monsterBehold,
|
|
802
|
+
onPress: () => setBeholdt((b) => [...b, uavklart.match])
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
] }),
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Hint, { children: tekst.monsterForklaring })
|
|
807
|
+
]
|
|
808
|
+
}
|
|
809
|
+
) : null,
|
|
810
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(H, { children: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil }),
|
|
762
811
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
812
|
+
import_react_native3.TextInput,
|
|
813
|
+
{
|
|
814
|
+
testID: "innspill-tekst",
|
|
815
|
+
accessibilityLabel: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil,
|
|
816
|
+
value: verdi,
|
|
817
|
+
onChangeText: onEndre,
|
|
818
|
+
maxLength: textMaxLength,
|
|
819
|
+
multiline: true,
|
|
820
|
+
numberOfLines: 4,
|
|
821
|
+
placeholder: spor === "onske" ? tekst.placeholderOnske : tekst.placeholderFeil,
|
|
822
|
+
placeholderTextColor: tema.color.textMuted,
|
|
823
|
+
style: {
|
|
824
|
+
backgroundColor: tema.color.surfaceRaised,
|
|
825
|
+
borderWidth: tema.hairline,
|
|
826
|
+
borderColor: full ? tema.color.warning : tema.color.borderStrong,
|
|
827
|
+
borderRadius: tema.radius.md,
|
|
828
|
+
padding: tema.space.md,
|
|
829
|
+
color: tema.color.textPrimary,
|
|
830
|
+
fontSize: tema.font.body,
|
|
831
|
+
lineHeight: tema.lineHeight.body,
|
|
832
|
+
minHeight: tema.touch * 2,
|
|
833
|
+
textAlignVertical: "top"
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
),
|
|
837
|
+
visTeller ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
763
838
|
import_react_native3.Text,
|
|
764
839
|
{
|
|
765
|
-
|
|
766
|
-
accessibilityLiveRegion: "polite",
|
|
840
|
+
testID: "teller",
|
|
841
|
+
accessibilityLiveRegion: full ? "assertive" : "polite",
|
|
767
842
|
style: {
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
fontWeight: tema.weight.medium
|
|
843
|
+
alignSelf: "flex-end",
|
|
844
|
+
color: full ? tema.color.warning : tema.color.textMuted,
|
|
845
|
+
fontSize: tema.font.small
|
|
772
846
|
},
|
|
773
|
-
children:
|
|
847
|
+
children: [
|
|
848
|
+
brukt,
|
|
849
|
+
" / ",
|
|
850
|
+
textMaxLength,
|
|
851
|
+
full ? tekst.tellerFull : ""
|
|
852
|
+
]
|
|
774
853
|
}
|
|
775
|
-
),
|
|
776
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
854
|
+
) : null,
|
|
855
|
+
harVedlegg ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
856
|
+
import_react_native3.View,
|
|
857
|
+
{
|
|
858
|
+
testID: "vedlegg-chip",
|
|
859
|
+
style: {
|
|
860
|
+
flexDirection: "row",
|
|
861
|
+
alignItems: "center",
|
|
862
|
+
gap: tema.space.sm,
|
|
863
|
+
minHeight: tema.touch,
|
|
864
|
+
borderWidth: tema.hairline,
|
|
865
|
+
borderColor: tema.color.borderInteractive,
|
|
866
|
+
borderRadius: tema.radius.pill,
|
|
867
|
+
paddingLeft: tema.space.md,
|
|
868
|
+
paddingRight: tema.space.xs
|
|
869
|
+
},
|
|
870
|
+
children: [
|
|
871
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { fontSize: tema.font.small }, children: "\u{1F4F7}" }),
|
|
872
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.skjermbildeLagtVed }),
|
|
873
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
874
|
+
import_react_native3.Pressable,
|
|
875
|
+
{
|
|
876
|
+
testID: "fjern-vedlegg",
|
|
877
|
+
accessibilityRole: "button",
|
|
878
|
+
accessibilityLabel: tekst.fjernSkjermbilde,
|
|
879
|
+
onPress: onFjernVedlegg,
|
|
880
|
+
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
881
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
|
|
882
|
+
}
|
|
883
|
+
)
|
|
884
|
+
]
|
|
885
|
+
}
|
|
886
|
+
) : onSkjermbilde ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
887
|
+
Btn,
|
|
888
|
+
{
|
|
889
|
+
variant: "secondary",
|
|
890
|
+
testID: "legg-ved-skjermbilde",
|
|
891
|
+
ikon: "\u{1F4F7}",
|
|
892
|
+
label: tekst.leggVedSkjermbilde,
|
|
893
|
+
hint: tekst.leggVedHint,
|
|
894
|
+
onPress: onSkjermbilde
|
|
895
|
+
}
|
|
896
|
+
) : null,
|
|
897
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { style: { borderTopWidth: tema.hairline, borderTopColor: tema.color.border, paddingTop: tema.space.sm }, children: [
|
|
777
898
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
778
|
-
|
|
899
|
+
import_react_native3.Pressable,
|
|
779
900
|
{
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
onPress: () =>
|
|
901
|
+
testID: "kontekst-bryter",
|
|
902
|
+
accessibilityRole: "button",
|
|
903
|
+
accessibilityState: { expanded: apen },
|
|
904
|
+
accessibilityLabel: `${tekst.kontekstLinje}${apen ? "" : tekst.kontekstVis}`,
|
|
905
|
+
onPress: () => setApen((a) => !a),
|
|
906
|
+
style: { minHeight: tema.touch, justifyContent: "center" },
|
|
907
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
908
|
+
apen ? "\u25B4" : "\u25BE",
|
|
909
|
+
" ",
|
|
910
|
+
tekst.kontekstLinje,
|
|
911
|
+
apen ? "" : tekst.kontekstVis
|
|
912
|
+
] })
|
|
785
913
|
}
|
|
786
914
|
),
|
|
787
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
915
|
+
apen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { children: [
|
|
916
|
+
linjer.map((l) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
917
|
+
import_react_native3.View,
|
|
918
|
+
{
|
|
919
|
+
style: {
|
|
920
|
+
flexDirection: "row",
|
|
921
|
+
alignItems: "center",
|
|
922
|
+
gap: tema.space.sm,
|
|
923
|
+
minHeight: tema.touch,
|
|
924
|
+
borderBottomWidth: tema.hairline,
|
|
925
|
+
borderBottomColor: tema.color.border
|
|
926
|
+
},
|
|
927
|
+
children: [
|
|
928
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textMuted, fontSize: tema.font.small, minWidth: tema.touch * 2 }, children: l.etikett }),
|
|
929
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: l.verdi }),
|
|
930
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
931
|
+
import_react_native3.Pressable,
|
|
932
|
+
{
|
|
933
|
+
testID: `fjern-${l.felt}`,
|
|
934
|
+
accessibilityRole: "button",
|
|
935
|
+
accessibilityLabel: `${tekst.kontekstFjern} ${l.etikett.toLowerCase()} fra innsendingen`,
|
|
936
|
+
onPress: () => onFjernKontekst(l.felt),
|
|
937
|
+
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
938
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
939
|
+
"\u2715 ",
|
|
940
|
+
tekst.kontekstFjern
|
|
941
|
+
] })
|
|
942
|
+
}
|
|
943
|
+
)
|
|
944
|
+
]
|
|
945
|
+
},
|
|
946
|
+
l.felt
|
|
947
|
+
)),
|
|
948
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.View, { style: { paddingTop: tema.space.sm }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Hint, { children: tekst.kontekstAldri }) })
|
|
949
|
+
] }) : null
|
|
950
|
+
] })
|
|
799
951
|
]
|
|
800
952
|
}
|
|
801
|
-
) : null,
|
|
802
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(H, { children: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil }),
|
|
803
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
804
|
-
import_react_native3.TextInput,
|
|
805
|
-
{
|
|
806
|
-
testID: "innspill-tekst",
|
|
807
|
-
accessibilityLabel: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil,
|
|
808
|
-
value: verdi,
|
|
809
|
-
onChangeText: onEndre,
|
|
810
|
-
maxLength: textMaxLength,
|
|
811
|
-
multiline: true,
|
|
812
|
-
numberOfLines: 4,
|
|
813
|
-
placeholder: spor === "onske" ? tekst.placeholderOnske : tekst.placeholderFeil,
|
|
814
|
-
placeholderTextColor: tema.color.textMuted,
|
|
815
|
-
style: {
|
|
816
|
-
backgroundColor: tema.color.surfaceRaised,
|
|
817
|
-
borderWidth: tema.hairline,
|
|
818
|
-
borderColor: full ? tema.color.warning : tema.color.borderStrong,
|
|
819
|
-
borderRadius: tema.radius.md,
|
|
820
|
-
padding: tema.space.md,
|
|
821
|
-
color: tema.color.textPrimary,
|
|
822
|
-
fontSize: tema.font.body,
|
|
823
|
-
lineHeight: tema.lineHeight.body,
|
|
824
|
-
minHeight: tema.touch * 2,
|
|
825
|
-
textAlignVertical: "top"
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
953
|
),
|
|
829
|
-
|
|
830
|
-
import_react_native3.Text,
|
|
831
|
-
{
|
|
832
|
-
testID: "teller",
|
|
833
|
-
accessibilityLiveRegion: full ? "assertive" : "polite",
|
|
834
|
-
style: {
|
|
835
|
-
alignSelf: "flex-end",
|
|
836
|
-
color: full ? tema.color.warning : tema.color.textMuted,
|
|
837
|
-
fontSize: tema.font.small
|
|
838
|
-
},
|
|
839
|
-
children: [
|
|
840
|
-
brukt,
|
|
841
|
-
" / ",
|
|
842
|
-
textMaxLength,
|
|
843
|
-
full ? tekst.tellerFull : ""
|
|
844
|
-
]
|
|
845
|
-
}
|
|
846
|
-
) : null,
|
|
847
|
-
harVedlegg ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
848
|
-
import_react_native3.View,
|
|
849
|
-
{
|
|
850
|
-
testID: "vedlegg-chip",
|
|
851
|
-
style: {
|
|
852
|
-
flexDirection: "row",
|
|
853
|
-
alignItems: "center",
|
|
854
|
-
gap: tema.space.sm,
|
|
855
|
-
minHeight: tema.touch,
|
|
856
|
-
borderWidth: tema.hairline,
|
|
857
|
-
borderColor: tema.color.borderInteractive,
|
|
858
|
-
borderRadius: tema.radius.pill,
|
|
859
|
-
paddingLeft: tema.space.md,
|
|
860
|
-
paddingRight: tema.space.xs
|
|
861
|
-
},
|
|
862
|
-
children: [
|
|
863
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { fontSize: tema.font.small }, children: "\u{1F4F7}" }),
|
|
864
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.skjermbildeLagtVed }),
|
|
865
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
866
|
-
import_react_native3.Pressable,
|
|
867
|
-
{
|
|
868
|
-
testID: "fjern-vedlegg",
|
|
869
|
-
accessibilityRole: "button",
|
|
870
|
-
accessibilityLabel: tekst.fjernSkjermbilde,
|
|
871
|
-
onPress: onFjernVedlegg,
|
|
872
|
-
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
873
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
|
|
874
|
-
}
|
|
875
|
-
)
|
|
876
|
-
]
|
|
877
|
-
}
|
|
878
|
-
) : onSkjermbilde ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
879
|
-
Btn,
|
|
880
|
-
{
|
|
881
|
-
variant: "secondary",
|
|
882
|
-
testID: "legg-ved-skjermbilde",
|
|
883
|
-
ikon: "\u{1F4F7}",
|
|
884
|
-
label: tekst.leggVedSkjermbilde,
|
|
885
|
-
hint: tekst.leggVedHint,
|
|
886
|
-
onPress: onSkjermbilde
|
|
887
|
-
}
|
|
888
|
-
) : null,
|
|
889
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { style: { borderTopWidth: tema.hairline, borderTopColor: tema.color.border, paddingTop: tema.space.sm }, children: [
|
|
890
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
891
|
-
import_react_native3.Pressable,
|
|
892
|
-
{
|
|
893
|
-
testID: "kontekst-bryter",
|
|
894
|
-
accessibilityRole: "button",
|
|
895
|
-
accessibilityState: { expanded: apen },
|
|
896
|
-
accessibilityLabel: `${tekst.kontekstLinje}${apen ? "" : tekst.kontekstVis}`,
|
|
897
|
-
onPress: () => setApen((a) => !a),
|
|
898
|
-
style: { minHeight: tema.touch, justifyContent: "center" },
|
|
899
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
900
|
-
apen ? "\u25B4" : "\u25BE",
|
|
901
|
-
" ",
|
|
902
|
-
tekst.kontekstLinje,
|
|
903
|
-
apen ? "" : tekst.kontekstVis
|
|
904
|
-
] })
|
|
905
|
-
}
|
|
906
|
-
),
|
|
907
|
-
apen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.View, { children: [
|
|
908
|
-
linjer.map((l) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
909
|
-
import_react_native3.View,
|
|
910
|
-
{
|
|
911
|
-
style: {
|
|
912
|
-
flexDirection: "row",
|
|
913
|
-
alignItems: "center",
|
|
914
|
-
gap: tema.space.sm,
|
|
915
|
-
minHeight: tema.touch,
|
|
916
|
-
borderBottomWidth: tema.hairline,
|
|
917
|
-
borderBottomColor: tema.color.border
|
|
918
|
-
},
|
|
919
|
-
children: [
|
|
920
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { color: tema.color.textMuted, fontSize: tema.font.small, minWidth: tema.touch * 2 }, children: l.etikett }),
|
|
921
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: l.verdi }),
|
|
922
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
923
|
-
import_react_native3.Pressable,
|
|
924
|
-
{
|
|
925
|
-
testID: `fjern-${l.felt}`,
|
|
926
|
-
accessibilityRole: "button",
|
|
927
|
-
accessibilityLabel: `${tekst.kontekstFjern} ${l.etikett.toLowerCase()} fra innsendingen`,
|
|
928
|
-
onPress: () => onFjernKontekst(l.felt),
|
|
929
|
-
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
930
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
931
|
-
"\u2715 ",
|
|
932
|
-
tekst.kontekstFjern
|
|
933
|
-
] })
|
|
934
|
-
}
|
|
935
|
-
)
|
|
936
|
-
]
|
|
937
|
-
},
|
|
938
|
-
l.felt
|
|
939
|
-
)),
|
|
940
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.View, { style: { paddingTop: tema.space.sm }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Hint, { children: tekst.kontekstAldri }) })
|
|
941
|
-
] }) : null
|
|
942
|
-
] }),
|
|
943
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.View, { style: { flex: 1, justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native3.View, { testID: "skjema-fot", style: { flexGrow: 1, flexShrink: 0, justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
944
955
|
Btn,
|
|
945
956
|
{
|
|
946
957
|
testID: "send",
|
|
@@ -1024,73 +1035,82 @@ function KjenteFeil({
|
|
|
1024
1035
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native5.ActivityIndicator, { accessibilityLabel: "Sjekker kjente feil", color: tema.color.textSecondary })
|
|
1025
1036
|
] });
|
|
1026
1037
|
}
|
|
1027
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native5.View, { style: {
|
|
1038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native5.View, { testID: "kjente-feil", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
1028
1039
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(H, { sub: spor === "onske" ? tekst.kjenteFeilUnderOnske : tekst.kjenteFeilUnderFeil, children: spor === "onske" ? tekst.kjenteFeilTittelOnske : tekst.kjenteFeilTittelFeil }),
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1040
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1041
|
+
import_react_native5.ScrollView,
|
|
1042
|
+
{
|
|
1043
|
+
testID: "kjente-feil-liste",
|
|
1044
|
+
style: { flexGrow: 0, flexShrink: 1 },
|
|
1045
|
+
contentContainerStyle: { gap: tema.space.md },
|
|
1046
|
+
keyboardShouldPersistTaps: "handled",
|
|
1047
|
+
children: kort.map((k) => {
|
|
1048
|
+
const versjon = k.fixedIn ? k.status === "fikset" ? tekst.rettetI(k.fixedIn) : tekst.rettesI(k.fixedIn) : void 0;
|
|
1049
|
+
const kontekst = versjon ? `${k.title}. ${versjon}` : k.title;
|
|
1050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Card, { children: [
|
|
1051
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1052
|
+
import_react_native5.Text,
|
|
1053
|
+
{
|
|
1054
|
+
style: {
|
|
1055
|
+
color: tema.color.textPrimary,
|
|
1056
|
+
fontSize: tema.font.body,
|
|
1057
|
+
lineHeight: tema.lineHeight.body,
|
|
1058
|
+
fontWeight: tema.weight.medium
|
|
1059
|
+
},
|
|
1060
|
+
children: k.title
|
|
1061
|
+
}
|
|
1062
|
+
),
|
|
1063
|
+
k.workaround ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1064
|
+
import_react_native5.Text,
|
|
1065
|
+
{
|
|
1066
|
+
style: {
|
|
1067
|
+
color: tema.color.textSecondary,
|
|
1068
|
+
fontSize: tema.font.small,
|
|
1069
|
+
lineHeight: tema.lineHeight.small
|
|
1070
|
+
},
|
|
1071
|
+
children: [
|
|
1072
|
+
tekst.omvei,
|
|
1073
|
+
" ",
|
|
1074
|
+
k.workaround
|
|
1075
|
+
]
|
|
1076
|
+
}
|
|
1077
|
+
) : null,
|
|
1078
|
+
versjon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1079
|
+
StatusPill,
|
|
1080
|
+
{
|
|
1081
|
+
ikon: k.status === "fikset" ? "\u2713" : "\u{1F527}",
|
|
1082
|
+
etikett: versjon,
|
|
1083
|
+
farge: k.status === "fikset" ? "success" : "info"
|
|
1084
|
+
}
|
|
1085
|
+
) : null,
|
|
1086
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native5.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
1087
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1088
|
+
Btn,
|
|
1089
|
+
{
|
|
1090
|
+
grow: true,
|
|
1091
|
+
testID: `ja-ogsa-${k.id}`,
|
|
1092
|
+
label: tekst.svarJa,
|
|
1093
|
+
accessibilityLabel: `${tekst.svarJa}. ${kontekst}`,
|
|
1094
|
+
onPress: () => onJaOgsa(k)
|
|
1095
|
+
}
|
|
1096
|
+
),
|
|
1097
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1098
|
+
Btn,
|
|
1099
|
+
{
|
|
1100
|
+
grow: true,
|
|
1101
|
+
variant: "secondary",
|
|
1102
|
+
testID: `ligner-${k.id}`,
|
|
1103
|
+
label: tekst.svarLigner,
|
|
1104
|
+
accessibilityLabel: `${tekst.svarLigner}. ${kontekst}`,
|
|
1105
|
+
onPress: () => onLigner(k)
|
|
1106
|
+
}
|
|
1107
|
+
)
|
|
1108
|
+
] })
|
|
1109
|
+
] }, k.id);
|
|
1110
|
+
})
|
|
1111
|
+
}
|
|
1112
|
+
),
|
|
1113
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native5.View, { testID: "kjente-feil-fot", style: { flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Btn, { variant: "secondary", testID: "nei-noe-annet", label: tekst.svarNei, onPress: onNei }) })
|
|
1094
1114
|
] });
|
|
1095
1115
|
}
|
|
1096
1116
|
|