@okta/odyssey-react-mui 1.35.0 → 1.35.4
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/DatePickers/useOdysseyDateFields.cjs +2 -2
- package/dist/cjs/DatePickers/useOdysseyDateFields.cjs.map +1 -1
- package/dist/cjs/Field.cjs +1 -1
- package/dist/cjs/Field.cjs.map +1 -1
- package/dist/cjs/Pagination/Pagination.cjs +0 -6
- package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
- package/dist/cjs/inputUtils.cjs +1 -1
- package/dist/cjs/inputUtils.cjs.map +1 -1
- package/dist/cjs/labs/DataFilters.cjs +4 -4
- package/dist/cjs/labs/DataFilters.cjs.map +1 -1
- package/dist/cjs/labs/DataView/DataCard.cjs +18 -18
- package/dist/cjs/labs/DataView/DataCard.cjs.map +1 -1
- package/dist/cjs/labs/DataView/DataView.cjs +10 -10
- package/dist/cjs/labs/DataView/DataView.cjs.map +1 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs +4 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
- package/dist/cjs/labs/DataView/useFilterConversion.cjs +1 -1
- package/dist/cjs/labs/DataView/useFilterConversion.cjs.map +1 -1
- package/dist/cjs/theme/StringWithValue.cjs +6 -0
- package/dist/cjs/theme/StringWithValue.cjs.map +1 -0
- package/dist/cjs/theme/components.cjs +2590 -2592
- package/dist/cjs/theme/components.cjs.map +1 -1
- package/dist/cjs/theme/useMediaQuery.cjs +4 -4
- package/dist/cjs/theme/useMediaQuery.cjs.map +1 -1
- package/dist/cjs/ui-shell/InnerAppContainer.cjs +60 -0
- package/dist/cjs/ui-shell/InnerAppContainer.cjs.map +1 -0
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +6 -1
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs +79 -48
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +84 -112
- package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs.map +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNav.cjs +1 -6
- package/dist/cjs/ui-shell/TopNav/TopNav.cjs.map +1 -1
- package/dist/cjs/ui-shell/UiShell.cjs +6 -5
- package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs +10 -4
- package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/index.cjs +29 -9
- package/dist/cjs/ui-shell/index.cjs.map +1 -1
- package/dist/cjs/ui-shell/renderUiShell.cjs +2 -0
- package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
- package/dist/cjs/ui-shell/useMatchAppElementToUiShellAppArea.cjs +3 -2
- package/dist/cjs/ui-shell/useMatchAppElementToUiShellAppArea.cjs.map +1 -1
- package/dist/cjs/ui-shell/useScrollState.cjs +71 -21
- package/dist/cjs/ui-shell/useScrollState.cjs.map +1 -1
- package/dist/cjs/ui-shell/useUiShellBreakpoints.cjs +20 -15
- package/dist/cjs/ui-shell/useUiShellBreakpoints.cjs.map +1 -1
- package/dist/cjs/web-component/createReactRootElements.cjs +5 -3
- package/dist/cjs/web-component/createReactRootElements.cjs.map +1 -1
- package/dist/cjs/web-component/renderReactInWebComponent.cjs +21 -7
- package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
- package/dist/esm/DatePickers/useOdysseyDateFields.js +2 -2
- package/dist/esm/DatePickers/useOdysseyDateFields.js.map +1 -1
- package/dist/esm/Field.js +1 -1
- package/dist/esm/Field.js.map +1 -1
- package/dist/esm/Pagination/Pagination.js +0 -6
- package/dist/esm/Pagination/Pagination.js.map +1 -1
- package/dist/esm/inputUtils.js +1 -1
- package/dist/esm/inputUtils.js.map +1 -1
- package/dist/esm/labs/DataFilters.js +4 -4
- package/dist/esm/labs/DataFilters.js.map +1 -1
- package/dist/esm/labs/DataView/DataCard.js +18 -18
- package/dist/esm/labs/DataView/DataCard.js.map +1 -1
- package/dist/esm/labs/DataView/DataView.js +10 -10
- package/dist/esm/labs/DataView/DataView.js.map +1 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js +4 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
- package/dist/esm/labs/DataView/useFilterConversion.js +1 -1
- package/dist/esm/labs/DataView/useFilterConversion.js.map +1 -1
- package/dist/esm/theme/StringWithValue.js +2 -0
- package/dist/esm/theme/StringWithValue.js.map +1 -0
- package/dist/esm/theme/components.js +2607 -2609
- package/dist/esm/theme/components.js.map +1 -1
- package/dist/esm/theme/useMediaQuery.js +5 -5
- package/dist/esm/theme/useMediaQuery.js.map +1 -1
- package/dist/esm/ui-shell/InnerAppContainer.js +56 -0
- package/dist/esm/ui-shell/InnerAppContainer.js.map +1 -0
- package/dist/esm/ui-shell/NarrowUiShellContent.js +6 -1
- package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNav.js +80 -49
- package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +85 -113
- package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js.map +1 -1
- package/dist/esm/ui-shell/TopNav/TopNav.js +1 -6
- package/dist/esm/ui-shell/TopNav/TopNav.js.map +1 -1
- package/dist/esm/ui-shell/UiShell.js +6 -5
- package/dist/esm/ui-shell/UiShell.js.map +1 -1
- package/dist/esm/ui-shell/WideUiShellContent.js +10 -4
- package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/index.js +3 -1
- package/dist/esm/ui-shell/index.js.map +1 -1
- package/dist/esm/ui-shell/renderUiShell.js +2 -0
- package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
- package/dist/esm/ui-shell/useMatchAppElementToUiShellAppArea.js +3 -2
- package/dist/esm/ui-shell/useMatchAppElementToUiShellAppArea.js.map +1 -1
- package/dist/esm/ui-shell/useScrollState.js +67 -21
- package/dist/esm/ui-shell/useScrollState.js.map +1 -1
- package/dist/esm/ui-shell/useUiShellBreakpoints.js +19 -14
- package/dist/esm/ui-shell/useUiShellBreakpoints.js.map +1 -1
- package/dist/esm/web-component/createReactRootElements.js +4 -2
- package/dist/esm/web-component/createReactRootElements.js.map +1 -1
- package/dist/esm/web-component/renderReactInWebComponent.js +19 -5
- package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.scss +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/DatePickers/useOdysseyDateFields.d.ts.map +1 -1
- package/dist/types/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/labs/DataView/DataCard.d.ts.map +1 -1
- package/dist/types/labs/DataView/DataView.d.ts.map +1 -1
- package/dist/types/labs/DataView/TableLayoutContent.d.ts.map +1 -1
- package/dist/types/theme/StringWithValue.d.ts +13 -0
- package/dist/types/theme/StringWithValue.d.ts.map +1 -0
- package/dist/types/theme/components.d.ts.map +1 -1
- package/dist/types/theme/useMediaQuery.d.ts +2 -1
- package/dist/types/theme/useMediaQuery.d.ts.map +1 -1
- package/dist/types/ui-shell/InnerAppContainer.d.ts +35 -0
- package/dist/types/ui-shell/InnerAppContainer.d.ts.map +1 -0
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNav.d.ts +2 -0
- package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavToggleButton.d.ts +15 -8
- package/dist/types/ui-shell/SideNav/SideNavToggleButton.d.ts.map +1 -1
- package/dist/types/ui-shell/TopNav/TopNav.d.ts +1 -1
- package/dist/types/ui-shell/TopNav/TopNav.d.ts.map +1 -1
- package/dist/types/ui-shell/UiShell.d.ts +8 -1
- package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
- package/dist/types/ui-shell/WideUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/index.d.ts +3 -1
- package/dist/types/ui-shell/index.d.ts.map +1 -1
- package/dist/types/ui-shell/renderUiShell.d.ts +2 -2
- package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
- package/dist/types/ui-shell/useMatchAppElementToUiShellAppArea.d.ts.map +1 -1
- package/dist/types/ui-shell/useScrollState.d.ts +9 -1
- package/dist/types/ui-shell/useScrollState.d.ts.map +1 -1
- package/dist/types/ui-shell/useUiShellBreakpoints.d.ts +15 -5
- package/dist/types/ui-shell/useUiShellBreakpoints.d.ts.map +1 -1
- package/dist/types/web-component/createReactRootElements.d.ts +2 -0
- package/dist/types/web-component/createReactRootElements.d.ts.map +1 -1
- package/dist/types/web-component/renderReactInWebComponent.d.ts +1 -1
- package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
- package/package.json +17 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollState.js","names":["useEffect","
|
|
1
|
+
{"version":3,"file":"useScrollState.js","names":["useCallback","useEffect","useRef","useState","getIsScrollHeightElement","containerElement","scrollableElement","containerElementHeight","getBoundingClientRect","height","scrollableElementHeight","getIsYAxisScrollContainer","element","overflowY","window","getComputedStyle","getIsYAxisScrolling","scrollHeight","clientHeight","getNestedScrollContainers","Array","from","querySelectorAll","filter","fakeDefaultContainerElement","document","createElement","useScrollState","isScrolled","setIsScrolled","requestedAnimationFrameIdRef","scrollableElementsRef","updateScrollState","cancelAnimationFrame","current","requestAnimationFrame","reduce","scrollTop","addScrollEventListeners","forEach","addEventListener","removeScrollEventListeners","removeEventListener","updateScrollableElements","computedContainerElement","concat","updateScrollListeners","mutationObserver","MutationObserver","observe","attributes","attributeFilter","childList","subtree","disconnect","isContentScrolled"],"sources":["../../../src/ui-shell/useScrollState.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport const getIsScrollHeightElement = ({\n containerElement,\n scrollableElement,\n}: {\n containerElement: HTMLElement;\n scrollableElement: HTMLElement;\n}) => {\n const containerElementHeight =\n containerElement.getBoundingClientRect().height;\n const scrollableElementHeight =\n scrollableElement.getBoundingClientRect().height;\n\n return scrollableElementHeight - containerElementHeight >= 0;\n};\n\nexport const getIsYAxisScrollContainer = (element: HTMLElement) => {\n const overflowY = window.getComputedStyle(element).overflowY;\n\n return overflowY === \"auto\" || overflowY === \"scroll\";\n};\n\nexport const getIsYAxisScrolling = (element: HTMLElement) =>\n element.scrollHeight > element.clientHeight\n ? getIsYAxisScrollContainer(element)\n : false;\n\nexport const getNestedScrollContainers = (containerElement: HTMLElement) =>\n Array.from(containerElement.querySelectorAll<HTMLElement>(\"*\"))\n .filter((element) => getIsYAxisScrollContainer(element))\n .filter((scrollableElement) =>\n getIsScrollHeightElement({\n containerElement,\n scrollableElement,\n }),\n );\n\nexport const fakeDefaultContainerElement = document.createElement(\"div\");\n\nexport const useScrollState = <\n ContainerElement extends HTMLElement = HTMLDivElement,\n>(\n /**\n * The element containing a scroll area.\n */\n containerElement: ContainerElement | null,\n) => {\n const [isScrolled, setIsScrolled] = useState(false);\n\n const requestedAnimationFrameIdRef = useRef(0);\n const scrollableElementsRef = useRef<HTMLElement[]>([]);\n\n const updateScrollState = useCallback(() => {\n cancelAnimationFrame(requestedAnimationFrameIdRef.current);\n\n requestedAnimationFrameIdRef.current = requestAnimationFrame(() => {\n setIsScrolled(\n scrollableElementsRef.current.reduce(\n (isScrolled, scrollableElement) =>\n isScrolled || scrollableElement.scrollTop > 0,\n false,\n ),\n );\n });\n }, []);\n\n const addScrollEventListeners = useCallback(() => {\n scrollableElementsRef.current.forEach((scrollableElement) => {\n scrollableElement.addEventListener(\"scroll\", updateScrollState);\n });\n }, [updateScrollState]);\n\n const removeScrollEventListeners = useCallback(() => {\n scrollableElementsRef.current.forEach((scrollableElement) => {\n scrollableElement.removeEventListener(\"scroll\", updateScrollState);\n });\n }, [updateScrollState]);\n\n const updateScrollableElements = useCallback(() => {\n const computedContainerElement =\n containerElement || fakeDefaultContainerElement;\n\n scrollableElementsRef.current = getNestedScrollContainers(\n computedContainerElement,\n ).concat(computedContainerElement);\n }, [containerElement]);\n\n const updateScrollListeners = useCallback(() => {\n removeScrollEventListeners();\n updateScrollableElements();\n addScrollEventListeners();\n updateScrollState();\n }, [\n addScrollEventListeners,\n removeScrollEventListeners,\n updateScrollableElements,\n updateScrollState,\n ]);\n\n useEffect(() => {\n const mutationObserver = new MutationObserver(() => {\n updateScrollListeners();\n });\n\n if (containerElement) {\n mutationObserver.observe(containerElement, {\n attributes: true,\n attributeFilter: [\"style\"],\n childList: true,\n subtree: true,\n });\n }\n\n updateScrollListeners();\n\n return () => {\n cancelAnimationFrame(requestedAnimationFrameIdRef.current);\n removeScrollEventListeners();\n mutationObserver.disconnect();\n };\n }, [containerElement, removeScrollEventListeners, updateScrollListeners]);\n\n return {\n isContentScrolled: isScrolled,\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEhE,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACvCC,gBAAgB;EAChBC;AAIF,CAAC,KAAK;EACJ,MAAMC,sBAAsB,GA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EACxBX,iBAAiB,CAClB,CAAC;EAEF/B,SAAS,CAAC,MAAM;IACd,MAAM8C,gBAAgB,GAAG,IAAIC,gBAAgB,CAAC,MAAM;MAClDF,qBAAqB,CAAC,CAAC;IACzB,CAAC,CAAC;IAEF,IAAIzC,gBAAgB,EAAE;MACpB0C,gBAAgB,CAACE,OAAO,CAAC5C,gBAAgB,EAAE;QACzC6C,UAAU,EAAE,IAAI;QAChBC,eAAe,EAAE,CAAC,OAAO,CAAC;QAC1BC,SAAS,EAAE,IAAI;QACfC,OAAO,EAAE;MACX,CAAC,CAAC;IACJ;IAEAP,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXb,oBAAoB,CAACH,4BAA4B,CAACI,OAAO,CAAC;MAC1DO,0BAA0B,CAAC,CAAC;MAC5BM,gBAAgB,CAACO,UAAU,CAAC,CAAC;IAC/B,CAAC;EACH,CAAC,EAAE,CAACjD,gBAAgB,EAAEoC,0BAA0B,EAAEK,qBAAqB,CAAC,CAAC;EAEzE,OAAO;IACLS,iBAAiB,EAAE3B;EACrB,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -11,23 +11,28 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { useMediaQuery } from "../theme/useMediaQuery.js";
|
|
14
|
-
export const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
export const defaultUiShellBreakpointConfig = {
|
|
15
|
+
narrow: 0,
|
|
16
|
+
medium: 600,
|
|
17
|
+
wide: 800
|
|
18
18
|
};
|
|
19
|
-
export const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
export const adminAppUiShellBreakpoints = {
|
|
20
|
+
narrow: 0,
|
|
21
|
+
medium: 600,
|
|
22
|
+
wide: 1304
|
|
23
|
+
};
|
|
24
|
+
export const useUiShellBreakpoints = (breakpointConfig = defaultUiShellBreakpointConfig) => {
|
|
25
|
+
const isNarrowView = useMediaQuery(`(min-width: ${breakpointConfig.narrow}px)`);
|
|
26
|
+
const isMediumView = useMediaQuery(`(min-width: ${breakpointConfig.medium}px)`);
|
|
27
|
+
const isWideView = useMediaQuery(`(min-width: ${breakpointConfig.wide}px)`);
|
|
28
|
+
if (isWideView) {
|
|
29
|
+
return "wide";
|
|
25
30
|
}
|
|
26
|
-
if (
|
|
27
|
-
return "
|
|
31
|
+
if (isMediumView) {
|
|
32
|
+
return "medium";
|
|
28
33
|
}
|
|
29
|
-
if (
|
|
30
|
-
return "
|
|
34
|
+
if (isNarrowView) {
|
|
35
|
+
return "narrow";
|
|
31
36
|
}
|
|
32
37
|
return "none";
|
|
33
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUiShellBreakpoints.js","names":["useMediaQuery","
|
|
1
|
+
{"version":3,"file":"useUiShellBreakpoints.js","names":["useMediaQuery","defaultUiShellBreakpointConfig","narrow","medium","wide","adminAppUiShellBreakpoints","useUiShellBreakpoints","breakpointConfig","isNarrowView","isMediumView","isWideView"],"sources":["../../../src/ui-shell/useUiShellBreakpoints.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useMediaQuery } from \"../theme/useMediaQuery.js\";\n\nexport type UiShellBreakpointConfig = {\n narrow: number;\n medium: number;\n wide: number;\n};\n\nexport const defaultUiShellBreakpointConfig = {\n narrow: 0,\n medium: 600,\n wide: 800,\n} as const satisfies UiShellBreakpointConfig;\n\nexport const adminAppUiShellBreakpoints = {\n narrow: 0,\n medium: 600,\n wide: 1304,\n} as const satisfies UiShellBreakpointConfig;\n\nexport const useUiShellBreakpoints = (\n breakpointConfig: UiShellBreakpointConfig = defaultUiShellBreakpointConfig,\n): keyof UiShellBreakpointConfig | \"none\" => {\n const isNarrowView = useMediaQuery(\n `(min-width: ${breakpointConfig.narrow}px)`,\n );\n\n const isMediumView = useMediaQuery(\n `(min-width: ${breakpointConfig.medium}px)`,\n );\n\n const isWideView = useMediaQuery(`(min-width: ${breakpointConfig.wide}px)`);\n\n if (isWideView) {\n return \"wide\";\n }\n\n if (isMediumView) {\n return \"medium\";\n }\n\n if (isNarrowView) {\n return \"narrow\";\n }\n\n // This is a failsafe in case we don't have any media queries on page load or if media queries were improperly defined (no `0` case). With the default breakpoints, it will never be `\"none\"`.\n return \"none\";\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,2BAA2B;AAQzD,OAAO,MAAMC,8BAA8B,GAAG;EAC5CC,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE,GAAG;EACXC,IAAI,EAAE;AACR,CAA4C;AAE5C,OAAO,MAAMC,0BAA0B,GAAG;EACxCH,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE,GAAG;EACXC,IAAI,EAAE;AACR,CAA4C;AAE5C,OAAO,MAAME,qBAAqB,GAAGA,CACnCC,gBAAyC,GAAGN,8BAA8B,KAC/B;EAC3C,MAAMO,YAAY,GAAGR,aAAa,CAChC,eAAeO,gBAAgB,CAACL,MAAM,KACxC,CAAC;EAED,MAAMO,YAAY,GAAGT,aAAa,CAChC,eAAeO,gBAAgB,CAACJ,MAAM,KACxC,CAAC;EAED,MAAMO,UAAU,GAAGV,aAAa,CAAC,eAAeO,gBAAgB,CAACH,IAAI,KAAK,CAAC;EAE3E,IAAIM,UAAU,EAAE;IACd,OAAO,MAAM;EACf;EAEA,IAAID,YAAY,EAAE;IAChB,OAAO,QAAQ;EACjB;EAEA,IAAID,YAAY,EAAE;IAChB,OAAO,QAAQ;EACjB;EAGA,OAAO,MAAM;AACf,CAAC","ignoreList":[]}
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
export const appRootElementId = "app-root";
|
|
14
|
+
export const stylesRootElementId = "style-root";
|
|
13
15
|
export const createReactRootElements = () => {
|
|
14
16
|
const appRootElement = document.createElement("div");
|
|
15
17
|
const stylesRootElement = document.createElement("div");
|
|
16
18
|
appRootElement.style.setProperty("height", "inherit");
|
|
17
|
-
appRootElement.setAttribute("id",
|
|
18
|
-
stylesRootElement.setAttribute("id",
|
|
19
|
+
appRootElement.setAttribute("id", appRootElementId);
|
|
20
|
+
stylesRootElement.setAttribute("id", stylesRootElementId);
|
|
19
21
|
stylesRootElement.setAttribute("nonce", window.cspNonce);
|
|
20
22
|
return {
|
|
21
23
|
appRootElement,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReactRootElements.js","names":["createReactRootElements","appRootElement","document","createElement","stylesRootElement","style","setProperty","setAttribute","window","cspNonce"],"sources":["../../../src/web-component/createReactRootElements.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport type ReactRootElements = {\n /**\n * The element your root React component renders into.\n * React has to render or portal somewhere, and this element can be used for that root element.\n */\n appRootElement: HTMLDivElement;\n /**\n * In React apps, your styles typically go in `document.head`, but you may want to render them somewhere else.\n *\n * Specifically when rendering in a web component, there is no `<head>`, so you have to create a spot for styles to render.\n */\n stylesRootElement: HTMLDivElement | HTMLHeadElement;\n};\n\nexport const createReactRootElements = () => {\n const appRootElement = document.createElement(\"div\");\n const stylesRootElement = document.createElement(\"div\");\n\n // This `div` may cause layout issues unless it inherits the parent's height.\n appRootElement.style.setProperty(\"height\", \"inherit\");\n\n appRootElement.setAttribute(\"id\",
|
|
1
|
+
{"version":3,"file":"createReactRootElements.js","names":["appRootElementId","stylesRootElementId","createReactRootElements","appRootElement","document","createElement","stylesRootElement","style","setProperty","setAttribute","window","cspNonce"],"sources":["../../../src/web-component/createReactRootElements.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport type ReactRootElements = {\n /**\n * The element your root React component renders into.\n * React has to render or portal somewhere, and this element can be used for that root element.\n */\n appRootElement: HTMLDivElement;\n /**\n * In React apps, your styles typically go in `document.head`, but you may want to render them somewhere else.\n *\n * Specifically when rendering in a web component, there is no `<head>`, so you have to create a spot for styles to render.\n */\n stylesRootElement: HTMLDivElement | HTMLHeadElement;\n};\n\nexport const appRootElementId = \"app-root\";\nexport const stylesRootElementId = \"style-root\";\n\nexport const createReactRootElements = () => {\n const appRootElement = document.createElement(\"div\");\n const stylesRootElement = document.createElement(\"div\");\n\n // This `div` may cause layout issues unless it inherits the parent's height.\n appRootElement.style.setProperty(\"height\", \"inherit\");\n\n appRootElement.setAttribute(\"id\", appRootElementId);\n stylesRootElement.setAttribute(\"id\", stylesRootElementId);\n stylesRootElement.setAttribute(\"nonce\", window.cspNonce);\n\n return {\n appRootElement,\n stylesRootElement,\n } satisfies ReactRootElements;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA,OAAO,MAAMA,gBAAgB,GAAG,UAAU;AAC1C,OAAO,MAAMC,mBAAmB,GAAG,YAAY;AAE/C,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;EAC3C,MAAMC,cAAc,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EACpD,MAAMC,iBAAiB,GAAGF,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAGvDF,cAAc,CAACI,KAAK,CAACC,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC;EAErDL,cAAc,CAACM,YAAY,CAAC,IAAI,EAAET,gBAAgB,CAAC;EACnDM,iBAAiB,CAACG,YAAY,CAAC,IAAI,EAAER,mBAAmB,CAAC;EACzDK,iBAAiB,CAACG,YAAY,CAAC,OAAO,EAAEC,MAAM,CAACC,QAAQ,CAAC;EAExD,OAAO;IACLR,cAAc;IACdG;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -14,6 +14,7 @@ import { createReactRootElements } from "./createReactRootElements.js";
|
|
|
14
14
|
export const reactWebComponentElementName = "odyssey-react-web-component";
|
|
15
15
|
const SsrFriendlyHtmlElementClass = "HTMLElement" in globalThis ? HTMLElement : class {};
|
|
16
16
|
export class ReactInWebComponentElement extends SsrFriendlyHtmlElementClass {
|
|
17
|
+
reactRootPromise = Promise.resolve(null);
|
|
17
18
|
constructor(getReactComponent) {
|
|
18
19
|
super();
|
|
19
20
|
this.getReactComponent = getReactComponent;
|
|
@@ -32,15 +33,28 @@ export class ReactInWebComponentElement extends SsrFriendlyHtmlElementClass {
|
|
|
32
33
|
this.reactRootElements.stylesRootElement.appendChild(styleElement);
|
|
33
34
|
shadowRoot.appendChild(this.reactRootElements.stylesRootElement);
|
|
34
35
|
shadowRoot.appendChild(this.reactRootElements.appRootElement);
|
|
35
|
-
this.reactRootPromise = import("react-dom/client").then(({
|
|
36
|
-
createRoot
|
|
37
|
-
}) => createRoot(this.reactRootElements.appRootElement));
|
|
38
36
|
}
|
|
39
37
|
connectedCallback() {
|
|
40
|
-
this.reactRootPromise.then(reactRoot =>
|
|
38
|
+
this.reactRootPromise = this.reactRootPromise.then(reactRoot => {
|
|
39
|
+
if (reactRoot) {
|
|
40
|
+
throw new Error(`connectedCallback fired when reactRoot is already mounted.`);
|
|
41
|
+
}
|
|
42
|
+
return import("react-dom/client").then(({
|
|
43
|
+
createRoot
|
|
44
|
+
}) => createRoot(this.reactRootElements.appRootElement));
|
|
45
|
+
}).then(reactRoot => {
|
|
46
|
+
reactRoot.render(this.getReactComponent(this.reactRootElements));
|
|
47
|
+
return reactRoot;
|
|
48
|
+
});
|
|
41
49
|
}
|
|
42
50
|
disconnectedCallback() {
|
|
43
|
-
this.reactRootPromise.then(reactRoot =>
|
|
51
|
+
this.reactRootPromise = this.reactRootPromise.then(reactRoot => {
|
|
52
|
+
if (!reactRoot) {
|
|
53
|
+
throw new Error(`disconnectedCallback fired when reactRoot is already unmounted.`);
|
|
54
|
+
}
|
|
55
|
+
reactRoot.unmount();
|
|
56
|
+
return null;
|
|
57
|
+
});
|
|
44
58
|
}
|
|
45
59
|
}
|
|
46
60
|
if ("customElements" in globalThis && !customElements.get(reactWebComponentElementName)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderReactInWebComponent.js","names":["createReactRootElements","reactWebComponentElementName","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","ReactInWebComponentElement","constructor","getReactComponent","reactRootElements","styleElement","document","createElement","shadowRoot","attachShadow","mode","innerHTML","setAttribute","window","cspNonce","stylesRootElement","appendChild","appRootElement","
|
|
1
|
+
{"version":3,"file":"renderReactInWebComponent.js","names":["createReactRootElements","reactWebComponentElementName","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","ReactInWebComponentElement","reactRootPromise","Promise","resolve","constructor","getReactComponent","reactRootElements","styleElement","document","createElement","shadowRoot","attachShadow","mode","innerHTML","setAttribute","window","cspNonce","stylesRootElement","appendChild","appRootElement","connectedCallback","then","reactRoot","Error","createRoot","render","disconnectedCallback","unmount","customElements","get","define","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type ReactNode } from \"react\";\nimport type { Root } from \"react-dom/client\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\n\nexport const reactWebComponentElementName = \"odyssey-react-web-component\";\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class ReactInWebComponentElement extends SsrFriendlyHtmlElementClass {\n getReactComponent: GetReactComponentInWebComponent;\n reactRootElements: ReactRootElements;\n reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor(getReactComponent: GetReactComponentInWebComponent) {\n super();\n\n this.getReactComponent = getReactComponent;\n this.reactRootElements = createReactRootElements();\n\n const styleElement = document.createElement(\"style\");\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n\n styleElement.innerHTML = `\n :host {\n all: initial;\n contain: content;\n }\n `;\n\n styleElement.setAttribute(\"nonce\", window.cspNonce);\n\n this.reactRootElements.stylesRootElement.appendChild(styleElement);\n shadowRoot.appendChild(this.reactRootElements.stylesRootElement);\n shadowRoot.appendChild(this.reactRootElements.appRootElement);\n }\n\n connectedCallback() {\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n reactRoot.render(this.getReactComponent(this.reactRootElements));\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\nif (\n \"customElements\" in globalThis &&\n !customElements.get(reactWebComponentElementName)\n) {\n customElements.define(\n reactWebComponentElementName,\n ReactInWebComponentElement,\n );\n}\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: HTMLElement;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n}: RenderReactInWebComponentProps) => {\n const reactElement = new ReactInWebComponentElement(getReactComponent);\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,SACEA,uBAAuB,QAElB,8BAA8B;AAErC,OAAO,MAAMC,4BAA4B,GAAG,6BAA6B;AAMzE,MAAMC,2BAA2B,GAC/B,aAAa,IAAIC,UAAU,GACvBC,WAAW,GACV,MAAM,EAA+C;AAE5D,OAAO,MAAMC,0BAA0B,SAASH,2BAA2B,CAAC;EAG1EI,gBAAgB,GAAyBC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;EAE9DC,WAAWA,CAACC,iBAAkD,EAAE;IAC9D,KAAK,CAAC,CAAC;IAEP,IAAI,CAACA,iBAAiB,GAAGA,iBAAiB;IAC1C,IAAI,CAACC,iBAAiB,GAAGX,uBAAuB,CAAC,CAAC;IAElD,MAAMY,YAAY,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;IACpD,MAAMC,UAAU,GAAG,IAAI,CAACC,YAAY,CAAC;MAAEC,IAAI,EAAE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