@innspel/react-native 0.4.1 → 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/README.md +13 -3
- package/dist/index.cjs +418 -373
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +428 -383
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/InnspelProvider.tsx
|
|
2
|
-
import { createContext as createContext3, useCallback as useCallback3, useContext as
|
|
2
|
+
import { createContext as createContext3, useCallback as useCallback3, useContext as useContext4, useMemo as useMemo3, useRef as useRef3, useState as useState4 } from "react";
|
|
3
3
|
import { View as View9 } from "react-native";
|
|
4
4
|
|
|
5
5
|
// src/skjermbilde.ts
|
|
@@ -102,6 +102,7 @@ var t = {
|
|
|
102
102
|
pill: 999
|
|
103
103
|
},
|
|
104
104
|
font: {
|
|
105
|
+
display: 40,
|
|
105
106
|
h1: 24,
|
|
106
107
|
h2: 21,
|
|
107
108
|
h3: 18,
|
|
@@ -110,6 +111,7 @@ var t = {
|
|
|
110
111
|
tiny: 11
|
|
111
112
|
},
|
|
112
113
|
lineHeight: {
|
|
114
|
+
display: 48,
|
|
113
115
|
h1: 30,
|
|
114
116
|
h2: 27,
|
|
115
117
|
h3: 24,
|
|
@@ -128,6 +130,7 @@ var t = {
|
|
|
128
130
|
base: 200,
|
|
129
131
|
slow: 320
|
|
130
132
|
},
|
|
133
|
+
icon: { inline: 20, minste: 16 },
|
|
131
134
|
touch: 48,
|
|
132
135
|
screenPadding: 24,
|
|
133
136
|
hairline: 1
|
|
@@ -186,6 +189,7 @@ var light = {
|
|
|
186
189
|
pill: 999
|
|
187
190
|
},
|
|
188
191
|
font: {
|
|
192
|
+
display: 40,
|
|
189
193
|
h1: 24,
|
|
190
194
|
h2: 21,
|
|
191
195
|
h3: 18,
|
|
@@ -194,6 +198,7 @@ var light = {
|
|
|
194
198
|
tiny: 11
|
|
195
199
|
},
|
|
196
200
|
lineHeight: {
|
|
201
|
+
display: 48,
|
|
197
202
|
h1: 30,
|
|
198
203
|
h2: 27,
|
|
199
204
|
h3: 24,
|
|
@@ -212,6 +217,7 @@ var light = {
|
|
|
212
217
|
base: 200,
|
|
213
218
|
slow: 320
|
|
214
219
|
},
|
|
220
|
+
icon: { inline: 20, minste: 16 },
|
|
215
221
|
touch: 48,
|
|
216
222
|
screenPadding: 24,
|
|
217
223
|
hairline: 1
|
|
@@ -246,12 +252,13 @@ import {
|
|
|
246
252
|
InnspelApiError,
|
|
247
253
|
InnspelQueueFullError
|
|
248
254
|
} from "@innspel/core";
|
|
249
|
-
import { useCallback as useCallback2, useEffect, useRef as useRef2, useState as useState3 } from "react";
|
|
250
|
-
import { Modal, Pressable as Pressable5, Text as Text8, View as View8 } from "react-native";
|
|
255
|
+
import { useCallback as useCallback2, useContext as useContext3, useEffect, useRef as useRef2, useState as useState3 } from "react";
|
|
256
|
+
import { KeyboardAvoidingView, Modal, Pressable as Pressable5, Text as Text8, View as View8 } from "react-native";
|
|
257
|
+
import { initialWindowMetrics, SafeAreaInsetsContext } from "react-native-safe-area-context";
|
|
251
258
|
|
|
252
259
|
// src/widget/Felt.tsx
|
|
253
260
|
import { useMemo, useState } from "react";
|
|
254
|
-
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";
|
|
255
262
|
|
|
256
263
|
// src/widget/primitiver.tsx
|
|
257
264
|
import "react";
|
|
@@ -468,7 +475,13 @@ var tekst = {
|
|
|
468
475
|
rettesI: (versjon) => `Rettes i ${versjon}`,
|
|
469
476
|
rettetI: (versjon) => `Rettet i ${versjon}`,
|
|
470
477
|
// 2d + 2e — feltet og kontekstlinja
|
|
471
|
-
|
|
478
|
+
/**
|
|
479
|
+
* «Ditt innspill», ikke «Din feil» (DD-54). «Din» festet saken til personen, og
|
|
480
|
+
* «feil» karakteriserte den før noen hadde lest den — innsenderen leste det som
|
|
481
|
+
* skyld. Ønskesporet beholder «Ditt ønske»: et ønske er ingen feil, og der finnes
|
|
482
|
+
* ikke problemet. De to står aldri ved siden av hverandre; sporet velges før dette.
|
|
483
|
+
*/
|
|
484
|
+
feltLabelFeil: "Ditt innspill",
|
|
472
485
|
feltLabelOnske: "Ditt \xF8nske",
|
|
473
486
|
/** DD-45: to spørsmål i feilsporet. Kilde: Sentry «What's the bug? What did you expect?» */
|
|
474
487
|
placeholderFeil: "Hva skjedde? Hva forventet du?",
|
|
@@ -667,229 +680,240 @@ function Felt({
|
|
|
667
680
|
return verdi2 && !fjernedeFelter.includes(felt) ? { felt, etikett, verdi: verdi2 } : null;
|
|
668
681
|
}).filter((x) => x !== null);
|
|
669
682
|
}, [kontekst, fjernedeFelter]);
|
|
670
|
-
return /* @__PURE__ */ jsxs2(View2, { style: {
|
|
671
|
-
|
|
672
|
-
|
|
683
|
+
return /* @__PURE__ */ jsxs2(View2, { testID: "skjema", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
684
|
+
/* @__PURE__ */ jsxs2(
|
|
685
|
+
ScrollView,
|
|
673
686
|
{
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
minHeight: tema.touch,
|
|
679
|
-
borderWidth: tema.hairline,
|
|
680
|
-
borderColor: tema.color.borderInteractive,
|
|
681
|
-
borderRadius: tema.radius.pill,
|
|
682
|
-
paddingLeft: tema.space.md,
|
|
683
|
-
paddingRight: tema.space.xs
|
|
684
|
-
},
|
|
687
|
+
testID: "skjema-kropp",
|
|
688
|
+
style: { flexGrow: 0, flexShrink: 1 },
|
|
689
|
+
contentContainerStyle: { gap: tema.space.md },
|
|
690
|
+
keyboardShouldPersistTaps: "handled",
|
|
685
691
|
children: [
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
|
|
688
|
-
Pressable2,
|
|
692
|
+
lenketTil ? /* @__PURE__ */ jsxs2(
|
|
693
|
+
View2,
|
|
689
694
|
{
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
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
|
+
]
|
|
696
720
|
}
|
|
697
|
-
)
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
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 }),
|
|
711
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(
|
|
712
800
|
Text2,
|
|
713
801
|
{
|
|
714
|
-
|
|
715
|
-
accessibilityLiveRegion: "polite",
|
|
802
|
+
testID: "teller",
|
|
803
|
+
accessibilityLiveRegion: full ? "assertive" : "polite",
|
|
716
804
|
style: {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
fontWeight: tema.weight.medium
|
|
805
|
+
alignSelf: "flex-end",
|
|
806
|
+
color: full ? tema.color.warning : tema.color.textMuted,
|
|
807
|
+
fontSize: tema.font.small
|
|
721
808
|
},
|
|
722
|
-
children:
|
|
809
|
+
children: [
|
|
810
|
+
brukt,
|
|
811
|
+
" / ",
|
|
812
|
+
textMaxLength,
|
|
813
|
+
full ? tekst.tellerFull : ""
|
|
814
|
+
]
|
|
723
815
|
}
|
|
724
|
-
),
|
|
725
|
-
/* @__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: [
|
|
726
860
|
/* @__PURE__ */ jsx2(
|
|
727
|
-
|
|
861
|
+
Pressable2,
|
|
728
862
|
{
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
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
|
+
] })
|
|
734
875
|
}
|
|
735
876
|
),
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
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
|
+
] })
|
|
748
913
|
]
|
|
749
914
|
}
|
|
750
|
-
) : null,
|
|
751
|
-
/* @__PURE__ */ jsx2(H, { children: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil }),
|
|
752
|
-
/* @__PURE__ */ jsx2(
|
|
753
|
-
TextInput,
|
|
754
|
-
{
|
|
755
|
-
testID: "innspill-tekst",
|
|
756
|
-
accessibilityLabel: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil,
|
|
757
|
-
value: verdi,
|
|
758
|
-
onChangeText: onEndre,
|
|
759
|
-
maxLength: textMaxLength,
|
|
760
|
-
multiline: true,
|
|
761
|
-
numberOfLines: 4,
|
|
762
|
-
placeholder: spor === "onske" ? tekst.placeholderOnske : tekst.placeholderFeil,
|
|
763
|
-
placeholderTextColor: tema.color.textMuted,
|
|
764
|
-
style: {
|
|
765
|
-
backgroundColor: tema.color.surfaceRaised,
|
|
766
|
-
borderWidth: tema.hairline,
|
|
767
|
-
borderColor: full ? tema.color.warning : tema.color.borderStrong,
|
|
768
|
-
borderRadius: tema.radius.md,
|
|
769
|
-
padding: tema.space.md,
|
|
770
|
-
color: tema.color.textPrimary,
|
|
771
|
-
fontSize: tema.font.body,
|
|
772
|
-
lineHeight: tema.lineHeight.body,
|
|
773
|
-
minHeight: tema.touch * 2,
|
|
774
|
-
textAlignVertical: "top"
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
915
|
),
|
|
778
|
-
|
|
779
|
-
Text2,
|
|
780
|
-
{
|
|
781
|
-
testID: "teller",
|
|
782
|
-
accessibilityLiveRegion: full ? "assertive" : "polite",
|
|
783
|
-
style: {
|
|
784
|
-
alignSelf: "flex-end",
|
|
785
|
-
color: full ? tema.color.warning : tema.color.textMuted,
|
|
786
|
-
fontSize: tema.font.small
|
|
787
|
-
},
|
|
788
|
-
children: [
|
|
789
|
-
brukt,
|
|
790
|
-
" / ",
|
|
791
|
-
textMaxLength,
|
|
792
|
-
full ? tekst.tellerFull : ""
|
|
793
|
-
]
|
|
794
|
-
}
|
|
795
|
-
) : null,
|
|
796
|
-
harVedlegg ? /* @__PURE__ */ jsxs2(
|
|
797
|
-
View2,
|
|
798
|
-
{
|
|
799
|
-
testID: "vedlegg-chip",
|
|
800
|
-
style: {
|
|
801
|
-
flexDirection: "row",
|
|
802
|
-
alignItems: "center",
|
|
803
|
-
gap: tema.space.sm,
|
|
804
|
-
minHeight: tema.touch,
|
|
805
|
-
borderWidth: tema.hairline,
|
|
806
|
-
borderColor: tema.color.borderInteractive,
|
|
807
|
-
borderRadius: tema.radius.pill,
|
|
808
|
-
paddingLeft: tema.space.md,
|
|
809
|
-
paddingRight: tema.space.xs
|
|
810
|
-
},
|
|
811
|
-
children: [
|
|
812
|
-
/* @__PURE__ */ jsx2(Text2, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { fontSize: tema.font.small }, children: "\u{1F4F7}" }),
|
|
813
|
-
/* @__PURE__ */ jsx2(Text2, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.skjermbildeLagtVed }),
|
|
814
|
-
/* @__PURE__ */ jsx2(
|
|
815
|
-
Pressable2,
|
|
816
|
-
{
|
|
817
|
-
testID: "fjern-vedlegg",
|
|
818
|
-
accessibilityRole: "button",
|
|
819
|
-
accessibilityLabel: tekst.fjernSkjermbilde,
|
|
820
|
-
onPress: onFjernVedlegg,
|
|
821
|
-
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
822
|
-
children: /* @__PURE__ */ jsx2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: "\u2715" })
|
|
823
|
-
}
|
|
824
|
-
)
|
|
825
|
-
]
|
|
826
|
-
}
|
|
827
|
-
) : onSkjermbilde ? /* @__PURE__ */ jsx2(
|
|
828
|
-
Btn,
|
|
829
|
-
{
|
|
830
|
-
variant: "secondary",
|
|
831
|
-
testID: "legg-ved-skjermbilde",
|
|
832
|
-
ikon: "\u{1F4F7}",
|
|
833
|
-
label: tekst.leggVedSkjermbilde,
|
|
834
|
-
hint: tekst.leggVedHint,
|
|
835
|
-
onPress: onSkjermbilde
|
|
836
|
-
}
|
|
837
|
-
) : null,
|
|
838
|
-
/* @__PURE__ */ jsxs2(View2, { style: { borderTopWidth: tema.hairline, borderTopColor: tema.color.border, paddingTop: tema.space.sm }, children: [
|
|
839
|
-
/* @__PURE__ */ jsx2(
|
|
840
|
-
Pressable2,
|
|
841
|
-
{
|
|
842
|
-
testID: "kontekst-bryter",
|
|
843
|
-
accessibilityRole: "button",
|
|
844
|
-
accessibilityState: { expanded: apen },
|
|
845
|
-
accessibilityLabel: `${tekst.kontekstLinje}${apen ? "" : tekst.kontekstVis}`,
|
|
846
|
-
onPress: () => setApen((a) => !a),
|
|
847
|
-
style: { minHeight: tema.touch, justifyContent: "center" },
|
|
848
|
-
children: /* @__PURE__ */ jsxs2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
849
|
-
apen ? "\u25B4" : "\u25BE",
|
|
850
|
-
" ",
|
|
851
|
-
tekst.kontekstLinje,
|
|
852
|
-
apen ? "" : tekst.kontekstVis
|
|
853
|
-
] })
|
|
854
|
-
}
|
|
855
|
-
),
|
|
856
|
-
apen ? /* @__PURE__ */ jsxs2(View2, { children: [
|
|
857
|
-
linjer.map((l) => /* @__PURE__ */ jsxs2(
|
|
858
|
-
View2,
|
|
859
|
-
{
|
|
860
|
-
style: {
|
|
861
|
-
flexDirection: "row",
|
|
862
|
-
alignItems: "center",
|
|
863
|
-
gap: tema.space.sm,
|
|
864
|
-
minHeight: tema.touch,
|
|
865
|
-
borderBottomWidth: tema.hairline,
|
|
866
|
-
borderBottomColor: tema.color.border
|
|
867
|
-
},
|
|
868
|
-
children: [
|
|
869
|
-
/* @__PURE__ */ jsx2(Text2, { style: { color: tema.color.textMuted, fontSize: tema.font.small, minWidth: tema.touch * 2 }, children: l.etikett }),
|
|
870
|
-
/* @__PURE__ */ jsx2(Text2, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: l.verdi }),
|
|
871
|
-
/* @__PURE__ */ jsx2(
|
|
872
|
-
Pressable2,
|
|
873
|
-
{
|
|
874
|
-
testID: `fjern-${l.felt}`,
|
|
875
|
-
accessibilityRole: "button",
|
|
876
|
-
accessibilityLabel: `${tekst.kontekstFjern} ${l.etikett.toLowerCase()} fra innsendingen`,
|
|
877
|
-
onPress: () => onFjernKontekst(l.felt),
|
|
878
|
-
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
879
|
-
children: /* @__PURE__ */ jsxs2(Text2, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
880
|
-
"\u2715 ",
|
|
881
|
-
tekst.kontekstFjern
|
|
882
|
-
] })
|
|
883
|
-
}
|
|
884
|
-
)
|
|
885
|
-
]
|
|
886
|
-
},
|
|
887
|
-
l.felt
|
|
888
|
-
)),
|
|
889
|
-
/* @__PURE__ */ jsx2(View2, { style: { paddingTop: tema.space.sm }, children: /* @__PURE__ */ jsx2(Hint, { children: tekst.kontekstAldri }) })
|
|
890
|
-
] }) : null
|
|
891
|
-
] }),
|
|
892
|
-
/* @__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(
|
|
893
917
|
Btn,
|
|
894
918
|
{
|
|
895
919
|
testID: "send",
|
|
@@ -956,7 +980,7 @@ function Valg({ onVelg }) {
|
|
|
956
980
|
|
|
957
981
|
// src/widget/KjenteFeil.tsx
|
|
958
982
|
import "react";
|
|
959
|
-
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";
|
|
960
984
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
961
985
|
function KjenteFeil({
|
|
962
986
|
kort,
|
|
@@ -973,73 +997,82 @@ function KjenteFeil({
|
|
|
973
997
|
/* @__PURE__ */ jsx4(ActivityIndicator, { accessibilityLabel: "Sjekker kjente feil", color: tema.color.textSecondary })
|
|
974
998
|
] });
|
|
975
999
|
}
|
|
976
|
-
return /* @__PURE__ */ jsxs4(View4, { style: {
|
|
1000
|
+
return /* @__PURE__ */ jsxs4(View4, { testID: "kjente-feil", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
977
1001
|
/* @__PURE__ */ jsx4(H, { sub: spor === "onske" ? tekst.kjenteFeilUnderOnske : tekst.kjenteFeilUnderFeil, children: spor === "onske" ? tekst.kjenteFeilTittelOnske : tekst.kjenteFeilTittelFeil }),
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
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
|
-
|
|
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 }) })
|
|
1043
1076
|
] });
|
|
1044
1077
|
}
|
|
1045
1078
|
|
|
@@ -1101,7 +1134,7 @@ function Kvittering({
|
|
|
1101
1134
|
|
|
1102
1135
|
// src/widget/MineInnspill.tsx
|
|
1103
1136
|
import "react";
|
|
1104
|
-
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";
|
|
1105
1138
|
|
|
1106
1139
|
// src/widget/status.ts
|
|
1107
1140
|
var IKON = {
|
|
@@ -1168,7 +1201,7 @@ function MineInnspill({
|
|
|
1168
1201
|
const tema = useTema();
|
|
1169
1202
|
return /* @__PURE__ */ jsxs6(View6, { style: { flex: 1, gap: tema.space.md }, children: [
|
|
1170
1203
|
/* @__PURE__ */ jsx6(H, { sub: tekst.mineUnder, children: tekst.mineTittel }),
|
|
1171
|
-
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) => {
|
|
1172
1205
|
const venter = rad.pending === true;
|
|
1173
1206
|
const v = venter ? venterVisning : statusVisning(rad.status, rad.type, rad.deadlineAt);
|
|
1174
1207
|
const nokkel = venter ? rad.clientRef : rad.id;
|
|
@@ -1437,6 +1470,7 @@ function Widget({
|
|
|
1437
1470
|
tenantName
|
|
1438
1471
|
}) {
|
|
1439
1472
|
const tema = useTema();
|
|
1473
|
+
const insets = useContext3(SafeAreaInsetsContext) ?? initialWindowMetrics?.insets ?? { top: 0, bottom: 0, left: 0, right: 0 };
|
|
1440
1474
|
const skjermbilde = useSkjermbilde();
|
|
1441
1475
|
const previewRef = useRef2(null);
|
|
1442
1476
|
const [steg, setSteg] = useState3("valg");
|
|
@@ -1630,108 +1664,119 @@ function Widget({
|
|
|
1630
1664
|
animationType: "slide",
|
|
1631
1665
|
onRequestClose: lukk,
|
|
1632
1666
|
accessibilityViewIsModal: true,
|
|
1633
|
-
children: /* @__PURE__ */ jsx8(
|
|
1634
|
-
|
|
1667
|
+
children: /* @__PURE__ */ jsx8(
|
|
1668
|
+
KeyboardAvoidingView,
|
|
1635
1669
|
{
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1670
|
+
behavior: "padding",
|
|
1671
|
+
keyboardVerticalOffset: -insets.bottom,
|
|
1672
|
+
style: { flex: 1, backgroundColor: tema.color.scrim, justifyContent: "flex-end", paddingTop: insets.top },
|
|
1673
|
+
children: /* @__PURE__ */ jsxs8(
|
|
1674
|
+
View8,
|
|
1675
|
+
{
|
|
1676
|
+
testID: "innspel-widget",
|
|
1677
|
+
accessibilityViewIsModal: true,
|
|
1678
|
+
accessibilityRole: "none",
|
|
1679
|
+
style: {
|
|
1680
|
+
backgroundColor: tema.color.bg,
|
|
1681
|
+
borderTopLeftRadius: tema.radius.lg * 2,
|
|
1682
|
+
borderTopRightRadius: tema.radius.lg * 2,
|
|
1683
|
+
padding: tema.screenPadding,
|
|
1684
|
+
paddingBottom: tema.screenPadding + insets.bottom,
|
|
1685
|
+
paddingLeft: tema.screenPadding + insets.left,
|
|
1686
|
+
paddingRight: tema.screenPadding + insets.right,
|
|
1687
|
+
gap: tema.space.md,
|
|
1688
|
+
maxHeight: "92%",
|
|
1689
|
+
minHeight: "60%"
|
|
1690
|
+
},
|
|
1691
|
+
children: [
|
|
1692
|
+
/* @__PURE__ */ jsxs8(View8, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
1693
|
+
steg === "skjermbilde" ? /* @__PURE__ */ jsx8(Btn, { variant: "ghost", testID: "tilbake", ikon: "\u2190", label: tekst.tilbake, onPress: fjernBilde }) : steg !== "valg" && steg !== "kvittering" ? /* @__PURE__ */ jsx8(Btn, { variant: "ghost", testID: "tilbake", ikon: "\u2190", label: tekst.tilbake, onPress: nullstill }) : /* @__PURE__ */ jsx8(View8, {}),
|
|
1694
|
+
/* @__PURE__ */ jsx8(
|
|
1695
|
+
Pressable5,
|
|
1696
|
+
{
|
|
1697
|
+
testID: "lukk",
|
|
1698
|
+
accessibilityRole: "button",
|
|
1699
|
+
accessibilityLabel: tekst.lukk,
|
|
1700
|
+
onPress: lukk,
|
|
1701
|
+
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
1702
|
+
children: /* @__PURE__ */ jsx8(Text8, { style: { color: tema.color.textSecondary, fontSize: tema.font.body }, children: "\u2715" })
|
|
1703
|
+
}
|
|
1704
|
+
)
|
|
1705
|
+
] }),
|
|
1706
|
+
feil ? /* @__PURE__ */ jsx8(Banner, { live: true, ikon: "\u26A0", tone: "danger", children: tekst.sendefeilBanner(feil) }) : null,
|
|
1707
|
+
steg === "valg" ? /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
1708
|
+
/* @__PURE__ */ jsx8(Valg, { onVelg: velgSpor }),
|
|
1709
|
+
/* @__PURE__ */ jsx8(Btn, { variant: "ghost", testID: "mine-innspill", ikon: "\u{1F4CB}", label: tekst.mineTittel, onPress: visMine })
|
|
1710
|
+
] }) : null,
|
|
1711
|
+
steg === "kjenteFeil" ? /* @__PURE__ */ jsx8(
|
|
1712
|
+
KjenteFeil,
|
|
1713
|
+
{
|
|
1714
|
+
kort,
|
|
1715
|
+
spor,
|
|
1716
|
+
laster: lasterKort,
|
|
1717
|
+
onJaOgsa: jaOgsa,
|
|
1718
|
+
onLigner: (k) => {
|
|
1719
|
+
setLenketTil(k);
|
|
1720
|
+
setSteg("felt");
|
|
1721
|
+
},
|
|
1722
|
+
onNei: () => spor === "onske" ? void send() : setSteg("felt")
|
|
1723
|
+
}
|
|
1724
|
+
) : null,
|
|
1725
|
+
steg === "felt" ? /* @__PURE__ */ jsx8(
|
|
1726
|
+
Felt,
|
|
1727
|
+
{
|
|
1728
|
+
spor,
|
|
1729
|
+
verdi,
|
|
1730
|
+
onEndre: endreTekst,
|
|
1731
|
+
minTextLength: innstillinger.minTextLength,
|
|
1732
|
+
textMaxLength: innstillinger.textMaxLength,
|
|
1733
|
+
kontekst: client.context,
|
|
1734
|
+
fjernedeFelter: fjernede,
|
|
1735
|
+
onFjernKontekst: (f) => setFjernede((x) => [...x, f]),
|
|
1736
|
+
...lenketTil ? { lenketTil, onFjernLenke: () => setLenketTil(void 0) } : {},
|
|
1737
|
+
funn,
|
|
1738
|
+
onSend: send,
|
|
1739
|
+
sender,
|
|
1740
|
+
...skjermbildeMulig ? { onSkjermbilde: taSkjermbilde } : {},
|
|
1741
|
+
harVedlegg: vedlegg !== void 0,
|
|
1742
|
+
onFjernVedlegg: fjernBilde
|
|
1743
|
+
}
|
|
1744
|
+
) : null,
|
|
1745
|
+
steg === "skjermbilde" && bilde ? /* @__PURE__ */ jsx8(
|
|
1746
|
+
Skjermbilde,
|
|
1747
|
+
{
|
|
1748
|
+
bilde,
|
|
1749
|
+
automaskerRot: automasker,
|
|
1750
|
+
rotStorrelse,
|
|
1751
|
+
previewRef,
|
|
1752
|
+
komponerer,
|
|
1753
|
+
onFjern: fjernBilde,
|
|
1754
|
+
onLeggVed: leggVedBilde
|
|
1755
|
+
}
|
|
1756
|
+
) : null,
|
|
1757
|
+
steg === "kvittering" && kvittering ? /* @__PURE__ */ jsx8(
|
|
1758
|
+
Kvittering,
|
|
1759
|
+
{
|
|
1760
|
+
art: kvittering.art,
|
|
1761
|
+
...kvittering.nr ? { saksnummer: kvittering.nr } : {},
|
|
1762
|
+
...kvittering.vedlegg ? { vedlegg: kvittering.vedlegg } : {},
|
|
1763
|
+
onLukk: lukk
|
|
1764
|
+
}
|
|
1765
|
+
) : null,
|
|
1766
|
+
steg === "mine" ? /* @__PURE__ */ jsx8(
|
|
1767
|
+
MineInnspill,
|
|
1768
|
+
{
|
|
1769
|
+
rader: mine,
|
|
1770
|
+
laster: lasterMine,
|
|
1771
|
+
...tenantName ? { tenantName } : {},
|
|
1772
|
+
onNytt: nullstill
|
|
1773
|
+
}
|
|
1774
|
+
) : null
|
|
1775
|
+
]
|
|
1776
|
+
}
|
|
1777
|
+
)
|
|
1733
1778
|
}
|
|
1734
|
-
)
|
|
1779
|
+
)
|
|
1735
1780
|
}
|
|
1736
1781
|
);
|
|
1737
1782
|
}
|
|
@@ -1792,7 +1837,7 @@ function InnspelProvider({
|
|
|
1792
1837
|
] }) }) });
|
|
1793
1838
|
}
|
|
1794
1839
|
function useInnspel() {
|
|
1795
|
-
const k =
|
|
1840
|
+
const k = useContext4(Kontekst);
|
|
1796
1841
|
if (!k) {
|
|
1797
1842
|
throw new Error(
|
|
1798
1843
|
"[innspel] useInnspel() ble kalt utenfor <InnspelProvider>. Pakk appen din i den \u2014 se README.md."
|
|
@@ -1825,7 +1870,7 @@ import { Modal as Modal4, Pressable as Pressable8, Text as Text13, View as View1
|
|
|
1825
1870
|
|
|
1826
1871
|
// src/program/Aksept.tsx
|
|
1827
1872
|
import "react";
|
|
1828
|
-
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";
|
|
1829
1874
|
|
|
1830
1875
|
// src/program/periode.ts
|
|
1831
1876
|
var MANEDER = [
|
|
@@ -1891,7 +1936,7 @@ function Aksept({
|
|
|
1891
1936
|
/* @__PURE__ */ jsx11(View11, {})
|
|
1892
1937
|
] }),
|
|
1893
1938
|
feil ? /* @__PURE__ */ jsx11(Banner, { live: true, ikon: "\u26A0", tone: "danger", children: tekst.akseptFeil(feil) }) : null,
|
|
1894
|
-
/* @__PURE__ */ jsxs10(
|
|
1939
|
+
/* @__PURE__ */ jsxs10(ScrollView4, { contentContainerStyle: { gap: tema.space.md }, children: [
|
|
1895
1940
|
/* @__PURE__ */ jsx11(H, { sub: tekst.akseptHva, children: program.name }),
|
|
1896
1941
|
/* @__PURE__ */ jsx11(
|
|
1897
1942
|
Text9,
|