@ptcwebops/ptcw-design 3.7.2 → 3.7.5
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/cjs/{icon-asset_18.cjs.entry.js → icon-asset_19.cjs.entry.js} +508 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-breadcrumb_2.cjs.entry.js +1 -1
- package/dist/cjs/ptc-dynamic-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-icon-minimize.cjs.entry.js +24 -1
- package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/components/ptc-dynamic-card/ptc-dynamic-card.css +2 -2
- package/dist/collection/components/ptc-icon-minimize/ptc-icon-minimize.js +24 -1
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +4 -0
- package/dist/collection/components/ptc-mobile-select/ptc-mobile-select.js +1 -1
- package/dist/collection/components/ptc-modal/ptc-modal.css +14 -2
- package/dist/collection/components/ptc-modal/ptc-modal.js +20 -0
- package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +4 -0
- package/dist/custom-elements/index.js +32 -7
- package/dist/esm/{icon-asset_18.entry.js → icon-asset_19.entry.js} +556 -50
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-breadcrumb_2.entry.js +1 -1
- package/dist/esm/ptc-dynamic-card.entry.js +1 -1
- package/dist/esm/ptc-icon-minimize.entry.js +24 -1
- package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/{p-81270479.entry.js → p-10f6e277.entry.js} +1 -1
- package/dist/ptcw-design/p-132c7242.entry.js +1 -0
- package/dist/ptcw-design/p-45766e13.entry.js +1 -0
- package/dist/ptcw-design/{p-c42d9009.entry.js → p-6cee9fca.entry.js} +1 -1
- package/dist/ptcw-design/{p-95e1c016.entry.js → p-7293bba4.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-icon-minimize/ptc-icon-minimize.d.ts +1 -0
- package/dist/types/components/ptc-modal/ptc-modal.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/ptc-mobile-select.cjs.entry.js +0 -511
- package/dist/esm/ptc-mobile-select.entry.js +0 -507
- package/dist/ptcw-design/p-2f976047.entry.js +0 -1
- package/dist/ptcw-design/p-34e13f1c.entry.js +0 -1
- package/dist/ptcw-design/p-84b50500.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, g as getAssetPath, h, H as Host, a as getElement, c as createEvent } from './index-3309fc22.js';
|
|
1
|
+
import { r as registerInstance, g as getAssetPath, h as h$1, H as Host, a as getElement, c as createEvent } from './index-3309fc22.js';
|
|
2
2
|
import { g as getSeoTagType, s as seoSlotReset } from './utils-2f4905df.js';
|
|
3
3
|
|
|
4
4
|
const iconAssetCss = ".svg-inline--fa.sc-icon-asset,svg.sc-icon-asset:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa.sc-icon-asset{display:inline-block;font-size:inherit;height:1em;vertical-align:-.125em}.svg-inline--fa.fa-lg.sc-icon-asset{vertical-align:-.225em}.svg-inline--fa.fa-w-1.sc-icon-asset{width:.0625em}.svg-inline--fa.fa-w-2.sc-icon-asset{width:.125em}.svg-inline--fa.fa-w-3.sc-icon-asset{width:.1875em}.svg-inline--fa.fa-w-4.sc-icon-asset{width:.25em}.svg-inline--fa.fa-w-5.sc-icon-asset{width:.3125em}.svg-inline--fa.fa-w-6.sc-icon-asset{width:.375em}.svg-inline--fa.fa-w-7.sc-icon-asset{width:.4375em}.svg-inline--fa.fa-w-8.sc-icon-asset{width:.5em}.svg-inline--fa.fa-w-9.sc-icon-asset{width:.5625em}.svg-inline--fa.fa-w-10.sc-icon-asset{width:.625em}.svg-inline--fa.fa-w-11.sc-icon-asset{width:.6875em}.svg-inline--fa.fa-w-12.sc-icon-asset{width:.75em}.svg-inline--fa.fa-w-13.sc-icon-asset{width:.8125em}.svg-inline--fa.fa-w-14.sc-icon-asset{width:.875em}.svg-inline--fa.fa-w-15.sc-icon-asset{width:.9375em}.svg-inline--fa.fa-w-16.sc-icon-asset{width:1em}.svg-inline--fa.fa-w-17.sc-icon-asset{width:1.0625em}.svg-inline--fa.fa-w-18.sc-icon-asset{width:1.125em}.svg-inline--fa.fa-w-19.sc-icon-asset{width:1.1875em}.svg-inline--fa.fa-w-20.sc-icon-asset{width:1.25em}.svg-inline--fa.fa-pull-left.sc-icon-asset{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right.sc-icon-asset{margin-left:.3em;width:auto}.svg-inline--fa.fa-border.sc-icon-asset{height:1.5em}.svg-inline--fa.fa-li.sc-icon-asset{width:2em}.svg-inline--fa.fa-fw.sc-icon-asset{width:1.25em}.fa-layers.sc-icon-asset svg.svg-inline--fa.sc-icon-asset{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers.sc-icon-asset{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers.sc-icon-asset svg.svg-inline--fa.sc-icon-asset{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter.sc-icon-asset,.fa-layers-text.sc-icon-asset{display:inline-block;position:absolute;text-align:center}.fa-layers-text.sc-icon-asset{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter.sc-icon-asset{background-color:#ff253a;border-radius:1em;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right.sc-icon-asset{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left.sc-icon-asset{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right.sc-icon-asset{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left.sc-icon-asset{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg.sc-icon-asset{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs.sc-icon-asset{font-size:.75em}.fa-sm.sc-icon-asset{font-size:.875em}.fa-1x.sc-icon-asset{font-size:1em}.fa-2x.sc-icon-asset{font-size:2em}.fa-3x.sc-icon-asset{font-size:3em}.fa-4x.sc-icon-asset{font-size:4em}.fa-5x.sc-icon-asset{font-size:5em}.fa-6x.sc-icon-asset{font-size:6em}.fa-7x.sc-icon-asset{font-size:7em}.fa-8x.sc-icon-asset{font-size:8em}.fa-9x.sc-icon-asset{font-size:9em}.fa-10x.sc-icon-asset{font-size:10em}.fa-fw.sc-icon-asset{text-align:center;width:1.25em}.fa-ul.sc-icon-asset{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul.sc-icon-asset>li.sc-icon-asset{position:relative}.fa-li.sc-icon-asset{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border.sc-icon-asset{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left.sc-icon-asset{float:left}.fa-pull-right.sc-icon-asset{float:right}.fa.fa-pull-left.sc-icon-asset,.fab.fa-pull-left.sc-icon-asset,.fal.fa-pull-left.sc-icon-asset,.far.fa-pull-left.sc-icon-asset,.fas.fa-pull-left.sc-icon-asset{margin-right:.3em}.fa.fa-pull-right.sc-icon-asset,.fab.fa-pull-right.sc-icon-asset,.fal.fa-pull-right.sc-icon-asset,.far.fa-pull-right.sc-icon-asset,.fas.fa-pull-right.sc-icon-asset{margin-left:.3em}.fa-spin.sc-icon-asset{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse.sc-icon-asset{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical.sc-icon-asset{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both.sc-icon-asset,.fa-flip-horizontal.fa-flip-vertical.sc-icon-asset,.fa-flip-vertical.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\"}.fa-flip-both.sc-icon-asset,.fa-flip-horizontal.fa-flip-vertical.sc-icon-asset{-webkit-transform:scale(-1);transform:scale(-1)}.sc-icon-asset:root .fa-flip-both.sc-icon-asset,.sc-icon-asset:root .fa-flip-horizontal.sc-icon-asset,.sc-icon-asset:root .fa-flip-vertical.sc-icon-asset,.sc-icon-asset:root .fa-rotate-90.sc-icon-asset,.sc-icon-asset:root .fa-rotate-180.sc-icon-asset,.sc-icon-asset:root .fa-rotate-270.sc-icon-asset{-webkit-filter:none;filter:none}.fa-stack.sc-icon-asset{display:inline-block;height:2em;position:relative;width:2.5em}.fa-stack-1x.sc-icon-asset,.fa-stack-2x.sc-icon-asset{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x.sc-icon-asset{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x.sc-icon-asset{height:2em;width:2.5em}.fa-inverse.sc-icon-asset{color:#fff}.sr-only.sc-icon-asset{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable.sc-icon-asset:active,.sr-only-focusable.sc-icon-asset:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.svg-inline--fa.sc-icon-asset .fa-primary.sc-icon-asset{fill:var(--fa-primary-color,currentColor);opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa.sc-icon-asset .fa-secondary.sc-icon-asset{fill:var(--fa-secondary-color,currentColor)}.svg-inline--fa.sc-icon-asset .fa-secondary.sc-icon-asset,.svg-inline--fa.fa-swap-opacity.sc-icon-asset .fa-primary.sc-icon-asset{opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity.sc-icon-asset .fa-secondary.sc-icon-asset{opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa.sc-icon-asset mask.sc-icon-asset .fa-primary.sc-icon-asset,.svg-inline--fa.sc-icon-asset mask.sc-icon-asset .fa-secondary.sc-icon-asset{fill:#000}.fad.fa-inverse.sc-icon-asset{color:#fff}h1.sc-icon-asset,h2.sc-icon-asset,h3.sc-icon-asset,h4.sc-icon-asset,h5.sc-icon-asset,h6.sc-icon-asset,p.sc-icon-asset,ul.sc-icon-asset,li.sc-icon-asset,ptc-subnav.sc-icon-asset,ptc-tab-list.sc-icon-asset,ptc-link.sc-icon-asset{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1.sc-icon-asset,h2.sc-icon-asset,h3.sc-icon-asset,h4.sc-icon-asset,h5.sc-icon-asset,h6.sc-icon-asset,p.sc-icon-asset,ul.sc-icon-asset,li.sc-icon-asset,ptc-subnav.sc-icon-asset,ptc-tab-list.sc-icon-asset,ptc-link.sc-icon-asset{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}icon-asset.sc-icon-asset{vertical-align:middle}svg.sc-icon-asset{transition:all var(--ptc-transition-medium) var(--ptc-ease-inout)}svg.micro.sc-icon-asset{width:calc(var(--ptc-font-size-x-small) / 2);height:calc(var(--ptc-font-size-x-small) / 2)}svg.xxx-small.sc-icon-asset{width:var(--ptc-font-size-xxx-small);height:var(--ptc-font-size-xxx-small)}svg.xx-small.sc-icon-asset{width:var(--ptc-font-size-xx-small);height:var(--ptc-font-size-xx-small)}svg.x-small.sc-icon-asset{width:var(--ptc-font-size-x-small);height:var(--ptc-font-size-x-small)}svg.small.sc-icon-asset{width:var(--ptc-font-size-small);height:var(--ptc-font-size-small)}svg.medium.sc-icon-asset{width:var(--ptc-font-size-medium);height:var(--ptc-font-size-medium)}svg.large.sc-icon-asset{width:var(--ptc-font-size-large);height:var(--ptc-font-size-large)}svg.x-large.sc-icon-asset{width:var(--ptc-font-size-x-large);height:var(--ptc-font-size-x-large)}svg.xx-large.sc-icon-asset{width:var(--ptc-font-size-xx-large);height:var(--ptc-font-size-xx-large)}svg.xxx-large.sc-icon-asset{width:var(--ptc-font-size-xxx-large);height:var(--ptc-font-size-xxx-large)}svg.xxxx-large.sc-icon-asset{width:var(--ptc-font-size-xxxx-large);height:var(--ptc-font-size-xxxx-large)}svg.white.sc-icon-asset{fill:var(--color-white)}svg.white.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.white.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.white.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-white)}svg.black.sc-icon-asset{fill:var(--color-black)}svg.black.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.black.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.black.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-black)}svg.ptc-green.sc-icon-asset{fill:var(--color-green-07)}svg.ptc-green.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.ptc-green.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.ptc-green.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-green-07)}svg.gray.sc-icon-asset{fill:var(--color-gray-06)}svg.gray.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.gray.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.gray.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-gray-06)}svg.light-gray.sc-icon-asset{fill:var(--color-gray-05)}svg.light-gray.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.light-gray.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.light-gray.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-gray-05)}svg.primary-gray.sc-icon-asset{fill:var(--color-gray-10)}svg.inherit.sc-icon-asset{fill:inherit}svg.inherit.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.inherit.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.inherit.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:inherit}";
|
|
@@ -22,16 +22,16 @@ const IconAsset = class {
|
|
|
22
22
|
render() {
|
|
23
23
|
const classMap = this.getCssClassMap();
|
|
24
24
|
if (this.type == 'brands') {
|
|
25
|
-
return (h(Host, null, this.injectedStyle && h("style", null, this.injectedStyle), h("svg", { class: classMap }, h("use", { href: `${this.brandSprite}#${this.name}` }))));
|
|
25
|
+
return (h$1(Host, null, this.injectedStyle && h$1("style", null, this.injectedStyle), h$1("svg", { class: classMap }, h$1("use", { href: `${this.brandSprite}#${this.name}` }))));
|
|
26
26
|
}
|
|
27
27
|
else if (this.type == 'solid') {
|
|
28
|
-
return (h(Host, null, this.injectedStyle && h("style", null, this.injectedStyle), h("svg", { class: classMap }, h("use", { href: `${this.solidSprite}#${this.name}` }))));
|
|
28
|
+
return (h$1(Host, null, this.injectedStyle && h$1("style", null, this.injectedStyle), h$1("svg", { class: classMap }, h$1("use", { href: `${this.solidSprite}#${this.name}` }))));
|
|
29
29
|
}
|
|
30
30
|
else if (this.type == 'ptc') {
|
|
31
|
-
return (h(Host, null, this.injectedStyle && h("style", null, this.injectedStyle), h("svg", { class: classMap }, h("use", { href: `${this.ptcSprite}#${this.name}` }))));
|
|
31
|
+
return (h$1(Host, null, this.injectedStyle && h$1("style", null, this.injectedStyle), h$1("svg", { class: classMap }, h$1("use", { href: `${this.ptcSprite}#${this.name}` }))));
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
return (h(Host, null, this.injectedStyle && h("style", null, this.injectedStyle), h("svg", { class: classMap }, h("use", { href: `${this.regularSprite}#${this.name}` }))));
|
|
34
|
+
return (h$1(Host, null, this.injectedStyle && h$1("style", null, this.injectedStyle), h$1("svg", { class: classMap }, h$1("use", { href: `${this.regularSprite}#${this.name}` }))));
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
getCssClassMap() {
|
|
@@ -67,7 +67,7 @@ const MaxWidthContainer = class {
|
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
69
|
const classMap = this.getCssClassMap();
|
|
70
|
-
return (h(Host, { class: classMap }, this.styles && h("style", null, this.styles), h("slot", null)));
|
|
70
|
+
return (h$1(Host, { class: classMap }, this.styles && h$1("style", null, this.styles), h$1("slot", null)));
|
|
71
71
|
}
|
|
72
72
|
getCssClassMap() {
|
|
73
73
|
return {
|
|
@@ -129,14 +129,14 @@ const PtcButton = class {
|
|
|
129
129
|
if (this.el == firstChild) {
|
|
130
130
|
this.el.innerHTML = '';
|
|
131
131
|
}
|
|
132
|
-
return (h(Host, null, this.styles && h("style", null, this.styles), h(TagType, Object.assign({ class: classMap, onClick: this.clickEventHandler.bind(this) }, (!!this.linkHref ? { href: this.linkHref } : {}), (!this.linkHref ? { type: this.type } : {}), (!!this.target && !!this.linkHref ? { target: this.target } : {}), (!!this.rel && !!this.linkHref ? { rel: this.rel } : {}), (!!this.linkHref ? { title: this.linkTitle ? this.linkTitle : this.linkHref } : {}), (!!this.tabNav ? { tabindex: -1 } : { tabindex: 0 }), { title: this.buttonTitle }, (this.ariaLabel !== '' ? { ariaLabel: this.ariaLabel } : {})), h("span", { innerHTML: html }, h("slot", { name: "slot-before-text" }), h("slot", { name: "slot-after-text" })))));
|
|
132
|
+
return (h$1(Host, null, this.styles && h$1("style", null, this.styles), h$1(TagType, Object.assign({ class: classMap, onClick: this.clickEventHandler.bind(this) }, (!!this.linkHref ? { href: this.linkHref } : {}), (!this.linkHref ? { type: this.type } : {}), (!!this.target && !!this.linkHref ? { target: this.target } : {}), (!!this.rel && !!this.linkHref ? { rel: this.rel } : {}), (!!this.linkHref ? { title: this.linkTitle ? this.linkTitle : this.linkHref } : {}), (!!this.tabNav ? { tabindex: -1 } : { tabindex: 0 }), { title: this.buttonTitle }, (this.ariaLabel !== '' ? { ariaLabel: this.ariaLabel } : {})), h$1("span", { innerHTML: html }, h$1("slot", { name: "slot-before-text" }), h$1("slot", { name: "slot-after-text" })))));
|
|
133
133
|
}
|
|
134
134
|
standardRender() {
|
|
135
135
|
const classMap = this.getCssClassMap();
|
|
136
136
|
const Tag = !!this.linkHref ? 'a' : 'button';
|
|
137
|
-
return (h(Host, null, this.styles && h("style", null, this.styles), h(Tag, Object.assign({ class: classMap, onClick: this.clickEventHandler.bind(this) }, (!!this.linkHref ? { href: this.linkHref } : {}), (!this.linkHref ? { type: this.type } : {}), (!!this.target && !!this.linkHref ? { target: this.target } : {}), (!!this.rel && !!this.linkHref ? { rel: this.rel } : {}), (!!this.linkHref ? { title: this.linkTitle ? this.linkTitle : this.linkHref } : {}), (!!this.tabNav ? { tabindex: -1 } : { tabindex: 0 }), { title: this.buttonTitle }, (this.ariaLabel !== '' ? { ariaLabel: this.ariaLabel } : {})), this.iconAnimation == 'reveal-down' ?
|
|
138
|
-
h("span", null, h("div", { class: "content" }, h("slot", null)), h("div", { class: "icon-wrapper" }, h("div", { class: "icon" }, h("slot", { name: "slot-after-text" })))) :
|
|
139
|
-
h("span", null, h("slot", { name: "slot-before-text" }), h("slot", null), h("slot", { name: "slot-after-text" })))));
|
|
137
|
+
return (h$1(Host, null, this.styles && h$1("style", null, this.styles), h$1(Tag, Object.assign({ class: classMap, onClick: this.clickEventHandler.bind(this) }, (!!this.linkHref ? { href: this.linkHref } : {}), (!this.linkHref ? { type: this.type } : {}), (!!this.target && !!this.linkHref ? { target: this.target } : {}), (!!this.rel && !!this.linkHref ? { rel: this.rel } : {}), (!!this.linkHref ? { title: this.linkTitle ? this.linkTitle : this.linkHref } : {}), (!!this.tabNav ? { tabindex: -1 } : { tabindex: 0 }), { title: this.buttonTitle }, (this.ariaLabel !== '' ? { ariaLabel: this.ariaLabel } : {})), this.iconAnimation == 'reveal-down' ?
|
|
138
|
+
h$1("span", null, h$1("div", { class: "content" }, h$1("slot", null)), h$1("div", { class: "icon-wrapper" }, h$1("div", { class: "icon" }, h$1("slot", { name: "slot-after-text" })))) :
|
|
139
|
+
h$1("span", null, h$1("slot", { name: "slot-before-text" }), h$1("slot", null), h$1("slot", { name: "slot-after-text" })))));
|
|
140
140
|
}
|
|
141
141
|
render() {
|
|
142
142
|
if (this.seoCompatibilityMode) {
|
|
@@ -195,16 +195,16 @@ const PtcCard = class {
|
|
|
195
195
|
if (this.titleLineCutOff && this.titleLineCutOff > 0) {
|
|
196
196
|
cutOffTitleClass = ' clamp-title';
|
|
197
197
|
}
|
|
198
|
-
return (h(Host, { class: {
|
|
198
|
+
return (h$1(Host, { class: {
|
|
199
199
|
[this.cardType]: !!this.cardType,
|
|
200
200
|
'creo-card-wrap': this.isCreoCard, // Add the cardType class conditionally
|
|
201
|
-
} }, this.styles && h("style", null, this.styles), h("slot", { name: "seo-content" }), h("div", { class: "card-border", part: "border-wrapper", style: { overflow: this.cardOverflow } }, h(Tag, Object.assign({ class: classMap, part: "card-layout" }, (!!this.cardHref ? { href: this.cardHref } : {}), (!!this.target && !!this.cardHref ? { target: this.target } : {}), (!!this.rel && !!this.cardHref ? { rel: this.rel } : {}), (!!this.ribbonText ? { rel: this.ribbonText } : {})), this.hasImage || this.hasLottie || this.hasVideo ? (h("div", { class: "card-media", part: "media-wrapper" }, this.getMediaSlot ? h("slot", { name: this.getMediaSlot() }) : null)) : null, (!!this.ribbonText && this.cardType == 'resource-center-card') || (!!this.ribbonText && this.cardType == 'related-card') ? (h("div", { class: "ribbon-text" }, `${this.ribbonText}`)) : null, h("div", { class: "card-body", part: "body-wrapper" }, !!this.cardDate && (this.cardType === 'listing-card' || this.cardType === 'listing-card-horizontal') ? (h("div", { class: "card-date-text" }, !!this.eventType ? (h("span", { class: "small" }, `${this.cardDate}`, "\u00A0\u00A0\u00A0|\u00A0\u00A0\u00A0", `${this.eventType}`)) : (h("span", { class: "small" }, `${this.cardDate}`)))) : null, this.cardType === 'case-studies-card'
|
|
202
|
-
? Object.assign({}, (!!this.cardLogo ? (h("div", { class: "card-logo-container" }, h("ptc-picture", { alt: "", "object-fit": "contain", src: this.cardLogo, height: "40" }))) : (h("div", { class: "card-logo-none" })))) : null, h("slot", { name: "slot-before-heading" }), !!this.heading
|
|
201
|
+
} }, this.styles && h$1("style", null, this.styles), h$1("slot", { name: "seo-content" }), h$1("div", { class: "card-border", part: "border-wrapper", style: { overflow: this.cardOverflow } }, h$1(Tag, Object.assign({ class: classMap, part: "card-layout" }, (!!this.cardHref ? { href: this.cardHref } : {}), (!!this.target && !!this.cardHref ? { target: this.target } : {}), (!!this.rel && !!this.cardHref ? { rel: this.rel } : {}), (!!this.ribbonText ? { rel: this.ribbonText } : {})), this.hasImage || this.hasLottie || this.hasVideo ? (h$1("div", { class: "card-media", part: "media-wrapper" }, this.getMediaSlot ? h$1("slot", { name: this.getMediaSlot() }) : null)) : null, (!!this.ribbonText && this.cardType == 'resource-center-card') || (!!this.ribbonText && this.cardType == 'related-card') ? (h$1("div", { class: "ribbon-text" }, `${this.ribbonText}`)) : null, h$1("div", { class: "card-body", part: "body-wrapper" }, !!this.cardDate && (this.cardType === 'listing-card' || this.cardType === 'listing-card-horizontal') ? (h$1("div", { class: "card-date-text" }, !!this.eventType ? (h$1("span", { class: "small" }, `${this.cardDate}`, "\u00A0\u00A0\u00A0|\u00A0\u00A0\u00A0", `${this.eventType}`)) : (h$1("span", { class: "small" }, `${this.cardDate}`)))) : null, this.cardType === 'case-studies-card'
|
|
202
|
+
? Object.assign({}, (!!this.cardLogo ? (h$1("div", { class: "card-logo-container" }, h$1("ptc-picture", { alt: "", "object-fit": "contain", src: this.cardLogo, height: "40" }))) : (h$1("div", { class: "card-logo-none" })))) : null, h$1("slot", { name: "slot-before-heading" }), !!this.heading
|
|
203
203
|
? [
|
|
204
|
-
this.cardType === 'listing-card' ? (h("h3", { class: `ptc-h3 ${this.headingTransform}${cutOffTitleClass}`, part: "card-heading" }, h("ptc-tooltip", { "text-display": "inline", "text-lines": this.maxLines, "max-length": this.maxChars, description: this.heading, position: "bottom", width: "full-width", theme: "standard", "hide-on-mobile": "true", "no-overflow": "true" }))) : this.cardType === 'hightlight-card' ? (h("h2", { class: `${this.headingTransform}${cutOffTitleClass}`, style: cutOff, part: "card-heading" }, this.heading)) : (h("h3", { class: `ptc-h3 ${this.headingTransform}${cutOffTitleClass}`, style: cutOff, part: "card-heading" }, this.heading)),
|
|
205
|
-
h("slot", { name: "slot-after-heading" }),
|
|
204
|
+
this.cardType === 'listing-card' ? (h$1("h3", { class: `ptc-h3 ${this.headingTransform}${cutOffTitleClass}`, part: "card-heading" }, h$1("ptc-tooltip", { "text-display": "inline", "text-lines": this.maxLines, "max-length": this.maxChars, description: this.heading, position: "bottom", width: "full-width", theme: "standard", "hide-on-mobile": "true", "no-overflow": "true" }))) : this.cardType === 'hightlight-card' ? (h$1("h2", { class: `${this.headingTransform}${cutOffTitleClass}`, style: cutOff, part: "card-heading" }, this.heading)) : (h$1("h3", { class: `ptc-h3 ${this.headingTransform}${cutOffTitleClass}`, style: cutOff, part: "card-heading" }, this.heading)),
|
|
205
|
+
h$1("slot", { name: "slot-after-heading" }),
|
|
206
206
|
]
|
|
207
|
-
: null, h("slot", { name: "slot-description" }), !!this.cardDate && this.cardType !== 'listing-card' && this.cardType !== 'listing-card-horizontal' && this.cardType !== 'hightlight-card' ? (h("ptc-date", { "date-string": `${this.cardDate}`, "date-styles": "span{color:#40434a;font-size:var(--ptc-font-size-x-small);margin-top:var(--ptc-element-spacing-06);display:inline-block;}" })) : null, !!this.cardDate && this.cardType === 'hightlight-card' ? (h("ptc-date", { style: { marginBottom: '20px' }, "format-options": '{"year":"numeric","month":"long","day":"numeric"}', "date-string": `${this.cardDate}`, "date-styles": "span{color: #a3a3a3;font-family: Raleway;font-size: 1rem !important;font-stretch: normal;font-style: normal;font-weight: 400;letter-spacing: normal;line-height: 1.03;padding-top: 15px;text-align: left;}", country: this.country })) : null)))));
|
|
207
|
+
: null, h$1("slot", { name: "slot-description" }), !!this.cardDate && this.cardType !== 'listing-card' && this.cardType !== 'listing-card-horizontal' && this.cardType !== 'hightlight-card' ? (h$1("ptc-date", { "date-string": `${this.cardDate}`, "date-styles": "span{color:#40434a;font-size:var(--ptc-font-size-x-small);margin-top:var(--ptc-element-spacing-06);display:inline-block;}" })) : null, !!this.cardDate && this.cardType === 'hightlight-card' ? (h$1("ptc-date", { style: { marginBottom: '20px' }, "format-options": '{"year":"numeric","month":"long","day":"numeric"}', "date-string": `${this.cardDate}`, "date-styles": "span{color: #a3a3a3;font-family: Raleway;font-size: 1rem !important;font-stretch: normal;font-style: normal;font-weight: 400;letter-spacing: normal;line-height: 1.03;padding-top: 15px;text-align: left;}", country: this.country })) : null)))));
|
|
208
208
|
}
|
|
209
209
|
getCssClassMap() {
|
|
210
210
|
return {
|
|
@@ -257,7 +257,7 @@ const PtcDate = class {
|
|
|
257
257
|
render() {
|
|
258
258
|
// const newDate = new Date(this.year, this.month, this.day);
|
|
259
259
|
const classMap = this.getCssClassMap();
|
|
260
|
-
return (h(Host, { class: classMap }, this.dateStyles && h("style", null, this.dateStyles), h("span", { part: "part-ptc-date" }, this.getDate().toLocaleDateString(this.country, this.getOptions()))));
|
|
260
|
+
return (h$1(Host, { class: classMap }, this.dateStyles && h$1("style", null, this.dateStyles), h$1("span", { part: "part-ptc-date" }, this.getDate().toLocaleDateString(this.country, this.getOptions()))));
|
|
261
261
|
}
|
|
262
262
|
getCssClassMap() {
|
|
263
263
|
return {
|
|
@@ -328,7 +328,7 @@ const PtcImg = class {
|
|
|
328
328
|
}
|
|
329
329
|
render() {
|
|
330
330
|
const classMap = this.getCssClassMap();
|
|
331
|
-
return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap, "data-xs": `${this.imgUrl}`, "data-sm": `${this.imgUrl}`, "data-md": `${this.imgUrl}`, "data-lg": `${this.imgUrl}` }, this.imageType == 'smart-bg' ? h("slot", null) : null)));
|
|
331
|
+
return (h$1(Host, null, this.styles && h$1("style", null, this.styles), h$1("div", { class: classMap, "data-xs": `${this.imgUrl}`, "data-sm": `${this.imgUrl}`, "data-md": `${this.imgUrl}`, "data-lg": `${this.imgUrl}` }, this.imageType == 'smart-bg' ? h$1("slot", null) : null)));
|
|
332
332
|
}
|
|
333
333
|
componentDidLoad() {
|
|
334
334
|
this.addIntersectionObserver();
|
|
@@ -453,11 +453,11 @@ const PtcLink = class {
|
|
|
453
453
|
if (this.el == firstChild) {
|
|
454
454
|
this.el.innerHTML = '';
|
|
455
455
|
}
|
|
456
|
-
return (h(Host, null, this.styles && h("style", null, this.styles), h(TagType, { class: classMap, innerHTML: html, href: this.href, target: this.external ? '_blank' : this.target, title: this.linkTitle }, h("slot", null))));
|
|
456
|
+
return (h$1(Host, null, this.styles && h$1("style", null, this.styles), h$1(TagType, { class: classMap, innerHTML: html, href: this.href, target: this.external ? '_blank' : this.target, title: this.linkTitle }, h$1("slot", null))));
|
|
457
457
|
}
|
|
458
458
|
standardRender() {
|
|
459
459
|
const classMap = this.getCssClassMap();
|
|
460
|
-
return (h(Host, null, this.styles && h("style", null, this.styles), h("a", { class: classMap, href: this.href, target: this.external ? '_blank' : this.target, title: this.linkTitle }, h("slot", null))));
|
|
460
|
+
return (h$1(Host, null, this.styles && h$1("style", null, this.styles), h$1("a", { class: classMap, href: this.href, target: this.external ? '_blank' : this.target, title: this.linkTitle }, h$1("slot", null))));
|
|
461
461
|
}
|
|
462
462
|
// render() {
|
|
463
463
|
// const classMap = this.getCssClassMap();
|
|
@@ -512,7 +512,511 @@ const PtcLink = class {
|
|
|
512
512
|
};
|
|
513
513
|
PtcLink.style = ptcLinkCss;
|
|
514
514
|
|
|
515
|
-
|
|
515
|
+
/*
|
|
516
|
+
* mobile-select v1.4.0
|
|
517
|
+
* Homepage: https://github.com/onlyhom/mobile-select
|
|
518
|
+
* Released under the MIT License.
|
|
519
|
+
* (c) 2017-present
|
|
520
|
+
*/
|
|
521
|
+
var S = Object.defineProperty;
|
|
522
|
+
var D = (g, t, e) => t in g ? S(g, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : g[t] = e;
|
|
523
|
+
var h = (g, t, e) => (D(g, typeof t != "symbol" ? t + "" : t, e), e);
|
|
524
|
+
function w() {
|
|
525
|
+
return !navigator.userAgent.toLowerCase().match(/ipad|iphone os|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/);
|
|
526
|
+
}
|
|
527
|
+
const l = class {
|
|
528
|
+
constructor(t) {
|
|
529
|
+
h(this, "mobileSelect");
|
|
530
|
+
h(this, "trigger");
|
|
531
|
+
h(this, "wheelList");
|
|
532
|
+
h(this, "sliderList");
|
|
533
|
+
h(this, "wheelsContain");
|
|
534
|
+
h(this, "panel");
|
|
535
|
+
h(this, "ensureBtn");
|
|
536
|
+
h(this, "cancelBtn");
|
|
537
|
+
h(this, "grayLayer");
|
|
538
|
+
h(this, "popUp");
|
|
539
|
+
h(this, "initPosition");
|
|
540
|
+
h(this, "initColWidth");
|
|
541
|
+
h(this, "wheelsData");
|
|
542
|
+
h(this, "displayJson");
|
|
543
|
+
h(this, "curValue");
|
|
544
|
+
h(this, "curIndexArr");
|
|
545
|
+
h(this, "isCascade");
|
|
546
|
+
h(this, "isJsonType");
|
|
547
|
+
h(this, "startY");
|
|
548
|
+
h(this, "moveEndY");
|
|
549
|
+
h(this, "moveY");
|
|
550
|
+
h(this, "preMoveY");
|
|
551
|
+
h(this, "offsetY");
|
|
552
|
+
h(this, "offsetSum");
|
|
553
|
+
h(this, "oversizeBorder");
|
|
554
|
+
h(this, "enableClickStatus");
|
|
555
|
+
h(this, "optionHeight");
|
|
556
|
+
h(this, "curDistance");
|
|
557
|
+
h(this, "cascadeJsonData");
|
|
558
|
+
h(this, "eventHandleMap");
|
|
559
|
+
h(this, "initDeepCount");
|
|
560
|
+
h(this, "config");
|
|
561
|
+
!l.checkRequiredConfig(t) || (this.config = Object.assign({}, l.defaultConfig, t), this.wheelsData = t.wheels, this.isJsonType = !1, this.cascadeJsonData = [], this.displayJson = [], this.curValue = [], this.curIndexArr = [], this.isCascade = !1, this.offsetY = 0, this.offsetSum = 0, this.curDistance = [], this.enableClickStatus = !1, this.optionHeight = 0, this.initPosition = t.position || [], this.initColWidth = t.colWidth || [], this.init());
|
|
562
|
+
}
|
|
563
|
+
init() {
|
|
564
|
+
if (!this.checkTriggerAvailable())
|
|
565
|
+
return;
|
|
566
|
+
const { config: t } = this;
|
|
567
|
+
if (this.isJsonType = l.checkDataType(this.wheelsData), this.renderComponent(this.wheelsData), this.wheelList = this.mobileSelect.getElementsByClassName("ms-wheel"), this.sliderList = this.mobileSelect.getElementsByClassName("ms-select-container"), this.panel = this.mobileSelect.querySelector(".ms-panel"), this.wheelsContain = this.mobileSelect.querySelector(".ms-wheels"), this.ensureBtn = this.mobileSelect.querySelector(".ms-ensure"), this.cancelBtn = this.mobileSelect.querySelector(".ms-cancel"), this.grayLayer = this.mobileSelect.querySelector(".ms-gray-layer"), this.popUp = this.mobileSelect.querySelector(".ms-content"), this.optionHeight = this.mobileSelect.querySelector("li").offsetHeight, t.initValue && this.setTriggerInnerText(t.initValue), this.setStyle(t), this.isCascade = this.checkCascade(), this.isCascade && this.initCascade(), t.initValue && (this.initPosition = this.getPositionByInitValue()), this.initPosition.length < this.sliderList.length) {
|
|
568
|
+
const e = this.sliderList.length - this.initPosition.length;
|
|
569
|
+
for (let i = 0; i < e; i++)
|
|
570
|
+
this.initPosition.push(0);
|
|
571
|
+
}
|
|
572
|
+
this.isCascade ? this.initPosition.forEach((e, i) => {
|
|
573
|
+
this.checkRange(i, this.initPosition);
|
|
574
|
+
}) : this.setCurDistance(this.initPosition), this.eventHandleMap = {
|
|
575
|
+
cancelBtn: {
|
|
576
|
+
event: "click",
|
|
577
|
+
fn: () => {
|
|
578
|
+
var e, i, s, n;
|
|
579
|
+
this.hide(), (i = (e = this.config).cancel) == null || i.call(e, this.curIndexArr, this.curValue, this), (n = (s = this.config).onCancel) == null || n.call(s, this.curValue, this.curIndexArr, this);
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
ensureBtn: {
|
|
583
|
+
event: "click",
|
|
584
|
+
fn: () => {
|
|
585
|
+
var e, i, s, n;
|
|
586
|
+
this.hide(), this.optionHeight || (this.optionHeight = this.mobileSelect.querySelector("li").offsetHeight), this.setTriggerInnerText(this.getConnectedString()), this.curIndexArr = this.getIndexArr(), this.curValue = this.getCurValue(), (i = (e = this.config).callback) == null || i.call(e, this.curIndexArr, this.curValue, this), (n = (s = this.config).onChange) == null || n.call(s, this.curValue, this.curIndexArr, this);
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
trigger: {
|
|
590
|
+
event: "click",
|
|
591
|
+
fn: () => {
|
|
592
|
+
this.show();
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
grayLayer: {
|
|
596
|
+
event: "click",
|
|
597
|
+
fn: () => this.hide()
|
|
598
|
+
},
|
|
599
|
+
popUp: {
|
|
600
|
+
event: "click",
|
|
601
|
+
fn: (e) => e.stopPropagation()
|
|
602
|
+
},
|
|
603
|
+
panel: {
|
|
604
|
+
event: ["touchstart", "touchend", "touchmove"],
|
|
605
|
+
fn: (e) => this.touch(e)
|
|
606
|
+
}
|
|
607
|
+
}, w() && (this.eventHandleMap.panel.event = ["mousedown", "mousemove", "mouseup"]), this.registerEvents("add"), this.fixRowStyle(), t.autoFocus && this.show();
|
|
608
|
+
}
|
|
609
|
+
static checkDataType(t) {
|
|
610
|
+
var e, i;
|
|
611
|
+
return typeof ((i = (e = t[0]) == null ? void 0 : e.data) == null ? void 0 : i[0]) == "object";
|
|
612
|
+
}
|
|
613
|
+
static checkRequiredConfig(t) {
|
|
614
|
+
const e = l.REQUIRED_PARAMS;
|
|
615
|
+
if (!t) {
|
|
616
|
+
const i = e.map((s) => `'${s}'`);
|
|
617
|
+
return l.log("error", `missing required param ${i.join(" and ")}.`), !1;
|
|
618
|
+
}
|
|
619
|
+
for (let i = 0; i < e.length; i++) {
|
|
620
|
+
const s = e[i];
|
|
621
|
+
if (!t[s])
|
|
622
|
+
return l.log("error", `missing required param '${s}'.`), !1;
|
|
623
|
+
}
|
|
624
|
+
return !0;
|
|
625
|
+
}
|
|
626
|
+
static log(t, e) {
|
|
627
|
+
var i;
|
|
628
|
+
(i = console[t]) == null || i.call(console, `[mobile-select]: ${e}`);
|
|
629
|
+
}
|
|
630
|
+
checkTriggerAvailable() {
|
|
631
|
+
const { config: t } = this;
|
|
632
|
+
return this.trigger = t.trigger instanceof HTMLElement ? t.trigger : document.querySelector(t.trigger), this.trigger ? !0 : (l.log("error", "trigger HTMLElement does not found on your document."), !1);
|
|
633
|
+
}
|
|
634
|
+
getPositionByInitValue() {
|
|
635
|
+
var n;
|
|
636
|
+
const { keyMap: t, connector: e, initValue: i } = this.config, s = (i == null ? void 0 : i.split(e)) || [];
|
|
637
|
+
if (this.isJsonType) {
|
|
638
|
+
let o = (n = this.wheelsData[0]) == null ? void 0 : n.data;
|
|
639
|
+
return s.reduce((r, c) => {
|
|
640
|
+
var u;
|
|
641
|
+
const a = o == null ? void 0 : o.findIndex((d) => d[t.value] == c);
|
|
642
|
+
return r.push(a < 0 ? 0 : a), o = (u = o[a]) == null ? void 0 : u[t.childs], r;
|
|
643
|
+
}, []);
|
|
644
|
+
}
|
|
645
|
+
return s.reduce((o, r, c) => {
|
|
646
|
+
var u, d;
|
|
647
|
+
const a = (d = (u = this.wheelsData[c]) == null ? void 0 : u.data) == null ? void 0 : d.findIndex((f) => f == r);
|
|
648
|
+
return o.push(a < 0 ? 0 : a), o;
|
|
649
|
+
}, []);
|
|
650
|
+
}
|
|
651
|
+
getConnectedString() {
|
|
652
|
+
let t = "";
|
|
653
|
+
for (let e = 0; e < this.wheelList.length; e++)
|
|
654
|
+
e == this.wheelList.length - 1 ? t += this.getInnerText(e) : t += this.getInnerText(e) + this.config.connector;
|
|
655
|
+
return t;
|
|
656
|
+
}
|
|
657
|
+
setTriggerInnerText(t) {
|
|
658
|
+
this.config.triggerDisplayValue && (this.trigger.textContent = t);
|
|
659
|
+
}
|
|
660
|
+
setValue(t) {
|
|
661
|
+
if (!t || !t.length)
|
|
662
|
+
return;
|
|
663
|
+
if (this.isJsonType && typeof t[0] != "object" || !this.isJsonType && typeof t[0] == "object") {
|
|
664
|
+
l.log("error", `The setValue() input format should be same with getValue(), like: ${JSON.stringify(this.getValue())}`);
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
const { keyMap: e } = this.config;
|
|
668
|
+
t.forEach((i, s) => {
|
|
669
|
+
var r;
|
|
670
|
+
const n = this.isCascade ? this.displayJson[s] : (r = this.wheelsData[s]) == null ? void 0 : r.data, o = n == null ? void 0 : n.findIndex((c) => this.isJsonType ? i[e.id] == c[e.id] || i[e.value] == c[e.value] : i == c);
|
|
671
|
+
this.locatePosition(s, o);
|
|
672
|
+
}), this.setTriggerInnerText(this.getConnectedString());
|
|
673
|
+
}
|
|
674
|
+
setTitle(t) {
|
|
675
|
+
this.mobileSelect.querySelector(".ms-title").innerHTML = t;
|
|
676
|
+
}
|
|
677
|
+
setStyle(t) {
|
|
678
|
+
if (t.ensureBtnColor && (this.ensureBtn.style.color = t.ensureBtnColor), t.cancelBtnColor && (this.cancelBtn.style.color = t.cancelBtnColor), t.titleColor) {
|
|
679
|
+
const e = this.mobileSelect.querySelector(".ms-title");
|
|
680
|
+
e.style.color = t.titleColor;
|
|
681
|
+
}
|
|
682
|
+
if (t.textColor && (this.panel = this.mobileSelect.querySelector(".ms-panel"), this.panel.style.color = t.textColor), t.titleBgColor) {
|
|
683
|
+
const e = this.mobileSelect.querySelector(".ms-btn-bar");
|
|
684
|
+
e.style.backgroundColor = t.titleBgColor;
|
|
685
|
+
}
|
|
686
|
+
if (t.bgColor) {
|
|
687
|
+
this.panel = this.mobileSelect.querySelector(".ms-panel");
|
|
688
|
+
const e = this.mobileSelect.querySelector(".ms-shadow-mask");
|
|
689
|
+
this.panel.style.backgroundColor = t.bgColor, e.style.background = "linear-gradient(to bottom, " + t.bgColor + ", rgba(255, 255, 255, 0), " + t.bgColor + ")";
|
|
690
|
+
}
|
|
691
|
+
if (typeof t.maskOpacity == "number") {
|
|
692
|
+
const e = this.mobileSelect.querySelector(".ms-gray-layer");
|
|
693
|
+
e.style.background = "rgba(0, 0, 0, " + t.maskOpacity + ")";
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
show() {
|
|
697
|
+
var t, e, i;
|
|
698
|
+
this.mobileSelect.classList.add("ms-show"), (t = document.querySelector("body")) == null || t.classList.add("ms-show"), typeof this.config.onShow == "function" && ((i = (e = this.config).onShow) == null || i.call(e, this.curValue, this.curIndexArr, this));
|
|
699
|
+
}
|
|
700
|
+
hide() {
|
|
701
|
+
var t, e, i;
|
|
702
|
+
this.mobileSelect.classList.remove("ms-show"), (t = document.querySelector("body")) == null || t.classList.remove("ms-show"), typeof this.config.onHide == "function" && ((i = (e = this.config).onHide) == null || i.call(e, this.curValue, this.curIndexArr, this));
|
|
703
|
+
}
|
|
704
|
+
registerEvents(t) {
|
|
705
|
+
for (const [e, i] of Object.entries(this.eventHandleMap))
|
|
706
|
+
typeof i.event == "string" ? this[e][`${t}EventListener`](i.event, i.fn, { passive: !1 }) : i.event.forEach((s) => {
|
|
707
|
+
this[e][`${t}EventListener`](s, i.fn, { passive: !1 });
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
destroy() {
|
|
711
|
+
var t, e;
|
|
712
|
+
this.registerEvents("remove"), (e = (t = this.mobileSelect) == null ? void 0 : t.parentNode) == null || e.removeChild(this.mobileSelect);
|
|
713
|
+
}
|
|
714
|
+
getOptionsHtmlStr(t) {
|
|
715
|
+
const { keyMap: e } = this.config;
|
|
716
|
+
let i = "";
|
|
717
|
+
if (this.isJsonType)
|
|
718
|
+
for (let s = 0; s < t.length; s++) {
|
|
719
|
+
const n = t[s][e.id], o = t[s][e.value];
|
|
720
|
+
i += `<li data-id="${n}">${o}</li>`;
|
|
721
|
+
}
|
|
722
|
+
else
|
|
723
|
+
for (let s = 0; s < t.length; s++)
|
|
724
|
+
i += "<li>" + t[s] + "</li>";
|
|
725
|
+
return i;
|
|
726
|
+
}
|
|
727
|
+
renderComponent(t) {
|
|
728
|
+
this.mobileSelect = document.createElement("div"), this.mobileSelect.className = "ms-mobile-select", this.mobileSelect.innerHTML = `<div class="ms-gray-layer"></div>
|
|
729
|
+
<div class="ms-content">
|
|
730
|
+
<div class="ms-btn-bar">
|
|
731
|
+
<div class="ms-fix-width">
|
|
732
|
+
<div class="ms-cancel">${this.config.cancelBtnText}</div>
|
|
733
|
+
<div class="ms-title">${this.config.title || ""}</div>
|
|
734
|
+
<div class="ms-ensure">${this.config.ensureBtnText}</div>
|
|
735
|
+
</div>
|
|
736
|
+
</div>
|
|
737
|
+
<div class="ms-panel">
|
|
738
|
+
<div class="ms-fix-width">
|
|
739
|
+
<div class="ms-wheels"></div>
|
|
740
|
+
<div class="ms-select-line"></div>
|
|
741
|
+
<div class="ms-shadow-mask"></div>
|
|
742
|
+
</div>
|
|
743
|
+
</div>`, document.body.appendChild(this.mobileSelect);
|
|
744
|
+
let e = "";
|
|
745
|
+
for (let i = 0; i < t.length; i++)
|
|
746
|
+
e += `<div class="ms-wheel" data-index="${i}"><ul class="ms-select-container">`, e += this.getOptionsHtmlStr(t[i].data), e += "</ul></div>";
|
|
747
|
+
this.mobileSelect.querySelector(".ms-wheels").innerHTML = e;
|
|
748
|
+
}
|
|
749
|
+
reRenderWheels() {
|
|
750
|
+
const t = this.wheelList.length - this.displayJson.length;
|
|
751
|
+
if (t > 0)
|
|
752
|
+
for (let e = 0; e < t; e++)
|
|
753
|
+
this.wheelsContain.removeChild(this.wheelList[this.wheelList.length - 1]);
|
|
754
|
+
for (let e = 0; e < this.displayJson.length; e++)
|
|
755
|
+
if (this.wheelList[e])
|
|
756
|
+
this.sliderList[e].innerHTML = this.getOptionsHtmlStr(this.displayJson[e]);
|
|
757
|
+
else {
|
|
758
|
+
const i = document.createElement("div");
|
|
759
|
+
i.className = "ms-wheel", i.innerHTML = `<ul class="ms-select-container">${this.getOptionsHtmlStr(this.displayJson[e])}</ul>`, i.setAttribute("data-index", e.toString()), this.wheelsContain.appendChild(i);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
checkCascade() {
|
|
763
|
+
var e;
|
|
764
|
+
const { keyMap: t } = this.config;
|
|
765
|
+
if (this.isJsonType) {
|
|
766
|
+
const i = this.wheelsData[0].data;
|
|
767
|
+
for (let s = 0; s < i.length; s++)
|
|
768
|
+
if (t.childs in i[s] && ((e = i[s][t.childs]) == null ? void 0 : e.length) > 0)
|
|
769
|
+
return this.cascadeJsonData = this.wheelsData[0].data, !0;
|
|
770
|
+
}
|
|
771
|
+
return !1;
|
|
772
|
+
}
|
|
773
|
+
initCascade() {
|
|
774
|
+
this.displayJson.push(this.cascadeJsonData), this.initPosition.length > 0 ? (this.initDeepCount = 0, this.initCheckArrDeep(this.cascadeJsonData[this.initPosition[0]])) : this.checkArrDeep(this.cascadeJsonData[0]), this.reRenderWheels();
|
|
775
|
+
}
|
|
776
|
+
initCheckArrDeep(t) {
|
|
777
|
+
if (t) {
|
|
778
|
+
const { keyMap: e } = this.config;
|
|
779
|
+
if (e.childs in t && t[e.childs].length > 0) {
|
|
780
|
+
this.displayJson.push(t[e.childs]), this.initDeepCount++;
|
|
781
|
+
const i = t[e.childs][this.initPosition[this.initDeepCount]];
|
|
782
|
+
i ? this.initCheckArrDeep(i) : this.checkArrDeep(t[e.childs][0]);
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
checkArrDeep(t) {
|
|
787
|
+
if (!t)
|
|
788
|
+
return;
|
|
789
|
+
const { keyMap: e } = this.config;
|
|
790
|
+
e.childs in t && t[e.childs].length > 0 && (this.displayJson.push(t[e.childs]), this.checkArrDeep(t[e.childs][0]));
|
|
791
|
+
}
|
|
792
|
+
checkRange(t, e) {
|
|
793
|
+
var o;
|
|
794
|
+
const i = this.displayJson.length - 1 - t, { keyMap: s } = this.config;
|
|
795
|
+
for (let r = 0; r < i; r++)
|
|
796
|
+
this.displayJson.pop();
|
|
797
|
+
let n;
|
|
798
|
+
for (let r = 0; r <= t; r++)
|
|
799
|
+
n = r == 0 ? this.cascadeJsonData[e[0]] : (o = n == null ? void 0 : n[s.childs]) == null ? void 0 : o[e[r]];
|
|
800
|
+
this.checkArrDeep(n), this.reRenderWheels(), this.fixRowStyle(), this.setCurDistance(this.resetPosition(t, e));
|
|
801
|
+
}
|
|
802
|
+
resetPosition(t, e) {
|
|
803
|
+
const i = [...e];
|
|
804
|
+
let s;
|
|
805
|
+
if (this.sliderList.length > e.length) {
|
|
806
|
+
s = this.sliderList.length - e.length;
|
|
807
|
+
for (let n = 0; n < s; n++)
|
|
808
|
+
i.push(0);
|
|
809
|
+
} else if (this.sliderList.length < e.length) {
|
|
810
|
+
s = e.length - this.sliderList.length;
|
|
811
|
+
for (let n = 0; n < s; n++)
|
|
812
|
+
i.pop();
|
|
813
|
+
}
|
|
814
|
+
for (let n = t + 1; n < i.length; n++)
|
|
815
|
+
i[n] = 0;
|
|
816
|
+
return i;
|
|
817
|
+
}
|
|
818
|
+
updateWheels(t) {
|
|
819
|
+
if (this.isCascade) {
|
|
820
|
+
if (this.cascadeJsonData = t, this.displayJson = [], this.initCascade(), this.initPosition.length < this.sliderList.length) {
|
|
821
|
+
const e = this.sliderList.length - this.initPosition.length;
|
|
822
|
+
for (let i = 0; i < e; i++)
|
|
823
|
+
this.initPosition.push(0);
|
|
824
|
+
}
|
|
825
|
+
this.setCurDistance(this.initPosition), this.fixRowStyle();
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
updateWheel(t, e) {
|
|
829
|
+
if (this.isCascade) {
|
|
830
|
+
l.log("error", "'updateWheel()' not support cascade json data, please use 'updateWheels()' instead to update the whole data source");
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
let i = "";
|
|
834
|
+
i += this.getOptionsHtmlStr(e), this.wheelsData[t] = this.isJsonType ? { data: e } : e, this.sliderList[t].innerHTML = i;
|
|
835
|
+
}
|
|
836
|
+
fixRowStyle() {
|
|
837
|
+
if (this.initColWidth.length && this.initColWidth.length === this.wheelList.length) {
|
|
838
|
+
const e = this.initColWidth.reduce((i, s) => i + s, 0);
|
|
839
|
+
this.initColWidth.forEach((i, s) => {
|
|
840
|
+
this.wheelList[s].style.width = (i / e * 100).toFixed(2) + "%";
|
|
841
|
+
});
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
const t = (100 / this.wheelList.length).toFixed(2);
|
|
845
|
+
for (let e = 0; e < this.wheelList.length; e++)
|
|
846
|
+
this.wheelList[e].style.width = t + "%";
|
|
847
|
+
}
|
|
848
|
+
getIndex(t) {
|
|
849
|
+
return Math.round((2 * this.optionHeight - t) / this.optionHeight);
|
|
850
|
+
}
|
|
851
|
+
getIndexArr() {
|
|
852
|
+
const t = [];
|
|
853
|
+
for (let e = 0; e < this.curDistance.length; e++)
|
|
854
|
+
t.push(this.getIndex(this.curDistance[e]));
|
|
855
|
+
return t;
|
|
856
|
+
}
|
|
857
|
+
getCurValue() {
|
|
858
|
+
const t = [], e = this.getIndexArr(), { keyMap: i } = this.config;
|
|
859
|
+
if (this.isCascade)
|
|
860
|
+
for (let s = 0; s < this.wheelList.length; s++) {
|
|
861
|
+
const n = this.displayJson[s][e[s]];
|
|
862
|
+
n && t.push({
|
|
863
|
+
[i.id]: n[i.id],
|
|
864
|
+
[i.value]: n[i.value]
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
else if (this.isJsonType)
|
|
868
|
+
for (let s = 0; s < this.curDistance.length; s++)
|
|
869
|
+
t.push(this.wheelsData[s].data[this.getIndex(this.curDistance[s])]);
|
|
870
|
+
else
|
|
871
|
+
for (let s = 0; s < this.curDistance.length; s++)
|
|
872
|
+
t.push(this.getInnerText(s));
|
|
873
|
+
return t;
|
|
874
|
+
}
|
|
875
|
+
getValue() {
|
|
876
|
+
return this.getCurValue();
|
|
877
|
+
}
|
|
878
|
+
calcDistance(t) {
|
|
879
|
+
return 2 * this.optionHeight - t * this.optionHeight;
|
|
880
|
+
}
|
|
881
|
+
setCurDistance(t) {
|
|
882
|
+
const e = [];
|
|
883
|
+
for (let i = 0; i < this.sliderList.length; i++)
|
|
884
|
+
e.push(this.calcDistance(t[i])), this.movePosition(this.sliderList[i], e[i]);
|
|
885
|
+
this.curDistance = e;
|
|
886
|
+
}
|
|
887
|
+
fixPosition(t) {
|
|
888
|
+
return -(this.getIndex(t) - 2) * this.optionHeight;
|
|
889
|
+
}
|
|
890
|
+
movePosition(t, e) {
|
|
891
|
+
t.style.transform = "translate3d(0," + e + "px, 0)";
|
|
892
|
+
}
|
|
893
|
+
locatePosition(t, e) {
|
|
894
|
+
t === void 0 || e === void 0 || e < 0 || (this.curDistance[t] = this.calcDistance(e), this.movePosition(this.sliderList[t], this.curDistance[t]), this.isCascade && this.checkRange(t, this.getIndexArr()));
|
|
895
|
+
}
|
|
896
|
+
updateCurDistance(t, e) {
|
|
897
|
+
this.curDistance[e] = parseInt(t.style.transform.split(",")[1]);
|
|
898
|
+
}
|
|
899
|
+
getInnerText(t) {
|
|
900
|
+
var s;
|
|
901
|
+
const e = this.sliderList[t].getElementsByTagName("li").length;
|
|
902
|
+
let i = this.getIndex(this.curDistance[t]);
|
|
903
|
+
return i >= e ? i = e - 1 : i < 0 && (i = 0), ((s = this.sliderList[t].getElementsByTagName("li")[i]) == null ? void 0 : s.textContent) || "";
|
|
904
|
+
}
|
|
905
|
+
touch(t) {
|
|
906
|
+
var o, r, c, a, u, d, f, v;
|
|
907
|
+
const i = (t.composedPath && t.composedPath()).find((m) => {
|
|
908
|
+
var p;
|
|
909
|
+
return (p = m.classList) == null ? void 0 : p.contains("ms-wheel");
|
|
910
|
+
});
|
|
911
|
+
if (!i)
|
|
912
|
+
return;
|
|
913
|
+
const s = i.firstChild, n = parseInt(i.getAttribute("data-index") || "0");
|
|
914
|
+
switch (t.type) {
|
|
915
|
+
case "touchstart":
|
|
916
|
+
case "mousedown":
|
|
917
|
+
s.style.transition = "none 0s ease-out", this.startY = Math.floor(t instanceof TouchEvent ? t.touches[0].clientY : t.clientY), this.preMoveY = this.startY, t.type === "mousedown" && (this.enableClickStatus = !0);
|
|
918
|
+
break;
|
|
919
|
+
case "touchmove":
|
|
920
|
+
case "mousemove":
|
|
921
|
+
if (t.preventDefault(), t.type === "mousemove" && !this.enableClickStatus)
|
|
922
|
+
break;
|
|
923
|
+
this.moveY = Math.floor(t instanceof TouchEvent ? t.touches[0].clientY : t.clientY), this.offsetY = (this.moveY - this.preMoveY) * this.config.scrollSpeed, this.updateCurDistance(s, n), this.curDistance[n] = this.curDistance[n] + this.offsetY, this.movePosition(s, this.curDistance[n]), this.preMoveY = this.moveY;
|
|
924
|
+
break;
|
|
925
|
+
case "touchend":
|
|
926
|
+
case "mouseup":
|
|
927
|
+
if (s.style.transition = "transform 0.18s ease-out", this.moveEndY = Math.floor(t instanceof TouchEvent ? t.changedTouches[0].clientY : t.clientY), this.offsetSum = this.moveEndY - this.startY, this.oversizeBorder = -(s.getElementsByTagName("li").length - 3) * this.optionHeight, this.offsetSum == 0) {
|
|
928
|
+
const m = Math.floor((window.innerHeight - this.moveEndY) / 40);
|
|
929
|
+
if (m != 2) {
|
|
930
|
+
const p = m - 2, C = this.curDistance[n] + p * this.optionHeight;
|
|
931
|
+
C <= 2 * this.optionHeight && C >= this.oversizeBorder && (this.curDistance[n] = C, this.movePosition(s, this.curDistance[n]), (r = (o = this.config).transitionEnd) == null || r.call(o, this.getIndexArr(), this.getCurValue(), this), (a = (c = this.config).onTransitionEnd) == null || a.call(c, this.getCurValue(), this.getIndexArr(), this));
|
|
932
|
+
}
|
|
933
|
+
} else
|
|
934
|
+
this.updateCurDistance(s, n), this.curDistance[n] = this.fixPosition(this.curDistance[n]), this.curDistance[n] > 2 * this.optionHeight ? this.curDistance[n] = 2 * this.optionHeight : this.curDistance[n] < this.oversizeBorder && (this.curDistance[n] = this.oversizeBorder), this.movePosition(s, this.curDistance[n]), (d = (u = this.config).transitionEnd) == null || d.call(u, this.getIndexArr(), this.getCurValue(), this), (v = (f = this.config).onTransitionEnd) == null || v.call(f, this.getCurValue(), this.getIndexArr(), this);
|
|
935
|
+
t.type === "mouseup" && (this.enableClickStatus = !1), this.isCascade && this.checkRange(n, this.getIndexArr());
|
|
936
|
+
break;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
let y = l;
|
|
941
|
+
h(y, "defaultConfig", {
|
|
942
|
+
keyMap: { id: "id", value: "value", childs: "childs" },
|
|
943
|
+
position: [],
|
|
944
|
+
colWidth: [],
|
|
945
|
+
title: "",
|
|
946
|
+
connector: " ",
|
|
947
|
+
ensureBtnText: "\u786E\u8BA4",
|
|
948
|
+
cancelBtnText: "\u53D6\u6D88",
|
|
949
|
+
triggerDisplayValue: !0,
|
|
950
|
+
scrollSpeed: 1
|
|
951
|
+
}), h(y, "REQUIRED_PARAMS", ["trigger", "wheels"]);
|
|
952
|
+
|
|
953
|
+
const ptcMobileSelectCss = ".ms-mobile-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;opacity:0;visibility:hidden;-webkit-transition:opacity 0.4s, z-index 0.4s;transition:opacity 0.4s, z-index 0.4s;transform:translate(0, 0)}.ms-mobile-select *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.ms-mobile-select .ms-gray-layer{position:fixed;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.7);z-index:888;display:block}.ms-mobile-select .ms-content{width:100%;display:block;position:fixed;z-index:889;color:black;-webkit-transition:all 0.4s;transition:all 0.4s;bottom:-350px;left:0;background:white}.ms-mobile-select .ms-fix-width{width:90%;margin:0 auto;position:relative}.ms-mobile-select .ms-fix-width:after{content:\".\";display:block;height:0;clear:both;visibility:hidden}.ms-mobile-select .ms-btn-bar{border-bottom:1px solid #dcdcdc;font-size:15px;height:45px;position:relative;text-align:center;line-height:45px}.ms-mobile-select .ms-cancel,.ms-mobile-select .ms-ensure{height:45px;width:55px;cursor:pointer;position:absolute;top:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.ms-mobile-select .ms-cancel{left:0;color:#666}.ms-mobile-select .ms-ensure{right:0;color:#1e83d3}.ms-mobile-select .ms-title{font-size:15px;padding:0 15%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ms-mobile-select .ms-panel:after{content:\".\";display:block;height:0;clear:both;visibility:hidden}.ms-mobile-select .ms-wheels{width:100%;height:200px;overflow:hidden}.ms-mobile-select .ms-wheel{position:relative;z-index:0;float:left;width:50%;height:200px;overflow:hidden;-webkit-transition:width 0.3s ease;transition:width 0.3s ease}.ms-mobile-select .ms-select-container{display:block;text-align:center}.ms-mobile-select .ms-select-container li{font-size:15px;display:block;height:40px;line-height:40px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.ms-mobile-select .ms-select-line{height:40px;width:100%;position:absolute;top:80px;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc}.ms-mobile-select .ms-shadow-mask{position:absolute;top:0;width:100%;height:200px;background:linear-gradient(to bottom, #fffffff5, #ffffffcc 25%, #ffffff00 49%, #ffffff00 51%, #ffffffcc 75%, #fffffff5);opacity:0.9;pointer-events:none}.ms-mobile-select.ms-show{opacity:1;z-index:10000;visibility:visible}.ms-mobile-select.ms-show .ms-content{bottom:0}.ms-default-trigger{min-height:1em;color:#888}body.ms-show{overflow-y:hidden}h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}.mobile-select-wrapper{display:block}.mobile-select-wrapper div{display:inline;margin-right:var(--ptc-element-spacing-03);width:100%;font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-regular);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest);color:var(--color-white);height:18px}.mobileSelect .content{top:auto}.mobileSelect .content .btnBar{border-color:var(--color-gray-10)}.mobileSelect .content .btnBar .cancel,.mobileSelect .content .btnBar .ensure,.mobileSelect .content .btnBar .title{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest)}.mobileSelect .content .btnBar .ensure,.mobileSelect .content .btnBar .cancel{transform:translateY(12.5px);width:125px}.mobileSelect .content .panel .wheel .selectContainer li{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest);height:45px}ptc-responsive-wrapper.xsmall .mobile-select-wrapper,ptc-responsive-wrapper.small .mobile-select-wrapper{display:block}ptc-responsive-wrapper.medium .mobile-select-wrapper,ptc-responsive-wrapper.large .mobile-select-wrapper,ptc-responsive-wrapper.xlarge .mobile-select-wrapper,ptc-responsive-wrapper.xxlarge .mobile-select-wrapper,ptc-responsive-wrapper.large2k .mobile-select-wrapper,ptc-responsive-wrapper.large4k .mobile-select-wrapper{display:none}";
|
|
954
|
+
|
|
955
|
+
const PtcMobileSelect = class {
|
|
956
|
+
constructor(hostRef) {
|
|
957
|
+
registerInstance(this, hostRef);
|
|
958
|
+
this.triggerName = undefined;
|
|
959
|
+
this.selectedText = undefined;
|
|
960
|
+
this.wheelData = undefined;
|
|
961
|
+
this.selectedId = '';
|
|
962
|
+
this.ensureBtnText = 'Confirm';
|
|
963
|
+
this.cancelBtnText = 'Cancel';
|
|
964
|
+
this.listTitle = undefined;
|
|
965
|
+
}
|
|
966
|
+
render() {
|
|
967
|
+
return (h$1("div", { class: "mobile-select-wrapper" }, h$1("div", { id: this.triggerName }, this.selectedText, h$1("icon-asset", { type: "ptc", size: "x-small", name: "chevron-down", color: "white", "is-mobile-select": "true", "injected-style": "svg.ismobileselect{transform:translateX(10px);}" }))));
|
|
968
|
+
}
|
|
969
|
+
componentDidRender() {
|
|
970
|
+
let currentId = this.selectedId; //input current lang
|
|
971
|
+
let storeIndex = 0;
|
|
972
|
+
let mySelect = new y({
|
|
973
|
+
trigger: `#${this.triggerName}`,
|
|
974
|
+
title: `${this.listTitle ? this.listTitle : ''}`,
|
|
975
|
+
wheels: this.wheelData ? [{ data: this.wheelData }] : [{ data: ['test1', 'test2'] }],
|
|
976
|
+
position: [0],
|
|
977
|
+
ensureBtnText: this.ensureBtnText,
|
|
978
|
+
cancelBtnText: this.cancelBtnText,
|
|
979
|
+
ensureBtnColor: 'var(--color-gray-12)',
|
|
980
|
+
cancelBtnColor: 'var(--color-gray-12)',
|
|
981
|
+
titleColor: 'var(--color-gray-12)',
|
|
982
|
+
onShow: function (_1, _2, e) {
|
|
983
|
+
if (currentId) {
|
|
984
|
+
let liEle = document.querySelectorAll('.selectContainer li');
|
|
985
|
+
liEle.forEach((currentValue, currentIndex) => {
|
|
986
|
+
if (currentValue.getAttribute('data-id') == currentId) {
|
|
987
|
+
storeIndex = currentIndex;
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
});
|
|
991
|
+
try {
|
|
992
|
+
e.locatePosition(0, storeIndex);
|
|
993
|
+
console.log("storeIndex: " + storeIndex);
|
|
994
|
+
}
|
|
995
|
+
catch (error) {
|
|
996
|
+
console.log(error);
|
|
997
|
+
// debugger
|
|
998
|
+
}
|
|
999
|
+
//e.locatePosition(0, storeIndex);
|
|
1000
|
+
}
|
|
1001
|
+
else {
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
callback: function (indexArr, data) {
|
|
1006
|
+
if (data[0].id) {
|
|
1007
|
+
window.location.href = data[0].id;
|
|
1008
|
+
}
|
|
1009
|
+
else {
|
|
1010
|
+
console.log('href: ' + data[0].id + '; indexArr: ' + indexArr);
|
|
1011
|
+
}
|
|
1012
|
+
}.bind(this),
|
|
1013
|
+
});
|
|
1014
|
+
mySelect.locatePosition(0, storeIndex);
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
PtcMobileSelect.style = ptcMobileSelectCss;
|
|
1018
|
+
|
|
1019
|
+
const ptcModalCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}.wrapper{position:absolute;width:100vw;height:100%;top:0;left:0;z-index:500001;display:none}.wrapper.fixed{position:fixed}.wrapper .modal-popup{margin:7.5rem auto 1rem;background-color:var(--color-white);box-shadow:var(--ptc-shadow-large);max-width:22.5625rem;width:80%;display:flex;flex-direction:column;align-items:flex-end;align-content:flex-end;z-index:50020;transform:translateY(-100%)}@media only screen and (min-width: 992px){.wrapper .modal-popup{max-width:29.125rem}}.wrapper .modal-popup.md{max-width:44.125rem}.wrapper .modal-popup.lg{max-width:56.25rem}.wrapper .modal-popup.xl{max-width:64.0625rem}.wrapper .modal-popup.max{width:calc(100% - 4rem);max-width:75rem;height:80vh;margin:auto;overflow:hidden}.wrapper .modal-popup.max .close{margin:var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}.wrapper .modal-popup.max .modal-body iframe{height:100%}.wrapper .modal-popup .modal-body{width:100%}.wrapper .modal-popup .modal-body iframe{opacity:0;overflow:hidden;width:100%;border:0;transition:opacity var(--ptc-ease-inout) var(--ptc-transition-medium)}.wrapper .modal-popup .modal-body iframe.ready{opacity:1}.wrapper .modal-popup .modal-body.frame{overflow:hidden;overflow-y:hidden;overflow-x:hidden}.wrapper .modal-popup .modal-body.html{overflow:hidden}.wrapper .modal-popup.frame .modal-body{display:flex;flex:1;height:100%}.wrapper .modal-popup .close{margin-right:var(--ptc-element-spacing-03);margin-top:var(--ptc-element-spacing-03)}.wrapper .modal-popup.shadow-scroller{max-height:calc(100vh - 220px)}@media only screen and (min-width: 992px){.wrapper .modal-popup.shadow-scroller{max-height:756px}}.wrapper .modal-popup.shadow-scroller .modal-header{transition:box-shadow ease-in-out 250ms;position:relative;min-height:57px;border-bottom:1px solid var(--color-gray-02);width:100%}.wrapper .modal-popup.shadow-scroller .modal-header .close{position:absolute;top:var(--spacing-md);right:var(--spacing-md);margin:0}.wrapper .modal-popup.shadow-scroller .modal-body{min-height:200px;overflow-x:hidden}.wrapper .modal-popup.shadow-scroller .modal-footer{transition:box-shadow ease-in-out 250ms;width:100%;min-height:60px;border-top:1px solid var(--color-gray-02);padding-top:1rem}.wrapper .modal-popup.shadow-scroller.scroll-top .modal-header{box-shadow:0px 4px 12px rgba(0, 0, 0, 0.12)}.wrapper .modal-popup.shadow-scroller.scroll-bottom .modal-footer{box-shadow:0px -8px 12px rgba(0, 0, 0, 0.12)}.wrapper.show{display:flex;align-items:flex-start}.wrapper.show .modal-popup{transform:translateY(0)}.wrapper.show .modal-popup.rounded{border-radius:var(--ptc-border-radius-standard)}.overlay{width:100vw;height:100vh;position:fixed;top:0;left:0;z-index:50010;display:block;background-color:rgba(0, 0, 0, 0.6)}:host(.standard) .modal-popup{border-radius:var(--ptc-border-radius-standard)}:host(.large) .modal-popup{border-radius:var(--ptc-border-radius-large)}:host(.pill) .modal-popup{border-radius:var(--ptc-border-radius-pill)}:host(.circle) .modal-popup{border-radius:var(--ptc-border-radius-circle)}:host(.enclose-modal) .modal-popup{max-height:calc(100vh - 180px)}:host(.enclose-modal) .modal-popup:not(.frame){overflow-y:auto}:host(.bio-modal) .wrapper.show{align-items:flex-start}@media only screen and (min-width: 768px){:host(.bio-modal) .wrapper.show{align-items:center}}:host(.bio-modal) .modal-popup{padding:30px 15px 30px 0;max-width:1200px;margin:20px auto 0 auto;max-height:calc(100vh - 180px);width:90%;height:100%}:host(.bio-modal) .modal-popup .modal-body{height:100%}@media only screen and (min-width: 768px){:host(.bio-modal) .modal-popup .modal-body{height:auto}}@media (max-height: 450px){:host(.bio-modal) .modal-popup .modal-body{height:100%}}@media only screen and (min-width: 768px){:host(.bio-modal) .modal-popup{max-height:none;width:80%;margin-top:0px;height:auto}}@media only screen and (min-width: 1440px){:host(.bio-modal) .modal-popup{max-width:1400px}}@media (max-height: 450px){:host(.bio-modal) .modal-popup{max-height:calc(100vh - 180px);height:100%}}:host(.bio-modal) .close{position:absolute;margin:0;right:15px;top:30px}:host(.bio-modal) .close svg .cls-1,:host(.bio-modal) .close svg .cls-2{fill:none;stroke-width:2px}:host(.bio-modal) .close svg .cls-1{stroke:#1c2439;stroke-linecap:square}:host(.bio-modal) .close svg .cls-2{stroke:#74c34d}:host(.bio-modal) .close svg path{transition:all ease-in-out 250ms}:host(.bio-modal) .close svg .cls-1:nth-child(1){transform:translate(175.5px, 135.5px)}:host(.bio-modal) .close svg .cls-1:nth-child(2){transform:translate(175.5px, 174.985px)}:host(.bio-modal) .close svg .cls-1:nth-child(3){transform:translate(215.5px, 141.393px)}:host(.bio-modal) .close svg .cls-1:nth-child(4){transform:translate(175.5px, 135.5px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(1){transform:translate(175.5px, 162px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(2){transform:translate(149px, 174.985px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(3){transform:translate(215.5px, 174px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(4){transform:translate(152.5px, 135.5px)}:host(.no-container) .wrapper .modal-popup.xl{max-width:80rem !important;background:transparent;box-shadow:none}:host(.no-container) .wrapper .modal-popup .close{display:none}";
|
|
516
1020
|
|
|
517
1021
|
const PtcModal = class {
|
|
518
1022
|
constructor(hostRef) {
|
|
@@ -527,6 +1031,7 @@ const PtcModal = class {
|
|
|
527
1031
|
this.keepInViewport = false;
|
|
528
1032
|
this.closeOnBlur = false;
|
|
529
1033
|
this.rounded = false;
|
|
1034
|
+
this.hideContainer = false;
|
|
530
1035
|
this.showHeaderFooter = false;
|
|
531
1036
|
this.overlayHeight = undefined;
|
|
532
1037
|
this.borderRadius = 'standard';
|
|
@@ -636,41 +1141,42 @@ const PtcModal = class {
|
|
|
636
1141
|
let content;
|
|
637
1142
|
let overlay;
|
|
638
1143
|
let type = this.iframeUrl ? 'frame' : 'html';
|
|
639
|
-
let closebtn = (h("div", { class: "close" }, h("a", { href: "#", onClick: (e) => { e.preventDefault(); this.close(); } }, this.isBioModal
|
|
1144
|
+
let closebtn = (h$1("div", { class: "close" }, h$1("a", { href: "#", onClick: (e) => { e.preventDefault(); this.close(); } }, this.isBioModal
|
|
640
1145
|
?
|
|
641
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "42", height: "41.485", viewBox: "0 0 42 41.485" }, h("g", { "data-name": "Group 1042", transform: "rotate(180 108.25 87.993)" }, h("path", { d: "M0 0v39.486", class: "cls-1", "data-name": "Line 446" }), h("path", { d: "M0 0h40", class: "cls-1", "data-name": "Line 447" }), h("path", { d: "M0 33.592V0", class: "cls-1", "data-name": "Line 448" }), h("path", { d: "M23.994 0H0", class: "cls-1", "data-name": "Line 449" }), h("path", { d: "M0 0l17.596 17.596", class: "cls-2", "data-name": "Line 450", transform: "translate(187.229 147.226)" }), h("path", { d: "M0 7.198L7.199 0", class: "cls-2", "data-name": "Line 451", transform: "translate(197.55 147.312)" }), h("path", { d: "M0 7.2L7.2 0", class: "cls-2", "data-name": "Path 114", transform: "translate(187.313 157.549)" })))
|
|
1146
|
+
h$1("svg", { xmlns: "http://www.w3.org/2000/svg", width: "42", height: "41.485", viewBox: "0 0 42 41.485" }, h$1("g", { "data-name": "Group 1042", transform: "rotate(180 108.25 87.993)" }, h$1("path", { d: "M0 0v39.486", class: "cls-1", "data-name": "Line 446" }), h$1("path", { d: "M0 0h40", class: "cls-1", "data-name": "Line 447" }), h$1("path", { d: "M0 33.592V0", class: "cls-1", "data-name": "Line 448" }), h$1("path", { d: "M23.994 0H0", class: "cls-1", "data-name": "Line 449" }), h$1("path", { d: "M0 0l17.596 17.596", class: "cls-2", "data-name": "Line 450", transform: "translate(187.229 147.226)" }), h$1("path", { d: "M0 7.198L7.199 0", class: "cls-2", "data-name": "Line 451", transform: "translate(197.55 147.312)" }), h$1("path", { d: "M0 7.2L7.2 0", class: "cls-2", "data-name": "Path 114", transform: "translate(187.313 157.549)" })))
|
|
642
1147
|
:
|
|
643
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, h("path", { d: "M1 1L13 13", stroke: "black" }), h("path", { d: "M13 1L1 13", stroke: "black" })))));
|
|
1148
|
+
h$1("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, h$1("path", { d: "M1 1L13 13", stroke: "black" }), h$1("path", { d: "M13 1L1 13", stroke: "black" })))));
|
|
644
1149
|
if (this.iframeUrl) {
|
|
645
|
-
content = (h("iframe", { src: this.iframeUrl, frameBorder: 0, allowFullScreen: false, height: "100%", width: "100%", scrolling: "no", onLoad: this.resizeIframe }));
|
|
1150
|
+
content = (h$1("iframe", { src: this.iframeUrl, frameBorder: 0, allowFullScreen: false, height: "100%", width: "100%", scrolling: "no", onLoad: this.resizeIframe }));
|
|
646
1151
|
}
|
|
647
1152
|
else {
|
|
648
1153
|
if (this.showHeaderFooter) {
|
|
649
|
-
content = (h("slot", { name: "body" }));
|
|
1154
|
+
content = (h$1("slot", { name: "body" }));
|
|
650
1155
|
}
|
|
651
1156
|
else {
|
|
652
|
-
content = (h("slot", null));
|
|
1157
|
+
content = (h$1("slot", null));
|
|
653
1158
|
}
|
|
654
1159
|
}
|
|
655
1160
|
if (this.overlay) {
|
|
656
1161
|
if (this.closeOnBlur) {
|
|
657
|
-
overlay = h("div", { class: "overlay", onClick: (_) => this.close() });
|
|
1162
|
+
overlay = h$1("div", { class: "overlay", onClick: (_) => this.close() });
|
|
658
1163
|
}
|
|
659
1164
|
else {
|
|
660
|
-
overlay = h("div", { class: "overlay" });
|
|
1165
|
+
overlay = h$1("div", { class: "overlay" });
|
|
661
1166
|
}
|
|
662
1167
|
}
|
|
663
|
-
return (h(Host, { class: this.getCssClassMap() }, this.styles && h("style", null, this.styles), h("div", { class: `wrapper ${this.show ? "show" : "hide"} ${this.fixed ? 'fixed' : ''} ` }, overlay, h("div", { class: `modal-popup ${this.size} ${type} ${this.rounded ? 'rounded' : ''} ${this.showHeaderFooter ? 'shadow-scroller' : ''} ` }, this.showHeaderFooter ? [
|
|
664
|
-
h("div", { class: "modal-header" }, h("slot", { name: "header" }), closebtn),
|
|
665
|
-
h("div", { class: "modal-body", onScroll: () => this.handleScroll() }, content),
|
|
666
|
-
h("div", { class: "modal-footer" }, h("slot", { name: "footer" }))
|
|
1168
|
+
return (h$1(Host, { class: this.getCssClassMap() }, this.styles && h$1("style", null, this.styles), h$1("div", { class: `wrapper ${this.show ? "show" : "hide"} ${this.fixed ? 'fixed' : ''} ` }, overlay, h$1("div", { class: `modal-popup ${this.size} ${type} ${this.rounded ? 'rounded' : ''} ${this.showHeaderFooter ? 'shadow-scroller' : ''} ` }, this.showHeaderFooter ? [
|
|
1169
|
+
h$1("div", { class: "modal-header" }, h$1("slot", { name: "header" }), closebtn),
|
|
1170
|
+
h$1("div", { class: "modal-body", onScroll: () => this.handleScroll() }, content),
|
|
1171
|
+
h$1("div", { class: "modal-footer" }, h$1("slot", { name: "footer" }))
|
|
667
1172
|
] : [
|
|
668
1173
|
closebtn,
|
|
669
|
-
h("div", { class: "modal-body" }, content)
|
|
1174
|
+
h$1("div", { class: "modal-body" }, content)
|
|
670
1175
|
]))));
|
|
671
1176
|
}
|
|
672
1177
|
getCssClassMap() {
|
|
673
1178
|
return {
|
|
1179
|
+
["no-container"]: this.hideContainer,
|
|
674
1180
|
["bio-modal"]: this.isBioModal,
|
|
675
1181
|
["enclose-modal"]: !this.isBioModal && this.keepInViewport,
|
|
676
1182
|
[this.borderRadius]: true
|
|
@@ -724,7 +1230,7 @@ const PtcPara = class {
|
|
|
724
1230
|
const classMap = this.getCssClassMap();
|
|
725
1231
|
const colorClass = this.addWhiteClass();
|
|
726
1232
|
const cutOff = this.getLineCuttoff();
|
|
727
|
-
return (h(Host, { class: `${colorClass} ${this.paraZIndex}` }, this.styles && h("style", null, this.styles), h("p", { class: classMap, part: "part-para", style: cutOff }, h("slot", null))));
|
|
1233
|
+
return (h$1(Host, { class: `${colorClass} ${this.paraZIndex}` }, this.styles && h$1("style", null, this.styles), h$1("p", { class: classMap, part: "part-para", style: cutOff }, h$1("slot", null))));
|
|
728
1234
|
}
|
|
729
1235
|
getCssClassMap() {
|
|
730
1236
|
return {
|
|
@@ -857,7 +1363,7 @@ const PtcPicture = class {
|
|
|
857
1363
|
render() {
|
|
858
1364
|
const classMap = this.getCssClassMap();
|
|
859
1365
|
const classMapHost = this.getCssClassMapHost();
|
|
860
|
-
return (h(Host, { class: classMapHost }, this.styles && h("style", null, this.styles), h("img", Object.assign({ class: classMap, "data-xs": !!this.sizeXs ? `${this.src}` : `${this.src}`, "data-sm": !!this.sizeSm ? `${this.src}` : `${this.src}`, "data-md": !!this.sizeMd ? `${this.src}` : `${this.src}`, "data-lg": !!this.sizeLg ? `${this.src}` : `${this.src}` }, (!!this.width ? { width: this.width } : {}), (!!this.height ? { height: this.height } : {}), { alt: this.alt, style: Object.assign({}, (!!this.maxWidth ? { maxWidth: this.maxWidth + 'px' } : {})) })), h("slot", null)));
|
|
1366
|
+
return (h$1(Host, { class: classMapHost }, this.styles && h$1("style", null, this.styles), h$1("img", Object.assign({ class: classMap, "data-xs": !!this.sizeXs ? `${this.src}` : `${this.src}`, "data-sm": !!this.sizeSm ? `${this.src}` : `${this.src}`, "data-md": !!this.sizeMd ? `${this.src}` : `${this.src}`, "data-lg": !!this.sizeLg ? `${this.src}` : `${this.src}` }, (!!this.width ? { width: this.width } : {}), (!!this.height ? { height: this.height } : {}), { alt: this.alt, style: Object.assign({}, (!!this.maxWidth ? { maxWidth: this.maxWidth + 'px' } : {})) })), h$1("slot", null)));
|
|
861
1367
|
}
|
|
862
1368
|
getCurrentBreakPoints() {
|
|
863
1369
|
// Define local variables
|
|
@@ -929,13 +1435,13 @@ const PtcPreloaderSection = class {
|
|
|
929
1435
|
renderHTML() {
|
|
930
1436
|
switch (this.sectionType) {
|
|
931
1437
|
case 'cards':
|
|
932
|
-
return (h("div", { class: "is-grid has-col-2 has-col-2-sm has-col-3-md has-col-gap-md has-row-gap-md preload-min-height" }, Array.from({ length: this.numberOfCards }).map(() => (h("div", { class: "is-col-1" }, h("div", { class: "skeleton" }, h("div", { class: "skeleton-card-media" }), h("div", { class: "skeleton-text" }, h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block long" }))))))));
|
|
1438
|
+
return (h$1("div", { class: "is-grid has-col-2 has-col-2-sm has-col-3-md has-col-gap-md has-row-gap-md preload-min-height" }, Array.from({ length: this.numberOfCards }).map(() => (h$1("div", { class: "is-col-1" }, h$1("div", { class: "skeleton" }, h$1("div", { class: "skeleton-card-media" }), h$1("div", { class: "skeleton-text" }, h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block long" }))))))));
|
|
933
1439
|
default:
|
|
934
|
-
return (h("div", { class: "ptc-section-standard preload-min-height" }, h("div", { class: "ptc-container" }, h("max-width-container", { "max-width": "960", breakpoint: 1200 }, h("div", { class: "skeleton" }, h("div", { class: "skeleton-header" }, h("div", { class: "skeleton-block bold" }), h("div", { class: "skeleton-block wide bold" }), h("ptc-spacer", { breakpoint: "small", size: "large" }), h("ptc-spacer", { breakpoint: "x-small", size: "x-large" }), h("div", { class: "skeleton-block medium" }), h("div", { class: "skeleton-block narrow" }), h("div", { class: "skeleton-block short" })), h("div", { class: "skeleton-image" }), h("div", { class: "skeleton-text" }, h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block long" }), h("div", { class: "skeleton-block narrow" }), h("ptc-spacer", { breakpoint: "small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "large" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block medium" }), h("ptc-spacer", { breakpoint: "small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "large" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block long" }), h("div", { class: "skeleton-block medium" }), h("ptc-spacer", { breakpoint: "small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "large" }), h("div", { class: "skeleton-block long" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block medium" }), h("ptc-spacer", { breakpoint: "small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "large" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block wide" }), h("ptc-spacer", { breakpoint: "small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "large" }), h("div", { class: "skeleton-block short bold" }), h("ptc-spacer", { breakpoint: "small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "large" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block wide" }), h("ptc-spacer", { breakpoint: "small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "large" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block" }), h("div", { class: "skeleton-block medium" })))))));
|
|
1440
|
+
return (h$1("div", { class: "ptc-section-standard preload-min-height" }, h$1("div", { class: "ptc-container" }, h$1("max-width-container", { "max-width": "960", breakpoint: 1200 }, h$1("div", { class: "skeleton" }, h$1("div", { class: "skeleton-header" }, h$1("div", { class: "skeleton-block bold" }), h$1("div", { class: "skeleton-block wide bold" }), h$1("ptc-spacer", { breakpoint: "small", size: "large" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "x-large" }), h$1("div", { class: "skeleton-block medium" }), h$1("div", { class: "skeleton-block narrow" }), h$1("div", { class: "skeleton-block short" })), h$1("div", { class: "skeleton-image" }), h$1("div", { class: "skeleton-text" }, h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block long" }), h$1("div", { class: "skeleton-block narrow" }), h$1("ptc-spacer", { breakpoint: "small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "large" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block medium" }), h$1("ptc-spacer", { breakpoint: "small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "large" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block long" }), h$1("div", { class: "skeleton-block medium" }), h$1("ptc-spacer", { breakpoint: "small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "large" }), h$1("div", { class: "skeleton-block long" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block medium" }), h$1("ptc-spacer", { breakpoint: "small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "large" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block wide" }), h$1("ptc-spacer", { breakpoint: "small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "large" }), h$1("div", { class: "skeleton-block short bold" }), h$1("ptc-spacer", { breakpoint: "small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "large" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block wide" }), h$1("ptc-spacer", { breakpoint: "small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "large" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block" }), h$1("div", { class: "skeleton-block medium" })))))));
|
|
935
1441
|
}
|
|
936
1442
|
}
|
|
937
1443
|
render() {
|
|
938
|
-
return h(Host, null, this.isLoading ? this.renderHTML() : h("slot", null));
|
|
1444
|
+
return h$1(Host, null, this.isLoading ? this.renderHTML() : h$1("slot", null));
|
|
939
1445
|
}
|
|
940
1446
|
};
|
|
941
1447
|
PtcPreloaderSection.style = ptcPreloaderSectionCss;
|
|
@@ -955,7 +1461,7 @@ const PtcProgressBar = class {
|
|
|
955
1461
|
this.scrollPercentage = percentage;
|
|
956
1462
|
}
|
|
957
1463
|
render() {
|
|
958
|
-
return (h(Host, null, h("div", { class: "progress-bar-container" }, h("div", { class: "progress-bar", style: { width: `${this.scrollPercentage}%` } }))));
|
|
1464
|
+
return (h$1(Host, null, h$1("div", { class: "progress-bar-container" }, h$1("div", { class: "progress-bar", style: { width: `${this.scrollPercentage}%` } }))));
|
|
959
1465
|
}
|
|
960
1466
|
};
|
|
961
1467
|
PtcProgressBar.style = ptcProgressBarCss;
|
|
@@ -979,8 +1485,8 @@ const PtcSocialShare = class {
|
|
|
979
1485
|
}
|
|
980
1486
|
render() {
|
|
981
1487
|
const classMap = this.getCssClassMap();
|
|
982
|
-
return (h(Host, { class: classMap }, h("div", { onClick: () => this.share(), onMouseEnter: () => this.hoverToggle(), onMouseLeave: () => this.hoverToggle() }, this.shareType == 'mail' ? h("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "plm-mail" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'linkedin' ? h("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "plm-linkedin" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'twitter' ? h("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "twitter-x" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'facebook' ? h("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "plm-fb" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'blog-mail' ? h("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "mail-blogs-icon" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'blog-linkedin' ? h("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "linkedin-blogs-icon" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'blog-twitter' ? h("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "twitter-x-dark-circle" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'blog-facebook' ? h("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "facebook-blogs-icon" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'share-api' ? h("icon-asset", Object.assign({ type: "solid", size: this.iconSize, name: "share-square" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'download' ? h("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "download-arrow-news", color: "inherit" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null), this.shareType == 'download' &&
|
|
983
|
-
h("ptc-modal", { id: "download-modal", show: false, size: "lg", fixed: true, "is-bio-modal": true }, h("ptc-title", { type: 'h2', "text-align": 'center', "title-weight": "w-5", upperline: "no-upperline" }, "Thanks For Downloading"))));
|
|
1488
|
+
return (h$1(Host, { class: classMap }, h$1("div", { onClick: () => this.share(), onMouseEnter: () => this.hoverToggle(), onMouseLeave: () => this.hoverToggle() }, this.shareType == 'mail' ? h$1("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "plm-mail" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'linkedin' ? h$1("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "plm-linkedin" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'twitter' ? h$1("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "twitter-x" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'facebook' ? h$1("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "plm-fb" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'blog-mail' ? h$1("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "mail-blogs-icon" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'blog-linkedin' ? h$1("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "linkedin-blogs-icon" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'blog-twitter' ? h$1("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "twitter-x-dark-circle" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'blog-facebook' ? h$1("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "facebook-blogs-icon" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'share-api' ? h$1("icon-asset", Object.assign({ type: "solid", size: this.iconSize, name: "share-square" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null, this.shareType == 'download' ? h$1("icon-asset", Object.assign({ type: "ptc", size: this.iconSize, name: "download-arrow-news", color: "inherit" }, (this.isHover ? { color: this.iconHoverColor } : { color: this.iconColor }))) : null), this.shareType == 'download' &&
|
|
1489
|
+
h$1("ptc-modal", { id: "download-modal", show: false, size: "lg", fixed: true, "is-bio-modal": true }, h$1("ptc-title", { type: 'h2', "text-align": 'center', "title-weight": "w-5", upperline: "no-upperline" }, "Thanks For Downloading"))));
|
|
984
1490
|
}
|
|
985
1491
|
getCssClassMap() {
|
|
986
1492
|
return {
|
|
@@ -1044,7 +1550,7 @@ const PtcSpacer = class {
|
|
|
1044
1550
|
}
|
|
1045
1551
|
render() {
|
|
1046
1552
|
const classMap = this.getCssClassMap();
|
|
1047
|
-
return (h(Host, { class: classMap }));
|
|
1553
|
+
return (h$1(Host, { class: classMap }));
|
|
1048
1554
|
}
|
|
1049
1555
|
getCssClassMap() {
|
|
1050
1556
|
return {
|
|
@@ -1076,7 +1582,7 @@ const PtcSpan = class {
|
|
|
1076
1582
|
}
|
|
1077
1583
|
render() {
|
|
1078
1584
|
const classMap = this.getCssClassMap();
|
|
1079
|
-
return (h(Host, { class: classMap }, this.styles && h("style", null, this.styles), h("span", { part: "part-ptc-span" }, h("slot", null))));
|
|
1585
|
+
return (h$1(Host, { class: classMap }, this.styles && h$1("style", null, this.styles), h$1("span", { part: "part-ptc-span" }, h$1("slot", null))));
|
|
1080
1586
|
}
|
|
1081
1587
|
getCssClassMap() {
|
|
1082
1588
|
return {
|
|
@@ -1109,7 +1615,7 @@ const PtcStickyTitle = class {
|
|
|
1109
1615
|
}
|
|
1110
1616
|
render() {
|
|
1111
1617
|
const logoImg = getAssetPath(`./media/${this.logo}`);
|
|
1112
|
-
return (h(Host, null, h("div", { class: `sticky-header-container ${this.isSticky ? 'sticky' : ''}` }, h("div", { class: "sticky-header-title" }, h("div", { class: `logo-image ${this.isSticky ? 'is-visible' : ''}` }, h("img", { src: logoImg })), h("h1", null, h("ptc-tooltip", { "text-lines": "1", description: this.barTitle })), h("div", { class: `share-icons is-flex ${this.isSticky ? 'is-visible' : ''}` }, h("slot", { name: 'social-share-slot' }))), h("ptc-progress-bar", null))));
|
|
1618
|
+
return (h$1(Host, null, h$1("div", { class: `sticky-header-container ${this.isSticky ? 'sticky' : ''}` }, h$1("div", { class: "sticky-header-title" }, h$1("div", { class: `logo-image ${this.isSticky ? 'is-visible' : ''}` }, h$1("img", { src: logoImg })), h$1("h1", null, h$1("ptc-tooltip", { "text-lines": "1", description: this.barTitle })), h$1("div", { class: `share-icons is-flex ${this.isSticky ? 'is-visible' : ''}` }, h$1("slot", { name: 'social-share-slot' }))), h$1("ptc-progress-bar", null))));
|
|
1113
1619
|
}
|
|
1114
1620
|
static get assetsDirs() { return ["media"]; }
|
|
1115
1621
|
};
|
|
@@ -1151,7 +1657,7 @@ const PtcTitle = class {
|
|
|
1151
1657
|
if (this.el == firstChild) {
|
|
1152
1658
|
this.el.innerHTML = '';
|
|
1153
1659
|
}
|
|
1154
|
-
return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap }, h(TagType, { innerHTML: html, style: cutOff }))));
|
|
1660
|
+
return (h$1(Host, null, this.styles && h$1("style", null, this.styles), h$1("div", { class: classMap }, h$1(TagType, { innerHTML: html, style: cutOff }))));
|
|
1155
1661
|
}
|
|
1156
1662
|
standardRender() {
|
|
1157
1663
|
const classMap = this.getCssClassMap();
|
|
@@ -1176,7 +1682,7 @@ const PtcTitle = class {
|
|
|
1176
1682
|
default:
|
|
1177
1683
|
TagType = 'h2';
|
|
1178
1684
|
}
|
|
1179
|
-
return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap }, h(TagType, { style: cutOff }, h("slot", null)))));
|
|
1685
|
+
return (h$1(Host, null, this.styles && h$1("style", null, this.styles), h$1("div", { class: classMap }, h$1(TagType, { style: cutOff }, h$1("slot", null)))));
|
|
1180
1686
|
}
|
|
1181
1687
|
getCssClassMap() {
|
|
1182
1688
|
return {
|
|
@@ -1271,7 +1777,7 @@ const PtcTooltip = class {
|
|
|
1271
1777
|
}
|
|
1272
1778
|
render() {
|
|
1273
1779
|
if (this.mode == 'wrapper') {
|
|
1274
|
-
return (h(Host, { class: this.textDisplay }, this.styles && h("style", null, this.styles), h("div", { class: "wrapper-content" }, h("div", { class: "slot-content" }, h("slot", null)), h("div", { class: `tooltip ${this.position} ${this.theme}` }, h("slot", { name: "description" }), this.description && h("span", { innerHTML: this.description })))));
|
|
1780
|
+
return (h$1(Host, { class: this.textDisplay }, this.styles && h$1("style", null, this.styles), h$1("div", { class: "wrapper-content" }, h$1("div", { class: "slot-content" }, h$1("slot", null)), h$1("div", { class: `tooltip ${this.position} ${this.theme}` }, h$1("slot", { name: "description" }), this.description && h$1("span", { innerHTML: this.description })))));
|
|
1275
1781
|
}
|
|
1276
1782
|
else {
|
|
1277
1783
|
const classMap = this.getCssClassMap();
|
|
@@ -1282,7 +1788,7 @@ const PtcTooltip = class {
|
|
|
1282
1788
|
//truncatedText = truncatedText.substring(0, lastSpace);
|
|
1283
1789
|
truncatedText += '... ';
|
|
1284
1790
|
}
|
|
1285
|
-
return (h(Host, { class: { [this.textDisplay]: true, [this.width]: true, 'no-overflow': this.noOverflow } }, this.styles && h("style", null, this.styles), this.hideOnMobile && this.isSmallScreen ? (h("div", null, this.description)) : (h("div", { class: "text-content" }, this.textLines > 0 && !!this.textLines ? (h("div", { class: "ellipsis-by-line-boxing", style: cutOff, innerHTML: this.description })) : (h("div", { class: classMap }, truncatedText)), h("div", { class: `tooltip ${this.position} ${this.theme}`, innerHTML: this.description })))));
|
|
1791
|
+
return (h$1(Host, { class: { [this.textDisplay]: true, [this.width]: true, 'no-overflow': this.noOverflow } }, this.styles && h$1("style", null, this.styles), this.hideOnMobile && this.isSmallScreen ? (h$1("div", null, this.description)) : (h$1("div", { class: "text-content" }, this.textLines > 0 && !!this.textLines ? (h$1("div", { class: "ellipsis-by-line-boxing", style: cutOff, innerHTML: this.description })) : (h$1("div", { class: classMap }, truncatedText)), h$1("div", { class: `tooltip ${this.position} ${this.theme}`, innerHTML: this.description })))));
|
|
1286
1792
|
}
|
|
1287
1793
|
}
|
|
1288
1794
|
getCssClassMap() {
|
|
@@ -1306,4 +1812,4 @@ const PtcTooltip = class {
|
|
|
1306
1812
|
};
|
|
1307
1813
|
PtcTooltip.style = ptcTooltipCss;
|
|
1308
1814
|
|
|
1309
|
-
export { IconAsset as icon_asset, MaxWidthContainer as max_width_container, PtcButton as ptc_button, PtcCard as ptc_card, PtcDate as ptc_date, PtcImg as ptc_img, PtcLink as ptc_link, PtcModal as ptc_modal, PtcPara as ptc_para, PtcPicture as ptc_picture, PtcPreloaderSection as ptc_preloader_section, PtcProgressBar as ptc_progress_bar, PtcSocialShare as ptc_social_share, PtcSpacer as ptc_spacer, PtcSpan as ptc_span, PtcStickyTitle as ptc_sticky_title, PtcTitle as ptc_title, PtcTooltip as ptc_tooltip };
|
|
1815
|
+
export { IconAsset as icon_asset, MaxWidthContainer as max_width_container, PtcButton as ptc_button, PtcCard as ptc_card, PtcDate as ptc_date, PtcImg as ptc_img, PtcLink as ptc_link, PtcMobileSelect as ptc_mobile_select, PtcModal as ptc_modal, PtcPara as ptc_para, PtcPicture as ptc_picture, PtcPreloaderSection as ptc_preloader_section, PtcProgressBar as ptc_progress_bar, PtcSocialShare as ptc_social_share, PtcSpacer as ptc_spacer, PtcSpan as ptc_span, PtcStickyTitle as ptc_sticky_title, PtcTitle as ptc_title, PtcTooltip as ptc_tooltip };
|