@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.js
CHANGED
|
@@ -258,7 +258,7 @@ import { initialWindowMetrics, SafeAreaInsetsContext } from "react-native-safe-a
|
|
|
258
258
|
|
|
259
259
|
// src/widget/Felt.tsx
|
|
260
260
|
import { useMemo, useState } from "react";
|
|
261
|
-
import { Pressable as Pressable2, Text as Text2, TextInput, View as View2 } from "react-native";
|
|
261
|
+
import { Pressable as Pressable2, ScrollView, Text as Text2, TextInput, View as View2 } from "react-native";
|
|
262
262
|
|
|
263
263
|
// src/widget/primitiver.tsx
|
|
264
264
|
import "react";
|
|
@@ -680,229 +680,240 @@ function Felt({
|
|
|
680
680
|
return verdi2 && !fjernedeFelter.includes(felt) ? { felt, etikett, verdi: verdi2 } : null;
|
|
681
681
|
}).filter((x) => x !== null);
|
|
682
682
|
}, [kontekst, fjernedeFelter]);
|
|
683
|
-
return /* @__PURE__ */ jsxs2(View2, { style: {
|
|
684
|
-
|
|
685
|
-
|
|
683
|
+
return /* @__PURE__ */ jsxs2(View2, { testID: "skjema", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
684
|
+
/* @__PURE__ */ jsxs2(
|
|
685
|
+
ScrollView,
|
|
686
686
|
{
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
minHeight: tema.touch,
|
|
692
|
-
borderWidth: tema.hairline,
|
|
693
|
-
borderColor: tema.color.borderInteractive,
|
|
694
|
-
borderRadius: tema.radius.pill,
|
|
695
|
-
paddingLeft: tema.space.md,
|
|
696
|
-
paddingRight: tema.space.xs
|
|
697
|
-
},
|
|
687
|
+
testID: "skjema-kropp",
|
|
688
|
+
style: { flexGrow: 0, flexShrink: 1 },
|
|
689
|
+
contentContainerStyle: { gap: tema.space.md },
|
|
690
|
+
keyboardShouldPersistTaps: "handled",
|
|
698
691
|
children: [
|
|
699
|
-
/* @__PURE__ */
|
|
700
|
-
|
|
701
|
-
Pressable2,
|
|
692
|
+
lenketTil ? /* @__PURE__ */ jsxs2(
|
|
693
|
+
View2,
|
|
702
694
|
{
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
695
|
+
style: {
|
|
696
|
+
flexDirection: "row",
|
|
697
|
+
alignItems: "center",
|
|
698
|
+
gap: tema.space.sm,
|
|
699
|
+
minHeight: tema.touch,
|
|
700
|
+
borderWidth: tema.hairline,
|
|
701
|
+
borderColor: tema.color.borderInteractive,
|
|
702
|
+
borderRadius: tema.radius.pill,
|
|
703
|
+
paddingLeft: tema.space.md,
|
|
704
|
+
paddingRight: tema.space.xs
|
|
705
|
+
},
|
|
706
|
+
children: [
|
|
707
|
+
/* @__PURE__ */ jsx2(Text2, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.lenketTil(lenketTil.title) }),
|
|
708
|
+
/* @__PURE__ */ jsx2(
|
|
709
|
+
Pressable2,
|
|
710
|
+
{
|
|
711
|
+
testID: "fjern-lenke",
|
|
712
|
+
accessibilityRole: "button",
|
|
713
|
+
accessibilityLabel: tekst.fjernLenke,
|
|
714
|
+
onPress: onFjernLenke,
|
|
715
|
+
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
716
|
+
children: /* @__PURE__ */ jsx2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
|
|
717
|
+
}
|
|
718
|
+
)
|
|
719
|
+
]
|
|
709
720
|
}
|
|
710
|
-
)
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
721
|
+
) : null,
|
|
722
|
+
uavklart ? /* @__PURE__ */ jsxs2(
|
|
723
|
+
View2,
|
|
724
|
+
{
|
|
725
|
+
style: {
|
|
726
|
+
gap: tema.space.sm,
|
|
727
|
+
backgroundColor: tema.color.warningBg,
|
|
728
|
+
borderRadius: tema.radius.md,
|
|
729
|
+
padding: tema.space.md
|
|
730
|
+
},
|
|
731
|
+
children: [
|
|
732
|
+
/* @__PURE__ */ jsx2(
|
|
733
|
+
Text2,
|
|
734
|
+
{
|
|
735
|
+
accessibilityRole: "alert",
|
|
736
|
+
accessibilityLiveRegion: "polite",
|
|
737
|
+
style: {
|
|
738
|
+
color: tema.color.warning,
|
|
739
|
+
fontSize: tema.font.small,
|
|
740
|
+
lineHeight: tema.lineHeight.small,
|
|
741
|
+
fontWeight: tema.weight.medium
|
|
742
|
+
},
|
|
743
|
+
children: tekst.monsterSpm[uavklart.kind]
|
|
744
|
+
}
|
|
745
|
+
),
|
|
746
|
+
/* @__PURE__ */ jsxs2(View2, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
747
|
+
/* @__PURE__ */ jsx2(
|
|
748
|
+
Btn,
|
|
749
|
+
{
|
|
750
|
+
grow: true,
|
|
751
|
+
variant: "secondary",
|
|
752
|
+
testID: "monster-fjern",
|
|
753
|
+
label: tekst.monsterFjern,
|
|
754
|
+
onPress: () => onEndre(verdi.slice(0, uavklart.start) + verdi.slice(uavklart.end))
|
|
755
|
+
}
|
|
756
|
+
),
|
|
757
|
+
/* @__PURE__ */ jsx2(
|
|
758
|
+
Btn,
|
|
759
|
+
{
|
|
760
|
+
grow: true,
|
|
761
|
+
variant: "ghost",
|
|
762
|
+
testID: "monster-behold",
|
|
763
|
+
label: tekst.monsterBehold,
|
|
764
|
+
onPress: () => setBeholdt((b) => [...b, uavklart.match])
|
|
765
|
+
}
|
|
766
|
+
)
|
|
767
|
+
] }),
|
|
768
|
+
/* @__PURE__ */ jsx2(Hint, { children: tekst.monsterForklaring })
|
|
769
|
+
]
|
|
770
|
+
}
|
|
771
|
+
) : null,
|
|
772
|
+
/* @__PURE__ */ jsx2(H, { children: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil }),
|
|
724
773
|
/* @__PURE__ */ jsx2(
|
|
774
|
+
TextInput,
|
|
775
|
+
{
|
|
776
|
+
testID: "innspill-tekst",
|
|
777
|
+
accessibilityLabel: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil,
|
|
778
|
+
value: verdi,
|
|
779
|
+
onChangeText: onEndre,
|
|
780
|
+
maxLength: textMaxLength,
|
|
781
|
+
multiline: true,
|
|
782
|
+
numberOfLines: 4,
|
|
783
|
+
placeholder: spor === "onske" ? tekst.placeholderOnske : tekst.placeholderFeil,
|
|
784
|
+
placeholderTextColor: tema.color.textMuted,
|
|
785
|
+
style: {
|
|
786
|
+
backgroundColor: tema.color.surfaceRaised,
|
|
787
|
+
borderWidth: tema.hairline,
|
|
788
|
+
borderColor: full ? tema.color.warning : tema.color.borderStrong,
|
|
789
|
+
borderRadius: tema.radius.md,
|
|
790
|
+
padding: tema.space.md,
|
|
791
|
+
color: tema.color.textPrimary,
|
|
792
|
+
fontSize: tema.font.body,
|
|
793
|
+
lineHeight: tema.lineHeight.body,
|
|
794
|
+
minHeight: tema.touch * 2,
|
|
795
|
+
textAlignVertical: "top"
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
),
|
|
799
|
+
visTeller ? /* @__PURE__ */ jsxs2(
|
|
725
800
|
Text2,
|
|
726
801
|
{
|
|
727
|
-
|
|
728
|
-
accessibilityLiveRegion: "polite",
|
|
802
|
+
testID: "teller",
|
|
803
|
+
accessibilityLiveRegion: full ? "assertive" : "polite",
|
|
729
804
|
style: {
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
fontWeight: tema.weight.medium
|
|
805
|
+
alignSelf: "flex-end",
|
|
806
|
+
color: full ? tema.color.warning : tema.color.textMuted,
|
|
807
|
+
fontSize: tema.font.small
|
|
734
808
|
},
|
|
735
|
-
children:
|
|
809
|
+
children: [
|
|
810
|
+
brukt,
|
|
811
|
+
" / ",
|
|
812
|
+
textMaxLength,
|
|
813
|
+
full ? tekst.tellerFull : ""
|
|
814
|
+
]
|
|
736
815
|
}
|
|
737
|
-
),
|
|
738
|
-
/* @__PURE__ */ jsxs2(
|
|
816
|
+
) : null,
|
|
817
|
+
harVedlegg ? /* @__PURE__ */ jsxs2(
|
|
818
|
+
View2,
|
|
819
|
+
{
|
|
820
|
+
testID: "vedlegg-chip",
|
|
821
|
+
style: {
|
|
822
|
+
flexDirection: "row",
|
|
823
|
+
alignItems: "center",
|
|
824
|
+
gap: tema.space.sm,
|
|
825
|
+
minHeight: tema.touch,
|
|
826
|
+
borderWidth: tema.hairline,
|
|
827
|
+
borderColor: tema.color.borderInteractive,
|
|
828
|
+
borderRadius: tema.radius.pill,
|
|
829
|
+
paddingLeft: tema.space.md,
|
|
830
|
+
paddingRight: tema.space.xs
|
|
831
|
+
},
|
|
832
|
+
children: [
|
|
833
|
+
/* @__PURE__ */ jsx2(Text2, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { fontSize: tema.font.small }, children: "\u{1F4F7}" }),
|
|
834
|
+
/* @__PURE__ */ jsx2(Text2, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.skjermbildeLagtVed }),
|
|
835
|
+
/* @__PURE__ */ jsx2(
|
|
836
|
+
Pressable2,
|
|
837
|
+
{
|
|
838
|
+
testID: "fjern-vedlegg",
|
|
839
|
+
accessibilityRole: "button",
|
|
840
|
+
accessibilityLabel: tekst.fjernSkjermbilde,
|
|
841
|
+
onPress: onFjernVedlegg,
|
|
842
|
+
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
843
|
+
children: /* @__PURE__ */ jsx2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
|
|
844
|
+
}
|
|
845
|
+
)
|
|
846
|
+
]
|
|
847
|
+
}
|
|
848
|
+
) : onSkjermbilde ? /* @__PURE__ */ jsx2(
|
|
849
|
+
Btn,
|
|
850
|
+
{
|
|
851
|
+
variant: "secondary",
|
|
852
|
+
testID: "legg-ved-skjermbilde",
|
|
853
|
+
ikon: "\u{1F4F7}",
|
|
854
|
+
label: tekst.leggVedSkjermbilde,
|
|
855
|
+
hint: tekst.leggVedHint,
|
|
856
|
+
onPress: onSkjermbilde
|
|
857
|
+
}
|
|
858
|
+
) : null,
|
|
859
|
+
/* @__PURE__ */ jsxs2(View2, { style: { borderTopWidth: tema.hairline, borderTopColor: tema.color.border, paddingTop: tema.space.sm }, children: [
|
|
739
860
|
/* @__PURE__ */ jsx2(
|
|
740
|
-
|
|
861
|
+
Pressable2,
|
|
741
862
|
{
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
onPress: () =>
|
|
863
|
+
testID: "kontekst-bryter",
|
|
864
|
+
accessibilityRole: "button",
|
|
865
|
+
accessibilityState: { expanded: apen },
|
|
866
|
+
accessibilityLabel: `${tekst.kontekstLinje}${apen ? "" : tekst.kontekstVis}`,
|
|
867
|
+
onPress: () => setApen((a) => !a),
|
|
868
|
+
style: { minHeight: tema.touch, justifyContent: "center" },
|
|
869
|
+
children: /* @__PURE__ */ jsxs2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
870
|
+
apen ? "\u25B4" : "\u25BE",
|
|
871
|
+
" ",
|
|
872
|
+
tekst.kontekstLinje,
|
|
873
|
+
apen ? "" : tekst.kontekstVis
|
|
874
|
+
] })
|
|
747
875
|
}
|
|
748
876
|
),
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
877
|
+
apen ? /* @__PURE__ */ jsxs2(View2, { children: [
|
|
878
|
+
linjer.map((l) => /* @__PURE__ */ jsxs2(
|
|
879
|
+
View2,
|
|
880
|
+
{
|
|
881
|
+
style: {
|
|
882
|
+
flexDirection: "row",
|
|
883
|
+
alignItems: "center",
|
|
884
|
+
gap: tema.space.sm,
|
|
885
|
+
minHeight: tema.touch,
|
|
886
|
+
borderBottomWidth: tema.hairline,
|
|
887
|
+
borderBottomColor: tema.color.border
|
|
888
|
+
},
|
|
889
|
+
children: [
|
|
890
|
+
/* @__PURE__ */ jsx2(Text2, { style: { color: tema.color.textMuted, fontSize: tema.font.small, minWidth: tema.touch * 2 }, children: l.etikett }),
|
|
891
|
+
/* @__PURE__ */ jsx2(Text2, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: l.verdi }),
|
|
892
|
+
/* @__PURE__ */ jsx2(
|
|
893
|
+
Pressable2,
|
|
894
|
+
{
|
|
895
|
+
testID: `fjern-${l.felt}`,
|
|
896
|
+
accessibilityRole: "button",
|
|
897
|
+
accessibilityLabel: `${tekst.kontekstFjern} ${l.etikett.toLowerCase()} fra innsendingen`,
|
|
898
|
+
onPress: () => onFjernKontekst(l.felt),
|
|
899
|
+
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
900
|
+
children: /* @__PURE__ */ jsxs2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
901
|
+
"\u2715 ",
|
|
902
|
+
tekst.kontekstFjern
|
|
903
|
+
] })
|
|
904
|
+
}
|
|
905
|
+
)
|
|
906
|
+
]
|
|
907
|
+
},
|
|
908
|
+
l.felt
|
|
909
|
+
)),
|
|
910
|
+
/* @__PURE__ */ jsx2(View2, { style: { paddingTop: tema.space.sm }, children: /* @__PURE__ */ jsx2(Hint, { children: tekst.kontekstAldri }) })
|
|
911
|
+
] }) : null
|
|
912
|
+
] })
|
|
761
913
|
]
|
|
762
914
|
}
|
|
763
|
-
) : null,
|
|
764
|
-
/* @__PURE__ */ jsx2(H, { children: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil }),
|
|
765
|
-
/* @__PURE__ */ jsx2(
|
|
766
|
-
TextInput,
|
|
767
|
-
{
|
|
768
|
-
testID: "innspill-tekst",
|
|
769
|
-
accessibilityLabel: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil,
|
|
770
|
-
value: verdi,
|
|
771
|
-
onChangeText: onEndre,
|
|
772
|
-
maxLength: textMaxLength,
|
|
773
|
-
multiline: true,
|
|
774
|
-
numberOfLines: 4,
|
|
775
|
-
placeholder: spor === "onske" ? tekst.placeholderOnske : tekst.placeholderFeil,
|
|
776
|
-
placeholderTextColor: tema.color.textMuted,
|
|
777
|
-
style: {
|
|
778
|
-
backgroundColor: tema.color.surfaceRaised,
|
|
779
|
-
borderWidth: tema.hairline,
|
|
780
|
-
borderColor: full ? tema.color.warning : tema.color.borderStrong,
|
|
781
|
-
borderRadius: tema.radius.md,
|
|
782
|
-
padding: tema.space.md,
|
|
783
|
-
color: tema.color.textPrimary,
|
|
784
|
-
fontSize: tema.font.body,
|
|
785
|
-
lineHeight: tema.lineHeight.body,
|
|
786
|
-
minHeight: tema.touch * 2,
|
|
787
|
-
textAlignVertical: "top"
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
915
|
),
|
|
791
|
-
|
|
792
|
-
Text2,
|
|
793
|
-
{
|
|
794
|
-
testID: "teller",
|
|
795
|
-
accessibilityLiveRegion: full ? "assertive" : "polite",
|
|
796
|
-
style: {
|
|
797
|
-
alignSelf: "flex-end",
|
|
798
|
-
color: full ? tema.color.warning : tema.color.textMuted,
|
|
799
|
-
fontSize: tema.font.small
|
|
800
|
-
},
|
|
801
|
-
children: [
|
|
802
|
-
brukt,
|
|
803
|
-
" / ",
|
|
804
|
-
textMaxLength,
|
|
805
|
-
full ? tekst.tellerFull : ""
|
|
806
|
-
]
|
|
807
|
-
}
|
|
808
|
-
) : null,
|
|
809
|
-
harVedlegg ? /* @__PURE__ */ jsxs2(
|
|
810
|
-
View2,
|
|
811
|
-
{
|
|
812
|
-
testID: "vedlegg-chip",
|
|
813
|
-
style: {
|
|
814
|
-
flexDirection: "row",
|
|
815
|
-
alignItems: "center",
|
|
816
|
-
gap: tema.space.sm,
|
|
817
|
-
minHeight: tema.touch,
|
|
818
|
-
borderWidth: tema.hairline,
|
|
819
|
-
borderColor: tema.color.borderInteractive,
|
|
820
|
-
borderRadius: tema.radius.pill,
|
|
821
|
-
paddingLeft: tema.space.md,
|
|
822
|
-
paddingRight: tema.space.xs
|
|
823
|
-
},
|
|
824
|
-
children: [
|
|
825
|
-
/* @__PURE__ */ jsx2(Text2, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { fontSize: tema.font.small }, children: "\u{1F4F7}" }),
|
|
826
|
-
/* @__PURE__ */ jsx2(Text2, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.skjermbildeLagtVed }),
|
|
827
|
-
/* @__PURE__ */ jsx2(
|
|
828
|
-
Pressable2,
|
|
829
|
-
{
|
|
830
|
-
testID: "fjern-vedlegg",
|
|
831
|
-
accessibilityRole: "button",
|
|
832
|
-
accessibilityLabel: tekst.fjernSkjermbilde,
|
|
833
|
-
onPress: onFjernVedlegg,
|
|
834
|
-
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
835
|
-
children: /* @__PURE__ */ jsx2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
|
|
836
|
-
}
|
|
837
|
-
)
|
|
838
|
-
]
|
|
839
|
-
}
|
|
840
|
-
) : onSkjermbilde ? /* @__PURE__ */ jsx2(
|
|
841
|
-
Btn,
|
|
842
|
-
{
|
|
843
|
-
variant: "secondary",
|
|
844
|
-
testID: "legg-ved-skjermbilde",
|
|
845
|
-
ikon: "\u{1F4F7}",
|
|
846
|
-
label: tekst.leggVedSkjermbilde,
|
|
847
|
-
hint: tekst.leggVedHint,
|
|
848
|
-
onPress: onSkjermbilde
|
|
849
|
-
}
|
|
850
|
-
) : null,
|
|
851
|
-
/* @__PURE__ */ jsxs2(View2, { style: { borderTopWidth: tema.hairline, borderTopColor: tema.color.border, paddingTop: tema.space.sm }, children: [
|
|
852
|
-
/* @__PURE__ */ jsx2(
|
|
853
|
-
Pressable2,
|
|
854
|
-
{
|
|
855
|
-
testID: "kontekst-bryter",
|
|
856
|
-
accessibilityRole: "button",
|
|
857
|
-
accessibilityState: { expanded: apen },
|
|
858
|
-
accessibilityLabel: `${tekst.kontekstLinje}${apen ? "" : tekst.kontekstVis}`,
|
|
859
|
-
onPress: () => setApen((a) => !a),
|
|
860
|
-
style: { minHeight: tema.touch, justifyContent: "center" },
|
|
861
|
-
children: /* @__PURE__ */ jsxs2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
862
|
-
apen ? "\u25B4" : "\u25BE",
|
|
863
|
-
" ",
|
|
864
|
-
tekst.kontekstLinje,
|
|
865
|
-
apen ? "" : tekst.kontekstVis
|
|
866
|
-
] })
|
|
867
|
-
}
|
|
868
|
-
),
|
|
869
|
-
apen ? /* @__PURE__ */ jsxs2(View2, { children: [
|
|
870
|
-
linjer.map((l) => /* @__PURE__ */ jsxs2(
|
|
871
|
-
View2,
|
|
872
|
-
{
|
|
873
|
-
style: {
|
|
874
|
-
flexDirection: "row",
|
|
875
|
-
alignItems: "center",
|
|
876
|
-
gap: tema.space.sm,
|
|
877
|
-
minHeight: tema.touch,
|
|
878
|
-
borderBottomWidth: tema.hairline,
|
|
879
|
-
borderBottomColor: tema.color.border
|
|
880
|
-
},
|
|
881
|
-
children: [
|
|
882
|
-
/* @__PURE__ */ jsx2(Text2, { style: { color: tema.color.textMuted, fontSize: tema.font.small, minWidth: tema.touch * 2 }, children: l.etikett }),
|
|
883
|
-
/* @__PURE__ */ jsx2(Text2, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: l.verdi }),
|
|
884
|
-
/* @__PURE__ */ jsx2(
|
|
885
|
-
Pressable2,
|
|
886
|
-
{
|
|
887
|
-
testID: `fjern-${l.felt}`,
|
|
888
|
-
accessibilityRole: "button",
|
|
889
|
-
accessibilityLabel: `${tekst.kontekstFjern} ${l.etikett.toLowerCase()} fra innsendingen`,
|
|
890
|
-
onPress: () => onFjernKontekst(l.felt),
|
|
891
|
-
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
892
|
-
children: /* @__PURE__ */ jsxs2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
893
|
-
"\u2715 ",
|
|
894
|
-
tekst.kontekstFjern
|
|
895
|
-
] })
|
|
896
|
-
}
|
|
897
|
-
)
|
|
898
|
-
]
|
|
899
|
-
},
|
|
900
|
-
l.felt
|
|
901
|
-
)),
|
|
902
|
-
/* @__PURE__ */ jsx2(View2, { style: { paddingTop: tema.space.sm }, children: /* @__PURE__ */ jsx2(Hint, { children: tekst.kontekstAldri }) })
|
|
903
|
-
] }) : null
|
|
904
|
-
] }),
|
|
905
|
-
/* @__PURE__ */ jsx2(View2, { style: { flex: 1, justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx2(
|
|
916
|
+
/* @__PURE__ */ jsx2(View2, { testID: "skjema-fot", style: { flexGrow: 1, flexShrink: 0, justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx2(
|
|
906
917
|
Btn,
|
|
907
918
|
{
|
|
908
919
|
testID: "send",
|
|
@@ -969,7 +980,7 @@ function Valg({ onVelg }) {
|
|
|
969
980
|
|
|
970
981
|
// src/widget/KjenteFeil.tsx
|
|
971
982
|
import "react";
|
|
972
|
-
import { ActivityIndicator, Text as Text4, View as View4 } from "react-native";
|
|
983
|
+
import { ActivityIndicator, ScrollView as ScrollView2, Text as Text4, View as View4 } from "react-native";
|
|
973
984
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
974
985
|
function KjenteFeil({
|
|
975
986
|
kort,
|
|
@@ -986,73 +997,82 @@ function KjenteFeil({
|
|
|
986
997
|
/* @__PURE__ */ jsx4(ActivityIndicator, { accessibilityLabel: "Sjekker kjente feil", color: tema.color.textSecondary })
|
|
987
998
|
] });
|
|
988
999
|
}
|
|
989
|
-
return /* @__PURE__ */ jsxs4(View4, { style: {
|
|
1000
|
+
return /* @__PURE__ */ jsxs4(View4, { testID: "kjente-feil", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
990
1001
|
/* @__PURE__ */ jsx4(H, { sub: spor === "onske" ? tekst.kjenteFeilUnderOnske : tekst.kjenteFeilUnderFeil, children: spor === "onske" ? tekst.kjenteFeilTittelOnske : tekst.kjenteFeilTittelFeil }),
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
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
|
-
|
|
1002
|
+
/* @__PURE__ */ jsx4(
|
|
1003
|
+
ScrollView2,
|
|
1004
|
+
{
|
|
1005
|
+
testID: "kjente-feil-liste",
|
|
1006
|
+
style: { flexGrow: 0, flexShrink: 1 },
|
|
1007
|
+
contentContainerStyle: { gap: tema.space.md },
|
|
1008
|
+
keyboardShouldPersistTaps: "handled",
|
|
1009
|
+
children: kort.map((k) => {
|
|
1010
|
+
const versjon = k.fixedIn ? k.status === "fikset" ? tekst.rettetI(k.fixedIn) : tekst.rettesI(k.fixedIn) : void 0;
|
|
1011
|
+
const kontekst = versjon ? `${k.title}. ${versjon}` : k.title;
|
|
1012
|
+
return /* @__PURE__ */ jsxs4(Card, { children: [
|
|
1013
|
+
/* @__PURE__ */ jsx4(
|
|
1014
|
+
Text4,
|
|
1015
|
+
{
|
|
1016
|
+
style: {
|
|
1017
|
+
color: tema.color.textPrimary,
|
|
1018
|
+
fontSize: tema.font.body,
|
|
1019
|
+
lineHeight: tema.lineHeight.body,
|
|
1020
|
+
fontWeight: tema.weight.medium
|
|
1021
|
+
},
|
|
1022
|
+
children: k.title
|
|
1023
|
+
}
|
|
1024
|
+
),
|
|
1025
|
+
k.workaround ? /* @__PURE__ */ jsxs4(
|
|
1026
|
+
Text4,
|
|
1027
|
+
{
|
|
1028
|
+
style: {
|
|
1029
|
+
color: tema.color.textSecondary,
|
|
1030
|
+
fontSize: tema.font.small,
|
|
1031
|
+
lineHeight: tema.lineHeight.small
|
|
1032
|
+
},
|
|
1033
|
+
children: [
|
|
1034
|
+
tekst.omvei,
|
|
1035
|
+
" ",
|
|
1036
|
+
k.workaround
|
|
1037
|
+
]
|
|
1038
|
+
}
|
|
1039
|
+
) : null,
|
|
1040
|
+
versjon ? /* @__PURE__ */ jsx4(
|
|
1041
|
+
StatusPill,
|
|
1042
|
+
{
|
|
1043
|
+
ikon: k.status === "fikset" ? "\u2713" : "\u{1F527}",
|
|
1044
|
+
etikett: versjon,
|
|
1045
|
+
farge: k.status === "fikset" ? "success" : "info"
|
|
1046
|
+
}
|
|
1047
|
+
) : null,
|
|
1048
|
+
/* @__PURE__ */ jsxs4(View4, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
1049
|
+
/* @__PURE__ */ jsx4(
|
|
1050
|
+
Btn,
|
|
1051
|
+
{
|
|
1052
|
+
grow: true,
|
|
1053
|
+
testID: `ja-ogsa-${k.id}`,
|
|
1054
|
+
label: tekst.svarJa,
|
|
1055
|
+
accessibilityLabel: `${tekst.svarJa}. ${kontekst}`,
|
|
1056
|
+
onPress: () => onJaOgsa(k)
|
|
1057
|
+
}
|
|
1058
|
+
),
|
|
1059
|
+
/* @__PURE__ */ jsx4(
|
|
1060
|
+
Btn,
|
|
1061
|
+
{
|
|
1062
|
+
grow: true,
|
|
1063
|
+
variant: "secondary",
|
|
1064
|
+
testID: `ligner-${k.id}`,
|
|
1065
|
+
label: tekst.svarLigner,
|
|
1066
|
+
accessibilityLabel: `${tekst.svarLigner}. ${kontekst}`,
|
|
1067
|
+
onPress: () => onLigner(k)
|
|
1068
|
+
}
|
|
1069
|
+
)
|
|
1070
|
+
] })
|
|
1071
|
+
] }, k.id);
|
|
1072
|
+
})
|
|
1073
|
+
}
|
|
1074
|
+
),
|
|
1075
|
+
/* @__PURE__ */ jsx4(View4, { testID: "kjente-feil-fot", style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx4(Btn, { variant: "secondary", testID: "nei-noe-annet", label: tekst.svarNei, onPress: onNei }) })
|
|
1056
1076
|
] });
|
|
1057
1077
|
}
|
|
1058
1078
|
|
|
@@ -1114,7 +1134,7 @@ function Kvittering({
|
|
|
1114
1134
|
|
|
1115
1135
|
// src/widget/MineInnspill.tsx
|
|
1116
1136
|
import "react";
|
|
1117
|
-
import { ActivityIndicator as ActivityIndicator2, ScrollView, Text as Text6, View as View6 } from "react-native";
|
|
1137
|
+
import { ActivityIndicator as ActivityIndicator2, ScrollView as ScrollView3, Text as Text6, View as View6 } from "react-native";
|
|
1118
1138
|
|
|
1119
1139
|
// src/widget/status.ts
|
|
1120
1140
|
var IKON = {
|
|
@@ -1181,7 +1201,7 @@ function MineInnspill({
|
|
|
1181
1201
|
const tema = useTema();
|
|
1182
1202
|
return /* @__PURE__ */ jsxs6(View6, { style: { flex: 1, gap: tema.space.md }, children: [
|
|
1183
1203
|
/* @__PURE__ */ jsx6(H, { sub: tekst.mineUnder, children: tekst.mineTittel }),
|
|
1184
|
-
laster ? /* @__PURE__ */ jsx6(ActivityIndicator2, { accessibilityLabel: "Henter innspillene dine", color: tema.color.textSecondary }) : rader.length === 0 ? /* @__PURE__ */ jsx6(Hint, { children: tekst.mineTom }) : /* @__PURE__ */ jsx6(
|
|
1204
|
+
laster ? /* @__PURE__ */ jsx6(ActivityIndicator2, { accessibilityLabel: "Henter innspillene dine", color: tema.color.textSecondary }) : rader.length === 0 ? /* @__PURE__ */ jsx6(Hint, { children: tekst.mineTom }) : /* @__PURE__ */ jsx6(ScrollView3, { style: { flex: 1 }, contentContainerStyle: { gap: tema.space.sm }, children: rader.map((rad) => {
|
|
1185
1205
|
const venter = rad.pending === true;
|
|
1186
1206
|
const v = venter ? venterVisning : statusVisning(rad.status, rad.type, rad.deadlineAt);
|
|
1187
1207
|
const nokkel = venter ? rad.clientRef : rad.id;
|
|
@@ -1850,7 +1870,7 @@ import { Modal as Modal4, Pressable as Pressable8, Text as Text13, View as View1
|
|
|
1850
1870
|
|
|
1851
1871
|
// src/program/Aksept.tsx
|
|
1852
1872
|
import "react";
|
|
1853
|
-
import { Linking, Modal as Modal2, Pressable as Pressable6, ScrollView as
|
|
1873
|
+
import { Linking, Modal as Modal2, Pressable as Pressable6, ScrollView as ScrollView4, Text as Text9, View as View11 } from "react-native";
|
|
1854
1874
|
|
|
1855
1875
|
// src/program/periode.ts
|
|
1856
1876
|
var MANEDER = [
|
|
@@ -1916,7 +1936,7 @@ function Aksept({
|
|
|
1916
1936
|
/* @__PURE__ */ jsx11(View11, {})
|
|
1917
1937
|
] }),
|
|
1918
1938
|
feil ? /* @__PURE__ */ jsx11(Banner, { live: true, ikon: "\u26A0", tone: "danger", children: tekst.akseptFeil(feil) }) : null,
|
|
1919
|
-
/* @__PURE__ */ jsxs10(
|
|
1939
|
+
/* @__PURE__ */ jsxs10(ScrollView4, { contentContainerStyle: { gap: tema.space.md }, children: [
|
|
1920
1940
|
/* @__PURE__ */ jsx11(H, { sub: tekst.akseptHva, children: program.name }),
|
|
1921
1941
|
/* @__PURE__ */ jsx11(
|
|
1922
1942
|
Text9,
|