@innspel/react-native 0.7.1 → 0.8.0
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 +19 -4
- package/dist/index.cjs +832 -498
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -50
- package/dist/index.d.ts +43 -50
- package/dist/index.js +684 -350
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.cjs
CHANGED
|
@@ -40,7 +40,7 @@ __export(index_exports, {
|
|
|
40
40
|
module.exports = __toCommonJS(index_exports);
|
|
41
41
|
|
|
42
42
|
// src/InnspelProvider.tsx
|
|
43
|
-
var
|
|
43
|
+
var import_react12 = require("react");
|
|
44
44
|
var import_react_native10 = require("react-native");
|
|
45
45
|
|
|
46
46
|
// src/skjermbilde.ts
|
|
@@ -273,11 +273,104 @@ var light = {
|
|
|
273
273
|
screenPadding: 24,
|
|
274
274
|
hairline: 1
|
|
275
275
|
};
|
|
276
|
+
var submissionStatus = {
|
|
277
|
+
ny: {
|
|
278
|
+
statusType: "reviewing",
|
|
279
|
+
ikon: "ellipse-outline",
|
|
280
|
+
etikett: { feil: "Mottatt", onske: "Mottatt" },
|
|
281
|
+
lofte: { feil: "Vi har f\xE5tt den. Du h\xF8rer fra oss.", onske: "Vi har f\xE5tt den. Du h\xF8rer fra oss." },
|
|
282
|
+
fg: "textSecondary",
|
|
283
|
+
bg: "neutralBg",
|
|
284
|
+
variant: "outline"
|
|
285
|
+
},
|
|
286
|
+
vurderes: {
|
|
287
|
+
statusType: "reviewing",
|
|
288
|
+
ikon: "hourglass-outline",
|
|
289
|
+
etikett: { feil: "Vurderes", onske: "Vurderes" },
|
|
290
|
+
lofte: { feil: "Svar innen {frist} \u2014 ogs\xE5 hvis det er nei.", onske: "Svar innen {frist} \u2014 ogs\xE5 hvis det er nei." },
|
|
291
|
+
fg: "info",
|
|
292
|
+
bg: "infoBg",
|
|
293
|
+
variant: "outline"
|
|
294
|
+
},
|
|
295
|
+
planlagt: {
|
|
296
|
+
statusType: "active",
|
|
297
|
+
ikon: "calendar-outline",
|
|
298
|
+
etikett: { feil: "Planlagt", onske: "Planlagt" },
|
|
299
|
+
lofte: { feil: "Du f\xE5r beskjed n\xE5r den er rettet.", onske: "Du f\xE5r beskjed n\xE5r det er levert." },
|
|
300
|
+
fg: "brand",
|
|
301
|
+
bg: "brandBg",
|
|
302
|
+
variant: "outline"
|
|
303
|
+
},
|
|
304
|
+
bygges: {
|
|
305
|
+
statusType: "active",
|
|
306
|
+
ikon: "construct-outline",
|
|
307
|
+
etikett: { feil: "Retter n\xE5", onske: "Bygger" },
|
|
308
|
+
lofte: { feil: "Du f\xE5r beskjed n\xE5r den er rettet.", onske: "Du f\xE5r beskjed n\xE5r det er levert." },
|
|
309
|
+
fg: "brand",
|
|
310
|
+
bg: "brandBg",
|
|
311
|
+
variant: "filled"
|
|
312
|
+
},
|
|
313
|
+
kjent_feil: {
|
|
314
|
+
statusType: "active",
|
|
315
|
+
ikon: "warning-outline",
|
|
316
|
+
etikett: { feil: "Kjent feil", onske: "Kjent feil" },
|
|
317
|
+
lofte: { feil: "Kjent feil. Du f\xE5r beskjed n\xE5r den er rettet.", onske: "Kjent feil. Du f\xE5r beskjed n\xE5r den er rettet." },
|
|
318
|
+
fg: "warning",
|
|
319
|
+
bg: "warningBg",
|
|
320
|
+
variant: "outline"
|
|
321
|
+
},
|
|
322
|
+
levert: {
|
|
323
|
+
statusType: "complete",
|
|
324
|
+
ikon: "checkmark-circle-outline",
|
|
325
|
+
etikett: { feil: "Rettet", onske: "Levert" },
|
|
326
|
+
lofte: { feil: "Ferdig. Ser du feilen igjen, send et nytt innspill.", onske: "Ferdig. Takk for \xF8nsket." },
|
|
327
|
+
fg: "success",
|
|
328
|
+
bg: "successBg",
|
|
329
|
+
variant: "outline"
|
|
330
|
+
},
|
|
331
|
+
avvist: {
|
|
332
|
+
statusType: "closed",
|
|
333
|
+
ikon: "close-circle-outline",
|
|
334
|
+
etikett: { feil: "Avvist", onske: "Avvist" },
|
|
335
|
+
lofte: { feil: "Vi har svart p\xE5 denne.", onske: "Vi har svart p\xE5 denne." },
|
|
336
|
+
fg: "danger",
|
|
337
|
+
bg: "dangerBg",
|
|
338
|
+
variant: "outline"
|
|
339
|
+
},
|
|
340
|
+
duplikat: {
|
|
341
|
+
statusType: "closed",
|
|
342
|
+
ikon: "git-merge-outline",
|
|
343
|
+
etikett: { feil: "Sl\xE5tt sammen", onske: "Sl\xE5tt sammen" },
|
|
344
|
+
lofte: { feil: "Sl\xE5tt sammen med et innspill som ligner.", onske: "Sl\xE5tt sammen med et innspill som ligner." },
|
|
345
|
+
fg: "neutral",
|
|
346
|
+
bg: "neutralBg",
|
|
347
|
+
variant: "outline"
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
var knownIssueStatus = {
|
|
351
|
+
aktiv: {
|
|
352
|
+
ikon: "warning-outline",
|
|
353
|
+
etikett: "Aktiv",
|
|
354
|
+
fg: "warning",
|
|
355
|
+
bg: "warningBg",
|
|
356
|
+
variant: "outline"
|
|
357
|
+
},
|
|
358
|
+
fikset: {
|
|
359
|
+
ikon: "checkmark-circle-outline",
|
|
360
|
+
etikett: "Rettet",
|
|
361
|
+
fg: "success",
|
|
362
|
+
bg: "successBg",
|
|
363
|
+
variant: "dashed"
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
var lofteUtenFrist = "Du f\xE5r svar \u2014 ogs\xE5 hvis det er nei.";
|
|
276
367
|
var screenRules = {
|
|
277
368
|
brushFill: "#E5007D",
|
|
278
369
|
autoMaskFill: "#101114",
|
|
279
370
|
autoMaskStroke: "#E5007D",
|
|
371
|
+
autoMaskText: "#FFFFFF",
|
|
280
372
|
previewBackdrop: "#000000",
|
|
373
|
+
qrBackdrop: "#FFFFFF",
|
|
281
374
|
brushWidth: 28,
|
|
282
375
|
textBlurRadius: 24
|
|
283
376
|
};
|
|
@@ -300,18 +393,169 @@ function useTema() {
|
|
|
300
393
|
|
|
301
394
|
// src/widget/Widget.tsx
|
|
302
395
|
var import_core2 = require("@innspel/core");
|
|
303
|
-
var
|
|
396
|
+
var import_react11 = require("react");
|
|
304
397
|
var import_react_native9 = require("react-native");
|
|
305
398
|
var import_react_native_safe_area_context = require("react-native-safe-area-context");
|
|
306
399
|
|
|
400
|
+
// src/Ikon.tsx
|
|
401
|
+
var import_react3 = require("react");
|
|
402
|
+
var import_react_native_svg = require("react-native-svg");
|
|
403
|
+
|
|
404
|
+
// ../../node_modules/ionicons/dist/svg/arrow-back-outline.svg
|
|
405
|
+
var arrow_back_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M244 400 100 256l144-144M120 256h292" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48px"/></svg>';
|
|
406
|
+
|
|
407
|
+
// ../../node_modules/ionicons/dist/svg/brush-outline.svg
|
|
408
|
+
var brush_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M452.37 59.63a40.49 40.49 0 0 0-57.26 0L184 294.74c23.08 4.7 46.12 27.29 49.26 49.26l219.11-227.11a40.49 40.49 0 0 0 0-57.26M138 336c-29.88 0-54 24.5-54 54.86 0 23.95-20.88 36.57-36 36.57C64.56 449.74 92.82 464 120 464c39.78 0 72-32.73 72-73.14 0-30.36-24.12-54.86-54-54.86" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
409
|
+
|
|
410
|
+
// ../../node_modules/ionicons/dist/svg/bug-outline.svg
|
|
411
|
+
var bug_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M370 378c28.89 23.52 46 46.07 46 86M142 378c-28.89 23.52-46 46.06-46 86M384 208c28.89-23.52 32-56.07 32-96M128 206c-28.89-23.52-32-54.06-32-94M464 288.13h-80M128 288.13H48M256 192v256" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="M256 448c-70.4 0-128-57.6-128-128v-96.07c0-65.07 57.6-96 128-96h0c70.4 0 128 25.6 128 96V320c0 70.4-57.6 128-128 128" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="M179.43 143.52a49.1 49.1 0 0 1-3.43-15.73A80 80 0 0 1 255.79 48h.42A80 80 0 0 1 336 127.79a41.9 41.9 0 0 1-3.12 14.3" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
412
|
+
|
|
413
|
+
// ../../node_modules/ionicons/dist/svg/bulb-outline.svg
|
|
414
|
+
var bulb_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M304 384v-24c0-29 31.54-56.43 52-76 28.84-27.57 44-64.61 44-108 0-80-63.73-144-144-144a143.6 143.6 0 0 0-144 144c0 41.84 15.81 81.39 44 108 20.35 19.21 52 46.7 52 76v24M224 480h64M208 432h96M256 384V256" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="M294 240s-21.51 16-38 16-38-16-38-16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
415
|
+
|
|
416
|
+
// ../../node_modules/ionicons/dist/svg/calendar-outline.svg
|
|
417
|
+
var calendar_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><rect width="416" height="384" x="48" y="80" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" rx="48"/><circle cx="296" cy="232" r="24"/><circle cx="376" cy="232" r="24"/><circle cx="296" cy="312" r="24"/><circle cx="376" cy="312" r="24"/><circle cx="136" cy="312" r="24"/><circle cx="216" cy="312" r="24"/><circle cx="136" cy="392" r="24"/><circle cx="216" cy="392" r="24"/><circle cx="296" cy="392" r="24"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M128 48v32M384 48v32"/><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M464 160H48"/></svg>';
|
|
418
|
+
|
|
419
|
+
// ../../node_modules/ionicons/dist/svg/camera-outline.svg
|
|
420
|
+
var camera_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="m350.54 148.68-26.62-42.06C318.31 100.08 310.62 96 302 96h-92c-8.62 0-16.31 4.08-21.92 10.62l-26.62 42.06C155.85 155.23 148.62 160 140 160H80a32 32 0 0 0-32 32v192a32 32 0 0 0 32 32h352a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32h-59c-8.65 0-16.85-4.77-22.46-11.32" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><circle cx="256" cy="272" r="80" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32px"/><path d="M124 158v-22h-24v22" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
421
|
+
|
|
422
|
+
// ../../node_modules/ionicons/dist/svg/checkmark-circle-outline.svg
|
|
423
|
+
var checkmark_circle_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192Z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32px"/><path d="M352 176 217.6 336 160 272" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
424
|
+
|
|
425
|
+
// ../../node_modules/ionicons/dist/svg/chevron-down-outline.svg
|
|
426
|
+
var chevron_down_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="m112 184 144 144 144-144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48px"/></svg>';
|
|
427
|
+
|
|
428
|
+
// ../../node_modules/ionicons/dist/svg/chevron-up-outline.svg
|
|
429
|
+
var chevron_up_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="m112 328 144-144 144 144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48px"/></svg>';
|
|
430
|
+
|
|
431
|
+
// ../../node_modules/ionicons/dist/svg/close-circle-outline.svg
|
|
432
|
+
var close_circle_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192Z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32px"/><path d="M320 320 192 192M192 320l128-128" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
433
|
+
|
|
434
|
+
// ../../node_modules/ionicons/dist/svg/close-outline.svg
|
|
435
|
+
var close_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M368 368 144 144M368 144 144 368" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
436
|
+
|
|
437
|
+
// ../../node_modules/ionicons/dist/svg/cloud-offline-outline.svg
|
|
438
|
+
var cloud_offline_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M93.72 183.25C49.49 198.05 16 233.1 16 288c0 66 54 112 120 112h184.37M467.82 377.74C485.24 363.3 496 341.61 496 312c0-59.82-53-85.76-96-88-8.89-89.54-71-144-144-144-26.16 0-48.79 6.93-67.6 18.14" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="M448 448 64 64" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32px"/></svg>';
|
|
439
|
+
|
|
440
|
+
// ../../node_modules/ionicons/dist/svg/construct-outline.svg
|
|
441
|
+
var construct_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M436.67 184.11a27.17 27.17 0 0 1-38.3 0l-22.48-22.49a27.15 27.15 0 0 1 0-38.29l50.89-50.89a.85.85 0 0 0-.26-1.38C393.68 57 351.09 64.15 324.05 91c-25.88 25.69-27.35 64.27-17.87 98a27 27 0 0 1-7.67 27.14l-173 160.76a40.76 40.76 0 1 0 57.57 57.54l162.15-173.3a27 27 0 0 1 26.77-7.7c33.46 8.94 71.49 7.26 97.07-17.94 27.49-27.08 33.42-74.94 20.1-102.33a.85.85 0 0 0-1.36-.22Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32px"/><path d="M224 284c-17.48-17-25.49-24.91-31-30.29a18.24 18.24 0 0 1-3.33-21.35 20.8 20.8 0 0 1 3.5-4.62l15.68-15.29a18.7 18.7 0 0 1 5.63-3.87 18.11 18.11 0 0 1 20 3.62c5.45 5.29 15.43 15 33.41 32.52M317.07 291.3c40.95 38.1 90.62 83.27 110 99.41a13.46 13.46 0 0 1 .94 19.92L394.63 444a14 14 0 0 1-20.29-.76c-16.53-19.18-61.09-67.11-99.27-107" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="m17.34 193.5 29.41-28.74a4.7 4.7 0 0 1 3.41-1.35 4.85 4.85 0 0 1 3.41 1.35h0a9.86 9.86 0 0 0 8.19 2.77c3.83-.42 7.92-1.6 10.57-4.12 6-5.8-.94-17.23 4.34-24.54a207 207 0 0 1 19.78-22.6c6-5.88 29.84-28.32 69.9-44.45A107.3 107.3 0 0 1 206.67 64c22.59 0 40 10 46.26 15.67a89.5 89.5 0 0 1 10.28 11.64 79 79 0 0 0-9.21-2.77 68.8 68.8 0 0 0-20-1.26c-13.33 1.09-29.41 7.26-38 14-13.9 11-19.87 25.72-20.81 44.71-.68 14.12 2.72 22.1 36.1 55.49a6.6 6.6 0 0 1-.34 9.16l-18.22 18a6.88 6.88 0 0 1-9.54.09c-21.94-21.94-36.65-33.09-45-38.16s-15.07-6.5-18.3-6.85a30.85 30.85 0 0 0-18.27 3.87 11.4 11.4 0 0 0-2.64 2 14.14 14.14 0 0 0 .42 20.08l1.71 1.6a4.63 4.63 0 0 1 0 6.64L71.73 246.6a4.7 4.7 0 0 1-3.41 1.4 4.86 4.86 0 0 1-3.41-1.35l-47.57-46.43a4.88 4.88 0 0 1 0-6.72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
442
|
+
|
|
443
|
+
// ../../node_modules/ionicons/dist/svg/contrast-outline.svg
|
|
444
|
+
var contrast_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><circle cx="256" cy="256" r="208" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32px"/><path d="M256 464c-114.88 0-208-93.12-208-208S141.12 48 256 48Z"/></svg>';
|
|
445
|
+
|
|
446
|
+
// ../../node_modules/ionicons/dist/svg/ellipse-outline.svg
|
|
447
|
+
var ellipse_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><circle cx="256" cy="256" r="192" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
448
|
+
|
|
449
|
+
// ../../node_modules/ionicons/dist/svg/exit-outline.svg
|
|
450
|
+
var exit_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M320 176v-40a40 40 0 0 0-40-40H88a40 40 0 0 0-40 40v240a40 40 0 0 0 40 40h192a40 40 0 0 0 40-40v-40M384 176l80 80-80 80M191 256h273" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
451
|
+
|
|
452
|
+
// ../../node_modules/ionicons/dist/svg/flask-outline.svg
|
|
453
|
+
var flask_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M176 48h160M118 304h276M208 48v93.48a64.1 64.1 0 0 1-9.88 34.18L73.21 373.49C48.4 412.78 76.63 464 123.08 464h265.84c46.45 0 74.68-51.22 49.87-90.51L313.87 175.66a64.1 64.1 0 0 1-9.87-34.18V48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32px"/></svg>';
|
|
454
|
+
|
|
455
|
+
// ../../node_modules/ionicons/dist/svg/grid-outline.svg
|
|
456
|
+
var grid_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><rect width="176" height="176" x="48" y="48" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><rect width="176" height="176" x="288" y="48" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><rect width="176" height="176" x="48" y="288" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><rect width="176" height="176" x="288" y="288" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
457
|
+
|
|
458
|
+
// ../../node_modules/ionicons/dist/svg/hourglass-outline.svg
|
|
459
|
+
var hourglass_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M145.61 464h220.78c19.8 0 35.55-16.29 33.42-35.06C386.06 308 304 310 304 256s83.11-51 95.8-172.94c2-18.78-13.61-35.06-33.41-35.06H145.61c-19.8 0-35.37 16.28-33.41 35.06C124.89 205 208 201 208 256s-82.06 52-95.8 172.94c-2.14 18.77 13.61 35.06 33.41 35.06" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="M343.3 432H169.13c-15.6 0-20-18-9.06-29.16C186.55 376 240 356.78 240 326V224c0-19.85-38-35-61.51-67.2-3.88-5.31-3.49-12.8 6.37-12.8h142.73c8.41 0 10.23 7.43 6.4 12.75C310.82 189 272 204.05 272 224v102c0 30.53 55.71 47 80.4 76.87 9.95 12.04 6.47 29.13-9.1 29.13"/></svg>';
|
|
460
|
+
|
|
461
|
+
// ../../node_modules/ionicons/dist/svg/image-outline.svg
|
|
462
|
+
var image_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><rect width="416" height="352" x="48" y="80" rx="48" ry="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32px"/><circle cx="336" cy="176" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32px"/><path d="m304 335.79-90.66-90.49a32 32 0 0 0-43.87-1.3L48 352M224 432l123.34-123.34a32 32 0 0 1 43.11-2L464 368" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
463
|
+
|
|
464
|
+
// ../../node_modules/ionicons/dist/svg/images-outline.svg
|
|
465
|
+
var images_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M432 112V96a48.14 48.14 0 0 0-48-48H64a48.14 48.14 0 0 0-48 48v256a48.14 48.14 0 0 0 48 48h16" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32px"/><rect width="400" height="336" x="96" y="128" rx="45.99" ry="45.99" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32px"/><ellipse cx="372.92" cy="219.64" rx="30.77" ry="30.55" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32px"/><path d="M342.15 372.17 255 285.78a30.93 30.93 0 0 0-42.18-1.21L96 387.64M265.23 464l118.59-117.73a31 31 0 0 1 41.46-1.87L496 402.91" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
466
|
+
|
|
467
|
+
// ../../node_modules/ionicons/dist/svg/list-outline.svg
|
|
468
|
+
var list_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M160 144h288M160 256h288M160 368h288" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><circle cx="80" cy="144" r="16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><circle cx="80" cy="256" r="16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><circle cx="80" cy="368" r="16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
469
|
+
|
|
470
|
+
// ../../node_modules/ionicons/dist/svg/lock-closed-outline.svg
|
|
471
|
+
var lock_closed_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M336 208v-95a80 80 0 0 0-160 0v95" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><rect width="320" height="272" x="96" y="208" rx="48" ry="48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
472
|
+
|
|
473
|
+
// ../../node_modules/ionicons/dist/svg/git-merge-outline.svg
|
|
474
|
+
var git_merge_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><circle cx="129" cy="96" r="48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><circle cx="129" cy="416" r="48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="M129 144v224" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><circle cx="385" cy="288" r="48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="M129 144c0 96 112 144 208 144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
475
|
+
|
|
476
|
+
// ../../node_modules/ionicons/dist/svg/open-outline.svg
|
|
477
|
+
var open_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M384 224v184a40 40 0 0 1-40 40H104a40 40 0 0 1-40-40V168a40 40 0 0 1 40-40h167.48M336 64h112v112M224 288 440 72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
478
|
+
|
|
479
|
+
// ../../node_modules/ionicons/dist/svg/scan-outline.svg
|
|
480
|
+
var scan_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M336 448h56a56 56 0 0 0 56-56v-56M448 176v-56a56 56 0 0 0-56-56h-56M176 448h-56a56 56 0 0 1-56-56v-56M64 176v-56a56 56 0 0 1 56-56h56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
481
|
+
|
|
482
|
+
// ../../node_modules/ionicons/dist/svg/swap-vertical-outline.svg
|
|
483
|
+
var swap_vertical_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M464 208 352 96 240 208M352 113.13V416M48 304l112 112 112-112M160 398V96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
484
|
+
|
|
485
|
+
// ../../node_modules/ionicons/dist/svg/trash-outline.svg
|
|
486
|
+
var trash_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="m112 112 20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="M80 112h352" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32px"/><path d="M192 112V72h0a23.93 23.93 0 0 1 24-24h80a23.93 23.93 0 0 1 24 24h0v40M256 176v224M184 176l8 224M328 176l-8 224" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/></svg>';
|
|
487
|
+
|
|
488
|
+
// ../../node_modules/ionicons/dist/svg/warning-outline.svg
|
|
489
|
+
var warning_outline_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M85.57 446.25h340.86a32 32 0 0 0 28.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0 0 28.17 47.17" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="m250.26 195.39 5.74 122 5.73-121.95a5.74 5.74 0 0 0-5.79-6h0a5.74 5.74 0 0 0-5.68 5.95" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path fill="currentColor" d="M256 397.25a20 20 0 1 1 20-20 20 20 0 0 1-20 20"/></svg>';
|
|
490
|
+
|
|
491
|
+
// src/Ikon.tsx
|
|
492
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
493
|
+
var utenTittel = (svg) => svg.replace(/<title>[\s\S]*?<\/title>/g, "");
|
|
494
|
+
var IKONER = Object.fromEntries(
|
|
495
|
+
Object.entries({
|
|
496
|
+
"arrow-back-outline": arrow_back_outline_default,
|
|
497
|
+
"brush-outline": brush_outline_default,
|
|
498
|
+
"bug-outline": bug_outline_default,
|
|
499
|
+
"bulb-outline": bulb_outline_default,
|
|
500
|
+
"calendar-outline": calendar_outline_default,
|
|
501
|
+
"camera-outline": camera_outline_default,
|
|
502
|
+
"checkmark-circle-outline": checkmark_circle_outline_default,
|
|
503
|
+
"chevron-down-outline": chevron_down_outline_default,
|
|
504
|
+
"chevron-up-outline": chevron_up_outline_default,
|
|
505
|
+
"close-circle-outline": close_circle_outline_default,
|
|
506
|
+
"close-outline": close_outline_default,
|
|
507
|
+
"cloud-offline-outline": cloud_offline_outline_default,
|
|
508
|
+
"construct-outline": construct_outline_default,
|
|
509
|
+
"contrast-outline": contrast_outline_default,
|
|
510
|
+
"ellipse-outline": ellipse_outline_default,
|
|
511
|
+
"exit-outline": exit_outline_default,
|
|
512
|
+
"flask-outline": flask_outline_default,
|
|
513
|
+
"git-merge-outline": git_merge_outline_default,
|
|
514
|
+
"grid-outline": grid_outline_default,
|
|
515
|
+
"hourglass-outline": hourglass_outline_default,
|
|
516
|
+
"image-outline": image_outline_default,
|
|
517
|
+
"images-outline": images_outline_default,
|
|
518
|
+
"list-outline": list_outline_default,
|
|
519
|
+
"lock-closed-outline": lock_closed_outline_default,
|
|
520
|
+
"open-outline": open_outline_default,
|
|
521
|
+
"scan-outline": scan_outline_default,
|
|
522
|
+
"swap-vertical-outline": swap_vertical_outline_default,
|
|
523
|
+
"trash-outline": trash_outline_default,
|
|
524
|
+
"warning-outline": warning_outline_default
|
|
525
|
+
}).map(([navn, svg]) => [navn, utenTittel(svg)])
|
|
526
|
+
);
|
|
527
|
+
var IKONNAVN = Object.keys(IKONER);
|
|
528
|
+
function Ikon({
|
|
529
|
+
navn,
|
|
530
|
+
storrelse: storrelse2 = "inline",
|
|
531
|
+
farge
|
|
532
|
+
}) {
|
|
533
|
+
const tema = useTema();
|
|
534
|
+
const svg = IKONER[navn];
|
|
535
|
+
if (!svg) throw new Error(`[innspel] Ikonet \xAB${navn}\xBB er ikke tatt med i Ikon.tsx.`);
|
|
536
|
+
const maal = storrelse2 === "minste" ? tema.icon.minste : storrelse2 === "stor" ? 2 * tema.icon.inline : tema.icon.inline;
|
|
537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
538
|
+
import_react_native_svg.SvgXml,
|
|
539
|
+
{
|
|
540
|
+
testID: `ikon-${navn}`,
|
|
541
|
+
xml: svg,
|
|
542
|
+
width: maal,
|
|
543
|
+
height: maal,
|
|
544
|
+
color: farge ?? tema.color.textPrimary,
|
|
545
|
+
accessibilityElementsHidden: true,
|
|
546
|
+
importantForAccessibility: "no"
|
|
547
|
+
}
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
|
|
307
551
|
// src/widget/Felt.tsx
|
|
308
|
-
var
|
|
552
|
+
var import_react5 = require("react");
|
|
309
553
|
var import_react_native3 = require("react-native");
|
|
310
554
|
|
|
311
555
|
// src/widget/primitiver.tsx
|
|
312
|
-
var
|
|
556
|
+
var import_react4 = require("react");
|
|
313
557
|
var import_react_native2 = require("react-native");
|
|
314
|
-
var
|
|
558
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
315
559
|
function Btn({
|
|
316
560
|
label,
|
|
317
561
|
onPress,
|
|
@@ -321,21 +565,22 @@ function Btn({
|
|
|
321
565
|
disabled,
|
|
322
566
|
accessibilityLabel,
|
|
323
567
|
grow,
|
|
324
|
-
testID
|
|
568
|
+
testID,
|
|
569
|
+
busy
|
|
325
570
|
}) {
|
|
326
571
|
const tema = useTema();
|
|
327
572
|
const c = tema.color;
|
|
328
573
|
const bakgrunn = variant === "primary" ? c.actionPrimary : variant === "secondary" ? c.surfaceRaised : "transparent";
|
|
329
574
|
const tekstfarge = variant === "primary" ? c.onActionPrimary : variant === "danger" ? c.danger : c.actionSecondaryText;
|
|
330
575
|
const kant = variant === "ghost" ? "transparent" : variant === "primary" ? c.actionPrimary : c.actionSecondaryBorder;
|
|
331
|
-
return /* @__PURE__ */ (0,
|
|
332
|
-
/* @__PURE__ */ (0,
|
|
576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: grow ? { flex: 1 } : void 0, children: [
|
|
577
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
333
578
|
import_react_native2.Pressable,
|
|
334
579
|
{
|
|
335
580
|
testID,
|
|
336
581
|
accessibilityRole: "button",
|
|
337
582
|
accessibilityLabel: accessibilityLabel ?? (hint ? `${label}. ${hint}` : label),
|
|
338
|
-
accessibilityState: { disabled: !!disabled },
|
|
583
|
+
accessibilityState: { disabled: !!disabled, busy: !!busy },
|
|
339
584
|
disabled,
|
|
340
585
|
onPress,
|
|
341
586
|
style: {
|
|
@@ -352,8 +597,8 @@ function Btn({
|
|
|
352
597
|
opacity: disabled ? 0.6 : 1
|
|
353
598
|
},
|
|
354
599
|
children: [
|
|
355
|
-
ikon ? /* @__PURE__ */ (0,
|
|
356
|
-
/* @__PURE__ */ (0,
|
|
600
|
+
ikon ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Ikon, { navn: ikon, farge: disabled ? c.textDisabled : tekstfarge }) : null,
|
|
601
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
357
602
|
import_react_native2.Text,
|
|
358
603
|
{
|
|
359
604
|
style: {
|
|
@@ -367,13 +612,13 @@ function Btn({
|
|
|
367
612
|
]
|
|
368
613
|
}
|
|
369
614
|
),
|
|
370
|
-
hint ? /* @__PURE__ */ (0,
|
|
615
|
+
hint ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Hint, { children: hint }) : null
|
|
371
616
|
] });
|
|
372
617
|
}
|
|
373
618
|
function H({ children, sub }) {
|
|
374
619
|
const tema = useTema();
|
|
375
|
-
return /* @__PURE__ */ (0,
|
|
376
|
-
/* @__PURE__ */ (0,
|
|
620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: { gap: tema.space.xs }, children: [
|
|
621
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
377
622
|
import_react_native2.Text,
|
|
378
623
|
{
|
|
379
624
|
accessibilityRole: "header",
|
|
@@ -386,7 +631,7 @@ function H({ children, sub }) {
|
|
|
386
631
|
children
|
|
387
632
|
}
|
|
388
633
|
),
|
|
389
|
-
sub ? /* @__PURE__ */ (0,
|
|
634
|
+
sub ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
390
635
|
import_react_native2.Text,
|
|
391
636
|
{
|
|
392
637
|
style: {
|
|
@@ -401,7 +646,7 @@ function H({ children, sub }) {
|
|
|
401
646
|
}
|
|
402
647
|
function Hint({ children }) {
|
|
403
648
|
const tema = useTema();
|
|
404
|
-
return /* @__PURE__ */ (0,
|
|
649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
405
650
|
import_react_native2.Text,
|
|
406
651
|
{
|
|
407
652
|
style: {
|
|
@@ -419,7 +664,7 @@ function Card({
|
|
|
419
664
|
style
|
|
420
665
|
}) {
|
|
421
666
|
const tema = useTema();
|
|
422
|
-
return /* @__PURE__ */ (0,
|
|
667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
423
668
|
import_react_native2.View,
|
|
424
669
|
{
|
|
425
670
|
style: [
|
|
@@ -438,13 +683,10 @@ function Card({
|
|
|
438
683
|
}
|
|
439
684
|
);
|
|
440
685
|
}
|
|
441
|
-
function StatusPill({
|
|
442
|
-
ikon,
|
|
443
|
-
etikett,
|
|
444
|
-
farge
|
|
445
|
-
}) {
|
|
686
|
+
function StatusPill({ ikon, etikett, fg, bg }) {
|
|
446
687
|
const tema = useTema();
|
|
447
|
-
|
|
688
|
+
const farge = (navn, reserve) => tema.color[navn] ?? reserve;
|
|
689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
448
690
|
import_react_native2.View,
|
|
449
691
|
{
|
|
450
692
|
style: {
|
|
@@ -455,11 +697,11 @@ function StatusPill({
|
|
|
455
697
|
paddingHorizontal: tema.space.sm,
|
|
456
698
|
paddingVertical: tema.space.xs,
|
|
457
699
|
borderRadius: tema.radius.pill,
|
|
458
|
-
backgroundColor: tema.color
|
|
700
|
+
backgroundColor: farge(bg, tema.color.neutralBg)
|
|
459
701
|
},
|
|
460
702
|
children: [
|
|
461
|
-
/* @__PURE__ */ (0,
|
|
462
|
-
/* @__PURE__ */ (0,
|
|
703
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Ikon, { navn: ikon, storrelse: "minste", farge: farge(fg, tema.color.textSecondary) }),
|
|
704
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: { color: farge(fg, tema.color.textSecondary), fontSize: tema.font.small, fontWeight: tema.weight.medium }, children: etikett })
|
|
463
705
|
]
|
|
464
706
|
}
|
|
465
707
|
);
|
|
@@ -468,12 +710,14 @@ function Banner({
|
|
|
468
710
|
ikon,
|
|
469
711
|
tone,
|
|
470
712
|
children,
|
|
471
|
-
live
|
|
713
|
+
live,
|
|
714
|
+
testID
|
|
472
715
|
}) {
|
|
473
716
|
const tema = useTema();
|
|
474
|
-
return /* @__PURE__ */ (0,
|
|
717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
475
718
|
import_react_native2.View,
|
|
476
719
|
{
|
|
720
|
+
testID,
|
|
477
721
|
style: {
|
|
478
722
|
flexDirection: "row",
|
|
479
723
|
gap: tema.space.sm,
|
|
@@ -482,8 +726,8 @@ function Banner({
|
|
|
482
726
|
padding: tema.space.md
|
|
483
727
|
},
|
|
484
728
|
children: [
|
|
485
|
-
/* @__PURE__ */ (0,
|
|
486
|
-
/* @__PURE__ */ (0,
|
|
729
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Ikon, { navn: ikon, farge: tema.color[tone] }),
|
|
730
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
487
731
|
import_react_native2.Text,
|
|
488
732
|
{
|
|
489
733
|
accessibilityRole: "alert",
|
|
@@ -503,17 +747,21 @@ function Banner({
|
|
|
503
747
|
}
|
|
504
748
|
|
|
505
749
|
// src/widget/tekster.ts
|
|
750
|
+
function saksnr(id) {
|
|
751
|
+
const i = id.indexOf("_");
|
|
752
|
+
return i >= 0 ? id.slice(i + 1) : id;
|
|
753
|
+
}
|
|
754
|
+
var stor = (s) => s ? s.charAt(0).toUpperCase() + s.slice(1) : s;
|
|
506
755
|
var tekst = {
|
|
507
756
|
// 2b — første valg
|
|
508
757
|
valgTittel: "Hva gjelder det?",
|
|
509
|
-
valgUnder: "Ett valg. Vi sp\xF8r aldri om kategori eller alvorlighet.",
|
|
510
758
|
sporFeil: "Noe virker ikke",
|
|
511
|
-
sporFeilUnder: "
|
|
759
|
+
sporFeilUnder: "Noe er galt eller virker rart",
|
|
512
760
|
sporOnske: "Jeg \xF8nsker meg noe",
|
|
513
|
-
sporOnskeUnder: "
|
|
761
|
+
sporOnskeUnder: "Noe du savner eller vil ha annerledes",
|
|
514
762
|
// 2c — kjente feil (DD-29, DD-30)
|
|
515
763
|
kjenteFeilTittelFeil: "Er det dette du ser?",
|
|
516
|
-
kjenteFeilUnderFeil: "
|
|
764
|
+
kjenteFeilUnderFeil: "Kjenner du igjen en av disse?",
|
|
517
765
|
kjenteFeilTittelOnske: "Har noen \xF8nsket dette?",
|
|
518
766
|
kjenteFeilUnderOnske: "Ett trykk legger deg til p\xE5 \xF8nsket \u2014 ingen ny sak.",
|
|
519
767
|
svarJa: "Ja, jeg ogs\xE5",
|
|
@@ -535,7 +783,7 @@ var tekst = {
|
|
|
535
783
|
placeholderFeil: "Hva skjedde? Hva forventet du?",
|
|
536
784
|
placeholderOnske: "Hva \xF8nsker du deg?",
|
|
537
785
|
send: "Send",
|
|
538
|
-
|
|
786
|
+
sender: "Sender \u2026",
|
|
539
787
|
/** DD-44: minimum tegn er det ENESTE kravet. */
|
|
540
788
|
forKort: (min) => `Minst ${min} tegn. Ingenting annet er obligatorisk.`,
|
|
541
789
|
tellerFull: " \u2014 kort og konkret holder",
|
|
@@ -559,14 +807,15 @@ var tekst = {
|
|
|
559
807
|
tegnOver: "Tegn over",
|
|
560
808
|
maskerAllTekst: "Masker all tekst",
|
|
561
809
|
maskertAvAppen: "Maskert av appen",
|
|
562
|
-
maskertAvAppenHint: "
|
|
563
|
-
dittStrok: "
|
|
810
|
+
maskertAvAppenHint: "Dette feltet er alltid dekket og kan ikke avdekkes.",
|
|
811
|
+
dittStrok: "Trykk p\xE5 et dekket felt for \xE5 angre.",
|
|
812
|
+
angreSiste: "Angre siste",
|
|
813
|
+
angreSisteA11y: "Angre det siste feltet du dekket",
|
|
564
814
|
allTekstHint: "Hele bildet er gjort uskarpt s\xE5 tekst ikke kan leses. Layouten er synlig.",
|
|
565
815
|
fjernBildet: "Fjern bildet",
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
fjernSkjermbilde: "Fjern skjermbildet",
|
|
816
|
+
leggVed: "Legg ved",
|
|
817
|
+
bildeLagtVed: "Bilde lagt ved",
|
|
818
|
+
fjernSkjermbilde: "Fjern bildet",
|
|
570
819
|
sendHintMedBilde: "Teksten sendes f\xF8rst; bildet lastes opp for seg.",
|
|
571
820
|
skjermbildeFeilet: "kunne ikke ta skjermbilde. Du kan sende uten.",
|
|
572
821
|
skjermbildeA11y: (auto, egne, uskarpt) => `Forh\xE5ndsvisning av skjermbildet. ${auto ? `${auto} felt maskert av appen og kan ikke avmaskeres. ` : ""}${egne ? `${egne} felt maskert av deg. ` : ""}${uskarpt ? "All tekst er gjort uskarp. " : ""}Trykk for \xE5 maskere et felt, dra for \xE5 tegne over.`,
|
|
@@ -585,34 +834,37 @@ var tekst = {
|
|
|
585
834
|
kvitteringSendt: "Sendt",
|
|
586
835
|
kvitteringRegistrert: "Registrert",
|
|
587
836
|
kvitteringFeil: "Du f\xE5r beskjed n\xE5r den er rettet, eller hvis vi trenger mer.",
|
|
588
|
-
kvitteringOnske: "Vurderes innen 90 dager. Du f\xE5r et personlig svar \u2014 ogs\xE5 hvis det er nei.",
|
|
589
837
|
kvitteringJaOgsa: "Du f\xE5r beskjed n\xE5r den er rettet.",
|
|
590
|
-
saksnummer: (nr) => `
|
|
838
|
+
saksnummer: (nr) => `Sak ${saksnr(nr)}`,
|
|
591
839
|
tilbakeTilAppen: "Tilbake til appen",
|
|
592
840
|
/** DD-42: saken er sendt, bildet kom ikke med — aldri en blokkert innsending. */
|
|
593
841
|
kvitteringVedleggFeilet: "Sendt \u2014 skjermbildet kunne ikke legges ved",
|
|
594
842
|
tekstenErLagret: "Teksten din er lagret.",
|
|
595
843
|
vedleggFeiletBanner: "Bildet ble ikke lastet opp. Saken er sendt uten det \u2014 vil du, kan du sende et nytt innspill med bilde.",
|
|
596
|
-
saksnummerUtenVedlegg: (nr) => `
|
|
844
|
+
saksnummerUtenVedlegg: (nr) => `Sak ${saksnr(nr)} \xB7 uten vedlegg`,
|
|
597
845
|
// 2i — tilstander
|
|
598
|
-
|
|
846
|
+
koKvitteringTittel: "Lagret \u2014 sendes n\xE5r du er p\xE5 nett",
|
|
599
847
|
offlineBanner: "Ingen nett. Lagres og sendes automatisk \u2014 du ser det under \xABMine innspill\xBB til det er sendt.",
|
|
600
|
-
offlineLagre: "Lagre \u2014 sendes
|
|
848
|
+
offlineLagre: "Lagre \u2014 sendes n\xE5r du er p\xE5 nett",
|
|
601
849
|
/** DD-41: et skjermbilde køes aldri. */
|
|
602
850
|
offlineUtenBilde: "Skjermbilde kan ikke legges ved uten nett. Teksten sendes; bildet ble ikke lagret.",
|
|
603
851
|
sendefeilBanner: (arsak) => `Kunne ikke sende: ${arsak} Teksten din er beholdt.`,
|
|
604
852
|
provIgjen: "Pr\xF8v igjen",
|
|
605
853
|
// 2j — mine innspill
|
|
606
854
|
mineTittel: "Mine innspill",
|
|
607
|
-
mineUnder: "Status og hva du kan vente deg
|
|
855
|
+
mineUnder: "Status og hva du kan vente deg.",
|
|
608
856
|
mineTom: "Du har ikke sendt noe enn\xE5.",
|
|
609
857
|
mineIkkeSendt: "Ikke sendt enn\xE5",
|
|
610
|
-
mineSak: (nr) => `Sak ${nr}`,
|
|
858
|
+
mineSak: (nr) => `Sak ${saksnr(nr)}`,
|
|
859
|
+
/** «Feil · sak 2041» — sporet først, aldri rå id og aldri kontraktens type (DD-50). */
|
|
860
|
+
sakHode: (spor, nr) => `${stor(spor)} \xB7 sak ${saksnr(nr)}`,
|
|
611
861
|
// Leietakeren fjernet vedlegget. Bare AT — aldri hvorfor, av hvem eller når.
|
|
612
862
|
bildeFjernet: "Bildet er fjernet.",
|
|
613
863
|
svarFra: (leietaker) => `Svar fra ${leietaker}`,
|
|
614
864
|
svarFraGenerisk: "Svar",
|
|
615
865
|
sendNytt: "Send nytt innspill",
|
|
866
|
+
/** Tom tilstand: det finnes ikke noe «nytt» å sende når ingenting er sendt. */
|
|
867
|
+
sendForste: "Send innspill",
|
|
616
868
|
// 3a — invitasjonsbanneret (DD-12)
|
|
617
869
|
invitasjonRegion: "Invitasjon til betaprogram",
|
|
618
870
|
invitasjonHva: (navn) => `Vil du teste \xAB${navn}\xBB?`,
|
|
@@ -640,7 +892,7 @@ var tekst = {
|
|
|
640
892
|
akseptFeil: (arsak) => `Kunne ikke bli med: ${arsak}`,
|
|
641
893
|
// 3c (M3.1-delen) — deltakelsen og «Gå ut» (DD-36)
|
|
642
894
|
deltakelseRegion: "Ditt betaprogram",
|
|
643
|
-
deltakelsePeriode: (periode2, brukt, maks) => `${periode2} \xB7 ${
|
|
895
|
+
deltakelsePeriode: (periode2, brukt, maks) => `${periode2} \xB7 Vi tar kontakt maks ${maks} ganger \u2014 ${brukt} brukt`,
|
|
644
896
|
deltakelseOppgaverKommer: "Oppgavene kan gj\xF8res n\xE5r det passer deg.",
|
|
645
897
|
gaaUt: "G\xE5 ut av programmet",
|
|
646
898
|
gaaUtTittel: "G\xE5 ut av programmet?",
|
|
@@ -652,11 +904,11 @@ var tekst = {
|
|
|
652
904
|
oppgaveIkkeBegynt: "Ikke begynt",
|
|
653
905
|
oppgaveGjort: "Gjort",
|
|
654
906
|
oppgaveGjortLabel: (tittel) => `Gjort: ${tittel}`,
|
|
655
|
-
oppgaveGjortMed: (utfall) => `
|
|
907
|
+
oppgaveGjortMed: (utfall) => `Pr\xF8vd \xB7 ${utfall}`,
|
|
656
908
|
hvordanGikkDet: "Hvordan gikk det?",
|
|
657
909
|
utfallFungerte: "Fungerte",
|
|
658
|
-
utfallDelvis: "
|
|
659
|
-
utfallIkke: "
|
|
910
|
+
utfallDelvis: "Fungerte delvis",
|
|
911
|
+
utfallIkke: "Fungerte ikke",
|
|
660
912
|
setningLabel: "Vil du si \xE9n setning om det? (valgfritt)",
|
|
661
913
|
setningPlaceholder: "Kopien kom, men rullesjefen manglet p\xE5 torsdag.",
|
|
662
914
|
lagre: "Lagre",
|
|
@@ -676,24 +928,16 @@ var tekst = {
|
|
|
676
928
|
// Felles
|
|
677
929
|
tilbake: "Tilbake",
|
|
678
930
|
lukk: "Lukk",
|
|
679
|
-
venterPaaNett: "Venter p\xE5 nett \u2014 sendes automatisk"
|
|
931
|
+
venterPaaNett: "Venter p\xE5 nett \u2014 sendes automatisk",
|
|
932
|
+
feil: "feil",
|
|
933
|
+
onske: "\xF8nske"
|
|
680
934
|
};
|
|
681
935
|
var lofte = {
|
|
682
|
-
venterNett: "Sendes automatisk n\xE5r du er p\xE5 nett \u2014 kvitteringen kommer da."
|
|
683
|
-
vurderes: (frist) => `Svar innen ${frist} \u2014 ogs\xE5 hvis det er nei.`,
|
|
684
|
-
vurderesUtenFrist: "Du f\xE5r svar \u2014 ogs\xE5 hvis det er nei.",
|
|
685
|
-
bygges: "Du f\xE5r beskjed n\xE5r den er rettet.",
|
|
686
|
-
planlagt: "Du f\xE5r beskjed n\xE5r den er rettet.",
|
|
687
|
-
rettet: "Ferdig. Ser du feilen igjen, send et nytt innspill.",
|
|
688
|
-
levert: "Ferdig. Takk for \xF8nsket.",
|
|
689
|
-
ny: "Vi har f\xE5tt den. Du h\xF8rer fra oss.",
|
|
690
|
-
kjentFeil: "Kjent feil. Du f\xE5r beskjed n\xE5r den er rettet.",
|
|
691
|
-
duplikat: "Sl\xE5tt sammen med et innspill som ligner.",
|
|
692
|
-
avvist: "Vi har svart p\xE5 denne."
|
|
936
|
+
venterNett: "Sendes automatisk n\xE5r du er p\xE5 nett \u2014 kvitteringen kommer da."
|
|
693
937
|
};
|
|
694
938
|
|
|
695
939
|
// src/widget/Felt.tsx
|
|
696
|
-
var
|
|
940
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
697
941
|
function Felt({
|
|
698
942
|
spor,
|
|
699
943
|
verdi,
|
|
@@ -708,6 +952,8 @@ function Felt({
|
|
|
708
952
|
funn,
|
|
709
953
|
onSend,
|
|
710
954
|
sender,
|
|
955
|
+
harFeil,
|
|
956
|
+
offline,
|
|
711
957
|
onSkjermbilde,
|
|
712
958
|
onVelgBilde,
|
|
713
959
|
bildeNotat,
|
|
@@ -715,14 +961,14 @@ function Felt({
|
|
|
715
961
|
onFjernVedlegg
|
|
716
962
|
}) {
|
|
717
963
|
const tema = useTema();
|
|
718
|
-
const [apen, setApen] = (0,
|
|
719
|
-
const [beholdt, setBeholdt] = (0,
|
|
964
|
+
const [apen, setApen] = (0, import_react5.useState)(false);
|
|
965
|
+
const [beholdt, setBeholdt] = (0, import_react5.useState)([]);
|
|
720
966
|
const brukt = verdi.length;
|
|
721
967
|
const forKort = brukt < minTextLength;
|
|
722
968
|
const full = brukt >= textMaxLength;
|
|
723
969
|
const visTeller = brukt >= textMaxLength * 0.8;
|
|
724
970
|
const uavklart = funn.find((f) => !beholdt.includes(f.match));
|
|
725
|
-
const linjer = (0,
|
|
971
|
+
const linjer = (0, import_react5.useMemo)(() => {
|
|
726
972
|
const etiketter = {
|
|
727
973
|
screen: "Skjerm",
|
|
728
974
|
appVersion: "Appversjon",
|
|
@@ -736,8 +982,8 @@ function Felt({
|
|
|
736
982
|
return verdi2 && !fjernedeFelter.includes(felt) ? { felt, etikett, verdi: verdi2 } : null;
|
|
737
983
|
}).filter((x) => x !== null);
|
|
738
984
|
}, [kontekst, fjernedeFelter]);
|
|
739
|
-
return /* @__PURE__ */ (0,
|
|
740
|
-
/* @__PURE__ */ (0,
|
|
985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { testID: "skjema", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
741
987
|
import_react_native3.ScrollView,
|
|
742
988
|
{
|
|
743
989
|
testID: "skjema-kropp",
|
|
@@ -745,7 +991,7 @@ function Felt({
|
|
|
745
991
|
contentContainerStyle: { gap: tema.space.md },
|
|
746
992
|
keyboardShouldPersistTaps: "handled",
|
|
747
993
|
children: [
|
|
748
|
-
lenketTil ? /* @__PURE__ */ (0,
|
|
994
|
+
lenketTil ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
749
995
|
import_react_native3.View,
|
|
750
996
|
{
|
|
751
997
|
style: {
|
|
@@ -760,8 +1006,8 @@ function Felt({
|
|
|
760
1006
|
paddingRight: tema.space.xs
|
|
761
1007
|
},
|
|
762
1008
|
children: [
|
|
763
|
-
/* @__PURE__ */ (0,
|
|
764
|
-
/* @__PURE__ */ (0,
|
|
1009
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.lenketTil(lenketTil.title) }),
|
|
1010
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
765
1011
|
import_react_native3.Pressable,
|
|
766
1012
|
{
|
|
767
1013
|
testID: "fjern-lenke",
|
|
@@ -769,13 +1015,13 @@ function Felt({
|
|
|
769
1015
|
accessibilityLabel: tekst.fjernLenke,
|
|
770
1016
|
onPress: onFjernLenke,
|
|
771
1017
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
772
|
-
children: /* @__PURE__ */ (0,
|
|
1018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Ikon, { navn: "close-outline", farge: tema.color.textSecondary })
|
|
773
1019
|
}
|
|
774
1020
|
)
|
|
775
1021
|
]
|
|
776
1022
|
}
|
|
777
1023
|
) : null,
|
|
778
|
-
uavklart ? /* @__PURE__ */ (0,
|
|
1024
|
+
uavklart ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
779
1025
|
import_react_native3.View,
|
|
780
1026
|
{
|
|
781
1027
|
style: {
|
|
@@ -785,7 +1031,7 @@ function Felt({
|
|
|
785
1031
|
padding: tema.space.md
|
|
786
1032
|
},
|
|
787
1033
|
children: [
|
|
788
|
-
/* @__PURE__ */ (0,
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
789
1035
|
import_react_native3.Text,
|
|
790
1036
|
{
|
|
791
1037
|
accessibilityRole: "alert",
|
|
@@ -799,8 +1045,8 @@ function Felt({
|
|
|
799
1045
|
children: tekst.monsterSpm[uavklart.kind]
|
|
800
1046
|
}
|
|
801
1047
|
),
|
|
802
|
-
/* @__PURE__ */ (0,
|
|
803
|
-
/* @__PURE__ */ (0,
|
|
1048
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
804
1050
|
Btn,
|
|
805
1051
|
{
|
|
806
1052
|
grow: true,
|
|
@@ -810,7 +1056,7 @@ function Felt({
|
|
|
810
1056
|
onPress: () => onEndre(verdi.slice(0, uavklart.start) + verdi.slice(uavklart.end))
|
|
811
1057
|
}
|
|
812
1058
|
),
|
|
813
|
-
/* @__PURE__ */ (0,
|
|
1059
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
814
1060
|
Btn,
|
|
815
1061
|
{
|
|
816
1062
|
grow: true,
|
|
@@ -821,12 +1067,12 @@ function Felt({
|
|
|
821
1067
|
}
|
|
822
1068
|
)
|
|
823
1069
|
] }),
|
|
824
|
-
/* @__PURE__ */ (0,
|
|
1070
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Hint, { children: tekst.monsterForklaring })
|
|
825
1071
|
]
|
|
826
1072
|
}
|
|
827
1073
|
) : null,
|
|
828
|
-
/* @__PURE__ */ (0,
|
|
829
|
-
/* @__PURE__ */ (0,
|
|
1074
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(H, { children: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil }),
|
|
1075
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
830
1076
|
import_react_native3.TextInput,
|
|
831
1077
|
{
|
|
832
1078
|
testID: "innspill-tekst",
|
|
@@ -852,7 +1098,7 @@ function Felt({
|
|
|
852
1098
|
}
|
|
853
1099
|
}
|
|
854
1100
|
),
|
|
855
|
-
visTeller ? /* @__PURE__ */ (0,
|
|
1101
|
+
visTeller ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
856
1102
|
import_react_native3.Text,
|
|
857
1103
|
{
|
|
858
1104
|
testID: "teller",
|
|
@@ -870,7 +1116,7 @@ function Felt({
|
|
|
870
1116
|
]
|
|
871
1117
|
}
|
|
872
1118
|
) : null,
|
|
873
|
-
harVedlegg ? /* @__PURE__ */ (0,
|
|
1119
|
+
harVedlegg ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
874
1120
|
import_react_native3.View,
|
|
875
1121
|
{
|
|
876
1122
|
testID: "vedlegg-chip",
|
|
@@ -886,9 +1132,9 @@ function Felt({
|
|
|
886
1132
|
paddingRight: tema.space.xs
|
|
887
1133
|
},
|
|
888
1134
|
children: [
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__PURE__ */ (0,
|
|
891
|
-
/* @__PURE__ */ (0,
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Ikon, { navn: "image-outline", storrelse: "minste", farge: tema.color.textPrimary }),
|
|
1136
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.bildeLagtVed }),
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
892
1138
|
import_react_native3.Pressable,
|
|
893
1139
|
{
|
|
894
1140
|
testID: "fjern-vedlegg",
|
|
@@ -896,38 +1142,38 @@ function Felt({
|
|
|
896
1142
|
accessibilityLabel: tekst.fjernSkjermbilde,
|
|
897
1143
|
onPress: onFjernVedlegg,
|
|
898
1144
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
899
|
-
children: /* @__PURE__ */ (0,
|
|
1145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Ikon, { navn: "close-outline", farge: tema.color.textSecondary })
|
|
900
1146
|
}
|
|
901
1147
|
)
|
|
902
1148
|
]
|
|
903
1149
|
}
|
|
904
|
-
) : onSkjermbilde || onVelgBilde ? /* @__PURE__ */ (0,
|
|
905
|
-
onSkjermbilde ? /* @__PURE__ */ (0,
|
|
1150
|
+
) : onSkjermbilde || onVelgBilde ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { gap: tema.space.sm }, children: [
|
|
1151
|
+
onSkjermbilde ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
906
1152
|
Btn,
|
|
907
1153
|
{
|
|
908
1154
|
variant: "secondary",
|
|
909
1155
|
testID: "legg-ved-skjermbilde",
|
|
910
|
-
ikon: "
|
|
1156
|
+
ikon: "camera-outline",
|
|
911
1157
|
label: tekst.leggVedSkjermbilde,
|
|
912
1158
|
hint: tekst.leggVedHint,
|
|
913
1159
|
onPress: onSkjermbilde
|
|
914
1160
|
}
|
|
915
1161
|
) : null,
|
|
916
|
-
onVelgBilde ? /* @__PURE__ */ (0,
|
|
1162
|
+
onVelgBilde ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
917
1163
|
Btn,
|
|
918
1164
|
{
|
|
919
1165
|
variant: "secondary",
|
|
920
1166
|
testID: "velg-bilde",
|
|
921
|
-
ikon: "
|
|
1167
|
+
ikon: "images-outline",
|
|
922
1168
|
label: tekst.velgBilde,
|
|
923
1169
|
hint: tekst.velgBildeHint,
|
|
924
1170
|
onPress: onVelgBilde
|
|
925
1171
|
}
|
|
926
1172
|
) : null,
|
|
927
|
-
bildeNotat ? /* @__PURE__ */ (0,
|
|
1173
|
+
bildeNotat ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { testID: "bilde-notat", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Hint, { children: bildeNotat }) }) : null
|
|
928
1174
|
] }) : null,
|
|
929
|
-
/* @__PURE__ */ (0,
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { borderTopWidth: tema.hairline, borderTopColor: tema.color.border, paddingTop: tema.space.sm }, children: [
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
931
1177
|
import_react_native3.Pressable,
|
|
932
1178
|
{
|
|
933
1179
|
testID: "kontekst-bryter",
|
|
@@ -936,16 +1182,24 @@ function Felt({
|
|
|
936
1182
|
accessibilityLabel: `${tekst.kontekstLinje}${apen ? "" : tekst.kontekstVis}`,
|
|
937
1183
|
onPress: () => setApen((a) => !a),
|
|
938
1184
|
style: { minHeight: tema.touch, justifyContent: "center" },
|
|
939
|
-
children: /* @__PURE__ */ (0,
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1185
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
1186
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1187
|
+
Ikon,
|
|
1188
|
+
{
|
|
1189
|
+
navn: apen ? "chevron-up-outline" : "chevron-down-outline",
|
|
1190
|
+
storrelse: "minste",
|
|
1191
|
+
farge: tema.color.textSecondary
|
|
1192
|
+
}
|
|
1193
|
+
),
|
|
1194
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
1195
|
+
tekst.kontekstLinje,
|
|
1196
|
+
apen ? "" : tekst.kontekstVis
|
|
1197
|
+
] })
|
|
944
1198
|
] })
|
|
945
1199
|
}
|
|
946
1200
|
),
|
|
947
|
-
apen ? /* @__PURE__ */ (0,
|
|
948
|
-
linjer.map((l) => /* @__PURE__ */ (0,
|
|
1201
|
+
apen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { children: [
|
|
1202
|
+
linjer.map((l) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
949
1203
|
import_react_native3.View,
|
|
950
1204
|
{
|
|
951
1205
|
style: {
|
|
@@ -957,9 +1211,9 @@ function Felt({
|
|
|
957
1211
|
borderBottomColor: tema.color.border
|
|
958
1212
|
},
|
|
959
1213
|
children: [
|
|
960
|
-
/* @__PURE__ */ (0,
|
|
961
|
-
/* @__PURE__ */ (0,
|
|
962
|
-
/* @__PURE__ */ (0,
|
|
1214
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { color: tema.color.textMuted, fontSize: tema.font.small, minWidth: tema.touch * 2 }, children: l.etikett }),
|
|
1215
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: l.verdi }),
|
|
1216
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
963
1217
|
import_react_native3.Pressable,
|
|
964
1218
|
{
|
|
965
1219
|
testID: `fjern-${l.felt}`,
|
|
@@ -967,9 +1221,9 @@ function Felt({
|
|
|
967
1221
|
accessibilityLabel: `${tekst.kontekstFjern} ${l.etikett.toLowerCase()} fra innsendingen`,
|
|
968
1222
|
onPress: () => onFjernKontekst(l.felt),
|
|
969
1223
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
970
|
-
children: /* @__PURE__ */ (0,
|
|
971
|
-
"
|
|
972
|
-
tekst.kontekstFjern
|
|
1224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Ikon, { navn: "close-outline", storrelse: "minste", farge: tema.color.textSecondary }),
|
|
1226
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: tekst.kontekstFjern })
|
|
973
1227
|
] })
|
|
974
1228
|
}
|
|
975
1229
|
)
|
|
@@ -977,18 +1231,19 @@ function Felt({
|
|
|
977
1231
|
},
|
|
978
1232
|
l.felt
|
|
979
1233
|
)),
|
|
980
|
-
/* @__PURE__ */ (0,
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: { paddingTop: tema.space.sm }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Hint, { children: tekst.kontekstAldri }) })
|
|
981
1235
|
] }) : null
|
|
982
1236
|
] })
|
|
983
1237
|
]
|
|
984
1238
|
}
|
|
985
1239
|
),
|
|
986
|
-
/* @__PURE__ */ (0,
|
|
1240
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { testID: "skjema-fot", style: { flexGrow: 1, flexShrink: 0, justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
987
1241
|
Btn,
|
|
988
1242
|
{
|
|
989
1243
|
testID: "send",
|
|
990
|
-
label:
|
|
1244
|
+
label: sender ? tekst.sender : harFeil ? tekst.provIgjen : offline ? tekst.offlineLagre : tekst.send,
|
|
991
1245
|
disabled: forKort || sender,
|
|
1246
|
+
busy: sender,
|
|
992
1247
|
hint: forKort ? tekst.forKort(minTextLength) : harVedlegg ? tekst.sendHintMedBilde : void 0,
|
|
993
1248
|
onPress: onSend
|
|
994
1249
|
}
|
|
@@ -997,12 +1252,12 @@ function Felt({
|
|
|
997
1252
|
}
|
|
998
1253
|
|
|
999
1254
|
// src/widget/Valg.tsx
|
|
1000
|
-
var
|
|
1255
|
+
var import_react6 = require("react");
|
|
1001
1256
|
var import_react_native4 = require("react-native");
|
|
1002
|
-
var
|
|
1257
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1003
1258
|
function Valg({ onVelg }) {
|
|
1004
1259
|
const tema = useTema();
|
|
1005
|
-
const flate = (spor, ikon, label, under) => /* @__PURE__ */ (0,
|
|
1260
|
+
const flate = (spor, ikon, label, under) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1006
1261
|
import_react_native4.Pressable,
|
|
1007
1262
|
{
|
|
1008
1263
|
testID: `spor-${spor}`,
|
|
@@ -1022,8 +1277,8 @@ function Valg({ onVelg }) {
|
|
|
1022
1277
|
padding: tema.space.md
|
|
1023
1278
|
},
|
|
1024
1279
|
children: [
|
|
1025
|
-
/* @__PURE__ */ (0,
|
|
1026
|
-
/* @__PURE__ */ (0,
|
|
1280
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Ikon, { navn: ikon, storrelse: "stor", farge: tema.color.textPrimary }),
|
|
1281
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1027
1282
|
import_react_native4.Text,
|
|
1028
1283
|
{
|
|
1029
1284
|
style: {
|
|
@@ -1035,52 +1290,55 @@ function Valg({ onVelg }) {
|
|
|
1035
1290
|
children: label
|
|
1036
1291
|
}
|
|
1037
1292
|
),
|
|
1038
|
-
/* @__PURE__ */ (0,
|
|
1293
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native4.Text, { style: { color: tema.color.textMuted, fontSize: tema.font.small, textAlign: "center" }, children: under })
|
|
1039
1294
|
]
|
|
1040
1295
|
}
|
|
1041
1296
|
);
|
|
1042
|
-
return /* @__PURE__ */ (0,
|
|
1043
|
-
/* @__PURE__ */ (0,
|
|
1044
|
-
/* @__PURE__ */ (0,
|
|
1045
|
-
flate("feil", "
|
|
1046
|
-
flate("onske", "
|
|
1297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native4.View, { style: { flex: 1, gap: tema.space.lg }, children: [
|
|
1298
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(H, { children: tekst.valgTittel }),
|
|
1299
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native4.View, { style: { flex: 1, justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native4.View, { style: { flexDirection: "row", gap: tema.space.md }, children: [
|
|
1300
|
+
flate("feil", "bug-outline", tekst.sporFeil, tekst.sporFeilUnder),
|
|
1301
|
+
flate("onske", "bulb-outline", tekst.sporOnske, tekst.sporOnskeUnder)
|
|
1047
1302
|
] }) })
|
|
1048
1303
|
] });
|
|
1049
1304
|
}
|
|
1050
1305
|
|
|
1051
1306
|
// src/widget/KjenteFeil.tsx
|
|
1052
|
-
var
|
|
1307
|
+
var import_react7 = require("react");
|
|
1053
1308
|
var import_react_native5 = require("react-native");
|
|
1054
|
-
var
|
|
1309
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1310
|
+
var MAKS_KORT = 3;
|
|
1055
1311
|
function KjenteFeil({
|
|
1056
1312
|
kort,
|
|
1057
1313
|
spor,
|
|
1058
1314
|
laster,
|
|
1315
|
+
sender,
|
|
1059
1316
|
onJaOgsa,
|
|
1060
1317
|
onLigner,
|
|
1061
1318
|
onNei
|
|
1062
1319
|
}) {
|
|
1063
1320
|
const tema = useTema();
|
|
1064
1321
|
if (laster) {
|
|
1065
|
-
return /* @__PURE__ */ (0,
|
|
1066
|
-
/* @__PURE__ */ (0,
|
|
1067
|
-
/* @__PURE__ */ (0,
|
|
1322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { style: { flex: 1, gap: tema.space.md }, children: [
|
|
1323
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(H, { sub: spor === "onske" ? tekst.kjenteFeilUnderOnske : tekst.kjenteFeilUnderFeil, children: spor === "onske" ? tekst.kjenteFeilTittelOnske : tekst.kjenteFeilTittelFeil }),
|
|
1324
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.ActivityIndicator, { accessibilityLabel: "Sjekker kjente feil", color: tema.color.textSecondary })
|
|
1068
1325
|
] });
|
|
1069
1326
|
}
|
|
1070
|
-
return /* @__PURE__ */ (0,
|
|
1071
|
-
/* @__PURE__ */ (0,
|
|
1072
|
-
/* @__PURE__ */ (0,
|
|
1327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { testID: "kjente-feil", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
1328
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(H, { sub: spor === "onske" ? tekst.kjenteFeilUnderOnske : tekst.kjenteFeilUnderFeil, children: spor === "onske" ? tekst.kjenteFeilTittelOnske : tekst.kjenteFeilTittelFeil }),
|
|
1329
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1073
1330
|
import_react_native5.ScrollView,
|
|
1074
1331
|
{
|
|
1075
1332
|
testID: "kjente-feil-liste",
|
|
1076
1333
|
style: { flexGrow: 0, flexShrink: 1 },
|
|
1077
1334
|
contentContainerStyle: { gap: tema.space.md },
|
|
1078
1335
|
keyboardShouldPersistTaps: "handled",
|
|
1079
|
-
children: kort.map((k) => {
|
|
1336
|
+
children: kort.slice(0, MAKS_KORT).map((k) => {
|
|
1337
|
+
const o = knownIssueStatus[k.status] ?? knownIssueStatus.aktiv;
|
|
1080
1338
|
const versjon = k.fixedIn ? k.status === "fikset" ? tekst.rettetI(k.fixedIn) : tekst.rettesI(k.fixedIn) : void 0;
|
|
1081
|
-
const kontekst = versjon ? `${k.title}. ${versjon}` : k.title
|
|
1082
|
-
return /* @__PURE__ */ (0,
|
|
1083
|
-
/* @__PURE__ */ (0,
|
|
1339
|
+
const kontekst = versjon ? `${k.title}. ${o.etikett}. ${versjon}` : `${k.title}. ${o.etikett}`;
|
|
1340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Card, { children: [
|
|
1341
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1084
1342
|
import_react_native5.Text,
|
|
1085
1343
|
{
|
|
1086
1344
|
style: {
|
|
@@ -1092,7 +1350,7 @@ function KjenteFeil({
|
|
|
1092
1350
|
children: k.title
|
|
1093
1351
|
}
|
|
1094
1352
|
),
|
|
1095
|
-
k.workaround ? /* @__PURE__ */ (0,
|
|
1353
|
+
k.workaround ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1096
1354
|
import_react_native5.Text,
|
|
1097
1355
|
{
|
|
1098
1356
|
style: {
|
|
@@ -1107,26 +1365,24 @@ function KjenteFeil({
|
|
|
1107
1365
|
]
|
|
1108
1366
|
}
|
|
1109
1367
|
) : null,
|
|
1110
|
-
|
|
1111
|
-
StatusPill,
|
|
1112
|
-
{
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
}
|
|
1117
|
-
) : null,
|
|
1118
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native5.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
1119
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1368
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.sm, flexWrap: "wrap" }, children: [
|
|
1369
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StatusPill, { ikon: o.ikon, etikett: o.etikett, fg: o.fg, bg: o.bg }),
|
|
1370
|
+
versjon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: versjon }) : null
|
|
1371
|
+
] }),
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1120
1374
|
Btn,
|
|
1121
1375
|
{
|
|
1122
1376
|
grow: true,
|
|
1123
1377
|
testID: `ja-ogsa-${k.id}`,
|
|
1124
1378
|
label: tekst.svarJa,
|
|
1125
1379
|
accessibilityLabel: `${tekst.svarJa}. ${kontekst}`,
|
|
1380
|
+
disabled: sender,
|
|
1381
|
+
busy: sender,
|
|
1126
1382
|
onPress: () => onJaOgsa(k)
|
|
1127
1383
|
}
|
|
1128
1384
|
),
|
|
1129
|
-
/* @__PURE__ */ (0,
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1130
1386
|
Btn,
|
|
1131
1387
|
{
|
|
1132
1388
|
grow: true,
|
|
@@ -1134,6 +1390,7 @@ function KjenteFeil({
|
|
|
1134
1390
|
testID: `ligner-${k.id}`,
|
|
1135
1391
|
label: tekst.svarLigner,
|
|
1136
1392
|
accessibilityLabel: `${tekst.svarLigner}. ${kontekst}`,
|
|
1393
|
+
disabled: sender,
|
|
1137
1394
|
onPress: () => onLigner(k)
|
|
1138
1395
|
}
|
|
1139
1396
|
)
|
|
@@ -1142,46 +1399,79 @@ function KjenteFeil({
|
|
|
1142
1399
|
})
|
|
1143
1400
|
}
|
|
1144
1401
|
),
|
|
1145
|
-
/* @__PURE__ */ (0,
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.View, { testID: "kjente-feil-fot", style: { flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Btn, { variant: "secondary", testID: "nei-noe-annet", label: tekst.svarNei, disabled: sender, onPress: onNei }) })
|
|
1146
1403
|
] });
|
|
1147
1404
|
}
|
|
1148
1405
|
|
|
1149
1406
|
// src/widget/Kvittering.tsx
|
|
1150
|
-
var
|
|
1407
|
+
var import_react8 = require("react");
|
|
1151
1408
|
var import_react_native6 = require("react-native");
|
|
1152
|
-
|
|
1409
|
+
|
|
1410
|
+
// src/widget/status.ts
|
|
1411
|
+
function formaterFrist(iso) {
|
|
1412
|
+
const d = new Date(iso);
|
|
1413
|
+
if (Number.isNaN(d.getTime())) return iso;
|
|
1414
|
+
return new Intl.DateTimeFormat("nb-NO", { day: "numeric", month: "long" }).format(d);
|
|
1415
|
+
}
|
|
1416
|
+
function statusVisning(status, type, deadlineAt) {
|
|
1417
|
+
const o = submissionStatus[status];
|
|
1418
|
+
const spor = type === "onske" ? "onske" : "feil";
|
|
1419
|
+
return {
|
|
1420
|
+
ikon: o.ikon,
|
|
1421
|
+
etikett: o.etikett[spor],
|
|
1422
|
+
fg: o.fg,
|
|
1423
|
+
bg: o.bg,
|
|
1424
|
+
lofte: settInnFrist(o.lofte[spor], deadlineAt)
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1427
|
+
function settInnFrist(mal, deadlineAt) {
|
|
1428
|
+
if (!mal.includes("{frist}")) return mal;
|
|
1429
|
+
return deadlineAt ? mal.replace("{frist}", formaterFrist(deadlineAt)) : lofteUtenFrist;
|
|
1430
|
+
}
|
|
1431
|
+
var venterVisning = {
|
|
1432
|
+
ikon: "cloud-offline-outline",
|
|
1433
|
+
etikett: "Venter p\xE5 nett",
|
|
1434
|
+
fg: "textSecondary",
|
|
1435
|
+
bg: "neutralBg",
|
|
1436
|
+
lofte: lofte.venterNett
|
|
1437
|
+
};
|
|
1438
|
+
|
|
1439
|
+
// src/widget/Kvittering.tsx
|
|
1440
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1153
1441
|
function Kvittering({
|
|
1154
1442
|
art,
|
|
1155
1443
|
saksnummer,
|
|
1156
1444
|
vedlegg,
|
|
1445
|
+
frist,
|
|
1157
1446
|
onLukk
|
|
1158
1447
|
}) {
|
|
1159
1448
|
const tema = useTema();
|
|
1160
1449
|
const innhold = {
|
|
1161
1450
|
feil: { h: tekst.kvitteringSendt, p: tekst.kvitteringFeil },
|
|
1162
|
-
|
|
1451
|
+
// Løftet er NØYAKTIG det «Mine innspill» og panelet viser for «Vurderes»:
|
|
1452
|
+
// det leses fra temaet, så kvitteringen og statusen ikke kan si to ting.
|
|
1453
|
+
onske: { h: tekst.kvitteringSendt, p: statusVisning("vurderes", "onske", frist).lofte },
|
|
1163
1454
|
jaOgsa: { h: tekst.kvitteringRegistrert, p: tekst.kvitteringJaOgsa },
|
|
1164
1455
|
// Køet offline: kvitteringen kan IKKE love svar på noe som ikke er sendt
|
|
1165
1456
|
// (DD-41 presiserer DD-07). Den lover bare at det sendes.
|
|
1166
|
-
k\u00F8: { h: tekst.
|
|
1457
|
+
k\u00F8: { h: tekst.koKvitteringTittel, p: tekst.offlineBanner }
|
|
1167
1458
|
}[art];
|
|
1168
1459
|
const overskrift = vedlegg === "feilet" ? tekst.kvitteringVedleggFeilet : innhold.h;
|
|
1169
1460
|
const brodtekst = vedlegg === "feilet" ? `${tekst.tekstenErLagret} ${innhold.p}` : innhold.p;
|
|
1170
|
-
return /* @__PURE__ */ (0,
|
|
1171
|
-
/* @__PURE__ */ (0,
|
|
1172
|
-
/* @__PURE__ */ (0,
|
|
1173
|
-
|
|
1461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_native6.View, { style: { flex: 1, justifyContent: "center", gap: tema.space.lg }, children: [
|
|
1462
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_native6.View, { style: { alignItems: "center", gap: tema.space.md }, children: [
|
|
1463
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1464
|
+
Ikon,
|
|
1174
1465
|
{
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
children: art === "k\xF8" ? "\u21C5" : "\u2713"
|
|
1466
|
+
navn: art === "k\xF8" ? "swap-vertical-outline" : "checkmark-circle-outline",
|
|
1467
|
+
storrelse: "stor",
|
|
1468
|
+
farge: art === "k\xF8" ? tema.color.neutral : tema.color.success
|
|
1179
1469
|
}
|
|
1180
1470
|
),
|
|
1181
|
-
/* @__PURE__ */ (0,
|
|
1182
|
-
vedlegg === "feilet" ? /* @__PURE__ */ (0,
|
|
1183
|
-
vedlegg === "forkastet" ? /* @__PURE__ */ (0,
|
|
1184
|
-
/* @__PURE__ */ (0,
|
|
1471
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(H, { children: overskrift }),
|
|
1472
|
+
vedlegg === "feilet" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Banner, { ikon: "warning-outline", tone: "warning", children: tekst.vedleggFeiletBanner }) : null,
|
|
1473
|
+
vedlegg === "forkastet" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Banner, { ikon: "image-outline", tone: "info", children: tekst.offlineUtenBilde }) : null,
|
|
1474
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1185
1475
|
import_react_native6.Text,
|
|
1186
1476
|
{
|
|
1187
1477
|
testID: "kvittering-tekst",
|
|
@@ -1196,72 +1486,16 @@ function Kvittering({
|
|
|
1196
1486
|
children: brodtekst
|
|
1197
1487
|
}
|
|
1198
1488
|
),
|
|
1199
|
-
saksnummer ? /* @__PURE__ */ (0,
|
|
1489
|
+
saksnummer ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hint, { children: vedlegg === "feilet" ? tekst.saksnummerUtenVedlegg(saksnummer) : tekst.saksnummer(saksnummer) }) : null
|
|
1200
1490
|
] }),
|
|
1201
|
-
/* @__PURE__ */ (0,
|
|
1491
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Btn, { testID: "tilbake-til-appen", label: tekst.tilbakeTilAppen, onPress: onLukk })
|
|
1202
1492
|
] });
|
|
1203
1493
|
}
|
|
1204
1494
|
|
|
1205
1495
|
// src/widget/MineInnspill.tsx
|
|
1206
|
-
var
|
|
1496
|
+
var import_react9 = require("react");
|
|
1207
1497
|
var import_react_native7 = require("react-native");
|
|
1208
|
-
|
|
1209
|
-
// src/widget/status.ts
|
|
1210
|
-
var IKON = {
|
|
1211
|
-
ny: "\u23F1",
|
|
1212
|
-
vurderes: "\u23F1",
|
|
1213
|
-
planlagt: "\u{1F4C5}",
|
|
1214
|
-
bygges: "\u{1F527}",
|
|
1215
|
-
levert: "\u2713",
|
|
1216
|
-
kjent_feil: "\u{1F441}",
|
|
1217
|
-
duplikat: "\u2715",
|
|
1218
|
-
avvist: "\u2715",
|
|
1219
|
-
venterNett: "\u23F3"
|
|
1220
|
-
};
|
|
1221
|
-
function formaterFrist(iso) {
|
|
1222
|
-
const d = new Date(iso);
|
|
1223
|
-
if (Number.isNaN(d.getTime())) return iso;
|
|
1224
|
-
return new Intl.DateTimeFormat("nb-NO", { day: "numeric", month: "long" }).format(d);
|
|
1225
|
-
}
|
|
1226
|
-
function statusVisning(status, type, deadlineAt) {
|
|
1227
|
-
switch (status) {
|
|
1228
|
-
case "ny":
|
|
1229
|
-
return { ikon: IKON.ny, etikett: "Mottatt", farge: "neutral", lofte: lofte.ny };
|
|
1230
|
-
case "vurderes":
|
|
1231
|
-
return {
|
|
1232
|
-
ikon: IKON.vurderes,
|
|
1233
|
-
etikett: "Vurderes",
|
|
1234
|
-
farge: "warning",
|
|
1235
|
-
lofte: deadlineAt ? lofte.vurderes(formaterFrist(deadlineAt)) : lofte.vurderesUtenFrist
|
|
1236
|
-
};
|
|
1237
|
-
case "planlagt":
|
|
1238
|
-
return { ikon: IKON.planlagt, etikett: "Planlagt", farge: "success", lofte: lofte.planlagt };
|
|
1239
|
-
case "bygges":
|
|
1240
|
-
return { ikon: IKON.bygges, etikett: "Retter n\xE5", farge: "info", lofte: lofte.bygges };
|
|
1241
|
-
case "levert":
|
|
1242
|
-
return type === "onske" ? { ikon: IKON.levert, etikett: "Levert", farge: "success", lofte: lofte.levert } : { ikon: IKON.levert, etikett: "Rettet", farge: "success", lofte: lofte.rettet };
|
|
1243
|
-
case "kjent_feil":
|
|
1244
|
-
return {
|
|
1245
|
-
ikon: IKON.kjent_feil,
|
|
1246
|
-
etikett: "Kjent, ikke planlagt",
|
|
1247
|
-
farge: "neutral",
|
|
1248
|
-
lofte: lofte.kjentFeil
|
|
1249
|
-
};
|
|
1250
|
-
case "duplikat":
|
|
1251
|
-
return { ikon: IKON.duplikat, etikett: "Sl\xE5tt sammen", farge: "neutral", lofte: lofte.duplikat };
|
|
1252
|
-
case "avvist":
|
|
1253
|
-
return { ikon: IKON.avvist, etikett: "Avvist", farge: "danger", lofte: lofte.avvist };
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
var venterVisning = {
|
|
1257
|
-
ikon: IKON.venterNett,
|
|
1258
|
-
etikett: "Venter p\xE5 nett",
|
|
1259
|
-
farge: "neutral",
|
|
1260
|
-
lofte: lofte.venterNett
|
|
1261
|
-
};
|
|
1262
|
-
|
|
1263
|
-
// src/widget/MineInnspill.tsx
|
|
1264
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1498
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1265
1499
|
function MineInnspill({
|
|
1266
1500
|
rader,
|
|
1267
1501
|
laster,
|
|
@@ -1269,21 +1503,16 @@ function MineInnspill({
|
|
|
1269
1503
|
onNytt
|
|
1270
1504
|
}) {
|
|
1271
1505
|
const tema = useTema();
|
|
1272
|
-
return /* @__PURE__ */ (0,
|
|
1273
|
-
/* @__PURE__ */ (0,
|
|
1274
|
-
laster ? /* @__PURE__ */ (0,
|
|
1506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native7.View, { style: { flex: 1, gap: tema.space.md }, children: [
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(H, { sub: tekst.mineUnder, children: tekst.mineTittel }),
|
|
1508
|
+
laster ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native7.ActivityIndicator, { accessibilityLabel: "Henter innspillene dine", color: tema.color.textSecondary }) : rader.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hint, { children: tekst.mineTom }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native7.ScrollView, { style: { flex: 1 }, contentContainerStyle: { gap: tema.space.sm }, children: rader.map((rad) => {
|
|
1275
1509
|
const venter = rad.pending === true;
|
|
1276
1510
|
const v = venter ? venterVisning : statusVisning(rad.status, rad.type, rad.deadlineAt);
|
|
1277
1511
|
const nokkel = venter ? rad.clientRef : rad.id;
|
|
1278
1512
|
const svar = venter ? void 0 : rad.reply;
|
|
1279
|
-
return /* @__PURE__ */ (0,
|
|
1280
|
-
/* @__PURE__ */ (0,
|
|
1281
|
-
|
|
1282
|
-
" \xB7",
|
|
1283
|
-
" ",
|
|
1284
|
-
rad.type === "onske" ? "\xF8nske" : "feil"
|
|
1285
|
-
] }),
|
|
1286
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Card, { dashed: venter, children: [
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hint, { children: venter ? `${tekst.mineIkkeSendt} \xB7 ${rad.type === "onske" ? tekst.onske : tekst.feil}` : tekst.sakHode(rad.type === "onske" ? tekst.onske : tekst.feil, rad.id) }),
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1287
1516
|
import_react_native7.Text,
|
|
1288
1517
|
{
|
|
1289
1518
|
style: {
|
|
@@ -1294,15 +1523,15 @@ function MineInnspill({
|
|
|
1294
1523
|
children: rad.text
|
|
1295
1524
|
}
|
|
1296
1525
|
),
|
|
1297
|
-
/* @__PURE__ */ (0,
|
|
1298
|
-
/* @__PURE__ */ (0,
|
|
1299
|
-
/* @__PURE__ */ (0,
|
|
1526
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native7.View, { style: { gap: tema.space.xs }, children: [
|
|
1527
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StatusPill, { ikon: v.ikon, etikett: v.etikett, fg: v.fg, bg: v.bg }),
|
|
1528
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hint, { children: v.lofte })
|
|
1300
1529
|
] }),
|
|
1301
|
-
!venter && rad.attachmentRemoved ? /* @__PURE__ */ (0,
|
|
1302
|
-
/* @__PURE__ */ (0,
|
|
1303
|
-
/* @__PURE__ */ (0,
|
|
1530
|
+
!venter && rad.attachmentRemoved ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native7.View, { testID: `bilde-fjernet-${rad.id}`, style: { flexDirection: "row", gap: tema.space.xs, alignItems: "center" }, children: [
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Ikon, { navn: "trash-outline", storrelse: "minste", farge: tema.color.textMuted }),
|
|
1532
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hint, { children: tekst.bildeFjernet })
|
|
1304
1533
|
] }) : null,
|
|
1305
|
-
svar ? /* @__PURE__ */ (0,
|
|
1534
|
+
svar ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1306
1535
|
import_react_native7.View,
|
|
1307
1536
|
{
|
|
1308
1537
|
style: {
|
|
@@ -1312,8 +1541,8 @@ function MineInnspill({
|
|
|
1312
1541
|
gap: tema.space.xs
|
|
1313
1542
|
},
|
|
1314
1543
|
children: [
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native7.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: tenantName ? tekst.svarFra(tenantName) : tekst.svarFraGenerisk }),
|
|
1545
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1317
1546
|
import_react_native7.Text,
|
|
1318
1547
|
{
|
|
1319
1548
|
style: {
|
|
@@ -1329,15 +1558,15 @@ function MineInnspill({
|
|
|
1329
1558
|
) : null
|
|
1330
1559
|
] }, nokkel);
|
|
1331
1560
|
}) }),
|
|
1332
|
-
/* @__PURE__ */ (0,
|
|
1561
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Btn, { testID: "send-nytt", label: rader.length === 0 ? tekst.sendForste : tekst.sendNytt, onPress: onNytt })
|
|
1333
1562
|
] });
|
|
1334
1563
|
}
|
|
1335
1564
|
|
|
1336
1565
|
// src/widget/Skjermbilde.tsx
|
|
1337
1566
|
var import_core = require("@innspel/core");
|
|
1338
|
-
var
|
|
1567
|
+
var import_react10 = require("react");
|
|
1339
1568
|
var import_react_native8 = require("react-native");
|
|
1340
|
-
var
|
|
1569
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1341
1570
|
function Skjermbilde({
|
|
1342
1571
|
bilde,
|
|
1343
1572
|
automaskerRot,
|
|
@@ -1350,21 +1579,21 @@ function Skjermbilde({
|
|
|
1350
1579
|
onLeggVed
|
|
1351
1580
|
}) {
|
|
1352
1581
|
const tema = useTema();
|
|
1353
|
-
const [verktoy, setVerktoy] = (0,
|
|
1354
|
-
const [allTekst, setAllTekst] = (0,
|
|
1355
|
-
const [egne, setEgne] = (0,
|
|
1356
|
-
const [ramme, setRamme] = (0,
|
|
1357
|
-
const strok = (0,
|
|
1358
|
-
const visning = (0,
|
|
1582
|
+
const [verktoy, setVerktoy] = (0, import_react10.useState)("pensel");
|
|
1583
|
+
const [allTekst, setAllTekst] = (0, import_react10.useState)(false);
|
|
1584
|
+
const [egne, setEgne] = (0, import_react10.useState)([]);
|
|
1585
|
+
const [ramme, setRamme] = (0, import_react10.useState)(null);
|
|
1586
|
+
const strok = (0, import_react10.useRef)([]);
|
|
1587
|
+
const visning = (0, import_react10.useMemo)(() => {
|
|
1359
1588
|
if (!ramme) return null;
|
|
1360
1589
|
const s = Math.min(ramme.width / bilde.width, ramme.height / bilde.height);
|
|
1361
1590
|
return { width: Math.floor(bilde.width * s), height: Math.floor(bilde.height * s) };
|
|
1362
1591
|
}, [ramme, bilde.width, bilde.height]);
|
|
1363
|
-
const automasker = (0,
|
|
1592
|
+
const automasker = (0, import_react10.useMemo)(
|
|
1364
1593
|
() => visning ? automaskerRot.map((r) => (0, import_core.skaler)(r, rotStorrelse, visning)) : [],
|
|
1365
1594
|
[automaskerRot, rotStorrelse, visning]
|
|
1366
1595
|
);
|
|
1367
|
-
const onLayout = (0,
|
|
1596
|
+
const onLayout = (0, import_react10.useCallback)((e) => {
|
|
1368
1597
|
const { width, height } = e.nativeEvent.layout;
|
|
1369
1598
|
setRamme({ width, height });
|
|
1370
1599
|
}, []);
|
|
@@ -1396,7 +1625,7 @@ function Skjermbilde({
|
|
|
1396
1625
|
};
|
|
1397
1626
|
const knapp = (id, ikon, label) => {
|
|
1398
1627
|
const valgt = id === "allTekst" ? allTekst : verktoy === id && !allTekst;
|
|
1399
|
-
return /* @__PURE__ */ (0,
|
|
1628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1400
1629
|
import_react_native8.Pressable,
|
|
1401
1630
|
{
|
|
1402
1631
|
testID: `verktoy-${id}`,
|
|
@@ -1419,8 +1648,8 @@ function Skjermbilde({
|
|
|
1419
1648
|
backgroundColor: valgt ? tema.color.surfaceRaised : "transparent"
|
|
1420
1649
|
},
|
|
1421
1650
|
children: [
|
|
1422
|
-
/* @__PURE__ */ (0,
|
|
1423
|
-
/* @__PURE__ */ (0,
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Ikon, { navn: ikon, farge: tema.color.textPrimary }),
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1424
1653
|
import_react_native8.Text,
|
|
1425
1654
|
{
|
|
1426
1655
|
style: {
|
|
@@ -1437,15 +1666,15 @@ function Skjermbilde({
|
|
|
1437
1666
|
);
|
|
1438
1667
|
};
|
|
1439
1668
|
const a11y = tekst.skjermbildeA11y(automasker.length, egne.length, allTekst);
|
|
1440
|
-
return /* @__PURE__ */ (0,
|
|
1441
|
-
/* @__PURE__ */ (0,
|
|
1442
|
-
notat ? /* @__PURE__ */ (0,
|
|
1443
|
-
/* @__PURE__ */ (0,
|
|
1444
|
-
knapp("felt", "
|
|
1445
|
-
knapp("pensel", "
|
|
1446
|
-
knapp("allTekst", "
|
|
1669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { testID: "skjermbilde-steg", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(H, { sub: kilde === "galleri" ? tekst.skjermbildeUnderGalleri : tekst.skjermbildeUnder, children: tekst.skjermbildeTittel }),
|
|
1671
|
+
notat ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.View, { testID: "bilde-notat", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hint, { children: notat }) }) : null,
|
|
1672
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { accessibilityRole: "toolbar", accessibilityLabel: tekst.maskering, style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
1673
|
+
knapp("felt", "scan-outline", tekst.maskerFelt),
|
|
1674
|
+
knapp("pensel", "brush-outline", tekst.tegnOver),
|
|
1675
|
+
knapp("allTekst", "grid-outline", tekst.maskerAllTekst)
|
|
1447
1676
|
] }),
|
|
1448
|
-
/* @__PURE__ */ (0,
|
|
1677
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1449
1678
|
import_react_native8.View,
|
|
1450
1679
|
{
|
|
1451
1680
|
testID: "skjermbilde-ramme",
|
|
@@ -1459,7 +1688,7 @@ function Skjermbilde({
|
|
|
1459
1688
|
borderRadius: tema.radius.md,
|
|
1460
1689
|
overflow: "hidden"
|
|
1461
1690
|
},
|
|
1462
|
-
children: /* @__PURE__ */ (0,
|
|
1691
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.View, { testID: "skjermbilde-flate", pointerEvents: "box-none", style: [import_react_native8.StyleSheet.absoluteFill, { alignItems: "center", justifyContent: "center" }], children: visning ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1463
1692
|
import_react_native8.View,
|
|
1464
1693
|
{
|
|
1465
1694
|
ref: previewRef,
|
|
@@ -1475,7 +1704,7 @@ function Skjermbilde({
|
|
|
1475
1704
|
onResponderTerminate: onRelease,
|
|
1476
1705
|
style: { width: visning.width, height: visning.height, backgroundColor: screenRules.previewBackdrop },
|
|
1477
1706
|
children: [
|
|
1478
|
-
/* @__PURE__ */ (0,
|
|
1707
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1479
1708
|
import_react_native8.Image,
|
|
1480
1709
|
{
|
|
1481
1710
|
testID: "skjermbilde-bilde",
|
|
@@ -1485,7 +1714,7 @@ function Skjermbilde({
|
|
|
1485
1714
|
accessibilityIgnoresInvertColors: true
|
|
1486
1715
|
}
|
|
1487
1716
|
),
|
|
1488
|
-
automasker.map((r, i) => /* @__PURE__ */ (0,
|
|
1717
|
+
automasker.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1489
1718
|
import_react_native8.View,
|
|
1490
1719
|
{
|
|
1491
1720
|
testID: `automask-${i}`,
|
|
@@ -1502,14 +1731,20 @@ function Skjermbilde({
|
|
|
1502
1731
|
alignItems: "center",
|
|
1503
1732
|
justifyContent: "center"
|
|
1504
1733
|
},
|
|
1505
|
-
children: !komponerer ?
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1734
|
+
children: !komponerer ? (
|
|
1735
|
+
// Etiketten står PÅ den maskerte flaten og måles mot NETTOPP den
|
|
1736
|
+
// (skjermKontrastpar i theme.ts). textSecondary var 2,2:1 (C11a).
|
|
1737
|
+
// Ikonet arver samme farge: det er unntaket i «Styling» — maskeringen
|
|
1738
|
+
// tegnes i faste signalfarger, ikke i palettens.
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Ikon, { navn: "lock-closed-outline", storrelse: "minste", farge: screenRules.autoMaskText }),
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { style: { color: screenRules.autoMaskText, fontSize: tema.font.small }, numberOfLines: 1, children: tekst.maskertAvAppen })
|
|
1742
|
+
] })
|
|
1743
|
+
) : null
|
|
1509
1744
|
},
|
|
1510
1745
|
`auto-${i}`
|
|
1511
1746
|
)),
|
|
1512
|
-
egne.map((r, i) => /* @__PURE__ */ (0,
|
|
1747
|
+
egne.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1513
1748
|
import_react_native8.View,
|
|
1514
1749
|
{
|
|
1515
1750
|
testID: `maske-${i}`,
|
|
@@ -1523,21 +1758,42 @@ function Skjermbilde({
|
|
|
1523
1758
|
) : null })
|
|
1524
1759
|
}
|
|
1525
1760
|
),
|
|
1526
|
-
automasker.length ? /* @__PURE__ */ (0,
|
|
1527
|
-
|
|
1528
|
-
tekst.maskertAvAppenHint
|
|
1761
|
+
automasker.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Ikon, { navn: "lock-closed-outline", storrelse: "minste", farge: tema.color.textMuted }),
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hint, { children: tekst.maskertAvAppenHint })
|
|
1529
1764
|
] }) : null,
|
|
1530
|
-
egne.length ? /* @__PURE__ */ (0,
|
|
1531
|
-
allTekst ? /* @__PURE__ */ (0,
|
|
1532
|
-
/* @__PURE__ */ (0,
|
|
1533
|
-
/* @__PURE__ */ (0,
|
|
1534
|
-
|
|
1765
|
+
egne.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hint, { children: tekst.dittStrok }) : null,
|
|
1766
|
+
allTekst ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hint, { children: tekst.allTekstHint }) : null,
|
|
1767
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { testID: "skjermbilde-fot", style: { flexShrink: 0, gap: tema.space.sm }, children: [
|
|
1768
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1769
|
+
Btn,
|
|
1770
|
+
{
|
|
1771
|
+
variant: "secondary",
|
|
1772
|
+
testID: "angre-siste",
|
|
1773
|
+
label: tekst.angreSiste,
|
|
1774
|
+
accessibilityLabel: tekst.angreSisteA11y,
|
|
1775
|
+
disabled: komponerer || egne.length === 0,
|
|
1776
|
+
onPress: () => setEgne((x) => x.slice(0, -1))
|
|
1777
|
+
}
|
|
1778
|
+
),
|
|
1779
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1780
|
+
Btn,
|
|
1781
|
+
{
|
|
1782
|
+
variant: "danger",
|
|
1783
|
+
testID: "fjern-bildet",
|
|
1784
|
+
ikon: "trash-outline",
|
|
1785
|
+
label: tekst.fjernBildet,
|
|
1786
|
+
onPress: onFjern,
|
|
1787
|
+
disabled: komponerer
|
|
1788
|
+
}
|
|
1789
|
+
),
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Btn, { testID: "legg-ved", label: tekst.leggVed, onPress: onLeggVed, disabled: komponerer || !visning })
|
|
1535
1791
|
] })
|
|
1536
1792
|
] });
|
|
1537
1793
|
}
|
|
1538
1794
|
|
|
1539
1795
|
// src/widget/Widget.tsx
|
|
1540
|
-
var
|
|
1796
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1541
1797
|
var FANGST = { format: "jpg", quality: 0.85 };
|
|
1542
1798
|
function Widget({
|
|
1543
1799
|
client,
|
|
@@ -1548,34 +1804,35 @@ function Widget({
|
|
|
1548
1804
|
imageStepNote
|
|
1549
1805
|
}) {
|
|
1550
1806
|
const tema = useTema();
|
|
1551
|
-
const insets = (0,
|
|
1807
|
+
const insets = (0, import_react11.useContext)(import_react_native_safe_area_context.SafeAreaInsetsContext) ?? import_react_native_safe_area_context.initialWindowMetrics?.insets ?? { top: 0, bottom: 0, left: 0, right: 0 };
|
|
1552
1808
|
const skjermbilde = useSkjermbilde();
|
|
1553
|
-
const previewRef = (0,
|
|
1554
|
-
const [steg, setSteg] = (0,
|
|
1555
|
-
const [spor, setSpor] = (0,
|
|
1556
|
-
const [verdi, setVerdi] = (0,
|
|
1557
|
-
const [kort, setKort] = (0,
|
|
1558
|
-
const [lasterKort, setLasterKort] = (0,
|
|
1559
|
-
const [lenketTil, setLenketTil] = (0,
|
|
1560
|
-
const [funn, setFunn] = (0,
|
|
1561
|
-
const [fjernede, setFjernede] = (0,
|
|
1562
|
-
const [sender, setSender] = (0,
|
|
1563
|
-
const
|
|
1564
|
-
const [
|
|
1565
|
-
const [
|
|
1566
|
-
const [
|
|
1567
|
-
const [
|
|
1568
|
-
const [
|
|
1569
|
-
const [
|
|
1570
|
-
const [
|
|
1571
|
-
const [
|
|
1572
|
-
const [
|
|
1573
|
-
const [
|
|
1809
|
+
const previewRef = (0, import_react11.useRef)(null);
|
|
1810
|
+
const [steg, setSteg] = (0, import_react11.useState)("valg");
|
|
1811
|
+
const [spor, setSpor] = (0, import_react11.useState)("feil");
|
|
1812
|
+
const [verdi, setVerdi] = (0, import_react11.useState)("");
|
|
1813
|
+
const [kort, setKort] = (0, import_react11.useState)([]);
|
|
1814
|
+
const [lasterKort, setLasterKort] = (0, import_react11.useState)(false);
|
|
1815
|
+
const [lenketTil, setLenketTil] = (0, import_react11.useState)();
|
|
1816
|
+
const [funn, setFunn] = (0, import_react11.useState)([]);
|
|
1817
|
+
const [fjernede, setFjernede] = (0, import_react11.useState)([]);
|
|
1818
|
+
const [sender, setSender] = (0, import_react11.useState)(false);
|
|
1819
|
+
const online = useNettstatus(client);
|
|
1820
|
+
const [feil, setFeil] = (0, import_react11.useState)();
|
|
1821
|
+
const [kvittering, setKvittering] = (0, import_react11.useState)();
|
|
1822
|
+
const [mine, setMine] = (0, import_react11.useState)([]);
|
|
1823
|
+
const [lasterMine, setLasterMine] = (0, import_react11.useState)(false);
|
|
1824
|
+
const [bilde, setBilde] = (0, import_react11.useState)();
|
|
1825
|
+
const [automasker, setAutomasker] = (0, import_react11.useState)([]);
|
|
1826
|
+
const [rotStorrelse, setRotStorrelse] = (0, import_react11.useState)({ width: 1, height: 1 });
|
|
1827
|
+
const [komponerer, setKomponerer] = (0, import_react11.useState)(false);
|
|
1828
|
+
const [kilde, setKilde] = (0, import_react11.useState)("skjerm");
|
|
1829
|
+
const [vedlegg, setVedlegg] = (0, import_react11.useState)();
|
|
1830
|
+
const [innstillinger, setInnstillinger] = (0, import_react11.useState)({ ...client.settings });
|
|
1574
1831
|
const skjermbildeMulig = innstillinger.screenshotsEnabled && skjermbilde?.adapter != null;
|
|
1575
1832
|
const fangstMulig = skjermbildeMulig && skjermbilde?.adapter?.captureScreen !== false;
|
|
1576
1833
|
const galleriMulig = skjermbildeMulig && typeof skjermbilde?.adapter?.pick === "function";
|
|
1577
1834
|
const bildeNotat = typeof imageStepNote === "string" ? imageStepNote : imageStepNote?.[spor];
|
|
1578
|
-
const nullstill = (0,
|
|
1835
|
+
const nullstill = (0, import_react11.useCallback)(() => {
|
|
1579
1836
|
setSteg("valg");
|
|
1580
1837
|
setSpor("feil");
|
|
1581
1838
|
setVerdi("");
|
|
@@ -1590,18 +1847,18 @@ function Widget({
|
|
|
1590
1847
|
setVedlegg(void 0);
|
|
1591
1848
|
setKomponerer(false);
|
|
1592
1849
|
}, []);
|
|
1593
|
-
const lukk = (0,
|
|
1850
|
+
const lukk = (0, import_react11.useCallback)(() => {
|
|
1594
1851
|
onLukk();
|
|
1595
1852
|
nullstill();
|
|
1596
1853
|
}, [onLukk, nullstill]);
|
|
1597
|
-
(0,
|
|
1854
|
+
(0, import_react11.useEffect)(() => {
|
|
1598
1855
|
if (!synlig) return;
|
|
1599
1856
|
client.track({ name: "widget_opened" });
|
|
1600
1857
|
void client.queue.flush().catch(() => void 0);
|
|
1601
1858
|
void client.loadSettings().then((s) => setInnstillinger({ ...s })).catch(() => void 0);
|
|
1602
1859
|
if (apneOpsjoner?.track) velgSpor(apneOpsjoner.track);
|
|
1603
1860
|
}, [synlig]);
|
|
1604
|
-
const hentKort = (0,
|
|
1861
|
+
const hentKort = (0, import_react11.useCallback)(async () => {
|
|
1605
1862
|
setLasterKort(true);
|
|
1606
1863
|
try {
|
|
1607
1864
|
const q = apneOpsjoner?.screen ? { screen: apneOpsjoner.screen } : {};
|
|
@@ -1610,7 +1867,7 @@ function Widget({
|
|
|
1610
1867
|
setLasterKort(false);
|
|
1611
1868
|
}
|
|
1612
1869
|
}, [client, apneOpsjoner?.screen]);
|
|
1613
|
-
const velgSpor = (0,
|
|
1870
|
+
const velgSpor = (0, import_react11.useCallback)(
|
|
1614
1871
|
async (valgt) => {
|
|
1615
1872
|
setSpor(valgt);
|
|
1616
1873
|
client.track({ name: "track_selected", type: valgt });
|
|
@@ -1623,17 +1880,17 @@ function Widget({
|
|
|
1623
1880
|
},
|
|
1624
1881
|
[client, hentKort]
|
|
1625
1882
|
);
|
|
1626
|
-
(0,
|
|
1883
|
+
(0, import_react11.useEffect)(() => {
|
|
1627
1884
|
if (steg === "kjenteFeil" && !lasterKort && kort.length === 0) setSteg("felt");
|
|
1628
1885
|
}, [steg, lasterKort, kort.length]);
|
|
1629
|
-
const endreTekst = (0,
|
|
1886
|
+
const endreTekst = (0, import_react11.useCallback)(
|
|
1630
1887
|
(v) => {
|
|
1631
1888
|
setVerdi(v);
|
|
1632
1889
|
setFunn(client.scanText(v));
|
|
1633
1890
|
},
|
|
1634
1891
|
[client]
|
|
1635
1892
|
);
|
|
1636
|
-
const taSkjermbilde = (0,
|
|
1893
|
+
const taSkjermbilde = (0, import_react11.useCallback)(async () => {
|
|
1637
1894
|
if (!skjermbilde?.adapter) return;
|
|
1638
1895
|
const { adapter, rootRef, privat } = skjermbilde;
|
|
1639
1896
|
setFeil(void 0);
|
|
@@ -1657,7 +1914,7 @@ function Widget({
|
|
|
1657
1914
|
setFeil(tekst.skjermbildeFeilet);
|
|
1658
1915
|
}
|
|
1659
1916
|
}, [skjermbilde]);
|
|
1660
|
-
const velgBilde = (0,
|
|
1917
|
+
const velgBilde = (0, import_react11.useCallback)(async () => {
|
|
1661
1918
|
const pick = skjermbilde?.adapter?.pick;
|
|
1662
1919
|
if (!pick) return;
|
|
1663
1920
|
setFeil(void 0);
|
|
@@ -1673,7 +1930,7 @@ function Widget({
|
|
|
1673
1930
|
setFeil(tekst.bildeFeilet);
|
|
1674
1931
|
}
|
|
1675
1932
|
}, [skjermbilde]);
|
|
1676
|
-
const leggVedBilde = (0,
|
|
1933
|
+
const leggVedBilde = (0, import_react11.useCallback)(async () => {
|
|
1677
1934
|
if (!skjermbilde?.adapter) return;
|
|
1678
1935
|
setKomponerer(true);
|
|
1679
1936
|
try {
|
|
@@ -1689,18 +1946,27 @@ function Widget({
|
|
|
1689
1946
|
setKomponerer(false);
|
|
1690
1947
|
}
|
|
1691
1948
|
}, [skjermbilde]);
|
|
1692
|
-
const fjernBilde = (0,
|
|
1949
|
+
const fjernBilde = (0, import_react11.useCallback)(() => {
|
|
1693
1950
|
setBilde(void 0);
|
|
1694
1951
|
setAutomasker([]);
|
|
1695
1952
|
setVedlegg(void 0);
|
|
1696
1953
|
setSteg("felt");
|
|
1697
1954
|
}, []);
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1955
|
+
const gaaTilbake = (0, import_react11.useCallback)(() => {
|
|
1956
|
+
setFeil(void 0);
|
|
1957
|
+
if (steg === "skjermbilde") {
|
|
1958
|
+
setBilde(void 0);
|
|
1959
|
+
setAutomasker([]);
|
|
1960
|
+
setSteg("felt");
|
|
1961
|
+
return;
|
|
1962
|
+
}
|
|
1963
|
+
if (steg === "felt" && spor === "feil" && kort.length > 0) {
|
|
1700
1964
|
setSteg("kjenteFeil");
|
|
1701
|
-
await hentKort();
|
|
1702
1965
|
return;
|
|
1703
1966
|
}
|
|
1967
|
+
setSteg("valg");
|
|
1968
|
+
}, [steg, spor, kort.length]);
|
|
1969
|
+
const send = (0, import_react11.useCallback)(async () => {
|
|
1704
1970
|
setSender(true);
|
|
1705
1971
|
setFeil(void 0);
|
|
1706
1972
|
try {
|
|
@@ -1717,6 +1983,8 @@ function Widget({
|
|
|
1717
1983
|
setKvittering({
|
|
1718
1984
|
art: spor,
|
|
1719
1985
|
nr: res.submission.id,
|
|
1986
|
+
// Tidsløftet i kvitteringen er DATOEN fra svaret, aldri «innen 90 dager» (DD-07, DD-28).
|
|
1987
|
+
...res.submission.deadlineAt ? { frist: res.submission.deadlineAt } : {},
|
|
1720
1988
|
...res.attachment?.status === "failed" ? { vedlegg: "feilet" } : {}
|
|
1721
1989
|
});
|
|
1722
1990
|
}
|
|
@@ -1728,8 +1996,8 @@ function Widget({
|
|
|
1728
1996
|
} finally {
|
|
1729
1997
|
setSender(false);
|
|
1730
1998
|
}
|
|
1731
|
-
}, [client, spor,
|
|
1732
|
-
const jaOgsa = (0,
|
|
1999
|
+
}, [client, spor, verdi, vedlegg, lenketTil, fjernede]);
|
|
2000
|
+
const jaOgsa = (0, import_react11.useCallback)(
|
|
1733
2001
|
async (k) => {
|
|
1734
2002
|
setSender(true);
|
|
1735
2003
|
try {
|
|
@@ -1744,7 +2012,7 @@ function Widget({
|
|
|
1744
2012
|
},
|
|
1745
2013
|
[client]
|
|
1746
2014
|
);
|
|
1747
|
-
const visMine = (0,
|
|
2015
|
+
const visMine = (0, import_react11.useCallback)(async () => {
|
|
1748
2016
|
setSteg("mine");
|
|
1749
2017
|
setLasterMine(true);
|
|
1750
2018
|
try {
|
|
@@ -1755,7 +2023,7 @@ function Widget({
|
|
|
1755
2023
|
setLasterMine(false);
|
|
1756
2024
|
}
|
|
1757
2025
|
}, [client]);
|
|
1758
|
-
return /* @__PURE__ */ (0,
|
|
2026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1759
2027
|
import_react_native9.Modal,
|
|
1760
2028
|
{
|
|
1761
2029
|
visible: synlig,
|
|
@@ -1763,13 +2031,13 @@ function Widget({
|
|
|
1763
2031
|
animationType: "slide",
|
|
1764
2032
|
onRequestClose: lukk,
|
|
1765
2033
|
accessibilityViewIsModal: true,
|
|
1766
|
-
children: /* @__PURE__ */ (0,
|
|
2034
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1767
2035
|
import_react_native9.KeyboardAvoidingView,
|
|
1768
2036
|
{
|
|
1769
2037
|
behavior: "padding",
|
|
1770
2038
|
keyboardVerticalOffset: -insets.bottom,
|
|
1771
2039
|
style: { flex: 1, backgroundColor: tema.color.scrim, justifyContent: "flex-end", paddingTop: insets.top },
|
|
1772
|
-
children: /* @__PURE__ */ (0,
|
|
2040
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1773
2041
|
import_react_native9.View,
|
|
1774
2042
|
{
|
|
1775
2043
|
testID: "innspel-widget",
|
|
@@ -1791,9 +2059,9 @@ function Widget({
|
|
|
1791
2059
|
...steg === "skjermbilde" ? { height: "92%" } : {}
|
|
1792
2060
|
},
|
|
1793
2061
|
children: [
|
|
1794
|
-
/* @__PURE__ */ (0,
|
|
1795
|
-
steg
|
|
1796
|
-
/* @__PURE__ */ (0,
|
|
2062
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native9.View, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
2063
|
+
steg !== "valg" && steg !== "kvittering" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Btn, { variant: "ghost", testID: "tilbake", ikon: "arrow-back-outline", label: tekst.tilbake, onPress: gaaTilbake }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native9.View, {}),
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1797
2065
|
import_react_native9.Pressable,
|
|
1798
2066
|
{
|
|
1799
2067
|
testID: "lukk",
|
|
@@ -1801,30 +2069,32 @@ function Widget({
|
|
|
1801
2069
|
accessibilityLabel: tekst.lukk,
|
|
1802
2070
|
onPress: lukk,
|
|
1803
2071
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
1804
|
-
children: /* @__PURE__ */ (0,
|
|
2072
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Ikon, { navn: "close-outline", farge: tema.color.textSecondary })
|
|
1805
2073
|
}
|
|
1806
2074
|
)
|
|
1807
2075
|
] }),
|
|
1808
|
-
feil ? /* @__PURE__ */ (0,
|
|
1809
|
-
steg
|
|
1810
|
-
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
2076
|
+
feil ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Banner, { live: true, ikon: "warning-outline", tone: "danger", children: tekst.sendefeilBanner(feil) }) : null,
|
|
2077
|
+
!online && steg !== "kvittering" && steg !== "mine" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Banner, { ikon: "cloud-offline-outline", tone: "info", testID: "offline-banner", children: tekst.offlineBanner }) : null,
|
|
2078
|
+
steg === "valg" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
2079
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Valg, { onVelg: velgSpor }),
|
|
2080
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Btn, { variant: "ghost", testID: "mine-innspill", ikon: "list-outline", label: tekst.mineTittel, onPress: visMine })
|
|
1812
2081
|
] }) : null,
|
|
1813
|
-
steg === "kjenteFeil" ? /* @__PURE__ */ (0,
|
|
2082
|
+
steg === "kjenteFeil" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1814
2083
|
KjenteFeil,
|
|
1815
2084
|
{
|
|
1816
2085
|
kort,
|
|
1817
2086
|
spor,
|
|
1818
2087
|
laster: lasterKort,
|
|
2088
|
+
sender,
|
|
1819
2089
|
onJaOgsa: jaOgsa,
|
|
1820
2090
|
onLigner: (k) => {
|
|
1821
2091
|
setLenketTil(k);
|
|
1822
2092
|
setSteg("felt");
|
|
1823
2093
|
},
|
|
1824
|
-
onNei: () =>
|
|
2094
|
+
onNei: () => setSteg("felt")
|
|
1825
2095
|
}
|
|
1826
2096
|
) : null,
|
|
1827
|
-
steg === "felt" ? /* @__PURE__ */ (0,
|
|
2097
|
+
steg === "felt" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1828
2098
|
Felt,
|
|
1829
2099
|
{
|
|
1830
2100
|
spor,
|
|
@@ -1839,6 +2109,8 @@ function Widget({
|
|
|
1839
2109
|
funn,
|
|
1840
2110
|
onSend: send,
|
|
1841
2111
|
sender,
|
|
2112
|
+
harFeil: feil !== void 0,
|
|
2113
|
+
offline: !online,
|
|
1842
2114
|
...fangstMulig ? { onSkjermbilde: taSkjermbilde } : {},
|
|
1843
2115
|
...galleriMulig ? { onVelgBilde: velgBilde } : {},
|
|
1844
2116
|
...bildeNotat ? { bildeNotat } : {},
|
|
@@ -1846,7 +2118,7 @@ function Widget({
|
|
|
1846
2118
|
onFjernVedlegg: fjernBilde
|
|
1847
2119
|
}
|
|
1848
2120
|
) : null,
|
|
1849
|
-
steg === "skjermbilde" && bilde ? /* @__PURE__ */ (0,
|
|
2121
|
+
steg === "skjermbilde" && bilde ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1850
2122
|
Skjermbilde,
|
|
1851
2123
|
{
|
|
1852
2124
|
bilde,
|
|
@@ -1860,16 +2132,17 @@ function Widget({
|
|
|
1860
2132
|
onLeggVed: leggVedBilde
|
|
1861
2133
|
}
|
|
1862
2134
|
) : null,
|
|
1863
|
-
steg === "kvittering" && kvittering ? /* @__PURE__ */ (0,
|
|
2135
|
+
steg === "kvittering" && kvittering ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1864
2136
|
Kvittering,
|
|
1865
2137
|
{
|
|
1866
2138
|
art: kvittering.art,
|
|
1867
2139
|
...kvittering.nr ? { saksnummer: kvittering.nr } : {},
|
|
1868
2140
|
...kvittering.vedlegg ? { vedlegg: kvittering.vedlegg } : {},
|
|
2141
|
+
...kvittering.frist ? { frist: kvittering.frist } : {},
|
|
1869
2142
|
onLukk: lukk
|
|
1870
2143
|
}
|
|
1871
2144
|
) : null,
|
|
1872
|
-
steg === "mine" ? /* @__PURE__ */ (0,
|
|
2145
|
+
steg === "mine" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1873
2146
|
MineInnspill,
|
|
1874
2147
|
{
|
|
1875
2148
|
rader: mine,
|
|
@@ -1886,6 +2159,16 @@ function Widget({
|
|
|
1886
2159
|
}
|
|
1887
2160
|
);
|
|
1888
2161
|
}
|
|
2162
|
+
function useNettstatus(client) {
|
|
2163
|
+
const c = client.connectivity;
|
|
2164
|
+
const [online, setOnline] = (0, import_react11.useState)(() => c?.isOnline() ?? true);
|
|
2165
|
+
(0, import_react11.useEffect)(() => {
|
|
2166
|
+
if (!c) return void 0;
|
|
2167
|
+
setOnline(c.isOnline());
|
|
2168
|
+
return c.subscribe?.((v) => setOnline(v));
|
|
2169
|
+
}, [c]);
|
|
2170
|
+
return online;
|
|
2171
|
+
}
|
|
1889
2172
|
function fjernetKontekst(client, fjernede) {
|
|
1890
2173
|
const ut = {};
|
|
1891
2174
|
for (const k of Object.keys(client.context)) {
|
|
@@ -1895,8 +2178,8 @@ function fjernetKontekst(client, fjernede) {
|
|
|
1895
2178
|
}
|
|
1896
2179
|
|
|
1897
2180
|
// src/InnspelProvider.tsx
|
|
1898
|
-
var
|
|
1899
|
-
var Kontekst = (0,
|
|
2181
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2182
|
+
var Kontekst = (0, import_react12.createContext)(null);
|
|
1900
2183
|
function InnspelProvider({
|
|
1901
2184
|
client,
|
|
1902
2185
|
children,
|
|
@@ -1906,32 +2189,32 @@ function InnspelProvider({
|
|
|
1906
2189
|
screenshot,
|
|
1907
2190
|
imageStepNote
|
|
1908
2191
|
}) {
|
|
1909
|
-
const [synlig, setSynlig] = (0,
|
|
1910
|
-
const [apneOpsjoner, setApneOpsjoner] = (0,
|
|
1911
|
-
const registrert = (0,
|
|
1912
|
-
const rootRef = (0,
|
|
1913
|
-
const privat = (0,
|
|
1914
|
-
const open = (0,
|
|
2192
|
+
const [synlig, setSynlig] = (0, import_react12.useState)(false);
|
|
2193
|
+
const [apneOpsjoner, setApneOpsjoner] = (0, import_react12.useState)();
|
|
2194
|
+
const registrert = (0, import_react12.useRef)(false);
|
|
2195
|
+
const rootRef = (0, import_react12.useRef)(null);
|
|
2196
|
+
const privat = (0, import_react12.useMemo)(createPrivateRegistry, []);
|
|
2197
|
+
const open = (0, import_react12.useCallback)(
|
|
1915
2198
|
async (options) => {
|
|
1916
2199
|
setApneOpsjoner(options);
|
|
1917
2200
|
setSynlig(true);
|
|
1918
2201
|
},
|
|
1919
2202
|
[]
|
|
1920
2203
|
);
|
|
1921
|
-
const close = (0,
|
|
2204
|
+
const close = (0, import_react12.useCallback)(() => setSynlig(false), []);
|
|
1922
2205
|
if (!registrert.current) {
|
|
1923
2206
|
client.registerPresenter({ open });
|
|
1924
2207
|
registrert.current = true;
|
|
1925
2208
|
}
|
|
1926
|
-
const tema = (0,
|
|
1927
|
-
const verdi = (0,
|
|
1928
|
-
const skjermbilde = (0,
|
|
2209
|
+
const tema = (0, import_react12.useMemo)(() => byggTema(theme, colorScheme), [theme, colorScheme]);
|
|
2210
|
+
const verdi = (0, import_react12.useMemo)(() => ({ client, open, close }), [client, open, close]);
|
|
2211
|
+
const skjermbilde = (0, import_react12.useMemo)(
|
|
1929
2212
|
() => ({ adapter: screenshot ?? null, rootRef, privat }),
|
|
1930
2213
|
[screenshot, privat]
|
|
1931
2214
|
);
|
|
1932
|
-
return /* @__PURE__ */ (0,
|
|
1933
|
-
/* @__PURE__ */ (0,
|
|
1934
|
-
/* @__PURE__ */ (0,
|
|
2215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Kontekst.Provider, { value: verdi, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkjermbildeContext.Provider, { value: skjermbilde, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(TemaProvider, { value: tema, children: [
|
|
2216
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.View, { ref: rootRef, collapsable: false, style: { flex: 1 }, testID: "innspel-rot", children }),
|
|
2217
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1935
2218
|
Widget,
|
|
1936
2219
|
{
|
|
1937
2220
|
client,
|
|
@@ -1945,7 +2228,7 @@ function InnspelProvider({
|
|
|
1945
2228
|
] }) }) });
|
|
1946
2229
|
}
|
|
1947
2230
|
function useInnspel() {
|
|
1948
|
-
const k = (0,
|
|
2231
|
+
const k = (0, import_react12.useContext)(Kontekst);
|
|
1949
2232
|
if (!k) {
|
|
1950
2233
|
throw new Error(
|
|
1951
2234
|
"[innspel] useInnspel() ble kalt utenfor <InnspelProvider>. Pakk appen din i den \u2014 se README.md."
|
|
@@ -1955,27 +2238,27 @@ function useInnspel() {
|
|
|
1955
2238
|
}
|
|
1956
2239
|
|
|
1957
2240
|
// src/InnspelPrivate.tsx
|
|
1958
|
-
var
|
|
2241
|
+
var import_react13 = require("react");
|
|
1959
2242
|
var import_react_native11 = require("react-native");
|
|
1960
|
-
var
|
|
2243
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1961
2244
|
function InnspelPrivate({ children, style }) {
|
|
1962
|
-
const ref = (0,
|
|
2245
|
+
const ref = (0, import_react13.useRef)(null);
|
|
1963
2246
|
const kontekst = useSkjermbilde();
|
|
1964
2247
|
const registrer = kontekst?.privat.register;
|
|
1965
|
-
(0,
|
|
2248
|
+
(0, import_react13.useEffect)(() => {
|
|
1966
2249
|
if (!registrer) return;
|
|
1967
2250
|
return registrer(ref);
|
|
1968
2251
|
}, [registrer]);
|
|
1969
|
-
return /* @__PURE__ */ (0,
|
|
2252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.View, { ref, collapsable: false, style, testID: "innspel-privat", children });
|
|
1970
2253
|
}
|
|
1971
2254
|
|
|
1972
2255
|
// src/program/InnspelProgram.tsx
|
|
1973
2256
|
var import_core3 = require("@innspel/core");
|
|
1974
|
-
var
|
|
2257
|
+
var import_react18 = require("react");
|
|
1975
2258
|
var import_react_native16 = require("react-native");
|
|
1976
2259
|
|
|
1977
2260
|
// src/program/Aksept.tsx
|
|
1978
|
-
var
|
|
2261
|
+
var import_react14 = require("react");
|
|
1979
2262
|
var import_react_native12 = require("react-native");
|
|
1980
2263
|
|
|
1981
2264
|
// src/program/periode.ts
|
|
@@ -2006,7 +2289,7 @@ function minutterPerOppgave(tasks) {
|
|
|
2006
2289
|
}
|
|
2007
2290
|
|
|
2008
2291
|
// src/program/Aksept.tsx
|
|
2009
|
-
var
|
|
2292
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2010
2293
|
function Aksept({
|
|
2011
2294
|
program,
|
|
2012
2295
|
harToken,
|
|
@@ -2022,7 +2305,7 @@ function Aksept({
|
|
|
2022
2305
|
periode(program.opensAt, program.closesAt),
|
|
2023
2306
|
program.maxContacts
|
|
2024
2307
|
);
|
|
2025
|
-
return /* @__PURE__ */ (0,
|
|
2308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Modal, { visible: true, transparent: true, animationType: "slide", onRequestClose: onLukk, accessibilityViewIsModal: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.View, { style: { flex: 1, backgroundColor: tema.color.scrim, justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2026
2309
|
import_react_native12.View,
|
|
2027
2310
|
{
|
|
2028
2311
|
testID: "program-aksept",
|
|
@@ -2037,14 +2320,14 @@ function Aksept({
|
|
|
2037
2320
|
minHeight: "60%"
|
|
2038
2321
|
},
|
|
2039
2322
|
children: [
|
|
2040
|
-
/* @__PURE__ */ (0,
|
|
2041
|
-
/* @__PURE__ */ (0,
|
|
2042
|
-
/* @__PURE__ */ (0,
|
|
2323
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
2324
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Btn, { variant: "ghost", testID: "aksept-tilbake", ikon: "arrow-back-outline", label: tekst.tilbake, onPress: onLukk }),
|
|
2325
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.View, {})
|
|
2043
2326
|
] }),
|
|
2044
|
-
feil ? /* @__PURE__ */ (0,
|
|
2045
|
-
/* @__PURE__ */ (0,
|
|
2046
|
-
/* @__PURE__ */ (0,
|
|
2047
|
-
/* @__PURE__ */ (0,
|
|
2327
|
+
feil ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Banner, { live: true, ikon: "warning-outline", tone: "danger", children: tekst.akseptFeil(feil) }) : null,
|
|
2328
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.ScrollView, { contentContainerStyle: { gap: tema.space.md }, children: [
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(H, { sub: tekst.akseptHva, children: program.name }),
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2048
2331
|
import_react_native12.Text,
|
|
2049
2332
|
{
|
|
2050
2333
|
accessibilityRole: "text",
|
|
@@ -2057,42 +2340,46 @@ function Aksept({
|
|
|
2057
2340
|
children: tall
|
|
2058
2341
|
}
|
|
2059
2342
|
),
|
|
2060
|
-
/* @__PURE__ */ (0,
|
|
2061
|
-
/* @__PURE__ */ (0,
|
|
2062
|
-
/* @__PURE__ */ (0,
|
|
2063
|
-
program.tasks.map((o) => /* @__PURE__ */ (0,
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2065
|
-
/* @__PURE__ */ (0,
|
|
2343
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Text, { style: { color: tema.color.textPrimary, fontSize: tema.font.body, lineHeight: tema.lineHeight.body }, children: program.hypothesis }),
|
|
2344
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Card, { children: [
|
|
2345
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(H, { children: tekst.akseptOppgaver }),
|
|
2346
|
+
program.tasks.map((o) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { gap: tema.space.xs }, children: [
|
|
2347
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Text, { style: { color: tema.color.textPrimary, fontSize: tema.font.body, lineHeight: tema.lineHeight.body }, children: o.title }),
|
|
2348
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Hint, { children: [
|
|
2066
2349
|
tekst.akseptOppgaveTid(o.estimatedMinutes),
|
|
2067
2350
|
o.screenHint ? ` \xB7 ${o.screenHint}` : ""
|
|
2068
2351
|
] })
|
|
2069
2352
|
] }, o.id))
|
|
2070
2353
|
] }),
|
|
2071
|
-
program.knownIssues.length > 0 ? /* @__PURE__ */ (0,
|
|
2072
|
-
/* @__PURE__ */ (0,
|
|
2073
|
-
program.knownIssues.map((k) =>
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2354
|
+
program.knownIssues.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Card, { children: [
|
|
2355
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(H, { sub: tekst.akseptKjenteFeilUnder, children: tekst.akseptKjenteFeil(program.knownIssues.length) }),
|
|
2356
|
+
program.knownIssues.map((k) => {
|
|
2357
|
+
const o = knownIssueStatus[k.status] ?? knownIssueStatus.aktiv;
|
|
2358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { gap: tema.space.xs }, children: [
|
|
2359
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Text, { style: { color: tema.color.textPrimary, fontSize: tema.font.small, lineHeight: tema.lineHeight.small }, children: k.title }),
|
|
2360
|
+
k.workaround ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small, lineHeight: tema.lineHeight.small }, children: [
|
|
2361
|
+
tekst.omvei,
|
|
2362
|
+
" ",
|
|
2363
|
+
k.workaround
|
|
2364
|
+
] }) : null,
|
|
2365
|
+
k.fixedIn ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2366
|
+
StatusPill,
|
|
2367
|
+
{
|
|
2368
|
+
ikon: o.ikon,
|
|
2369
|
+
etikett: k.status === "fikset" ? tekst.rettetI(k.fixedIn) : tekst.rettesI(k.fixedIn),
|
|
2370
|
+
fg: o.fg,
|
|
2371
|
+
bg: o.bg
|
|
2372
|
+
}
|
|
2373
|
+
) : null
|
|
2374
|
+
] }, k.id);
|
|
2375
|
+
})
|
|
2089
2376
|
] }) : null,
|
|
2090
|
-
/* @__PURE__ */ (0,
|
|
2091
|
-
/* @__PURE__ */ (0,
|
|
2092
|
-
/* @__PURE__ */ (0,
|
|
2377
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Card, { children: [
|
|
2378
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(H, { sub: tekst.akseptInnsamlingTekst, children: tekst.akseptInnsamling }),
|
|
2379
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Hint, { children: tekst.kontekstAldri })
|
|
2093
2380
|
] }),
|
|
2094
|
-
program.termsUrl && !program.commitmentFree ? /* @__PURE__ */ (0,
|
|
2095
|
-
/* @__PURE__ */ (0,
|
|
2381
|
+
program.termsUrl && !program.commitmentFree ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { gap: tema.space.xs }, children: [
|
|
2382
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2096
2383
|
import_react_native12.Pressable,
|
|
2097
2384
|
{
|
|
2098
2385
|
testID: "vilkar-lenke",
|
|
@@ -2100,20 +2387,32 @@ function Aksept({
|
|
|
2100
2387
|
accessibilityLabel: tekst.akseptVilkar,
|
|
2101
2388
|
onPress: () => void import_react_native12.Linking.openURL(String(program.termsUrl)),
|
|
2102
2389
|
style: { minHeight: tema.touch, justifyContent: "center" },
|
|
2103
|
-
children: /* @__PURE__ */ (0,
|
|
2104
|
-
|
|
2105
|
-
|
|
2390
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
2391
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Ikon, { navn: "open-outline", farge: tema.color.textPrimary }),
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2393
|
+
import_react_native12.Text,
|
|
2394
|
+
{
|
|
2395
|
+
style: { color: tema.color.textPrimary, fontSize: tema.font.body, textDecorationLine: "underline" },
|
|
2396
|
+
children: tekst.akseptVilkar
|
|
2397
|
+
}
|
|
2398
|
+
)
|
|
2106
2399
|
] })
|
|
2107
2400
|
}
|
|
2108
2401
|
),
|
|
2109
|
-
/* @__PURE__ */ (0,
|
|
2110
|
-
] }) : /* @__PURE__ */ (0,
|
|
2111
|
-
/* @__PURE__ */ (0,
|
|
2112
|
-
|
|
2113
|
-
|
|
2402
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Hint, { children: tekst.akseptVilkarHint })
|
|
2403
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Hint, { children: tekst.akseptIngenVilkar }),
|
|
2404
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { flexDirection: "row", alignItems: "flex-start", gap: tema.space.sm }, children: [
|
|
2405
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Ikon, { navn: "exit-outline", farge: tema.color.textPrimary }),
|
|
2406
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2407
|
+
import_react_native12.Text,
|
|
2408
|
+
{
|
|
2409
|
+
style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.body, lineHeight: tema.lineHeight.body },
|
|
2410
|
+
children: tekst.akseptUtgang
|
|
2411
|
+
}
|
|
2412
|
+
)
|
|
2114
2413
|
] })
|
|
2115
2414
|
] }),
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2415
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2117
2416
|
Btn,
|
|
2118
2417
|
{
|
|
2119
2418
|
testID: "bli-med",
|
|
@@ -2129,13 +2428,13 @@ function Aksept({
|
|
|
2129
2428
|
}
|
|
2130
2429
|
|
|
2131
2430
|
// src/program/HvordanGikkDet.tsx
|
|
2132
|
-
var
|
|
2431
|
+
var import_react15 = require("react");
|
|
2133
2432
|
var import_react_native13 = require("react-native");
|
|
2134
|
-
var
|
|
2433
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2135
2434
|
var UTFALL = [
|
|
2136
|
-
{ verdi: "fungerte", ikon: "
|
|
2137
|
-
{ verdi: "delvis", ikon: "
|
|
2138
|
-
{ verdi: "ikke", ikon: "
|
|
2435
|
+
{ verdi: "fungerte", ikon: "checkmark-circle-outline", etikett: tekst.utfallFungerte },
|
|
2436
|
+
{ verdi: "delvis", ikon: "contrast-outline", etikett: tekst.utfallDelvis },
|
|
2437
|
+
{ verdi: "ikke", ikon: "close-circle-outline", etikett: tekst.utfallIkke }
|
|
2139
2438
|
];
|
|
2140
2439
|
var SETNING_MAKS = 140;
|
|
2141
2440
|
function utfallEtikett(verdi) {
|
|
@@ -2149,9 +2448,9 @@ function HvordanGikkDet({
|
|
|
2149
2448
|
onLukk
|
|
2150
2449
|
}) {
|
|
2151
2450
|
const tema = useTema();
|
|
2152
|
-
const [valgt, setValgt] = (0,
|
|
2153
|
-
const [setning, setSetning] = (0,
|
|
2154
|
-
return /* @__PURE__ */ (0,
|
|
2451
|
+
const [valgt, setValgt] = (0, import_react15.useState)();
|
|
2452
|
+
const [setning, setSetning] = (0, import_react15.useState)("");
|
|
2453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.Modal, { visible: true, transparent: true, animationType: "fade", onRequestClose: onLukk, accessibilityViewIsModal: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.View, { style: { flex: 1, backgroundColor: tema.color.scrim, justifyContent: "flex-end", padding: tema.space.md }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2155
2454
|
import_react_native13.View,
|
|
2156
2455
|
{
|
|
2157
2456
|
testID: "hvordan-gikk-det",
|
|
@@ -2165,12 +2464,12 @@ function HvordanGikkDet({
|
|
|
2165
2464
|
gap: tema.space.md
|
|
2166
2465
|
},
|
|
2167
2466
|
children: [
|
|
2168
|
-
/* @__PURE__ */ (0,
|
|
2169
|
-
/* @__PURE__ */ (0,
|
|
2170
|
-
/* @__PURE__ */ (0,
|
|
2171
|
-
/* @__PURE__ */ (0,
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Btn, { variant: "ghost", testID: "hvordan-tilbake", ikon: "arrow-back-outline", label: tekst.tilbake, onPress: onLukk }),
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Hint, { children: under }),
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(H, { children: tekst.hvordanGikkDet }),
|
|
2470
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.View, { testID: "utfall-gruppe", accessibilityRole: "radiogroup", accessibilityLabel: tekst.hvordanGikkDet, style: { flexDirection: "row", gap: tema.space.sm }, children: UTFALL.map((u) => {
|
|
2172
2471
|
const aktiv = valgt === u.verdi;
|
|
2173
|
-
return /* @__PURE__ */ (0,
|
|
2472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2174
2473
|
import_react_native13.Pressable,
|
|
2175
2474
|
{
|
|
2176
2475
|
testID: `utfall-${u.verdi}`,
|
|
@@ -2191,16 +2490,16 @@ function HvordanGikkDet({
|
|
|
2191
2490
|
backgroundColor: aktiv ? tema.color.brandBg : tema.color.surfaceRaised
|
|
2192
2491
|
},
|
|
2193
2492
|
children: [
|
|
2194
|
-
/* @__PURE__ */ (0,
|
|
2195
|
-
/* @__PURE__ */ (0,
|
|
2493
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Ikon, { navn: u.ikon, farge: tema.color.textPrimary }),
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.Text, { style: { color: tema.color.textPrimary, fontSize: tema.font.small, fontWeight: aktiv ? tema.weight.semibold : tema.weight.regular }, children: u.etikett })
|
|
2196
2495
|
]
|
|
2197
2496
|
},
|
|
2198
2497
|
u.verdi
|
|
2199
2498
|
);
|
|
2200
2499
|
}) }),
|
|
2201
|
-
/* @__PURE__ */ (0,
|
|
2202
|
-
/* @__PURE__ */ (0,
|
|
2203
|
-
/* @__PURE__ */ (0,
|
|
2500
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native13.View, { style: { gap: tema.space.xs }, children: [
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: tekst.setningLabel }),
|
|
2502
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2204
2503
|
import_react_native13.TextInput,
|
|
2205
2504
|
{
|
|
2206
2505
|
testID: "hvordan-setning",
|
|
@@ -2227,8 +2526,8 @@ function HvordanGikkDet({
|
|
|
2227
2526
|
}
|
|
2228
2527
|
)
|
|
2229
2528
|
] }),
|
|
2230
|
-
feil ? /* @__PURE__ */ (0,
|
|
2231
|
-
/* @__PURE__ */ (0,
|
|
2529
|
+
feil ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Banner, { live: true, ikon: "warning-outline", tone: "danger", children: tekst.svarFeil(feil) }) : null,
|
|
2530
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2232
2531
|
Btn,
|
|
2233
2532
|
{
|
|
2234
2533
|
testID: "hvordan-lagre",
|
|
@@ -2248,9 +2547,9 @@ function HvordanGikkDet({
|
|
|
2248
2547
|
}
|
|
2249
2548
|
|
|
2250
2549
|
// src/program/Oppfolging.tsx
|
|
2251
|
-
var
|
|
2550
|
+
var import_react16 = require("react");
|
|
2252
2551
|
var import_react_native14 = require("react-native");
|
|
2253
|
-
var
|
|
2552
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2254
2553
|
function tarSvar(kind) {
|
|
2255
2554
|
return kind === "hvordan_gikk_det" || kind === "sjekkpunkt";
|
|
2256
2555
|
}
|
|
@@ -2265,9 +2564,9 @@ function Oppfolging({
|
|
|
2265
2564
|
}) {
|
|
2266
2565
|
const tema = useTema();
|
|
2267
2566
|
const art = tarSvar(oppfolging.kind) ? "spoersmaal" : oppfolging.kind === "tilbud_om_utgang" ? "utgang" : "paaminnelse";
|
|
2268
|
-
const ikon = art === "spoersmaal" ? "
|
|
2567
|
+
const ikon = art === "spoersmaal" ? "flask-outline" : art === "utgang" ? "exit-outline" : "calendar-outline";
|
|
2269
2568
|
const hint = art === "spoersmaal" ? tekst.oppfolgingKontakt(kontaktNr, maksKontakter) : art === "utgang" ? tekst.oppfolgingUtgangHint(kontaktNr, maksKontakter) : tekst.oppfolgingPaaminnelseHint(kontaktNr, maksKontakter);
|
|
2270
|
-
return /* @__PURE__ */ (0,
|
|
2569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2271
2570
|
import_react_native14.View,
|
|
2272
2571
|
{
|
|
2273
2572
|
testID: `oppfolging-${oppfolging.id}`,
|
|
@@ -2281,19 +2580,29 @@ function Oppfolging({
|
|
|
2281
2580
|
gap: tema.space.sm
|
|
2282
2581
|
},
|
|
2283
2582
|
children: [
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2287
|
-
/* @__PURE__ */ (0,
|
|
2288
|
-
/* @__PURE__ */ (0,
|
|
2583
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native14.View, { style: { flexDirection: "row", gap: tema.space.sm, alignItems: "flex-start" }, children: [
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Ikon, { navn: ikon, farge: tema.color.textPrimary }),
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native14.View, { style: { flex: 1, gap: tema.space.xs }, children: [
|
|
2586
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native14.Text, { style: { color: tema.color.textPrimary, fontSize: tema.font.body, lineHeight: tema.lineHeight.body }, children: oppfolging.question }),
|
|
2587
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Hint, { children: hint })
|
|
2289
2588
|
] })
|
|
2290
2589
|
] }),
|
|
2291
|
-
/* @__PURE__ */ (0,
|
|
2292
|
-
/* @__PURE__ */ (0,
|
|
2293
|
-
/* @__PURE__ */ (0,
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2590
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native14.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: art === "utgang" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
2591
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Btn, { grow: true, variant: "secondary", testID: `bli-vaerende-${oppfolging.id}`, label: tekst.bliVaerende, onPress: onSenere }),
|
|
2592
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2593
|
+
Btn,
|
|
2594
|
+
{
|
|
2595
|
+
grow: true,
|
|
2596
|
+
variant: "danger",
|
|
2597
|
+
testID: `gaa-ut-${oppfolging.id}`,
|
|
2598
|
+
ikon: "exit-outline",
|
|
2599
|
+
label: tekst.gaaUtBekreft,
|
|
2600
|
+
onPress: onGaaUt
|
|
2601
|
+
}
|
|
2602
|
+
)
|
|
2603
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
2604
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Btn, { grow: true, variant: "secondary", testID: `senere-${oppfolging.id}`, label: tekst.senere, onPress: onSenere }),
|
|
2605
|
+
art === "spoersmaal" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Btn, { grow: true, testID: `svar-naa-${oppfolging.id}`, label: tekst.svarNaa, onPress: onSvar }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Btn, { grow: true, testID: `aapne-oppgavene-${oppfolging.id}`, label: tekst.aapneOppgavene, onPress: onAapneOppgavene })
|
|
2297
2606
|
] }) })
|
|
2298
2607
|
]
|
|
2299
2608
|
}
|
|
@@ -2301,9 +2610,9 @@ function Oppfolging({
|
|
|
2301
2610
|
}
|
|
2302
2611
|
|
|
2303
2612
|
// src/program/Oppgaver.tsx
|
|
2304
|
-
var
|
|
2613
|
+
var import_react17 = require("react");
|
|
2305
2614
|
var import_react_native15 = require("react-native");
|
|
2306
|
-
var
|
|
2615
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2307
2616
|
function Oppgaver({
|
|
2308
2617
|
tasks,
|
|
2309
2618
|
completions,
|
|
@@ -2311,9 +2620,9 @@ function Oppgaver({
|
|
|
2311
2620
|
}) {
|
|
2312
2621
|
const tema = useTema();
|
|
2313
2622
|
const ferdig = new Map(completions.map((c) => [c.taskId, c]));
|
|
2314
|
-
return /* @__PURE__ */ (0,
|
|
2623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native15.View, { testID: "oppgaver", accessibilityLabel: tekst.oppgaverTittel, style: { gap: tema.space.sm }, children: [...tasks].sort((a, b) => a.order - b.order).map((o) => {
|
|
2315
2624
|
const c = ferdig.get(o.id);
|
|
2316
|
-
return /* @__PURE__ */ (0,
|
|
2625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2317
2626
|
import_react_native15.View,
|
|
2318
2627
|
{
|
|
2319
2628
|
testID: `oppgave-${o.id}`,
|
|
@@ -2326,14 +2635,28 @@ function Oppgaver({
|
|
|
2326
2635
|
borderBottomColor: tema.color.border
|
|
2327
2636
|
},
|
|
2328
2637
|
children: [
|
|
2329
|
-
/* @__PURE__ */ (0,
|
|
2330
|
-
/* @__PURE__ */ (0,
|
|
2331
|
-
/* @__PURE__ */ (0,
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native15.View, { style: { flex: 1, gap: tema.space.xs }, children: [
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native15.Text, { style: { color: tema.color.textPrimary, fontSize: tema.font.body, lineHeight: tema.lineHeight.body }, children: o.title }),
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Hint, { children: [
|
|
2332
2641
|
c ? tekst.oppgaveGjortMed(utfallEtikett(c.outcome)) : `${tekst.oppgaveIkkeBegynt} \xB7 ${tekst.akseptOppgaveTid(o.estimatedMinutes)}`,
|
|
2333
2642
|
c?.text ? ` \xB7 \xAB${c.text}\xBB` : ""
|
|
2334
2643
|
] })
|
|
2335
2644
|
] }),
|
|
2336
|
-
c ?
|
|
2645
|
+
c ? (
|
|
2646
|
+
// Merket er den eneste flaten der ikonet står alene, så etiketten
|
|
2647
|
+
// ligger på containeren: skjermleseren hører utfallet, ikke «hake».
|
|
2648
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native15.View, { accessibilityLabel: tekst.oppgaveGjortMed(utfallEtikett(c.outcome)), accessible: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Ikon, { navn: "checkmark-circle-outline", farge: tema.color.success }) })
|
|
2649
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2650
|
+
Btn,
|
|
2651
|
+
{
|
|
2652
|
+
variant: "secondary",
|
|
2653
|
+
testID: `gjort-${o.id}`,
|
|
2654
|
+
ikon: "checkmark-circle-outline",
|
|
2655
|
+
label: tekst.oppgaveGjort,
|
|
2656
|
+
accessibilityLabel: tekst.oppgaveGjortLabel(o.title),
|
|
2657
|
+
onPress: () => onGjort(o)
|
|
2658
|
+
}
|
|
2659
|
+
)
|
|
2337
2660
|
]
|
|
2338
2661
|
},
|
|
2339
2662
|
o.id
|
|
@@ -2342,7 +2665,7 @@ function Oppgaver({
|
|
|
2342
2665
|
}
|
|
2343
2666
|
|
|
2344
2667
|
// src/program/InnspelProgram.tsx
|
|
2345
|
-
var
|
|
2668
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2346
2669
|
function InnspelProgram({
|
|
2347
2670
|
invitationToken,
|
|
2348
2671
|
onEndring,
|
|
@@ -2350,19 +2673,19 @@ function InnspelProgram({
|
|
|
2350
2673
|
}) {
|
|
2351
2674
|
const { client } = useInnspel();
|
|
2352
2675
|
const tema = useTema();
|
|
2353
|
-
const [mine, setMine] = (0,
|
|
2354
|
-
const [deltakelse, setDeltakelse] = (0,
|
|
2355
|
-
const [viserAksept, setViserAksept] = (0,
|
|
2356
|
-
const [viserGaaUt, setViserGaaUt] = (0,
|
|
2357
|
-
const [avvist, setAvvist] = (0,
|
|
2358
|
-
const [sender, setSender] = (0,
|
|
2359
|
-
const [feil, setFeil] = (0,
|
|
2360
|
-
const [dialog, setDialog] = (0,
|
|
2361
|
-
const [svarFeil, setSvarFeil] = (0,
|
|
2362
|
-
const [lagtBort, setLagtBort] = (0,
|
|
2363
|
-
const [meldFeilFor, setMeldFeilFor] = (0,
|
|
2364
|
-
const leggBort = (0,
|
|
2365
|
-
const lagreSvar = (0,
|
|
2676
|
+
const [mine, setMine] = (0, import_react18.useState)();
|
|
2677
|
+
const [deltakelse, setDeltakelse] = (0, import_react18.useState)();
|
|
2678
|
+
const [viserAksept, setViserAksept] = (0, import_react18.useState)(false);
|
|
2679
|
+
const [viserGaaUt, setViserGaaUt] = (0, import_react18.useState)(false);
|
|
2680
|
+
const [avvist, setAvvist] = (0, import_react18.useState)(false);
|
|
2681
|
+
const [sender, setSender] = (0, import_react18.useState)(false);
|
|
2682
|
+
const [feil, setFeil] = (0, import_react18.useState)();
|
|
2683
|
+
const [dialog, setDialog] = (0, import_react18.useState)();
|
|
2684
|
+
const [svarFeil, setSvarFeil] = (0, import_react18.useState)();
|
|
2685
|
+
const [lagtBort, setLagtBort] = (0, import_react18.useState)(/* @__PURE__ */ new Set());
|
|
2686
|
+
const [meldFeilFor, setMeldFeilFor] = (0, import_react18.useState)();
|
|
2687
|
+
const leggBort = (0, import_react18.useCallback)((id) => setLagtBort((s) => /* @__PURE__ */ new Set([...s, id])), []);
|
|
2688
|
+
const lagreSvar = (0, import_react18.useCallback)(
|
|
2366
2689
|
async (outcome, text) => {
|
|
2367
2690
|
if (!dialog || !deltakelse) return;
|
|
2368
2691
|
setSender(true);
|
|
@@ -2385,7 +2708,7 @@ function InnspelProgram({
|
|
|
2385
2708
|
},
|
|
2386
2709
|
[client, deltakelse, dialog, onMeldFeil]
|
|
2387
2710
|
);
|
|
2388
|
-
(0,
|
|
2711
|
+
(0, import_react18.useEffect)(() => {
|
|
2389
2712
|
if (client.isAnonymous) return;
|
|
2390
2713
|
let levende = true;
|
|
2391
2714
|
void client.programs.list().then((svar) => {
|
|
@@ -2397,7 +2720,7 @@ function InnspelProgram({
|
|
|
2397
2720
|
levende = false;
|
|
2398
2721
|
};
|
|
2399
2722
|
}, [client]);
|
|
2400
|
-
const bliMed = (0,
|
|
2723
|
+
const bliMed = (0, import_react18.useCallback)(async () => {
|
|
2401
2724
|
if (!invitationToken) return;
|
|
2402
2725
|
setSender(true);
|
|
2403
2726
|
setFeil(void 0);
|
|
@@ -2412,7 +2735,7 @@ function InnspelProgram({
|
|
|
2412
2735
|
setSender(false);
|
|
2413
2736
|
}
|
|
2414
2737
|
}, [client, invitationToken, onEndring]);
|
|
2415
|
-
const gaaUt = (0,
|
|
2738
|
+
const gaaUt = (0, import_react18.useCallback)(async () => {
|
|
2416
2739
|
if (!deltakelse) return;
|
|
2417
2740
|
setSender(true);
|
|
2418
2741
|
try {
|
|
@@ -2432,8 +2755,8 @@ function InnspelProgram({
|
|
|
2432
2755
|
if (deltakelse) {
|
|
2433
2756
|
const kort = (mine?.pendingFollowUps ?? []).filter((f) => f.programId === program.id && !lagtBort.has(f.id)).sort((a, b) => a.emittedAt.localeCompare(b.emittedAt));
|
|
2434
2757
|
const forsteKontaktNr = Math.max(1, deltakelse.contactsSent - kort.length + 1);
|
|
2435
|
-
return /* @__PURE__ */ (0,
|
|
2436
|
-
kort.map((f, i) => /* @__PURE__ */ (0,
|
|
2758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { testID: "program-deltakelse", accessibilityLabel: tekst.deltakelseRegion, style: { gap: tema.space.sm }, children: [
|
|
2759
|
+
kort.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2437
2760
|
Oppfolging,
|
|
2438
2761
|
{
|
|
2439
2762
|
oppfolging: f,
|
|
@@ -2449,9 +2772,9 @@ function InnspelProgram({
|
|
|
2449
2772
|
},
|
|
2450
2773
|
f.id
|
|
2451
2774
|
)),
|
|
2452
|
-
/* @__PURE__ */ (0,
|
|
2453
|
-
/* @__PURE__ */ (0,
|
|
2454
|
-
/* @__PURE__ */ (0,
|
|
2775
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Card, { children: [
|
|
2776
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(H, { sub: tekst.deltakelsePeriode(periode(program.opensAt, program.closesAt), deltakelse.contactsSent, program.maxContacts), children: program.name }),
|
|
2777
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2455
2778
|
Oppgaver,
|
|
2456
2779
|
{
|
|
2457
2780
|
tasks: program.tasks,
|
|
@@ -2462,14 +2785,14 @@ function InnspelProgram({
|
|
|
2462
2785
|
}
|
|
2463
2786
|
}
|
|
2464
2787
|
),
|
|
2465
|
-
meldFeilFor && onMeldFeil ? /* @__PURE__ */ (0,
|
|
2466
|
-
/* @__PURE__ */ (0,
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2788
|
+
meldFeilFor && onMeldFeil ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { style: { gap: tema.space.xs }, children: [
|
|
2789
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Hint, { children: tekst.meldFeilHint }),
|
|
2790
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2468
2791
|
Btn,
|
|
2469
2792
|
{
|
|
2470
2793
|
variant: "secondary",
|
|
2471
2794
|
testID: "meld-feil",
|
|
2472
|
-
ikon: "
|
|
2795
|
+
ikon: "bug-outline",
|
|
2473
2796
|
label: tekst.meldFeil,
|
|
2474
2797
|
onPress: () => {
|
|
2475
2798
|
const task = meldFeilFor;
|
|
@@ -2479,9 +2802,9 @@ function InnspelProgram({
|
|
|
2479
2802
|
}
|
|
2480
2803
|
)
|
|
2481
2804
|
] }) : null,
|
|
2482
|
-
/* @__PURE__ */ (0,
|
|
2805
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Btn, { variant: "ghost", testID: "gaa-ut", ikon: "exit-outline", label: tekst.gaaUt, onPress: () => setViserGaaUt(true) })
|
|
2483
2806
|
] }),
|
|
2484
|
-
dialog ? /* @__PURE__ */ (0,
|
|
2807
|
+
dialog ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2485
2808
|
HvordanGikkDet,
|
|
2486
2809
|
{
|
|
2487
2810
|
under: dialog.type === "oppgave" ? dialog.task.title : dialog.oppfolging.question,
|
|
@@ -2491,7 +2814,7 @@ function InnspelProgram({
|
|
|
2491
2814
|
onLukk: () => setDialog(void 0)
|
|
2492
2815
|
}
|
|
2493
2816
|
) : null,
|
|
2494
|
-
viserGaaUt ? /* @__PURE__ */ (0,
|
|
2817
|
+
viserGaaUt ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native16.Modal, { visible: true, transparent: true, animationType: "fade", onRequestClose: () => setViserGaaUt(false), accessibilityViewIsModal: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native16.View, { style: { flex: 1, backgroundColor: tema.color.scrim, justifyContent: "flex-end", padding: tema.space.md }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2495
2818
|
import_react_native16.View,
|
|
2496
2819
|
{
|
|
2497
2820
|
testID: "gaa-ut-dialog",
|
|
@@ -2505,11 +2828,22 @@ function InnspelProgram({
|
|
|
2505
2828
|
gap: tema.space.md
|
|
2506
2829
|
},
|
|
2507
2830
|
children: [
|
|
2508
|
-
/* @__PURE__ */ (0,
|
|
2509
|
-
/* @__PURE__ */ (0,
|
|
2510
|
-
/* @__PURE__ */ (0,
|
|
2511
|
-
/* @__PURE__ */ (0,
|
|
2512
|
-
/* @__PURE__ */ (0,
|
|
2831
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(H, { children: tekst.gaaUtTittel }),
|
|
2832
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native16.Text, { style: { color: tema.color.textPrimary, fontSize: tema.font.body, lineHeight: tema.lineHeight.body }, children: tekst.gaaUtTekst(program.name) }),
|
|
2833
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Btn, { grow: true, variant: "secondary", testID: "bli-vaerende", label: tekst.bliVaerende, onPress: () => setViserGaaUt(false) }),
|
|
2835
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2836
|
+
Btn,
|
|
2837
|
+
{
|
|
2838
|
+
grow: true,
|
|
2839
|
+
variant: "danger",
|
|
2840
|
+
testID: "bekreft-gaa-ut",
|
|
2841
|
+
ikon: "exit-outline",
|
|
2842
|
+
label: tekst.gaaUtBekreft,
|
|
2843
|
+
disabled: sender,
|
|
2844
|
+
onPress: () => void gaaUt()
|
|
2845
|
+
}
|
|
2846
|
+
)
|
|
2513
2847
|
] })
|
|
2514
2848
|
]
|
|
2515
2849
|
}
|
|
@@ -2517,8 +2851,8 @@ function InnspelProgram({
|
|
|
2517
2851
|
] });
|
|
2518
2852
|
}
|
|
2519
2853
|
if (!invitasjon || avvist) return null;
|
|
2520
|
-
return /* @__PURE__ */ (0,
|
|
2521
|
-
/* @__PURE__ */ (0,
|
|
2854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
2855
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2522
2856
|
import_react_native16.View,
|
|
2523
2857
|
{
|
|
2524
2858
|
testID: "program-banner",
|
|
@@ -2532,13 +2866,13 @@ function InnspelProgram({
|
|
|
2532
2866
|
gap: tema.space.sm
|
|
2533
2867
|
},
|
|
2534
2868
|
children: [
|
|
2535
|
-
/* @__PURE__ */ (0,
|
|
2536
|
-
/* @__PURE__ */ (0,
|
|
2537
|
-
/* @__PURE__ */ (0,
|
|
2538
|
-
/* @__PURE__ */ (0,
|
|
2539
|
-
/* @__PURE__ */ (0,
|
|
2869
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { style: { flexDirection: "row", gap: tema.space.sm, alignItems: "flex-start" }, children: [
|
|
2870
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Ikon, { navn: "flask-outline", farge: tema.color.textPrimary }),
|
|
2871
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { style: { flex: 1, gap: tema.space.xs }, children: [
|
|
2872
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native16.Text, { style: { color: tema.color.textPrimary, fontSize: tema.font.body, lineHeight: tema.lineHeight.body }, children: tekst.invitasjonHva(program.name) }),
|
|
2873
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Hint, { children: tekst.invitasjonKontakter(program.maxContacts) })
|
|
2540
2874
|
] }),
|
|
2541
|
-
/* @__PURE__ */ (0,
|
|
2875
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2542
2876
|
import_react_native16.Pressable,
|
|
2543
2877
|
{
|
|
2544
2878
|
testID: "avvis-invitasjon",
|
|
@@ -2546,16 +2880,16 @@ function InnspelProgram({
|
|
|
2546
2880
|
accessibilityLabel: tekst.avvisInvitasjon,
|
|
2547
2881
|
onPress: () => setAvvist(true),
|
|
2548
2882
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
2549
|
-
children: /* @__PURE__ */ (0,
|
|
2883
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Ikon, { navn: "close-outline", farge: tema.color.textSecondary })
|
|
2550
2884
|
}
|
|
2551
2885
|
)
|
|
2552
2886
|
] }),
|
|
2553
|
-
feil && !viserAksept ? /* @__PURE__ */ (0,
|
|
2554
|
-
/* @__PURE__ */ (0,
|
|
2887
|
+
feil && !viserAksept ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Banner, { live: true, ikon: "warning-outline", tone: "danger", children: tekst.akseptFeil(feil) }) : null,
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Btn, { variant: "secondary", testID: "les-mer", label: tekst.lesMer, onPress: () => setViserAksept(true) })
|
|
2555
2889
|
]
|
|
2556
2890
|
}
|
|
2557
2891
|
),
|
|
2558
|
-
viserAksept ? /* @__PURE__ */ (0,
|
|
2892
|
+
viserAksept ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2559
2893
|
Aksept,
|
|
2560
2894
|
{
|
|
2561
2895
|
program,
|