@roadtrip/components 3.33.0 → 3.33.2
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/loader.cjs.js +1 -1
- package/dist/cjs/road-badge_14.cjs.entry.js +89 -30
- package/dist/cjs/road-badge_14.cjs.entry.js.map +1 -1
- package/dist/cjs/road-phone-number-input.cjs.entry.js +2 -12
- package/dist/cjs/road-phone-number-input.cjs.entry.js.map +1 -1
- package/dist/cjs/roadtrip.cjs.js +1 -1
- package/dist/collection/components/drawer/drawer.css +8 -0
- package/dist/collection/components/drawer/drawer.js +1 -1
- package/dist/collection/components/drawer/drawer.js.map +1 -1
- package/dist/collection/components/input/input.js +92 -23
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/input-group/input-group.css +10 -7
- package/dist/collection/components/input-group/input-group.js +19 -4
- package/dist/collection/components/input-group/input-group.js.map +1 -1
- package/dist/collection/components/phone-number-input/phone-number-input.js +2 -10
- package/dist/collection/components/phone-number-input/phone-number-input.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/road-badge_14.entry.js +89 -30
- package/dist/esm/road-badge_14.entry.js.map +1 -1
- package/dist/esm/road-phone-number-input.entry.js +2 -12
- package/dist/esm/road-phone-number-input.entry.js.map +1 -1
- package/dist/esm/roadtrip.js +1 -1
- package/dist/roadtrip/{p-913b72de.entry.js → p-55897254.entry.js} +3 -3
- package/dist/roadtrip/p-55897254.entry.js.map +1 -0
- package/dist/roadtrip/{p-ddfe088f.entry.js → p-950b8a43.entry.js} +2 -2
- package/dist/roadtrip/p-950b8a43.entry.js.map +1 -0
- package/dist/roadtrip/roadtrip.css +1 -1
- package/dist/roadtrip/roadtrip.esm.js +1 -1
- package/dist/roadtrip/roadtrip.esm.js.map +1 -1
- package/dist/types/components/input/input.d.ts +1 -1
- package/dist/types/components/input-group/input-group.d.ts +4 -2
- package/dist/types/components/phone-number-input/phone-number-input.d.ts +0 -1
- package/dist/types/components.d.ts +1 -0
- package/hydrate/index.js +241 -210
- package/hydrate/index.mjs +241 -210
- package/package.json +1 -1
- package/dist/collection/components/phone-number-input/constants.js +0 -3
- package/dist/collection/components/phone-number-input/constants.js.map +0 -1
- package/dist/roadtrip/p-913b72de.entry.js.map +0 -1
- package/dist/roadtrip/p-ddfe088f.entry.js.map +0 -1
- package/dist/types/components/phone-number-input/constants.d.ts +0 -1
package/hydrate/index.js
CHANGED
|
@@ -131,7 +131,7 @@ const NAMESPACE = 'roadtrip';
|
|
|
131
131
|
const BUILD = /* roadtrip */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, constructableCSS: false, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
132
132
|
|
|
133
133
|
/*
|
|
134
|
-
Stencil Hydrate Platform v4.27.
|
|
134
|
+
Stencil Hydrate Platform v4.27.0 | MIT Licensed | https://stenciljs.com
|
|
135
135
|
*/
|
|
136
136
|
var __defProp = Object.defineProperty;
|
|
137
137
|
var __export = (target, all) => {
|
|
@@ -151,9 +151,9 @@ var isComplexType = (o) => {
|
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
154
|
-
function queryNonceMetaTagContent(
|
|
154
|
+
function queryNonceMetaTagContent(doc2) {
|
|
155
155
|
var _a, _b, _c;
|
|
156
|
-
return (_c = (_b = (_a =
|
|
156
|
+
return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
// src/utils/regular-expression.ts
|
|
@@ -510,8 +510,8 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
510
510
|
delete hostElm["s-sc"];
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
if (
|
|
514
|
-
initializeDocumentHydrate(
|
|
513
|
+
if (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size) {
|
|
514
|
+
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
515
515
|
}
|
|
516
516
|
hostElm[HYDRATE_ID] = hostId;
|
|
517
517
|
hostElm.removeAttribute(HYDRATE_ID);
|
|
@@ -834,8 +834,8 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
834
834
|
childVNode.$name$ = slotName || null;
|
|
835
835
|
childVNode.$tag$ = "slot";
|
|
836
836
|
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
837
|
-
if (shadowRootNodes
|
|
838
|
-
const slot = childVNode.$elm$ =
|
|
837
|
+
if (shadowRootNodes) {
|
|
838
|
+
const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
839
839
|
if (childVNode.$name$) {
|
|
840
840
|
childVNode.$elm$.setAttribute("name", slotName);
|
|
841
841
|
}
|
|
@@ -1279,10 +1279,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1279
1279
|
var _a;
|
|
1280
1280
|
const scopeId2 = getScopeId(cmpMeta);
|
|
1281
1281
|
const style = styles$1.get(scopeId2);
|
|
1282
|
-
|
|
1283
|
-
return scopeId2;
|
|
1284
|
-
}
|
|
1285
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
1282
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
1286
1283
|
if (style) {
|
|
1287
1284
|
if (typeof style === "string") {
|
|
1288
1285
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -1295,9 +1292,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1295
1292
|
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1296
1293
|
styleElm.innerHTML = style;
|
|
1297
1294
|
} else {
|
|
1298
|
-
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) ||
|
|
1295
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
1299
1296
|
styleElm.innerHTML = style;
|
|
1300
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1297
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
1301
1298
|
if (nonce != null) {
|
|
1302
1299
|
styleElm.setAttribute("nonce", nonce);
|
|
1303
1300
|
}
|
|
@@ -1547,7 +1544,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
1547
1544
|
}
|
|
1548
1545
|
}
|
|
1549
1546
|
if (newVNode2.$text$ !== null) {
|
|
1550
|
-
elm = newVNode2.$elm$ =
|
|
1547
|
+
elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
|
|
1551
1548
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
1552
1549
|
elm = newVNode2.$elm$ = slotReferenceDebugNode(newVNode2) ;
|
|
1553
1550
|
{
|
|
@@ -1557,12 +1554,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
1557
1554
|
if (!isSvgMode) {
|
|
1558
1555
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
1559
1556
|
}
|
|
1560
|
-
|
|
1561
|
-
throw new Error(
|
|
1562
|
-
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
1563
|
-
);
|
|
1564
|
-
}
|
|
1565
|
-
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
1557
|
+
elm = newVNode2.$elm$ = doc.createElementNS(
|
|
1566
1558
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
1567
1559
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
1568
1560
|
) ;
|
|
@@ -1944,7 +1936,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1944
1936
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1945
1937
|
for (const relocateData of relocateNodes) {
|
|
1946
1938
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1947
|
-
if (!nodeToRelocate["s-ol"]
|
|
1939
|
+
if (!nodeToRelocate["s-ol"]) {
|
|
1948
1940
|
const orgLocationNode = originalLocationDebugNode(nodeToRelocate) ;
|
|
1949
1941
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1950
1942
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
@@ -1988,18 +1980,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1988
1980
|
}
|
|
1989
1981
|
contentRef = void 0;
|
|
1990
1982
|
};
|
|
1991
|
-
var slotReferenceDebugNode = (slotVNode) =>
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
)
|
|
1996
|
-
|
|
1997
|
-
var originalLocationDebugNode = (nodeToRelocate) => {
|
|
1998
|
-
var _a;
|
|
1999
|
-
return (_a = win.document) == null ? void 0 : _a.createComment(
|
|
2000
|
-
`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
|
|
2001
|
-
);
|
|
2002
|
-
};
|
|
1983
|
+
var slotReferenceDebugNode = (slotVNode) => doc.createComment(
|
|
1984
|
+
`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
|
|
1985
|
+
);
|
|
1986
|
+
var originalLocationDebugNode = (nodeToRelocate) => doc.createComment(
|
|
1987
|
+
`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
|
|
1988
|
+
);
|
|
2003
1989
|
|
|
2004
1990
|
// src/runtime/update-component.ts
|
|
2005
1991
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
@@ -2196,7 +2182,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
2196
2182
|
const hostRef = getHostRef(ref);
|
|
2197
2183
|
if (!hostRef) {
|
|
2198
2184
|
throw new Error(
|
|
2199
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/
|
|
2185
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
|
|
2200
2186
|
);
|
|
2201
2187
|
}
|
|
2202
2188
|
const elm = hostRef.$hostElement$ ;
|
|
@@ -2500,19 +2486,16 @@ var connectedCallback = (elm) => {
|
|
|
2500
2486
|
}
|
|
2501
2487
|
};
|
|
2502
2488
|
var setContentReference = (elm) => {
|
|
2503
|
-
|
|
2504
|
-
return;
|
|
2505
|
-
}
|
|
2506
|
-
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
2489
|
+
const contentRefElm = elm["s-cr"] = doc.createComment(
|
|
2507
2490
|
""
|
|
2508
2491
|
);
|
|
2509
2492
|
contentRefElm["s-cn"] = true;
|
|
2510
2493
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
2511
2494
|
};
|
|
2512
2495
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2513
|
-
if (listeners
|
|
2496
|
+
if (listeners) {
|
|
2514
2497
|
listeners.map(([flags, name, method]) => {
|
|
2515
|
-
const target = getHostListenerTarget(
|
|
2498
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
2516
2499
|
const handler = hostListenerProxy(hostRef, method);
|
|
2517
2500
|
const opts = hostListenerOpts(flags);
|
|
2518
2501
|
plt.ael(target, name, handler, opts);
|
|
@@ -2534,24 +2517,20 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
2534
2517
|
consoleError(e, hostRef.$hostElement$);
|
|
2535
2518
|
}
|
|
2536
2519
|
};
|
|
2537
|
-
var getHostListenerTarget = (
|
|
2538
|
-
if (flags & 4 /* TargetDocument */)
|
|
2539
|
-
|
|
2540
|
-
}
|
|
2541
|
-
if (flags & 8 /* TargetWindow */) {
|
|
2542
|
-
return win;
|
|
2543
|
-
}
|
|
2520
|
+
var getHostListenerTarget = (elm, flags) => {
|
|
2521
|
+
if (flags & 4 /* TargetDocument */) return doc;
|
|
2522
|
+
if (flags & 8 /* TargetWindow */) return win;
|
|
2544
2523
|
return elm;
|
|
2545
2524
|
};
|
|
2546
2525
|
var hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
2547
2526
|
|
|
2548
2527
|
// src/runtime/vdom/vdom-annotations.ts
|
|
2549
|
-
var insertVdomAnnotations = (
|
|
2550
|
-
if (
|
|
2551
|
-
const docData = STENCIL_DOC_DATA in
|
|
2528
|
+
var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
2529
|
+
if (doc2 != null) {
|
|
2530
|
+
const docData = STENCIL_DOC_DATA in doc2 ? doc2[STENCIL_DOC_DATA] : { ...DEFAULT_DOC_DATA };
|
|
2552
2531
|
docData.staticComponents = new Set(staticComponents);
|
|
2553
2532
|
const orgLocationNodes = [];
|
|
2554
|
-
parseVNodeAnnotations(
|
|
2533
|
+
parseVNodeAnnotations(doc2, doc2.body, docData, orgLocationNodes);
|
|
2555
2534
|
orgLocationNodes.forEach((orgLocationNode) => {
|
|
2556
2535
|
var _a;
|
|
2557
2536
|
if (orgLocationNode != null && orgLocationNode["s-nr"]) {
|
|
@@ -2577,11 +2556,11 @@ var insertVdomAnnotations = (doc, staticComponents) => {
|
|
|
2577
2556
|
return;
|
|
2578
2557
|
}
|
|
2579
2558
|
}
|
|
2580
|
-
const commentBeforeTextNode =
|
|
2559
|
+
const commentBeforeTextNode = doc2.createComment(childId);
|
|
2581
2560
|
commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
|
|
2582
2561
|
insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
|
|
2583
2562
|
} else if (nodeRef.nodeType === 8 /* CommentNode */) {
|
|
2584
|
-
const commentBeforeTextNode =
|
|
2563
|
+
const commentBeforeTextNode = doc2.createComment(childId);
|
|
2585
2564
|
commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
|
|
2586
2565
|
nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
|
|
2587
2566
|
}
|
|
@@ -2600,7 +2579,7 @@ var insertVdomAnnotations = (doc, staticComponents) => {
|
|
|
2600
2579
|
});
|
|
2601
2580
|
}
|
|
2602
2581
|
};
|
|
2603
|
-
var parseVNodeAnnotations = (
|
|
2582
|
+
var parseVNodeAnnotations = (doc2, node, docData, orgLocationNodes) => {
|
|
2604
2583
|
var _a;
|
|
2605
2584
|
if (node == null) {
|
|
2606
2585
|
return;
|
|
@@ -2616,13 +2595,13 @@ var parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
|
|
|
2616
2595
|
const cmpData = {
|
|
2617
2596
|
nodeIds: 0
|
|
2618
2597
|
};
|
|
2619
|
-
insertVNodeAnnotations(
|
|
2598
|
+
insertVNodeAnnotations(doc2, childNode, hostRef.$vnode$, docData, cmpData);
|
|
2620
2599
|
}
|
|
2621
|
-
parseVNodeAnnotations(
|
|
2600
|
+
parseVNodeAnnotations(doc2, childNode, docData, orgLocationNodes);
|
|
2622
2601
|
});
|
|
2623
2602
|
}
|
|
2624
2603
|
};
|
|
2625
|
-
var insertVNodeAnnotations = (
|
|
2604
|
+
var insertVNodeAnnotations = (doc2, hostElm, vnode, docData, cmpData) => {
|
|
2626
2605
|
if (vnode != null) {
|
|
2627
2606
|
const hostId = ++docData.hostIds;
|
|
2628
2607
|
hostElm.setAttribute(HYDRATE_ID, hostId);
|
|
@@ -2632,7 +2611,7 @@ var insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
|
|
|
2632
2611
|
if (vnode.$children$ != null) {
|
|
2633
2612
|
const depth = 0;
|
|
2634
2613
|
vnode.$children$.forEach((vnodeChild, index) => {
|
|
2635
|
-
insertChildVNodeAnnotations(
|
|
2614
|
+
insertChildVNodeAnnotations(doc2, vnodeChild, cmpData, hostId, depth, index);
|
|
2636
2615
|
});
|
|
2637
2616
|
}
|
|
2638
2617
|
if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {
|
|
@@ -2653,7 +2632,7 @@ var insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
|
|
|
2653
2632
|
}
|
|
2654
2633
|
}
|
|
2655
2634
|
};
|
|
2656
|
-
var insertChildVNodeAnnotations = (
|
|
2635
|
+
var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, index) => {
|
|
2657
2636
|
const childElm = vnodeChild.$elm$;
|
|
2658
2637
|
if (childElm == null) {
|
|
2659
2638
|
return;
|
|
@@ -2672,7 +2651,7 @@ var insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, inde
|
|
|
2672
2651
|
const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
|
|
2673
2652
|
if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
|
|
2674
2653
|
const textNodeId = `${TEXT_NODE_ID}.${childId}`;
|
|
2675
|
-
const commentBeforeTextNode =
|
|
2654
|
+
const commentBeforeTextNode = doc2.createComment(textNodeId);
|
|
2676
2655
|
insertBefore(parentNode, commentBeforeTextNode, childElm);
|
|
2677
2656
|
}
|
|
2678
2657
|
} else if (childElm.nodeType === 8 /* CommentNode */) {
|
|
@@ -2685,7 +2664,7 @@ var insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, inde
|
|
|
2685
2664
|
if (vnodeChild.$children$ != null) {
|
|
2686
2665
|
const childDepth = depth + 1;
|
|
2687
2666
|
vnodeChild.$children$.forEach((vnode, index2) => {
|
|
2688
|
-
insertChildVNodeAnnotations(
|
|
2667
|
+
insertChildVNodeAnnotations(doc2, vnode, cmpData, hostId, childDepth, index2);
|
|
2689
2668
|
});
|
|
2690
2669
|
}
|
|
2691
2670
|
};
|
|
@@ -2901,7 +2880,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
2901
2880
|
return elm;
|
|
2902
2881
|
};
|
|
2903
2882
|
tmrId = globalThis.setTimeout(timeoutExceeded, opts.timeout);
|
|
2904
|
-
plt.$resourcesUrl$ = new URL(opts.resourcesUrl || "./",
|
|
2883
|
+
plt.$resourcesUrl$ = new URL(opts.resourcesUrl || "./", doc.baseURI).href;
|
|
2905
2884
|
patchChild2(win2.document.body);
|
|
2906
2885
|
waitLoop2().then(hydratedComplete).catch(hydratedError);
|
|
2907
2886
|
} catch (e) {
|
|
@@ -3108,6 +3087,7 @@ var registerComponents = (Cstrs) => {
|
|
|
3108
3087
|
}
|
|
3109
3088
|
};
|
|
3110
3089
|
var win = window;
|
|
3090
|
+
var doc = win.document;
|
|
3111
3091
|
var writeTask = (cb) => {
|
|
3112
3092
|
nextTick$1(() => {
|
|
3113
3093
|
try {
|
|
@@ -11235,7 +11215,7 @@ class Dialog {
|
|
|
11235
11215
|
}; }
|
|
11236
11216
|
}
|
|
11237
11217
|
|
|
11238
|
-
const drawerCss = ":host{--background:var(--road-surface);--color:var(--road-on-surface);--header-icon:var(--road-on-surface);--header-color:var(--road-on-surface);--header-background:var(--road-surface);--header-delimiter:0;--back-chevron-color:var(--road-icon);--max-height:auto;--z-index:10;position:fixed;top:0;left:0;z-index:var(--z-index);display:flex;justify-content:flex-start;width:100%;height:100%;overflow:hidden;font-family:var(--road-font, sans-serif);line-height:1.5;color:var(--color);visibility:hidden !important;opacity:0;transition:opacity 0.15s linear, visibility 0.15s}.drawer-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:block;touch-action:none;cursor:pointer;background:var(--road-overlay)}.drawer-dialog{position:relative;width:100%;pointer-events:none;transition:transform 0.3s ease-out;transform:translateX(-100%)}:host(.drawer-right){justify-content:flex-end}:host(.drawer-right) .drawer-dialog{transform:translateX(100%)}:host(.drawer-bottom){align-items:flex-end}:host(.drawer-bottom) .drawer-dialog{width:100%;max-height:var(--max-height);transform:translateY(100%)}:host(.drawer-bottom) .drawer-content{height:auto}.drawer-content{position:relative;display:flex;flex-direction:column;width:100%;height:100vh;pointer-events:auto;background-color:var(--background);background-clip:padding-box;box-shadow:var(--road-elevation-hight)}.drawer-header{display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;height:3.5rem;color:var(--header-color);background:var(--header-background);border-color:var(--road-grey-300);border-style:solid;border-width:var(--header-delimiter)}.drawer-header road-icon{flex-shrink:0;color:var(--header-icon)}.drawer-footer{padding:var(--road-spacing-05);background-color:var(--road-surface)}.drawer-header-inverse{--header-icon:var(--road-on-primary);--header-color:var(--road-on-primary);--header-background:var(--road-primary-variant);margin-bottom:2.5rem}.drawer-action,.drawer-close{display:flex;align-items:center;justify-content:center;height:3.5rem;padding:0.5rem;font-family:inherit;font-size:0.875rem;color:inherit;cursor:pointer;background:transparent;border:0;appearance:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.drawer-header:not(.drawer-header-inverse) .drawer-action road-icon{color:var(--back-chevron-color)}.drawer-action~.drawer-title,.drawer-close~.drawer-title{padding-left:0}.drawer-action-left,.drawer-close-left{margin-right:auto}.drawer-title{display:flex;flex-grow:1;align-items:center;justify-content:center;height:3.5rem;padding-left:3.5rem;margin:0;font-size:var(--road-body-medium)}.drawer-body{overflow-y:auto;padding:0 var(--road-spacing-05) var(--road-spacing-05)}.drawer-body.remove-padding{padding:0}:host(.drawer-right) .drawer-body,:host(.drawer-left) .drawer-body{height:calc(100vh - 3.5rem)}.drawer-inner{padding:0 1rem 2.5rem}@media (min-width: 768px){.drawer-inner{padding:0 2rem 2.5rem}.drawer-body{padding:0 var(--road-spacing-08) var(--road-spacing-05)}.drawer-body.remove-padding{padding:0}.drawer-footer{padding:var(--road-spacing-05) var(--road-spacing-08)}}:host(.drawer-open){visibility:visible !important;opacity:1}:host(.drawer-open) .drawer-dialog{transform:none}";
|
|
11218
|
+
const drawerCss = ":host{--background:var(--road-surface);--color:var(--road-on-surface);--header-icon:var(--road-on-surface);--header-color:var(--road-on-surface);--header-background:var(--road-surface);--header-delimiter:0;--back-chevron-color:var(--road-icon);--max-height:auto;--z-index:10;position:fixed;top:0;left:0;z-index:var(--z-index);display:flex;justify-content:flex-start;width:100%;height:100%;overflow:hidden;font-family:var(--road-font, sans-serif);line-height:1.5;color:var(--color);visibility:hidden !important;opacity:0;transition:opacity 0.15s linear, visibility 0.15s}.drawer-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:block;touch-action:none;cursor:pointer;background:var(--road-overlay)}.drawer-dialog{position:relative;width:100%;pointer-events:none;transition:transform 0.3s ease-out;transform:translateX(-100%)}:host(.drawer-right){justify-content:flex-end}:host(.drawer-right) .drawer-dialog{transform:translateX(100%)}:host(.drawer-bottom){align-items:flex-end}:host(.drawer-bottom) .drawer-dialog{width:100%;max-height:var(--max-height);transform:translateY(100%)}:host(.drawer-bottom) .drawer-content{height:auto}.drawer-content{position:relative;display:flex;flex-direction:column;width:100%;height:100vh;pointer-events:auto;background-color:var(--background);background-clip:padding-box;box-shadow:var(--road-elevation-hight)}.drawer-header{display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;height:3.5rem;color:var(--header-color);background:var(--header-background);border-color:var(--road-grey-300);border-style:solid;border-width:var(--header-delimiter)}.drawer-header road-icon{flex-shrink:0;color:var(--header-icon)}.drawer-footer{padding:var(--road-spacing-05);background-color:var(--road-surface)}.drawer-footer.remove-padding{padding:0}.drawer-header-inverse{--header-icon:var(--road-on-primary);--header-color:var(--road-on-primary);--header-background:var(--road-primary-variant);margin-bottom:2.5rem}.drawer-action,.drawer-close{display:flex;align-items:center;justify-content:center;height:3.5rem;padding:0.5rem;font-family:inherit;font-size:0.875rem;color:inherit;cursor:pointer;background:transparent;border:0;appearance:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.drawer-header:not(.drawer-header-inverse) .drawer-action road-icon{color:var(--back-chevron-color)}.drawer-action~.drawer-title,.drawer-close~.drawer-title{padding-left:0}.drawer-action-left,.drawer-close-left{margin-right:auto}.drawer-title{display:flex;flex-grow:1;align-items:center;justify-content:center;height:3.5rem;padding-left:3.5rem;margin:0;font-size:var(--road-body-medium)}.drawer-body{overflow-y:auto;padding:0 var(--road-spacing-05) var(--road-spacing-05)}.drawer-body.remove-padding{padding:0}:host(.drawer-right) .drawer-body,:host(.drawer-left) .drawer-body{height:calc(100vh - 3.5rem)}.drawer-inner{padding:0 1rem 2.5rem}@media (min-width: 768px){.drawer-inner{padding:0 2rem 2.5rem}.drawer-body{padding:0 var(--road-spacing-08) var(--road-spacing-05)}.drawer-body.remove-padding{padding:0}.drawer-footer{padding:var(--road-spacing-05) var(--road-spacing-08)}.drawer-footer.remove-padding{padding:0}}:host(.drawer-open){visibility:visible !important;opacity:1}:host(.drawer-open) .drawer-dialog{transform:none}";
|
|
11239
11219
|
var RoadDrawerStyle0 = drawerCss;
|
|
11240
11220
|
|
|
11241
11221
|
/**
|
|
@@ -11378,7 +11358,7 @@ class Drawer {
|
|
|
11378
11358
|
const backIconElement = this.hasBackIcon ? (hAsync("button", { type: "button", class: "drawer-action", "aria-label": ariaLabelBack, onClick: this.onClickBack }, hAsync("road-icon", { icon: navigationChevron, rotate: "180" }), this.backText)) : null;
|
|
11379
11359
|
const closeIconElement = this.hasCloseIcon ? (hAsync("button", { type: "button", class: "drawer-close", onClick: this.onClick, "aria-label": ariaLabelClose }, hAsync("road-icon", { icon: navigationClose, "aria-hidden": "true" }))) : null;
|
|
11380
11360
|
const drawerWidthValue = this.position === 'bottom' ? '100%' : `${this.drawerWidth}px`;
|
|
11381
|
-
return (hAsync(Host, { key: '
|
|
11361
|
+
return (hAsync(Host, { key: '803e9ce30d1511c6714bcf3eae6cf482ab910483', class: `${drawerIsOpenClass} drawer-${this.position}`, tabindex: "0", role: "dialog", "aria-label": ariaLabel }, hAsync("div", { key: 'e57c395fee5c6f507623221567aa8944225e077f', class: "drawer-overlay", onClick: this.onClick, tabindex: "-1" }), hAsync("div", { key: '13d65e0346da78e8d305e8ec367e1a425a64df42', class: "drawer-dialog", style: { maxWidth: drawerWidthValue }, role: "document", tabindex: "0" }, hAsync("div", { key: '3a9b0175243b9a330155a26155e19f288822a2ea', class: "drawer-content" }, hAsync("header", { key: '22f1f8fece85ce1e1d998b876fd83c7854c59ac1', class: `drawer-header ${inverseHeaderClass} ${drawerDelimiterClass}` }, backIconElement, this.drawerTitle ? (hAsync("h2", { class: "drawer-title" }, this.drawerTitle)) : (hAsync("div", { class: "drawer-title" }, hAsync("slot", { name: "title" }))), closeIconElement), hAsync("div", { key: '8d4c6ce1183733fbb7b22e96e2c8cd81c687cf3a', class: `drawer-body ${removePaddingClass}` }, hAsync("slot", { key: 'd8185e9a322bd64833b6ce2ce57807ce27a75dbd' })), hAsync("footer", { key: '8c3345df320d569fe9b8472faba3f4204750c903', class: `drawer-footer ${removePaddingClass}` }, hAsync("slot", { key: '716055f5fc9792510ed43f77cbd81f9b2a039002', name: "footer" }))))));
|
|
11382
11362
|
}
|
|
11383
11363
|
get el() { return getElement(this); }
|
|
11384
11364
|
static get watchers() { return {
|
|
@@ -29478,24 +29458,58 @@ class Input {
|
|
|
29478
29458
|
const input = ev.target;
|
|
29479
29459
|
let newValue = input.value;
|
|
29480
29460
|
if (this.type === 'number' && this.blockdecimal) {
|
|
29481
|
-
newValue = newValue.replace(/[.,]/g, ''); // Supprime les décimales si
|
|
29461
|
+
newValue = newValue.replace(/[.,]/g, ''); // Supprime les décimales si `blockdecimal` est activé
|
|
29462
|
+
}
|
|
29463
|
+
// Convertir en nombre et ajuster selon min/max
|
|
29464
|
+
let numericValue = parseFloat(newValue);
|
|
29465
|
+
const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;
|
|
29466
|
+
const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;
|
|
29467
|
+
if (!isNaN(numericValue)) {
|
|
29468
|
+
if (minValue !== undefined && numericValue < minValue) {
|
|
29469
|
+
numericValue = minValue;
|
|
29470
|
+
}
|
|
29471
|
+
if (maxValue !== undefined && numericValue > maxValue) {
|
|
29472
|
+
numericValue = maxValue;
|
|
29473
|
+
}
|
|
29474
|
+
newValue = numericValue.toString();
|
|
29475
|
+
}
|
|
29476
|
+
if (this.type === 'number') {
|
|
29477
|
+
this.value = newValue;
|
|
29478
|
+
input.value = newValue; // Mise à jour immédiate du champ
|
|
29479
|
+
}
|
|
29480
|
+
else {
|
|
29481
|
+
this.value = newValue;
|
|
29482
29482
|
}
|
|
29483
|
-
this.value = newValue;
|
|
29484
29483
|
this.roadInput.emit(ev);
|
|
29485
29484
|
this.roadChange.emit({ value: newValue });
|
|
29485
|
+
// Appeler enforceMinMaxValue à chaque modification de la valeur
|
|
29486
|
+
this.enforceMinMaxValue();
|
|
29486
29487
|
};
|
|
29487
29488
|
this.onBlur = () => {
|
|
29488
29489
|
let value = this.getValue();
|
|
29489
|
-
|
|
29490
|
-
|
|
29491
|
-
|
|
29490
|
+
const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;
|
|
29491
|
+
const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;
|
|
29492
|
+
let numericValue = parseFloat(value);
|
|
29493
|
+
if (!isNaN(numericValue)) {
|
|
29494
|
+
if (minValue !== undefined && numericValue < minValue) {
|
|
29495
|
+
numericValue = minValue;
|
|
29496
|
+
}
|
|
29497
|
+
if (maxValue !== undefined && numericValue > maxValue) {
|
|
29498
|
+
numericValue = maxValue;
|
|
29499
|
+
}
|
|
29500
|
+
value = numericValue.toString();
|
|
29501
|
+
}
|
|
29502
|
+
if (this.type === 'number') {
|
|
29503
|
+
this.value = value;
|
|
29504
|
+
const input = document.getElementById(this.inputId);
|
|
29505
|
+
input.value = value;
|
|
29492
29506
|
}
|
|
29493
|
-
|
|
29494
|
-
value =
|
|
29507
|
+
else {
|
|
29508
|
+
this.value = value;
|
|
29495
29509
|
}
|
|
29496
|
-
this.value = value; // Mettre à jour la valeur avec la valeur ajustée
|
|
29497
|
-
// Émettre l'événement roadblur avec la valeur ajustée
|
|
29498
29510
|
this.roadBlur.emit(value);
|
|
29511
|
+
// Appeler enforceMinMaxValue lors de la perte de focus
|
|
29512
|
+
this.enforceMinMaxValue();
|
|
29499
29513
|
};
|
|
29500
29514
|
this.onFocus = () => {
|
|
29501
29515
|
this.roadFocus.emit();
|
|
@@ -29523,25 +29537,35 @@ class Input {
|
|
|
29523
29537
|
*/
|
|
29524
29538
|
valueChanged() {
|
|
29525
29539
|
this.debouncedRoadChange(this.value);
|
|
29540
|
+
// Appeler enforceMinMaxValue après chaque changement de valeur
|
|
29541
|
+
this.enforceMinMaxValue();
|
|
29542
|
+
}
|
|
29543
|
+
async enforceMinMaxValue() {
|
|
29544
|
+
let value = this.getValue();
|
|
29545
|
+
const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;
|
|
29546
|
+
const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;
|
|
29547
|
+
let numericValue = parseFloat(value);
|
|
29548
|
+
if (!isNaN(numericValue)) {
|
|
29549
|
+
if (minValue !== undefined && numericValue < minValue) {
|
|
29550
|
+
numericValue = minValue;
|
|
29551
|
+
}
|
|
29552
|
+
if (maxValue !== undefined && numericValue > maxValue) {
|
|
29553
|
+
numericValue = maxValue;
|
|
29554
|
+
}
|
|
29555
|
+
value = numericValue.toString();
|
|
29556
|
+
}
|
|
29557
|
+
if (this.type === 'number') {
|
|
29558
|
+
this.value = value;
|
|
29559
|
+
const input = document.getElementById(this.inputId);
|
|
29560
|
+
input.value = value;
|
|
29561
|
+
}
|
|
29562
|
+
this.roadChange.emit({ value });
|
|
29526
29563
|
}
|
|
29527
29564
|
getValue() {
|
|
29528
29565
|
return typeof this.value === 'number'
|
|
29529
29566
|
? this.value.toString()
|
|
29530
29567
|
: (this.value || '').toString();
|
|
29531
29568
|
}
|
|
29532
|
-
enforceMinMax(el) {
|
|
29533
|
-
if (el.value !== "") {
|
|
29534
|
-
const value = parseInt(el.value);
|
|
29535
|
-
const minValue = parseInt(el.min);
|
|
29536
|
-
const maxValue = parseInt(el.max);
|
|
29537
|
-
if (value < minValue) {
|
|
29538
|
-
el.value = el.min;
|
|
29539
|
-
}
|
|
29540
|
-
if (value > maxValue) {
|
|
29541
|
-
el.value = el.max;
|
|
29542
|
-
}
|
|
29543
|
-
}
|
|
29544
|
-
}
|
|
29545
29569
|
componentWillLoad() {
|
|
29546
29570
|
this.debounceChanged(); // Initialize debounce on component load
|
|
29547
29571
|
}
|
|
@@ -29551,7 +29575,7 @@ class Input {
|
|
|
29551
29575
|
const hasValueClass = this.value !== '' && this.value !== null ? 'has-value' : '';
|
|
29552
29576
|
const lessLabelClass = this.label !== '' ? '' : 'less-label';
|
|
29553
29577
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
29554
|
-
return (hAsync(Host, { key: '
|
|
29578
|
+
return (hAsync(Host, { key: '5f6b006c06d7a18796cc0074a2200c47a529fbc5', "aria-disabled": this.disabled ? 'true' : null, class: this.sizes && `input-${this.sizes}`, value: value, blockdecimal: this.blockdecimal }, hAsync("input", { key: 'c83b3eed22f085e0c5d9c9474730da06c0ddc6d6', class: `form-control ${hasValueClass} ${isInvalidClass} ${lessLabelClass}`, id: this.inputId, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, enterKeyHint: this.enterkeyhint, autoFocus: this.autofocus, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.type === 'number' ? (event) => this.handleKeyDown(event) : undefined, "data-cy": 'road-input' }), hAsync("label", { key: '0570cdc0f7ec67a2569d0b2187914cb7591b9235', class: "form-label", id: labelId, htmlFor: this.inputId }, this.label), this.error && this.error !== '' && hAsync("p", { key: '4101c4759d90207af1ef234b298fb666ecce590d', class: "invalid-feedback" }, hAsync("road-icon", { key: '6e0aa0da85a06ced4c32b0fff2909e55122b68f9', slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), this.error), this.helper && this.helper !== '' && hAsync("p", { key: '573cb5971b2a3cb6dc5496bb839036445c238fba', class: "helper" }, this.helper), this.type && this.type == 'password' && hAsync("slot", { key: 'e91164c69cb2c110edddbc1b755a8a6df1c86894', name: "checklistPassword" })));
|
|
29555
29579
|
}
|
|
29556
29580
|
static get watchers() { return {
|
|
29557
29581
|
"debounce": ["debounceChanged"],
|
|
@@ -29589,7 +29613,8 @@ class Input {
|
|
|
29589
29613
|
"label": [1],
|
|
29590
29614
|
"error": [1],
|
|
29591
29615
|
"helper": [1],
|
|
29592
|
-
"debounce": [2]
|
|
29616
|
+
"debounce": [2],
|
|
29617
|
+
"enforceMinMaxValue": [64]
|
|
29593
29618
|
},
|
|
29594
29619
|
"$listeners$": undefined,
|
|
29595
29620
|
"$lazyBundleId$": "-",
|
|
@@ -29598,7 +29623,7 @@ class Input {
|
|
|
29598
29623
|
}
|
|
29599
29624
|
let inputIds = 0;
|
|
29600
29625
|
|
|
29601
|
-
const inputGroupCss = ":host{display:block}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%;font-family:var(--road-font, sans-serif)}::slotted(road-input),::slotted(input),::slotted(textarea),::slotted(road-select){position:relative;flex:1 1 auto;width:1%;margin-bottom:0}::slotted([slot=\"prepend\"]){margin-right:-3px;border-color:var(--road-input-outline);border-
|
|
29626
|
+
const inputGroupCss = ":host{display:block}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%;font-family:var(--road-font, sans-serif)}::slotted(road-input),::slotted(input),::slotted(textarea),::slotted(road-select){position:relative;flex:1 1 auto;width:1%;margin-bottom:0}::slotted([slot=\"prepend\"]){margin-right:-3px;border-right-color:transparent;border-color:var(--road-input-outline);border-top-right-radius:0;border-bottom-right-radius:0;position:absolute;left:0;top:0;bottom:0}::slotted([slot=\"append\"]){margin-left:-0.25rem;border-color:var(--road-input-outline);border-left-width:0;position:absolute;right:0;top:0;bottom:0}@media (hover: hover){.input-group:not(.is-disabled):hover ::slotted([slot=\"prepend\"]){border-color:var(--road-input-outline-variant);border-right-color:transparent}.input-group:not(.is-disabled):hover ::slotted([slot=\"append\"]){border-color:var(--road-input-outline-variant);border-left-color:transparent}:host(.phone-number-group) .input-group:not(.is-disabled):hover ::slotted([slot=\"prepend\"]){border-color:var(--road-input-outline-variant)}}.input-group:focus-within ::slotted([slot=\"prepend\"]),:host(.phone-number-group) .input-group:focus-within ::slotted([slot=\"prepend\"]){border-color:var(--road-grey-0);border-width:2px;border-right-color:transparent;outline:none;}.input-group:focus-within ::slotted([slot=\"append\"]){border-color:var(--road-grey-0);border-width:2px;border-left-color:transparent;outline:none;}.input-group:focus-within ::slotted(road-input):focus-visible{border-color:var(--road-grey-0);border-width:2px;outline:none;}.input-group-prepend,.input-group-append{display:flex;height:3rem}::slotted(road-button){--padding-start:0.5rem;--padding-end:0.5rem;position:relative;z-index:2;min-width:3rem;margin:0;font-size:var(--road-font-size-14)}::slotted(road-button):hover{background-color:var(--road-button-ghost-variant)}.input-group-prepend{z-index:1;order:-1;position:relative}.input-group-prepend~.form-label{left:calc(3rem + 1px)}.input-group-append{position:relative;z-index:1;border-radius:0 0.25rem 0.25rem 0}::slotted(label){display:flex;align-items:center;padding:0 0.5rem;margin-bottom:0;color:var(--road-on-surface);text-align:center;white-space:nowrap;cursor:text;border-radius:0.25rem;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}::slotted(road-label){display:flex;align-items:center;padding:0 0.5rem;margin-bottom:0;color:var(--road-on-surface);text-align:center;white-space:nowrap;cursor:text;background:var(--road-surface);border:1px solid var(--road-input-outline);border-radius:0.25rem;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}::slotted(road-input:not(:first-child)),::slotted(road-select:not(:first-child)){border-radius:0}.input-group-append ::slotted([slot=\"append\"]){border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.input-group-prepend ::slotted([slot=\"prepend\"]){border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}:host(.phone-number-group) .input-group-prepend ::slotted([slot=\"prepend\"]){border-right:1px solid var(--road-input-outline);border-top-right-radius:0;border-bottom-right-radius:0}.input-group-prepend ::slotted(label){margin-right:calc(-1rem + 1px)}.input-group-append:hover ::slotted(road-button){background-color:var(--road-button-ghost-variant)}.size-xl .input-group-prepend,.size-xl .input-group-append{height:3.5rem}.size-xl ::slotted(road-button){height:3.5rem}.input-group.is-invalid ::slotted([slot=\"append\"]),.input-group.is-invalid ::slotted([slot=\"prepend\"]){border-color:var(--road-danger-outline)}:host(.phone-number-group) .input-group.is-invalid ::slotted([slot=\"prepend\"]){border-color:var(--road-danger-outline)}:host([disabled]){cursor:not-allowed}:host([disabled]) .input-group{pointer-events:none;}:host([disabled]) ::slotted([slot=\"append\"]),:host([disabled]) ::slotted([slot=\"prepend\"]){color:var(--road-on-surface-disabled);cursor:not-allowed;background:#e4e5e9}:host([disabled]) ::slotted([slot=\"append\"] road-icon),:host([disabled]) ::slotted([slot=\"prepend\"] road-icon){color:var(--road-on-surface-disabled)}:host([disabled]) road-icon{color:var(--road-on-surface-disabled)}";
|
|
29602
29627
|
var RoadInputGroupStyle0 = inputGroupCss;
|
|
29603
29628
|
|
|
29604
29629
|
/**
|
|
@@ -29616,7 +29641,7 @@ class InputGroup {
|
|
|
29616
29641
|
handleDisabledChange(newValue) {
|
|
29617
29642
|
this.updateDisabledState(newValue);
|
|
29618
29643
|
}
|
|
29619
|
-
/**
|
|
29644
|
+
/** Applique le `disabled` aux enfants */
|
|
29620
29645
|
updateDisabledState(isDisabled) {
|
|
29621
29646
|
const children = this.el.querySelectorAll('road-input, road-button, road-select');
|
|
29622
29647
|
children.forEach(child => {
|
|
@@ -29628,9 +29653,24 @@ class InputGroup {
|
|
|
29628
29653
|
}
|
|
29629
29654
|
});
|
|
29630
29655
|
}
|
|
29631
|
-
|
|
29632
|
-
|
|
29656
|
+
/** Vérifie et applique le `text-indent` si `prepend` est présent */
|
|
29657
|
+
updateIndentation() {
|
|
29658
|
+
const hasPrepend = !!this.el.querySelector('[slot="prepend"]');
|
|
29659
|
+
const formControl = this.el.querySelector('.form-control');
|
|
29660
|
+
const formLabel = this.el.querySelector('.form-label');
|
|
29661
|
+
if (formControl) {
|
|
29662
|
+
formControl.style.textIndent = hasPrepend ? '2rem' : '';
|
|
29663
|
+
}
|
|
29664
|
+
if (formLabel) {
|
|
29665
|
+
formLabel.style.textIndent = hasPrepend ? '2.7rem' : '';
|
|
29666
|
+
}
|
|
29667
|
+
}
|
|
29668
|
+
componentDidLoad() {
|
|
29633
29669
|
this.updateDisabledState(this.disabled);
|
|
29670
|
+
this.updateIndentation(); // Appliquer les styles au montage
|
|
29671
|
+
// Observer les mutations (au cas où des éléments sont ajoutés dynamiquement)
|
|
29672
|
+
const observer = new MutationObserver(() => this.updateIndentation());
|
|
29673
|
+
observer.observe(this.el, { childList: true, subtree: true });
|
|
29634
29674
|
}
|
|
29635
29675
|
render() {
|
|
29636
29676
|
const errorClass = this.el.querySelector('road-input[error]') ? 'is-invalid' : '';
|
|
@@ -29638,7 +29678,7 @@ class InputGroup {
|
|
|
29638
29678
|
? `size-${this.el.querySelector('road-input').sizes}`
|
|
29639
29679
|
: '';
|
|
29640
29680
|
const disabledClass = this.disabled ? 'is-disabled' : '';
|
|
29641
|
-
return (hAsync("div", { key: '
|
|
29681
|
+
return (hAsync("div", { key: 'd820b7eee7e4199722474ddb8a7e6dea5f3c1232', class: `input-group ${errorClass} ${disabledClass} ${sizeClass}` }, hAsync("div", { key: 'ca3a4babe8c43a9d105bce56ff4d34bab501d916', class: "input-group-prepend" }, hAsync("slot", { key: '85f0e1dacfa39a5e075edc6af93ad6b8233d55e3', name: "prepend" })), hAsync("slot", { key: 'd1b3bc429d1388db53b32fabf24f9a8d3c24f1cd' }), hAsync("div", { key: '557aff92ba2225803c997de830d60027e635be1a', class: "input-group-append" }, hAsync("slot", { key: 'c4e7a0ba1ff5a766ba3d0683c6cfefd8e31afef9', name: "append" }))));
|
|
29642
29682
|
}
|
|
29643
29683
|
get el() { return getElement(this); }
|
|
29644
29684
|
static get watchers() { return {
|
|
@@ -32231,9 +32271,6 @@ i18n.phonenumbers.AsYouTypeFormatter.prototype.inputDigitHelper_=function(a){var
|
|
|
32231
32271
|
});
|
|
32232
32272
|
}(libphonenumber));
|
|
32233
32273
|
|
|
32234
|
-
// list of forbidden characters
|
|
32235
|
-
const forbiddenChars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '=', '[', ']', '{', '}', '|', ';', ':', "'", '"', ',', '.', '<', '>', '/', '?'];
|
|
32236
|
-
|
|
32237
32274
|
const phoneNumberInputCss = ".is-invalid.sc-road-phone-number-input .phone-number-input-field.sc-road-input.sc-road-phone-number-input{border-color:var(--road-danger-outline)}.road-phone-input-select.sc-road-phone-number-input{position:relative;display:block;font-family:var(--road-font, sans-serif);color:var(--road-on-surface);background-color:var(--road-surface);border:1px solid var(--road-input-outline);border-radius:0.25rem;border-top-right-radius:0;border-bottom-right-radius:0;box-shadow:none;appearance:none;width:5rem;height:3.5rem}.sc-road-phone-number-input-h .is-error.sc-road-phone-number-input{border-color:var(--road-danger-outline)}.form-select-area.sc-road-phone-number-input{box-sizing:border-box;display:block;width:100%;height:3rem;padding:0.75rem 3rem 0 2rem;margin:0;font-size:var(--road-body-medium);line-height:1.5;color:var(--road-on-surface);background:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0icmdiYSgyMywgMzAsIDUyLCAwLjcyKSI+PHBhdGggZD0iTTIzIDI2bDkgMTIgOS0xMnoiLz48L3N2Zz4=\") no-repeat right -5px center/2.5rem 2rem;position:absolute;top:0;left:0;height:100%;width:95%;z-index:1;border:0;appearance:none;opacity:1;cursor:pointer}.form-select-area.sc-road-phone-number-input:-moz-focusring{color:transparent;text-shadow:0 0 0 #000000}.form-select-area.sc-road-phone-number-input::-ms-expand{display:none}.form-select-area.sc-road-phone-number-input::placeholder{color:var(--road-on-surface-extra-weak)}@media (hover: hover){.form-select-area.sc-road-phone-number-input:not(:disabled):hover{border-color:var(--road-input-outline-variant)}}.form-select-area.sc-road-phone-number-input:focus~.form-select-area-label.sc-road-phone-number-input,.form-select-area[required].sc-road-phone-number-input:valid~.form-select-area-label.sc-road-phone-number-input,.form-select-area.has-value.sc-road-phone-number-input~.form-select-area-label.sc-road-phone-number-input{transform:scale(0.625) translateY(-0.625rem)}.form-select-area.sc-road-phone-number-input:not(:disabled):focus{border-color:var(--road-input-outline-variant)}.form-select-area.sc-road-phone-number-input:disabled,.form-select-area[readonly].sc-road-phone-number-input{color:transparent;cursor:not-allowed;background:var(--road-surface-disabled);opacity:1}.form-select-area-label.sc-road-phone-number-input{position:absolute;top:0.9rem;left:1rem;display:block;font-size:var(--road-font-size-18);line-height:1.5;color:var(--road-on-surface-extra-weak);pointer-events:none;transition:transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;transform-origin:0 0}.form-select-area.sc-road-phone-number-input:required~.form-select-area-label.sc-road-phone-number-input::after{color:var(--road-on-danger-surface);content:\" *\"}.form-select-area-value.sc-road-phone-number-input{position:absolute;top:1.4rem;left:1rem;display:block;font-size:var(--road-label-medium);line-height:1.5;color:var(--road-on-surface);pointer-events:none;transition:transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;transform-origin:0 0}.select-xl.sc-road-phone-number-input-h .form-select-area.sc-road-phone-number-input{height:3.5rem;padding:0.75rem 0 0 1rem}.input-xl.sc-road-phone-number-input{height:3.5rem;padding:0.75rem 0 0 1rem}.select-xl.sc-road-phone-number-input-h .form-select-area-label.sc-road-phone-number-input{top:1rem}.select-xl.sc-road-phone-number-input-h .form-select-area.sc-road-phone-number-input:focus~.form-select-area-label.sc-road-phone-number-input,.select-xl.sc-road-phone-number-input-h .form-select-area[required].sc-road-phone-number-input:valid~.form-select-area-label.sc-road-phone-number-input,.select-xl.sc-road-phone-number-input-h .form-select-area.has-value.sc-road-phone-number-input~.form-select-area-label.sc-road-phone-number-input,.select-xl.sc-road-phone-number-input-h .form-select-area[type=\"date\"].sc-road-phone-number-input~.form-select-area-label.sc-road-phone-number-input,.select-xl.sc-road-phone-number-input-h .form-select-area[type=\"time\"].sc-road-phone-number-input~.form-select-area-label.sc-road-phone-number-input{transform:scale(0.75) translateY(-0.625rem)}.select-xl.sc-road-phone-number-input-h .form-select-area.sc-road-phone-number-input:placeholder-shown~.form-select-area-label.sc-road-phone-number-input{transform:scale(0.75) translateY(-0.625rem)}.invalid-feedback.sc-road-phone-number-input{gap:.25rem;display:flex;width:100%;margin:0.5rem 0;font-size:var(--road-body-small);color:var(--road-on-danger-surface)}.form-select-area.is-invalid.sc-road-phone-number-input,.was-validated.sc-road-phone-number-input .form-select-area.sc-road-phone-number-input:invalid{border-color:var(--road-on-danger-surface)}.form-select-area.is-invalid.sc-road-phone-number-input~.invalid-feedback.sc-road-phone-number-input,.was-validated.sc-road-phone-number-input .form-select-area.sc-road-phone-number-input:invalid~.invalid-feedback.sc-road-phone-number-input{display:block}.form-select-area.sc-road-phone-number-input option.sc-road-phone-number-input:checked::after{position:absolute;top:0;left:0;content:attr(data-content)}.form-select-area.sc-road-phone-number-input::after{position:absolute;top:0;left:0;content:var(--selected-content, '')}.phone-number-input-label.sc-road-phone-number-input{position:absolute;top:1rem;left:6rem;display:block;font-size:var(--road-body-medium);line-height:1.5;color:var(--road-on-surface-weak);pointer-events:none;transition:transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;transform-origin:0 0}.phone-number-input-field.sc-road-phone-number-input:required~.phone-number-input-label.sc-road-phone-number-input::after{color:var(--road-danger-default);content:\" *\"}.phone-number-input-field.sc-road-phone-number-input:focus~.phone-number-input-label.sc-road-phone-number-input,.phone-number-input-field[required].sc-road-phone-number-input:valid~.phone-number-input-label.sc-road-phone-number-input,.phone-number-input-field.has-value.sc-road-phone-number-input~.phone-number-input-label.sc-road-phone-number-input{transform:scale(0.625) translateY(-0.625rem)}.phone-number-input-field.sc-road-phone-number-input:placeholder-shown~.phone-number-input-label.sc-road-phone-number-input{transform:scale(0.625) translateY(-0.625rem)}.phone-number-input-field.sc-road-phone-number-input:-ms-input-placeholder~.phone-number-input-label.sc-road-phone-number-input{transform:scale(0.625) translateY(-0.625rem)}.phone-number-inputs-container.sc-road-phone-number-input{position:relative;display:flex}.road-phone-input-select.sc-road-phone-number-input{margin-bottom:1rem}.is-error.sc-road-phone-number-input{margin-bottom:0}.phone-number-input-field.sc-road-phone-number-input{flex-grow:1;border:1px solid var(--road-input-outline);border-left:0;border-radius:0.25rem;border-bottom-left-radius:0;border-top-left-radius:0}";
|
|
32238
32275
|
var RoadPhoneNumberInputStyle0 = phoneNumberInputCss;
|
|
32239
32276
|
|
|
@@ -32287,13 +32324,6 @@ class RoadPhoneNumberInput {
|
|
|
32287
32324
|
this.phoneNumber = input.value;
|
|
32288
32325
|
this.createAndDispatchPhoneData();
|
|
32289
32326
|
}
|
|
32290
|
-
// On user key down
|
|
32291
|
-
handleKeyDown(event) {
|
|
32292
|
-
// checks if the forbidden characters's list contains the pressed key
|
|
32293
|
-
if (forbiddenChars.includes(event.key)) {
|
|
32294
|
-
event.preventDefault();
|
|
32295
|
-
}
|
|
32296
|
-
}
|
|
32297
32327
|
// On user select
|
|
32298
32328
|
handleSelect(event) {
|
|
32299
32329
|
const select = event.target;
|
|
@@ -32397,9 +32427,9 @@ class RoadPhoneNumberInput {
|
|
|
32397
32427
|
const isErrorClass = this.errorMessage.length ? 'is-error' : '';
|
|
32398
32428
|
const hasValueClass = this.hasValue() ? 'has-value' : '';
|
|
32399
32429
|
const sizes = 'xl';
|
|
32400
|
-
return (hAsync(Host, { key: '
|
|
32430
|
+
return (hAsync(Host, { key: '7d65a01428b79587c98a5e399bab8403c0849a68' }, hAsync("div", { key: 'b59d36be4bd2ecbe7469b37c194501d542895b29', class: 'phone-number-inputs-container' }, hAsync("div", { key: '4cf3f4e60de5f861e09c8cbde5551fb95f209970', class: `road-phone-input-select ${isErrorClass} ${isInvalidClass}`, slot: "prepend" }, hAsync("select", { key: '187f3724fcc9bf5c34c6490e61e5adee102ac052', id: selectId, class: `form-select-area has-value`, "aria-disabled": this.disabled ? 'true' : null, disabled: this.disabled, onChange: (event) => this.handleSelect(event), "aria-label": this.codeLabel, tabIndex: this.disabled ? -1 : 0 }, this.countryOptions && this.countryOptions.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.selected }, option.label)))), hAsync("label", { key: '8e867ef3d625b2e69246591cb8f84e7794ba1a7c', class: "form-select-area-label", id: labelId, htmlFor: selectId }, this.codeLabel), hAsync("label", { key: '71ae31a4e0da49b93d28e433a41fbb40b74b603d', class: "form-select-area-value", id: valueId, htmlFor: selectId }, "+", this.selectedCountryCode)), hAsync("input", { key: '289ac4032540c87f77784439864983ed5d544439', type: 'tel', id: inputId, class: `input-${sizes} phone-number-input-field ${hasValueClass} ${isErrorClass}`, value: this.phoneValue, required: this.required, tabIndex: 0, onInput: (event) => this.handleInput(event) }), hAsync("label", { key: '60e9f10714d8807449534d1bce2f74f65a1646dc', class: "phone-number-input-label", id: labelId, htmlFor: inputId }, this.phoneLabel)), this.errorMessage
|
|
32401
32431
|
&& this.errorMessage !== ''
|
|
32402
|
-
&& hAsync("p", { key: '
|
|
32432
|
+
&& hAsync("p", { key: 'b140351db845f88befd99aab39daa115c770732e', class: "invalid-feedback" }, hAsync("road-icon", { key: 'ed89fc9c99493f67973448bbea8d7f0c20e0c455', slot: "start", color: 'danger', name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), this.errorMessage)));
|
|
32403
32433
|
}
|
|
32404
32434
|
get el() { return getElement(this); }
|
|
32405
32435
|
static get style() { return RoadPhoneNumberInputStyle0; }
|
|
@@ -36468,7 +36498,7 @@ var NAMESPACE = (
|
|
|
36468
36498
|
);
|
|
36469
36499
|
|
|
36470
36500
|
/*
|
|
36471
|
-
Stencil Hydrate Runner v4.27.
|
|
36501
|
+
Stencil Hydrate Runner v4.27.0 | MIT Licensed | https://stenciljs.com
|
|
36472
36502
|
*/
|
|
36473
36503
|
var __defProp = Object.defineProperty;
|
|
36474
36504
|
var __export = (target, all) => {
|
|
@@ -36814,19 +36844,19 @@ var MockCustomElementRegistry = class {
|
|
|
36814
36844
|
this.__whenDefined.delete(tagName);
|
|
36815
36845
|
}
|
|
36816
36846
|
}
|
|
36817
|
-
const
|
|
36818
|
-
if (
|
|
36819
|
-
const hosts =
|
|
36847
|
+
const doc2 = this.win.document;
|
|
36848
|
+
if (doc2 != null) {
|
|
36849
|
+
const hosts = doc2.querySelectorAll(tagName);
|
|
36820
36850
|
hosts.forEach((host) => {
|
|
36821
36851
|
if (upgradedElements.has(host) === false) {
|
|
36822
|
-
tempDisableCallbacks.add(
|
|
36823
|
-
const upgradedCmp = createCustomElement(this,
|
|
36852
|
+
tempDisableCallbacks.add(doc2);
|
|
36853
|
+
const upgradedCmp = createCustomElement(this, doc2, tagName);
|
|
36824
36854
|
for (let i = 0; i < host.childNodes.length; i++) {
|
|
36825
36855
|
const childNode = host.childNodes[i];
|
|
36826
36856
|
childNode.remove();
|
|
36827
36857
|
upgradedCmp.appendChild(childNode);
|
|
36828
36858
|
}
|
|
36829
|
-
tempDisableCallbacks.delete(
|
|
36859
|
+
tempDisableCallbacks.delete(doc2);
|
|
36830
36860
|
if (proxyElements.has(host)) {
|
|
36831
36861
|
proxyElements.set(host, upgradedCmp);
|
|
36832
36862
|
}
|
|
@@ -45270,11 +45300,11 @@ function parseFragment(fragmentContext, html, options) {
|
|
|
45270
45300
|
// src/mock-doc/parse-util.ts
|
|
45271
45301
|
var docParser = /* @__PURE__ */ new WeakMap();
|
|
45272
45302
|
function parseDocumentUtil(ownerDocument, html) {
|
|
45273
|
-
const
|
|
45274
|
-
|
|
45275
|
-
|
|
45276
|
-
|
|
45277
|
-
return
|
|
45303
|
+
const doc2 = parse(html.trim(), getParser(ownerDocument));
|
|
45304
|
+
doc2.documentElement = doc2.firstElementChild;
|
|
45305
|
+
doc2.head = doc2.documentElement.firstElementChild;
|
|
45306
|
+
doc2.body = doc2.head.nextElementSibling;
|
|
45307
|
+
return doc2;
|
|
45278
45308
|
}
|
|
45279
45309
|
function parseFragmentUtil(ownerDocument, html) {
|
|
45280
45310
|
if (typeof html === "string") {
|
|
@@ -45292,9 +45322,9 @@ function getParser(ownerDocument) {
|
|
|
45292
45322
|
}
|
|
45293
45323
|
const treeAdapter = {
|
|
45294
45324
|
createDocument() {
|
|
45295
|
-
const
|
|
45296
|
-
|
|
45297
|
-
return
|
|
45325
|
+
const doc2 = ownerDocument.createElement("#document" /* DOCUMENT_NODE */);
|
|
45326
|
+
doc2["x-mode"] = "no-quirks";
|
|
45327
|
+
return doc2;
|
|
45298
45328
|
},
|
|
45299
45329
|
setNodeSourceCodeLocation(node, location2) {
|
|
45300
45330
|
node.sourceCodeLocation = location2;
|
|
@@ -45332,22 +45362,22 @@ function getParser(ownerDocument) {
|
|
|
45332
45362
|
getTemplateContent(templateElement) {
|
|
45333
45363
|
return templateElement.content;
|
|
45334
45364
|
},
|
|
45335
|
-
setDocumentType(
|
|
45336
|
-
let doctypeNode =
|
|
45365
|
+
setDocumentType(doc2, name, publicId, systemId) {
|
|
45366
|
+
let doctypeNode = doc2.childNodes.find((n) => n.nodeType === 10 /* DOCUMENT_TYPE_NODE */);
|
|
45337
45367
|
if (doctypeNode == null) {
|
|
45338
45368
|
doctypeNode = ownerDocument.createDocumentTypeNode();
|
|
45339
|
-
|
|
45369
|
+
doc2.insertBefore(doctypeNode, doc2.firstChild);
|
|
45340
45370
|
}
|
|
45341
45371
|
doctypeNode.nodeValue = "!DOCTYPE";
|
|
45342
45372
|
doctypeNode["x-name"] = name;
|
|
45343
45373
|
doctypeNode["x-publicId"] = publicId;
|
|
45344
45374
|
doctypeNode["x-systemId"] = systemId;
|
|
45345
45375
|
},
|
|
45346
|
-
setDocumentMode(
|
|
45347
|
-
|
|
45376
|
+
setDocumentMode(doc2, mode) {
|
|
45377
|
+
doc2["x-mode"] = mode;
|
|
45348
45378
|
},
|
|
45349
|
-
getDocumentMode(
|
|
45350
|
-
return
|
|
45379
|
+
getDocumentMode(doc2) {
|
|
45380
|
+
return doc2["x-mode"];
|
|
45351
45381
|
},
|
|
45352
45382
|
detachNode(node) {
|
|
45353
45383
|
node.remove();
|
|
@@ -45523,9 +45553,9 @@ var jquery_default = (
|
|
|
45523
45553
|
nonce: true,
|
|
45524
45554
|
noModule: true
|
|
45525
45555
|
};
|
|
45526
|
-
function DOMEval(code, node,
|
|
45527
|
-
|
|
45528
|
-
var i2, script =
|
|
45556
|
+
function DOMEval(code, node, doc2) {
|
|
45557
|
+
doc2 = doc2 || document2;
|
|
45558
|
+
var i2, script = doc2.createElement("script");
|
|
45529
45559
|
script.text = code;
|
|
45530
45560
|
if (node) {
|
|
45531
45561
|
for (i2 in preservedScriptAttributes) {
|
|
@@ -45534,7 +45564,7 @@ var jquery_default = (
|
|
|
45534
45564
|
}
|
|
45535
45565
|
}
|
|
45536
45566
|
}
|
|
45537
|
-
|
|
45567
|
+
doc2.head.appendChild(script).parentNode.removeChild(script);
|
|
45538
45568
|
}
|
|
45539
45569
|
const jQuery = {};
|
|
45540
45570
|
var version = "4.0.0-pre+9352011a7.dirty +selector", rhtmlSuffix = /HTML$/i, jQueryOrig = function(selector, context) {
|
|
@@ -45671,8 +45701,8 @@ var jquery_default = (
|
|
|
45671
45701
|
},
|
|
45672
45702
|
// Evaluates a script in a provided context; falls back to the global one
|
|
45673
45703
|
// if not specified.
|
|
45674
|
-
globalEval: function(code, options,
|
|
45675
|
-
DOMEval(code, { nonce: options && options.nonce },
|
|
45704
|
+
globalEval: function(code, options, doc2) {
|
|
45705
|
+
DOMEval(code, { nonce: options && options.nonce }, doc2);
|
|
45676
45706
|
},
|
|
45677
45707
|
each: function(obj, callback) {
|
|
45678
45708
|
var length, i2 = 0;
|
|
@@ -46161,11 +46191,11 @@ var jquery_default = (
|
|
|
46161
46191
|
});
|
|
46162
46192
|
}
|
|
46163
46193
|
function setDocument(node) {
|
|
46164
|
-
var subWindow,
|
|
46165
|
-
if (
|
|
46194
|
+
var subWindow, doc2 = node ? node.ownerDocument || node : document2;
|
|
46195
|
+
if (doc2 == document$1 || doc2.nodeType !== 9) {
|
|
46166
46196
|
return;
|
|
46167
46197
|
}
|
|
46168
|
-
document$1 =
|
|
46198
|
+
document$1 = doc2;
|
|
46169
46199
|
documentElement$1 = document$1.documentElement;
|
|
46170
46200
|
documentIsHTML = !jQuery.isXMLDoc(document$1);
|
|
46171
46201
|
if (isIE && document2 != document$1 && (subWindow = document$1.defaultView) && subWindow.top !== subWindow) {
|
|
@@ -50510,10 +50540,10 @@ var MockDocument = class _MockDocument extends MockHTMLElement {
|
|
|
50510
50540
|
}
|
|
50511
50541
|
createElement(tagName) {
|
|
50512
50542
|
if (tagName === "#document" /* DOCUMENT_NODE */) {
|
|
50513
|
-
const
|
|
50514
|
-
|
|
50515
|
-
|
|
50516
|
-
return
|
|
50543
|
+
const doc2 = new _MockDocument(false);
|
|
50544
|
+
doc2.nodeName = tagName;
|
|
50545
|
+
doc2.parentNode = null;
|
|
50546
|
+
return doc2;
|
|
50517
50547
|
}
|
|
50518
50548
|
return createElement(this, tagName);
|
|
50519
50549
|
}
|
|
@@ -50553,10 +50583,10 @@ var MockDocument = class _MockDocument extends MockHTMLElement {
|
|
|
50553
50583
|
title.textContent = value;
|
|
50554
50584
|
}
|
|
50555
50585
|
};
|
|
50556
|
-
function resetDocument(
|
|
50557
|
-
if (
|
|
50558
|
-
resetEventListeners(
|
|
50559
|
-
const documentElement =
|
|
50586
|
+
function resetDocument(doc2) {
|
|
50587
|
+
if (doc2 != null) {
|
|
50588
|
+
resetEventListeners(doc2);
|
|
50589
|
+
const documentElement = doc2.documentElement;
|
|
50560
50590
|
if (documentElement != null) {
|
|
50561
50591
|
resetElement(documentElement);
|
|
50562
50592
|
for (let i = 0, ii = documentElement.childNodes.length; i < ii; i++) {
|
|
@@ -50565,25 +50595,25 @@ function resetDocument(doc) {
|
|
|
50565
50595
|
childNode.childNodes.length = 0;
|
|
50566
50596
|
}
|
|
50567
50597
|
}
|
|
50568
|
-
for (const key in
|
|
50569
|
-
if (
|
|
50570
|
-
delete
|
|
50598
|
+
for (const key in doc2) {
|
|
50599
|
+
if (doc2.hasOwnProperty(key) && !DOC_KEY_KEEPERS.has(key)) {
|
|
50600
|
+
delete doc2[key];
|
|
50571
50601
|
}
|
|
50572
50602
|
}
|
|
50573
50603
|
try {
|
|
50574
|
-
|
|
50604
|
+
doc2.nodeName = "#document" /* DOCUMENT_NODE */;
|
|
50575
50605
|
} catch (e) {
|
|
50576
50606
|
}
|
|
50577
50607
|
try {
|
|
50578
|
-
|
|
50608
|
+
doc2.nodeType = 9 /* DOCUMENT_NODE */;
|
|
50579
50609
|
} catch (e) {
|
|
50580
50610
|
}
|
|
50581
50611
|
try {
|
|
50582
|
-
|
|
50612
|
+
doc2.cookie = "";
|
|
50583
50613
|
} catch (e) {
|
|
50584
50614
|
}
|
|
50585
50615
|
try {
|
|
50586
|
-
|
|
50616
|
+
doc2.referrer = "";
|
|
50587
50617
|
} catch (e) {
|
|
50588
50618
|
}
|
|
50589
50619
|
}
|
|
@@ -50653,6 +50683,7 @@ var STENCIL_DEV_MODE = BUILD.isTesting ? ["STENCIL:"] : [
|
|
|
50653
50683
|
"color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"
|
|
50654
50684
|
];
|
|
50655
50685
|
var win = typeof window !== "undefined" ? window : {};
|
|
50686
|
+
var doc = win.document || { head: {} };
|
|
50656
50687
|
var H = win.HTMLElement || class {
|
|
50657
50688
|
};
|
|
50658
50689
|
var supportsShadow = BUILD.shadowDom;
|
|
@@ -50786,14 +50817,14 @@ var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
|
50786
50817
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
50787
50818
|
|
|
50788
50819
|
// src/compiler/html/canonical-link.ts
|
|
50789
|
-
var updateCanonicalLink = (
|
|
50820
|
+
var updateCanonicalLink = (doc2, href) => {
|
|
50790
50821
|
var _a2;
|
|
50791
|
-
let canonicalLinkElm =
|
|
50822
|
+
let canonicalLinkElm = doc2.head.querySelector('link[rel="canonical"]');
|
|
50792
50823
|
if (typeof href === "string") {
|
|
50793
50824
|
if (canonicalLinkElm == null) {
|
|
50794
|
-
canonicalLinkElm =
|
|
50825
|
+
canonicalLinkElm = doc2.createElement("link");
|
|
50795
50826
|
canonicalLinkElm.setAttribute("rel", "canonical");
|
|
50796
|
-
|
|
50827
|
+
doc2.head.appendChild(canonicalLinkElm);
|
|
50797
50828
|
}
|
|
50798
50829
|
canonicalLinkElm.setAttribute("href", href);
|
|
50799
50830
|
} else {
|
|
@@ -50807,11 +50838,11 @@ var updateCanonicalLink = (doc, href) => {
|
|
|
50807
50838
|
};
|
|
50808
50839
|
|
|
50809
50840
|
// src/compiler/html/relocate-meta-charset.ts
|
|
50810
|
-
var relocateMetaCharset = (
|
|
50811
|
-
const head =
|
|
50841
|
+
var relocateMetaCharset = (doc2) => {
|
|
50842
|
+
const head = doc2.head;
|
|
50812
50843
|
let charsetElm = head.querySelector("meta[charset]");
|
|
50813
50844
|
if (charsetElm == null) {
|
|
50814
|
-
charsetElm =
|
|
50845
|
+
charsetElm = doc2.createElement("meta");
|
|
50815
50846
|
charsetElm.setAttribute("charset", "utf-8");
|
|
50816
50847
|
} else {
|
|
50817
50848
|
charsetElm.remove();
|
|
@@ -51086,13 +51117,13 @@ var parseCss = (css, filePath) => {
|
|
|
51086
51117
|
const m = match(/^@([-\w]+)?document *([^{]+)/);
|
|
51087
51118
|
if (!m) return null;
|
|
51088
51119
|
const vendor = trim(m[1]);
|
|
51089
|
-
const
|
|
51120
|
+
const doc2 = trim(m[2]);
|
|
51090
51121
|
if (!open()) return error(`@document missing '{'`);
|
|
51091
51122
|
const style = comments().concat(rules());
|
|
51092
51123
|
if (!close()) return error(`@document missing '}'`);
|
|
51093
51124
|
return pos({
|
|
51094
51125
|
type: 3 /* Document */,
|
|
51095
|
-
document:
|
|
51126
|
+
document: doc2,
|
|
51096
51127
|
vendor,
|
|
51097
51128
|
rules: style
|
|
51098
51129
|
});
|
|
@@ -51418,11 +51449,11 @@ var serializeCssPage = (opts, node) => {
|
|
|
51418
51449
|
};
|
|
51419
51450
|
var serializeCssDocument = (opts, node) => {
|
|
51420
51451
|
const documentCss = serializeCssMapVisit(opts, node.rules);
|
|
51421
|
-
const
|
|
51452
|
+
const doc2 = "@" + (node.vendor || "") + "document " + node.document;
|
|
51422
51453
|
if (documentCss === "") {
|
|
51423
51454
|
return "";
|
|
51424
51455
|
}
|
|
51425
|
-
return
|
|
51456
|
+
return doc2 + "{" + documentCss + "}";
|
|
51426
51457
|
};
|
|
51427
51458
|
var serializeCssMapVisit = (opts, nodes) => {
|
|
51428
51459
|
let rtn = "";
|
|
@@ -51520,12 +51551,12 @@ var collectUsedSelectors = (usedSelectors, elm) => {
|
|
|
51520
51551
|
};
|
|
51521
51552
|
|
|
51522
51553
|
// src/compiler/html/remove-unused-styles.ts
|
|
51523
|
-
var removeUnusedStyles = (
|
|
51554
|
+
var removeUnusedStyles = (doc2, diagnostics) => {
|
|
51524
51555
|
try {
|
|
51525
|
-
const styleElms =
|
|
51556
|
+
const styleElms = doc2.head.querySelectorAll(`style[data-styles]`);
|
|
51526
51557
|
const styleLen = styleElms.length;
|
|
51527
51558
|
if (styleLen > 0) {
|
|
51528
|
-
const usedSelectors = getUsedSelectors(
|
|
51559
|
+
const usedSelectors = getUsedSelectors(doc2.documentElement);
|
|
51529
51560
|
for (let i = 0; i < styleLen; i++) {
|
|
51530
51561
|
removeUnusedStyleText(usedSelectors, diagnostics, styleElms[i]);
|
|
51531
51562
|
}
|
|
@@ -51658,41 +51689,41 @@ function collectAttributes(node) {
|
|
|
51658
51689
|
var SKIP_ATTRS = /* @__PURE__ */ new Set(["s-id", "c-id"]);
|
|
51659
51690
|
|
|
51660
51691
|
// src/hydrate/runner/patch-dom-implementation.ts
|
|
51661
|
-
function patchDomImplementation(
|
|
51692
|
+
function patchDomImplementation(doc2, opts) {
|
|
51662
51693
|
let win2;
|
|
51663
|
-
if (
|
|
51694
|
+
if (doc2.defaultView != null) {
|
|
51664
51695
|
opts.destroyWindow = true;
|
|
51665
|
-
patchWindow(
|
|
51666
|
-
win2 =
|
|
51696
|
+
patchWindow(doc2.defaultView);
|
|
51697
|
+
win2 = doc2.defaultView;
|
|
51667
51698
|
} else {
|
|
51668
51699
|
opts.destroyWindow = true;
|
|
51669
51700
|
opts.destroyDocument = false;
|
|
51670
51701
|
win2 = new MockWindow(false);
|
|
51671
51702
|
}
|
|
51672
|
-
if (win2.document !==
|
|
51673
|
-
win2.document =
|
|
51703
|
+
if (win2.document !== doc2) {
|
|
51704
|
+
win2.document = doc2;
|
|
51674
51705
|
}
|
|
51675
|
-
if (
|
|
51676
|
-
|
|
51706
|
+
if (doc2.defaultView !== win2) {
|
|
51707
|
+
doc2.defaultView = win2;
|
|
51677
51708
|
}
|
|
51678
|
-
const HTMLElement2 =
|
|
51709
|
+
const HTMLElement2 = doc2.documentElement.constructor.prototype;
|
|
51679
51710
|
if (typeof HTMLElement2.getRootNode !== "function") {
|
|
51680
|
-
const elm =
|
|
51711
|
+
const elm = doc2.createElement("unknown-element");
|
|
51681
51712
|
const HTMLUnknownElement = elm.constructor.prototype;
|
|
51682
51713
|
HTMLUnknownElement.getRootNode = getRootNode;
|
|
51683
51714
|
}
|
|
51684
|
-
if (typeof
|
|
51685
|
-
const CustomEvent2 =
|
|
51715
|
+
if (typeof doc2.createEvent === "function") {
|
|
51716
|
+
const CustomEvent2 = doc2.createEvent("CustomEvent").constructor;
|
|
51686
51717
|
if (win2.CustomEvent !== CustomEvent2) {
|
|
51687
51718
|
win2.CustomEvent = CustomEvent2;
|
|
51688
51719
|
}
|
|
51689
51720
|
}
|
|
51690
51721
|
try {
|
|
51691
|
-
win2.__stencil_baseURI =
|
|
51722
|
+
win2.__stencil_baseURI = doc2.baseURI;
|
|
51692
51723
|
} catch (e) {
|
|
51693
|
-
Object.defineProperty(
|
|
51724
|
+
Object.defineProperty(doc2, "baseURI", {
|
|
51694
51725
|
get() {
|
|
51695
|
-
const baseElm =
|
|
51726
|
+
const baseElm = doc2.querySelector("base[href]");
|
|
51696
51727
|
if (baseElm) {
|
|
51697
51728
|
return new URL(baseElm.getAttribute("href"), win2.location.href).href;
|
|
51698
51729
|
}
|
|
@@ -51903,7 +51934,7 @@ var docData = {
|
|
|
51903
51934
|
rootLevelIds: 0,
|
|
51904
51935
|
staticComponents: /* @__PURE__ */ new Set()
|
|
51905
51936
|
};
|
|
51906
|
-
function initializeWindow(win2,
|
|
51937
|
+
function initializeWindow(win2, doc2, opts, results) {
|
|
51907
51938
|
if (typeof opts.url === "string") {
|
|
51908
51939
|
try {
|
|
51909
51940
|
win2.location.href = opts.url;
|
|
@@ -51918,31 +51949,31 @@ function initializeWindow(win2, doc, opts, results) {
|
|
|
51918
51949
|
}
|
|
51919
51950
|
if (typeof opts.cookie === "string") {
|
|
51920
51951
|
try {
|
|
51921
|
-
|
|
51952
|
+
doc2.cookie = opts.cookie;
|
|
51922
51953
|
} catch (e) {
|
|
51923
51954
|
}
|
|
51924
51955
|
}
|
|
51925
51956
|
if (typeof opts.referrer === "string") {
|
|
51926
51957
|
try {
|
|
51927
|
-
|
|
51958
|
+
doc2.referrer = opts.referrer;
|
|
51928
51959
|
} catch (e) {
|
|
51929
51960
|
}
|
|
51930
51961
|
}
|
|
51931
51962
|
if (typeof opts.direction === "string") {
|
|
51932
51963
|
try {
|
|
51933
|
-
|
|
51964
|
+
doc2.documentElement.setAttribute("dir", opts.direction);
|
|
51934
51965
|
} catch (e) {
|
|
51935
51966
|
}
|
|
51936
51967
|
}
|
|
51937
51968
|
if (typeof opts.language === "string") {
|
|
51938
51969
|
try {
|
|
51939
|
-
|
|
51970
|
+
doc2.documentElement.setAttribute("lang", opts.language);
|
|
51940
51971
|
} catch (e) {
|
|
51941
51972
|
}
|
|
51942
51973
|
}
|
|
51943
51974
|
if (typeof opts.buildId === "string") {
|
|
51944
51975
|
try {
|
|
51945
|
-
|
|
51976
|
+
doc2.documentElement.setAttribute("data-stencil-build", opts.buildId);
|
|
51946
51977
|
} catch (e) {
|
|
51947
51978
|
}
|
|
51948
51979
|
}
|
|
@@ -51954,7 +51985,7 @@ function initializeWindow(win2, doc, opts, results) {
|
|
|
51954
51985
|
constrainTimeouts(win2);
|
|
51955
51986
|
}
|
|
51956
51987
|
runtimeLogging(win2, opts, results);
|
|
51957
|
-
|
|
51988
|
+
doc2[STENCIL_DOC_DATA] = docData;
|
|
51958
51989
|
return win2;
|
|
51959
51990
|
}
|
|
51960
51991
|
|
|
@@ -51972,18 +52003,18 @@ function renderToString(html, options, asStream) {
|
|
|
51972
52003
|
opts.constrainTimeouts = false;
|
|
51973
52004
|
return hydrateDocument(html, opts, asStream);
|
|
51974
52005
|
}
|
|
51975
|
-
function hydrateDocument(
|
|
52006
|
+
function hydrateDocument(doc2, options, asStream) {
|
|
51976
52007
|
const opts = normalizeHydrateOptions(options);
|
|
51977
52008
|
let win2 = null;
|
|
51978
52009
|
const results = generateHydrateResults(opts);
|
|
51979
52010
|
if (hasError(results.diagnostics)) {
|
|
51980
52011
|
return Promise.resolve(results);
|
|
51981
52012
|
}
|
|
51982
|
-
if (typeof
|
|
52013
|
+
if (typeof doc2 === "string") {
|
|
51983
52014
|
try {
|
|
51984
52015
|
opts.destroyWindow = true;
|
|
51985
52016
|
opts.destroyDocument = true;
|
|
51986
|
-
win2 = new MockWindow(
|
|
52017
|
+
win2 = new MockWindow(doc2);
|
|
51987
52018
|
if (!asStream) {
|
|
51988
52019
|
return render(win2, opts, results).then(() => results);
|
|
51989
52020
|
}
|
|
@@ -51997,10 +52028,10 @@ function hydrateDocument(doc, options, asStream) {
|
|
|
51997
52028
|
return Promise.resolve(results);
|
|
51998
52029
|
}
|
|
51999
52030
|
}
|
|
52000
|
-
if (isValidDocument(
|
|
52031
|
+
if (isValidDocument(doc2)) {
|
|
52001
52032
|
try {
|
|
52002
52033
|
opts.destroyDocument = false;
|
|
52003
|
-
win2 = patchDomImplementation(
|
|
52034
|
+
win2 = patchDomImplementation(doc2, opts);
|
|
52004
52035
|
if (!asStream) {
|
|
52005
52036
|
return render(win2, opts, results).then(() => results);
|
|
52006
52037
|
}
|
|
@@ -52057,41 +52088,41 @@ async function afterHydrate(win2, opts, results, resolve) {
|
|
|
52057
52088
|
return resolve(finalizeHydrate(win2, win2.document, opts, results));
|
|
52058
52089
|
}
|
|
52059
52090
|
}
|
|
52060
|
-
function finalizeHydrate(win2,
|
|
52091
|
+
function finalizeHydrate(win2, doc2, opts, results) {
|
|
52061
52092
|
try {
|
|
52062
|
-
inspectElement(results,
|
|
52093
|
+
inspectElement(results, doc2.documentElement, 0);
|
|
52063
52094
|
if (opts.removeUnusedStyles !== false) {
|
|
52064
52095
|
try {
|
|
52065
|
-
removeUnusedStyles(
|
|
52096
|
+
removeUnusedStyles(doc2, results.diagnostics);
|
|
52066
52097
|
} catch (e) {
|
|
52067
52098
|
renderCatchError(results, e);
|
|
52068
52099
|
}
|
|
52069
52100
|
}
|
|
52070
52101
|
if (typeof opts.title === "string") {
|
|
52071
52102
|
try {
|
|
52072
|
-
|
|
52103
|
+
doc2.title = opts.title;
|
|
52073
52104
|
} catch (e) {
|
|
52074
52105
|
renderCatchError(results, e);
|
|
52075
52106
|
}
|
|
52076
52107
|
}
|
|
52077
|
-
results.title =
|
|
52108
|
+
results.title = doc2.title;
|
|
52078
52109
|
if (opts.removeScripts) {
|
|
52079
|
-
removeScripts(
|
|
52110
|
+
removeScripts(doc2.documentElement);
|
|
52080
52111
|
}
|
|
52081
52112
|
try {
|
|
52082
|
-
updateCanonicalLink(
|
|
52113
|
+
updateCanonicalLink(doc2, opts.canonicalUrl);
|
|
52083
52114
|
} catch (e) {
|
|
52084
52115
|
renderCatchError(results, e);
|
|
52085
52116
|
}
|
|
52086
52117
|
try {
|
|
52087
|
-
relocateMetaCharset(
|
|
52118
|
+
relocateMetaCharset(doc2);
|
|
52088
52119
|
} catch (e) {
|
|
52089
52120
|
}
|
|
52090
52121
|
if (!hasError(results.diagnostics)) {
|
|
52091
52122
|
results.httpStatus = 200;
|
|
52092
52123
|
}
|
|
52093
52124
|
try {
|
|
52094
|
-
const metaStatus =
|
|
52125
|
+
const metaStatus = doc2.head.querySelector('meta[http-equiv="status"]');
|
|
52095
52126
|
if (metaStatus != null) {
|
|
52096
52127
|
const metaStatusContent = metaStatus.getAttribute("content");
|
|
52097
52128
|
if (metaStatusContent && metaStatusContent.length > 0) {
|
|
@@ -52101,25 +52132,25 @@ function finalizeHydrate(win2, doc, opts, results) {
|
|
|
52101
52132
|
} catch (e) {
|
|
52102
52133
|
}
|
|
52103
52134
|
if (opts.clientHydrateAnnotations) {
|
|
52104
|
-
|
|
52135
|
+
doc2.documentElement.classList.add("hydrated");
|
|
52105
52136
|
}
|
|
52106
52137
|
if (opts.serializeToHtml) {
|
|
52107
|
-
results.html = serializeDocumentToString(
|
|
52138
|
+
results.html = serializeDocumentToString(doc2, opts);
|
|
52108
52139
|
}
|
|
52109
52140
|
} catch (e) {
|
|
52110
52141
|
renderCatchError(results, e);
|
|
52111
52142
|
}
|
|
52112
|
-
destroyWindow(win2,
|
|
52143
|
+
destroyWindow(win2, doc2, opts, results);
|
|
52113
52144
|
return results;
|
|
52114
52145
|
}
|
|
52115
|
-
function destroyWindow(win2,
|
|
52146
|
+
function destroyWindow(win2, doc2, opts, results) {
|
|
52116
52147
|
if (!opts.destroyWindow) {
|
|
52117
52148
|
return;
|
|
52118
52149
|
}
|
|
52119
52150
|
try {
|
|
52120
52151
|
if (!opts.destroyDocument) {
|
|
52121
52152
|
win2.document = null;
|
|
52122
|
-
|
|
52153
|
+
doc2.defaultView = null;
|
|
52123
52154
|
}
|
|
52124
52155
|
if (win2.close) {
|
|
52125
52156
|
win2.close();
|
|
@@ -52128,8 +52159,8 @@ function destroyWindow(win2, doc, opts, results) {
|
|
|
52128
52159
|
renderCatchError(results, e);
|
|
52129
52160
|
}
|
|
52130
52161
|
}
|
|
52131
|
-
function serializeDocumentToString(
|
|
52132
|
-
return serializeNodeToHtml(
|
|
52162
|
+
function serializeDocumentToString(doc2, opts) {
|
|
52163
|
+
return serializeNodeToHtml(doc2, {
|
|
52133
52164
|
approximateLineWidth: opts.approximateLineWidth,
|
|
52134
52165
|
outerHtml: false,
|
|
52135
52166
|
prettyHtml: opts.prettyHtml,
|
|
@@ -52141,8 +52172,8 @@ function serializeDocumentToString(doc, opts) {
|
|
|
52141
52172
|
fullDocument: opts.fullDocument
|
|
52142
52173
|
});
|
|
52143
52174
|
}
|
|
52144
|
-
function isValidDocument(
|
|
52145
|
-
return
|
|
52175
|
+
function isValidDocument(doc2) {
|
|
52176
|
+
return doc2 != null && doc2.nodeType === 9 && doc2.documentElement != null && doc2.documentElement.nodeType === 1 && doc2.body != null && doc2.body.nodeType === 1;
|
|
52146
52177
|
}
|
|
52147
52178
|
function removeScripts(elm) {
|
|
52148
52179
|
const children = elm.children;
|