@telia/teddy 0.1.37 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,92 +77,17 @@ const PRIVATE_LINKS = {
77
77
  name: "Privat",
78
78
  link: "/",
79
79
  appKey: APP_KEYS["open-pages"],
80
- highlightedLinks: [
81
- {
82
- name: "Mobilabonnement",
83
- link: "/mobil/mobilabonnement/priser/",
84
- appKey: APP_KEYS["web-shop"]
85
- },
86
- {
87
- name: "Mobiltelefoner",
88
- link: "/mobil/mobiltelefoner/",
89
- appKey: APP_KEYS["web-shop"]
90
- },
91
- {
92
- name: "Varemerker ",
93
- link: "/varemerker/",
94
- appKey: APP_KEYS["web-shop"]
95
- },
96
- {
97
- name: "Kampanjer",
98
- link: "/kampanje/",
99
- appKey: APP_KEYS["open-pages"]
100
- },
101
- {
102
- name: "Faktura",
103
- link: "/hjelp/faktura/",
104
- appKey: APP_KEYS["open-pages"]
105
- },
106
- {
107
- name: "Se Telia Play",
108
- link: "https://www.teliaplay.no",
109
- appKey: APP_KEYS["open-pages"]
110
- }
111
- ],
112
80
  links: [
113
81
  {
114
82
  name: "Logo",
115
83
  link: "/",
116
84
  appKey: APP_KEYS["open-pages"],
117
- links: [],
118
- highlightedLinks: []
85
+ links: []
119
86
  },
120
87
  {
121
88
  name: "Mobil",
122
- link: "",
89
+ link: "/mobil/",
123
90
  appKey: APP_KEYS["open-pages"],
124
- highlightedLinks: [
125
- {
126
- name: "Kjøp Telia X",
127
- link: "/mobil/mobilabonnement/ubegrenset-data/",
128
- appKey: APP_KEYS["web-shop"]
129
- },
130
- {
131
- name: "Pakketilbud",
132
- link: "/mobil/mobilabonnement/pakketilbud/",
133
- appKey: APP_KEYS["web-shop"]
134
- },
135
- {
136
- name: "Kjøp iPhone",
137
- link: "/varemerker/apple/iphone/",
138
- appKey: APP_KEYS["web-shop"]
139
- },
140
- {
141
- name: "Kjøp AirPods",
142
- link: "/varemerker/apple/airpods/",
143
- appKey: APP_KEYS["web-shop"]
144
- },
145
- {
146
- name: "Kampanjer",
147
- link: "/kampanje/",
148
- appKey: APP_KEYS["open-pages"]
149
- },
150
- {
151
- name: "SIM, PIN og PUK",
152
- link: "/mobil/mobilabonnement/sim-kort/",
153
- appKey: APP_KEYS["open-pages"]
154
- },
155
- {
156
- name: "Utland",
157
- link: "/mobil/mobilabonnement/utland/",
158
- appKey: APP_KEYS["open-pages"]
159
- },
160
- {
161
- name: "Eierskifte",
162
- link: "/mobil/hjelp/bytte-eier/",
163
- appKey: APP_KEYS["open-pages"]
164
- }
165
- ],
166
91
  links: [
167
92
  {
168
93
  name: "Mobilabonnement",
@@ -189,6 +114,11 @@ const PRIVATE_LINKS = {
189
114
  link: "/mobil/tilbehor/",
190
115
  appKey: APP_KEYS["web-shop"]
191
116
  },
117
+ {
118
+ name: "Pakketilbud",
119
+ link: "/mobil/mobilabonnement/pakketilbud/",
120
+ appKey: APP_KEYS["web-shop"]
121
+ },
192
122
  {
193
123
  name: "Påfyll kontantkort",
194
124
  link: "/mobil/mobilabonnement/kontantkort/lade/",
@@ -198,59 +128,18 @@ const PRIVATE_LINKS = {
198
128
  name: "Hjelp Mobil",
199
129
  link: "/mobil/hjelp/",
200
130
  appKey: APP_KEYS["open-pages"]
201
- },
202
- {
203
- name: "Alt om mobil",
204
- link: "/mobil/",
205
- appKey: APP_KEYS["open-pages"]
206
131
  }
207
132
  ]
208
133
  },
209
134
  {
210
135
  name: "TV",
211
- link: "",
136
+ link: "/tv/",
212
137
  appKey: APP_KEYS["open-pages"],
213
- highlightedLinks: [
214
- {
215
- name: "Valgmenyen i Telia Play",
216
- link: "https://account.teliaplay.no/subscription/selection-menu",
217
- appKey: APP_KEYS["open-pages"]
218
- },
219
- {
220
- name: "Aktivere strømmetjenester",
221
- link: "/tv/innholdsoversikt/strommetjenester/#registrere",
222
- appKey: APP_KEYS["open-pages"]
223
- },
224
- {
225
- name: "Kjøp Premier League",
226
- link: "/tv/innholdsoversikt/premiumtjenester/premier-league-v-premium/",
227
- appKey: APP_KEYS["open-pages"]
228
- },
229
- {
230
- name: "Kampanjer",
231
- link: "/kampanje/",
232
- appKey: APP_KEYS["open-pages"]
233
- },
234
- {
235
- name: "Kom i gang med Telia Play",
236
- link: "/tv/hjelp/kom-i-gang/",
237
- appKey: APP_KEYS["open-pages"]
238
- },
239
- {
240
- name: "Slik bruker du Telia Play",
241
- link: "/tv/hjelp/daglig-bruk/",
242
- appKey: APP_KEYS["open-pages"]
243
- },
244
- {
245
- name: "Driftsmeldinger og feilsøk",
246
- link: "/tv/hjelp/tv-feilsok/tv-hjelp-utstyr/",
247
- appKey: APP_KEYS["open-pages"]
248
- }
249
- ],
250
138
  links: [
251
139
  {
252
140
  name: "Se Telia Play",
253
141
  link: "https://www.teliaplay.no",
142
+ icon: "external",
254
143
  appKey: APP_KEYS["open-pages"]
255
144
  },
256
145
  {
@@ -263,11 +152,21 @@ const PRIVATE_LINKS = {
263
152
  link: "/tv/innholdsoversikt/strommetjenester/",
264
153
  appKey: APP_KEYS["open-pages"]
265
154
  },
155
+ // {
156
+ // name: 'TV-kanaler',
157
+ // link: '/tv/tv-kanaler-og-kanalpakker/',
158
+ // appKey: APP_KEYS['open-pages'],
159
+ // },
266
160
  {
267
161
  name: "Premiumtjenester",
268
162
  link: "/tv/innholdsoversikt/premiumtjenester/",
269
163
  appKey: APP_KEYS["open-pages"]
270
164
  },
165
+ // {
166
+ // name: 'Filmer',
167
+ // link: '/tv/filmleie-og-filmkjop/',
168
+ // appKey: APP_KEYS['open-pages'],
169
+ // },
271
170
  {
272
171
  name: "TV-bokser",
273
172
  link: "/tv/tv-bokser/",
@@ -277,50 +176,13 @@ const PRIVATE_LINKS = {
277
176
  name: "Hjelp TV",
278
177
  link: "/tv/hjelp/",
279
178
  appKey: APP_KEYS["open-pages"]
280
- },
281
- {
282
- name: "Alt om TV",
283
- link: "/tv/",
284
- appKey: APP_KEYS["open-pages"]
285
179
  }
286
180
  ]
287
181
  },
288
182
  {
289
183
  name: "Internett",
290
- link: "",
184
+ link: "/internett/",
291
185
  appKey: APP_KEYS["open-pages"],
292
- highlightedLinks: [
293
- {
294
- name: "Søk på adresse",
295
- link: "/internett/sok-adresse/",
296
- appKey: APP_KEYS["open-pages"]
297
- },
298
- {
299
- name: "Kjøp bredbånd til hytta",
300
- link: "/internett/tradlost-bredband-hytte/",
301
- appKey: APP_KEYS["open-pages"]
302
- },
303
- {
304
- name: "Kampanjer",
305
- link: "/kampanje/",
306
- appKey: APP_KEYS["open-pages"]
307
- },
308
- {
309
- name: "Problemer med internett",
310
- link: "/internett/internett-problemer/",
311
- appKey: APP_KEYS["open-pages"]
312
- },
313
- {
314
- name: "Ruterer og innstillinger",
315
- link: "/internett/wifi/rutere/",
316
- appKey: APP_KEYS["open-pages"]
317
- },
318
- {
319
- name: "WiFi-tips",
320
- link: "/internett/wifi/wifi-tips/",
321
- appKey: APP_KEYS["open-pages"]
322
- }
323
- ],
324
186
  links: [
325
187
  {
326
188
  name: "Fast bredbånd",
@@ -356,60 +218,13 @@ const PRIVATE_LINKS = {
356
218
  name: "Hjelp Internett",
357
219
  link: "/internett/hjelp/",
358
220
  appKey: APP_KEYS["open-pages"]
359
- },
360
- {
361
- name: "Alt om internett",
362
- link: "/internett/",
363
- appKey: APP_KEYS["open-pages"]
364
221
  }
365
222
  ]
366
223
  },
367
224
  {
368
225
  name: "Trygghet",
369
- link: "",
226
+ link: "/trygghet/",
370
227
  appKey: APP_KEYS["open-pages"],
371
- highlightedLinks: [
372
- {
373
- name: "Telia Trygg",
374
- link: "/trygghet/tjenester/telia-trygg/",
375
- appKey: APP_KEYS["open-pages"]
376
- },
377
- {
378
- name: "Mobilforsikring",
379
- link: "/trygghet/tjenester/mobilforsikring/",
380
- appKey: APP_KEYS["open-pages"]
381
- },
382
- {
383
- name: "Telia Sky",
384
- link: "/trygghet/tjenester/telia-sky/",
385
- appKey: APP_KEYS["open-pages"]
386
- },
387
- {
388
- name: "Trygg mobil for barn",
389
- link: "/trygghet/trygg-pa-skjerm/trygg-mobil-til-barn/",
390
- appKey: APP_KEYS["open-pages"]
391
- },
392
- {
393
- name: "Ta styring over skjermtiden",
394
- link: "/trygghet/skjermhelse/skjermtid/",
395
- appKey: APP_KEYS["open-pages"]
396
- },
397
- {
398
- name: "Falske nettbutikker",
399
- link: "/trygghet/svindel/falske-nettbutikker/",
400
- appKey: APP_KEYS["open-pages"]
401
- },
402
- {
403
- name: "ID-tyveri",
404
- link: "/trygghet/svindel/id-tyveri/",
405
- appKey: APP_KEYS["open-pages"]
406
- },
407
- {
408
- name: "Lynkurs - trygg på skjerm",
409
- link: "/trygghet/trygg-pa-skjerm/lynkurs/",
410
- appKey: APP_KEYS["open-pages"]
411
- }
412
- ],
413
228
  links: [
414
229
  {
415
230
  name: "Tjenester",
@@ -440,50 +255,13 @@ const PRIVATE_LINKS = {
440
255
  name: "Hjelp Trygghet",
441
256
  link: "/trygghet/hjelp/",
442
257
  appKey: APP_KEYS["open-pages"]
443
- },
444
- {
445
- name: "Alt om trygghet",
446
- link: "/trygghet/",
447
- appKey: APP_KEYS["open-pages"]
448
258
  }
449
259
  ]
450
260
  },
451
261
  {
452
262
  name: "Hjelp",
453
- link: "",
263
+ link: "/hjelp/",
454
264
  appKey: APP_KEYS["open-pages"],
455
- highlightedLinks: [
456
- {
457
- name: "SIM, PIN og PUK",
458
- link: "/mobil/mobilabonnement/sim-kort/",
459
- appKey: APP_KEYS["open-pages"]
460
- },
461
- {
462
- name: "Driftsmeldinger",
463
- link: "/hjelp/driftsmeldinger/",
464
- appKey: APP_KEYS["open-pages"]
465
- },
466
- {
467
- name: "Dekningskart",
468
- link: "/nett/dekning/",
469
- appKey: APP_KEYS["open-pages"]
470
- },
471
- {
472
- name: "Returnere rutere og TV-bokser",
473
- link: "/hjelp/retur-av-utstyr/",
474
- appKey: APP_KEYS["open-pages"]
475
- },
476
- {
477
- name: "Last ned apper",
478
- link: "/hjelp/apper/",
479
- appKey: APP_KEYS["open-pages"]
480
- },
481
- {
482
- name: "Se din faktura",
483
- link: "/minside/faktura/",
484
- appKey: APP_KEYS["my-pages"]
485
- }
486
- ],
487
265
  links: [
488
266
  {
489
267
  name: "Hjelp Mobil",
@@ -519,11 +297,6 @@ const PRIVATE_LINKS = {
519
297
  name: "Finn butikk",
520
298
  link: "/hjelp/butikker-og-forhandlere/",
521
299
  appKey: APP_KEYS["open-pages"]
522
- },
523
- {
524
- name: "Hjelp til alt",
525
- link: "/hjelp/",
526
- appKey: APP_KEYS["open-pages"]
527
300
  }
528
301
  // {
529
302
  // name: 'Kontakt oss',
@@ -538,41 +311,35 @@ const BUSINESS_LINKS = {
538
311
  name: "Bedrift",
539
312
  link: "/bedrift/",
540
313
  appKey: APP_KEYS["open-pages"],
541
- highlightedLinks: [],
542
314
  links: [
543
315
  {
544
316
  name: "Logo",
545
317
  link: "/bedrift/",
546
318
  appKey: APP_KEYS["open-pages"],
547
- links: [],
548
- highlightedLinks: []
319
+ links: []
549
320
  },
550
321
  {
551
322
  name: "Produkter og tjenester",
552
323
  link: "/bedrift/produkter-og-tjenester/",
553
324
  appKey: APP_KEYS["open-pages"],
554
- links: [],
555
- highlightedLinks: []
325
+ links: []
556
326
  },
557
327
  {
558
328
  name: "Sikkerhet",
559
329
  link: "/bedrift/sikkerhet/",
560
330
  appKey: APP_KEYS["open-pages"],
561
- links: [],
562
- highlightedLinks: []
331
+ links: []
563
332
  },
564
333
  {
565
334
  name: "Innovasjon",
566
335
  link: "/bedrift/innovasjon-og-startup/",
567
336
  appKey: APP_KEYS["open-pages"],
568
- links: [],
569
- highlightedLinks: []
337
+ links: []
570
338
  },
571
339
  {
572
340
  name: "Nettbutikk",
573
341
  link: "/bedrift/mobilabonnement/",
574
342
  appKey: APP_KEYS["open-pages"],
575
- highlightedLinks: [],
576
343
  links: [
577
344
  {
578
345
  name: "Mobilabonnement",
@@ -595,8 +362,7 @@ const BUSINESS_LINKS = {
595
362
  name: "Hjelp",
596
363
  link: "/bedrift/kundeservice/",
597
364
  appKey: APP_KEYS["open-pages"],
598
- links: [],
599
- highlightedLinks: []
365
+ links: []
600
366
  }
601
367
  ]
602
368
  };
@@ -604,35 +370,30 @@ const MDU_LINKS = {
604
370
  name: "Borettslag",
605
371
  link: "/borettslag/",
606
372
  appKey: APP_KEYS["open-pages"],
607
- highlightedLinks: [],
608
373
  links: [
609
374
  {
610
375
  name: "Logo",
611
376
  link: "/borettslag/",
612
377
  appKey: APP_KEYS["open-pages"],
613
- links: [],
614
- highlightedLinks: []
378
+ links: []
615
379
  },
616
380
  {
617
381
  name: "Beboer",
618
382
  link: "/borettslag/beboer/",
619
383
  appKey: APP_KEYS["open-pages"],
620
- links: [],
621
- highlightedLinks: []
384
+ links: []
622
385
  },
623
386
  {
624
387
  name: "Styre",
625
388
  link: "/borettslag/styre/",
626
389
  appKey: APP_KEYS["open-pages"],
627
- links: [],
628
- highlightedLinks: []
390
+ links: []
629
391
  },
630
392
  {
631
393
  name: "Utbygger",
632
394
  link: "/borettslag/utbygger/",
633
395
  appKey: APP_KEYS["open-pages"],
634
- links: [],
635
- highlightedLinks: []
396
+ links: []
636
397
  }
637
398
  ]
638
399
  };
@@ -640,7 +401,7 @@ const LINKS = [PRIVATE_LINKS, BUSINESS_LINKS, MDU_LINKS];
640
401
  const getActiveSubLink = (path, links) => {
641
402
  let activeLink = "";
642
403
  links.forEach((link) => {
643
- if (path === link.link && link.link.length > activeLink.length) {
404
+ if (path.startsWith(link.link) && link.link.length > activeLink.length) {
644
405
  activeLink = link.link;
645
406
  }
646
407
  });