@innspel/react-native 0.7.1 → 0.9.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 +850 -499
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -50
- package/dist/index.d.ts +46 -50
- package/dist/index.js +702 -351
- 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,40 @@ 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
|
-
|
|
855
|
+
/** Knappen på første steg med innspill fra før (DD-62): tallet er det som gjør den til en inngang. */
|
|
856
|
+
mineMedAntall: (n) => `Mine innspill \xB7 ${n}`,
|
|
857
|
+
mineEtikett: (n) => `Mine innspill, ${n} innspill`,
|
|
858
|
+
mineUnder: "Status og hva du kan vente deg.",
|
|
608
859
|
mineTom: "Du har ikke sendt noe enn\xE5.",
|
|
609
860
|
mineIkkeSendt: "Ikke sendt enn\xE5",
|
|
610
|
-
mineSak: (nr) => `Sak ${nr}`,
|
|
861
|
+
mineSak: (nr) => `Sak ${saksnr(nr)}`,
|
|
862
|
+
/** «Feil · sak 2041» — sporet først, aldri rå id og aldri kontraktens type (DD-50). */
|
|
863
|
+
sakHode: (spor, nr) => `${stor(spor)} \xB7 sak ${saksnr(nr)}`,
|
|
611
864
|
// Leietakeren fjernet vedlegget. Bare AT — aldri hvorfor, av hvem eller når.
|
|
612
865
|
bildeFjernet: "Bildet er fjernet.",
|
|
613
866
|
svarFra: (leietaker) => `Svar fra ${leietaker}`,
|
|
614
867
|
svarFraGenerisk: "Svar",
|
|
615
868
|
sendNytt: "Send nytt innspill",
|
|
869
|
+
/** Tom tilstand: det finnes ikke noe «nytt» å sende når ingenting er sendt. */
|
|
870
|
+
sendForste: "Send innspill",
|
|
616
871
|
// 3a — invitasjonsbanneret (DD-12)
|
|
617
872
|
invitasjonRegion: "Invitasjon til betaprogram",
|
|
618
873
|
invitasjonHva: (navn) => `Vil du teste \xAB${navn}\xBB?`,
|
|
@@ -640,7 +895,7 @@ var tekst = {
|
|
|
640
895
|
akseptFeil: (arsak) => `Kunne ikke bli med: ${arsak}`,
|
|
641
896
|
// 3c (M3.1-delen) — deltakelsen og «Gå ut» (DD-36)
|
|
642
897
|
deltakelseRegion: "Ditt betaprogram",
|
|
643
|
-
deltakelsePeriode: (periode2, brukt, maks) => `${periode2} \xB7 ${
|
|
898
|
+
deltakelsePeriode: (periode2, brukt, maks) => `${periode2} \xB7 Vi tar kontakt maks ${maks} ganger \u2014 ${brukt} brukt`,
|
|
644
899
|
deltakelseOppgaverKommer: "Oppgavene kan gj\xF8res n\xE5r det passer deg.",
|
|
645
900
|
gaaUt: "G\xE5 ut av programmet",
|
|
646
901
|
gaaUtTittel: "G\xE5 ut av programmet?",
|
|
@@ -652,11 +907,11 @@ var tekst = {
|
|
|
652
907
|
oppgaveIkkeBegynt: "Ikke begynt",
|
|
653
908
|
oppgaveGjort: "Gjort",
|
|
654
909
|
oppgaveGjortLabel: (tittel) => `Gjort: ${tittel}`,
|
|
655
|
-
oppgaveGjortMed: (utfall) => `
|
|
910
|
+
oppgaveGjortMed: (utfall) => `Pr\xF8vd \xB7 ${utfall}`,
|
|
656
911
|
hvordanGikkDet: "Hvordan gikk det?",
|
|
657
912
|
utfallFungerte: "Fungerte",
|
|
658
|
-
utfallDelvis: "
|
|
659
|
-
utfallIkke: "
|
|
913
|
+
utfallDelvis: "Fungerte delvis",
|
|
914
|
+
utfallIkke: "Fungerte ikke",
|
|
660
915
|
setningLabel: "Vil du si \xE9n setning om det? (valgfritt)",
|
|
661
916
|
setningPlaceholder: "Kopien kom, men rullesjefen manglet p\xE5 torsdag.",
|
|
662
917
|
lagre: "Lagre",
|
|
@@ -676,24 +931,16 @@ var tekst = {
|
|
|
676
931
|
// Felles
|
|
677
932
|
tilbake: "Tilbake",
|
|
678
933
|
lukk: "Lukk",
|
|
679
|
-
venterPaaNett: "Venter p\xE5 nett \u2014 sendes automatisk"
|
|
934
|
+
venterPaaNett: "Venter p\xE5 nett \u2014 sendes automatisk",
|
|
935
|
+
feil: "feil",
|
|
936
|
+
onske: "\xF8nske"
|
|
680
937
|
};
|
|
681
938
|
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."
|
|
939
|
+
venterNett: "Sendes automatisk n\xE5r du er p\xE5 nett \u2014 kvitteringen kommer da."
|
|
693
940
|
};
|
|
694
941
|
|
|
695
942
|
// src/widget/Felt.tsx
|
|
696
|
-
var
|
|
943
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
697
944
|
function Felt({
|
|
698
945
|
spor,
|
|
699
946
|
verdi,
|
|
@@ -708,6 +955,8 @@ function Felt({
|
|
|
708
955
|
funn,
|
|
709
956
|
onSend,
|
|
710
957
|
sender,
|
|
958
|
+
harFeil,
|
|
959
|
+
offline,
|
|
711
960
|
onSkjermbilde,
|
|
712
961
|
onVelgBilde,
|
|
713
962
|
bildeNotat,
|
|
@@ -715,14 +964,14 @@ function Felt({
|
|
|
715
964
|
onFjernVedlegg
|
|
716
965
|
}) {
|
|
717
966
|
const tema = useTema();
|
|
718
|
-
const [apen, setApen] = (0,
|
|
719
|
-
const [beholdt, setBeholdt] = (0,
|
|
967
|
+
const [apen, setApen] = (0, import_react5.useState)(false);
|
|
968
|
+
const [beholdt, setBeholdt] = (0, import_react5.useState)([]);
|
|
720
969
|
const brukt = verdi.length;
|
|
721
970
|
const forKort = brukt < minTextLength;
|
|
722
971
|
const full = brukt >= textMaxLength;
|
|
723
972
|
const visTeller = brukt >= textMaxLength * 0.8;
|
|
724
973
|
const uavklart = funn.find((f) => !beholdt.includes(f.match));
|
|
725
|
-
const linjer = (0,
|
|
974
|
+
const linjer = (0, import_react5.useMemo)(() => {
|
|
726
975
|
const etiketter = {
|
|
727
976
|
screen: "Skjerm",
|
|
728
977
|
appVersion: "Appversjon",
|
|
@@ -736,8 +985,8 @@ function Felt({
|
|
|
736
985
|
return verdi2 && !fjernedeFelter.includes(felt) ? { felt, etikett, verdi: verdi2 } : null;
|
|
737
986
|
}).filter((x) => x !== null);
|
|
738
987
|
}, [kontekst, fjernedeFelter]);
|
|
739
|
-
return /* @__PURE__ */ (0,
|
|
740
|
-
/* @__PURE__ */ (0,
|
|
988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { testID: "skjema", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
741
990
|
import_react_native3.ScrollView,
|
|
742
991
|
{
|
|
743
992
|
testID: "skjema-kropp",
|
|
@@ -745,7 +994,7 @@ function Felt({
|
|
|
745
994
|
contentContainerStyle: { gap: tema.space.md },
|
|
746
995
|
keyboardShouldPersistTaps: "handled",
|
|
747
996
|
children: [
|
|
748
|
-
lenketTil ? /* @__PURE__ */ (0,
|
|
997
|
+
lenketTil ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
749
998
|
import_react_native3.View,
|
|
750
999
|
{
|
|
751
1000
|
style: {
|
|
@@ -760,8 +1009,8 @@ function Felt({
|
|
|
760
1009
|
paddingRight: tema.space.xs
|
|
761
1010
|
},
|
|
762
1011
|
children: [
|
|
763
|
-
/* @__PURE__ */ (0,
|
|
764
|
-
/* @__PURE__ */ (0,
|
|
1012
|
+
/* @__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) }),
|
|
1013
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
765
1014
|
import_react_native3.Pressable,
|
|
766
1015
|
{
|
|
767
1016
|
testID: "fjern-lenke",
|
|
@@ -769,13 +1018,13 @@ function Felt({
|
|
|
769
1018
|
accessibilityLabel: tekst.fjernLenke,
|
|
770
1019
|
onPress: onFjernLenke,
|
|
771
1020
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
772
|
-
children: /* @__PURE__ */ (0,
|
|
1021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Ikon, { navn: "close-outline", farge: tema.color.textSecondary })
|
|
773
1022
|
}
|
|
774
1023
|
)
|
|
775
1024
|
]
|
|
776
1025
|
}
|
|
777
1026
|
) : null,
|
|
778
|
-
uavklart ? /* @__PURE__ */ (0,
|
|
1027
|
+
uavklart ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
779
1028
|
import_react_native3.View,
|
|
780
1029
|
{
|
|
781
1030
|
style: {
|
|
@@ -785,7 +1034,7 @@ function Felt({
|
|
|
785
1034
|
padding: tema.space.md
|
|
786
1035
|
},
|
|
787
1036
|
children: [
|
|
788
|
-
/* @__PURE__ */ (0,
|
|
1037
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
789
1038
|
import_react_native3.Text,
|
|
790
1039
|
{
|
|
791
1040
|
accessibilityRole: "alert",
|
|
@@ -799,8 +1048,8 @@ function Felt({
|
|
|
799
1048
|
children: tekst.monsterSpm[uavklart.kind]
|
|
800
1049
|
}
|
|
801
1050
|
),
|
|
802
|
-
/* @__PURE__ */ (0,
|
|
803
|
-
/* @__PURE__ */ (0,
|
|
1051
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
1052
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
804
1053
|
Btn,
|
|
805
1054
|
{
|
|
806
1055
|
grow: true,
|
|
@@ -810,7 +1059,7 @@ function Felt({
|
|
|
810
1059
|
onPress: () => onEndre(verdi.slice(0, uavklart.start) + verdi.slice(uavklart.end))
|
|
811
1060
|
}
|
|
812
1061
|
),
|
|
813
|
-
/* @__PURE__ */ (0,
|
|
1062
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
814
1063
|
Btn,
|
|
815
1064
|
{
|
|
816
1065
|
grow: true,
|
|
@@ -821,12 +1070,12 @@ function Felt({
|
|
|
821
1070
|
}
|
|
822
1071
|
)
|
|
823
1072
|
] }),
|
|
824
|
-
/* @__PURE__ */ (0,
|
|
1073
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Hint, { children: tekst.monsterForklaring })
|
|
825
1074
|
]
|
|
826
1075
|
}
|
|
827
1076
|
) : null,
|
|
828
|
-
/* @__PURE__ */ (0,
|
|
829
|
-
/* @__PURE__ */ (0,
|
|
1077
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(H, { children: spor === "onske" ? tekst.feltLabelOnske : tekst.feltLabelFeil }),
|
|
1078
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
830
1079
|
import_react_native3.TextInput,
|
|
831
1080
|
{
|
|
832
1081
|
testID: "innspill-tekst",
|
|
@@ -852,7 +1101,7 @@ function Felt({
|
|
|
852
1101
|
}
|
|
853
1102
|
}
|
|
854
1103
|
),
|
|
855
|
-
visTeller ? /* @__PURE__ */ (0,
|
|
1104
|
+
visTeller ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
856
1105
|
import_react_native3.Text,
|
|
857
1106
|
{
|
|
858
1107
|
testID: "teller",
|
|
@@ -870,7 +1119,7 @@ function Felt({
|
|
|
870
1119
|
]
|
|
871
1120
|
}
|
|
872
1121
|
) : null,
|
|
873
|
-
harVedlegg ? /* @__PURE__ */ (0,
|
|
1122
|
+
harVedlegg ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
874
1123
|
import_react_native3.View,
|
|
875
1124
|
{
|
|
876
1125
|
testID: "vedlegg-chip",
|
|
@@ -886,9 +1135,9 @@ function Felt({
|
|
|
886
1135
|
paddingRight: tema.space.xs
|
|
887
1136
|
},
|
|
888
1137
|
children: [
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__PURE__ */ (0,
|
|
891
|
-
/* @__PURE__ */ (0,
|
|
1138
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Ikon, { navn: "image-outline", storrelse: "minste", farge: tema.color.textPrimary }),
|
|
1139
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: tekst.bildeLagtVed }),
|
|
1140
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
892
1141
|
import_react_native3.Pressable,
|
|
893
1142
|
{
|
|
894
1143
|
testID: "fjern-vedlegg",
|
|
@@ -896,38 +1145,38 @@ function Felt({
|
|
|
896
1145
|
accessibilityLabel: tekst.fjernSkjermbilde,
|
|
897
1146
|
onPress: onFjernVedlegg,
|
|
898
1147
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
899
|
-
children: /* @__PURE__ */ (0,
|
|
1148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Ikon, { navn: "close-outline", farge: tema.color.textSecondary })
|
|
900
1149
|
}
|
|
901
1150
|
)
|
|
902
1151
|
]
|
|
903
1152
|
}
|
|
904
|
-
) : onSkjermbilde || onVelgBilde ? /* @__PURE__ */ (0,
|
|
905
|
-
onSkjermbilde ? /* @__PURE__ */ (0,
|
|
1153
|
+
) : onSkjermbilde || onVelgBilde ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { gap: tema.space.sm }, children: [
|
|
1154
|
+
onSkjermbilde ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
906
1155
|
Btn,
|
|
907
1156
|
{
|
|
908
1157
|
variant: "secondary",
|
|
909
1158
|
testID: "legg-ved-skjermbilde",
|
|
910
|
-
ikon: "
|
|
1159
|
+
ikon: "camera-outline",
|
|
911
1160
|
label: tekst.leggVedSkjermbilde,
|
|
912
1161
|
hint: tekst.leggVedHint,
|
|
913
1162
|
onPress: onSkjermbilde
|
|
914
1163
|
}
|
|
915
1164
|
) : null,
|
|
916
|
-
onVelgBilde ? /* @__PURE__ */ (0,
|
|
1165
|
+
onVelgBilde ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
917
1166
|
Btn,
|
|
918
1167
|
{
|
|
919
1168
|
variant: "secondary",
|
|
920
1169
|
testID: "velg-bilde",
|
|
921
|
-
ikon: "
|
|
1170
|
+
ikon: "images-outline",
|
|
922
1171
|
label: tekst.velgBilde,
|
|
923
1172
|
hint: tekst.velgBildeHint,
|
|
924
1173
|
onPress: onVelgBilde
|
|
925
1174
|
}
|
|
926
1175
|
) : null,
|
|
927
|
-
bildeNotat ? /* @__PURE__ */ (0,
|
|
1176
|
+
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
1177
|
] }) : null,
|
|
929
|
-
/* @__PURE__ */ (0,
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { borderTopWidth: tema.hairline, borderTopColor: tema.color.border, paddingTop: tema.space.sm }, children: [
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
931
1180
|
import_react_native3.Pressable,
|
|
932
1181
|
{
|
|
933
1182
|
testID: "kontekst-bryter",
|
|
@@ -936,16 +1185,24 @@ function Felt({
|
|
|
936
1185
|
accessibilityLabel: `${tekst.kontekstLinje}${apen ? "" : tekst.kontekstVis}`,
|
|
937
1186
|
onPress: () => setApen((a) => !a),
|
|
938
1187
|
style: { minHeight: tema.touch, justifyContent: "center" },
|
|
939
|
-
children: /* @__PURE__ */ (0,
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1190
|
+
Ikon,
|
|
1191
|
+
{
|
|
1192
|
+
navn: apen ? "chevron-up-outline" : "chevron-down-outline",
|
|
1193
|
+
storrelse: "minste",
|
|
1194
|
+
farge: tema.color.textSecondary
|
|
1195
|
+
}
|
|
1196
|
+
),
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textSecondary, fontSize: tema.font.small }, children: [
|
|
1198
|
+
tekst.kontekstLinje,
|
|
1199
|
+
apen ? "" : tekst.kontekstVis
|
|
1200
|
+
] })
|
|
944
1201
|
] })
|
|
945
1202
|
}
|
|
946
1203
|
),
|
|
947
|
-
apen ? /* @__PURE__ */ (0,
|
|
948
|
-
linjer.map((l) => /* @__PURE__ */ (0,
|
|
1204
|
+
apen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { children: [
|
|
1205
|
+
linjer.map((l) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
949
1206
|
import_react_native3.View,
|
|
950
1207
|
{
|
|
951
1208
|
style: {
|
|
@@ -957,9 +1214,9 @@ function Felt({
|
|
|
957
1214
|
borderBottomColor: tema.color.border
|
|
958
1215
|
},
|
|
959
1216
|
children: [
|
|
960
|
-
/* @__PURE__ */ (0,
|
|
961
|
-
/* @__PURE__ */ (0,
|
|
962
|
-
/* @__PURE__ */ (0,
|
|
1217
|
+
/* @__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 }),
|
|
1218
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.small }, children: l.verdi }),
|
|
1219
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
963
1220
|
import_react_native3.Pressable,
|
|
964
1221
|
{
|
|
965
1222
|
testID: `fjern-${l.felt}`,
|
|
@@ -967,9 +1224,9 @@ function Felt({
|
|
|
967
1224
|
accessibilityLabel: `${tekst.kontekstFjern} ${l.etikett.toLowerCase()} fra innsendingen`,
|
|
968
1225
|
onPress: () => onFjernKontekst(l.felt),
|
|
969
1226
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
970
|
-
children: /* @__PURE__ */ (0,
|
|
971
|
-
"
|
|
972
|
-
tekst.kontekstFjern
|
|
1227
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
1228
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Ikon, { navn: "close-outline", storrelse: "minste", farge: tema.color.textSecondary }),
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: tekst.kontekstFjern })
|
|
973
1230
|
] })
|
|
974
1231
|
}
|
|
975
1232
|
)
|
|
@@ -977,18 +1234,19 @@ function Felt({
|
|
|
977
1234
|
},
|
|
978
1235
|
l.felt
|
|
979
1236
|
)),
|
|
980
|
-
/* @__PURE__ */ (0,
|
|
1237
|
+
/* @__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
1238
|
] }) : null
|
|
982
1239
|
] })
|
|
983
1240
|
]
|
|
984
1241
|
}
|
|
985
1242
|
),
|
|
986
|
-
/* @__PURE__ */ (0,
|
|
1243
|
+
/* @__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
1244
|
Btn,
|
|
988
1245
|
{
|
|
989
1246
|
testID: "send",
|
|
990
|
-
label:
|
|
1247
|
+
label: sender ? tekst.sender : harFeil ? tekst.provIgjen : offline ? tekst.offlineLagre : tekst.send,
|
|
991
1248
|
disabled: forKort || sender,
|
|
1249
|
+
busy: sender,
|
|
992
1250
|
hint: forKort ? tekst.forKort(minTextLength) : harVedlegg ? tekst.sendHintMedBilde : void 0,
|
|
993
1251
|
onPress: onSend
|
|
994
1252
|
}
|
|
@@ -997,12 +1255,12 @@ function Felt({
|
|
|
997
1255
|
}
|
|
998
1256
|
|
|
999
1257
|
// src/widget/Valg.tsx
|
|
1000
|
-
var
|
|
1258
|
+
var import_react6 = require("react");
|
|
1001
1259
|
var import_react_native4 = require("react-native");
|
|
1002
|
-
var
|
|
1260
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1003
1261
|
function Valg({ onVelg }) {
|
|
1004
1262
|
const tema = useTema();
|
|
1005
|
-
const flate = (spor, ikon, label, under) => /* @__PURE__ */ (0,
|
|
1263
|
+
const flate = (spor, ikon, label, under) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1006
1264
|
import_react_native4.Pressable,
|
|
1007
1265
|
{
|
|
1008
1266
|
testID: `spor-${spor}`,
|
|
@@ -1022,8 +1280,8 @@ function Valg({ onVelg }) {
|
|
|
1022
1280
|
padding: tema.space.md
|
|
1023
1281
|
},
|
|
1024
1282
|
children: [
|
|
1025
|
-
/* @__PURE__ */ (0,
|
|
1026
|
-
/* @__PURE__ */ (0,
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Ikon, { navn: ikon, storrelse: "stor", farge: tema.color.textPrimary }),
|
|
1284
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1027
1285
|
import_react_native4.Text,
|
|
1028
1286
|
{
|
|
1029
1287
|
style: {
|
|
@@ -1035,52 +1293,55 @@ function Valg({ onVelg }) {
|
|
|
1035
1293
|
children: label
|
|
1036
1294
|
}
|
|
1037
1295
|
),
|
|
1038
|
-
/* @__PURE__ */ (0,
|
|
1296
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native4.Text, { style: { color: tema.color.textMuted, fontSize: tema.font.small, textAlign: "center" }, children: under })
|
|
1039
1297
|
]
|
|
1040
1298
|
}
|
|
1041
1299
|
);
|
|
1042
|
-
return /* @__PURE__ */ (0,
|
|
1043
|
-
/* @__PURE__ */ (0,
|
|
1044
|
-
/* @__PURE__ */ (0,
|
|
1045
|
-
flate("feil", "
|
|
1046
|
-
flate("onske", "
|
|
1300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native4.View, { style: { flex: 1, gap: tema.space.lg }, children: [
|
|
1301
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(H, { children: tekst.valgTittel }),
|
|
1302
|
+
/* @__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: [
|
|
1303
|
+
flate("feil", "bug-outline", tekst.sporFeil, tekst.sporFeilUnder),
|
|
1304
|
+
flate("onske", "bulb-outline", tekst.sporOnske, tekst.sporOnskeUnder)
|
|
1047
1305
|
] }) })
|
|
1048
1306
|
] });
|
|
1049
1307
|
}
|
|
1050
1308
|
|
|
1051
1309
|
// src/widget/KjenteFeil.tsx
|
|
1052
|
-
var
|
|
1310
|
+
var import_react7 = require("react");
|
|
1053
1311
|
var import_react_native5 = require("react-native");
|
|
1054
|
-
var
|
|
1312
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1313
|
+
var MAKS_KORT = 3;
|
|
1055
1314
|
function KjenteFeil({
|
|
1056
1315
|
kort,
|
|
1057
1316
|
spor,
|
|
1058
1317
|
laster,
|
|
1318
|
+
sender,
|
|
1059
1319
|
onJaOgsa,
|
|
1060
1320
|
onLigner,
|
|
1061
1321
|
onNei
|
|
1062
1322
|
}) {
|
|
1063
1323
|
const tema = useTema();
|
|
1064
1324
|
if (laster) {
|
|
1065
|
-
return /* @__PURE__ */ (0,
|
|
1066
|
-
/* @__PURE__ */ (0,
|
|
1067
|
-
/* @__PURE__ */ (0,
|
|
1325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { style: { flex: 1, gap: tema.space.md }, children: [
|
|
1326
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(H, { sub: spor === "onske" ? tekst.kjenteFeilUnderOnske : tekst.kjenteFeilUnderFeil, children: spor === "onske" ? tekst.kjenteFeilTittelOnske : tekst.kjenteFeilTittelFeil }),
|
|
1327
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.ActivityIndicator, { accessibilityLabel: "Sjekker kjente feil", color: tema.color.textSecondary })
|
|
1068
1328
|
] });
|
|
1069
1329
|
}
|
|
1070
|
-
return /* @__PURE__ */ (0,
|
|
1071
|
-
/* @__PURE__ */ (0,
|
|
1072
|
-
/* @__PURE__ */ (0,
|
|
1330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { testID: "kjente-feil", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
1331
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(H, { sub: spor === "onske" ? tekst.kjenteFeilUnderOnske : tekst.kjenteFeilUnderFeil, children: spor === "onske" ? tekst.kjenteFeilTittelOnske : tekst.kjenteFeilTittelFeil }),
|
|
1332
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1073
1333
|
import_react_native5.ScrollView,
|
|
1074
1334
|
{
|
|
1075
1335
|
testID: "kjente-feil-liste",
|
|
1076
1336
|
style: { flexGrow: 0, flexShrink: 1 },
|
|
1077
1337
|
contentContainerStyle: { gap: tema.space.md },
|
|
1078
1338
|
keyboardShouldPersistTaps: "handled",
|
|
1079
|
-
children: kort.map((k) => {
|
|
1339
|
+
children: kort.slice(0, MAKS_KORT).map((k) => {
|
|
1340
|
+
const o = knownIssueStatus[k.status] ?? knownIssueStatus.aktiv;
|
|
1080
1341
|
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,
|
|
1342
|
+
const kontekst = versjon ? `${k.title}. ${o.etikett}. ${versjon}` : `${k.title}. ${o.etikett}`;
|
|
1343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Card, { children: [
|
|
1344
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1084
1345
|
import_react_native5.Text,
|
|
1085
1346
|
{
|
|
1086
1347
|
style: {
|
|
@@ -1092,7 +1353,7 @@ function KjenteFeil({
|
|
|
1092
1353
|
children: k.title
|
|
1093
1354
|
}
|
|
1094
1355
|
),
|
|
1095
|
-
k.workaround ? /* @__PURE__ */ (0,
|
|
1356
|
+
k.workaround ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1096
1357
|
import_react_native5.Text,
|
|
1097
1358
|
{
|
|
1098
1359
|
style: {
|
|
@@ -1107,26 +1368,24 @@ function KjenteFeil({
|
|
|
1107
1368
|
]
|
|
1108
1369
|
}
|
|
1109
1370
|
) : 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)(
|
|
1371
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.sm, flexWrap: "wrap" }, children: [
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StatusPill, { ikon: o.ikon, etikett: o.etikett, fg: o.fg, bg: o.bg }),
|
|
1373
|
+
versjon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: versjon }) : null
|
|
1374
|
+
] }),
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1120
1377
|
Btn,
|
|
1121
1378
|
{
|
|
1122
1379
|
grow: true,
|
|
1123
1380
|
testID: `ja-ogsa-${k.id}`,
|
|
1124
1381
|
label: tekst.svarJa,
|
|
1125
1382
|
accessibilityLabel: `${tekst.svarJa}. ${kontekst}`,
|
|
1383
|
+
disabled: sender,
|
|
1384
|
+
busy: sender,
|
|
1126
1385
|
onPress: () => onJaOgsa(k)
|
|
1127
1386
|
}
|
|
1128
1387
|
),
|
|
1129
|
-
/* @__PURE__ */ (0,
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1130
1389
|
Btn,
|
|
1131
1390
|
{
|
|
1132
1391
|
grow: true,
|
|
@@ -1134,6 +1393,7 @@ function KjenteFeil({
|
|
|
1134
1393
|
testID: `ligner-${k.id}`,
|
|
1135
1394
|
label: tekst.svarLigner,
|
|
1136
1395
|
accessibilityLabel: `${tekst.svarLigner}. ${kontekst}`,
|
|
1396
|
+
disabled: sender,
|
|
1137
1397
|
onPress: () => onLigner(k)
|
|
1138
1398
|
}
|
|
1139
1399
|
)
|
|
@@ -1142,46 +1402,79 @@ function KjenteFeil({
|
|
|
1142
1402
|
})
|
|
1143
1403
|
}
|
|
1144
1404
|
),
|
|
1145
|
-
/* @__PURE__ */ (0,
|
|
1405
|
+
/* @__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
1406
|
] });
|
|
1147
1407
|
}
|
|
1148
1408
|
|
|
1149
1409
|
// src/widget/Kvittering.tsx
|
|
1150
|
-
var
|
|
1410
|
+
var import_react8 = require("react");
|
|
1151
1411
|
var import_react_native6 = require("react-native");
|
|
1152
|
-
|
|
1412
|
+
|
|
1413
|
+
// src/widget/status.ts
|
|
1414
|
+
function formaterFrist(iso) {
|
|
1415
|
+
const d = new Date(iso);
|
|
1416
|
+
if (Number.isNaN(d.getTime())) return iso;
|
|
1417
|
+
return new Intl.DateTimeFormat("nb-NO", { day: "numeric", month: "long" }).format(d);
|
|
1418
|
+
}
|
|
1419
|
+
function statusVisning(status, type, deadlineAt) {
|
|
1420
|
+
const o = submissionStatus[status];
|
|
1421
|
+
const spor = type === "onske" ? "onske" : "feil";
|
|
1422
|
+
return {
|
|
1423
|
+
ikon: o.ikon,
|
|
1424
|
+
etikett: o.etikett[spor],
|
|
1425
|
+
fg: o.fg,
|
|
1426
|
+
bg: o.bg,
|
|
1427
|
+
lofte: settInnFrist(o.lofte[spor], deadlineAt)
|
|
1428
|
+
};
|
|
1429
|
+
}
|
|
1430
|
+
function settInnFrist(mal, deadlineAt) {
|
|
1431
|
+
if (!mal.includes("{frist}")) return mal;
|
|
1432
|
+
return deadlineAt ? mal.replace("{frist}", formaterFrist(deadlineAt)) : lofteUtenFrist;
|
|
1433
|
+
}
|
|
1434
|
+
var venterVisning = {
|
|
1435
|
+
ikon: "cloud-offline-outline",
|
|
1436
|
+
etikett: "Venter p\xE5 nett",
|
|
1437
|
+
fg: "textSecondary",
|
|
1438
|
+
bg: "neutralBg",
|
|
1439
|
+
lofte: lofte.venterNett
|
|
1440
|
+
};
|
|
1441
|
+
|
|
1442
|
+
// src/widget/Kvittering.tsx
|
|
1443
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1153
1444
|
function Kvittering({
|
|
1154
1445
|
art,
|
|
1155
1446
|
saksnummer,
|
|
1156
1447
|
vedlegg,
|
|
1448
|
+
frist,
|
|
1157
1449
|
onLukk
|
|
1158
1450
|
}) {
|
|
1159
1451
|
const tema = useTema();
|
|
1160
1452
|
const innhold = {
|
|
1161
1453
|
feil: { h: tekst.kvitteringSendt, p: tekst.kvitteringFeil },
|
|
1162
|
-
|
|
1454
|
+
// Løftet er NØYAKTIG det «Mine innspill» og panelet viser for «Vurderes»:
|
|
1455
|
+
// det leses fra temaet, så kvitteringen og statusen ikke kan si to ting.
|
|
1456
|
+
onske: { h: tekst.kvitteringSendt, p: statusVisning("vurderes", "onske", frist).lofte },
|
|
1163
1457
|
jaOgsa: { h: tekst.kvitteringRegistrert, p: tekst.kvitteringJaOgsa },
|
|
1164
1458
|
// Køet offline: kvitteringen kan IKKE love svar på noe som ikke er sendt
|
|
1165
1459
|
// (DD-41 presiserer DD-07). Den lover bare at det sendes.
|
|
1166
|
-
k\u00F8: { h: tekst.
|
|
1460
|
+
k\u00F8: { h: tekst.koKvitteringTittel, p: tekst.offlineBanner }
|
|
1167
1461
|
}[art];
|
|
1168
1462
|
const overskrift = vedlegg === "feilet" ? tekst.kvitteringVedleggFeilet : innhold.h;
|
|
1169
1463
|
const brodtekst = vedlegg === "feilet" ? `${tekst.tekstenErLagret} ${innhold.p}` : innhold.p;
|
|
1170
|
-
return /* @__PURE__ */ (0,
|
|
1171
|
-
/* @__PURE__ */ (0,
|
|
1172
|
-
/* @__PURE__ */ (0,
|
|
1173
|
-
|
|
1464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_native6.View, { style: { flex: 1, justifyContent: "center", gap: tema.space.lg }, children: [
|
|
1465
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_native6.View, { style: { alignItems: "center", gap: tema.space.md }, children: [
|
|
1466
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1467
|
+
Ikon,
|
|
1174
1468
|
{
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
children: art === "k\xF8" ? "\u21C5" : "\u2713"
|
|
1469
|
+
navn: art === "k\xF8" ? "swap-vertical-outline" : "checkmark-circle-outline",
|
|
1470
|
+
storrelse: "stor",
|
|
1471
|
+
farge: art === "k\xF8" ? tema.color.neutral : tema.color.success
|
|
1179
1472
|
}
|
|
1180
1473
|
),
|
|
1181
|
-
/* @__PURE__ */ (0,
|
|
1182
|
-
vedlegg === "feilet" ? /* @__PURE__ */ (0,
|
|
1183
|
-
vedlegg === "forkastet" ? /* @__PURE__ */ (0,
|
|
1184
|
-
/* @__PURE__ */ (0,
|
|
1474
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(H, { children: overskrift }),
|
|
1475
|
+
vedlegg === "feilet" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Banner, { ikon: "warning-outline", tone: "warning", children: tekst.vedleggFeiletBanner }) : null,
|
|
1476
|
+
vedlegg === "forkastet" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Banner, { ikon: "image-outline", tone: "info", children: tekst.offlineUtenBilde }) : null,
|
|
1477
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1185
1478
|
import_react_native6.Text,
|
|
1186
1479
|
{
|
|
1187
1480
|
testID: "kvittering-tekst",
|
|
@@ -1196,72 +1489,16 @@ function Kvittering({
|
|
|
1196
1489
|
children: brodtekst
|
|
1197
1490
|
}
|
|
1198
1491
|
),
|
|
1199
|
-
saksnummer ? /* @__PURE__ */ (0,
|
|
1492
|
+
saksnummer ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Hint, { children: vedlegg === "feilet" ? tekst.saksnummerUtenVedlegg(saksnummer) : tekst.saksnummer(saksnummer) }) : null
|
|
1200
1493
|
] }),
|
|
1201
|
-
/* @__PURE__ */ (0,
|
|
1494
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Btn, { testID: "tilbake-til-appen", label: tekst.tilbakeTilAppen, onPress: onLukk })
|
|
1202
1495
|
] });
|
|
1203
1496
|
}
|
|
1204
1497
|
|
|
1205
1498
|
// src/widget/MineInnspill.tsx
|
|
1206
|
-
var
|
|
1499
|
+
var import_react9 = require("react");
|
|
1207
1500
|
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");
|
|
1501
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1265
1502
|
function MineInnspill({
|
|
1266
1503
|
rader,
|
|
1267
1504
|
laster,
|
|
@@ -1269,21 +1506,16 @@ function MineInnspill({
|
|
|
1269
1506
|
onNytt
|
|
1270
1507
|
}) {
|
|
1271
1508
|
const tema = useTema();
|
|
1272
|
-
return /* @__PURE__ */ (0,
|
|
1273
|
-
/* @__PURE__ */ (0,
|
|
1274
|
-
laster ? /* @__PURE__ */ (0,
|
|
1509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native7.View, { style: { flex: 1, gap: tema.space.md }, children: [
|
|
1510
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(H, { sub: tekst.mineUnder, children: tekst.mineTittel }),
|
|
1511
|
+
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
1512
|
const venter = rad.pending === true;
|
|
1276
1513
|
const v = venter ? venterVisning : statusVisning(rad.status, rad.type, rad.deadlineAt);
|
|
1277
1514
|
const nokkel = venter ? rad.clientRef : rad.id;
|
|
1278
1515
|
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)(
|
|
1516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Card, { dashed: venter, children: [
|
|
1517
|
+
/* @__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) }),
|
|
1518
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1287
1519
|
import_react_native7.Text,
|
|
1288
1520
|
{
|
|
1289
1521
|
style: {
|
|
@@ -1294,15 +1526,15 @@ function MineInnspill({
|
|
|
1294
1526
|
children: rad.text
|
|
1295
1527
|
}
|
|
1296
1528
|
),
|
|
1297
|
-
/* @__PURE__ */ (0,
|
|
1298
|
-
/* @__PURE__ */ (0,
|
|
1299
|
-
/* @__PURE__ */ (0,
|
|
1529
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native7.View, { style: { gap: tema.space.xs }, children: [
|
|
1530
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StatusPill, { ikon: v.ikon, etikett: v.etikett, fg: v.fg, bg: v.bg }),
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hint, { children: v.lofte })
|
|
1300
1532
|
] }),
|
|
1301
|
-
!venter && rad.attachmentRemoved ? /* @__PURE__ */ (0,
|
|
1302
|
-
/* @__PURE__ */ (0,
|
|
1303
|
-
/* @__PURE__ */ (0,
|
|
1533
|
+
!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: [
|
|
1534
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Ikon, { navn: "trash-outline", storrelse: "minste", farge: tema.color.textMuted }),
|
|
1535
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Hint, { children: tekst.bildeFjernet })
|
|
1304
1536
|
] }) : null,
|
|
1305
|
-
svar ? /* @__PURE__ */ (0,
|
|
1537
|
+
svar ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1306
1538
|
import_react_native7.View,
|
|
1307
1539
|
{
|
|
1308
1540
|
style: {
|
|
@@ -1312,8 +1544,8 @@ function MineInnspill({
|
|
|
1312
1544
|
gap: tema.space.xs
|
|
1313
1545
|
},
|
|
1314
1546
|
children: [
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1547
|
+
/* @__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 }),
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1317
1549
|
import_react_native7.Text,
|
|
1318
1550
|
{
|
|
1319
1551
|
style: {
|
|
@@ -1329,15 +1561,15 @@ function MineInnspill({
|
|
|
1329
1561
|
) : null
|
|
1330
1562
|
] }, nokkel);
|
|
1331
1563
|
}) }),
|
|
1332
|
-
/* @__PURE__ */ (0,
|
|
1564
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Btn, { testID: "send-nytt", label: rader.length === 0 ? tekst.sendForste : tekst.sendNytt, onPress: onNytt })
|
|
1333
1565
|
] });
|
|
1334
1566
|
}
|
|
1335
1567
|
|
|
1336
1568
|
// src/widget/Skjermbilde.tsx
|
|
1337
1569
|
var import_core = require("@innspel/core");
|
|
1338
|
-
var
|
|
1570
|
+
var import_react10 = require("react");
|
|
1339
1571
|
var import_react_native8 = require("react-native");
|
|
1340
|
-
var
|
|
1572
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1341
1573
|
function Skjermbilde({
|
|
1342
1574
|
bilde,
|
|
1343
1575
|
automaskerRot,
|
|
@@ -1350,21 +1582,21 @@ function Skjermbilde({
|
|
|
1350
1582
|
onLeggVed
|
|
1351
1583
|
}) {
|
|
1352
1584
|
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,
|
|
1585
|
+
const [verktoy, setVerktoy] = (0, import_react10.useState)("pensel");
|
|
1586
|
+
const [allTekst, setAllTekst] = (0, import_react10.useState)(false);
|
|
1587
|
+
const [egne, setEgne] = (0, import_react10.useState)([]);
|
|
1588
|
+
const [ramme, setRamme] = (0, import_react10.useState)(null);
|
|
1589
|
+
const strok = (0, import_react10.useRef)([]);
|
|
1590
|
+
const visning = (0, import_react10.useMemo)(() => {
|
|
1359
1591
|
if (!ramme) return null;
|
|
1360
1592
|
const s = Math.min(ramme.width / bilde.width, ramme.height / bilde.height);
|
|
1361
1593
|
return { width: Math.floor(bilde.width * s), height: Math.floor(bilde.height * s) };
|
|
1362
1594
|
}, [ramme, bilde.width, bilde.height]);
|
|
1363
|
-
const automasker = (0,
|
|
1595
|
+
const automasker = (0, import_react10.useMemo)(
|
|
1364
1596
|
() => visning ? automaskerRot.map((r) => (0, import_core.skaler)(r, rotStorrelse, visning)) : [],
|
|
1365
1597
|
[automaskerRot, rotStorrelse, visning]
|
|
1366
1598
|
);
|
|
1367
|
-
const onLayout = (0,
|
|
1599
|
+
const onLayout = (0, import_react10.useCallback)((e) => {
|
|
1368
1600
|
const { width, height } = e.nativeEvent.layout;
|
|
1369
1601
|
setRamme({ width, height });
|
|
1370
1602
|
}, []);
|
|
@@ -1396,7 +1628,7 @@ function Skjermbilde({
|
|
|
1396
1628
|
};
|
|
1397
1629
|
const knapp = (id, ikon, label) => {
|
|
1398
1630
|
const valgt = id === "allTekst" ? allTekst : verktoy === id && !allTekst;
|
|
1399
|
-
return /* @__PURE__ */ (0,
|
|
1631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1400
1632
|
import_react_native8.Pressable,
|
|
1401
1633
|
{
|
|
1402
1634
|
testID: `verktoy-${id}`,
|
|
@@ -1419,8 +1651,8 @@ function Skjermbilde({
|
|
|
1419
1651
|
backgroundColor: valgt ? tema.color.surfaceRaised : "transparent"
|
|
1420
1652
|
},
|
|
1421
1653
|
children: [
|
|
1422
|
-
/* @__PURE__ */ (0,
|
|
1423
|
-
/* @__PURE__ */ (0,
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Ikon, { navn: ikon, farge: tema.color.textPrimary }),
|
|
1655
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1424
1656
|
import_react_native8.Text,
|
|
1425
1657
|
{
|
|
1426
1658
|
style: {
|
|
@@ -1437,15 +1669,15 @@ function Skjermbilde({
|
|
|
1437
1669
|
);
|
|
1438
1670
|
};
|
|
1439
1671
|
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", "
|
|
1672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { testID: "skjermbilde-steg", style: { flexGrow: 1, flexShrink: 1, gap: tema.space.md }, children: [
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(H, { sub: kilde === "galleri" ? tekst.skjermbildeUnderGalleri : tekst.skjermbildeUnder, children: tekst.skjermbildeTittel }),
|
|
1674
|
+
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,
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { accessibilityRole: "toolbar", accessibilityLabel: tekst.maskering, style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
1676
|
+
knapp("felt", "scan-outline", tekst.maskerFelt),
|
|
1677
|
+
knapp("pensel", "brush-outline", tekst.tegnOver),
|
|
1678
|
+
knapp("allTekst", "grid-outline", tekst.maskerAllTekst)
|
|
1447
1679
|
] }),
|
|
1448
|
-
/* @__PURE__ */ (0,
|
|
1680
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1449
1681
|
import_react_native8.View,
|
|
1450
1682
|
{
|
|
1451
1683
|
testID: "skjermbilde-ramme",
|
|
@@ -1459,7 +1691,7 @@ function Skjermbilde({
|
|
|
1459
1691
|
borderRadius: tema.radius.md,
|
|
1460
1692
|
overflow: "hidden"
|
|
1461
1693
|
},
|
|
1462
|
-
children: /* @__PURE__ */ (0,
|
|
1694
|
+
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
1695
|
import_react_native8.View,
|
|
1464
1696
|
{
|
|
1465
1697
|
ref: previewRef,
|
|
@@ -1475,7 +1707,7 @@ function Skjermbilde({
|
|
|
1475
1707
|
onResponderTerminate: onRelease,
|
|
1476
1708
|
style: { width: visning.width, height: visning.height, backgroundColor: screenRules.previewBackdrop },
|
|
1477
1709
|
children: [
|
|
1478
|
-
/* @__PURE__ */ (0,
|
|
1710
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1479
1711
|
import_react_native8.Image,
|
|
1480
1712
|
{
|
|
1481
1713
|
testID: "skjermbilde-bilde",
|
|
@@ -1485,7 +1717,7 @@ function Skjermbilde({
|
|
|
1485
1717
|
accessibilityIgnoresInvertColors: true
|
|
1486
1718
|
}
|
|
1487
1719
|
),
|
|
1488
|
-
automasker.map((r, i) => /* @__PURE__ */ (0,
|
|
1720
|
+
automasker.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1489
1721
|
import_react_native8.View,
|
|
1490
1722
|
{
|
|
1491
1723
|
testID: `automask-${i}`,
|
|
@@ -1502,14 +1734,20 @@ function Skjermbilde({
|
|
|
1502
1734
|
alignItems: "center",
|
|
1503
1735
|
justifyContent: "center"
|
|
1504
1736
|
},
|
|
1505
|
-
children: !komponerer ?
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1737
|
+
children: !komponerer ? (
|
|
1738
|
+
// Etiketten står PÅ den maskerte flaten og måles mot NETTOPP den
|
|
1739
|
+
// (skjermKontrastpar i theme.ts). textSecondary var 2,2:1 (C11a).
|
|
1740
|
+
// Ikonet arver samme farge: det er unntaket i «Styling» — maskeringen
|
|
1741
|
+
// tegnes i faste signalfarger, ikke i palettens.
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Ikon, { navn: "lock-closed-outline", storrelse: "minste", farge: screenRules.autoMaskText }),
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { style: { color: screenRules.autoMaskText, fontSize: tema.font.small }, numberOfLines: 1, children: tekst.maskertAvAppen })
|
|
1745
|
+
] })
|
|
1746
|
+
) : null
|
|
1509
1747
|
},
|
|
1510
1748
|
`auto-${i}`
|
|
1511
1749
|
)),
|
|
1512
|
-
egne.map((r, i) => /* @__PURE__ */ (0,
|
|
1750
|
+
egne.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1513
1751
|
import_react_native8.View,
|
|
1514
1752
|
{
|
|
1515
1753
|
testID: `maske-${i}`,
|
|
@@ -1523,21 +1761,42 @@ function Skjermbilde({
|
|
|
1523
1761
|
) : null })
|
|
1524
1762
|
}
|
|
1525
1763
|
),
|
|
1526
|
-
automasker.length ? /* @__PURE__ */ (0,
|
|
1527
|
-
|
|
1528
|
-
tekst.maskertAvAppenHint
|
|
1764
|
+
automasker.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Ikon, { navn: "lock-closed-outline", storrelse: "minste", farge: tema.color.textMuted }),
|
|
1766
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hint, { children: tekst.maskertAvAppenHint })
|
|
1529
1767
|
] }) : null,
|
|
1530
|
-
egne.length ? /* @__PURE__ */ (0,
|
|
1531
|
-
allTekst ? /* @__PURE__ */ (0,
|
|
1532
|
-
/* @__PURE__ */ (0,
|
|
1533
|
-
/* @__PURE__ */ (0,
|
|
1534
|
-
|
|
1768
|
+
egne.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hint, { children: tekst.dittStrok }) : null,
|
|
1769
|
+
allTekst ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hint, { children: tekst.allTekstHint }) : null,
|
|
1770
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { testID: "skjermbilde-fot", style: { flexShrink: 0, gap: tema.space.sm }, children: [
|
|
1771
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1772
|
+
Btn,
|
|
1773
|
+
{
|
|
1774
|
+
variant: "secondary",
|
|
1775
|
+
testID: "angre-siste",
|
|
1776
|
+
label: tekst.angreSiste,
|
|
1777
|
+
accessibilityLabel: tekst.angreSisteA11y,
|
|
1778
|
+
disabled: komponerer || egne.length === 0,
|
|
1779
|
+
onPress: () => setEgne((x) => x.slice(0, -1))
|
|
1780
|
+
}
|
|
1781
|
+
),
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1783
|
+
Btn,
|
|
1784
|
+
{
|
|
1785
|
+
variant: "danger",
|
|
1786
|
+
testID: "fjern-bildet",
|
|
1787
|
+
ikon: "trash-outline",
|
|
1788
|
+
label: tekst.fjernBildet,
|
|
1789
|
+
onPress: onFjern,
|
|
1790
|
+
disabled: komponerer
|
|
1791
|
+
}
|
|
1792
|
+
),
|
|
1793
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Btn, { testID: "legg-ved", label: tekst.leggVed, onPress: onLeggVed, disabled: komponerer || !visning })
|
|
1535
1794
|
] })
|
|
1536
1795
|
] });
|
|
1537
1796
|
}
|
|
1538
1797
|
|
|
1539
1798
|
// src/widget/Widget.tsx
|
|
1540
|
-
var
|
|
1799
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1541
1800
|
var FANGST = { format: "jpg", quality: 0.85 };
|
|
1542
1801
|
function Widget({
|
|
1543
1802
|
client,
|
|
@@ -1548,34 +1807,35 @@ function Widget({
|
|
|
1548
1807
|
imageStepNote
|
|
1549
1808
|
}) {
|
|
1550
1809
|
const tema = useTema();
|
|
1551
|
-
const insets = (0,
|
|
1810
|
+
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
1811
|
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 [
|
|
1812
|
+
const previewRef = (0, import_react11.useRef)(null);
|
|
1813
|
+
const [steg, setSteg] = (0, import_react11.useState)("valg");
|
|
1814
|
+
const [spor, setSpor] = (0, import_react11.useState)("feil");
|
|
1815
|
+
const [verdi, setVerdi] = (0, import_react11.useState)("");
|
|
1816
|
+
const [kort, setKort] = (0, import_react11.useState)([]);
|
|
1817
|
+
const [lasterKort, setLasterKort] = (0, import_react11.useState)(false);
|
|
1818
|
+
const [lenketTil, setLenketTil] = (0, import_react11.useState)();
|
|
1819
|
+
const [funn, setFunn] = (0, import_react11.useState)([]);
|
|
1820
|
+
const [fjernede, setFjernede] = (0, import_react11.useState)([]);
|
|
1821
|
+
const [sender, setSender] = (0, import_react11.useState)(false);
|
|
1822
|
+
const online = useNettstatus(client);
|
|
1823
|
+
const [feil, setFeil] = (0, import_react11.useState)();
|
|
1824
|
+
const [kvittering, setKvittering] = (0, import_react11.useState)();
|
|
1825
|
+
const [mine, setMine] = (0, import_react11.useState)([]);
|
|
1826
|
+
const [lasterMine, setLasterMine] = (0, import_react11.useState)(false);
|
|
1827
|
+
const [bilde, setBilde] = (0, import_react11.useState)();
|
|
1828
|
+
const [automasker, setAutomasker] = (0, import_react11.useState)([]);
|
|
1829
|
+
const [rotStorrelse, setRotStorrelse] = (0, import_react11.useState)({ width: 1, height: 1 });
|
|
1830
|
+
const [komponerer, setKomponerer] = (0, import_react11.useState)(false);
|
|
1831
|
+
const [kilde, setKilde] = (0, import_react11.useState)("skjerm");
|
|
1832
|
+
const [vedlegg, setVedlegg] = (0, import_react11.useState)();
|
|
1833
|
+
const [innstillinger, setInnstillinger] = (0, import_react11.useState)({ ...client.settings });
|
|
1574
1834
|
const skjermbildeMulig = innstillinger.screenshotsEnabled && skjermbilde?.adapter != null;
|
|
1575
1835
|
const fangstMulig = skjermbildeMulig && skjermbilde?.adapter?.captureScreen !== false;
|
|
1576
1836
|
const galleriMulig = skjermbildeMulig && typeof skjermbilde?.adapter?.pick === "function";
|
|
1577
1837
|
const bildeNotat = typeof imageStepNote === "string" ? imageStepNote : imageStepNote?.[spor];
|
|
1578
|
-
const nullstill = (0,
|
|
1838
|
+
const nullstill = (0, import_react11.useCallback)(() => {
|
|
1579
1839
|
setSteg("valg");
|
|
1580
1840
|
setSpor("feil");
|
|
1581
1841
|
setVerdi("");
|
|
@@ -1590,18 +1850,22 @@ function Widget({
|
|
|
1590
1850
|
setVedlegg(void 0);
|
|
1591
1851
|
setKomponerer(false);
|
|
1592
1852
|
}, []);
|
|
1593
|
-
const lukk = (0,
|
|
1853
|
+
const lukk = (0, import_react11.useCallback)(() => {
|
|
1594
1854
|
onLukk();
|
|
1595
1855
|
nullstill();
|
|
1596
1856
|
}, [onLukk, nullstill]);
|
|
1597
|
-
(0,
|
|
1857
|
+
(0, import_react11.useEffect)(() => {
|
|
1598
1858
|
if (!synlig) return;
|
|
1599
1859
|
client.track({ name: "widget_opened" });
|
|
1600
1860
|
void client.queue.flush().catch(() => void 0);
|
|
1601
1861
|
void client.loadSettings().then((s) => setInnstillinger({ ...s })).catch(() => void 0);
|
|
1602
|
-
if (
|
|
1862
|
+
if (!client.isAnonymous) {
|
|
1863
|
+
void client.subjects.submissions().then(setMine).catch(() => void 0);
|
|
1864
|
+
}
|
|
1865
|
+
if (apneOpsjoner?.view === "mine" && !client.isAnonymous) void visMine();
|
|
1866
|
+
else if (apneOpsjoner?.track) velgSpor(apneOpsjoner.track);
|
|
1603
1867
|
}, [synlig]);
|
|
1604
|
-
const hentKort = (0,
|
|
1868
|
+
const hentKort = (0, import_react11.useCallback)(async () => {
|
|
1605
1869
|
setLasterKort(true);
|
|
1606
1870
|
try {
|
|
1607
1871
|
const q = apneOpsjoner?.screen ? { screen: apneOpsjoner.screen } : {};
|
|
@@ -1610,7 +1874,7 @@ function Widget({
|
|
|
1610
1874
|
setLasterKort(false);
|
|
1611
1875
|
}
|
|
1612
1876
|
}, [client, apneOpsjoner?.screen]);
|
|
1613
|
-
const velgSpor = (0,
|
|
1877
|
+
const velgSpor = (0, import_react11.useCallback)(
|
|
1614
1878
|
async (valgt) => {
|
|
1615
1879
|
setSpor(valgt);
|
|
1616
1880
|
client.track({ name: "track_selected", type: valgt });
|
|
@@ -1623,17 +1887,17 @@ function Widget({
|
|
|
1623
1887
|
},
|
|
1624
1888
|
[client, hentKort]
|
|
1625
1889
|
);
|
|
1626
|
-
(0,
|
|
1890
|
+
(0, import_react11.useEffect)(() => {
|
|
1627
1891
|
if (steg === "kjenteFeil" && !lasterKort && kort.length === 0) setSteg("felt");
|
|
1628
1892
|
}, [steg, lasterKort, kort.length]);
|
|
1629
|
-
const endreTekst = (0,
|
|
1893
|
+
const endreTekst = (0, import_react11.useCallback)(
|
|
1630
1894
|
(v) => {
|
|
1631
1895
|
setVerdi(v);
|
|
1632
1896
|
setFunn(client.scanText(v));
|
|
1633
1897
|
},
|
|
1634
1898
|
[client]
|
|
1635
1899
|
);
|
|
1636
|
-
const taSkjermbilde = (0,
|
|
1900
|
+
const taSkjermbilde = (0, import_react11.useCallback)(async () => {
|
|
1637
1901
|
if (!skjermbilde?.adapter) return;
|
|
1638
1902
|
const { adapter, rootRef, privat } = skjermbilde;
|
|
1639
1903
|
setFeil(void 0);
|
|
@@ -1657,7 +1921,7 @@ function Widget({
|
|
|
1657
1921
|
setFeil(tekst.skjermbildeFeilet);
|
|
1658
1922
|
}
|
|
1659
1923
|
}, [skjermbilde]);
|
|
1660
|
-
const velgBilde = (0,
|
|
1924
|
+
const velgBilde = (0, import_react11.useCallback)(async () => {
|
|
1661
1925
|
const pick = skjermbilde?.adapter?.pick;
|
|
1662
1926
|
if (!pick) return;
|
|
1663
1927
|
setFeil(void 0);
|
|
@@ -1673,7 +1937,7 @@ function Widget({
|
|
|
1673
1937
|
setFeil(tekst.bildeFeilet);
|
|
1674
1938
|
}
|
|
1675
1939
|
}, [skjermbilde]);
|
|
1676
|
-
const leggVedBilde = (0,
|
|
1940
|
+
const leggVedBilde = (0, import_react11.useCallback)(async () => {
|
|
1677
1941
|
if (!skjermbilde?.adapter) return;
|
|
1678
1942
|
setKomponerer(true);
|
|
1679
1943
|
try {
|
|
@@ -1689,18 +1953,27 @@ function Widget({
|
|
|
1689
1953
|
setKomponerer(false);
|
|
1690
1954
|
}
|
|
1691
1955
|
}, [skjermbilde]);
|
|
1692
|
-
const fjernBilde = (0,
|
|
1956
|
+
const fjernBilde = (0, import_react11.useCallback)(() => {
|
|
1693
1957
|
setBilde(void 0);
|
|
1694
1958
|
setAutomasker([]);
|
|
1695
1959
|
setVedlegg(void 0);
|
|
1696
1960
|
setSteg("felt");
|
|
1697
1961
|
}, []);
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1962
|
+
const gaaTilbake = (0, import_react11.useCallback)(() => {
|
|
1963
|
+
setFeil(void 0);
|
|
1964
|
+
if (steg === "skjermbilde") {
|
|
1965
|
+
setBilde(void 0);
|
|
1966
|
+
setAutomasker([]);
|
|
1967
|
+
setSteg("felt");
|
|
1968
|
+
return;
|
|
1969
|
+
}
|
|
1970
|
+
if (steg === "felt" && spor === "feil" && kort.length > 0) {
|
|
1700
1971
|
setSteg("kjenteFeil");
|
|
1701
|
-
await hentKort();
|
|
1702
1972
|
return;
|
|
1703
1973
|
}
|
|
1974
|
+
setSteg("valg");
|
|
1975
|
+
}, [steg, spor, kort.length]);
|
|
1976
|
+
const send = (0, import_react11.useCallback)(async () => {
|
|
1704
1977
|
setSender(true);
|
|
1705
1978
|
setFeil(void 0);
|
|
1706
1979
|
try {
|
|
@@ -1717,6 +1990,8 @@ function Widget({
|
|
|
1717
1990
|
setKvittering({
|
|
1718
1991
|
art: spor,
|
|
1719
1992
|
nr: res.submission.id,
|
|
1993
|
+
// Tidsløftet i kvitteringen er DATOEN fra svaret, aldri «innen 90 dager» (DD-07, DD-28).
|
|
1994
|
+
...res.submission.deadlineAt ? { frist: res.submission.deadlineAt } : {},
|
|
1720
1995
|
...res.attachment?.status === "failed" ? { vedlegg: "feilet" } : {}
|
|
1721
1996
|
});
|
|
1722
1997
|
}
|
|
@@ -1728,8 +2003,8 @@ function Widget({
|
|
|
1728
2003
|
} finally {
|
|
1729
2004
|
setSender(false);
|
|
1730
2005
|
}
|
|
1731
|
-
}, [client, spor,
|
|
1732
|
-
const jaOgsa = (0,
|
|
2006
|
+
}, [client, spor, verdi, vedlegg, lenketTil, fjernede]);
|
|
2007
|
+
const jaOgsa = (0, import_react11.useCallback)(
|
|
1733
2008
|
async (k) => {
|
|
1734
2009
|
setSender(true);
|
|
1735
2010
|
try {
|
|
@@ -1744,7 +2019,7 @@ function Widget({
|
|
|
1744
2019
|
},
|
|
1745
2020
|
[client]
|
|
1746
2021
|
);
|
|
1747
|
-
const visMine = (0,
|
|
2022
|
+
const visMine = (0, import_react11.useCallback)(async () => {
|
|
1748
2023
|
setSteg("mine");
|
|
1749
2024
|
setLasterMine(true);
|
|
1750
2025
|
try {
|
|
@@ -1755,7 +2030,7 @@ function Widget({
|
|
|
1755
2030
|
setLasterMine(false);
|
|
1756
2031
|
}
|
|
1757
2032
|
}, [client]);
|
|
1758
|
-
return /* @__PURE__ */ (0,
|
|
2033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1759
2034
|
import_react_native9.Modal,
|
|
1760
2035
|
{
|
|
1761
2036
|
visible: synlig,
|
|
@@ -1763,13 +2038,13 @@ function Widget({
|
|
|
1763
2038
|
animationType: "slide",
|
|
1764
2039
|
onRequestClose: lukk,
|
|
1765
2040
|
accessibilityViewIsModal: true,
|
|
1766
|
-
children: /* @__PURE__ */ (0,
|
|
2041
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1767
2042
|
import_react_native9.KeyboardAvoidingView,
|
|
1768
2043
|
{
|
|
1769
2044
|
behavior: "padding",
|
|
1770
2045
|
keyboardVerticalOffset: -insets.bottom,
|
|
1771
2046
|
style: { flex: 1, backgroundColor: tema.color.scrim, justifyContent: "flex-end", paddingTop: insets.top },
|
|
1772
|
-
children: /* @__PURE__ */ (0,
|
|
2047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1773
2048
|
import_react_native9.View,
|
|
1774
2049
|
{
|
|
1775
2050
|
testID: "innspel-widget",
|
|
@@ -1791,9 +2066,9 @@ function Widget({
|
|
|
1791
2066
|
...steg === "skjermbilde" ? { height: "92%" } : {}
|
|
1792
2067
|
},
|
|
1793
2068
|
children: [
|
|
1794
|
-
/* @__PURE__ */ (0,
|
|
1795
|
-
steg
|
|
1796
|
-
/* @__PURE__ */ (0,
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native9.View, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
2070
|
+
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, {}),
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1797
2072
|
import_react_native9.Pressable,
|
|
1798
2073
|
{
|
|
1799
2074
|
testID: "lukk",
|
|
@@ -1801,30 +2076,42 @@ function Widget({
|
|
|
1801
2076
|
accessibilityLabel: tekst.lukk,
|
|
1802
2077
|
onPress: lukk,
|
|
1803
2078
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
1804
|
-
children: /* @__PURE__ */ (0,
|
|
2079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Ikon, { navn: "close-outline", farge: tema.color.textSecondary })
|
|
1805
2080
|
}
|
|
1806
2081
|
)
|
|
1807
2082
|
] }),
|
|
1808
|
-
feil ? /* @__PURE__ */ (0,
|
|
1809
|
-
steg
|
|
1810
|
-
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
2083
|
+
feil ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Banner, { live: true, ikon: "warning-outline", tone: "danger", children: tekst.sendefeilBanner(feil) }) : null,
|
|
2084
|
+
!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,
|
|
2085
|
+
steg === "valg" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
2086
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Valg, { onVelg: velgSpor }),
|
|
2087
|
+
!client.isAnonymous ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2088
|
+
Btn,
|
|
2089
|
+
{
|
|
2090
|
+
variant: mine.length > 0 ? "secondary" : "ghost",
|
|
2091
|
+
testID: "mine-innspill",
|
|
2092
|
+
ikon: "list-outline",
|
|
2093
|
+
label: mine.length > 0 ? tekst.mineMedAntall(mine.length) : tekst.mineTittel,
|
|
2094
|
+
accessibilityLabel: mine.length > 0 ? tekst.mineEtikett(mine.length) : tekst.mineTittel,
|
|
2095
|
+
onPress: visMine
|
|
2096
|
+
}
|
|
2097
|
+
) : null
|
|
1812
2098
|
] }) : null,
|
|
1813
|
-
steg === "kjenteFeil" ? /* @__PURE__ */ (0,
|
|
2099
|
+
steg === "kjenteFeil" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1814
2100
|
KjenteFeil,
|
|
1815
2101
|
{
|
|
1816
2102
|
kort,
|
|
1817
2103
|
spor,
|
|
1818
2104
|
laster: lasterKort,
|
|
2105
|
+
sender,
|
|
1819
2106
|
onJaOgsa: jaOgsa,
|
|
1820
2107
|
onLigner: (k) => {
|
|
1821
2108
|
setLenketTil(k);
|
|
1822
2109
|
setSteg("felt");
|
|
1823
2110
|
},
|
|
1824
|
-
onNei: () =>
|
|
2111
|
+
onNei: () => setSteg("felt")
|
|
1825
2112
|
}
|
|
1826
2113
|
) : null,
|
|
1827
|
-
steg === "felt" ? /* @__PURE__ */ (0,
|
|
2114
|
+
steg === "felt" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1828
2115
|
Felt,
|
|
1829
2116
|
{
|
|
1830
2117
|
spor,
|
|
@@ -1839,6 +2126,8 @@ function Widget({
|
|
|
1839
2126
|
funn,
|
|
1840
2127
|
onSend: send,
|
|
1841
2128
|
sender,
|
|
2129
|
+
harFeil: feil !== void 0,
|
|
2130
|
+
offline: !online,
|
|
1842
2131
|
...fangstMulig ? { onSkjermbilde: taSkjermbilde } : {},
|
|
1843
2132
|
...galleriMulig ? { onVelgBilde: velgBilde } : {},
|
|
1844
2133
|
...bildeNotat ? { bildeNotat } : {},
|
|
@@ -1846,7 +2135,7 @@ function Widget({
|
|
|
1846
2135
|
onFjernVedlegg: fjernBilde
|
|
1847
2136
|
}
|
|
1848
2137
|
) : null,
|
|
1849
|
-
steg === "skjermbilde" && bilde ? /* @__PURE__ */ (0,
|
|
2138
|
+
steg === "skjermbilde" && bilde ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1850
2139
|
Skjermbilde,
|
|
1851
2140
|
{
|
|
1852
2141
|
bilde,
|
|
@@ -1860,16 +2149,17 @@ function Widget({
|
|
|
1860
2149
|
onLeggVed: leggVedBilde
|
|
1861
2150
|
}
|
|
1862
2151
|
) : null,
|
|
1863
|
-
steg === "kvittering" && kvittering ? /* @__PURE__ */ (0,
|
|
2152
|
+
steg === "kvittering" && kvittering ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1864
2153
|
Kvittering,
|
|
1865
2154
|
{
|
|
1866
2155
|
art: kvittering.art,
|
|
1867
2156
|
...kvittering.nr ? { saksnummer: kvittering.nr } : {},
|
|
1868
2157
|
...kvittering.vedlegg ? { vedlegg: kvittering.vedlegg } : {},
|
|
2158
|
+
...kvittering.frist ? { frist: kvittering.frist } : {},
|
|
1869
2159
|
onLukk: lukk
|
|
1870
2160
|
}
|
|
1871
2161
|
) : null,
|
|
1872
|
-
steg === "mine" ? /* @__PURE__ */ (0,
|
|
2162
|
+
steg === "mine" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1873
2163
|
MineInnspill,
|
|
1874
2164
|
{
|
|
1875
2165
|
rader: mine,
|
|
@@ -1886,6 +2176,16 @@ function Widget({
|
|
|
1886
2176
|
}
|
|
1887
2177
|
);
|
|
1888
2178
|
}
|
|
2179
|
+
function useNettstatus(client) {
|
|
2180
|
+
const c = client.connectivity;
|
|
2181
|
+
const [online, setOnline] = (0, import_react11.useState)(() => c?.isOnline() ?? true);
|
|
2182
|
+
(0, import_react11.useEffect)(() => {
|
|
2183
|
+
if (!c) return void 0;
|
|
2184
|
+
setOnline(c.isOnline());
|
|
2185
|
+
return c.subscribe?.((v) => setOnline(v));
|
|
2186
|
+
}, [c]);
|
|
2187
|
+
return online;
|
|
2188
|
+
}
|
|
1889
2189
|
function fjernetKontekst(client, fjernede) {
|
|
1890
2190
|
const ut = {};
|
|
1891
2191
|
for (const k of Object.keys(client.context)) {
|
|
@@ -1895,8 +2195,8 @@ function fjernetKontekst(client, fjernede) {
|
|
|
1895
2195
|
}
|
|
1896
2196
|
|
|
1897
2197
|
// src/InnspelProvider.tsx
|
|
1898
|
-
var
|
|
1899
|
-
var Kontekst = (0,
|
|
2198
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2199
|
+
var Kontekst = (0, import_react12.createContext)(null);
|
|
1900
2200
|
function InnspelProvider({
|
|
1901
2201
|
client,
|
|
1902
2202
|
children,
|
|
@@ -1906,32 +2206,32 @@ function InnspelProvider({
|
|
|
1906
2206
|
screenshot,
|
|
1907
2207
|
imageStepNote
|
|
1908
2208
|
}) {
|
|
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,
|
|
2209
|
+
const [synlig, setSynlig] = (0, import_react12.useState)(false);
|
|
2210
|
+
const [apneOpsjoner, setApneOpsjoner] = (0, import_react12.useState)();
|
|
2211
|
+
const registrert = (0, import_react12.useRef)(false);
|
|
2212
|
+
const rootRef = (0, import_react12.useRef)(null);
|
|
2213
|
+
const privat = (0, import_react12.useMemo)(createPrivateRegistry, []);
|
|
2214
|
+
const open = (0, import_react12.useCallback)(
|
|
1915
2215
|
async (options) => {
|
|
1916
2216
|
setApneOpsjoner(options);
|
|
1917
2217
|
setSynlig(true);
|
|
1918
2218
|
},
|
|
1919
2219
|
[]
|
|
1920
2220
|
);
|
|
1921
|
-
const close = (0,
|
|
2221
|
+
const close = (0, import_react12.useCallback)(() => setSynlig(false), []);
|
|
1922
2222
|
if (!registrert.current) {
|
|
1923
2223
|
client.registerPresenter({ open });
|
|
1924
2224
|
registrert.current = true;
|
|
1925
2225
|
}
|
|
1926
|
-
const tema = (0,
|
|
1927
|
-
const verdi = (0,
|
|
1928
|
-
const skjermbilde = (0,
|
|
2226
|
+
const tema = (0, import_react12.useMemo)(() => byggTema(theme, colorScheme), [theme, colorScheme]);
|
|
2227
|
+
const verdi = (0, import_react12.useMemo)(() => ({ client, open, close }), [client, open, close]);
|
|
2228
|
+
const skjermbilde = (0, import_react12.useMemo)(
|
|
1929
2229
|
() => ({ adapter: screenshot ?? null, rootRef, privat }),
|
|
1930
2230
|
[screenshot, privat]
|
|
1931
2231
|
);
|
|
1932
|
-
return /* @__PURE__ */ (0,
|
|
1933
|
-
/* @__PURE__ */ (0,
|
|
1934
|
-
/* @__PURE__ */ (0,
|
|
2232
|
+
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: [
|
|
2233
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.View, { ref: rootRef, collapsable: false, style: { flex: 1 }, testID: "innspel-rot", children }),
|
|
2234
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1935
2235
|
Widget,
|
|
1936
2236
|
{
|
|
1937
2237
|
client,
|
|
@@ -1945,7 +2245,7 @@ function InnspelProvider({
|
|
|
1945
2245
|
] }) }) });
|
|
1946
2246
|
}
|
|
1947
2247
|
function useInnspel() {
|
|
1948
|
-
const k = (0,
|
|
2248
|
+
const k = (0, import_react12.useContext)(Kontekst);
|
|
1949
2249
|
if (!k) {
|
|
1950
2250
|
throw new Error(
|
|
1951
2251
|
"[innspel] useInnspel() ble kalt utenfor <InnspelProvider>. Pakk appen din i den \u2014 se README.md."
|
|
@@ -1955,27 +2255,27 @@ function useInnspel() {
|
|
|
1955
2255
|
}
|
|
1956
2256
|
|
|
1957
2257
|
// src/InnspelPrivate.tsx
|
|
1958
|
-
var
|
|
2258
|
+
var import_react13 = require("react");
|
|
1959
2259
|
var import_react_native11 = require("react-native");
|
|
1960
|
-
var
|
|
2260
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1961
2261
|
function InnspelPrivate({ children, style }) {
|
|
1962
|
-
const ref = (0,
|
|
2262
|
+
const ref = (0, import_react13.useRef)(null);
|
|
1963
2263
|
const kontekst = useSkjermbilde();
|
|
1964
2264
|
const registrer = kontekst?.privat.register;
|
|
1965
|
-
(0,
|
|
2265
|
+
(0, import_react13.useEffect)(() => {
|
|
1966
2266
|
if (!registrer) return;
|
|
1967
2267
|
return registrer(ref);
|
|
1968
2268
|
}, [registrer]);
|
|
1969
|
-
return /* @__PURE__ */ (0,
|
|
2269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.View, { ref, collapsable: false, style, testID: "innspel-privat", children });
|
|
1970
2270
|
}
|
|
1971
2271
|
|
|
1972
2272
|
// src/program/InnspelProgram.tsx
|
|
1973
2273
|
var import_core3 = require("@innspel/core");
|
|
1974
|
-
var
|
|
2274
|
+
var import_react18 = require("react");
|
|
1975
2275
|
var import_react_native16 = require("react-native");
|
|
1976
2276
|
|
|
1977
2277
|
// src/program/Aksept.tsx
|
|
1978
|
-
var
|
|
2278
|
+
var import_react14 = require("react");
|
|
1979
2279
|
var import_react_native12 = require("react-native");
|
|
1980
2280
|
|
|
1981
2281
|
// src/program/periode.ts
|
|
@@ -2006,7 +2306,7 @@ function minutterPerOppgave(tasks) {
|
|
|
2006
2306
|
}
|
|
2007
2307
|
|
|
2008
2308
|
// src/program/Aksept.tsx
|
|
2009
|
-
var
|
|
2309
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2010
2310
|
function Aksept({
|
|
2011
2311
|
program,
|
|
2012
2312
|
harToken,
|
|
@@ -2022,7 +2322,7 @@ function Aksept({
|
|
|
2022
2322
|
periode(program.opensAt, program.closesAt),
|
|
2023
2323
|
program.maxContacts
|
|
2024
2324
|
);
|
|
2025
|
-
return /* @__PURE__ */ (0,
|
|
2325
|
+
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
2326
|
import_react_native12.View,
|
|
2027
2327
|
{
|
|
2028
2328
|
testID: "program-aksept",
|
|
@@ -2037,14 +2337,14 @@ function Aksept({
|
|
|
2037
2337
|
minHeight: "60%"
|
|
2038
2338
|
},
|
|
2039
2339
|
children: [
|
|
2040
|
-
/* @__PURE__ */ (0,
|
|
2041
|
-
/* @__PURE__ */ (0,
|
|
2042
|
-
/* @__PURE__ */ (0,
|
|
2340
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
2341
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Btn, { variant: "ghost", testID: "aksept-tilbake", ikon: "arrow-back-outline", label: tekst.tilbake, onPress: onLukk }),
|
|
2342
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.View, {})
|
|
2043
2343
|
] }),
|
|
2044
|
-
feil ? /* @__PURE__ */ (0,
|
|
2045
|
-
/* @__PURE__ */ (0,
|
|
2046
|
-
/* @__PURE__ */ (0,
|
|
2047
|
-
/* @__PURE__ */ (0,
|
|
2344
|
+
feil ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Banner, { live: true, ikon: "warning-outline", tone: "danger", children: tekst.akseptFeil(feil) }) : null,
|
|
2345
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.ScrollView, { contentContainerStyle: { gap: tema.space.md }, children: [
|
|
2346
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(H, { sub: tekst.akseptHva, children: program.name }),
|
|
2347
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2048
2348
|
import_react_native12.Text,
|
|
2049
2349
|
{
|
|
2050
2350
|
accessibilityRole: "text",
|
|
@@ -2057,42 +2357,46 @@ function Aksept({
|
|
|
2057
2357
|
children: tall
|
|
2058
2358
|
}
|
|
2059
2359
|
),
|
|
2060
|
-
/* @__PURE__ */ (0,
|
|
2061
|
-
/* @__PURE__ */ (0,
|
|
2062
|
-
/* @__PURE__ */ (0,
|
|
2063
|
-
program.tasks.map((o) => /* @__PURE__ */ (0,
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2065
|
-
/* @__PURE__ */ (0,
|
|
2360
|
+
/* @__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 }),
|
|
2361
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Card, { children: [
|
|
2362
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(H, { children: tekst.akseptOppgaver }),
|
|
2363
|
+
program.tasks.map((o) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { gap: tema.space.xs }, children: [
|
|
2364
|
+
/* @__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 }),
|
|
2365
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Hint, { children: [
|
|
2066
2366
|
tekst.akseptOppgaveTid(o.estimatedMinutes),
|
|
2067
2367
|
o.screenHint ? ` \xB7 ${o.screenHint}` : ""
|
|
2068
2368
|
] })
|
|
2069
2369
|
] }, o.id))
|
|
2070
2370
|
] }),
|
|
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
|
-
|
|
2371
|
+
program.knownIssues.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Card, { children: [
|
|
2372
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(H, { sub: tekst.akseptKjenteFeilUnder, children: tekst.akseptKjenteFeil(program.knownIssues.length) }),
|
|
2373
|
+
program.knownIssues.map((k) => {
|
|
2374
|
+
const o = knownIssueStatus[k.status] ?? knownIssueStatus.aktiv;
|
|
2375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { gap: tema.space.xs }, children: [
|
|
2376
|
+
/* @__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 }),
|
|
2377
|
+
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: [
|
|
2378
|
+
tekst.omvei,
|
|
2379
|
+
" ",
|
|
2380
|
+
k.workaround
|
|
2381
|
+
] }) : null,
|
|
2382
|
+
k.fixedIn ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2383
|
+
StatusPill,
|
|
2384
|
+
{
|
|
2385
|
+
ikon: o.ikon,
|
|
2386
|
+
etikett: k.status === "fikset" ? tekst.rettetI(k.fixedIn) : tekst.rettesI(k.fixedIn),
|
|
2387
|
+
fg: o.fg,
|
|
2388
|
+
bg: o.bg
|
|
2389
|
+
}
|
|
2390
|
+
) : null
|
|
2391
|
+
] }, k.id);
|
|
2392
|
+
})
|
|
2089
2393
|
] }) : null,
|
|
2090
|
-
/* @__PURE__ */ (0,
|
|
2091
|
-
/* @__PURE__ */ (0,
|
|
2092
|
-
/* @__PURE__ */ (0,
|
|
2394
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Card, { children: [
|
|
2395
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(H, { sub: tekst.akseptInnsamlingTekst, children: tekst.akseptInnsamling }),
|
|
2396
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Hint, { children: tekst.kontekstAldri })
|
|
2093
2397
|
] }),
|
|
2094
|
-
program.termsUrl && !program.commitmentFree ? /* @__PURE__ */ (0,
|
|
2095
|
-
/* @__PURE__ */ (0,
|
|
2398
|
+
program.termsUrl && !program.commitmentFree ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { gap: tema.space.xs }, children: [
|
|
2399
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2096
2400
|
import_react_native12.Pressable,
|
|
2097
2401
|
{
|
|
2098
2402
|
testID: "vilkar-lenke",
|
|
@@ -2100,20 +2404,32 @@ function Aksept({
|
|
|
2100
2404
|
accessibilityLabel: tekst.akseptVilkar,
|
|
2101
2405
|
onPress: () => void import_react_native12.Linking.openURL(String(program.termsUrl)),
|
|
2102
2406
|
style: { minHeight: tema.touch, justifyContent: "center" },
|
|
2103
|
-
children: /* @__PURE__ */ (0,
|
|
2104
|
-
|
|
2105
|
-
|
|
2407
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { flexDirection: "row", alignItems: "center", gap: tema.space.xs }, children: [
|
|
2408
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Ikon, { navn: "open-outline", farge: tema.color.textPrimary }),
|
|
2409
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2410
|
+
import_react_native12.Text,
|
|
2411
|
+
{
|
|
2412
|
+
style: { color: tema.color.textPrimary, fontSize: tema.font.body, textDecorationLine: "underline" },
|
|
2413
|
+
children: tekst.akseptVilkar
|
|
2414
|
+
}
|
|
2415
|
+
)
|
|
2106
2416
|
] })
|
|
2107
2417
|
}
|
|
2108
2418
|
),
|
|
2109
|
-
/* @__PURE__ */ (0,
|
|
2110
|
-
] }) : /* @__PURE__ */ (0,
|
|
2111
|
-
/* @__PURE__ */ (0,
|
|
2112
|
-
|
|
2113
|
-
|
|
2419
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Hint, { children: tekst.akseptVilkarHint })
|
|
2420
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Hint, { children: tekst.akseptIngenVilkar }),
|
|
2421
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: { flexDirection: "row", alignItems: "flex-start", gap: tema.space.sm }, children: [
|
|
2422
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Ikon, { navn: "exit-outline", farge: tema.color.textPrimary }),
|
|
2423
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2424
|
+
import_react_native12.Text,
|
|
2425
|
+
{
|
|
2426
|
+
style: { flex: 1, color: tema.color.textPrimary, fontSize: tema.font.body, lineHeight: tema.lineHeight.body },
|
|
2427
|
+
children: tekst.akseptUtgang
|
|
2428
|
+
}
|
|
2429
|
+
)
|
|
2114
2430
|
] })
|
|
2115
2431
|
] }),
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2432
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2117
2433
|
Btn,
|
|
2118
2434
|
{
|
|
2119
2435
|
testID: "bli-med",
|
|
@@ -2129,13 +2445,13 @@ function Aksept({
|
|
|
2129
2445
|
}
|
|
2130
2446
|
|
|
2131
2447
|
// src/program/HvordanGikkDet.tsx
|
|
2132
|
-
var
|
|
2448
|
+
var import_react15 = require("react");
|
|
2133
2449
|
var import_react_native13 = require("react-native");
|
|
2134
|
-
var
|
|
2450
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2135
2451
|
var UTFALL = [
|
|
2136
|
-
{ verdi: "fungerte", ikon: "
|
|
2137
|
-
{ verdi: "delvis", ikon: "
|
|
2138
|
-
{ verdi: "ikke", ikon: "
|
|
2452
|
+
{ verdi: "fungerte", ikon: "checkmark-circle-outline", etikett: tekst.utfallFungerte },
|
|
2453
|
+
{ verdi: "delvis", ikon: "contrast-outline", etikett: tekst.utfallDelvis },
|
|
2454
|
+
{ verdi: "ikke", ikon: "close-circle-outline", etikett: tekst.utfallIkke }
|
|
2139
2455
|
];
|
|
2140
2456
|
var SETNING_MAKS = 140;
|
|
2141
2457
|
function utfallEtikett(verdi) {
|
|
@@ -2149,9 +2465,9 @@ function HvordanGikkDet({
|
|
|
2149
2465
|
onLukk
|
|
2150
2466
|
}) {
|
|
2151
2467
|
const tema = useTema();
|
|
2152
|
-
const [valgt, setValgt] = (0,
|
|
2153
|
-
const [setning, setSetning] = (0,
|
|
2154
|
-
return /* @__PURE__ */ (0,
|
|
2468
|
+
const [valgt, setValgt] = (0, import_react15.useState)();
|
|
2469
|
+
const [setning, setSetning] = (0, import_react15.useState)("");
|
|
2470
|
+
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
2471
|
import_react_native13.View,
|
|
2156
2472
|
{
|
|
2157
2473
|
testID: "hvordan-gikk-det",
|
|
@@ -2165,12 +2481,12 @@ function HvordanGikkDet({
|
|
|
2165
2481
|
gap: tema.space.md
|
|
2166
2482
|
},
|
|
2167
2483
|
children: [
|
|
2168
|
-
/* @__PURE__ */ (0,
|
|
2169
|
-
/* @__PURE__ */ (0,
|
|
2170
|
-
/* @__PURE__ */ (0,
|
|
2171
|
-
/* @__PURE__ */ (0,
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Btn, { variant: "ghost", testID: "hvordan-tilbake", ikon: "arrow-back-outline", label: tekst.tilbake, onPress: onLukk }),
|
|
2485
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Hint, { children: under }),
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(H, { children: tekst.hvordanGikkDet }),
|
|
2487
|
+
/* @__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
2488
|
const aktiv = valgt === u.verdi;
|
|
2173
|
-
return /* @__PURE__ */ (0,
|
|
2489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2174
2490
|
import_react_native13.Pressable,
|
|
2175
2491
|
{
|
|
2176
2492
|
testID: `utfall-${u.verdi}`,
|
|
@@ -2191,16 +2507,16 @@ function HvordanGikkDet({
|
|
|
2191
2507
|
backgroundColor: aktiv ? tema.color.brandBg : tema.color.surfaceRaised
|
|
2192
2508
|
},
|
|
2193
2509
|
children: [
|
|
2194
|
-
/* @__PURE__ */ (0,
|
|
2195
|
-
/* @__PURE__ */ (0,
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Ikon, { navn: u.ikon, farge: tema.color.textPrimary }),
|
|
2511
|
+
/* @__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
2512
|
]
|
|
2197
2513
|
},
|
|
2198
2514
|
u.verdi
|
|
2199
2515
|
);
|
|
2200
2516
|
}) }),
|
|
2201
|
-
/* @__PURE__ */ (0,
|
|
2202
|
-
/* @__PURE__ */ (0,
|
|
2203
|
-
/* @__PURE__ */ (0,
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native13.View, { style: { gap: tema.space.xs }, children: [
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.Text, { style: { color: tema.color.textSecondary, fontSize: tema.font.small }, children: tekst.setningLabel }),
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2204
2520
|
import_react_native13.TextInput,
|
|
2205
2521
|
{
|
|
2206
2522
|
testID: "hvordan-setning",
|
|
@@ -2227,8 +2543,8 @@ function HvordanGikkDet({
|
|
|
2227
2543
|
}
|
|
2228
2544
|
)
|
|
2229
2545
|
] }),
|
|
2230
|
-
feil ? /* @__PURE__ */ (0,
|
|
2231
|
-
/* @__PURE__ */ (0,
|
|
2546
|
+
feil ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Banner, { live: true, ikon: "warning-outline", tone: "danger", children: tekst.svarFeil(feil) }) : null,
|
|
2547
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2232
2548
|
Btn,
|
|
2233
2549
|
{
|
|
2234
2550
|
testID: "hvordan-lagre",
|
|
@@ -2248,9 +2564,9 @@ function HvordanGikkDet({
|
|
|
2248
2564
|
}
|
|
2249
2565
|
|
|
2250
2566
|
// src/program/Oppfolging.tsx
|
|
2251
|
-
var
|
|
2567
|
+
var import_react16 = require("react");
|
|
2252
2568
|
var import_react_native14 = require("react-native");
|
|
2253
|
-
var
|
|
2569
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2254
2570
|
function tarSvar(kind) {
|
|
2255
2571
|
return kind === "hvordan_gikk_det" || kind === "sjekkpunkt";
|
|
2256
2572
|
}
|
|
@@ -2265,9 +2581,9 @@ function Oppfolging({
|
|
|
2265
2581
|
}) {
|
|
2266
2582
|
const tema = useTema();
|
|
2267
2583
|
const art = tarSvar(oppfolging.kind) ? "spoersmaal" : oppfolging.kind === "tilbud_om_utgang" ? "utgang" : "paaminnelse";
|
|
2268
|
-
const ikon = art === "spoersmaal" ? "
|
|
2584
|
+
const ikon = art === "spoersmaal" ? "flask-outline" : art === "utgang" ? "exit-outline" : "calendar-outline";
|
|
2269
2585
|
const hint = art === "spoersmaal" ? tekst.oppfolgingKontakt(kontaktNr, maksKontakter) : art === "utgang" ? tekst.oppfolgingUtgangHint(kontaktNr, maksKontakter) : tekst.oppfolgingPaaminnelseHint(kontaktNr, maksKontakter);
|
|
2270
|
-
return /* @__PURE__ */ (0,
|
|
2586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2271
2587
|
import_react_native14.View,
|
|
2272
2588
|
{
|
|
2273
2589
|
testID: `oppfolging-${oppfolging.id}`,
|
|
@@ -2281,19 +2597,29 @@ function Oppfolging({
|
|
|
2281
2597
|
gap: tema.space.sm
|
|
2282
2598
|
},
|
|
2283
2599
|
children: [
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2287
|
-
/* @__PURE__ */ (0,
|
|
2288
|
-
/* @__PURE__ */ (0,
|
|
2600
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native14.View, { style: { flexDirection: "row", gap: tema.space.sm, alignItems: "flex-start" }, children: [
|
|
2601
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Ikon, { navn: ikon, farge: tema.color.textPrimary }),
|
|
2602
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native14.View, { style: { flex: 1, gap: tema.space.xs }, children: [
|
|
2603
|
+
/* @__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 }),
|
|
2604
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Hint, { children: hint })
|
|
2289
2605
|
] })
|
|
2290
2606
|
] }),
|
|
2291
|
-
/* @__PURE__ */ (0,
|
|
2292
|
-
/* @__PURE__ */ (0,
|
|
2293
|
-
/* @__PURE__ */ (0,
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2607
|
+
/* @__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: [
|
|
2608
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Btn, { grow: true, variant: "secondary", testID: `bli-vaerende-${oppfolging.id}`, label: tekst.bliVaerende, onPress: onSenere }),
|
|
2609
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2610
|
+
Btn,
|
|
2611
|
+
{
|
|
2612
|
+
grow: true,
|
|
2613
|
+
variant: "danger",
|
|
2614
|
+
testID: `gaa-ut-${oppfolging.id}`,
|
|
2615
|
+
ikon: "exit-outline",
|
|
2616
|
+
label: tekst.gaaUtBekreft,
|
|
2617
|
+
onPress: onGaaUt
|
|
2618
|
+
}
|
|
2619
|
+
)
|
|
2620
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
2621
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Btn, { grow: true, variant: "secondary", testID: `senere-${oppfolging.id}`, label: tekst.senere, onPress: onSenere }),
|
|
2622
|
+
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
2623
|
] }) })
|
|
2298
2624
|
]
|
|
2299
2625
|
}
|
|
@@ -2301,9 +2627,9 @@ function Oppfolging({
|
|
|
2301
2627
|
}
|
|
2302
2628
|
|
|
2303
2629
|
// src/program/Oppgaver.tsx
|
|
2304
|
-
var
|
|
2630
|
+
var import_react17 = require("react");
|
|
2305
2631
|
var import_react_native15 = require("react-native");
|
|
2306
|
-
var
|
|
2632
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2307
2633
|
function Oppgaver({
|
|
2308
2634
|
tasks,
|
|
2309
2635
|
completions,
|
|
@@ -2311,9 +2637,9 @@ function Oppgaver({
|
|
|
2311
2637
|
}) {
|
|
2312
2638
|
const tema = useTema();
|
|
2313
2639
|
const ferdig = new Map(completions.map((c) => [c.taskId, c]));
|
|
2314
|
-
return /* @__PURE__ */ (0,
|
|
2640
|
+
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
2641
|
const c = ferdig.get(o.id);
|
|
2316
|
-
return /* @__PURE__ */ (0,
|
|
2642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2317
2643
|
import_react_native15.View,
|
|
2318
2644
|
{
|
|
2319
2645
|
testID: `oppgave-${o.id}`,
|
|
@@ -2326,14 +2652,28 @@ function Oppgaver({
|
|
|
2326
2652
|
borderBottomColor: tema.color.border
|
|
2327
2653
|
},
|
|
2328
2654
|
children: [
|
|
2329
|
-
/* @__PURE__ */ (0,
|
|
2330
|
-
/* @__PURE__ */ (0,
|
|
2331
|
-
/* @__PURE__ */ (0,
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native15.View, { style: { flex: 1, gap: tema.space.xs }, children: [
|
|
2656
|
+
/* @__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 }),
|
|
2657
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Hint, { children: [
|
|
2332
2658
|
c ? tekst.oppgaveGjortMed(utfallEtikett(c.outcome)) : `${tekst.oppgaveIkkeBegynt} \xB7 ${tekst.akseptOppgaveTid(o.estimatedMinutes)}`,
|
|
2333
2659
|
c?.text ? ` \xB7 \xAB${c.text}\xBB` : ""
|
|
2334
2660
|
] })
|
|
2335
2661
|
] }),
|
|
2336
|
-
c ?
|
|
2662
|
+
c ? (
|
|
2663
|
+
// Merket er den eneste flaten der ikonet står alene, så etiketten
|
|
2664
|
+
// ligger på containeren: skjermleseren hører utfallet, ikke «hake».
|
|
2665
|
+
/* @__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 }) })
|
|
2666
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2667
|
+
Btn,
|
|
2668
|
+
{
|
|
2669
|
+
variant: "secondary",
|
|
2670
|
+
testID: `gjort-${o.id}`,
|
|
2671
|
+
ikon: "checkmark-circle-outline",
|
|
2672
|
+
label: tekst.oppgaveGjort,
|
|
2673
|
+
accessibilityLabel: tekst.oppgaveGjortLabel(o.title),
|
|
2674
|
+
onPress: () => onGjort(o)
|
|
2675
|
+
}
|
|
2676
|
+
)
|
|
2337
2677
|
]
|
|
2338
2678
|
},
|
|
2339
2679
|
o.id
|
|
@@ -2342,7 +2682,7 @@ function Oppgaver({
|
|
|
2342
2682
|
}
|
|
2343
2683
|
|
|
2344
2684
|
// src/program/InnspelProgram.tsx
|
|
2345
|
-
var
|
|
2685
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2346
2686
|
function InnspelProgram({
|
|
2347
2687
|
invitationToken,
|
|
2348
2688
|
onEndring,
|
|
@@ -2350,19 +2690,19 @@ function InnspelProgram({
|
|
|
2350
2690
|
}) {
|
|
2351
2691
|
const { client } = useInnspel();
|
|
2352
2692
|
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,
|
|
2693
|
+
const [mine, setMine] = (0, import_react18.useState)();
|
|
2694
|
+
const [deltakelse, setDeltakelse] = (0, import_react18.useState)();
|
|
2695
|
+
const [viserAksept, setViserAksept] = (0, import_react18.useState)(false);
|
|
2696
|
+
const [viserGaaUt, setViserGaaUt] = (0, import_react18.useState)(false);
|
|
2697
|
+
const [avvist, setAvvist] = (0, import_react18.useState)(false);
|
|
2698
|
+
const [sender, setSender] = (0, import_react18.useState)(false);
|
|
2699
|
+
const [feil, setFeil] = (0, import_react18.useState)();
|
|
2700
|
+
const [dialog, setDialog] = (0, import_react18.useState)();
|
|
2701
|
+
const [svarFeil, setSvarFeil] = (0, import_react18.useState)();
|
|
2702
|
+
const [lagtBort, setLagtBort] = (0, import_react18.useState)(/* @__PURE__ */ new Set());
|
|
2703
|
+
const [meldFeilFor, setMeldFeilFor] = (0, import_react18.useState)();
|
|
2704
|
+
const leggBort = (0, import_react18.useCallback)((id) => setLagtBort((s) => /* @__PURE__ */ new Set([...s, id])), []);
|
|
2705
|
+
const lagreSvar = (0, import_react18.useCallback)(
|
|
2366
2706
|
async (outcome, text) => {
|
|
2367
2707
|
if (!dialog || !deltakelse) return;
|
|
2368
2708
|
setSender(true);
|
|
@@ -2385,7 +2725,7 @@ function InnspelProgram({
|
|
|
2385
2725
|
},
|
|
2386
2726
|
[client, deltakelse, dialog, onMeldFeil]
|
|
2387
2727
|
);
|
|
2388
|
-
(0,
|
|
2728
|
+
(0, import_react18.useEffect)(() => {
|
|
2389
2729
|
if (client.isAnonymous) return;
|
|
2390
2730
|
let levende = true;
|
|
2391
2731
|
void client.programs.list().then((svar) => {
|
|
@@ -2397,7 +2737,7 @@ function InnspelProgram({
|
|
|
2397
2737
|
levende = false;
|
|
2398
2738
|
};
|
|
2399
2739
|
}, [client]);
|
|
2400
|
-
const bliMed = (0,
|
|
2740
|
+
const bliMed = (0, import_react18.useCallback)(async () => {
|
|
2401
2741
|
if (!invitationToken) return;
|
|
2402
2742
|
setSender(true);
|
|
2403
2743
|
setFeil(void 0);
|
|
@@ -2412,7 +2752,7 @@ function InnspelProgram({
|
|
|
2412
2752
|
setSender(false);
|
|
2413
2753
|
}
|
|
2414
2754
|
}, [client, invitationToken, onEndring]);
|
|
2415
|
-
const gaaUt = (0,
|
|
2755
|
+
const gaaUt = (0, import_react18.useCallback)(async () => {
|
|
2416
2756
|
if (!deltakelse) return;
|
|
2417
2757
|
setSender(true);
|
|
2418
2758
|
try {
|
|
@@ -2432,8 +2772,8 @@ function InnspelProgram({
|
|
|
2432
2772
|
if (deltakelse) {
|
|
2433
2773
|
const kort = (mine?.pendingFollowUps ?? []).filter((f) => f.programId === program.id && !lagtBort.has(f.id)).sort((a, b) => a.emittedAt.localeCompare(b.emittedAt));
|
|
2434
2774
|
const forsteKontaktNr = Math.max(1, deltakelse.contactsSent - kort.length + 1);
|
|
2435
|
-
return /* @__PURE__ */ (0,
|
|
2436
|
-
kort.map((f, i) => /* @__PURE__ */ (0,
|
|
2775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { testID: "program-deltakelse", accessibilityLabel: tekst.deltakelseRegion, style: { gap: tema.space.sm }, children: [
|
|
2776
|
+
kort.map((f, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2437
2777
|
Oppfolging,
|
|
2438
2778
|
{
|
|
2439
2779
|
oppfolging: f,
|
|
@@ -2449,9 +2789,9 @@ function InnspelProgram({
|
|
|
2449
2789
|
},
|
|
2450
2790
|
f.id
|
|
2451
2791
|
)),
|
|
2452
|
-
/* @__PURE__ */ (0,
|
|
2453
|
-
/* @__PURE__ */ (0,
|
|
2454
|
-
/* @__PURE__ */ (0,
|
|
2792
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Card, { children: [
|
|
2793
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(H, { sub: tekst.deltakelsePeriode(periode(program.opensAt, program.closesAt), deltakelse.contactsSent, program.maxContacts), children: program.name }),
|
|
2794
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2455
2795
|
Oppgaver,
|
|
2456
2796
|
{
|
|
2457
2797
|
tasks: program.tasks,
|
|
@@ -2462,14 +2802,14 @@ function InnspelProgram({
|
|
|
2462
2802
|
}
|
|
2463
2803
|
}
|
|
2464
2804
|
),
|
|
2465
|
-
meldFeilFor && onMeldFeil ? /* @__PURE__ */ (0,
|
|
2466
|
-
/* @__PURE__ */ (0,
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2805
|
+
meldFeilFor && onMeldFeil ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { style: { gap: tema.space.xs }, children: [
|
|
2806
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Hint, { children: tekst.meldFeilHint }),
|
|
2807
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2468
2808
|
Btn,
|
|
2469
2809
|
{
|
|
2470
2810
|
variant: "secondary",
|
|
2471
2811
|
testID: "meld-feil",
|
|
2472
|
-
ikon: "
|
|
2812
|
+
ikon: "bug-outline",
|
|
2473
2813
|
label: tekst.meldFeil,
|
|
2474
2814
|
onPress: () => {
|
|
2475
2815
|
const task = meldFeilFor;
|
|
@@ -2479,9 +2819,9 @@ function InnspelProgram({
|
|
|
2479
2819
|
}
|
|
2480
2820
|
)
|
|
2481
2821
|
] }) : null,
|
|
2482
|
-
/* @__PURE__ */ (0,
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Btn, { variant: "ghost", testID: "gaa-ut", ikon: "exit-outline", label: tekst.gaaUt, onPress: () => setViserGaaUt(true) })
|
|
2483
2823
|
] }),
|
|
2484
|
-
dialog ? /* @__PURE__ */ (0,
|
|
2824
|
+
dialog ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2485
2825
|
HvordanGikkDet,
|
|
2486
2826
|
{
|
|
2487
2827
|
under: dialog.type === "oppgave" ? dialog.task.title : dialog.oppfolging.question,
|
|
@@ -2491,7 +2831,7 @@ function InnspelProgram({
|
|
|
2491
2831
|
onLukk: () => setDialog(void 0)
|
|
2492
2832
|
}
|
|
2493
2833
|
) : null,
|
|
2494
|
-
viserGaaUt ? /* @__PURE__ */ (0,
|
|
2834
|
+
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
2835
|
import_react_native16.View,
|
|
2496
2836
|
{
|
|
2497
2837
|
testID: "gaa-ut-dialog",
|
|
@@ -2505,11 +2845,22 @@ function InnspelProgram({
|
|
|
2505
2845
|
gap: tema.space.md
|
|
2506
2846
|
},
|
|
2507
2847
|
children: [
|
|
2508
|
-
/* @__PURE__ */ (0,
|
|
2509
|
-
/* @__PURE__ */ (0,
|
|
2510
|
-
/* @__PURE__ */ (0,
|
|
2511
|
-
/* @__PURE__ */ (0,
|
|
2512
|
-
/* @__PURE__ */ (0,
|
|
2848
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(H, { children: tekst.gaaUtTittel }),
|
|
2849
|
+
/* @__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) }),
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { style: { flexDirection: "row", gap: tema.space.sm }, children: [
|
|
2851
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Btn, { grow: true, variant: "secondary", testID: "bli-vaerende", label: tekst.bliVaerende, onPress: () => setViserGaaUt(false) }),
|
|
2852
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2853
|
+
Btn,
|
|
2854
|
+
{
|
|
2855
|
+
grow: true,
|
|
2856
|
+
variant: "danger",
|
|
2857
|
+
testID: "bekreft-gaa-ut",
|
|
2858
|
+
ikon: "exit-outline",
|
|
2859
|
+
label: tekst.gaaUtBekreft,
|
|
2860
|
+
disabled: sender,
|
|
2861
|
+
onPress: () => void gaaUt()
|
|
2862
|
+
}
|
|
2863
|
+
)
|
|
2513
2864
|
] })
|
|
2514
2865
|
]
|
|
2515
2866
|
}
|
|
@@ -2517,8 +2868,8 @@ function InnspelProgram({
|
|
|
2517
2868
|
] });
|
|
2518
2869
|
}
|
|
2519
2870
|
if (!invitasjon || avvist) return null;
|
|
2520
|
-
return /* @__PURE__ */ (0,
|
|
2521
|
-
/* @__PURE__ */ (0,
|
|
2871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
2872
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2522
2873
|
import_react_native16.View,
|
|
2523
2874
|
{
|
|
2524
2875
|
testID: "program-banner",
|
|
@@ -2532,13 +2883,13 @@ function InnspelProgram({
|
|
|
2532
2883
|
gap: tema.space.sm
|
|
2533
2884
|
},
|
|
2534
2885
|
children: [
|
|
2535
|
-
/* @__PURE__ */ (0,
|
|
2536
|
-
/* @__PURE__ */ (0,
|
|
2537
|
-
/* @__PURE__ */ (0,
|
|
2538
|
-
/* @__PURE__ */ (0,
|
|
2539
|
-
/* @__PURE__ */ (0,
|
|
2886
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { style: { flexDirection: "row", gap: tema.space.sm, alignItems: "flex-start" }, children: [
|
|
2887
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Ikon, { navn: "flask-outline", farge: tema.color.textPrimary }),
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native16.View, { style: { flex: 1, gap: tema.space.xs }, children: [
|
|
2889
|
+
/* @__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) }),
|
|
2890
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Hint, { children: tekst.invitasjonKontakter(program.maxContacts) })
|
|
2540
2891
|
] }),
|
|
2541
|
-
/* @__PURE__ */ (0,
|
|
2892
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2542
2893
|
import_react_native16.Pressable,
|
|
2543
2894
|
{
|
|
2544
2895
|
testID: "avvis-invitasjon",
|
|
@@ -2546,16 +2897,16 @@ function InnspelProgram({
|
|
|
2546
2897
|
accessibilityLabel: tekst.avvisInvitasjon,
|
|
2547
2898
|
onPress: () => setAvvist(true),
|
|
2548
2899
|
style: { minWidth: tema.touch, minHeight: tema.touch, alignItems: "center", justifyContent: "center" },
|
|
2549
|
-
children: /* @__PURE__ */ (0,
|
|
2900
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Ikon, { navn: "close-outline", farge: tema.color.textSecondary })
|
|
2550
2901
|
}
|
|
2551
2902
|
)
|
|
2552
2903
|
] }),
|
|
2553
|
-
feil && !viserAksept ? /* @__PURE__ */ (0,
|
|
2554
|
-
/* @__PURE__ */ (0,
|
|
2904
|
+
feil && !viserAksept ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Banner, { live: true, ikon: "warning-outline", tone: "danger", children: tekst.akseptFeil(feil) }) : null,
|
|
2905
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Btn, { variant: "secondary", testID: "les-mer", label: tekst.lesMer, onPress: () => setViserAksept(true) })
|
|
2555
2906
|
]
|
|
2556
2907
|
}
|
|
2557
2908
|
),
|
|
2558
|
-
viserAksept ? /* @__PURE__ */ (0,
|
|
2909
|
+
viserAksept ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2559
2910
|
Aksept,
|
|
2560
2911
|
{
|
|
2561
2912
|
program,
|