@ptcwebops/ptcw-design 0.2.6 → 0.2.8
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.cjs.entry.js +2 -2
- package/dist/cjs/{index-425f1f02.js → index-0b899fc6.js} +152 -87
- package/dist/cjs/list-item.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/lottie-player.cjs.entry.js +2 -2
- package/dist/cjs/my-component.cjs.entry.js +2 -2
- package/dist/cjs/ptc-announcement_2.cjs.entry.js +68 -0
- package/dist/cjs/ptc-avatar.cjs.entry.js +2 -2
- package/dist/cjs/{ptc-button_2.cjs.entry.js → ptc-button.cjs.entry.js} +2 -27
- package/dist/cjs/ptc-card.cjs.entry.js +8 -4
- package/dist/cjs/ptc-countdown.cjs.entry.js +2 -2
- package/dist/cjs/ptc-date.cjs.entry.js +2 -2
- package/dist/cjs/ptc-footer.cjs.entry.js +2 -2
- package/dist/cjs/{ptc-form_3.cjs.entry.js → ptc-form.cjs.entry.js} +2 -56
- package/dist/cjs/ptc-img.cjs.entry.js +2 -2
- package/dist/cjs/ptc-input.cjs.entry.js +31 -0
- package/dist/cjs/ptc-link.cjs.entry.js +2 -2
- package/dist/cjs/ptc-list.cjs.entry.js +2 -2
- package/dist/cjs/ptc-lottie.cjs.entry.js +2 -2
- package/dist/cjs/ptc-nav-item.cjs.entry.js +2 -2
- package/dist/cjs/ptc-nav.cjs.entry.js +2 -2
- package/dist/cjs/ptc-overlay.cjs.entry.js +2 -2
- package/dist/cjs/ptc-para.cjs.entry.js +2 -2
- package/dist/cjs/ptc-picture.cjs.entry.js +2 -2
- package/dist/cjs/ptc-select.cjs.entry.js +35 -0
- package/dist/cjs/ptc-spacer.cjs.entry.js +2 -2
- package/dist/cjs/ptc-span.cjs.entry.js +2 -2
- package/dist/cjs/ptc-title.cjs.entry.js +2 -2
- package/dist/cjs/ptcw-design.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ptc-announcement/ptc-announcement.css +71 -9
- package/dist/collection/components/ptc-announcement/ptc-announcement.js +58 -15
- package/dist/collection/components/ptc-card/ptc-card.css +13 -2
- package/dist/collection/components/ptc-card/ptc-card.js +23 -1
- package/dist/collection/components/ptc-svg-btn/ptc-svg-btn.css +2 -2
- package/dist/custom-elements/index.js +67 -55
- package/dist/esm/icon-asset.entry.js +2 -2
- package/dist/esm/{index-e3922662.js → index-eb8ce23d.js} +152 -87
- package/dist/esm/list-item.entry.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/lottie-player.entry.js +2 -2
- package/dist/esm/my-component.entry.js +2 -2
- package/dist/esm/ptc-announcement_2.entry.js +63 -0
- package/dist/esm/ptc-avatar.entry.js +2 -2
- package/dist/esm/{ptc-button_2.entry.js → ptc-button.entry.js} +3 -27
- package/dist/esm/ptc-card.entry.js +8 -4
- package/dist/esm/ptc-countdown.entry.js +2 -2
- package/dist/esm/ptc-date.entry.js +2 -2
- package/dist/esm/ptc-footer.entry.js +2 -2
- package/dist/esm/{ptc-form_3.entry.js → ptc-form.entry.js} +3 -55
- package/dist/esm/ptc-img.entry.js +2 -2
- package/dist/esm/ptc-input.entry.js +27 -0
- package/dist/esm/ptc-link.entry.js +2 -2
- package/dist/esm/ptc-list.entry.js +2 -2
- package/dist/esm/ptc-lottie.entry.js +2 -2
- package/dist/esm/ptc-nav-item.entry.js +2 -2
- package/dist/esm/ptc-nav.entry.js +2 -2
- package/dist/esm/ptc-overlay.entry.js +2 -2
- package/dist/esm/ptc-para.entry.js +2 -2
- package/dist/esm/ptc-picture.entry.js +2 -2
- package/dist/esm/ptc-select.entry.js +31 -0
- package/dist/esm/ptc-spacer.entry.js +2 -2
- package/dist/esm/ptc-span.entry.js +2 -2
- package/dist/esm/ptc-title.entry.js +2 -2
- package/dist/esm/ptcw-design.js +3 -3
- package/dist/ptcw-design/p-01f4bf71.entry.js +1 -0
- package/dist/ptcw-design/p-08827128.entry.js +1 -0
- package/dist/ptcw-design/p-1b3b0193.entry.js +1 -0
- package/dist/ptcw-design/p-1bf9750d.entry.js +1 -0
- package/dist/ptcw-design/p-22fd400f.entry.js +1 -0
- package/dist/ptcw-design/p-23d07898.entry.js +1 -0
- package/dist/ptcw-design/p-29c54eb0.entry.js +1 -0
- package/dist/ptcw-design/p-2b59ce7a.entry.js +1 -0
- package/dist/ptcw-design/{p-270b1d80.js → p-2ca3c085.js} +1 -1
- package/dist/ptcw-design/p-32ef3a79.entry.js +1 -0
- package/dist/ptcw-design/p-389a5670.entry.js +1 -0
- package/dist/ptcw-design/p-3f42afb6.entry.js +1 -0
- package/dist/ptcw-design/p-51443fbb.entry.js +1 -0
- package/dist/ptcw-design/p-54794e45.entry.js +1 -0
- package/dist/ptcw-design/p-5ae43421.entry.js +1 -0
- package/dist/ptcw-design/p-63b55aba.entry.js +1 -0
- package/dist/ptcw-design/p-6b5c0d9d.entry.js +1 -0
- package/dist/ptcw-design/p-7076b32f.entry.js +1 -0
- package/dist/ptcw-design/{p-97f58338.entry.js → p-75dc7328.entry.js} +1 -1
- package/dist/ptcw-design/p-a86452af.entry.js +1 -0
- package/dist/ptcw-design/p-d3f9852f.entry.js +1 -0
- package/dist/ptcw-design/p-d80b24c9.entry.js +1 -0
- package/dist/ptcw-design/p-e4b96b46.entry.js +1 -0
- package/dist/ptcw-design/p-e8650244.entry.js +1 -0
- package/dist/ptcw-design/p-ef6acb81.entry.js +1 -0
- package/dist/ptcw-design/p-f94c4594.entry.js +1 -0
- package/dist/ptcw-design/p-fd29d9dd.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-announcement/ptc-announcement.d.ts +12 -4
- package/dist/types/components/ptc-card/ptc-card.d.ts +4 -0
- package/dist/types/components.d.ts +34 -10
- package/dist/types/stencil-public-runtime.d.ts +189 -186
- package/loader/index.d.ts +0 -1
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/ptc-announcement.cjs.entry.js +0 -35
- package/dist/esm/ptc-announcement.entry.js +0 -31
- package/dist/ptcw-design/p-0227c172.entry.js +0 -1
- package/dist/ptcw-design/p-111b1b90.entry.js +0 -1
- package/dist/ptcw-design/p-15dc1842.entry.js +0 -1
- package/dist/ptcw-design/p-175698af.entry.js +0 -1
- package/dist/ptcw-design/p-1f09a61f.entry.js +0 -1
- package/dist/ptcw-design/p-46dda8d6.entry.js +0 -1
- package/dist/ptcw-design/p-53a11d94.entry.js +0 -1
- package/dist/ptcw-design/p-56cd3d67.entry.js +0 -1
- package/dist/ptcw-design/p-5a3f2869.entry.js +0 -1
- package/dist/ptcw-design/p-62a09486.entry.js +0 -1
- package/dist/ptcw-design/p-773375df.entry.js +0 -1
- package/dist/ptcw-design/p-7e01a6f6.entry.js +0 -1
- package/dist/ptcw-design/p-ade7469e.entry.js +0 -1
- package/dist/ptcw-design/p-c1c2eff4.entry.js +0 -1
- package/dist/ptcw-design/p-d378a52b.entry.js +0 -1
- package/dist/ptcw-design/p-d5fcf7cd.entry.js +0 -1
- package/dist/ptcw-design/p-e4409a82.entry.js +0 -1
- package/dist/ptcw-design/p-e686d4b7.entry.js +0 -1
- package/dist/ptcw-design/p-e7e248c2.entry.js +0 -1
- package/dist/ptcw-design/p-e93374d9.entry.js +0 -1
- package/dist/ptcw-design/p-ea705937.entry.js +0 -1
- package/dist/ptcw-design/p-f1eb2b51.entry.js +0 -1
- package/dist/ptcw-design/p-f2d4dff4.entry.js +0 -1
|
@@ -13,8 +13,8 @@ const doc = win.document || { head: {} };
|
|
|
13
13
|
const plt = {
|
|
14
14
|
$flags$: 0,
|
|
15
15
|
$resourcesUrl$: '',
|
|
16
|
-
jmp: h => h(),
|
|
17
|
-
raf: h => requestAnimationFrame(h),
|
|
16
|
+
jmp: (h) => h(),
|
|
17
|
+
raf: (h) => requestAnimationFrame(h),
|
|
18
18
|
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
19
19
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
20
20
|
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
@@ -23,7 +23,7 @@ const promiseResolve = (v) => Promise.resolve(v);
|
|
|
23
23
|
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
24
24
|
try {
|
|
25
25
|
new CSSStyleSheet();
|
|
26
|
-
return typeof
|
|
26
|
+
return typeof new CSSStyleSheet().replace === 'function';
|
|
27
27
|
}
|
|
28
28
|
catch (e) { }
|
|
29
29
|
return false;
|
|
@@ -222,7 +222,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
222
222
|
typeof classData !== 'object'
|
|
223
223
|
? classData
|
|
224
224
|
: Object.keys(classData)
|
|
225
|
-
.filter(k => classData[k])
|
|
225
|
+
.filter((k) => classData[k])
|
|
226
226
|
.join(' ');
|
|
227
227
|
}
|
|
228
228
|
}
|
|
@@ -311,8 +311,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
311
311
|
const classList = elm.classList;
|
|
312
312
|
const oldClasses = parseClassList(oldValue);
|
|
313
313
|
const newClasses = parseClassList(newValue);
|
|
314
|
-
classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
|
|
315
|
-
classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
|
|
314
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
315
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
316
316
|
}
|
|
317
317
|
else if (memberName === 'style') {
|
|
318
318
|
// update style attribute, css properties and values
|
|
@@ -347,7 +347,9 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
347
347
|
newValue(elm);
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
else if ((!isProp ) &&
|
|
350
|
+
else if ((!isProp ) &&
|
|
351
|
+
memberName[0] === 'o' &&
|
|
352
|
+
memberName[1] === 'n') {
|
|
351
353
|
// Event Handlers
|
|
352
354
|
// so if the member name starts with "on" and the 3rd characters is
|
|
353
355
|
// a capital letter, and it's not already a member on the element,
|
|
@@ -394,7 +396,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
394
396
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
395
397
|
if (memberName === 'list') {
|
|
396
398
|
isProp = false;
|
|
397
|
-
// tslint:disable-next-line: triple-equals
|
|
398
399
|
}
|
|
399
400
|
else if (oldValue == null || elm[memberName] != n) {
|
|
400
401
|
elm[memberName] = n;
|
|
@@ -448,7 +449,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
448
449
|
// if the element passed in is a shadow root, which is a document fragment
|
|
449
450
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
450
451
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
451
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
452
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
453
|
+
? newVnode.$elm$.host
|
|
454
|
+
: newVnode.$elm$;
|
|
452
455
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
453
456
|
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
454
457
|
{
|
|
@@ -492,14 +495,17 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
492
495
|
}
|
|
493
496
|
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
494
497
|
// create a slot reference node
|
|
495
|
-
elm = newVNode.$elm$ =
|
|
498
|
+
elm = newVNode.$elm$ =
|
|
499
|
+
doc.createTextNode('');
|
|
496
500
|
}
|
|
497
501
|
else {
|
|
498
502
|
if (!isSvgMode) {
|
|
499
503
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
500
504
|
}
|
|
501
505
|
// create element
|
|
502
|
-
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
506
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
507
|
+
? 'slot-fb'
|
|
508
|
+
: newVNode.$tag$)
|
|
503
509
|
);
|
|
504
510
|
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
505
511
|
isSvgMode = false;
|
|
@@ -866,7 +872,7 @@ const relocateSlotContent = (elm) => {
|
|
|
866
872
|
// that is suppose to always represent the original content location
|
|
867
873
|
if (isNodeLocatedInSlot(node, slotNameAttr)) {
|
|
868
874
|
// it's possible we've already decided to relocate this node
|
|
869
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
875
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
870
876
|
// made some changes to slots
|
|
871
877
|
// let's make sure we also double check
|
|
872
878
|
// fallbacks are correctly hidden or shown
|
|
@@ -885,9 +891,9 @@ const relocateSlotContent = (elm) => {
|
|
|
885
891
|
});
|
|
886
892
|
}
|
|
887
893
|
if (node['s-sr']) {
|
|
888
|
-
relocateNodes.map(relocateNode => {
|
|
894
|
+
relocateNodes.map((relocateNode) => {
|
|
889
895
|
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
|
|
890
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
896
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
891
897
|
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
892
898
|
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
893
899
|
}
|
|
@@ -895,7 +901,7 @@ const relocateSlotContent = (elm) => {
|
|
|
895
901
|
});
|
|
896
902
|
}
|
|
897
903
|
}
|
|
898
|
-
else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {
|
|
904
|
+
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
899
905
|
// so far this element does not have a slot home, not setting slotRefNode on purpose
|
|
900
906
|
// if we never find a home for this element then we'll need to hide it
|
|
901
907
|
relocateNodes.push({
|
|
@@ -975,7 +981,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
975
981
|
if (!nodeToRelocate['s-ol']) {
|
|
976
982
|
// add a reference node marking this node's original location
|
|
977
983
|
// keep a reference to this node for later lookups
|
|
978
|
-
orgLocationNode =
|
|
984
|
+
orgLocationNode =
|
|
985
|
+
doc.createTextNode('');
|
|
979
986
|
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
980
987
|
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
981
988
|
}
|
|
@@ -999,7 +1006,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
999
1006
|
}
|
|
1000
1007
|
}
|
|
1001
1008
|
}
|
|
1002
|
-
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1009
|
+
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1010
|
+
nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1003
1011
|
// we've checked that it's worth while to relocate
|
|
1004
1012
|
// since that the node to relocate
|
|
1005
1013
|
// has a different next sibling or parent relocated
|
|
@@ -1045,6 +1053,13 @@ const createEvent = (ref, name, flags) => {
|
|
|
1045
1053
|
},
|
|
1046
1054
|
};
|
|
1047
1055
|
};
|
|
1056
|
+
/**
|
|
1057
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
1058
|
+
* @param elm the target of the Event
|
|
1059
|
+
* @param name the name to give the custom Event
|
|
1060
|
+
* @param opts options for configuring a custom Event
|
|
1061
|
+
* @returns the custom Event
|
|
1062
|
+
*/
|
|
1048
1063
|
const emitEvent = (elm, name, opts) => {
|
|
1049
1064
|
const ev = plt.ce(name, opts);
|
|
1050
1065
|
elm.dispatchEvent(ev);
|
|
@@ -1052,7 +1067,7 @@ const emitEvent = (elm, name, opts) => {
|
|
|
1052
1067
|
};
|
|
1053
1068
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1054
1069
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1055
|
-
ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
|
|
1070
|
+
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
1056
1071
|
}
|
|
1057
1072
|
};
|
|
1058
1073
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1114,7 +1129,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1114
1129
|
// ok, so turns out there are some child host elements
|
|
1115
1130
|
// waiting on this parent element to load
|
|
1116
1131
|
// let's fire off all update callbacks waiting
|
|
1117
|
-
rc.map(cb => cb());
|
|
1132
|
+
rc.map((cb) => cb());
|
|
1118
1133
|
elm['s-rc'] = undefined;
|
|
1119
1134
|
}
|
|
1120
1135
|
endRender();
|
|
@@ -1224,7 +1239,8 @@ const safeCall = (instance, method, arg) => {
|
|
|
1224
1239
|
const then = (promise, thenFn) => {
|
|
1225
1240
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1226
1241
|
};
|
|
1227
|
-
const addHydratedFlag = (elm) =>
|
|
1242
|
+
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1243
|
+
;
|
|
1228
1244
|
const parsePropertyValue = (propValue, propType) => {
|
|
1229
1245
|
// ensure this value is of the correct prop type
|
|
1230
1246
|
if (propValue != null && !isComplexType(propValue)) {
|
|
@@ -1268,7 +1284,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1268
1284
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1269
1285
|
if (watchMethods) {
|
|
1270
1286
|
// this instance is watching for when this property changed
|
|
1271
|
-
watchMethods.map(watchMethodName => {
|
|
1287
|
+
watchMethods.map((watchMethodName) => {
|
|
1272
1288
|
try {
|
|
1273
1289
|
// fire off each of the watch methods that are watching this property
|
|
1274
1290
|
instance[watchMethodName](newVal, oldVal, propName);
|
|
@@ -1298,7 +1314,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1298
1314
|
const members = Object.entries(cmpMeta.$members$);
|
|
1299
1315
|
const prototype = Cstr.prototype;
|
|
1300
1316
|
members.map(([memberName, [memberFlags]]) => {
|
|
1301
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1317
|
+
if ((memberFlags & 31 /* Prop */ ||
|
|
1318
|
+
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1302
1319
|
// proxyComponent - prop
|
|
1303
1320
|
Object.defineProperty(prototype, memberName, {
|
|
1304
1321
|
get() {
|
|
@@ -1313,7 +1330,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1313
1330
|
enumerable: true,
|
|
1314
1331
|
});
|
|
1315
1332
|
}
|
|
1316
|
-
else if (flags & 1 /* isElementConstructor */ &&
|
|
1333
|
+
else if (flags & 1 /* isElementConstructor */ &&
|
|
1334
|
+
memberFlags & 64 /* Method */) {
|
|
1317
1335
|
// proxyComponent - method
|
|
1318
1336
|
Object.defineProperty(prototype, memberName, {
|
|
1319
1337
|
value(...args) {
|
|
@@ -1328,6 +1346,51 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1328
1346
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1329
1347
|
plt.jmp(() => {
|
|
1330
1348
|
const propName = attrNameToPropName.get(attrName);
|
|
1349
|
+
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1350
|
+
// in the case where an attribute was set inline.
|
|
1351
|
+
// ```html
|
|
1352
|
+
// <my-component some-attribute="some-value"></my-component>
|
|
1353
|
+
// ```
|
|
1354
|
+
//
|
|
1355
|
+
// There is an edge case where a developer sets the attribute inline on a custom element and then
|
|
1356
|
+
// programmatically changes it before it has been upgraded as shown below:
|
|
1357
|
+
//
|
|
1358
|
+
// ```html
|
|
1359
|
+
// <!-- this component has _not_ been upgraded yet -->
|
|
1360
|
+
// <my-component id="test" some-attribute="some-value"></my-component>
|
|
1361
|
+
// <script>
|
|
1362
|
+
// // grab non-upgraded component
|
|
1363
|
+
// el = document.querySelector("#test");
|
|
1364
|
+
// el.someAttribute = "another-value";
|
|
1365
|
+
// // upgrade component
|
|
1366
|
+
// customElements.define('my-component', MyComponent);
|
|
1367
|
+
// </script>
|
|
1368
|
+
// ```
|
|
1369
|
+
// In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1370
|
+
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1371
|
+
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1372
|
+
// the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
|
|
1373
|
+
//
|
|
1374
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
|
|
1375
|
+
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
1376
|
+
//
|
|
1377
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1378
|
+
//
|
|
1379
|
+
// TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
|
|
1380
|
+
// properties here given that this goes against best practices outlined here
|
|
1381
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
|
|
1382
|
+
if (this.hasOwnProperty(propName)) {
|
|
1383
|
+
newValue = this[propName];
|
|
1384
|
+
delete this[propName];
|
|
1385
|
+
}
|
|
1386
|
+
else if (prototype.hasOwnProperty(propName) &&
|
|
1387
|
+
typeof this[propName] === 'number' &&
|
|
1388
|
+
this[propName] == newValue) {
|
|
1389
|
+
// if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
|
|
1390
|
+
// APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
|
|
1391
|
+
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1392
|
+
return;
|
|
1393
|
+
}
|
|
1331
1394
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1332
1395
|
});
|
|
1333
1396
|
};
|
|
@@ -1364,7 +1427,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1364
1427
|
endLoad();
|
|
1365
1428
|
}
|
|
1366
1429
|
if (!Cstr.isProxied) {
|
|
1367
|
-
// we'
|
|
1430
|
+
// we've never proxied this Constructor before
|
|
1368
1431
|
// let's add the getters/setters to its prototype before
|
|
1369
1432
|
// the first time we create an instance of the implementation
|
|
1370
1433
|
{
|
|
@@ -1413,7 +1476,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1413
1476
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1414
1477
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1415
1478
|
if (ancestorComponent && ancestorComponent['s-rc']) {
|
|
1416
|
-
// this is the
|
|
1479
|
+
// this is the initial load and this component it has an ancestor component
|
|
1417
1480
|
// but the ancestor component has NOT fired its will update lifecycle yet
|
|
1418
1481
|
// so let's just cool our jets and wait for the ancestor to continue first
|
|
1419
1482
|
// this will get fired off when the ancestor component
|
|
@@ -1497,7 +1560,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1497
1560
|
const hostRef = getHostRef(elm);
|
|
1498
1561
|
{
|
|
1499
1562
|
if (hostRef.$rmListeners$) {
|
|
1500
|
-
hostRef.$rmListeners$.map(rmListener => rmListener());
|
|
1563
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1501
1564
|
hostRef.$rmListeners$ = undefined;
|
|
1502
1565
|
}
|
|
1503
1566
|
}
|
|
@@ -1516,71 +1579,73 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1516
1579
|
let isBootstrapping = true;
|
|
1517
1580
|
Object.assign(plt, options);
|
|
1518
1581
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1519
|
-
lazyBundles.map(lazyBundle =>
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1582
|
+
lazyBundles.map((lazyBundle) => {
|
|
1583
|
+
lazyBundle[1].map((compactMeta) => {
|
|
1584
|
+
const cmpMeta = {
|
|
1585
|
+
$flags$: compactMeta[0],
|
|
1586
|
+
$tagName$: compactMeta[1],
|
|
1587
|
+
$members$: compactMeta[2],
|
|
1588
|
+
$listeners$: compactMeta[3],
|
|
1589
|
+
};
|
|
1590
|
+
{
|
|
1591
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
1592
|
+
}
|
|
1593
|
+
{
|
|
1594
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1595
|
+
}
|
|
1596
|
+
{
|
|
1597
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1598
|
+
}
|
|
1599
|
+
{
|
|
1600
|
+
cmpMeta.$watchers$ = {};
|
|
1601
|
+
}
|
|
1602
|
+
const tagName = cmpMeta.$tagName$;
|
|
1603
|
+
const HostElement = class extends HTMLElement {
|
|
1604
|
+
// StencilLazyHost
|
|
1605
|
+
constructor(self) {
|
|
1606
|
+
// @ts-ignore
|
|
1607
|
+
super(self);
|
|
1608
|
+
self = this;
|
|
1609
|
+
registerHost(self, cmpMeta);
|
|
1610
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1611
|
+
// this component is using shadow dom
|
|
1612
|
+
// and this browser supports shadow dom
|
|
1613
|
+
// add the read-only property "shadowRoot" to the host element
|
|
1614
|
+
// adding the shadow root build conditionals to minimize runtime
|
|
1552
1615
|
{
|
|
1553
|
-
|
|
1616
|
+
{
|
|
1617
|
+
self.attachShadow({ mode: 'open' });
|
|
1618
|
+
}
|
|
1554
1619
|
}
|
|
1555
1620
|
}
|
|
1556
1621
|
}
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1622
|
+
connectedCallback() {
|
|
1623
|
+
if (appLoadFallback) {
|
|
1624
|
+
clearTimeout(appLoadFallback);
|
|
1625
|
+
appLoadFallback = null;
|
|
1626
|
+
}
|
|
1627
|
+
if (isBootstrapping) {
|
|
1628
|
+
// connectedCallback will be processed once all components have been registered
|
|
1629
|
+
deferredConnectedCallbacks.push(this);
|
|
1630
|
+
}
|
|
1631
|
+
else {
|
|
1632
|
+
plt.jmp(() => connectedCallback(this));
|
|
1633
|
+
}
|
|
1562
1634
|
}
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
deferredConnectedCallbacks.push(this);
|
|
1635
|
+
disconnectedCallback() {
|
|
1636
|
+
plt.jmp(() => disconnectedCallback(this));
|
|
1566
1637
|
}
|
|
1567
|
-
|
|
1568
|
-
|
|
1638
|
+
componentOnReady() {
|
|
1639
|
+
return getHostRef(this).$onReadyPromise$;
|
|
1569
1640
|
}
|
|
1641
|
+
};
|
|
1642
|
+
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1643
|
+
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1644
|
+
cmpTags.push(tagName);
|
|
1645
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1570
1646
|
}
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
}
|
|
1574
|
-
componentOnReady() {
|
|
1575
|
-
return getHostRef(this).$onReadyPromise$;
|
|
1576
|
-
}
|
|
1577
|
-
};
|
|
1578
|
-
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1579
|
-
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1580
|
-
cmpTags.push(tagName);
|
|
1581
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1582
|
-
}
|
|
1583
|
-
}));
|
|
1647
|
+
});
|
|
1648
|
+
});
|
|
1584
1649
|
{
|
|
1585
1650
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1586
1651
|
visibilityStyle.setAttribute('data-styles', '');
|
|
@@ -1589,7 +1654,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1589
1654
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1590
1655
|
isBootstrapping = false;
|
|
1591
1656
|
if (deferredConnectedCallbacks.length) {
|
|
1592
|
-
deferredConnectedCallbacks.map(host => host.connectedCallback());
|
|
1657
|
+
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
1593
1658
|
}
|
|
1594
1659
|
else {
|
|
1595
1660
|
{
|
|
@@ -1614,10 +1679,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1614
1679
|
$instanceValues$: new Map(),
|
|
1615
1680
|
};
|
|
1616
1681
|
{
|
|
1617
|
-
hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));
|
|
1682
|
+
hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
|
|
1618
1683
|
}
|
|
1619
1684
|
{
|
|
1620
|
-
hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
|
|
1685
|
+
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1621
1686
|
elm['s-p'] = [];
|
|
1622
1687
|
elm['s-rc'] = [];
|
|
1623
1688
|
}
|
|
@@ -1639,7 +1704,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1639
1704
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1640
1705
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1641
1706
|
/* webpackMode: "lazy" */
|
|
1642
|
-
`./${bundleId}.entry.js${''}`).then(importedModule => {
|
|
1707
|
+
`./${bundleId}.entry.js${''}`).then((importedModule) => {
|
|
1643
1708
|
{
|
|
1644
1709
|
cmpModules.set(bundleId, importedModule);
|
|
1645
1710
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-eb8ce23d.js';
|
|
2
2
|
|
|
3
3
|
const listItemCss = ":host{display:block}";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
let ListItem = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.listType = 'para-list';
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-eb8ce23d.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
4
|
+
Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
return promiseResolve();
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["ptc-
|
|
13
|
+
return bootstrapLazy([["ptc-card",[[1,"ptc-card",{"cardType":[1,"card-type"],"cardHref":[1,"card-href"],"target":[1],"rel":[1],"hasImage":[4,"has-image"],"hasVideo":[4,"has-video"],"hasLottie":[4,"has-lottie"],"heading":[1],"headingTransform":[1,"heading-transform"],"cardDate":[1,"card-date"],"styles":[1]}]]],["ptc-link",[[1,"ptc-link",{"disabled":[516],"external":[516],"href":[1],"target":[1],"linkTitle":[1,"link-title"],"theme":[1],"uppercase":[4],"fontSize":[1,"font-size"]}]]],["ptc-lottie",[[1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]]],["list-item",[[4,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"]}]]],["my-component",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-avatar",[[1,"ptc-avatar"]]],["ptc-button",[[1,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"],"linkHref":[1,"link-href"],"target":[1],"rel":[1],"tabNav":[2,"tab-nav"],"styles":[1]}]]],["ptc-countdown",[[1,"ptc-countdown"]]],["ptc-footer",[[1,"ptc-footer"]]],["ptc-form",[[6,"ptc-form",{"value":[32],"inputValue":[32],"selectValue":[32]}]]],["ptc-img",[[0,"ptc-img",{"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"imgUrl":[1,"img-url"],"imageType":[1,"image-type"],"borderRadius":[1,"border-radius"],"loadMode":[1,"load-mode"]},[[9,"resize","WindowResize"]]]]],["ptc-input",[[6,"ptc-input",{"type":[1],"dataEloquaName":[1,"data-eloqua-name"],"inputId":[1,"input-id"],"inputName":[1,"input-name"],"focused":[32]}]]],["ptc-list",[[0,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-nav",[[1,"ptc-nav"]]],["ptc-nav-item",[[1,"ptc-nav-item",{"url":[1025],"label":[1025],"ariaExpanded":[1028,"aria-expanded"],"depth":[1538],"hasChildren":[1028,"has-children"],"parentExpanded":[1540,"parent-expanded"],"navType":[1,"nav-type"]},[[0,"handleClick","handleClick"],[9,"resize","handleResize"]]]]],["ptc-overlay",[[4,"ptc-overlay"]]],["ptc-para",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture",[[1,"ptc-picture",{"src":[1],"alt":[1],"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"borderRadius":[1,"border-radius"],"height":[1],"width":[1],"objectFit":[1,"object-fit"],"styles":[1],"oldSrc":[32]},[[9,"resize","WindowResize"]]]]],["ptc-select",[[6,"ptc-select",{"dataEloquaName":[1,"data-eloqua-name"],"selectId":[1,"select-id"],"name":[1],"valueOptions":[1040]}]]],["ptc-spacer",[[1,"ptc-spacer",{"breakpoint":[1],"size":[1],"direction":[1]}]]],["ptc-span",[[1,"ptc-span",{"spanStyle":[1,"span-style"],"display":[1],"styles":[1]}]]],["ptc-title",[[6,"ptc-title",{"type":[1],"textAlign":[1,"text-align"],"upperline":[1]}]]],["ptc-announcement_2",[[1,"ptc-announcement",{"barTitle":[1,"bar-title"],"Description":[1,"description"],"linkText":[513,"link-text"],"visible":[1540],"linkUrl":[513,"link-url"],"tempContainer":[4,"temp-container"]}],[1,"ptc-svg-btn",{"svgName":[1,"svg-name"]}]]],["icon-asset",[[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]],["lottie-player",[[1,"lottie-player",{"mode":[1],"autoplay":[4],"background":[513],"controls":[4],"count":[2],"direction":[2],"hover":[4],"loop":[516],"renderer":[1],"speed":[2],"src":[1],"currentState":[1,"current-state"],"seeker":[8],"intermission":[2],"play":[64],"pause":[64],"stop":[64],"seek":[64],"getLottie":[64],"setSpeed":[64],"setDirection":[64],"setLooping":[64],"togglePlay":[64],"toggleLooping":[64]}]]],["ptc-date",[[1,"ptc-date",{"year":[2],"month":[2],"day":[2],"country":[1],"dateString":[1,"date-string"],"dateStyles":[1,"date-styles"]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-eb8ce23d.js';
|
|
2
2
|
|
|
3
3
|
function createCommonjsModule(fn, basedir, module) {
|
|
4
4
|
return module = {
|
|
@@ -13113,7 +13113,7 @@ var PlayMode;
|
|
|
13113
13113
|
|
|
13114
13114
|
const lottiePlayerCss = ":host{--lottie-player-toolbar-height:35px;--lottie-player-toolbar-background-color:transparent;--lottie-player-toolbar-icon-color:#999;--lottie-player-toolbar-icon-hover-color:#222;--lottie-player-toolbar-icon-active-color:#555;--lottie-player-seeker-track-color:#CCC;--lottie-player-seeker-thumb-color:rgba(0, 107, 120, 0.8);display:block;width:100%;height:100%}.main{box-sizing:border-box;display:inline-grid;grid-auto-columns:auto;grid-template-rows:auto;position:relative;height:inherit;width:inherit}.main.controls{grid-template-rows:1fr var(--lottie-player-toolbar-height)}.animation{overflow:hidden;height:calc(1fr - var(--lottie-player-toolbar-height))}.toolbar{display:grid;grid-template-columns:32px 32px 1fr 32px 32px;align-items:center;justify-items:center;background-color:var(--lottie-player-toolbar-background-color)}.toolbar button{cursor:pointer;fill:var(--lottie-player-toolbar-icon-color);display:flex;background:none;border:0;padding:0;outline:none;height:100%}.toolbar button:hover{fill:var(--lottie-player-toolbar-icon-hover-color)}.toolbar button.active{fill:var(--lottie-player-toolbar-icon-active-color)}.toolbar button.disabled svg{display:none}.toolbar a{filter:grayscale(100%);display:flex;transition:filter .5s, opacity 0.5s;opacity:0.4;height:100%;align-items:center}.toolbar a:hover{filter:none;display:flex;opacity:1}.seeker{-webkit-appearance:none;width:95%;outline:none}.seeker::-webkit-slider-runnable-track{width:100%;height:5px;cursor:pointer;background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-webkit-slider-thumb{height:15px;width:15px;border-radius:50%;background:var(--lottie-player-seeker-thumb-color);cursor:pointer;-webkit-appearance:none;margin-top:-5px}.seeker:focus::-webkit-slider-runnable-track{background:#999}.seeker::-moz-range-track{width:100%;height:5px;cursor:pointer;background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-moz-range-thumb{height:15px;width:15px;border-radius:50%;background:var(--lottie-player-seeker-thumb-color);cursor:pointer}.seeker::-ms-track{width:100%;height:5px;cursor:pointer;background:transparent;border-color:transparent;color:transparent}.seeker::-ms-fill-lower{background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-ms-fill-upper{background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-ms-thumb{border:0;height:15px;width:15px;border-radius:50%;background:var(--lottie-player-seeker-thumb-color);cursor:pointer}.seeker:focus::-ms-fill-lower{background:var(--lottie-player-seeker-track-color)}.seeker:focus::-ms-fill-upper{background:var(--lottie-player-seeker-track-color)}.error{display:flex;justify-content:center;height:100%;align-items:center}";
|
|
13115
13115
|
|
|
13116
|
-
|
|
13116
|
+
let LottiePlayer = class {
|
|
13117
13117
|
constructor(hostRef) {
|
|
13118
13118
|
registerInstance(this, hostRef);
|
|
13119
13119
|
this.error = createEvent(this, "error", 7);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-eb8ce23d.js';
|
|
2
2
|
|
|
3
3
|
function format(first, middle, last) {
|
|
4
4
|
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
|
@@ -6,7 +6,7 @@ function format(first, middle, last) {
|
|
|
6
6
|
|
|
7
7
|
const myComponentCss = ":host{display:block}";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
let MyComponent = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
registerInstance(this, hostRef);
|
|
12
12
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-eb8ce23d.js';
|
|
2
|
+
|
|
3
|
+
const ptcAnnouncementCss = ":host{display:block}.announcement{width:100%;position:relative;background-color:#e4e7e9;z-index:860;background-size:cover;background-repeat:repeat-x;border:1px solid var(--color-secondary-turtlegreen);-webkit-box-shadow:1px 1px 9px 0 rgba(0, 0, 0, 0.56);box-shadow:1px 1px 9px 0 rgba(0, 0, 0, 0.56);z-index:999;display:none}.visible{display:block}.content-wrapper{display:flex;padding:5px 15px;margin:0 auto;align-items:center;justify-content:space-between}@media screen and (min-width: 768px){.content-wrapper{padding:10px 15px}}@media screen and (min-width: 768px){.temp-container{width:750px}}@media screen and (min-width: 992px){.temp-container{width:970px}}@media screen and (min-width: 1200px){.temp-container{width:1170px}}@media screen and (min-width: 1440px){.temp-container{width:1400px}}@media screen and (min-width: 1600px){.temp-container{width:1560px}}.left-content{display:flex;flex-basis:82%;flex-direction:column}@media screen and (min-width: 768px){.left-content{align-items:flex-start;justify-content:flex-start}}.title{flex-basis:18%;font-family:Raleway;font-size:13px;font-weight:800;font-stretch:normal;font-style:normal;line-height:2.6;letter-spacing:1px;text-align:left;color:#40434a;text-transform:uppercase}.ptc-svg-btn{flex-basis:18%}.bar-close{padding-right:15px}.description{flex-basis:82%;font-family:Raleway;font-size:13px;font-weight:500;font-stretch:normal;font-style:normal;line-height:1.4;letter-spacing:normal;text-align:left;color:#40434a;}a{color:#3b4550;-webkit-transition:color 0.3s ease;-o-transition:color 0.3s ease;transition:color 0.3s ease;font-weight:700;border-bottom:0.15rem solid #74c34d;text-decoration:none;margin-left:16px}a:hover{color:#74c34d;text-decoration:none}@media (min-width: 768px){.bar-close{padding-right:0px}}@media (min-width: 992px){.left-content{flex-direction:row;align-items:center}.title{font-size:14px;font-weight:800;line-height:1.86;letter-spacing:1.4px}.description{font-size:16px;font-weight:500;line-height:1.6}}";
|
|
4
|
+
|
|
5
|
+
let PtcAnnouncement = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.close = createEvent(this, "close", 7);
|
|
9
|
+
/**
|
|
10
|
+
* bar title
|
|
11
|
+
*/
|
|
12
|
+
this.barTitle = "";
|
|
13
|
+
/**
|
|
14
|
+
* bar description
|
|
15
|
+
*/
|
|
16
|
+
this.Description = "";
|
|
17
|
+
/**
|
|
18
|
+
* Link Url
|
|
19
|
+
*/
|
|
20
|
+
this.linkUrl = '#';
|
|
21
|
+
this.closeClick = () => {
|
|
22
|
+
this.visible = false;
|
|
23
|
+
this.close.emit();
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
const classMap = this.getCssClassMap();
|
|
28
|
+
return (h(Host, null, h("div", { class: classMap, part: "part-announcement" }, h("div", { class: this.tempContainer ? 'content-wrapper temp-container' : 'content-wrapper' }, h("div", { class: "left-content", part: "part-left-content" }, !!this.barTitle ? h("div", { class: "title" }, this.barTitle) : null, h("div", { class: "description" }, !!this.Description ? h("span", null, this.Description) : null, !!this.linkText ? (h("a", { href: this.linkUrl, title: this.linkText }, this.linkText)) : null)), h("ptc-svg-btn", { class: "bar-close", "svg-name": "close", onClick: this.closeClick })))));
|
|
29
|
+
}
|
|
30
|
+
getCssClassMap() {
|
|
31
|
+
return {
|
|
32
|
+
['announcement']: true,
|
|
33
|
+
[this.visible ? 'visible' : '']: true,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
PtcAnnouncement.style = ptcAnnouncementCss;
|
|
38
|
+
|
|
39
|
+
const closeSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 42 41.485">
|
|
40
|
+
<g id="Group_1042" data-name="Group 1042" transform="rotate(180 108.25 87.993)">
|
|
41
|
+
<path id="Line_446" d="M0 0v39.486" class="cls-1" data-name="Line 446"></path>
|
|
42
|
+
<path id="Line_447" d="M0 0h40" class="cls-1" data-name="Line 447"></path>
|
|
43
|
+
<path id="Line_448" d="M0 33.592V0" class="cls-1" data-name="Line 448"></path>
|
|
44
|
+
<path id="Line_449" d="M23.994 0H0" class="cls-1" data-name="Line 449"></path>
|
|
45
|
+
<path id="Line_450" d="M0 0l17.596 17.596" class="cls-2" data-name="Line 450" transform="translate(187.229 147.226)"></path>
|
|
46
|
+
<path id="Line_451" d="M0 7.198L7.199 0" class="cls-2" data-name="Line 451" transform="translate(197.55 147.312)"></path>
|
|
47
|
+
<path id="Path_114" d="M0 7.2L7.2 0" class="cls-2" data-name="Path 114" transform="translate(187.313 157.549)"></path>
|
|
48
|
+
</g>
|
|
49
|
+
</svg>`;
|
|
50
|
+
|
|
51
|
+
const ptcSvgBtnCss = ":host{display:block;cursor:pointer}.svg-close svg .cls-1,.svg-close svg .cls-2{fill:none;stroke-width:2px}.svg-close svg .cls-1{stroke:#40434A;stroke-linecap:square}.svg-close svg .cls-2{stroke:#40434A}.svg-close svg path{-webkit-transition:all 0.25s ease-in-out;-o-transition:all ease-in-out 0.25s;transition:all 0.25s ease-in-out}.svg-close svg .cls-1:first-child{-webkit-transform:translate(175.5px, 135.5px);-ms-transform:translate(175.5px, 135.5px);transform:translate(175.5px, 135.5px)}.svg-close svg .cls-1:nth-child(2){-webkit-transform:translate(175.5px, 174.985px);-ms-transform:translate(175.5px, 174.985px);transform:translate(175.5px, 174.985px)}.svg-close svg .cls-1:nth-child(3){-webkit-transform:translate(215.5px, 141.393px);-ms-transform:translate(215.5px, 141.393px);transform:translate(215.5px, 141.393px)}.svg-close svg .cls-1:nth-child(4){-webkit-transform:translate(175.5px, 135.5px);-ms-transform:translate(175.5px, 135.5px);transform:translate(175.5px, 135.5px)}.svg-close:hover svg .cls-1:first-child{-webkit-transform:translate(175.5px, 162px);-ms-transform:translate(175.5px, 162px);transform:translate(175.5px, 162px)}.svg-close:hover svg .cls-1:nth-child(2){-webkit-transform:translate(149px, 174.985px);-ms-transform:translate(149px, 174.985px);transform:translate(149px, 174.985px)}.svg-close:hover svg .cls-1:nth-child(3){-webkit-transform:translate(215.5px, 174px);-ms-transform:translate(215.5px, 174px);transform:translate(215.5px, 174px)}.svg-close:hover svg .cls-1:nth-child(4){-webkit-transform:translate(152.5px, 135.5px);-ms-transform:translate(152.5px, 135.5px);transform:translate(152.5px, 135.5px)}.svg-close.svg-close-white .cls-1{stroke:#fff}";
|
|
52
|
+
|
|
53
|
+
let PtcSvgBtn = class {
|
|
54
|
+
constructor(hostRef) {
|
|
55
|
+
registerInstance(this, hostRef);
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
58
|
+
return (h(Host, null, !!this.svgName && this.svgName === 'close' ? h("div", { class: 'svg-close', innerHTML: closeSvg }) : null));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
PtcSvgBtn.style = ptcSvgBtnCss;
|
|
62
|
+
|
|
63
|
+
export { PtcAnnouncement as ptc_announcement, PtcSvgBtn as ptc_svg_btn };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-eb8ce23d.js';
|
|
2
2
|
|
|
3
3
|
const ptcAvatarCss = ":host{display:block}";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
let PtcAvatar = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|