@postnord/pn-marketweb-components 2.0.120 → 2.0.121
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/cjs/_commonjsHelpers-206db00d.js +37 -0
- package/cjs/convert-b219d02d.js +1826 -0
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-chart.cjs.entry.js +21919 -0
- package/cjs/pn-charts-card.cjs.entry.js +21 -0
- package/cjs/pn-find-price.cjs.entry.js +2 -1
- package/cjs/pn-find-service-and-price.cjs.entry.js +2 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-product-pricelist.cjs.entry.js +2 -1
- package/collection/collection-manifest.json +2 -0
- package/collection/components/charts/pn-chart/pn-chart-helper.js +52 -0
- package/collection/components/charts/pn-chart/pn-chart.css +26 -0
- package/collection/components/charts/pn-chart/pn-chart.js +94 -0
- package/collection/components/charts/pn-chart/pn-chart.stories.js +0 -0
- package/collection/components/charts/pn-chart/types.js +1 -0
- package/collection/components/charts/pn-charts-card/pn-charts-card.css +106 -0
- package/collection/components/charts/pn-charts-card/pn-charts-card.js +156 -0
- package/collection/components/charts/pn-charts-card/pn-charts-card.stories.js +75 -0
- package/custom-elements/index.d.ts +12 -0
- package/custom-elements/index.js +21963 -17
- package/esm/_commonjsHelpers-27f122dd.js +32 -0
- package/esm/{convert-ae809f9c.js → convert-f6377d13.js} +2 -16
- package/esm/loader.js +1 -1
- package/esm/pn-chart.entry.js +21915 -0
- package/esm/pn-charts-card.entry.js +17 -0
- package/esm/pn-find-price.entry.js +2 -1
- package/esm/pn-find-service-and-price.entry.js +2 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-product-pricelist.entry.js +2 -1
- package/esm-es5/_commonjsHelpers-27f122dd.js +1 -0
- package/esm-es5/{convert-ae809f9c.js → convert-f6377d13.js} +2 -2
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-chart.entry.js +16 -0
- package/esm-es5/pn-charts-card.entry.js +1 -0
- package/esm-es5/pn-find-price.entry.js +1 -1
- package/esm-es5/pn-find-service-and-price.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/package.json +3 -1
- package/pn-market-web-components/p-1751415f.entry.js +16 -0
- package/pn-market-web-components/p-35fcd76c.system.entry.js +1 -0
- package/pn-market-web-components/p-3c0d63fb.system.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-736e5b84.system.entry.js +1 -0
- package/pn-market-web-components/p-77557da8.entry.js +1 -0
- package/pn-market-web-components/p-814af281.js +1 -0
- package/pn-market-web-components/{p-0ea97ca0.system.js → p-8766fa86.system.js} +2 -2
- package/pn-market-web-components/p-8e4d292f.entry.js +1 -0
- package/pn-market-web-components/p-aab2e28f.entry.js +1 -0
- package/pn-market-web-components/p-b97cb315.system.entry.js +16 -0
- package/pn-market-web-components/p-bfe239ca.js +13 -0
- package/pn-market-web-components/p-d3a0ed9b.system.entry.js +1 -0
- package/pn-market-web-components/p-effbbf45.entry.js +1 -0
- package/pn-market-web-components/p-fe1f76a3.system.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/charts/pn-chart/pn-chart-helper.d.ts +46 -0
- package/types/components/charts/pn-chart/pn-chart.d.ts +17 -0
- package/types/components/charts/pn-chart/types.d.ts +7 -0
- package/types/components/charts/pn-charts-card/pn-charts-card.d.ts +12 -0
- package/types/components.d.ts +46 -0
- package/umd/pn-marketweb-init.js +41 -37
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/cjs/convert-362ef5e6.js +0 -1840
- package/pn-market-web-components/p-513e3c62.entry.js +0 -1
- package/pn-market-web-components/p-774b7a9f.entry.js +0 -1
- package/pn-market-web-components/p-8144bcbc.system.entry.js +0 -1
- package/pn-market-web-components/p-9adc3940.js +0 -13
- package/pn-market-web-components/p-b32a8507.entry.js +0 -1
- package/pn-market-web-components/p-bc22baf1.system.entry.js +0 -1
- package/pn-market-web-components/p-fecc53bb.system.entry.js +0 -1
package/umd/pn-marketweb-init.js
CHANGED
|
@@ -1,42 +1,46 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
(function () {
|
|
2
|
+
if (document.body.dataset['marketwebComponentsInit']) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
document.body.dataset['marketwebComponentsInit'] = true;
|
|
6
|
+
const checkParameters = function (originSrc) {
|
|
7
|
+
if (!originSrc.indexOf('?')) {
|
|
8
|
+
return;
|
|
4
9
|
}
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
const originalQueryString = originSrc.substring(originSrc.indexOf('?') + 1);
|
|
11
|
+
const originalParams = new URLSearchParams(originalQueryString);
|
|
12
|
+
const injectElements = originalParams
|
|
13
|
+
.get('inject')
|
|
14
|
+
.split(',')
|
|
15
|
+
.map(function (item) {
|
|
16
|
+
return item.trim();
|
|
17
|
+
});
|
|
18
|
+
injectElements.forEach(function (element) {
|
|
19
|
+
const s = document.createElement('script');
|
|
20
|
+
let injectSrc = originSrc.replace('pn-marketweb-init.js', 'pn-marketweb-inject.js');
|
|
21
|
+
injectSrc = injectSrc.substring(0, injectSrc.indexOf('?'));
|
|
22
|
+
const params = new URLSearchParams(originalQueryString);
|
|
23
|
+
params.delete('inject');
|
|
24
|
+
params.set('inject', element);
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
if (element.indexOf('header') !== -1) {
|
|
27
|
+
params.set('domlocation', 'top');
|
|
28
|
+
}
|
|
29
|
+
if (element.indexOf('footer') !== -1) {
|
|
30
|
+
params.set('domlocation', 'bottom');
|
|
31
|
+
}
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
s.setAttribute('src', `${injectSrc}?${params.toString()}`);
|
|
34
|
+
document.querySelector('head').appendChild(s);
|
|
35
|
+
});
|
|
36
|
+
};
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
const s = document.createElement('script');
|
|
39
|
+
const currentScriptTag = document.querySelector('script[src*="pn-marketweb-init.js"]');
|
|
40
|
+
const currentScriptSrc = currentScriptTag.getAttribute('src').replace('@latest', '@2.0.121');
|
|
41
|
+
checkParameters(currentScriptSrc);
|
|
42
|
+
const loaderScriptSrc = currentScriptSrc.replace('pn-marketweb-init.js', 'standalone-loader.js');
|
|
43
|
+
s.setAttribute('type', 'module');
|
|
44
|
+
s.setAttribute('src', loaderScriptSrc);
|
|
45
|
+
document.querySelector('head').appendChild(s);
|
|
42
46
|
})();
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
|
|
25
25
|
const s = document.createElement('script');
|
|
26
26
|
s.setAttribute('type', 'module');
|
|
27
|
-
s.setAttribute('src', 'https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.
|
|
27
|
+
s.setAttribute('src', 'https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.121/umd/standalone-loader-salesforce.js');
|
|
28
28
|
document.querySelector('head').appendChild(s);
|
|
29
29
|
|
|
30
30
|
const style = document.createElement('link');
|
|
31
31
|
style.setAttribute('rel', 'stylesheet');
|
|
32
|
-
style.setAttribute('href', 'https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.
|
|
32
|
+
style.setAttribute('href', 'https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.121/umd/pn-marketweb-wrongrembase.css');
|
|
33
33
|
document.querySelector('head').appendChild(style);
|
|
34
34
|
|
|
35
35
|
window['bindLanguageSelector'] = function () {
|