@telia/teddy 0.7.45 → 0.7.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/navigation-menu/global-navigation/utils.cjs +22 -10
- package/dist/components/navigation-menu/global-navigation/utils.d.ts +20 -10
- package/dist/components/navigation-menu/global-navigation/utils.js +22 -10
- package/dist/components/shopping-cart/types.cjs +2 -1
- package/dist/components/shopping-cart/types.d.ts +2 -1
- package/dist/components/shopping-cart/types.js +2 -1
- package/dist/components/shopping-cart/utils.cjs +2 -3
- package/dist/components/shopping-cart/utils.js +2 -3
- package/package.json +1 -1
|
@@ -42,21 +42,27 @@ const MY_PAGE_LINKS = {
|
|
|
42
42
|
]
|
|
43
43
|
};
|
|
44
44
|
const MY_PAGE_RETAILER_LINKS = {
|
|
45
|
-
name: "
|
|
45
|
+
name: "Forhandler",
|
|
46
46
|
link: "/forhandler",
|
|
47
47
|
appKey: APP_KEYS["web-shop"],
|
|
48
48
|
links: [
|
|
49
49
|
{
|
|
50
|
-
name: "
|
|
51
|
-
link: "/forhandler/
|
|
50
|
+
name: "Ordreoversikt",
|
|
51
|
+
link: "/forhandler/ordreoversikt",
|
|
52
52
|
appKey: APP_KEYS["web-shop"],
|
|
53
|
-
icon: "
|
|
53
|
+
icon: "report"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
|
-
name: "
|
|
57
|
-
link: "/forhandler/
|
|
56
|
+
name: "Salgsrapporter",
|
|
57
|
+
link: "/forhandler/salgsrapporter/",
|
|
58
58
|
appKey: APP_KEYS["web-shop"],
|
|
59
|
-
icon: "
|
|
59
|
+
icon: "graph"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "Salgsstøtte",
|
|
63
|
+
link: "/forhandler/salgsstotte/",
|
|
64
|
+
appKey: APP_KEYS["web-shop"],
|
|
65
|
+
icon: "end-user"
|
|
60
66
|
},
|
|
61
67
|
{
|
|
62
68
|
name: "Administrasjon",
|
|
@@ -65,10 +71,16 @@ const MY_PAGE_RETAILER_LINKS = {
|
|
|
65
71
|
icon: "settings"
|
|
66
72
|
},
|
|
67
73
|
{
|
|
68
|
-
name: "
|
|
69
|
-
link: "/forhandler/
|
|
74
|
+
name: "Velg Butikk",
|
|
75
|
+
link: "/forhandler/butikker",
|
|
70
76
|
appKey: APP_KEYS["web-shop"],
|
|
71
|
-
icon: "
|
|
77
|
+
icon: "store"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "Start ny ordre",
|
|
81
|
+
link: "/forhandler/nyordre",
|
|
82
|
+
appKey: APP_KEYS["web-shop"],
|
|
83
|
+
icon: "new-group"
|
|
72
84
|
}
|
|
73
85
|
]
|
|
74
86
|
};
|
|
@@ -46,29 +46,39 @@ export declare const MY_PAGE_LINKS: {
|
|
|
46
46
|
}];
|
|
47
47
|
};
|
|
48
48
|
export declare const MY_PAGE_RETAILER_LINKS: {
|
|
49
|
-
readonly name: "
|
|
49
|
+
readonly name: "Forhandler";
|
|
50
50
|
readonly link: "/forhandler";
|
|
51
51
|
readonly appKey: "web-shop";
|
|
52
52
|
readonly links: [{
|
|
53
|
-
readonly name: "
|
|
54
|
-
readonly link: "/forhandler/
|
|
53
|
+
readonly name: "Ordreoversikt";
|
|
54
|
+
readonly link: "/forhandler/ordreoversikt";
|
|
55
55
|
readonly appKey: "web-shop";
|
|
56
|
-
readonly icon: "
|
|
56
|
+
readonly icon: "report";
|
|
57
57
|
}, {
|
|
58
|
-
readonly name: "
|
|
59
|
-
readonly link: "/forhandler/
|
|
58
|
+
readonly name: "Salgsrapporter";
|
|
59
|
+
readonly link: "/forhandler/salgsrapporter/";
|
|
60
60
|
readonly appKey: "web-shop";
|
|
61
|
-
readonly icon: "
|
|
61
|
+
readonly icon: "graph";
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "Salgsstøtte";
|
|
64
|
+
readonly link: "/forhandler/salgsstotte/";
|
|
65
|
+
readonly appKey: "web-shop";
|
|
66
|
+
readonly icon: "end-user";
|
|
62
67
|
}, {
|
|
63
68
|
readonly name: "Administrasjon";
|
|
64
69
|
readonly link: "/forhandler/administrasjon";
|
|
65
70
|
readonly appKey: "web-shop";
|
|
66
71
|
readonly icon: "settings";
|
|
67
72
|
}, {
|
|
68
|
-
readonly name: "
|
|
69
|
-
readonly link: "/forhandler/
|
|
73
|
+
readonly name: "Velg Butikk";
|
|
74
|
+
readonly link: "/forhandler/butikker";
|
|
70
75
|
readonly appKey: "web-shop";
|
|
71
|
-
readonly icon: "
|
|
76
|
+
readonly icon: "store";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "Start ny ordre";
|
|
79
|
+
readonly link: "/forhandler/nyordre";
|
|
80
|
+
readonly appKey: "web-shop";
|
|
81
|
+
readonly icon: "new-group";
|
|
72
82
|
}];
|
|
73
83
|
};
|
|
74
84
|
export declare const MY_BUSINESS_LINKS: {
|
|
@@ -40,21 +40,27 @@ const MY_PAGE_LINKS = {
|
|
|
40
40
|
]
|
|
41
41
|
};
|
|
42
42
|
const MY_PAGE_RETAILER_LINKS = {
|
|
43
|
-
name: "
|
|
43
|
+
name: "Forhandler",
|
|
44
44
|
link: "/forhandler",
|
|
45
45
|
appKey: APP_KEYS["web-shop"],
|
|
46
46
|
links: [
|
|
47
47
|
{
|
|
48
|
-
name: "
|
|
49
|
-
link: "/forhandler/
|
|
48
|
+
name: "Ordreoversikt",
|
|
49
|
+
link: "/forhandler/ordreoversikt",
|
|
50
50
|
appKey: APP_KEYS["web-shop"],
|
|
51
|
-
icon: "
|
|
51
|
+
icon: "report"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
name: "
|
|
55
|
-
link: "/forhandler/
|
|
54
|
+
name: "Salgsrapporter",
|
|
55
|
+
link: "/forhandler/salgsrapporter/",
|
|
56
56
|
appKey: APP_KEYS["web-shop"],
|
|
57
|
-
icon: "
|
|
57
|
+
icon: "graph"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "Salgsstøtte",
|
|
61
|
+
link: "/forhandler/salgsstotte/",
|
|
62
|
+
appKey: APP_KEYS["web-shop"],
|
|
63
|
+
icon: "end-user"
|
|
58
64
|
},
|
|
59
65
|
{
|
|
60
66
|
name: "Administrasjon",
|
|
@@ -63,10 +69,16 @@ const MY_PAGE_RETAILER_LINKS = {
|
|
|
63
69
|
icon: "settings"
|
|
64
70
|
},
|
|
65
71
|
{
|
|
66
|
-
name: "
|
|
67
|
-
link: "/forhandler/
|
|
72
|
+
name: "Velg Butikk",
|
|
73
|
+
link: "/forhandler/butikker",
|
|
68
74
|
appKey: APP_KEYS["web-shop"],
|
|
69
|
-
icon: "
|
|
75
|
+
icon: "store"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "Start ny ordre",
|
|
79
|
+
link: "/forhandler/nyordre",
|
|
80
|
+
appKey: APP_KEYS["web-shop"],
|
|
81
|
+
icon: "new-group"
|
|
70
82
|
}
|
|
71
83
|
]
|
|
72
84
|
};
|
|
@@ -25,6 +25,7 @@ const CART_ITEM_TYPE = {
|
|
|
25
25
|
RESWITCH_PLACEHOLDER: "RESWITCH_PLACEHOLDER",
|
|
26
26
|
RESWITCH_EXISTING_HARDWARE: "RESWITCH_EXISTING_HARDWARE",
|
|
27
27
|
PREPAID_REFILL: "PREPAID_REFILL",
|
|
28
|
-
TRANSFER: "TRANSFER"
|
|
28
|
+
TRANSFER: "TRANSFER",
|
|
29
|
+
MOBILE_REFUND: "MOBILE_REFUND"
|
|
29
30
|
};
|
|
30
31
|
exports.CART_ITEM_TYPE = CART_ITEM_TYPE;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CartType = 'SUBSCRIPTION' | 'SUBSCRIPTION_DRAFT' | 'HANDSET' | 'HANDSET-PREOWNED' | 'MODEM' | 'TABLET' | 'WEARABLE' | 'CONNECTED_DEVICE' | 'ACCESSORY' | 'DELIVERY' | 'WEBDEAL' | 'SIM' | 'ESIM' | 'NEW_NUMBER' | 'BREAKAGE_FEE' | 'SWITCH_BREAKAGE_FEE' | 'SWITCH_REMAINING_COST' | 'IN_SHOP_SERVICE' | 'SPECIALPRODUCT' | 'SERVICE' | 'VOUCHER' | 'RESWITCH_PLACEHOLDER' | 'RESWITCH_EXISTING_HARDWARE' | 'PREPAID_REFILL' | 'TRANSFER';
|
|
1
|
+
export type CartType = 'SUBSCRIPTION' | 'SUBSCRIPTION_DRAFT' | 'HANDSET' | 'HANDSET-PREOWNED' | 'MODEM' | 'TABLET' | 'WEARABLE' | 'CONNECTED_DEVICE' | 'ACCESSORY' | 'DELIVERY' | 'WEBDEAL' | 'SIM' | 'ESIM' | 'NEW_NUMBER' | 'BREAKAGE_FEE' | 'SWITCH_BREAKAGE_FEE' | 'SWITCH_REMAINING_COST' | 'IN_SHOP_SERVICE' | 'SPECIALPRODUCT' | 'SERVICE' | 'VOUCHER' | 'RESWITCH_PLACEHOLDER' | 'RESWITCH_EXISTING_HARDWARE' | 'PREPAID_REFILL' | 'TRANSFER' | 'MOBILE_REFUND';
|
|
2
2
|
export declare const CART_ITEM_TYPE: {
|
|
3
3
|
readonly SUBSCRIPTION: "SUBSCRIPTION";
|
|
4
4
|
readonly SUBSCRIPTION_DRAFT: "SUBSCRIPTION_DRAFT";
|
|
@@ -25,6 +25,7 @@ export declare const CART_ITEM_TYPE: {
|
|
|
25
25
|
readonly RESWITCH_EXISTING_HARDWARE: "RESWITCH_EXISTING_HARDWARE";
|
|
26
26
|
readonly PREPAID_REFILL: "PREPAID_REFILL";
|
|
27
27
|
readonly TRANSFER: "TRANSFER";
|
|
28
|
+
readonly MOBILE_REFUND: "MOBILE_REFUND";
|
|
28
29
|
};
|
|
29
30
|
export type BadgeVariant = 'attention' | 'special' | 'neutral' | 'information' | 'success' | 'warning' | 'error';
|
|
30
31
|
export interface CartDiscountType {
|
|
@@ -23,7 +23,8 @@ const CART_ITEM_TYPE = {
|
|
|
23
23
|
RESWITCH_PLACEHOLDER: "RESWITCH_PLACEHOLDER",
|
|
24
24
|
RESWITCH_EXISTING_HARDWARE: "RESWITCH_EXISTING_HARDWARE",
|
|
25
25
|
PREPAID_REFILL: "PREPAID_REFILL",
|
|
26
|
-
TRANSFER: "TRANSFER"
|
|
26
|
+
TRANSFER: "TRANSFER",
|
|
27
|
+
MOBILE_REFUND: "MOBILE_REFUND"
|
|
27
28
|
};
|
|
28
29
|
export {
|
|
29
30
|
CART_ITEM_TYPE
|
|
@@ -30,9 +30,7 @@ const getPrice = (formatPriceFn, price, discountValueUpfront, discountValueMonth
|
|
|
30
30
|
return formatPriceFn(price.firstInvoice * quantity);
|
|
31
31
|
}
|
|
32
32
|
if (typeof price.upfront === "number") {
|
|
33
|
-
|
|
34
|
-
const totalUpfront = (discountedUpfront > 0 ? discountedUpfront : 0) * quantity;
|
|
35
|
-
return formatPriceFn(totalUpfront);
|
|
33
|
+
return formatPriceFn((price.upfront - (discountValueUpfront || 0)) * quantity);
|
|
36
34
|
}
|
|
37
35
|
return null;
|
|
38
36
|
};
|
|
@@ -51,6 +49,7 @@ const getCartItemPriority = (item) => {
|
|
|
51
49
|
NEW_NUMBER: 90,
|
|
52
50
|
SERVICE: 100,
|
|
53
51
|
ACCESSORY: 110,
|
|
52
|
+
MOBILE_REFUND: 120,
|
|
54
53
|
VOUCHER: 130
|
|
55
54
|
};
|
|
56
55
|
return cartItemTypes[item.type] ?? 999;
|
|
@@ -28,9 +28,7 @@ const getPrice = (formatPriceFn, price, discountValueUpfront, discountValueMonth
|
|
|
28
28
|
return formatPriceFn(price.firstInvoice * quantity);
|
|
29
29
|
}
|
|
30
30
|
if (typeof price.upfront === "number") {
|
|
31
|
-
|
|
32
|
-
const totalUpfront = (discountedUpfront > 0 ? discountedUpfront : 0) * quantity;
|
|
33
|
-
return formatPriceFn(totalUpfront);
|
|
31
|
+
return formatPriceFn((price.upfront - (discountValueUpfront || 0)) * quantity);
|
|
34
32
|
}
|
|
35
33
|
return null;
|
|
36
34
|
};
|
|
@@ -49,6 +47,7 @@ const getCartItemPriority = (item) => {
|
|
|
49
47
|
NEW_NUMBER: 90,
|
|
50
48
|
SERVICE: 100,
|
|
51
49
|
ACCESSORY: 110,
|
|
50
|
+
MOBILE_REFUND: 120,
|
|
52
51
|
VOUCHER: 130
|
|
53
52
|
};
|
|
54
53
|
return cartItemTypes[item.type] ?? 999;
|