@carbon/ibmdotcom-web-components 2.48.0 → 2.50.0-rc.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/custom-elements.json +19 -10
- package/dist/dotcom-shell.js +7 -7
- package/dist/dotcom-shell.min.js +7 -7
- package/dist/ibmdotcom-web-components-dotcom-shell.js +7 -7
- package/dist/ibmdotcom-web-components-dotcom-shell.min.js +7 -7
- package/dist/{index-b819eefc.js → index-514478b8.js} +25 -87
- package/dist/{index-7073ec78.js → index-9732faeb.js} +10 -10
- package/dist/{left-nav-menu-0ddb90d7.js → left-nav-menu-2f5322ac.js} +7 -7
- package/dist/{left-nav-menu-e9108438.js → left-nav-menu-746ad81a.js} +7 -7
- package/dist/{left-nav-menu-category-heading-08d18557.js → left-nav-menu-category-heading-0e98a8c6.js} +7 -7
- package/dist/{left-nav-menu-category-heading-e2592d0d.js → left-nav-menu-category-heading-22762753.js} +7 -7
- package/dist/{left-nav-menu-item-a604b8db.js → left-nav-menu-item-252b6d0e.js} +7 -7
- package/dist/{left-nav-menu-item-dcdac62f.js → left-nav-menu-item-a08c2ca0.js} +7 -7
- package/dist/{left-nav-menu-section-3a22d6a2.js → left-nav-menu-section-40ae6c75.js} +7 -7
- package/dist/{left-nav-menu-section-763d7ada.js → left-nav-menu-section-a6f52f70.js} +7 -7
- package/dist/{left-nav-overlay-53202cdc.js → left-nav-overlay-6f936f5f.js} +7 -7
- package/dist/{left-nav-overlay-f079f5bd.js → left-nav-overlay-dfce57ab.js} +7 -7
- package/dist/{megamenu-category-group-916e8a0d.js → megamenu-category-group-b63f1f2d.js} +7 -7
- package/dist/{megamenu-category-group-copy-ee79d5dc.js → megamenu-category-group-copy-1e261d94.js} +7 -7
- package/dist/{megamenu-category-group-copy-af2a7de6.js → megamenu-category-group-copy-419d6ebe.js} +7 -7
- package/dist/{megamenu-category-group-7334a77c.js → megamenu-category-group-fe150fbc.js} +7 -7
- package/dist/{megamenu-category-heading-53b9be81.js → megamenu-category-heading-46c39931.js} +7 -7
- package/dist/{megamenu-category-heading-c102de05.js → megamenu-category-heading-9c2eccbf.js} +7 -7
- package/dist/{megamenu-category-link-800dad5a.js → megamenu-category-link-7fa288d5.js} +7 -7
- package/dist/{megamenu-category-link-defb1bd6.js → megamenu-category-link-986b3de3.js} +7 -7
- package/dist/{megamenu-category-link-group-1cce18e8.js → megamenu-category-link-group-1392a46f.js} +7 -7
- package/dist/{megamenu-category-link-group-d67bfe11.js → megamenu-category-link-group-f76ba2ac.js} +7 -7
- package/dist/{megamenu-left-navigation-a328f9e5.js → megamenu-left-navigation-55ebdf48.js} +7 -7
- package/dist/{megamenu-left-navigation-e98850ab.js → megamenu-left-navigation-eb44aef8.js} +7 -7
- package/dist/{megamenu-overlay-406f9d65.js → megamenu-overlay-5c4848c7.js} +7 -7
- package/dist/{megamenu-overlay-613423d7.js → megamenu-overlay-c4637474.js} +7 -7
- package/dist/{megamenu-tab-e2c7e080.js → megamenu-tab-b48fbb7c.js} +7 -7
- package/dist/{megamenu-tab-0b6918ac.js → megamenu-tab-c2772b72.js} +7 -7
- package/es/components/background-media/background-media.d.ts +1 -1
- package/es/components/background-media/background-media.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.d.ts +5 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js +17 -4
- package/es/components/lightbox-media-viewer/lightbox-media-viewer-body.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer.d.ts +3 -1
- package/es/components/lightbox-media-viewer/lightbox-media-viewer.js +13 -5
- package/es/components/lightbox-media-viewer/lightbox-media-viewer.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.d.ts +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.js +2 -2
- package/es/components/lightbox-media-viewer/lightbox-video-player-composite.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-container.d.ts +3 -3
- package/es/components/lightbox-media-viewer/lightbox-video-player-container.js +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player-container.js.map +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player.d.ts +1 -1
- package/es/components/lightbox-media-viewer/lightbox-video-player.js +16 -5
- package/es/components/lightbox-media-viewer/lightbox-video-player.js.map +1 -1
- package/es/components/masthead/masthead-cart.d.ts +0 -13
- package/es/components/masthead/masthead-cart.js +15 -72
- package/es/components/masthead/masthead-cart.js.map +1 -1
- package/es/components/notice-choice/notice-choice.d.ts +1 -0
- package/es/components/notice-choice/notice-choice.js +31 -10
- package/es/components/notice-choice/notice-choice.js.map +1 -1
- package/es/components/notice-choice/utils.js +2 -1
- package/es/components/notice-choice/utils.js.map +1 -1
- package/es/components-react/lightbox-media-viewer/lightbox-media-viewer.d.ts +1 -0
- package/package.json +8 -8
package/custom-elements.json
CHANGED
|
@@ -14737,6 +14737,10 @@
|
|
|
14737
14737
|
{
|
|
14738
14738
|
"name": "description",
|
|
14739
14739
|
"description": "The description content."
|
|
14740
|
+
},
|
|
14741
|
+
{
|
|
14742
|
+
"name": "cta",
|
|
14743
|
+
"description": "The CTA content."
|
|
14740
14744
|
}
|
|
14741
14745
|
],
|
|
14742
14746
|
"cssParts": [
|
|
@@ -14922,7 +14926,7 @@
|
|
|
14922
14926
|
},
|
|
14923
14927
|
{
|
|
14924
14928
|
"name": "embeddedVideos",
|
|
14925
|
-
"description": "The embedded Kaltura player element (that has
|
|
14929
|
+
"description": "The embedded Kaltura player element (that has APIs), keyed by the video ID.",
|
|
14926
14930
|
"type": "{ [videoId: string]: any; } | undefined"
|
|
14927
14931
|
},
|
|
14928
14932
|
{
|
|
@@ -15037,7 +15041,7 @@
|
|
|
15037
15041
|
"cssParts": [
|
|
15038
15042
|
{
|
|
15039
15043
|
"name": "video-player",
|
|
15040
|
-
"description": "The video player. Usage `c4d-video-player-composite::part(video-player)`"
|
|
15044
|
+
"description": "The video player. Usage `c4d-video-player-composite-v7::part(video-player)`"
|
|
15041
15045
|
}
|
|
15042
15046
|
]
|
|
15043
15047
|
},
|
|
@@ -15290,7 +15294,7 @@
|
|
|
15290
15294
|
"cssParts": [
|
|
15291
15295
|
{
|
|
15292
15296
|
"name": "video-player",
|
|
15293
|
-
"description": "The video player. Usage `c4d-video-player-composite::part(video-player)`"
|
|
15297
|
+
"description": "The video player. Usage `c4d-video-player-composite-v7::part(video-player)`"
|
|
15294
15298
|
}
|
|
15295
15299
|
]
|
|
15296
15300
|
},
|
|
@@ -17789,12 +17793,6 @@
|
|
|
17789
17793
|
"type": "{ lc: string; cc: string; }",
|
|
17790
17794
|
"default": "{\"lc\":\"en\",\"cc\":\"us\"}"
|
|
17791
17795
|
},
|
|
17792
|
-
{
|
|
17793
|
-
"name": "updateCart",
|
|
17794
|
-
"description": "Updates cart state",
|
|
17795
|
-
"type": "() => void",
|
|
17796
|
-
"default": "\"() => {\\n console.log('Checking for activeCartId...');\\n const hasCart = SAPCommerceAPI.hasActiveCart();\\n this.hasActiveCart = hasCart;\\n }\""
|
|
17797
|
-
},
|
|
17798
17796
|
{
|
|
17799
17797
|
"name": "styles",
|
|
17800
17798
|
"default": "\"styles\""
|
|
@@ -21022,6 +21020,11 @@
|
|
|
21022
21020
|
"type": "string",
|
|
21023
21021
|
"default": "\"\""
|
|
21024
21022
|
},
|
|
21023
|
+
{
|
|
21024
|
+
"name": "pref-type",
|
|
21025
|
+
"type": "string",
|
|
21026
|
+
"default": "\"\""
|
|
21027
|
+
},
|
|
21025
21028
|
{
|
|
21026
21029
|
"name": "default-values",
|
|
21027
21030
|
"description": "End properties for passed attributes.",
|
|
@@ -21107,6 +21110,12 @@
|
|
|
21107
21110
|
"type": "string",
|
|
21108
21111
|
"default": "\"\""
|
|
21109
21112
|
},
|
|
21113
|
+
{
|
|
21114
|
+
"name": "prefType",
|
|
21115
|
+
"attribute": "pref-type",
|
|
21116
|
+
"type": "string",
|
|
21117
|
+
"default": "\"\""
|
|
21118
|
+
},
|
|
21110
21119
|
{
|
|
21111
21120
|
"name": "defaultValues",
|
|
21112
21121
|
"attribute": "default-values",
|
|
@@ -21238,7 +21247,7 @@
|
|
|
21238
21247
|
{
|
|
21239
21248
|
"name": "pwsFieldsMap",
|
|
21240
21249
|
"type": "Map<string, string>",
|
|
21241
|
-
"default": "\"new Map<string, string>([\\n ['NC_HIDDEN_EMAIL', 'permission_email'],\\n ['NC_HIDDEN_PHONE', 'permission_phone'],\\n ['preventFormSubmission', 'preventFormSubmission'],\\n ['Q_CHINA_PIPL', 'Q_CHINA_PIPL'],\\n ['Q_COUNTRY_TRANSFER', 'Q_COUNTRY_TRANSFER'],\\n ['NC_HIDDEN_EMAIL_VALUE', 'NC_HIDDEN_EMAIL'],\\n ['NC_HIDDEN_PHONE_VALUE', 'NC_HIDDEN_PHONE'],\\n ['EMAIL_CU', 'EMAIL_CU'],\\n ['EMAIL_CC', 'EMAIL_CC'],\\n ['EMAIL_UC', 'EMAIL_UC'],\\n ['EMAIL_UU', 'EMAIL_UU'],\\n ['PHONE_CU', 'PHONE_CU'],\\n ['PHONE_CC', 'PHONE_CC'],\\n ['PHONE_UC', 'PHONE_UC'],\\n ['PHONE_UU', 'PHONE_UU'],\\n ['EMAIL_NOTICE_ONLY', 'EMAIL_NOTICE_ONLY'],\\n ['PHONE_NOTICE_ONLY', 'PHONE_NOTICE_ONLY'],\\n ['NC_HIDDEN_PHONE_NONE', 'NC_HIDDEN_PHONE_NONE'],\\n ])\""
|
|
21250
|
+
"default": "\"new Map<string, string>([\\n ['NC_HIDDEN_EMAIL', 'permission_email'],\\n ['NC_HIDDEN_PHONE', 'permission_phone'],\\n ['preventFormSubmission', 'preventFormSubmission'],\\n ['Q_CHINA_PIPL', 'Q_CHINA_PIPL'],\\n ['Q_COUNTRY_TRANSFER', 'Q_COUNTRY_TRANSFER'],\\n ['NC_HIDDEN_EMAIL_VALUE', 'NC_HIDDEN_EMAIL'],\\n ['NC_HIDDEN_PHONE_VALUE', 'NC_HIDDEN_PHONE'],\\n ['EMAIL_CU', 'EMAIL_CU'],\\n ['EMAIL_CC', 'EMAIL_CC'],\\n ['EMAIL_UC', 'EMAIL_UC'],\\n ['EMAIL_UU', 'EMAIL_UU'],\\n ['PHONE_CU', 'PHONE_CU'],\\n ['PHONE_CC', 'PHONE_CC'],\\n ['PHONE_UC', 'PHONE_UC'],\\n ['PHONE_UU', 'PHONE_UU'],\\n ['EMAIL_NOTICE_ONLY', 'EMAIL_NOTICE_ONLY'],\\n ['PHONE_NOTICE_ONLY', 'PHONE_NOTICE_ONLY'],\\n ['NC_HIDDEN_PHONE_NONE', 'NC_HIDDEN_PHONE_NONE'],\\n ['NC_PREF_TYPE', 'NC_PREF_TYPE'],\\n ])\""
|
|
21242
21251
|
},
|
|
21243
21252
|
{
|
|
21244
21253
|
"name": "styles",
|
package/dist/dotcom-shell.js
CHANGED
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -88,4 +88,4 @@
|
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
let process = { env: {} };
|
|
91
|
-
import './index-
|
|
91
|
+
import './index-514478b8.js';
|
package/dist/dotcom-shell.min.js
CHANGED
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import"./index-
|
|
90
|
+
import"./index-9732faeb.js";
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -88,4 +88,4 @@
|
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
let process = { env: {} };
|
|
91
|
-
import './index-
|
|
91
|
+
import './index-514478b8.js';
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import"./index-
|
|
90
|
+
import"./index-9732faeb.js";
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*
|
|
23
|
-
* lit-
|
|
23
|
+
* lit-html:
|
|
24
24
|
*
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*
|
|
29
|
-
* lit-
|
|
29
|
+
* lit-element:
|
|
30
30
|
*
|
|
31
31
|
* @license
|
|
32
|
-
* Copyright
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*
|
|
35
35
|
* @lit/reactive-element:
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* @carbon/motion:
|
|
42
42
|
*
|
|
43
43
|
* Copyright IBM Corp. 2018, 2023
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*
|
|
48
48
|
* @carbon/layout:
|
|
49
49
|
*
|
|
@@ -29504,13 +29504,8 @@ _decorate$_([carbonElement(`${prefix$B}-select-item`)], function (_initialize, _
|
|
|
29504
29504
|
};
|
|
29505
29505
|
}, s);
|
|
29506
29506
|
|
|
29507
|
-
|
|
29508
|
-
|
|
29509
|
-
*
|
|
29510
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
29511
|
-
* LICENSE file in the root directory of this source tree.
|
|
29512
|
-
*/
|
|
29513
|
-
var moderate02 = '240ms';
|
|
29507
|
+
//#region src/index.js
|
|
29508
|
+
const moderate02 = "240ms";
|
|
29514
29509
|
|
|
29515
29510
|
let _$w = t => t,
|
|
29516
29511
|
_t$x,
|
|
@@ -33015,7 +33010,7 @@ let C4DMegaMenuTopNavMenu = _decorate$s([carbonElement(`${c4dPrefix$s}-megamenu-
|
|
|
33015
33010
|
var _this$parentElement;
|
|
33016
33011
|
// Import needed subcomponents on first expansion
|
|
33017
33012
|
if (!((_this$parentElement = this.parentElement) !== null && _this$parentElement !== void 0 && _this$parentElement.importedMegamenu)) {
|
|
33018
|
-
await Promise.all([import('./megamenu-left-navigation-
|
|
33013
|
+
await Promise.all([import('./megamenu-left-navigation-55ebdf48.js'), import('./megamenu-category-link-7fa288d5.js'), import('./megamenu-category-link-group-1392a46f.js'), import('./megamenu-category-group-fe150fbc.js'), import('./megamenu-category-group-copy-419d6ebe.js'), import('./megamenu-category-heading-46c39931.js'), Promise.resolve().then(function () { return megamenuLinkWithIcon; }), import('./megamenu-overlay-5c4848c7.js'), import('./megamenu-tab-c2772b72.js'), Promise.resolve().then(function () { return megamenuTabs; })]);
|
|
33019
33014
|
this.parentElement.importedMegamenu = true;
|
|
33020
33015
|
}
|
|
33021
33016
|
|
|
@@ -36661,82 +36656,14 @@ _decorate$i([carbonElement(`${c4dPrefix$i}-masthead-cart`)], function (_initiali
|
|
|
36661
36656
|
|
|
36662
36657
|
function connectedCallback() {
|
|
36663
36658
|
_superPropGet$c(C4DMastheadCart, "connectedCallback", this, 3)([]);
|
|
36659
|
+
// Check the relevant cookie for whether the user has an active cart.
|
|
36660
|
+
this.hasActiveCart = SAPCommerceAPI.hasActiveCart();
|
|
36664
36661
|
|
|
36665
|
-
//
|
|
36666
|
-
this.updateCart();
|
|
36667
|
-
|
|
36668
|
-
// Fallback retry
|
|
36669
|
-
this.checkCartWithRetry();
|
|
36670
|
-
|
|
36671
|
-
// Listen for cross-tab updates
|
|
36672
|
-
window.addEventListener('storage', this.updateCart);
|
|
36673
|
-
|
|
36674
|
-
// Fetch locale
|
|
36662
|
+
// Fetch the locale for the page.
|
|
36675
36663
|
LocaleAPI.getLocale().then(locale => {
|
|
36676
36664
|
this.locale = locale;
|
|
36677
36665
|
});
|
|
36678
36666
|
}
|
|
36679
|
-
}, {
|
|
36680
|
-
kind: "method",
|
|
36681
|
-
key: "disconnectedCallback",
|
|
36682
|
-
value: function disconnectedCallback() {
|
|
36683
|
-
_superPropGet$c(C4DMastheadCart, "disconnectedCallback", this, 3)([]);
|
|
36684
|
-
window.removeEventListener('storage', this.updateCart);
|
|
36685
|
-
}
|
|
36686
|
-
|
|
36687
|
-
/**
|
|
36688
|
-
* Updates cart state
|
|
36689
|
-
*/
|
|
36690
|
-
}, {
|
|
36691
|
-
kind: "field",
|
|
36692
|
-
key: "updateCart",
|
|
36693
|
-
value() {
|
|
36694
|
-
return () => {
|
|
36695
|
-
console.log('Checking for activeCartId...');
|
|
36696
|
-
const hasCart = SAPCommerceAPI.hasActiveCart();
|
|
36697
|
-
this.hasActiveCart = hasCart;
|
|
36698
|
-
};
|
|
36699
|
-
}
|
|
36700
|
-
}, {
|
|
36701
|
-
kind: "method",
|
|
36702
|
-
key: "checkCartWithRetry",
|
|
36703
|
-
value:
|
|
36704
|
-
/**
|
|
36705
|
-
* Checks if the user has an active cart and retries a few times if the cart cookie is not available yet.
|
|
36706
|
-
*/
|
|
36707
|
-
function checkCartWithRetry(retries = 5, delay = 200) {
|
|
36708
|
-
const check = () => {
|
|
36709
|
-
const hasCart = SAPCommerceAPI.hasActiveCart();
|
|
36710
|
-
if (hasCart) {
|
|
36711
|
-
this.hasActiveCart = true;
|
|
36712
|
-
return;
|
|
36713
|
-
}
|
|
36714
|
-
if (retries > 0) {
|
|
36715
|
-
retries--;
|
|
36716
|
-
setTimeout(check, delay);
|
|
36717
|
-
}
|
|
36718
|
-
};
|
|
36719
|
-
check();
|
|
36720
|
-
}
|
|
36721
|
-
|
|
36722
|
-
/**
|
|
36723
|
-
* Filter the correct checkout URL based on locale and country code.
|
|
36724
|
-
*/
|
|
36725
|
-
}, {
|
|
36726
|
-
kind: "method",
|
|
36727
|
-
key: "handleURL",
|
|
36728
|
-
value: function handleURL(cc, lc) {
|
|
36729
|
-
switch (cc) {
|
|
36730
|
-
case 'uk':
|
|
36731
|
-
return `/store/en/gb/checkout`;
|
|
36732
|
-
case 'ae':
|
|
36733
|
-
return `/store/en/ae/checkout`;
|
|
36734
|
-
case 'sa':
|
|
36735
|
-
return `/store/en/sa/checkout`;
|
|
36736
|
-
default:
|
|
36737
|
-
return `/store/${lc}/${cc}/checkout`;
|
|
36738
|
-
}
|
|
36739
|
-
}
|
|
36740
36667
|
}, {
|
|
36741
36668
|
kind: "method",
|
|
36742
36669
|
key: "updated",
|
|
@@ -36760,6 +36687,17 @@ _decorate$i([carbonElement(`${c4dPrefix$i}-masthead-cart`)], function (_initiali
|
|
|
36760
36687
|
lc
|
|
36761
36688
|
}
|
|
36762
36689
|
} = this;
|
|
36690
|
+
let href;
|
|
36691
|
+
if (cc === 'uk') {
|
|
36692
|
+
href = '/store/en/gb/checkout';
|
|
36693
|
+
} else if (cc === 'ae') {
|
|
36694
|
+
href = '/store/en/ae/checkout';
|
|
36695
|
+
} else if (cc === 'sa') {
|
|
36696
|
+
href = '/store/en/sa/checkout';
|
|
36697
|
+
} else {
|
|
36698
|
+
href = `/store/${lc}/${cc}/checkout`;
|
|
36699
|
+
}
|
|
36700
|
+
console.log(href);
|
|
36763
36701
|
return x(_t$f || (_t$f = _$f`
|
|
36764
36702
|
<a
|
|
36765
36703
|
part="cart-link"
|
|
@@ -36768,7 +36706,7 @@ _decorate$i([carbonElement(`${c4dPrefix$i}-masthead-cart`)], function (_initiali
|
|
|
36768
36706
|
aria-label="${0}"
|
|
36769
36707
|
>${0}</a
|
|
36770
36708
|
>
|
|
36771
|
-
`),
|
|
36709
|
+
`), href, prefix$9, prefix$9, linkLabel, svgResultCarbonIcon$3());
|
|
36772
36710
|
}
|
|
36773
36711
|
}, {
|
|
36774
36712
|
kind: "get",
|
|
@@ -39147,7 +39085,7 @@ let C4DLeftNav = _decorate$b([carbonElement(`${c4dPrefix$b}-left-nav`)], functio
|
|
|
39147
39085
|
value() {
|
|
39148
39086
|
return async event => {
|
|
39149
39087
|
if (!this._importedSideNav) {
|
|
39150
|
-
await Promise.all([Promise.resolve().then(function () { return leftNavName; }), import('./left-nav-menu-
|
|
39088
|
+
await Promise.all([Promise.resolve().then(function () { return leftNavName; }), import('./left-nav-menu-746ad81a.js'), import('./left-nav-menu-section-a6f52f70.js'), import('./left-nav-menu-item-252b6d0e.js'), import('./left-nav-menu-category-heading-0e98a8c6.js'), import('./left-nav-overlay-dfce57ab.js')]);
|
|
39151
39089
|
this._importedSideNav = true;
|
|
39152
39090
|
}
|
|
39153
39091
|
this.expanded = event.detail.active;
|