From 1993339198ef8b8db80ae478dfd9ae7ed5c1b114 Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Tue, 19 Jan 2021 09:34:36 -0500 Subject: [PATCH 1/8] Support blank siteRoot --- example/package.json | 2 +- .../src/app/components/Explorer/index.js | 3 +- .../static/scripts/default-template.js | 79 ++++++++++--------- .../webdoc-default-template/tmpl/layout.tmpl | 5 +- .../src/template-plugins/LinkerPlugin.js | 4 +- 5 files changed, 49 insertions(+), 44 deletions(-) diff --git a/example/package.json b/example/package.json index 8dfb0a0d..65b48b2d 100644 --- a/example/package.json +++ b/example/package.json @@ -23,7 +23,7 @@ }, "scripts": { "unit-test": "", - "build": "webdoc --tutorials ./tutorials --site-root example-documentation", + "build": "webdoc --tutorials ./tutorials", "build-next": "cd .. && webdoc && cd example", "build-pixi-api": "cd ../../pixi-api && webdoc --site-root docs && cd ../webdoc/example", "build-pixi-api-prod": "cd ../../pixi-api && webdoc --site-root pixi-api && cd ../webdoc/example" diff --git a/packages/webdoc-default-template/src/app/components/Explorer/index.js b/packages/webdoc-default-template/src/app/components/Explorer/index.js index 6d1f09cc..c795c553 100644 --- a/packages/webdoc-default-template/src/app/components/Explorer/index.js +++ b/packages/webdoc-default-template/src/app/components/Explorer/index.js @@ -22,9 +22,10 @@ export default connect(({explorerOpen}) => ({ const {root} = useExplorerStyles(); const toggleOpen = React.useCallback(() => setOpen(!isOpen), [isOpen]); const children = []; + const sitePrefix = window.appData.siteRoot ? "/" + window.appData.siteRoot + "/" : "/"; if (!fetched) { - fetch("/" + window.appData.siteRoot + "/explorer/reference.json") + fetch(sitePrefix + "explorer/reference.json") .then((response) => { if (response.ok) { response.json().then((idata) => { diff --git a/packages/webdoc-default-template/static/scripts/default-template.js b/packages/webdoc-default-template/static/scripts/default-template.js index 76981235..77bd93bf 100644 --- a/packages/webdoc-default-template/static/scripts/default-template.js +++ b/packages/webdoc-default-template/static/scripts/default-template.js @@ -4495,6 +4495,44 @@ function ExplorerHeader(_ref) { className: "explorer__header__title" }, "{ ", React.createElement("i", null, "webdoc"), " }")); } +// CONCATENATED MODULE: ./src/app/components/Explorer/useExplorerStyles.js +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + +var itemStyle = { + label: { + alignItems: "center", + display: "flex", + color: "#333333", + fontSize: 12, + height: "24px", + lineHeight: "14px" + }, + labelLinks: { + color: "#333333" + }, + iconContainer: { + color: "#333333", + fontSize: 8, + marginRight: 0 + }, + selected: { + backgroundColor: "none" + }, + root: { + padding: "0 8px" + } +}; +var useExplorerStyles = styles_makeStyles(itemStyle); +var useExplorerCategoryStyles = styles_makeStyles(_objectSpread(_objectSpread({}, itemStyle), {}, { + label: _objectSpread(_objectSpread({}, itemStyle.label), {}, { + fontWeight: "bold" + }) +})); // CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/Typography/Typography.js @@ -5812,44 +5850,6 @@ var TreeItem_TreeItem = /*#__PURE__*/external_React_["forwardRef"](function Tree var cuid = __webpack_require__(26); var cuid_default = /*#__PURE__*/__webpack_require__.n(cuid); -// CONCATENATED MODULE: ./src/app/components/Explorer/useExplorerStyles.js -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - -var itemStyle = { - label: { - alignItems: "center", - display: "flex", - color: "#333333", - fontSize: 12, - height: "24px", - lineHeight: "14px" - }, - labelLinks: { - color: "#333333" - }, - iconContainer: { - color: "#333333", - fontSize: 8, - marginRight: 0 - }, - selected: { - backgroundColor: "none" - }, - root: { - padding: "0 8px" - } -}; -var useExplorerStyles = styles_makeStyles(itemStyle); -var useExplorerCategoryStyles = styles_makeStyles(_objectSpread(_objectSpread({}, itemStyle), {}, { - label: _objectSpread(_objectSpread({}, itemStyle.label), {}, { - fontWeight: "bold" - }) -})); // CONCATENATED MODULE: ./src/app/components/Explorer/ExplorerCategoryItem.js @@ -8701,9 +8701,10 @@ var fetched = false; return setOpen(!isOpen); }, [isOpen]); var children = []; + var sitePrefix = window.appData.siteRoot ? "/" + window.appData.siteRoot + "/" : "/"; if (!fetched) { - fetch("/" + window.appData.siteRoot + "/explorer/reference.json").then(function (response) { + fetch(sitePrefix + "explorer/reference.json").then(function (response) { if (response.ok) { response.json().then(function (idata) { setData(idata || {}); diff --git a/packages/webdoc-default-template/tmpl/layout.tmpl b/packages/webdoc-default-template/tmpl/layout.tmpl index c950df85..595a8384 100644 --- a/packages/webdoc-default-template/tmpl/layout.tmpl +++ b/packages/webdoc-default-template/tmpl/layout.tmpl @@ -4,6 +4,7 @@ */ const rootData = obj; const siteRoot = this.getPlugin("linker").siteRoot; +const sitePrefix = siteRoot ? siteRoot + "/" : siteRoot; ?> @@ -11,7 +12,7 @@ const siteRoot = this.getPlugin("linker").siteRoot; webdoc: <?js= title ?> - + @@ -23,7 +24,7 @@ const siteRoot = this.getPlugin("linker").siteRoot; siteRoot: "", }; - +
diff --git a/packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js b/packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js index 69fc2fc1..4a9c3c0b 100644 --- a/packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js +++ b/packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js @@ -368,7 +368,9 @@ function LinkerPluginShell() { */ processInternalURI(uri: string, options: { outputRelative?: boolean } = {}): string { if (!options.outputRelative) { - uri = uri.replace("%3CsiteRoot%3E", this.siteRoot); + uri = uri + .replace("%3CsiteRoot%3E", this.siteRoot) + .replace("//", "/");// needed if siteRoot = ""; } else { uri = uri.replace("/%3CsiteRoot%3E/", ""); } From d0d5f6c8bba80126dd11f87f3d63749fd4ea342f Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Tue, 19 Jan 2021 09:52:55 -0500 Subject: [PATCH 2/8] Fix explorer height --- packages/webdoc-default-template/src/styles/explorer.scss | 6 +++++- packages/webdoc-default-template/static/styles/index.css | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/webdoc-default-template/src/styles/explorer.scss b/packages/webdoc-default-template/src/styles/explorer.scss index 04fae1d5..ba6d1ad9 100644 --- a/packages/webdoc-default-template/src/styles/explorer.scss +++ b/packages/webdoc-default-template/src/styles/explorer.scss @@ -5,8 +5,8 @@ background-color: $colorSheetSecondary; display: flex; flex-direction: column; - padding-bottom: 8px; margin: 0; + min-height: 100%; max-height: 100%; min-width: 291px; @@ -18,6 +18,10 @@ &__tree > *:first-child { margin-top: 8px; } + + &__tree { + margin-bottom: 8px; + } } /* This appears outside of .explorer when its closed. */ diff --git a/packages/webdoc-default-template/static/styles/index.css b/packages/webdoc-default-template/static/styles/index.css index a929dcb0..068765c5 100644 --- a/packages/webdoc-default-template/static/styles/index.css +++ b/packages/webdoc-default-template/static/styles/index.css @@ -1 +1 @@ -body,html{margin:0;padding:0;height:100%}a{text-decoration:none;color:#3f51b5}a:hover{color:#102ac0;text-decoration:underline}.docs{flex-flow:column nowrap;color:var(--color-primary-text);font-family:Roboto,Lato,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;height:100%;min-height:100vh}.docs,.docs .page{display:flex;justify-content:flex-start;align-items:stretch;align-content:stretch}.docs .page{flex-flow:row nowrap;width:100%;margin:0 auto;word-break:break-word;min-height:0;flex-grow:2;flex-basis:0}.docs .page-explorer,.docs .page-members-explorer{max-width:400px;overflow:auto}.docs .page-members-explorer{min-width:200px}.docs .page-members-explorer>:first-child{margin-top:68px}.docs .page-content>:first-child{margin-top:8px}.docs .page-content>:last-child,.docs .page-members-explorer>:last-child{margin-bottom:8px}.docs .page-content{color:var(--color-text);font-family:Arial,Roboto,sans-serif;flex-grow:2;flex-shrink:1;height:100%;overflow-x:hidden;overflow-y:auto;max-width:800px;padding-left:67px;padding-right:83px;width:0}.docs .page-content>:first-child{margin-top:24px}.docs .page-r-divider{border:1px solid var(--color-primary-light);margin:68px 0 0;height:67vh}.md h1{font-size:3em}.md h2{font-size:2em}table{border:1px solid var(--color-borders);border-collapse:collapse;margin:8px 0}table caption{font-weight:700;margin-bottom:8px;text-align:left}table th{border-bottom:1px solid var(--color-borders);font-weight:500;word-break:normal}table th,td{padding:8px;font-size:92%;text-align:left}table td{word-break:normal}table td p:first-child{margin-top:0}table td p:last-child{margin-bottom:0}.table-wrapper{display:block;overflow-x:scroll}.header-content-container{display:flex;flex-direction:column;flex-grow:1;overflow-y:auto;min-width:0;max-height:100%}.header-content-container__content{display:flex;overflow:auto}.header{background-color:#fff;border-bottom:.5px solid rgba(0,0,0,.16);height:76px;top:0;width:100%}.header__container{justify-content:space-around}.header__container,.header__contents{align-items:center;backdrop-filter:blur(48px);display:flex;height:100%}.header__contents{flex-grow:1;padding-right:110px;justify-content:flex-end}.header__contents *{margin-right:42px}.header__link{color:#000;text-decoration:underline}.header__link__current{color:#0066cd;text-decoration:none}.header__title{margin:0;padding:0;max-width:80%;width:100%}.document{font-size:.875em;line-height:1.4em;width:100%}.document__breadcrumb a{color:var(--color-text);text-decoration:underline}.document__breadcrumb>:last-child{color:var(--color-primary)}.document>.document__title{font-size:3em;line-height:1.4em;margin:18px 0}.document>.document__brief,.document>.document__description{margin-left:8px}.document>*{margin:10px 0}.explorer{background-color:var(--color-sheet-secondary);display:flex;flex-direction:column;padding-bottom:8px;margin:0;max-height:100%;min-width:291px}.explorer .MuiTreeView-root{padding:0 8px;overflow:auto}.explorer__tree>:first-child{margin-top:8px}.explorer__header{align-items:center;display:flex;flex-direction:row;min-height:76px;height:76px}.explorer__header__title{font-size:28px;font-weight:700;margin-left:30px;line-height:33px}.explorer__header-opened{border-bottom:.5px solid rgba(0,0,0,.16)}.explorer__header-closed{background-color:transparent}.members__category{font-size:1.5em;font-weight:700;line-height:1.4em;padding:8px}.members>hr{border:2px solid var(--color-sheet-secondary)}.members>*{margin-top:10px;margin-bottom:10px}.member{position:relative;padding-bottom:12px;width:100%}.member__title{align-items:center;display:flex;margin-left:12px;margin-bottom:10px}.member__title>a{height:16px}.member__title>span{font-size:1.3em;margin-left:8px;line-height:1.4em}.member>.table-wrapper,.member__brief,.member__description{margin-left:8px}.member>.signature{margin-bottom:8px}.page-members-explorer{font-family:Arial,sans-serif;font-size:12px;line-height:14px}.page-members-explorer-category{margin-left:16px;margin-bottom:7px}.page-members-explorer-category__title{font-weight:700;margin-bottom:7px}.page-members-explorer-category__items{margin-left:12px;margin-top:0;margin-bottom:0;padding:0;list-style:none}.page-members-explorer__item{align-items:center;border-radius:8px 0 0 8px;display:flex;font-weight:400;height:15px;line-height:1.5;padding-left:2px;vertical-align:middle}.page-members-explorer__item a{color:var(--color-text)}.page-members-explorer__item:hover{background-color:rgba(0,0,0,.04)}pre{margin:0;width:100%;align-items:center;display:flex;border-left-color:solid;border-bottom-color:var(--color-borders);border-right-color:solid;border-top-color:1px;padding:4px 6px;overflow-x:auto}code,pre{font-family:IBM Plex Mono,Consolas,Roboto Mono,monospace;font-size:14px;border-radius:8px;vertical-align:baseline;word-break:keep-all}.hljs,code,pre{background-color:var(--color-sheet-secondary)!important}.signature{border-radius:3px;padding:6px 6px 6px 24px}.signature__container{min-height:42px;overflow-x:scroll;overflow-y:visible}:root{--color-primary:#0066cd;--color-primary-light:#8ec4fb;--color-primary-dark:#c2c2c2;--color-primary-text:#212121;--color-text:#333;--color-secondary:#ffb74d;--color-secondary-light:#ffe97d;--color-secondary-dark:#c88719;--color-borders:#d9d9d9;--color-code-background:#f5f5f5;--color-sheet-primary:#fbfbfb;--color-sheet-secondary:#f7f7f7}.footer{bottom:0;width:100%;z-index:10000}.footer__container{display:flex;flex-flow:row nowrap;justify-content:center;align-items:center;align-content:stretch}.footer__text{margin:0;padding:0;background:#fff} \ No newline at end of file +body,html{margin:0;padding:0;height:100%}a{text-decoration:none;color:#3f51b5}a:hover{color:#102ac0;text-decoration:underline}.docs{flex-flow:column nowrap;color:var(--color-primary-text);font-family:Roboto,Lato,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;height:100%;min-height:100vh}.docs,.docs .page{display:flex;justify-content:flex-start;align-items:stretch;align-content:stretch}.docs .page{flex-flow:row nowrap;width:100%;margin:0 auto;word-break:break-word;min-height:0;flex-grow:2;flex-basis:0}.docs .page-explorer,.docs .page-members-explorer{max-width:400px;overflow:auto}.docs .page-members-explorer{min-width:200px}.docs .page-members-explorer>:first-child{margin-top:68px}.docs .page-content>:first-child{margin-top:8px}.docs .page-content>:last-child,.docs .page-members-explorer>:last-child{margin-bottom:8px}.docs .page-content{color:var(--color-text);font-family:Arial,Roboto,sans-serif;flex-grow:2;flex-shrink:1;height:100%;overflow-x:hidden;overflow-y:auto;max-width:800px;padding-left:67px;padding-right:83px;width:0}.docs .page-content>:first-child{margin-top:24px}.docs .page-r-divider{border:1px solid var(--color-primary-light);margin:68px 0 0;height:67vh}.md h1{font-size:3em}.md h2{font-size:2em}table{border:1px solid var(--color-borders);border-collapse:collapse;margin:8px 0}table caption{font-weight:700;margin-bottom:8px;text-align:left}table th{border-bottom:1px solid var(--color-borders);font-weight:500;word-break:normal}table th,td{padding:8px;font-size:92%;text-align:left}table td{word-break:normal}table td p:first-child{margin-top:0}table td p:last-child{margin-bottom:0}.table-wrapper{display:block;overflow-x:scroll}.header-content-container{display:flex;flex-direction:column;flex-grow:1;overflow-y:auto;min-width:0;max-height:100%}.header-content-container__content{display:flex;overflow:auto}.header{background-color:#fff;border-bottom:.5px solid rgba(0,0,0,.16);height:76px;top:0;width:100%}.header__container{justify-content:space-around}.header__container,.header__contents{align-items:center;backdrop-filter:blur(48px);display:flex;height:100%}.header__contents{flex-grow:1;padding-right:110px;justify-content:flex-end}.header__contents *{margin-right:42px}.header__link{color:#000;text-decoration:underline}.header__link__current{color:#0066cd;text-decoration:none}.header__title{margin:0;padding:0;max-width:80%;width:100%}.document{font-size:.875em;line-height:1.4em;width:100%}.document__breadcrumb a{color:var(--color-text);text-decoration:underline}.document__breadcrumb>:last-child{color:var(--color-primary)}.document>.document__title{font-size:3em;line-height:1.4em;margin:18px 0}.document>.document__brief,.document>.document__description{margin-left:8px}.document>*{margin:10px 0}.explorer{background-color:var(--color-sheet-secondary);display:flex;flex-direction:column;margin:0;min-height:100%;max-height:100%;min-width:291px}.explorer .MuiTreeView-root{padding:0 8px;overflow:auto}.explorer__tree>:first-child{margin-top:8px}.explorer__tree{margin-bottom:8px}.explorer__header{align-items:center;display:flex;flex-direction:row;min-height:76px;height:76px}.explorer__header__title{font-size:28px;font-weight:700;margin-left:30px;line-height:33px}.explorer__header-opened{border-bottom:.5px solid rgba(0,0,0,.16)}.explorer__header-closed{background-color:transparent}.members__category{font-size:1.5em;font-weight:700;line-height:1.4em;padding:8px}.members>hr{border:2px solid var(--color-sheet-secondary)}.members>*{margin-top:10px;margin-bottom:10px}.member{position:relative;padding-bottom:12px;width:100%}.member__title{align-items:center;display:flex;margin-left:12px;margin-bottom:10px}.member__title>a{height:16px}.member__title>span{font-size:1.3em;margin-left:8px;line-height:1.4em}.member>.table-wrapper,.member__brief,.member__description{margin-left:8px}.member>.signature{margin-bottom:8px}.page-members-explorer{font-family:Arial,sans-serif;font-size:12px;line-height:14px}.page-members-explorer-category{margin-left:16px;margin-bottom:7px}.page-members-explorer-category__title{font-weight:700;margin-bottom:7px}.page-members-explorer-category__items{margin-left:12px;margin-top:0;margin-bottom:0;padding:0;list-style:none}.page-members-explorer__item{align-items:center;border-radius:8px 0 0 8px;display:flex;font-weight:400;height:15px;line-height:1.5;padding-left:2px;vertical-align:middle}.page-members-explorer__item a{color:var(--color-text)}.page-members-explorer__item:hover{background-color:rgba(0,0,0,.04)}pre{margin:0;width:100%;align-items:center;display:flex;border-left-color:solid;border-bottom-color:var(--color-borders);border-right-color:solid;border-top-color:1px;padding:4px 6px;overflow-x:auto}code,pre{font-family:IBM Plex Mono,Consolas,Roboto Mono,monospace;font-size:14px;border-radius:8px;vertical-align:baseline;word-break:keep-all}.hljs,code,pre{background-color:var(--color-sheet-secondary)!important}.signature{border-radius:3px;padding:6px 6px 6px 24px}.signature__container{min-height:42px;overflow-x:scroll;overflow-y:visible}:root{--color-primary:#0066cd;--color-primary-light:#8ec4fb;--color-primary-dark:#c2c2c2;--color-primary-text:#212121;--color-text:#333;--color-secondary:#ffb74d;--color-secondary-light:#ffe97d;--color-secondary-dark:#c88719;--color-borders:#d9d9d9;--color-code-background:#f5f5f5;--color-sheet-primary:#fbfbfb;--color-sheet-secondary:#f7f7f7}.footer{bottom:0;width:100%;z-index:10000}.footer__container{display:flex;flex-flow:row nowrap;justify-content:center;align-items:center;align-content:stretch}.footer__text{margin:0;padding:0;background:#fff} \ No newline at end of file From 9f2e88d388cd820a5ed2ee46441d0ebeb9ed034e Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Tue, 19 Jan 2021 10:06:57 -0500 Subject: [PATCH 3/8] Merge --- .../app/components/Explorer/useExplorerStyles.js | 16 ++++++++-------- .../static/scripts/default-template.js | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/packages/webdoc-default-template/src/app/components/Explorer/useExplorerStyles.js b/packages/webdoc-default-template/src/app/components/Explorer/useExplorerStyles.js index 4d86246a..867c842c 100644 --- a/packages/webdoc-default-template/src/app/components/Explorer/useExplorerStyles.js +++ b/packages/webdoc-default-template/src/app/components/Explorer/useExplorerStyles.js @@ -2,15 +2,15 @@ import {makeStyles} from "@material-ui/core/styles"; const itemStyle = { label: { - alignItems: "center", - display: "flex", - color: "#333333", - fontSize: 12, - height: "24px", - lineHeight: "14px", + alignItems: "center !important", + display: "flex !important", + color: "#333333 !important", + fontSize: "12px !important", + height: "24px !important", + lineHeight: "14px !important", }, labelLinks: { - color: "#333333", + color: "#333333 !important", }, iconContainer: { color: "#333333", @@ -31,6 +31,6 @@ export const useExplorerCategoryStyles = makeStyles({ ...itemStyle, label: { ...itemStyle.label, - fontWeight: "bold", + fontWeight: "bold !important", }, }); diff --git a/packages/webdoc-default-template/static/scripts/default-template.js b/packages/webdoc-default-template/static/scripts/default-template.js index 77bd93bf..93d8ff9f 100644 --- a/packages/webdoc-default-template/static/scripts/default-template.js +++ b/packages/webdoc-default-template/static/scripts/default-template.js @@ -4505,6 +4505,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope var itemStyle = { label: { +<<<<<<< Updated upstream alignItems: "center", display: "flex", color: "#333333", @@ -4514,6 +4515,17 @@ var itemStyle = { }, labelLinks: { color: "#333333" +======= + alignItems: "center !important", + display: "flex !important", + color: "#333333 !important", + fontSize: "12px !important", + height: "24px !important", + lineHeight: "14px !important" + }, + labelLinks: { + color: "#333333 !important" +>>>>>>> Stashed changes }, iconContainer: { color: "#333333", @@ -4530,7 +4542,11 @@ var itemStyle = { var useExplorerStyles = styles_makeStyles(itemStyle); var useExplorerCategoryStyles = styles_makeStyles(_objectSpread(_objectSpread({}, itemStyle), {}, { label: _objectSpread(_objectSpread({}, itemStyle.label), {}, { +<<<<<<< Updated upstream fontWeight: "bold" +======= + fontWeight: "bold !important" +>>>>>>> Stashed changes }) })); // CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/Typography/Typography.js From bec1f2d2f45af44e59fc82366983f6ab45c9a133 Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Tue, 19 Jan 2021 10:08:12 -0500 Subject: [PATCH 4/8] Override mui --- .../static/scripts/default-template.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/webdoc-default-template/static/scripts/default-template.js b/packages/webdoc-default-template/static/scripts/default-template.js index 93d8ff9f..485d507a 100644 --- a/packages/webdoc-default-template/static/scripts/default-template.js +++ b/packages/webdoc-default-template/static/scripts/default-template.js @@ -4505,17 +4505,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope var itemStyle = { label: { -<<<<<<< Updated upstream - alignItems: "center", - display: "flex", - color: "#333333", - fontSize: 12, - height: "24px", - lineHeight: "14px" - }, - labelLinks: { - color: "#333333" -======= alignItems: "center !important", display: "flex !important", color: "#333333 !important", @@ -4525,7 +4514,6 @@ var itemStyle = { }, labelLinks: { color: "#333333 !important" ->>>>>>> Stashed changes }, iconContainer: { color: "#333333", @@ -4542,11 +4530,7 @@ var itemStyle = { var useExplorerStyles = styles_makeStyles(itemStyle); var useExplorerCategoryStyles = styles_makeStyles(_objectSpread(_objectSpread({}, itemStyle), {}, { label: _objectSpread(_objectSpread({}, itemStyle.label), {}, { -<<<<<<< Updated upstream - fontWeight: "bold" -======= fontWeight: "bold !important" ->>>>>>> Stashed changes }) })); // CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/Typography/Typography.js From 9c4b00e8655fb7da031861dabdd52b597fab15be Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Tue, 19 Jan 2021 10:12:52 -0500 Subject: [PATCH 5/8] Fix icon path when siteRoot not present --- .../webdoc-default-template/tmpl/components/member/index.tmpl | 3 ++- .../src/template-plugins/LinkerPlugin.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/webdoc-default-template/tmpl/components/member/index.tmpl b/packages/webdoc-default-template/tmpl/components/member/index.tmpl index eac309d4..083ad4c8 100644 --- a/packages/webdoc-default-template/tmpl/components/member/index.tmpl +++ b/packages/webdoc-default-template/tmpl/components/member/index.tmpl @@ -3,13 +3,14 @@ * Object member render component. */ const doc = obj; +const linkSvg = this.getPlugin("linker").getResourceURI("icons/link.svg"); ?>
"> /icons/link.svg" + src="" width="16px" height="16px" /> diff --git a/packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js b/packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js index 4a9c3c0b..c4f69e9f 100644 --- a/packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js +++ b/packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js @@ -351,6 +351,10 @@ function LinkerPluginShell() { return this.processInternalURI(uri, {outputRelative}); } + getResourceURI(subpath: string): string { + return this.processInternalURI(encodeURI(path.join("/", subpath))); + } + createURI(preferredUri: string, outputRelative?: boolean): string { const uri = this.generateBaseURI(preferredUri); From f5d7489ace96121bb495e1607744ab020abdbf9e Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Sat, 23 Jan 2021 14:27:23 -0500 Subject: [PATCH 6/8] E search! --- packages/webdoc-default-template/package.json | 3 +- .../Explorer/ExplorerCategoryItem.js | 4 +- .../app/components/Explorer/ExplorerFilter.js | 58 + .../app/components/Explorer/ExplorerItem.js | 26 +- .../src/app/components/Explorer/index.js | 44 +- .../webdoc-default-template/src/app/store.js | 36 + .../src/styles/explorer.scss | 14 + .../static/scripts/default-template.js | 9854 +++++++++-------- .../static/styles/index.css | 2 +- 9 files changed, 5458 insertions(+), 4583 deletions(-) create mode 100644 packages/webdoc-default-template/src/app/components/Explorer/ExplorerFilter.js diff --git a/packages/webdoc-default-template/package.json b/packages/webdoc-default-template/package.json index 33a36d89..6f449ae2 100644 --- a/packages/webdoc-default-template/package.json +++ b/packages/webdoc-default-template/package.json @@ -82,6 +82,7 @@ "webpack": "^4.43.0", "webpack-stream": "^5.2.1", "redux": "~4.0.5", - "react-redux": "~7.2.2" + "react-redux": "~7.2.2", + "lodash": "~4.17.20" } } diff --git a/packages/webdoc-default-template/src/app/components/Explorer/ExplorerCategoryItem.js b/packages/webdoc-default-template/src/app/components/Explorer/ExplorerCategoryItem.js index 8a9e11bb..d92e6052 100644 --- a/packages/webdoc-default-template/src/app/components/Explorer/ExplorerCategoryItem.js +++ b/packages/webdoc-default-template/src/app/components/Explorer/ExplorerCategoryItem.js @@ -23,7 +23,9 @@ export default function ExplorerCategoryItem(props) { label={props.title} > {props.data.map( - (explorerTarget, i) => (), + (explorerTarget, i) => ( + + ), )} ); diff --git a/packages/webdoc-default-template/src/app/components/Explorer/ExplorerFilter.js b/packages/webdoc-default-template/src/app/components/Explorer/ExplorerFilter.js new file mode 100644 index 00000000..f2edb0de --- /dev/null +++ b/packages/webdoc-default-template/src/app/components/Explorer/ExplorerFilter.js @@ -0,0 +1,58 @@ +import React from "react"; +import {connect} from "react-redux"; +import debounce from "lodash/debounce"; +import store from "../../store"; + +function filterTree(query, collector, data) { + data.$match = !query || (!!data.title && data.title.toLowerCase().includes(query)); + + if (data.children) { + for (const [key, value] of Object.entries(data.children)) { + if (key.charAt(0) === "$") { + continue; + } + filterTree(query, collector, value); + data.$match = data.$match || value.$match; + } + } + + if (query && data.$match) { + collector.add(data.$nodeId); + } +} + +export default connect(() => ({ + nextQuery: (query, items) => store.dispatch({ + type: "setQuery", + value: query, + items, + }), +}))(function ExplorerFilter(props) { + const onNativeChange = React.useCallback( + debounce((e) => { + const query = e.target.value; + const items = new Set(); + + const startish = Date.now(); + filterTree(query.toLowerCase(), items, props.data); + console.log("Search took: " + Date.now() - startish + " ms"); + props.nextQuery(query, items); + }, 200, { + maxWait: 1000, + }), + [props.data], + ); + + const onChange = React.useCallback( + (e) => onNativeChange(e.nativeEvent), + [onNativeChange], + ); + + return ( + + ); +}); diff --git a/packages/webdoc-default-template/src/app/components/Explorer/ExplorerItem.js b/packages/webdoc-default-template/src/app/components/Explorer/ExplorerItem.js index ac4a2952..b12436ad 100644 --- a/packages/webdoc-default-template/src/app/components/Explorer/ExplorerItem.js +++ b/packages/webdoc-default-template/src/app/components/Explorer/ExplorerItem.js @@ -1,13 +1,12 @@ import {useExplorerCategoryStyles, useExplorerStyles} from "./useExplorerStyles"; -import ExplorerTargetGroup from "./ExplorerCategoryItem"; +import ExplorerCategoryItem from "./ExplorerCategoryItem"; import Link from "@material-ui/core/Link"; -//import React from "react"; +import React from "react"; import TreeItem from "@material-ui/lab/TreeItem"; -import cuid from "cuid"; export default function ExplorerItem(props) { - if (!props.data.nodeId) { - props.data.nodeId = cuid(); + if (!props.data.$nodeId) { + throw new Error("Ids must be assigned"); } const classesItem = useExplorerStyles(); @@ -17,13 +16,23 @@ export default function ExplorerItem(props) { let i = 0; for (const [key, value] of Object.entries(props.data.children || {})) { targetChildren.push(Array.isArray(value) ? - () : - (), + () : + (), ); i++; } const classes = i > 0 ? classesCategory : classesItem; + const nodeId = props.data.$nodeId; + + const toggle = React.useCallback( + () => props.toggle(nodeId), + [nodeId], + ); + + if (props.data.title !== "(overview)" && props.data.$match === false) { + return null; + } return ( ({ +function makeIds(data) { + data.$nodeId = cuid(); + + if (data.children) { + for (const [, value] of Object.entries(data.children)) { + makeIds(value); + } + } +} + +export default connect(({ + expandedItems, + explorerOpen, + query, +}) => ({ isOpen: explorerOpen, - setOpen: (isOpen) => store.dispatch({type: "setExplorerOpen", value: isOpen}), + query, /* Added for re-rendering when query updates */ + setOpen: (isOpen) => store.dispatch({ + type: "setExplorerOpen", + value: isOpen, + }), + expandedItems: Array.from(expandedItems), + toggleItem: (nodeId, optValue) => store.dispatch({ + type: "toggleItem", + nodeId, + value: optValue, + }), }))(function Explorer({ isOpen, setOpen, + expandedItems, + toggleItem, }) { const [data, setData] = React.useState(null); const {root} = useExplorerStyles(); @@ -29,7 +57,7 @@ export default connect(({explorerOpen}) => ({ .then((response) => { if (response.ok) { response.json().then((idata) => { - // console.log(idata); + makeIds(idata); setData(idata || {}); }); } else { @@ -45,9 +73,13 @@ export default connect(({explorerOpen}) => ({ let i = 0; if (data) { for (const [key, value] of Object.entries(data.children || {})) { + if (value.$match === false) { + continue; + } + children.push(Array.isArray(value) ? - () : - (), + () : + (), ); i++; } @@ -67,7 +99,9 @@ export default connect(({explorerOpen}) => ({ }), }}> + {data && } *:first-child { margin-top: 8px; } diff --git a/packages/webdoc-default-template/static/scripts/default-template.js b/packages/webdoc-default-template/static/scripts/default-template.js index 485d507a..095a6a56 100644 --- a/packages/webdoc-default-template/static/scripts/default-template.js +++ b/packages/webdoc-default-template/static/scripts/default-template.js @@ -81,7 +81,7 @@ /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 45); +/******/ return __webpack_require__(__webpack_require__.s = 50); /******/ }) /************************************************************************/ /******/ ([ @@ -202,7 +202,7 @@ function toVal(mix) { if (false) { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(46)(); + module.exports = __webpack_require__(51)(); } @@ -247,11 +247,11 @@ var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_) var prop_types = __webpack_require__(4); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/hoist-non-react-statics/3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js -var hoist_non_react_statics_cjs = __webpack_require__(22); +var hoist_non_react_statics_cjs = __webpack_require__(20); var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/styles/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js + 22 modules -var makeStyles = __webpack_require__(73); +var makeStyles = __webpack_require__(85); // CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/styles/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js /* eslint-disable no-restricted-syntax */ @@ -278,7 +278,7 @@ function getThemeProps(params) { return props; } // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/styles/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/styles/esm/useTheme/useTheme.js + 1 modules -var useTheme = __webpack_require__(74); +var useTheme = __webpack_require__(86); // CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/styles/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/styles/esm/withStyles/withStyles.js @@ -392,7 +392,7 @@ module.exports = ReactDOM; "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return capitalize; }); -/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45); // It should to be noted that this function isn't equivalent to `text-transform: capitalize`. // @@ -478,7 +478,7 @@ function useForkRef(refA, refB) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fade; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return darken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return lighten; }); -/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45); /* eslint-disable no-use-before-define */ @@ -1014,7 +1014,7 @@ function _defineProperty(obj, key, value) { var objectWithoutProperties = __webpack_require__(2); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/utils/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/utils/esm/deepmerge.js -var deepmerge = __webpack_require__(72); +var deepmerge = __webpack_require__(84); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(1); @@ -1130,7 +1130,7 @@ function createMixins(breakpoints, spacing, mixins) { }, mixins); } // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/utils/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/utils/esm/formatMuiErrorMessage.js -var formatMuiErrorMessage = __webpack_require__(40); +var formatMuiErrorMessage = __webpack_require__(45); // CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/colors/common.js var common = { @@ -1976,7 +1976,7 @@ var defaultTheme = styles_createMuiTheme(); __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js -var arrayLikeToArray = __webpack_require__(21); +var arrayLikeToArray = __webpack_require__(22); // CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js @@ -2042,36 +2042,6 @@ function setRef(ref, value) { /***/ }), /* 20 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; -} - -/***/ }), -/* 21 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; - } - - return arr2; -} - -/***/ }), -/* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2180,6 +2150,36 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { module.exports = hoistNonReactStatics; +/***/ }), +/* 21 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +/***/ }), +/* 22 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + + return arr2; +} + /***/ }), /* 23 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -2479,7 +2479,7 @@ function unsupportedProp(props, propName, componentName, location, propFullName) return null; } // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useControlled.js -var useControlled = __webpack_require__(34); +var useControlled = __webpack_require__(38); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useEventCallback.js var useEventCallback = __webpack_require__(10); @@ -2537,7 +2537,7 @@ var useIsFocusVisible = __webpack_require__(15); "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); -/* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21); +/* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22); function _unsupportedIterableToArray(o, minLen) { if (!o) return; @@ -2647,9 +2647,9 @@ function formatMs(milliseconds) { * MIT License */ -var fingerprint = __webpack_require__(50); -var pad = __webpack_require__(35); -var getRandomValue = __webpack_require__(51); +var fingerprint = __webpack_require__(64); +var pad = __webpack_require__(39); +var getRandomValue = __webpack_require__(65); var c = 0, blockSize = 4, @@ -2738,7 +2738,7 @@ module.exports = _interopRequireDefault; /* 29 */ /***/ (function(module, exports, __webpack_require__) { -var _typeof = __webpack_require__(49); +var _typeof = __webpack_require__(63); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; @@ -2821,7 +2821,7 @@ var _utils = __webpack_require__(23); if (true) { - module.exports = __webpack_require__(48); + module.exports = __webpack_require__(53); } else {} @@ -2830,7 +2830,7 @@ if (true) { /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37); +/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40); /* global window */ @@ -2849,11 +2849,101 @@ if (typeof self !== 'undefined') { var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root); /* harmony default export */ __webpack_exports__["a"] = (result); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(52), __webpack_require__(53)(module))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(34), __webpack_require__(54)(module))) /***/ }), /* 33 */, /* 34 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(56); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(36); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + + +/***/ }), +/* 38 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2889,7 +2979,7 @@ function useControlled(_ref) { } /***/ }), -/* 35 */ +/* 39 */ /***/ (function(module, exports) { module.exports = function pad (num, size) { @@ -2899,7 +2989,229 @@ module.exports = function pad (num, size) { /***/ }), -/* 36 */ +/* 40 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return symbolObservablePonyfill; }); +function symbolObservablePonyfill(root) { + var result; + var Symbol = root.Symbol; + + if (typeof Symbol === 'function') { + if (Symbol.observable) { + result = Symbol.observable; + } else { + result = Symbol('observable'); + Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; +}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(35), + now = __webpack_require__(55), + toNumber = __webpack_require__(57); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; + + +/***/ }), +/* 42 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2925,32 +3237,7 @@ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("pa exports.default = _default; /***/ }), -/* 37 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return symbolObservablePonyfill; }); -function symbolObservablePonyfill(root) { - var result; - var Symbol = root.Symbol; - - if (typeof Symbol === 'function') { - if (Symbol.observable) { - result = Symbol.observable; - } else { - result = Symbol('observable'); - Symbol.observable = result; - } - } else { - result = '@@observable'; - } - - return result; -}; - - -/***/ }), -/* 38 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2976,7 +3263,7 @@ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("pa exports.default = _default; /***/ }), -/* 39 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3002,7 +3289,7 @@ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("pa exports.default = _default; /***/ }), -/* 40 */ +/* 45 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -3031,19 +3318,19 @@ function formatMuiErrorMessage(code) { } /***/ }), -/* 41 */, -/* 42 */, -/* 43 */, -/* 44 */, -/* 45 */ +/* 46 */, +/* 47 */, +/* 48 */, +/* 49 */, +/* 50 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(55); -module.exports = __webpack_require__(54); +__webpack_require__(67); +module.exports = __webpack_require__(66); /***/ }), -/* 46 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3056,7 +3343,7 @@ module.exports = __webpack_require__(54); -var ReactPropTypesSecret = __webpack_require__(47); +var ReactPropTypesSecret = __webpack_require__(52); function emptyFunction() {} function emptyFunctionWithReset() {} @@ -3114,7 +3401,7 @@ module.exports = function() { /***/ }), -/* 47 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3133,7 +3420,7 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 48 */ +/* 53 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3155,97 +3442,7 @@ exports.isValidElementType=function(a){return"string"===typeof a||"function"===t /***/ }), -/* 49 */ -/***/ (function(module, exports) { - -function _typeof(obj) { - "@babel/helpers - typeof"; - - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); -} - -module.exports = _typeof; - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -var pad = __webpack_require__(35); - -var env = typeof window === 'object' ? window : self; -var globalCount = Object.keys(env).length; -var mimeTypesLength = navigator.mimeTypes ? navigator.mimeTypes.length : 0; -var clientId = pad((mimeTypesLength + - navigator.userAgent.length).toString(36) + - globalCount.toString(36), 4); - -module.exports = function fingerprint () { - return clientId; -}; - - -/***/ }), -/* 51 */ -/***/ (function(module, exports) { - - -var getRandomValue; - -var crypto = typeof window !== 'undefined' && - (window.crypto || window.msCrypto) || - typeof self !== 'undefined' && - self.crypto; - -if (crypto) { - var lim = Math.pow(2, 32) - 1; - getRandomValue = function () { - return Math.abs(crypto.getRandomValues(new Uint32Array(1))[0] / lim); - }; -} else { - getRandomValue = Math.random; -} - -module.exports = getRandomValue; - - -/***/ }), -/* 52 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || new Function("return this")(); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, exports) { module.exports = function(originalModule) { @@ -3275,5375 +3472,5859 @@ module.exports = function(originalModule) { /***/ }), -/* 54 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (__webpack_require__.p + "../styles/index.css"); +var root = __webpack_require__(36); -/***/ }), -/* 55 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; -"use strict"; -// ESM COMPAT FLAG -__webpack_require__.r(__webpack_exports__); +module.exports = now; -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/icons/4.11.2_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/icons/ArrowDropDown.js -var ArrowDropDown = __webpack_require__(38); -var ArrowDropDown_default = /*#__PURE__*/__webpack_require__.n(ArrowDropDown); -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/icons/4.11.2_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/icons/ArrowRight.js -var ArrowRight = __webpack_require__(39); -var ArrowRight_default = /*#__PURE__*/__webpack_require__.n(ArrowRight); +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(1); +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js -var objectWithoutProperties = __webpack_require__(2); +module.exports = freeGlobal; -// EXTERNAL MODULE: external "React" -var external_React_ = __webpack_require__(0); -var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(34))) -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/prop-types/15.7.2/node_modules/prop-types/index.js -var prop_types = __webpack_require__(4); +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/clsx/1.1.1/node_modules/clsx/dist/clsx.m.js -var clsx_m = __webpack_require__(3); +var isObject = __webpack_require__(35), + isSymbol = __webpack_require__(58); -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/styles/withStyles.js + 2 modules -var withStyles = __webpack_require__(6); +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/styles/colorManipulator.js -var colorManipulator = __webpack_require__(12); +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; -// EXTERNAL MODULE: external "ReactDOM" -var external_ReactDOM_ = __webpack_require__(7); -var external_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_ReactDOM_); +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useForkRef.js -var useForkRef = __webpack_require__(11); +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useEventCallback.js -var useEventCallback = __webpack_require__(10); +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js -var useIsFocusVisible = __webpack_require__(15); +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules -var toConsumableArray = __webpack_require__(17); +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js -var objectWithoutPropertiesLoose = __webpack_require__(5); +module.exports = toNumber; -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js -var assertThisInitialized = __webpack_require__(20); -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js -var inheritsLoose = __webpack_require__(13); +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-transition-group/4.4.1_react-dom@16.14.0+react@16.14.0/node_modules/react-transition-group/esm/TransitionGroupContext.js +var baseGetTag = __webpack_require__(59), + isObjectLike = __webpack_require__(62); -/* harmony default export */ var TransitionGroupContext = (external_React_default.a.createContext(null)); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-transition-group/4.4.1_react-dom@16.14.0+react@16.14.0/node_modules/react-transition-group/esm/utils/ChildMapping.js +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; /** - * Given `this.props.children`, return an object mapping key to child. + * Checks if `value` is classified as a `Symbol` primitive or object. * - * @param {*} children `this.props.children` - * @return {object} Mapping of key to child + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} -function getChildMapping(children, mapFn) { - var mapper = function mapper(child) { - return mapFn && Object(external_React_["isValidElement"])(child) ? mapFn(child) : child; - }; +module.exports = isSymbol; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(37), + getRawTag = __webpack_require__(60), + objectToString = __webpack_require__(61); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - var result = Object.create(null); - if (children) external_React_["Children"].map(children, function (c) { - return c; - }).forEach(function (child) { - // run the map function here instead so that the key is the computed one - result[child.key] = mapper(child); - }); - return result; -} /** - * When you're adding or removing children some may be added or removed in the - * same render pass. We want to show *both* since we want to simultaneously - * animate elements in and out. This function takes a previous set of keys - * and a new set of keys and merges them with its best guess of the correct - * ordering. In the future we may expose some of the utilities in - * ReactMultiChild to make this easy, but for now React itself does not - * directly have this concept of the union of prevChildren and nextChildren - * so we implement it here. + * The base implementation of `getTag` without fallbacks for buggy environments. * - * @param {object} prev prev children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @param {object} next next children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @return {object} a key set that contains all keys in `prev` and all keys - * in `next` in a reasonable order. + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} -function mergeChildMappings(prev, next) { - prev = prev || {}; - next = next || {}; +module.exports = baseGetTag; - function getValueForKey(key) { - return key in next ? next[key] : prev[key]; - } // For each key of `next`, the list of keys to insert before that key in - // the combined list +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { - var nextKeysPending = Object.create(null); - var pendingKeys = []; +var Symbol = __webpack_require__(37); - for (var prevKey in prev) { - if (prevKey in next) { - if (pendingKeys.length) { - nextKeysPending[prevKey] = pendingKeys; - pendingKeys = []; - } +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; } else { - pendingKeys.push(prevKey); + delete value[symToStringTag]; } } + return result; +} - var i; - var childMapping = {}; +module.exports = getRawTag; - for (var nextKey in next) { - if (nextKeysPending[nextKey]) { - for (i = 0; i < nextKeysPending[nextKey].length; i++) { - var pendingNextKey = nextKeysPending[nextKey][i]; - childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); - } - } - childMapping[nextKey] = getValueForKey(nextKey); - } // Finally, add the keys which didn't appear before any key in `next` +/***/ }), +/* 61 */ +/***/ (function(module, exports) { +/** Used for built-in method references. */ +var objectProto = Object.prototype; - for (i = 0; i < pendingKeys.length; i++) { - childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); - } +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; - return childMapping; +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); } -function getProp(child, prop, props) { - return props[prop] != null ? props[prop] : child.props[prop]; -} +module.exports = objectToString; -function getInitialChildMapping(props, onExited) { - return getChildMapping(props.children, function (child) { - return Object(external_React_["cloneElement"])(child, { - onExited: onExited.bind(null, child), - in: true, - appear: getProp(child, 'appear', props), - enter: getProp(child, 'enter', props), - exit: getProp(child, 'exit', props) - }); - }); -} -function getNextChildMapping(nextProps, prevChildMapping, onExited) { - var nextChildMapping = getChildMapping(nextProps.children); - var children = mergeChildMappings(prevChildMapping, nextChildMapping); - Object.keys(children).forEach(function (key) { - var child = children[key]; - if (!Object(external_React_["isValidElement"])(child)) return; - var hasPrev = (key in prevChildMapping); - var hasNext = (key in nextChildMapping); - var prevChild = prevChildMapping[key]; - var isLeaving = Object(external_React_["isValidElement"])(prevChild) && !prevChild.props.in; // item is new (entering) - if (hasNext && (!hasPrev || isLeaving)) { - // console.log('entering', key) - children[key] = Object(external_React_["cloneElement"])(child, { - onExited: onExited.bind(null, child), - in: true, - exit: getProp(child, 'exit', nextProps), - enter: getProp(child, 'enter', nextProps) - }); - } else if (!hasNext && hasPrev && !isLeaving) { - // item is old (exiting) - // console.log('leaving', key) - children[key] = Object(external_React_["cloneElement"])(child, { - in: false - }); - } else if (hasNext && hasPrev && Object(external_React_["isValidElement"])(prevChild)) { - // item hasn't changed transition states - // copy over the last transition props; - // console.log('unchanged', key) - children[key] = Object(external_React_["cloneElement"])(child, { - onExited: onExited.bind(null, child), - in: prevChild.props.in, - exit: getProp(child, 'exit', nextProps), - enter: getProp(child, 'enter', nextProps) - }); - } - }); - return children; +/***/ }), +/* 62 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; } -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-transition-group/4.4.1_react-dom@16.14.0+react@16.14.0/node_modules/react-transition-group/esm/TransitionGroup.js +module.exports = isObjectLike; +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + return _typeof(obj); +} +module.exports = _typeof; +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { +var pad = __webpack_require__(39); -var values = Object.values || function (obj) { - return Object.keys(obj).map(function (k) { - return obj[k]; - }); -}; +var env = typeof window === 'object' ? window : self; +var globalCount = Object.keys(env).length; +var mimeTypesLength = navigator.mimeTypes ? navigator.mimeTypes.length : 0; +var clientId = pad((mimeTypesLength + + navigator.userAgent.length).toString(36) + + globalCount.toString(36), 4); -var defaultProps = { - component: 'div', - childFactory: function childFactory(child) { - return child; - } +module.exports = function fingerprint () { + return clientId; }; -/** - * The `` component manages a set of transition components - * (`` and ``) in a list. Like with the transition - * components, `` is a state machine for managing the mounting - * and unmounting of components over time. - * - * Consider the example below. As items are removed or added to the TodoList the - * `in` prop is toggled automatically by the ``. - * - * Note that `` does not define any animation behavior! - * Exactly _how_ a list item animates is up to the individual transition - * component. This means you can mix and match animations across different list - * items. - */ -var TransitionGroup_TransitionGroup = /*#__PURE__*/function (_React$Component) { - Object(inheritsLoose["a" /* default */])(TransitionGroup, _React$Component); - function TransitionGroup(props, context) { - var _this; +/***/ }), +/* 65 */ +/***/ (function(module, exports) { - _this = _React$Component.call(this, props, context) || this; - var handleExited = _this.handleExited.bind(Object(assertThisInitialized["a" /* default */])(_this)); // Initial children should all be entering, dependent on appear +var getRandomValue; +var crypto = typeof window !== 'undefined' && + (window.crypto || window.msCrypto) || + typeof self !== 'undefined' && + self.crypto; - _this.state = { - contextValue: { - isMounting: true - }, - handleExited: handleExited, - firstRender: true +if (crypto) { + var lim = Math.pow(2, 32) - 1; + getRandomValue = function () { + return Math.abs(crypto.getRandomValues(new Uint32Array(1))[0] / lim); }; - return _this; - } - - var _proto = TransitionGroup.prototype; +} else { + getRandomValue = Math.random; +} - _proto.componentDidMount = function componentDidMount() { - this.mounted = true; - this.setState({ - contextValue: { - isMounting: false - } - }); - }; +module.exports = getRandomValue; - _proto.componentWillUnmount = function componentWillUnmount() { - this.mounted = false; - }; - TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) { - var prevChildMapping = _ref.children, - handleExited = _ref.handleExited, - firstRender = _ref.firstRender; - return { - children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited), - firstRender: false - }; - } // node is `undefined` when user provided `nodeRef` prop - ; +/***/ }), +/* 66 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - _proto.handleExited = function handleExited(child, node) { - var currentChildMapping = getChildMapping(this.props.children); - if (child.key in currentChildMapping) return; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (__webpack_require__.p + "../styles/index.css"); - if (child.props.onExited) { - child.props.onExited(node); - } +/***/ }), +/* 67 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (this.mounted) { - this.setState(function (state) { - var children = Object(esm_extends["a" /* default */])({}, state.children); +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); - delete children[child.key]; - return { - children: children - }; - }); - } - }; +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/icons/4.11.2_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/icons/ArrowDropDown.js +var ArrowDropDown = __webpack_require__(43); +var ArrowDropDown_default = /*#__PURE__*/__webpack_require__.n(ArrowDropDown); - _proto.render = function render() { - var _this$props = this.props, - Component = _this$props.component, - childFactory = _this$props.childFactory, - props = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props, ["component", "childFactory"]); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/icons/4.11.2_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/icons/ArrowRight.js +var ArrowRight = __webpack_require__(44); +var ArrowRight_default = /*#__PURE__*/__webpack_require__.n(ArrowRight); - var contextValue = this.state.contextValue; - var children = values(this.state.children).map(childFactory); - delete props.appear; - delete props.enter; - delete props.exit; +// EXTERNAL MODULE: external "React" +var external_React_ = __webpack_require__(0); +var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); - if (Component === null) { - return /*#__PURE__*/external_React_default.a.createElement(TransitionGroupContext.Provider, { - value: contextValue - }, children); - } +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/prop-types/15.7.2/node_modules/prop-types/index.js +var prop_types = __webpack_require__(4); - return /*#__PURE__*/external_React_default.a.createElement(TransitionGroupContext.Provider, { - value: contextValue - }, /*#__PURE__*/external_React_default.a.createElement(Component, props, children)); - }; +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/components/Context.js - return TransitionGroup; -}(external_React_default.a.Component); +var ReactReduxContext = /*#__PURE__*/external_React_default.a.createContext(null); -TransitionGroup_TransitionGroup.propTypes = false ? undefined : {}; -TransitionGroup_TransitionGroup.defaultProps = defaultProps; -/* harmony default export */ var esm_TransitionGroup = (TransitionGroup_TransitionGroup); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/ButtonBase/Ripple.js +if (false) {} +/* harmony default export */ var components_Context = (ReactReduxContext); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/batch.js +// Default to a dummy "batch" implementation that just runs the callback +function defaultNoopBatch(callback) { + callback(); +} +var batch_batch = defaultNoopBatch; // Allow injecting another batching function later +var setBatch = function setBatch(newBatch) { + return batch_batch = newBatch; +}; // Supply a getter just to skip dealing with ESM bindings -var useEnhancedEffect = typeof window === 'undefined' ? external_React_["useEffect"] : external_React_["useLayoutEffect"]; -/** - * @ignore - internal component. - */ +var getBatch = function getBatch() { + return batch_batch; +}; +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/Subscription.js + // encapsulates the subscription logic for connecting a component to the redux store, as +// well as nesting subscriptions of descendant components, so that we can ensure the +// ancestor components re-render before descendants -function Ripple(props) { - var classes = props.classes, - _props$pulsate = props.pulsate, - pulsate = _props$pulsate === void 0 ? false : _props$pulsate, - rippleX = props.rippleX, - rippleY = props.rippleY, - rippleSize = props.rippleSize, - inProp = props.in, - _props$onExited = props.onExited, - onExited = _props$onExited === void 0 ? function () {} : _props$onExited, - timeout = props.timeout; +var nullListeners = { + notify: function notify() {} +}; - var _React$useState = external_React_["useState"](false), - leaving = _React$useState[0], - setLeaving = _React$useState[1]; +function createListenerCollection() { + var batch = getBatch(); + var first = null; + var last = null; + return { + clear: function clear() { + first = null; + last = null; + }, + notify: function notify() { + batch(function () { + var listener = first; - var rippleClassName = Object(clsx_m["a" /* default */])(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate); - var rippleStyles = { - width: rippleSize, - height: rippleSize, - top: -(rippleSize / 2) + rippleY, - left: -(rippleSize / 2) + rippleX - }; - var childClassName = Object(clsx_m["a" /* default */])(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate); - var handleExited = Object(useEventCallback["a" /* default */])(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority + while (listener) { + listener.callback(); + listener = listener.next; + } + }); + }, + get: function get() { + var listeners = []; + var listener = first; - useEnhancedEffect(function () { - if (!inProp) { - // react-transition-group#onExit - setLeaving(true); // react-transition-group#onExited + while (listener) { + listeners.push(listener); + listener = listener.next; + } - var timeoutId = setTimeout(handleExited, timeout); - return function () { - clearTimeout(timeoutId); + return listeners; + }, + subscribe: function subscribe(callback) { + var isSubscribed = true; + var listener = last = { + callback: callback, + next: null, + prev: last }; - } - - return undefined; - }, [handleExited, inProp, timeout]); - return /*#__PURE__*/external_React_["createElement"]("span", { - className: rippleClassName, - style: rippleStyles - }, /*#__PURE__*/external_React_["createElement"]("span", { - className: childClassName - })); -} - false ? undefined : void 0; -/* harmony default export */ var ButtonBase_Ripple = (Ripple); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js + if (listener.prev) { + listener.prev.next = listener; + } else { + first = listener; + } + return function unsubscribe() { + if (!isSubscribed || first === null) return; + isSubscribed = false; + if (listener.next) { + listener.next.prev = listener.prev; + } else { + last = listener.prev; + } + if (listener.prev) { + listener.prev.next = listener.next; + } else { + first = listener.next; + } + }; + } + }; +} +var Subscription = /*#__PURE__*/function () { + function Subscription(store, parentSub) { + this.store = store; + this.parentSub = parentSub; + this.unsubscribe = null; + this.listeners = nullListeners; + this.handleChangeWrapper = this.handleChangeWrapper.bind(this); + } + var _proto = Subscription.prototype; + _proto.addNestedSub = function addNestedSub(listener) { + this.trySubscribe(); + return this.listeners.subscribe(listener); + }; + _proto.notifyNestedSubs = function notifyNestedSubs() { + this.listeners.notify(); + }; + _proto.handleChangeWrapper = function handleChangeWrapper() { + if (this.onStateChange) { + this.onStateChange(); + } + }; -var DURATION = 550; -var DELAY_RIPPLE = 80; -var TouchRipple_styles = function styles(theme) { - return { - /* Styles applied to the root element. */ - root: { - overflow: 'hidden', - pointerEvents: 'none', - position: 'absolute', - zIndex: 0, - top: 0, - right: 0, - bottom: 0, - left: 0, - borderRadius: 'inherit' - }, + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.unsubscribe); + }; - /* Styles applied to the internal `Ripple` components `ripple` class. */ - ripple: { - opacity: 0, - position: 'absolute' - }, + _proto.trySubscribe = function trySubscribe() { + if (!this.unsubscribe) { + this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.handleChangeWrapper) : this.store.subscribe(this.handleChangeWrapper); + this.listeners = createListenerCollection(); + } + }; - /* Styles applied to the internal `Ripple` components `rippleVisible` class. */ - rippleVisible: { - opacity: 0.3, - transform: 'scale(1)', - animation: "$enter ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut) - }, + _proto.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + this.listeners.clear(); + this.listeners = nullListeners; + } + }; - /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */ - ripplePulsate: { - animationDuration: "".concat(theme.transitions.duration.shorter, "ms") - }, + return Subscription; +}(); - /* Styles applied to the internal `Ripple` components `child` class. */ - child: { - opacity: 1, - display: 'block', - width: '100%', - height: '100%', - borderRadius: '50%', - backgroundColor: 'currentColor' - }, - /* Styles applied to the internal `Ripple` components `childLeaving` class. */ - childLeaving: { - opacity: 0, - animation: "$exit ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut) - }, +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/components/Provider.js - /* Styles applied to the internal `Ripple` components `childPulsate` class. */ - childPulsate: { - position: 'absolute', - left: 0, - top: 0, - animation: "$pulsate 2500ms ".concat(theme.transitions.easing.easeInOut, " 200ms infinite") - }, - '@keyframes enter': { - '0%': { - transform: 'scale(0)', - opacity: 0.1 - }, - '100%': { - transform: 'scale(1)', - opacity: 0.3 - } - }, - '@keyframes exit': { - '0%': { - opacity: 1 - }, - '100%': { - opacity: 0 - } - }, - '@keyframes pulsate': { - '0%': { - transform: 'scale(1)' - }, - '50%': { - transform: 'scale(0.92)' - }, - '100%': { - transform: 'scale(1)' - } - } - }; -}; -/** - * @ignore - internal component. - * - * TODO v5: Make private - */ -var TouchRipple_TouchRipple = /*#__PURE__*/external_React_["forwardRef"](function TouchRipple(props, ref) { - var _props$center = props.center, - centerProp = _props$center === void 0 ? false : _props$center, - classes = props.classes, - className = props.className, - other = Object(objectWithoutProperties["a" /* default */])(props, ["center", "classes", "className"]); - var _React$useState = external_React_["useState"]([]), - ripples = _React$useState[0], - setRipples = _React$useState[1]; - var nextKey = external_React_["useRef"](0); - var rippleCallback = external_React_["useRef"](null); - external_React_["useEffect"](function () { - if (rippleCallback.current) { - rippleCallback.current(); - rippleCallback.current = null; - } - }, [ripples]); // Used to filter out mouse emulated events on mobile. - var ignoringMouseDown = external_React_["useRef"](false); // We use a timer in order to only show the ripples for touch "click" like events. - // We don't want to display the ripple for touch scroll events. +function Provider(_ref) { + var store = _ref.store, + context = _ref.context, + children = _ref.children; + var contextValue = Object(external_React_["useMemo"])(function () { + var subscription = new Subscription(store); + subscription.onStateChange = subscription.notifyNestedSubs; + return { + store: store, + subscription: subscription + }; + }, [store]); + var previousState = Object(external_React_["useMemo"])(function () { + return store.getState(); + }, [store]); + Object(external_React_["useEffect"])(function () { + var subscription = contextValue.subscription; + subscription.trySubscribe(); - var startTimer = external_React_["useRef"](null); // This is the hook called once the previous timeout is ready. + if (previousState !== store.getState()) { + subscription.notifyNestedSubs(); + } - var startTimerCommit = external_React_["useRef"](null); - var container = external_React_["useRef"](null); - external_React_["useEffect"](function () { return function () { - clearTimeout(startTimer.current); + subscription.tryUnsubscribe(); + subscription.onStateChange = null; }; - }, []); - var startCommit = external_React_["useCallback"](function (params) { - var pulsate = params.pulsate, - rippleX = params.rippleX, - rippleY = params.rippleY, - rippleSize = params.rippleSize, - cb = params.cb; - setRipples(function (oldRipples) { - return [].concat(Object(toConsumableArray["a" /* default */])(oldRipples), [/*#__PURE__*/external_React_["createElement"](ButtonBase_Ripple, { - key: nextKey.current, - classes: classes, - timeout: DURATION, - pulsate: pulsate, - rippleX: rippleX, - rippleY: rippleY, - rippleSize: rippleSize - })]); - }); - nextKey.current += 1; - rippleCallback.current = cb; - }, [classes]); - var start = external_React_["useCallback"](function () { - var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var cb = arguments.length > 2 ? arguments[2] : undefined; - var _options$pulsate = options.pulsate, - pulsate = _options$pulsate === void 0 ? false : _options$pulsate, - _options$center = options.center, - center = _options$center === void 0 ? centerProp || options.pulsate : _options$center, - _options$fakeElement = options.fakeElement, - fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement; + }, [contextValue, previousState]); + var Context = context || ReactReduxContext; + return /*#__PURE__*/external_React_default.a.createElement(Context.Provider, { + value: contextValue + }, children); +} - if (event.type === 'mousedown' && ignoringMouseDown.current) { - ignoringMouseDown.current = false; - return; - } +if (false) {} - if (event.type === 'touchstart') { - ignoringMouseDown.current = true; - } +/* harmony default export */ var components_Provider = (Provider); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(1); - var element = fakeElement ? null : container.current; - var rect = element ? element.getBoundingClientRect() : { - width: 0, - height: 0, - left: 0, - top: 0 - }; // Get the size of the ripple +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +var objectWithoutPropertiesLoose = __webpack_require__(5); - var rippleX; - var rippleY; - var rippleSize; +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/hoist-non-react-statics/3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +var hoist_non_react_statics_cjs = __webpack_require__(20); +var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs); - if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) { - rippleX = Math.round(rect.width / 2); - rippleY = Math.round(rect.height / 2); - } else { - var _ref = event.touches ? event.touches[0] : event, - clientX = _ref.clientX, - clientY = _ref.clientY; +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-is/16.13.1/node_modules/react-is/index.js +var react_is = __webpack_require__(31); - rippleX = Math.round(clientX - rect.left); - rippleY = Math.round(clientY - rect.top); - } +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js + // React currently throws a warning when using useLayoutEffect on the server. +// To get around it, we can conditionally useEffect on the server (no-op) and +// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store +// subscription callback always has the selector from the latest render commit +// available, otherwise a store update may happen between render and the effect, +// which may cause missed updates; we also must ensure the store subscription +// is created synchronously, otherwise a store update may occur before the +// subscription is created and an inconsistent state may be observed - if (center) { - rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even. +var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? external_React_["useLayoutEffect"] : external_React_["useEffect"]; +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/components/connectAdvanced.js - if (rippleSize % 2 === 0) { - rippleSize += 1; - } - } else { - var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2; - var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2; - rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2)); - } // Touche devices - if (event.touches) { - // check that this isn't another touchstart due to multitouch - // otherwise we will only clear a single timer when unmounting while two - // are running - if (startTimerCommit.current === null) { - // Prepare the ripple effect. - startTimerCommit.current = function () { - startCommit({ - pulsate: pulsate, - rippleX: rippleX, - rippleY: rippleY, - rippleSize: rippleSize, - cb: cb - }); - }; // Delay the execution of the ripple effect. - startTimer.current = setTimeout(function () { - if (startTimerCommit.current) { - startTimerCommit.current(); - startTimerCommit.current = null; - } - }, DELAY_RIPPLE); // We have to make a tradeoff with this value. - } - } else { - startCommit({ - pulsate: pulsate, - rippleX: rippleX, - rippleY: rippleY, - rippleSize: rippleSize, - cb: cb - }); - } - }, [centerProp, startCommit]); - var pulsate = external_React_["useCallback"](function () { - start({}, { - pulsate: true - }); - }, [start]); - var stop = external_React_["useCallback"](function (event, cb) { - clearTimeout(startTimer.current); // The touch interaction occurs too quickly. - // We still want to show ripple effect. - if (event.type === 'touchend' && startTimerCommit.current) { - event.persist(); - startTimerCommit.current(); - startTimerCommit.current = null; - startTimer.current = setTimeout(function () { - stop(event, cb); - }); - return; - } - startTimerCommit.current = null; - setRipples(function (oldRipples) { - if (oldRipples.length > 0) { - return oldRipples.slice(1); - } + // Define some constant arrays just to avoid re-creating these - return oldRipples; - }); - rippleCallback.current = cb; - }, []); - external_React_["useImperativeHandle"](ref, function () { - return { - pulsate: pulsate, - start: start, - stop: stop - }; - }, [pulsate, start, stop]); - return /*#__PURE__*/external_React_["createElement"]("span", Object(esm_extends["a" /* default */])({ - className: Object(clsx_m["a" /* default */])(classes.root, className), - ref: container - }, other), /*#__PURE__*/external_React_["createElement"](esm_TransitionGroup, { - component: null, - exit: true - }, ripples)); -}); - false ? undefined : void 0; -/* harmony default export */ var ButtonBase_TouchRipple = (Object(withStyles["a" /* default */])(TouchRipple_styles, { - flip: false, - name: 'MuiTouchRipple' -})( /*#__PURE__*/external_React_["memo"](TouchRipple_TouchRipple))); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js +var EMPTY_ARRAY = []; +var NO_SUBSCRIPTION_ARRAY = [null, null]; +var stringifyComponent = function stringifyComponent(Comp) { + try { + return JSON.stringify(Comp); + } catch (err) { + return String(Comp); + } +}; +function storeStateUpdatesReducer(state, action) { + var updateCount = state[1]; + return [action.payload, updateCount + 1]; +} +function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) { + useIsomorphicLayoutEffect(function () { + return effectFunc.apply(void 0, effectArgs); + }, dependencies); +} +function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs) { + // We want to capture the wrapper props and child props we used for later comparisons + lastWrapperProps.current = wrapperProps; + lastChildProps.current = actualChildProps; + renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update + if (childPropsFromStoreUpdate.current) { + childPropsFromStoreUpdate.current = null; + notifyNestedSubs(); + } +} +function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch) { + // If we're not subscribed to the store, nothing to do here + if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts + var didUnsubscribe = false; + var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component + var checkForUpdates = function checkForUpdates() { + if (didUnsubscribe) { + // Don't run stale listeners. + // Redux doesn't guarantee unsubscriptions happen until next dispatch. + return; + } + var latestStoreState = store.getState(); + var newChildProps, error; + try { + // Actually run the selector with the most recent store state and wrapper props + // to determine what the child props should be + newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current); + } catch (e) { + error = e; + lastThrownError = e; + } + if (!error) { + lastThrownError = null; + } // If the child props haven't changed, nothing to do here - cascade the subscription update -var ButtonBase_styles = { - /* Styles applied to the root element. */ - root: { - display: 'inline-flex', - alignItems: 'center', - justifyContent: 'center', - position: 'relative', - WebkitTapHighlightColor: 'transparent', - backgroundColor: 'transparent', - // Reset default value - // We disable the focus ring for mouse, touch and keyboard users. - outline: 0, - border: 0, - margin: 0, - // Remove the margin in Safari - borderRadius: 0, - padding: 0, - // Remove the padding in Firefox - cursor: 'pointer', - userSelect: 'none', - verticalAlign: 'middle', - '-moz-appearance': 'none', - // Reset - '-webkit-appearance': 'none', - // Reset - textDecoration: 'none', - // So we take precedent over the style of a native element. - color: 'inherit', - '&::-moz-focus-inner': { - borderStyle: 'none' // Remove Firefox dotted outline. - }, - '&$disabled': { - pointerEvents: 'none', - // Disable link interactions - cursor: 'default' - }, - '@media print': { - colorAdjust: 'exact' + if (newChildProps === lastChildProps.current) { + if (!renderIsScheduled.current) { + notifyNestedSubs(); + } + } else { + // Save references to the new child props. Note that we track the "child props from store update" + // as a ref instead of a useState/useReducer because we need a way to determine if that value has + // been processed. If this went into useState/useReducer, we couldn't clear out the value without + // forcing another re-render, which we don't want. + lastChildProps.current = newChildProps; + childPropsFromStoreUpdate.current = newChildProps; + renderIsScheduled.current = true; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render + + forceComponentUpdateDispatch({ + type: 'STORE_UPDATED', + payload: { + error: error + } + }); } - }, + }; // Actually subscribe to the nearest connected ancestor (or store) - /* Pseudo-class applied to the root element if `disabled={true}`. */ - disabled: {}, - /* Pseudo-class applied to the root element if keyboard focused. */ - focusVisible: {} -}; -/** - * `ButtonBase` contains as few styles as possible. - * It aims to be a simple building block for creating a button. - * It contains a load of style reset and some focus/ripple logic. - */ + subscription.onStateChange = checkForUpdates; + subscription.trySubscribe(); // Pull data from the store after first render in case the store has + // changed since we began. -var ButtonBase_ButtonBase = /*#__PURE__*/external_React_["forwardRef"](function ButtonBase(props, ref) { - var action = props.action, - buttonRefProp = props.buttonRef, - _props$centerRipple = props.centerRipple, - centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple, - children = props.children, - classes = props.classes, - className = props.className, - _props$component = props.component, - component = _props$component === void 0 ? 'button' : _props$component, - _props$disabled = props.disabled, - disabled = _props$disabled === void 0 ? false : _props$disabled, - _props$disableRipple = props.disableRipple, - disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple, - _props$disableTouchRi = props.disableTouchRipple, - disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi, - _props$focusRipple = props.focusRipple, - focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple, - focusVisibleClassName = props.focusVisibleClassName, - onBlur = props.onBlur, - onClick = props.onClick, - onFocus = props.onFocus, - onFocusVisible = props.onFocusVisible, - onKeyDown = props.onKeyDown, - onKeyUp = props.onKeyUp, - onMouseDown = props.onMouseDown, - onMouseLeave = props.onMouseLeave, - onMouseUp = props.onMouseUp, - onTouchEnd = props.onTouchEnd, - onTouchMove = props.onTouchMove, - onTouchStart = props.onTouchStart, - onDragLeave = props.onDragLeave, - _props$tabIndex = props.tabIndex, - tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, - TouchRippleProps = props.TouchRippleProps, - _props$type = props.type, - type = _props$type === void 0 ? 'button' : _props$type, - other = Object(objectWithoutProperties["a" /* default */])(props, ["action", "buttonRef", "centerRipple", "children", "classes", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "onBlur", "onClick", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "onDragLeave", "tabIndex", "TouchRippleProps", "type"]); + checkForUpdates(); - var buttonRef = external_React_["useRef"](null); + var unsubscribeWrapper = function unsubscribeWrapper() { + didUnsubscribe = true; + subscription.tryUnsubscribe(); + subscription.onStateChange = null; - function getButtonNode() { - // #StrictMode ready - return external_ReactDOM_["findDOMNode"](buttonRef.current); - } + if (lastThrownError) { + // It's possible that we caught an error due to a bad mapState function, but the + // parent re-rendered without this component and we're about to unmount. + // This shouldn't happen as long as we do top-down subscriptions correctly, but + // if we ever do those wrong, this throw will surface the error in our tests. + // In that case, throw the error from here so it doesn't get lost. + throw lastThrownError; + } + }; - var rippleRef = external_React_["useRef"](null); + return unsubscribeWrapper; +} - var _React$useState = external_React_["useState"](false), - focusVisible = _React$useState[0], - setFocusVisible = _React$useState[1]; +var initStateUpdates = function initStateUpdates() { + return [null, 0]; +}; - if (disabled && focusVisible) { - setFocusVisible(false); +function connectAdvanced( +/* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ +selectorFactory, // options object: +_ref) { + if (_ref === void 0) { + _ref = {}; } - var _useIsFocusVisible = Object(useIsFocusVisible["a" /* default */])(), - isFocusVisible = _useIsFocusVisible.isFocusVisible, - onBlurVisible = _useIsFocusVisible.onBlurVisible, - focusVisibleRef = _useIsFocusVisible.ref; - - external_React_["useImperativeHandle"](action, function () { - return { - focusVisible: function focusVisible() { - setFocusVisible(true); - buttonRef.current.focus(); - } - }; - }, []); - external_React_["useEffect"](function () { - if (focusVisible && focusRipple && !disableRipple) { - rippleRef.current.pulsate(); - } - }, [disableRipple, focusRipple, focusVisible]); + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = _ref2$getDisplayName === void 0 ? function (name) { + return "ConnectAdvanced(" + name + ")"; + } : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + _ref2$forwardRef = _ref2.forwardRef, + forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef, + _ref2$context = _ref2.context, + context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context, + connectOptions = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"]); - function useRippleHandler(rippleAction, eventCallback) { - var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple; - return Object(useEventCallback["a" /* default */])(function (event) { - if (eventCallback) { - eventCallback(event); - } + if (false) { var customStoreWarningMessage; } - var ignore = skipRippleAction; + var Context = context; + return function wrapWithConnect(WrappedComponent) { + if (false) {} - if (!ignore && rippleRef.current) { - rippleRef.current[rippleAction](event); - } + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); - return true; + var selectorFactoryOptions = Object(esm_extends["a" /* default */])({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent }); - } - - var handleMouseDown = useRippleHandler('start', onMouseDown); - var handleDragLeave = useRippleHandler('stop', onDragLeave); - var handleMouseUp = useRippleHandler('stop', onMouseUp); - var handleMouseLeave = useRippleHandler('stop', function (event) { - if (focusVisible) { - event.preventDefault(); - } - if (onMouseLeave) { - onMouseLeave(event); - } - }); - var handleTouchStart = useRippleHandler('start', onTouchStart); - var handleTouchEnd = useRippleHandler('stop', onTouchEnd); - var handleTouchMove = useRippleHandler('stop', onTouchMove); - var handleBlur = useRippleHandler('stop', function (event) { - if (focusVisible) { - onBlurVisible(event); - setFocusVisible(false); - } + var pure = connectOptions.pure; - if (onBlur) { - onBlur(event); - } - }, false); - var handleFocus = Object(useEventCallback["a" /* default */])(function (event) { - // Fix for https://github.com/facebook/react/issues/7769 - if (!buttonRef.current) { - buttonRef.current = event.currentTarget; - } + function createChildSelector(store) { + return selectorFactory(store.dispatch, selectorFactoryOptions); + } // If we aren't running in "pure" mode, we don't want to memoize values. + // To avoid conditionally calling hooks, we fall back to a tiny wrapper + // that just executes the given callback immediately. - if (isFocusVisible(event)) { - setFocusVisible(true); - if (onFocusVisible) { - onFocusVisible(event); - } - } + var usePureOnlyMemo = pure ? external_React_["useMemo"] : function (callback) { + return callback(); + }; - if (onFocus) { - onFocus(event); - } - }); + function ConnectFunction(props) { + var _useMemo = Object(external_React_["useMemo"])(function () { + // Distinguish between actual "data" props that were passed to the wrapper component, + // and values needed to control behavior (forwarded refs, alternate context instances). + // To maintain the wrapperProps object reference, memoize this destructuring. + var reactReduxForwardedRef = props.reactReduxForwardedRef, + wrapperProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, ["reactReduxForwardedRef"]); - var isNonNativeButton = function isNonNativeButton() { - var button = getButtonNode(); - return component && component !== 'button' && !(button.tagName === 'A' && button.href); - }; - /** - * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat - */ + return [props.context, reactReduxForwardedRef, wrapperProps]; + }, [props]), + propsContext = _useMemo[0], + reactReduxForwardedRef = _useMemo[1], + wrapperProps = _useMemo[2]; + var ContextToUse = Object(external_React_["useMemo"])(function () { + // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext. + // Memoize the check that determines which context instance we should use. + return propsContext && propsContext.Consumer && Object(react_is["isContextConsumer"])( /*#__PURE__*/external_React_default.a.createElement(propsContext.Consumer, null)) ? propsContext : Context; + }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available - var keydownRef = external_React_["useRef"](false); - var handleKeyDown = Object(useEventCallback["a" /* default */])(function (event) { - // Check if key is already down to avoid repeats being counted as multiple activations - if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') { - keydownRef.current = true; - event.persist(); - rippleRef.current.stop(event, function () { - rippleRef.current.start(event); - }); - } + var contextValue = Object(external_React_["useContext"])(ContextToUse); // The store _must_ exist as either a prop or in context. + // We'll check to see if it _looks_ like a Redux store first. + // This allows us to pass through a `store` prop that is just a plain value. - if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') { - event.preventDefault(); - } + var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch); + var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); - if (onKeyDown) { - onKeyDown(event); - } // Keyboard accessibility for non interactive elements + if (false) {} // Based on the previous check, one of these must be true - if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) { - event.preventDefault(); + var store = didStoreComeFromProps ? props.store : contextValue.store; + var childPropsSelector = Object(external_React_["useMemo"])(function () { + // The child props selector needs the store reference as an input. + // Re-create this selector whenever the store changes. + return createChildSelector(store); + }, [store]); - if (onClick) { - onClick(event); - } - } - }); - var handleKeyUp = Object(useEventCallback["a" /* default */])(function (event) { - // calling preventDefault in keyUp on a - *
- * ); - * } - * ``` - * - * When the button is clicked the component will shift to the `'entering'` state - * and stay there for 500ms (the value of `timeout`) before it finally switches - * to `'entered'`. - * - * When `in` is `false` the same thing happens except the state moves from - * `'exiting'` to `'exited'`. + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. */ -var Transition_Transition = /*#__PURE__*/function (_React$Component) { - Object(inheritsLoose["a" /* default */])(Transition, _React$Component); - function Transition(props, context) { - var _this; +function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } - _this = _React$Component.call(this, props, context) || this; - var parentGroup = context; // In the context of a TransitionGroup all enters are really appears + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?"); + } - var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; - var initialStatus; - _this.appearStatus = null; + var boundActionCreators = {}; - if (props.in) { - if (appear) { - initialStatus = EXITED; - _this.appearStatus = ENTERING; - } else { - initialStatus = ENTERED; - } - } else { - if (props.unmountOnExit || props.mountOnEnter) { - initialStatus = UNMOUNTED; - } else { - initialStatus = EXITED; - } - } + for (var key in actionCreators) { + var actionCreator = actionCreators[key]; - _this.state = { - status: initialStatus - }; - _this.nextCallback = null; - return _this; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } } - Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { - var nextIn = _ref.in; + return boundActionCreators; +} - if (nextIn && prevState.status === UNMOUNTED) { - return { - status: EXITED - }; - } +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } - return null; - } // getSnapshotBeforeUpdate(prevProps) { - // let nextStatus = null - // if (prevProps !== this.props) { - // const { status } = this.state - // if (this.props.in) { - // if (status !== ENTERING && status !== ENTERED) { - // nextStatus = ENTERING - // } - // } else { - // if (status === ENTERING || status === ENTERED) { - // nextStatus = EXITING - // } - // } - // } - // return { nextStatus } - // } - ; + return obj; +} - var _proto = Transition.prototype; +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); - _proto.componentDidMount = function componentDidMount() { - this.updateStatus(true, this.appearStatus); - }; + if (Object.getOwnPropertySymbols) { + keys.push.apply(keys, Object.getOwnPropertySymbols(object)); + } - _proto.componentDidUpdate = function componentDidUpdate(prevProps) { - var nextStatus = null; + if (enumerableOnly) keys = keys.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + return keys; +} - if (prevProps !== this.props) { - var status = this.state.status; +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; - if (this.props.in) { - if (status !== ENTERING && status !== ENTERED) { - nextStatus = ENTERING; - } - } else { - if (status === ENTERING || status === ENTERED) { - nextStatus = EXITING; - } - } + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); } + } - this.updateStatus(false, nextStatus); - }; - - _proto.componentWillUnmount = function componentWillUnmount() { - this.cancelNextCallback(); - }; + return target; +} - _proto.getTimeouts = function getTimeouts() { - var timeout = this.props.timeout; - var exit, enter, appear; - exit = enter = appear = timeout; +/** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ +function compose() { + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } - if (timeout != null && typeof timeout !== 'number') { - exit = timeout.exit; - enter = timeout.enter; // TODO: remove fallback for next major + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } - appear = timeout.appear !== undefined ? timeout.appear : enter; - } + if (funcs.length === 1) { + return funcs[0]; + } - return { - exit: exit, - enter: enter, - appear: appear + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(void 0, arguments)); }; - }; - - _proto.updateStatus = function updateStatus(mounting, nextStatus) { - if (mounting === void 0) { - mounting = false; - } + }); +} - if (nextStatus !== null) { - // nextStatus will always be ENTERING or EXITING. - this.cancelNextCallback(); +/** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ - if (nextStatus === ENTERING) { - this.performEnter(mounting); - } else { - this.performExit(); - } - } else if (this.props.unmountOnExit && this.state.status === EXITED) { - this.setState({ - status: UNMOUNTED - }); - } - }; +function applyMiddleware() { + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } - _proto.performEnter = function performEnter(mounting) { - var _this2 = this; - - var enter = this.props.enter; - var appearing = this.context ? this.context.isMounting : mounting; - - var _ref2 = this.props.nodeRef ? [appearing] : [external_ReactDOM_default.a.findDOMNode(this), appearing], - maybeNode = _ref2[0], - maybeAppearing = _ref2[1]; + return function (createStore) { + return function () { + var store = createStore.apply(void 0, arguments); - var timeouts = this.getTimeouts(); - var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED - // if we are mounting and running this it means appear _must_ be set + var _dispatch = function dispatch() { + throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); + }; - if (!mounting && !enter || config.disabled) { - this.safeSetState({ - status: ENTERED - }, function () { - _this2.props.onEntered(maybeNode); + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch() { + return _dispatch.apply(void 0, arguments); + } + }; + var chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); }); - return; - } - - this.props.onEnter(maybeNode, maybeAppearing); - this.safeSetState({ - status: ENTERING - }, function () { - _this2.props.onEntering(maybeNode, maybeAppearing); - - _this2.onTransitionEnd(enterTimeout, function () { - _this2.safeSetState({ - status: ENTERED - }, function () { - _this2.props.onEntered(maybeNode, maybeAppearing); - }); + _dispatch = compose.apply(void 0, chain)(store.dispatch); + return _objectSpread2({}, store, { + dispatch: _dispatch }); - }); + }; }; +} - _proto.performExit = function performExit() { - var _this3 = this; - - var exit = this.props.exit; - var timeouts = this.getTimeouts(); - var maybeNode = this.props.nodeRef ? undefined : external_ReactDOM_default.a.findDOMNode(this); // no exit animation skip right to EXITED +/* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ - if (!exit || config.disabled) { - this.safeSetState({ - status: EXITED - }, function () { - _this3.props.onExited(maybeNode); - }); - return; - } +function isCrushed() {} - this.props.onExit(maybeNode); - this.safeSetState({ - status: EXITING - }, function () { - _this3.props.onExiting(maybeNode); +if (false) {} - _this3.onTransitionEnd(timeouts.exit, function () { - _this3.safeSetState({ - status: EXITED - }, function () { - _this3.props.onExited(maybeNode); - }); - }); - }); - }; - _proto.cancelNextCallback = function cancelNextCallback() { - if (this.nextCallback !== null) { - this.nextCallback.cancel(); - this.nextCallback = null; - } - }; - _proto.safeSetState = function safeSetState(nextState, callback) { - // This shouldn't be necessary, but there are weird race conditions with - // setState callbacks and unmounting in testing, so always make sure that - // we can cancel any pending setState callbacks after we unmount. - callback = this.setNextCallback(callback); - this.setState(nextState, callback); - }; +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/isPlainObject.js +/** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ +function isPlainObject_isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = Object.getPrototypeOf(obj); + if (proto === null) return true; + var baseProto = proto; - _proto.setNextCallback = function setNextCallback(callback) { - var _this4 = this; + while (Object.getPrototypeOf(baseProto) !== null) { + baseProto = Object.getPrototypeOf(baseProto); + } - var active = true; + return proto === baseProto; +} +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/warning.js +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning_warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ - this.nextCallback = function (event) { - if (active) { - active = false; - _this4.nextCallback = null; - callback(event); - } - }; - this.nextCallback.cancel = function () { - active = false; - }; + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ - return this.nextCallback; - }; +} +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/verifyPlainObject.js - _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) { - this.setNextCallback(handler); - var node = this.props.nodeRef ? this.props.nodeRef.current : external_ReactDOM_default.a.findDOMNode(this); - var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener; - if (!node || doesNotHaveTimeoutOrListener) { - setTimeout(this.nextCallback, 0); - return; - } +function verifyPlainObject(value, displayName, methodName) { + if (!isPlainObject_isPlainObject(value)) { + warning_warning(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + "."); + } +} +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/wrapMapToProps.js - if (this.props.addEndListener) { - var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback], - maybeNode = _ref3[0], - maybeNextCallback = _ref3[1]; +function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); - this.props.addEndListener(maybeNode, maybeNextCallback); + function constantSelector() { + return constant; } - if (timeout != null) { - setTimeout(this.nextCallback, timeout); - } + constantSelector.dependsOnOwnProps = false; + return constantSelector; }; +} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args +// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine +// whether mapToProps needs to be invoked when props have changed. +// +// A length of one signals that mapToProps does not depend on props from the parent component. +// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and +// therefore not reporting its length accurately.. - _proto.render = function render() { - var status = this.state.status; +function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; +} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, +// this function wraps mapToProps in a proxy function which does several things: +// +// * Detects whether the mapToProps function being called depends on props, which +// is used by selectorFactory to decide if it should reinvoke on props changes. +// +// * On first call, handles mapToProps if returns another function, and treats that +// new function as the true mapToProps for subsequent calls. +// +// * On first call, verifies the first result is a plain object, in order to warn +// the developer that their mapToProps function is not returning a valid result. +// - if (status === UNMOUNTED) { - return null; - } +function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; - var _this$props = this.props, - children = _this$props.children, - _in = _this$props.in, - _mountOnEnter = _this$props.mountOnEnter, - _unmountOnExit = _this$props.unmountOnExit, - _appear = _this$props.appear, - _enter = _this$props.enter, - _exit = _this$props.exit, - _timeout = _this$props.timeout, - _addEndListener = _this$props.addEndListener, - _onEnter = _this$props.onEnter, - _onEntering = _this$props.onEntering, - _onEntered = _this$props.onEntered, - _onExit = _this$props.onExit, - _onExiting = _this$props.onExiting, - _onExited = _this$props.onExited, - _nodeRef = _this$props.nodeRef, - childProps = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps - return ( - /*#__PURE__*/ - // allows for nested Transitions - external_React_default.a.createElement(TransitionGroupContext.Provider, { - value: null - }, typeof children === 'function' ? children(status, childProps) : external_React_default.a.cloneElement(external_React_default.a.Children.only(children), childProps)) - ); - }; - return Transition; -}(external_React_default.a.Component); + proxy.dependsOnOwnProps = true; -Transition_Transition.contextType = TransitionGroupContext; -Transition_Transition.propTypes = false ? undefined : {}; // Name the function so it is clearer in the documentation + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); -function noop() {} + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } -Transition_Transition.defaultProps = { - in: false, - mountOnEnter: false, - unmountOnExit: false, - appear: false, - enter: true, - exit: true, - onEnter: noop, - onEntering: noop, - onEntered: noop, - onExit: noop, - onExiting: noop, - onExited: noop -}; -Transition_Transition.UNMOUNTED = UNMOUNTED; -Transition_Transition.EXITED = EXITED; -Transition_Transition.ENTERING = ENTERING; -Transition_Transition.ENTERED = ENTERED; -Transition_Transition.EXITING = EXITING; -/* harmony default export */ var esm_Transition = (Transition_Transition); -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/styles/transitions.js -var transitions = __webpack_require__(25); + if (false) {} + return props; + }; -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/transitions/utils.js -var reflow = function reflow(node) { - return node.scrollTop; -}; -function getTransitionProps(props, options) { - var timeout = props.timeout, - _props$style = props.style, - style = _props$style === void 0 ? {} : _props$style; - return { - duration: style.transitionDuration || typeof timeout === 'number' ? timeout : timeout[options.mode] || 0, - delay: style.transitionDelay + return proxy; }; } -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/styles/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/styles/esm/useTheme/useTheme.js + 1 modules -var useTheme = __webpack_require__(74); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/mapDispatchToProps.js -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/styles/useTheme.js +function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined; +} +function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) { + return { + dispatch: dispatch + }; + }) : undefined; +} +function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) { + return bindActionCreators(mapDispatchToProps, dispatch); + }) : undefined; +} +/* harmony default export */ var connect_mapDispatchToProps = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/mapStateToProps.js + +function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined; +} +function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps ? wrapMapToPropsConstant(function () { + return {}; + }) : undefined; +} +/* harmony default export */ var connect_mapStateToProps = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/mergeProps.js -function useTheme_useTheme() { - var theme = Object(useTheme["a" /* default */])() || defaultTheme["a" /* default */]; +function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return Object(esm_extends["a" /* default */])({}, ownProps, stateProps, dispatchProps); +} +function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + var hasRunOnce = false; + var mergedProps; + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); - if (false) {} + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + if (false) {} + } - return theme; + return mergedProps; + }; + }; } -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/Collapse/Collapse.js +function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; +} +function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps ? function () { + return defaultMergeProps; + } : undefined; +} +/* harmony default export */ var connect_mergeProps = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/verifySubselectors.js +function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error("Unexpected value for " + methodName + " in " + displayName + "."); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) { + warning_warning("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps."); + } + } +} +function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); +} +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/selectorFactory.js +function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps); + }; +} +function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + var hasRunAtLeastOnce = false; + var state; + var ownProps; + var stateProps; + var dispatchProps; + var mergedProps; + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state); + state = nextState; + ownProps = nextOwnProps; + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); + }; +} // TODO: Add more comments +// If pure is true, the selector returned by selectorFactory will memoize its results, +// allowing connectAdvanced's shouldComponentUpdate to return false if final +// props have not changed. If false, the selector will always return a new +// object and shouldComponentUpdate will always return true. -var Collapse_styles = function styles(theme) { - return { - /* Styles applied to the container element. */ - container: { - height: 0, - overflow: 'hidden', - transition: theme.transitions.create('height') - }, +function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]); - /* Styles applied to the container element when the transition has entered. */ - entered: { - height: 'auto', - overflow: 'visible' - }, + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); - /* Styles applied to the container element when the transition has exited and `collapsedHeight` != 0px. */ - hidden: { - visibility: 'hidden' - }, + if (false) {} - /* Styles applied to the outer wrapper element. */ - wrapper: { - // Hack to get children with a negative margin to not falsify the height computation. - display: 'flex' - }, + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); +} +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/connect.js - /* Styles applied to the inner wrapper element. */ - wrapperInner: { - width: '100%' - } - }; -}; -/** - * The Collapse transition is used by the - * [Vertical Stepper](/components/steppers/#vertical-stepper) StepContent component. - * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. - */ -var Collapse_Collapse = /*#__PURE__*/external_React_["forwardRef"](function Collapse(props, ref) { - var children = props.children, - classes = props.classes, - className = props.className, - _props$collapsedHeigh = props.collapsedHeight, - collapsedHeightProp = _props$collapsedHeigh === void 0 ? '0px' : _props$collapsedHeigh, - _props$component = props.component, - Component = _props$component === void 0 ? 'div' : _props$component, - _props$disableStrictM = props.disableStrictModeCompat, - disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM, - inProp = props.in, - onEnter = props.onEnter, - onEntered = props.onEntered, - onEntering = props.onEntering, - onExit = props.onExit, - onExited = props.onExited, - onExiting = props.onExiting, - style = props.style, - _props$timeout = props.timeout, - timeout = _props$timeout === void 0 ? transitions["b" /* duration */].standard : _props$timeout, - _props$TransitionComp = props.TransitionComponent, - TransitionComponent = _props$TransitionComp === void 0 ? esm_Transition : _props$TransitionComp, - other = Object(objectWithoutProperties["a" /* default */])(props, ["children", "classes", "className", "collapsedHeight", "component", "disableStrictModeCompat", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]); - var theme = useTheme_useTheme(); - var timer = external_React_["useRef"](); - var wrapperRef = external_React_["useRef"](null); - var autoTransitionDuration = external_React_["useRef"](); - var collapsedHeight = typeof collapsedHeightProp === 'number' ? "".concat(collapsedHeightProp, "px") : collapsedHeightProp; - external_React_["useEffect"](function () { - return function () { - clearTimeout(timer.current); - }; - }, []); - var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat; - var nodeRef = external_React_["useRef"](null); - var handleRef = Object(useForkRef["a" /* default */])(ref, enableStrictModeCompat ? nodeRef : undefined); - - var normalizedTransitionCallback = function normalizedTransitionCallback(callback) { - return function (nodeOrAppearing, maybeAppearing) { - if (callback) { - var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing], - _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2), - node = _ref2[0], - isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value. - if (isAppearing === undefined) { - callback(node); - } else { - callback(node, isAppearing); - } - } - }; - }; - var handleEnter = normalizedTransitionCallback(function (node, isAppearing) { - node.style.height = collapsedHeight; - if (onEnter) { - onEnter(node, isAppearing); - } - }); - var handleEntering = normalizedTransitionCallback(function (node, isAppearing) { - var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0; - var _getTransitionProps = getTransitionProps({ - style: style, - timeout: timeout - }, { - mode: 'enter' - }), - transitionDuration = _getTransitionProps.duration; +/* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: - if (timeout === 'auto') { - var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight); - node.style.transitionDuration = "".concat(duration2, "ms"); - autoTransitionDuration.current = duration2; - } else { - node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : "".concat(transitionDuration, "ms"); - } + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. - node.style.height = "".concat(wrapperHeight, "px"); + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. - if (onEntering) { - onEntering(node, isAppearing); - } - }); - var handleEntered = normalizedTransitionCallback(function (node, isAppearing) { - node.style.height = 'auto'; + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ - if (onEntered) { - onEntered(node, isAppearing); - } - }); - var handleExit = normalizedTransitionCallback(function (node) { - var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0; - node.style.height = "".concat(wrapperHeight, "px"); +function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } - if (onExit) { - onExit(node); - } - }); - var handleExited = normalizedTransitionCallback(onExited); - var handleExiting = normalizedTransitionCallback(function (node) { - var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0; + return function (dispatch, options) { + throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + "."); + }; +} - var _getTransitionProps2 = getTransitionProps({ - style: style, - timeout: timeout - }, { - mode: 'exit' - }), - transitionDuration = _getTransitionProps2.duration; +function strictEqual(a, b) { + return a === b; +} // createConnect with default args builds the 'official' connect behavior. Calling it with +// different options opens up some testing and extensibility scenarios - if (timeout === 'auto') { - var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight); - node.style.transitionDuration = "".concat(duration2, "ms"); - autoTransitionDuration.current = duration2; - } else { - node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : "".concat(transitionDuration, "ms"); - } - node.style.height = collapsedHeight; +function createConnect(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$connectHOC = _ref.connectHOC, + connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? connect_mapStateToProps : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? connect_mapDispatchToProps : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = _ref$mergePropsFactor === void 0 ? connect_mergeProps : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory; - if (onExiting) { - onExiting(node); + return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { + if (_ref2 === void 0) { + _ref2 = {}; } - }); - var addEndListener = function addEndListener(nodeOrNext, maybeNext) { - var next = enableStrictModeCompat ? nodeOrNext : maybeNext; + var _ref3 = _ref2, + _ref3$pure = _ref3.pure, + pure = _ref3$pure === void 0 ? true : _ref3$pure, + _ref3$areStatesEqual = _ref3.areStatesEqual, + areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, + _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, + areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua, + _ref3$areStatePropsEq = _ref3.areStatePropsEqual, + areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq, + _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, + areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE, + extraOptions = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]); - if (timeout === 'auto') { - timer.current = setTimeout(next, autoTransitionDuration.current || 0); - } + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps'); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + return connectHOC(selectorFactory, Object(esm_extends["a" /* default */])({ + // used in error messages + methodName: 'connect', + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return "Connect(" + name + ")"; + }, + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual + }, extraOptions)); }; +} +/* harmony default export */ var connect_connect = (/*#__PURE__*/createConnect()); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/hooks/useReduxContext.js - return /*#__PURE__*/external_React_["createElement"](TransitionComponent, Object(esm_extends["a" /* default */])({ - in: inProp, - onEnter: handleEnter, - onEntered: handleEntered, - onEntering: handleEntering, - onExit: handleExit, - onExited: handleExited, - onExiting: handleExiting, - addEndListener: addEndListener, - nodeRef: enableStrictModeCompat ? nodeRef : undefined, - timeout: timeout === 'auto' ? null : timeout - }, other), function (state, childProps) { - return /*#__PURE__*/external_React_["createElement"](Component, Object(esm_extends["a" /* default */])({ - className: Object(clsx_m["a" /* default */])(classes.container, className, { - 'entered': classes.entered, - 'exited': !inProp && collapsedHeight === '0px' && classes.hidden - }[state]), - style: Object(esm_extends["a" /* default */])({ - minHeight: collapsedHeight - }, style), - ref: handleRef - }, childProps), /*#__PURE__*/external_React_["createElement"]("div", { - className: classes.wrapper, - ref: wrapperRef - }, /*#__PURE__*/external_React_["createElement"]("div", { - className: classes.wrapperInner - }, children))); - }); -}); - false ? undefined : void 0; -Collapse_Collapse.muiSupportAuto = true; -/* harmony default export */ var esm_Collapse_Collapse = (Object(withStyles["a" /* default */])(Collapse_styles, { - name: 'MuiCollapse' -})(Collapse_Collapse)); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/lab/4.0.0-alpha.57_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/lab/esm/TreeView/TreeViewContext.js /** - * @ignore - internal component. + * A hook to access the value of the `ReactReduxContext`. This is a low-level + * hook that you should usually not need to call directly. + * + * @returns {any} the value of the `ReactReduxContext` + * + * @example + * + * import React from 'react' + * import { useReduxContext } from 'react-redux' + * + * export const CounterComponent = ({ value }) => { + * const { store } = useReduxContext() + * return
{store.getState()}
+ * } */ -var TreeViewContext = external_React_["createContext"]({}); - -if (false) {} - -/* harmony default export */ var TreeView_TreeViewContext = (TreeViewContext); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/lab/4.0.0-alpha.57_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/lab/esm/TreeItem/TreeItem.js - - - -/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */ +function useReduxContext_useReduxContext() { + var contextValue = Object(external_React_["useContext"])(ReactReduxContext); + if (false) {} + return contextValue; +} +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/hooks/useStore.js +/** + * Hook factory, which creates a `useStore` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. + * @returns {Function} A `useStore` hook bound to the specified context. + */ +function createStoreHook(context) { + if (context === void 0) { + context = ReactReduxContext; + } + var useReduxContext = context === ReactReduxContext ? useReduxContext_useReduxContext : function () { + return Object(external_React_["useContext"])(context); + }; + return function useStore() { + var _useReduxContext = useReduxContext(), + store = _useReduxContext.store; -var TreeItem_styles = function styles(theme) { - return { - /* Styles applied to the root element. */ - root: { - listStyle: 'none', - margin: 0, - padding: 0, - outline: 0, - WebkitTapHighlightColor: 'transparent', - '&:focus > $content $label': { - backgroundColor: theme.palette.action.hover - }, - '&$selected > $content $label': { - backgroundColor: Object(colorManipulator["b" /* fade */])(theme.palette.primary.main, theme.palette.action.selectedOpacity) - }, - '&$selected > $content $label:hover, &$selected:focus > $content $label': { - backgroundColor: Object(colorManipulator["b" /* fade */])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity), - // Reset on touch devices, it doesn't add specificity - '@media (hover: none)': { - backgroundColor: 'transparent' - } - } - }, - - /* Pseudo-class applied to the root element when expanded. */ - expanded: {}, + return store; + }; +} +/** + * A hook to access the redux store. + * + * @returns {any} the redux store + * + * @example + * + * import React from 'react' + * import { useStore } from 'react-redux' + * + * export const ExampleComponent = () => { + * const store = useStore() + * return
{store.getState()}
+ * } + */ - /* Pseudo-class applied to the root element when selected. */ - selected: {}, +var useStore_useStore = /*#__PURE__*/createStoreHook(); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/hooks/useDispatch.js - /* Styles applied to the `role="group"` element. */ - group: { - margin: 0, - padding: 0, - marginLeft: 17 - }, - /* Styles applied to the tree node content. */ - content: { - width: '100%', - display: 'flex', - alignItems: 'center', - cursor: 'pointer' - }, +/** + * Hook factory, which creates a `useDispatch` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. + * @returns {Function} A `useDispatch` hook bound to the specified context. + */ - /* Styles applied to the tree node icon and collapse/expand icon. */ - iconContainer: { - marginRight: 4, - width: 15, - display: 'flex', - flexShrink: 0, - justifyContent: 'center', - '& svg': { - fontSize: 18 - } - }, +function createDispatchHook(context) { + if (context === void 0) { + context = ReactReduxContext; + } - /* Styles applied to the label element. */ - label: { - width: '100%', - paddingLeft: 4, - position: 'relative', - '&:hover': { - backgroundColor: theme.palette.action.hover, - // Reset on touch devices, it doesn't add specificity - '@media (hover: none)': { - backgroundColor: 'transparent' - } - } - } + var useStore = context === ReactReduxContext ? useStore_useStore : createStoreHook(context); + return function useDispatch() { + var store = useStore(); + return store.dispatch; }; -}; +} +/** + * A hook to access the redux `dispatch` function. + * + * @returns {any|function} redux store's `dispatch` function + * + * @example + * + * import React, { useCallback } from 'react' + * import { useDispatch } from 'react-redux' + * + * export const CounterComponent = ({ value }) => { + * const dispatch = useDispatch() + * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), []) + * return ( + *
+ * {value} + * + *
+ * ) + * } + */ -var isPrintableCharacter = function isPrintableCharacter(str) { - return str && str.length === 1 && str.match(/\S/); -}; +var useDispatch = /*#__PURE__*/createDispatchHook(); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/hooks/useSelector.js -var TreeItem_TreeItem = /*#__PURE__*/external_React_["forwardRef"](function TreeItem(props, ref) { - var children = props.children, - classes = props.classes, - className = props.className, - collapseIcon = props.collapseIcon, - endIcon = props.endIcon, - expandIcon = props.expandIcon, - iconProp = props.icon, - label = props.label, - nodeId = props.nodeId, - onClick = props.onClick, - onLabelClick = props.onLabelClick, - onIconClick = props.onIconClick, - onFocus = props.onFocus, - onKeyDown = props.onKeyDown, - onMouseDown = props.onMouseDown, - _props$TransitionComp = props.TransitionComponent, - TransitionComponent = _props$TransitionComp === void 0 ? esm_Collapse_Collapse : _props$TransitionComp, - TransitionProps = props.TransitionProps, - other = Object(objectWithoutProperties["a" /* default */])(props, ["children", "classes", "className", "collapseIcon", "endIcon", "expandIcon", "icon", "label", "nodeId", "onClick", "onLabelClick", "onIconClick", "onFocus", "onKeyDown", "onMouseDown", "TransitionComponent", "TransitionProps"]); - var _React$useContext = external_React_["useContext"](TreeView_TreeViewContext), - contextIcons = _React$useContext.icons, - focus = _React$useContext.focus, - focusFirstNode = _React$useContext.focusFirstNode, - focusLastNode = _React$useContext.focusLastNode, - focusNextNode = _React$useContext.focusNextNode, - focusPreviousNode = _React$useContext.focusPreviousNode, - focusByFirstCharacter = _React$useContext.focusByFirstCharacter, - selectNode = _React$useContext.selectNode, - selectRange = _React$useContext.selectRange, - selectNextNode = _React$useContext.selectNextNode, - selectPreviousNode = _React$useContext.selectPreviousNode, - rangeSelectToFirst = _React$useContext.rangeSelectToFirst, - rangeSelectToLast = _React$useContext.rangeSelectToLast, - selectAllNodes = _React$useContext.selectAllNodes, - expandAllSiblings = _React$useContext.expandAllSiblings, - toggleExpansion = _React$useContext.toggleExpansion, - isExpanded = _React$useContext.isExpanded, - isFocused = _React$useContext.isFocused, - isSelected = _React$useContext.isSelected, - isTabbable = _React$useContext.isTabbable, - multiSelect = _React$useContext.multiSelect, - getParent = _React$useContext.getParent, - mapFirstChar = _React$useContext.mapFirstChar, - addNodeToNodeMap = _React$useContext.addNodeToNodeMap, - removeNodeFromNodeMap = _React$useContext.removeNodeFromNodeMap; - var nodeRef = external_React_["useRef"](null); - var contentRef = external_React_["useRef"](null); - var handleRef = Object(useForkRef["a" /* default */])(nodeRef, ref); - var icon = iconProp; - var expandable = Boolean(Array.isArray(children) ? children.length : children); - var expanded = isExpanded ? isExpanded(nodeId) : false; - var focused = isFocused ? isFocused(nodeId) : false; - var tabbable = isTabbable ? isTabbable(nodeId) : false; - var selected = isSelected ? isSelected(nodeId) : false; - var icons = contextIcons || {}; - var theme = useTheme_useTheme(); - if (!icon) { - if (expandable) { - if (!expanded) { - icon = expandIcon || icons.defaultExpandIcon; - } else { - icon = collapseIcon || icons.defaultCollapseIcon; - } - if (!icon) { - icon = icons.defaultParentIcon; - } - } else { - icon = endIcon || icons.defaultEndIcon; - } - } - var handleClick = function handleClick(event) { - if (!focused) { - focus(nodeId); - } +var refEquality = function refEquality(a, b) { + return a === b; +}; - var multiple = multiSelect && (event.shiftKey || event.ctrlKey || event.metaKey); // If already expanded and trying to toggle selection don't close +function useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) { + var _useReducer = Object(external_React_["useReducer"])(function (s) { + return s + 1; + }, 0), + forceRender = _useReducer[1]; - if (expandable && !event.defaultPrevented && !(multiple && isExpanded(nodeId))) { - toggleExpansion(event, nodeId); - } + var subscription = Object(external_React_["useMemo"])(function () { + return new Subscription(store, contextSub); + }, [store, contextSub]); + var latestSubscriptionCallbackError = Object(external_React_["useRef"])(); + var latestSelector = Object(external_React_["useRef"])(); + var latestStoreState = Object(external_React_["useRef"])(); + var latestSelectedState = Object(external_React_["useRef"])(); + var storeState = store.getState(); + var selectedState; - if (multiple) { - if (event.shiftKey) { - selectRange(event, { - end: nodeId - }); - } else { - selectNode(event, nodeId, true); - } + try { + if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) { + selectedState = selector(storeState); } else { - selectNode(event, nodeId); + selectedState = latestSelectedState.current; } - - if (onClick) { - onClick(event); + } catch (err) { + if (latestSubscriptionCallbackError.current) { + err.message += "\nThe error may be correlated with this previous error:\n" + latestSubscriptionCallbackError.current.stack + "\n\n"; } - }; - var handleMouseDown = function handleMouseDown(event) { - if (event.shiftKey || event.ctrlKey || event.metaKey) { - event.preventDefault(); - } + throw err; + } - if (onMouseDown) { - onMouseDown(event); - } - }; + useIsomorphicLayoutEffect(function () { + latestSelector.current = selector; + latestStoreState.current = storeState; + latestSelectedState.current = selectedState; + latestSubscriptionCallbackError.current = undefined; + }); + useIsomorphicLayoutEffect(function () { + function checkForUpdates() { + try { + var newSelectedState = latestSelector.current(store.getState()); - var handleNextArrow = function handleNextArrow(event) { - if (expandable) { - if (expanded) { - focusNextNode(nodeId); - } else { - toggleExpansion(event); + if (equalityFn(newSelectedState, latestSelectedState.current)) { + return; + } + + latestSelectedState.current = newSelectedState; + } catch (err) { + // we ignore all errors here, since when the component + // is re-rendered, the selectors are called again, and + // will throw again, if neither props nor store state + // changed + latestSubscriptionCallbackError.current = err; } + + forceRender(); } - return true; - }; + subscription.onStateChange = checkForUpdates; + subscription.trySubscribe(); + checkForUpdates(); + return function () { + return subscription.tryUnsubscribe(); + }; + }, [store, subscription]); + return selectedState; +} +/** + * Hook factory, which creates a `useSelector` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. + * @returns {Function} A `useSelector` hook bound to the specified context. + */ - var handlePreviousArrow = function handlePreviousArrow(event) { - if (expanded) { - toggleExpansion(event, nodeId); - return true; - } - var parent = getParent(nodeId); +function createSelectorHook(context) { + if (context === void 0) { + context = ReactReduxContext; + } - if (parent) { - focus(parent); - return true; + var useReduxContext = context === ReactReduxContext ? useReduxContext_useReduxContext : function () { + return Object(external_React_["useContext"])(context); + }; + return function useSelector(selector, equalityFn) { + if (equalityFn === void 0) { + equalityFn = refEquality; } - return false; + if (false) {} + + var _useReduxContext = useReduxContext(), + store = _useReduxContext.store, + contextSub = _useReduxContext.subscription; + + var selectedState = useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub); + Object(external_React_["useDebugValue"])(selectedState); + return selectedState; }; +} +/** + * A hook to access the redux store's state. This hook takes a selector function + * as an argument. The selector is called with the store state. + * + * This hook takes an optional equality comparison function as the second parameter + * that allows you to customize the way the selected state is compared to determine + * whether the component needs to be re-rendered. + * + * @param {Function} selector the selector function + * @param {Function=} equalityFn the function that will be used to determine equality + * + * @returns {any} the selected state + * + * @example + * + * import React from 'react' + * import { useSelector } from 'react-redux' + * + * export const CounterComponent = () => { + * const counter = useSelector(state => state.counter) + * return
{counter}
+ * } + */ - var handleKeyDown = function handleKeyDown(event) { - var flag = false; - var key = event.key; +var useSelector_useSelector = /*#__PURE__*/createSelectorHook(); +// EXTERNAL MODULE: external "ReactDOM" +var external_ReactDOM_ = __webpack_require__(7); +var external_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_ReactDOM_); - if (event.altKey || event.currentTarget !== event.target) { - return; - } +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/reactBatchedUpdates.js +/* eslint-disable import/no-unresolved */ - var ctrlPressed = event.ctrlKey || event.metaKey; +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/index.js - switch (key) { - case ' ': - if (nodeRef.current === event.currentTarget) { - if (multiSelect && event.shiftKey) { - flag = selectRange(event, { - end: nodeId - }); - } else if (multiSelect) { - flag = selectNode(event, nodeId, true); - } else { - flag = selectNode(event, nodeId); - } - } - event.stopPropagation(); - break; - case 'Enter': - if (nodeRef.current === event.currentTarget && expandable) { - toggleExpansion(event); - flag = true; - } - event.stopPropagation(); - break; - case 'ArrowDown': - if (multiSelect && event.shiftKey) { - selectNextNode(event, nodeId); - } - focusNextNode(nodeId); - flag = true; - break; - case 'ArrowUp': - if (multiSelect && event.shiftKey) { - selectPreviousNode(event, nodeId); - } - focusPreviousNode(nodeId); - flag = true; - break; - case 'ArrowRight': - if (theme.direction === 'rtl') { - flag = handlePreviousArrow(event); - } else { - flag = handleNextArrow(event); - } - break; +setBatch(external_ReactDOM_["unstable_batchedUpdates"]); - case 'ArrowLeft': - if (theme.direction === 'rtl') { - flag = handleNextArrow(event); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/lodash/4.17.20/node_modules/lodash/debounce.js +var debounce = __webpack_require__(41); +var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce); + +// CONCATENATED MODULE: ./src/app/store.js +function store_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { store_ownKeys(Object(source), true).forEach(function (key) { store_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + + +function globalReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case "setExplorerOpen": + return _objectSpread(_objectSpread({}, state), {}, { + explorerOpen: action.value + }); + + case "setQuery": + if (!state.query && action.value) { + state.expandedItemsBeforeQuery = state.expandedItems; + } else if (state.query && !action.value) { + state.expandedItems = state.expandedItemsBeforeQuery; + } + + if (action.value) { + return _objectSpread(_objectSpread({}, state), {}, { + query: action.value, + expandedItems: action.items + }); + } else { + return _objectSpread(_objectSpread({}, state), {}, { + query: action.value + }); + } + + case "toggleItem": + { + var expandedItems = new Set(state.expandedItems); + + if (action.value !== undefined) { + expandedItems[action.value ? "add" : "delete"](action.nodeId); } else { - flag = handlePreviousArrow(event); + expandedItems[expandedItems.has(action.nodeId) ? "delete" : "add"](action.nodeId); } - break; + return _objectSpread(_objectSpread({}, state), {}, { + expandedItems: expandedItems + }); + } - case 'Home': - if (multiSelect && ctrlPressed && event.shiftKey) { - rangeSelectToFirst(event, nodeId); - } + default: + return state; + } +} - focusFirstNode(); - flag = true; - break; +/* harmony default export */ var app_store = (createStore(globalReducer, { + expandedItems: new Set(), + explorerOpen: true, + expandedItemsBeforeQuery: new Set(), + query: "" +})); +// CONCATENATED MODULE: ./src/app/components/Explorer/ExplorerFilter.js +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } - case 'End': - if (multiSelect && ctrlPressed && event.shiftKey) { - rangeSelectToLast(event, nodeId); - } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - focusLastNode(); - flag = true; - break; +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - default: - if (key === '*') { - expandAllSiblings(event, nodeId); - flag = true; - } else if (multiSelect && ctrlPressed && key.toLowerCase() === 'a') { - flag = selectAllNodes(event); - } else if (!ctrlPressed && !event.shiftKey && isPrintableCharacter(key)) { - focusByFirstCharacter(nodeId, key); - flag = true; - } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - } +function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - if (flag) { - event.preventDefault(); - event.stopPropagation(); - } +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - if (onKeyDown) { - onKeyDown(event); - } - }; - var handleFocus = function handleFocus(event) { - if (!focused && event.currentTarget === event.target) { - focus(nodeId); - } - if (onFocus) { - onFocus(event); + + + +function filterTree(query, collector, data) { + data.$match = !query || !!data.title && data.title.toLowerCase().includes(query); + + if (data.children) { + for (var _i = 0, _Object$entries = Object.entries(data.children); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + value = _Object$entries$_i[1]; + + if (key.charAt(0) === "$") { + continue; + } + + filterTree(query, collector, value); + data.$match = data.$match || value.$match; } - }; + } - external_React_["useEffect"](function () { - if (addNodeToNodeMap) { - var childIds = []; - external_React_["Children"].forEach(children, function (child) { - if ( /*#__PURE__*/external_React_["isValidElement"](child) && child.props.nodeId) { - childIds.push(child.props.nodeId); - } + if (query && data.$match) { + collector.add(data.$nodeId); + } +} + +/* harmony default export */ var Explorer_ExplorerFilter = (connect_connect(function () { + return { + nextQuery: function nextQuery(query, items) { + return app_store.dispatch({ + type: "setQuery", + value: query, + items: items }); - addNodeToNodeMap(nodeId, childIds); } - }, [children, nodeId, addNodeToNodeMap]); - external_React_["useEffect"](function () { - if (removeNodeFromNodeMap) { - return function () { - removeNodeFromNodeMap(nodeId); - }; - } - - return undefined; - }, [nodeId, removeNodeFromNodeMap]); - external_React_["useEffect"](function () { - if (mapFirstChar && label) { - mapFirstChar(nodeId, contentRef.current.textContent.substring(0, 1).toLowerCase()); - } - }, [mapFirstChar, nodeId, label]); - external_React_["useEffect"](function () { - if (focused) { - nodeRef.current.focus(); - } - }, [focused]); - var ariaSelected; - - if (multiSelect) { - ariaSelected = selected; - } else if (selected) { - // single-selection trees unset aria-selected - ariaSelected = true; - } - - return /*#__PURE__*/external_React_["createElement"]("li", Object(esm_extends["a" /* default */])({ - className: Object(clsx_m["a" /* default */])(classes.root, className, expanded && classes.expanded, selected && classes.selected), - role: "treeitem", - onKeyDown: handleKeyDown, - onFocus: handleFocus, - "aria-expanded": expandable ? expanded : null, - "aria-selected": ariaSelected, - ref: handleRef, - tabIndex: tabbable ? 0 : -1 - }, other), /*#__PURE__*/external_React_["createElement"]("div", { - className: classes.content, - onClick: handleClick, - onMouseDown: handleMouseDown, - ref: contentRef - }, /*#__PURE__*/external_React_["createElement"]("div", { - onClick: onIconClick, - className: classes.iconContainer - }, icon), /*#__PURE__*/external_React_["createElement"](esm_Typography_Typography, { - onClick: onLabelClick, - component: "div", - className: classes.label - }, label)), children && /*#__PURE__*/external_React_["createElement"](TransitionComponent, Object(esm_extends["a" /* default */])({ - unmountOnExit: true, - className: classes.group, - in: expanded, - component: "ul", - role: "group" - }, TransitionProps), children)); -}); - false ? undefined : void 0; -/* harmony default export */ var esm_TreeItem_TreeItem = (Object(withStyles["a" /* default */])(TreeItem_styles, { - name: 'MuiTreeItem' -})(TreeItem_TreeItem)); -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/cuid/2.1.8/node_modules/cuid/index.js -var cuid = __webpack_require__(26); -var cuid_default = /*#__PURE__*/__webpack_require__.n(cuid); - -// CONCATENATED MODULE: ./src/app/components/Explorer/ExplorerCategoryItem.js + }; +})(function ExplorerFilter(props) { + var onNativeChange = external_React_default.a.useCallback(debounce_default()(function (e) { + var query = e.target.value; + var items = new Set(); + var startish = Date.now(); + filterTree(query.toLowerCase(), items, props.data); + console.log("Search took: " + Date.now() - startish + " ms"); + props.nextQuery(query, items); + }, 200, { + maxWait: 1000 + }), [props.data]); + var onChange = external_React_default.a.useCallback(function (e) { + return onNativeChange(e.nativeEvent); + }, [onNativeChange]); + return external_React_default.a.createElement("input", { + onChange: onChange, + placeholder: "Filter", + type: "text" + }); +})); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +var objectWithoutProperties = __webpack_require__(2); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/clsx/1.1.1/node_modules/clsx/dist/clsx.m.js +var clsx_m = __webpack_require__(3); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/styles/withStyles.js + 2 modules +var withStyles = __webpack_require__(6); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/styles/colorManipulator.js +var colorManipulator = __webpack_require__(12); -function ExplorerCategoryItem(props) { - var classes = useExplorerCategoryStyles(); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useForkRef.js +var useForkRef = __webpack_require__(11); - if (!props.data.nodeId) { - props.data.nodeId = cuid_default()(); - } +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useEventCallback.js +var useEventCallback = __webpack_require__(10); - return React.createElement(esm_TreeItem_TreeItem, { - className: "explorer-tree__group", - classes: { - label: classes.label, - labelContainer: classes.labelContainer, - iconContainer: classes.iconContainer, - selected: classes.selected - }, - nodeId: props.data.nodeId, - label: props.title - }, props.data.map(function (explorerTarget, i) { - return React.createElement(ExplorerItem, { - key: i, - data: explorerTarget - }); - })); -} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/Link/Link.js +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js +var useIsFocusVisible = __webpack_require__(15); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules +var toConsumableArray = __webpack_require__(17); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +var assertThisInitialized = __webpack_require__(21); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +var inheritsLoose = __webpack_require__(13); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-transition-group/4.4.1_react-dom@16.14.0+react@16.14.0/node_modules/react-transition-group/esm/TransitionGroupContext.js +/* harmony default export */ var TransitionGroupContext = (external_React_default.a.createContext(null)); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-transition-group/4.4.1_react-dom@16.14.0+react@16.14.0/node_modules/react-transition-group/esm/utils/ChildMapping.js +/** + * Given `this.props.children`, return an object mapping key to child. + * + * @param {*} children `this.props.children` + * @return {object} Mapping of key to child + */ +function getChildMapping(children, mapFn) { + var mapper = function mapper(child) { + return mapFn && Object(external_React_["isValidElement"])(child) ? mapFn(child) : child; + }; + var result = Object.create(null); + if (children) external_React_["Children"].map(children, function (c) { + return c; + }).forEach(function (child) { + // run the map function here instead so that the key is the computed one + result[child.key] = mapper(child); + }); + return result; +} +/** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ +function mergeChildMappings(prev, next) { + prev = prev || {}; + next = next || {}; + function getValueForKey(key) { + return key in next ? next[key] : prev[key]; + } // For each key of `next`, the list of keys to insert before that key in + // the combined list -var Link_styles = { - /* Styles applied to the root element. */ - root: {}, - /* Styles applied to the root element if `underline="none"`. */ - underlineNone: { - textDecoration: 'none' - }, + var nextKeysPending = Object.create(null); + var pendingKeys = []; - /* Styles applied to the root element if `underline="hover"`. */ - underlineHover: { - textDecoration: 'none', - '&:hover': { - textDecoration: 'underline' + for (var prevKey in prev) { + if (prevKey in next) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); } - }, - - /* Styles applied to the root element if `underline="always"`. */ - underlineAlways: { - textDecoration: 'underline' - }, - // Same reset as ButtonBase.root + } - /* Styles applied to the root element if `component="button"`. */ - button: { - position: 'relative', - WebkitTapHighlightColor: 'transparent', - backgroundColor: 'transparent', - // Reset default value - // We disable the focus ring for mouse, touch and keyboard users. - outline: 0, - border: 0, - margin: 0, - // Remove the margin in Safari - borderRadius: 0, - padding: 0, - // Remove the padding in Firefox - cursor: 'pointer', - userSelect: 'none', - verticalAlign: 'middle', - '-moz-appearance': 'none', - // Reset - '-webkit-appearance': 'none', - // Reset - '&::-moz-focus-inner': { - borderStyle: 'none' // Remove Firefox dotted outline. + var i; + var childMapping = {}; - }, - '&$focusVisible': { - outline: 'auto' + for (var nextKey in next) { + if (nextKeysPending[nextKey]) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } } - }, - /* Pseudo-class applied to the root element if the link is keyboard focused. */ - focusVisible: {} -}; -var Link_Link = /*#__PURE__*/external_React_["forwardRef"](function Link(props, ref) { - var classes = props.classes, - className = props.className, - _props$color = props.color, - color = _props$color === void 0 ? 'primary' : _props$color, - _props$component = props.component, - component = _props$component === void 0 ? 'a' : _props$component, - onBlur = props.onBlur, - onFocus = props.onFocus, - TypographyClasses = props.TypographyClasses, - _props$underline = props.underline, - underline = _props$underline === void 0 ? 'hover' : _props$underline, - _props$variant = props.variant, - variant = _props$variant === void 0 ? 'inherit' : _props$variant, - other = Object(objectWithoutProperties["a" /* default */])(props, ["classes", "className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant"]); + childMapping[nextKey] = getValueForKey(nextKey); + } // Finally, add the keys which didn't appear before any key in `next` - var _useIsFocusVisible = Object(useIsFocusVisible["a" /* default */])(), - isFocusVisible = _useIsFocusVisible.isFocusVisible, - onBlurVisible = _useIsFocusVisible.onBlurVisible, - focusVisibleRef = _useIsFocusVisible.ref; - var _React$useState = external_React_["useState"](false), - focusVisible = _React$useState[0], - setFocusVisible = _React$useState[1]; + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } - var handlerRef = Object(useForkRef["a" /* default */])(ref, focusVisibleRef); + return childMapping; +} - var handleBlur = function handleBlur(event) { - if (focusVisible) { - onBlurVisible(); - setFocusVisible(false); - } +function getProp(child, prop, props) { + return props[prop] != null ? props[prop] : child.props[prop]; +} - if (onBlur) { - onBlur(event); - } - }; +function getInitialChildMapping(props, onExited) { + return getChildMapping(props.children, function (child) { + return Object(external_React_["cloneElement"])(child, { + onExited: onExited.bind(null, child), + in: true, + appear: getProp(child, 'appear', props), + enter: getProp(child, 'enter', props), + exit: getProp(child, 'exit', props) + }); + }); +} +function getNextChildMapping(nextProps, prevChildMapping, onExited) { + var nextChildMapping = getChildMapping(nextProps.children); + var children = mergeChildMappings(prevChildMapping, nextChildMapping); + Object.keys(children).forEach(function (key) { + var child = children[key]; + if (!Object(external_React_["isValidElement"])(child)) return; + var hasPrev = (key in prevChildMapping); + var hasNext = (key in nextChildMapping); + var prevChild = prevChildMapping[key]; + var isLeaving = Object(external_React_["isValidElement"])(prevChild) && !prevChild.props.in; // item is new (entering) - var handleFocus = function handleFocus(event) { - if (isFocusVisible(event)) { - setFocusVisible(true); + if (hasNext && (!hasPrev || isLeaving)) { + // console.log('entering', key) + children[key] = Object(external_React_["cloneElement"])(child, { + onExited: onExited.bind(null, child), + in: true, + exit: getProp(child, 'exit', nextProps), + enter: getProp(child, 'enter', nextProps) + }); + } else if (!hasNext && hasPrev && !isLeaving) { + // item is old (exiting) + // console.log('leaving', key) + children[key] = Object(external_React_["cloneElement"])(child, { + in: false + }); + } else if (hasNext && hasPrev && Object(external_React_["isValidElement"])(prevChild)) { + // item hasn't changed transition states + // copy over the last transition props; + // console.log('unchanged', key) + children[key] = Object(external_React_["cloneElement"])(child, { + onExited: onExited.bind(null, child), + in: prevChild.props.in, + exit: getProp(child, 'exit', nextProps), + enter: getProp(child, 'enter', nextProps) + }); } + }); + return children; +} +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-transition-group/4.4.1_react-dom@16.14.0+react@16.14.0/node_modules/react-transition-group/esm/TransitionGroup.js - if (onFocus) { - onFocus(event); - } - }; - return /*#__PURE__*/external_React_["createElement"](esm_Typography_Typography, Object(esm_extends["a" /* default */])({ - className: Object(clsx_m["a" /* default */])(classes.root, classes["underline".concat(Object(capitalize["a" /* default */])(underline))], className, focusVisible && classes.focusVisible, component === 'button' && classes.button), - classes: TypographyClasses, - color: color, - component: component, - onBlur: handleBlur, - onFocus: handleFocus, - ref: handlerRef, - variant: variant - }, other)); -}); - false ? undefined : void 0; -/* harmony default export */ var esm_Link_Link = (Object(withStyles["a" /* default */])(Link_styles, { - name: 'MuiLink' -})(Link_Link)); -// CONCATENATED MODULE: ./src/app/components/Explorer/ExplorerItem.js -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } -function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } +var values = Object.values || function (obj) { + return Object.keys(obj).map(function (k) { + return obj[k]; + }); +}; +var defaultProps = { + component: 'div', + childFactory: function childFactory(child) { + return child; + } +}; +/** + * The `` component manages a set of transition components + * (`` and ``) in a list. Like with the transition + * components, `` is a state machine for managing the mounting + * and unmounting of components over time. + * + * Consider the example below. As items are removed or added to the TodoList the + * `in` prop is toggled automatically by the ``. + * + * Note that `` does not define any animation behavior! + * Exactly _how_ a list item animates is up to the individual transition + * component. This means you can mix and match animations across different list + * items. + */ +var TransitionGroup_TransitionGroup = /*#__PURE__*/function (_React$Component) { + Object(inheritsLoose["a" /* default */])(TransitionGroup, _React$Component); + function TransitionGroup(props, context) { + var _this; -function ExplorerItem(props) { - if (!props.data.nodeId) { - props.data.nodeId = cuid_default()(); - } + _this = _React$Component.call(this, props, context) || this; - var classesItem = useExplorerStyles(); - var classesCategory = useExplorerCategoryStyles(); - var targetChildren = []; - var i = 0; + var handleExited = _this.handleExited.bind(Object(assertThisInitialized["a" /* default */])(_this)); // Initial children should all be entering, dependent on appear - for (var _i = 0, _Object$entries = Object.entries(props.data.children || {}); _i < _Object$entries.length; _i++) { - var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), - key = _Object$entries$_i[0], - value = _Object$entries$_i[1]; - targetChildren.push(Array.isArray(value) ? React.createElement(ExplorerCategoryItem, { - key: i, - title: key, - data: value - }) : React.createElement(ExplorerItem, { - key: i, - data: value - })); - i++; + _this.state = { + contextValue: { + isMounting: true + }, + handleExited: handleExited, + firstRender: true + }; + return _this; } - var classes = i > 0 ? classesCategory : classesItem; - return React.createElement(esm_TreeItem_TreeItem, { - className: "explorer-tree__target", - classes: { - label: classes.label, - iconContainer: classes.iconContainer, - selected: classes.selected - }, - nodeId: props.data.nodeId, - label: props.data.page ? React.createElement(esm_Link_Link, { - classes: { - root: classes.labelLinks - }, - href: props.data.page, - underline: "hover" - }, props.data.title) : props.data.title - }, targetChildren); -} -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useControlled.js -var useControlled = __webpack_require__(34); + var _proto = TransitionGroup.prototype; -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/lab/4.0.0-alpha.57_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/lab/esm/TreeView/TreeView.js + _proto.componentDidMount = function componentDidMount() { + this.mounted = true; + this.setState({ + contextValue: { + isMounting: false + } + }); + }; + _proto.componentWillUnmount = function componentWillUnmount() { + this.mounted = false; + }; + TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) { + var prevChildMapping = _ref.children, + handleExited = _ref.handleExited, + firstRender = _ref.firstRender; + return { + children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited), + firstRender: false + }; + } // node is `undefined` when user provided `nodeRef` prop + ; + _proto.handleExited = function handleExited(child, node) { + var currentChildMapping = getChildMapping(this.props.children); + if (child.key in currentChildMapping) return; + if (child.props.onExited) { + child.props.onExited(node); + } + if (this.mounted) { + this.setState(function (state) { + var children = Object(esm_extends["a" /* default */])({}, state.children); + delete children[child.key]; + return { + children: children + }; + }); + } + }; + _proto.render = function render() { + var _this$props = this.props, + Component = _this$props.component, + childFactory = _this$props.childFactory, + props = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props, ["component", "childFactory"]); + var contextValue = this.state.contextValue; + var children = values(this.state.children).map(childFactory); + delete props.appear; + delete props.enter; + delete props.exit; -var TreeView_styles = { - /* Styles applied to the root element. */ - root: { - padding: 0, - margin: 0, - listStyle: 'none' - } -}; + if (Component === null) { + return /*#__PURE__*/external_React_default.a.createElement(TransitionGroupContext.Provider, { + value: contextValue + }, children); + } -function arrayDiff(arr1, arr2) { - if (arr1.length !== arr2.length) return true; + return /*#__PURE__*/external_React_default.a.createElement(TransitionGroupContext.Provider, { + value: contextValue + }, /*#__PURE__*/external_React_default.a.createElement(Component, props, children)); + }; - for (var i = 0; i < arr1.length; i += 1) { - if (arr1[i] !== arr2[i]) return true; - } + return TransitionGroup; +}(external_React_default.a.Component); - return false; -} +TransitionGroup_TransitionGroup.propTypes = false ? undefined : {}; +TransitionGroup_TransitionGroup.defaultProps = defaultProps; +/* harmony default export */ var esm_TransitionGroup = (TransitionGroup_TransitionGroup); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/ButtonBase/Ripple.js -var findNextFirstChar = function findNextFirstChar(firstChars, startIndex, char) { - for (var i = startIndex; i < firstChars.length; i += 1) { - if (char === firstChars[i]) { - return i; - } - } - return -1; -}; -var defaultExpandedDefault = []; -var defaultSelectedDefault = []; -var TreeView_TreeView = /*#__PURE__*/external_React_["forwardRef"](function TreeView(props, ref) { - var children = props.children, - classes = props.classes, - className = props.className, - defaultCollapseIcon = props.defaultCollapseIcon, - defaultEndIcon = props.defaultEndIcon, - _props$defaultExpande = props.defaultExpanded, - defaultExpanded = _props$defaultExpande === void 0 ? defaultExpandedDefault : _props$defaultExpande, - defaultExpandIcon = props.defaultExpandIcon, - defaultParentIcon = props.defaultParentIcon, - _props$defaultSelecte = props.defaultSelected, - defaultSelected = _props$defaultSelecte === void 0 ? defaultSelectedDefault : _props$defaultSelecte, - _props$disableSelecti = props.disableSelection, - disableSelection = _props$disableSelecti === void 0 ? false : _props$disableSelecti, - _props$multiSelect = props.multiSelect, - multiSelect = _props$multiSelect === void 0 ? false : _props$multiSelect, - expandedProp = props.expanded, - onNodeSelect = props.onNodeSelect, - onNodeToggle = props.onNodeToggle, - selectedProp = props.selected, - other = Object(objectWithoutProperties["a" /* default */])(props, ["children", "classes", "className", "defaultCollapseIcon", "defaultEndIcon", "defaultExpanded", "defaultExpandIcon", "defaultParentIcon", "defaultSelected", "disableSelection", "multiSelect", "expanded", "onNodeSelect", "onNodeToggle", "selected"]); - var _React$useState = external_React_["useState"](null), - tabbable = _React$useState[0], - setTabbable = _React$useState[1]; +var useEnhancedEffect = typeof window === 'undefined' ? external_React_["useEffect"] : external_React_["useLayoutEffect"]; +/** + * @ignore - internal component. + */ - var _React$useState2 = external_React_["useState"](null), - focusedNodeId = _React$useState2[0], - setFocusedNodeId = _React$useState2[1]; +function Ripple(props) { + var classes = props.classes, + _props$pulsate = props.pulsate, + pulsate = _props$pulsate === void 0 ? false : _props$pulsate, + rippleX = props.rippleX, + rippleY = props.rippleY, + rippleSize = props.rippleSize, + inProp = props.in, + _props$onExited = props.onExited, + onExited = _props$onExited === void 0 ? function () {} : _props$onExited, + timeout = props.timeout; - var nodeMap = external_React_["useRef"]({}); - var firstCharMap = external_React_["useRef"]({}); - var visibleNodes = external_React_["useRef"]([]); + var _React$useState = external_React_["useState"](false), + leaving = _React$useState[0], + setLeaving = _React$useState[1]; - var _useControlled = Object(useControlled["a" /* default */])({ - controlled: expandedProp, - default: defaultExpanded, - name: 'TreeView', - state: 'expanded' - }), - _useControlled2 = Object(slicedToArray["a" /* default */])(_useControlled, 2), - expanded = _useControlled2[0], - setExpandedState = _useControlled2[1]; + var rippleClassName = Object(clsx_m["a" /* default */])(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate); + var rippleStyles = { + width: rippleSize, + height: rippleSize, + top: -(rippleSize / 2) + rippleY, + left: -(rippleSize / 2) + rippleX + }; + var childClassName = Object(clsx_m["a" /* default */])(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate); + var handleExited = Object(useEventCallback["a" /* default */])(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority - var _useControlled3 = Object(useControlled["a" /* default */])({ - controlled: selectedProp, - default: defaultSelected, - name: 'TreeView', - state: 'selected' - }), - _useControlled4 = Object(slicedToArray["a" /* default */])(_useControlled3, 2), - selected = _useControlled4[0], - setSelectedState = _useControlled4[1]; - /* - * Status Helpers - */ + useEnhancedEffect(function () { + if (!inProp) { + // react-transition-group#onExit + setLeaving(true); // react-transition-group#onExited + var timeoutId = setTimeout(handleExited, timeout); + return function () { + clearTimeout(timeoutId); + }; + } - var isExpanded = external_React_["useCallback"](function (id) { - return Array.isArray(expanded) ? expanded.indexOf(id) !== -1 : false; - }, [expanded]); - var isSelected = external_React_["useCallback"](function (id) { - return Array.isArray(selected) ? selected.indexOf(id) !== -1 : selected === id; - }, [selected]); + return undefined; + }, [handleExited, inProp, timeout]); + return /*#__PURE__*/external_React_["createElement"]("span", { + className: rippleClassName, + style: rippleStyles + }, /*#__PURE__*/external_React_["createElement"]("span", { + className: childClassName + })); +} - var isTabbable = function isTabbable(id) { - return tabbable === id; - }; + false ? undefined : void 0; +/* harmony default export */ var ButtonBase_Ripple = (Ripple); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js - var isFocused = function isFocused(id) { - return focusedNodeId === id; - }; - /* - * Node Helpers - */ - var getNextNode = function getNextNode(id) { - var nodeIndex = visibleNodes.current.indexOf(id); - if (nodeIndex !== -1 && nodeIndex + 1 < visibleNodes.current.length) { - return visibleNodes.current[nodeIndex + 1]; - } - return null; - }; - var getPreviousNode = function getPreviousNode(id) { - var nodeIndex = visibleNodes.current.indexOf(id); - if (nodeIndex !== -1 && nodeIndex - 1 >= 0) { - return visibleNodes.current[nodeIndex - 1]; - } - return null; - }; - var getLastNode = function getLastNode() { - return visibleNodes.current[visibleNodes.current.length - 1]; - }; +var DURATION = 550; +var DELAY_RIPPLE = 80; +var TouchRipple_styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + overflow: 'hidden', + pointerEvents: 'none', + position: 'absolute', + zIndex: 0, + top: 0, + right: 0, + bottom: 0, + left: 0, + borderRadius: 'inherit' + }, - var getFirstNode = function getFirstNode() { - return visibleNodes.current[0]; - }; + /* Styles applied to the internal `Ripple` components `ripple` class. */ + ripple: { + opacity: 0, + position: 'absolute' + }, - var getParent = function getParent(id) { - return nodeMap.current[id].parent; - }; + /* Styles applied to the internal `Ripple` components `rippleVisible` class. */ + rippleVisible: { + opacity: 0.3, + transform: 'scale(1)', + animation: "$enter ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut) + }, - var getNodesInRange = function getNodesInRange(a, b) { - var aIndex = visibleNodes.current.indexOf(a); - var bIndex = visibleNodes.current.indexOf(b); - var start = Math.min(aIndex, bIndex); - var end = Math.max(aIndex, bIndex); - return visibleNodes.current.slice(start, end + 1); - }; - /* - * Focus Helpers - */ + /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */ + ripplePulsate: { + animationDuration: "".concat(theme.transitions.duration.shorter, "ms") + }, + + /* Styles applied to the internal `Ripple` components `child` class. */ + child: { + opacity: 1, + display: 'block', + width: '100%', + height: '100%', + borderRadius: '50%', + backgroundColor: 'currentColor' + }, + /* Styles applied to the internal `Ripple` components `childLeaving` class. */ + childLeaving: { + opacity: 0, + animation: "$exit ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut) + }, - var focus = function focus(id) { - if (id) { - setTabbable(id); - setFocusedNodeId(id); + /* Styles applied to the internal `Ripple` components `childPulsate` class. */ + childPulsate: { + position: 'absolute', + left: 0, + top: 0, + animation: "$pulsate 2500ms ".concat(theme.transitions.easing.easeInOut, " 200ms infinite") + }, + '@keyframes enter': { + '0%': { + transform: 'scale(0)', + opacity: 0.1 + }, + '100%': { + transform: 'scale(1)', + opacity: 0.3 + } + }, + '@keyframes exit': { + '0%': { + opacity: 1 + }, + '100%': { + opacity: 0 + } + }, + '@keyframes pulsate': { + '0%': { + transform: 'scale(1)' + }, + '50%': { + transform: 'scale(0.92)' + }, + '100%': { + transform: 'scale(1)' + } } }; +}; +/** + * @ignore - internal component. + * + * TODO v5: Make private + */ - var focusNextNode = function focusNextNode(id) { - return focus(getNextNode(id)); - }; +var TouchRipple_TouchRipple = /*#__PURE__*/external_React_["forwardRef"](function TouchRipple(props, ref) { + var _props$center = props.center, + centerProp = _props$center === void 0 ? false : _props$center, + classes = props.classes, + className = props.className, + other = Object(objectWithoutProperties["a" /* default */])(props, ["center", "classes", "className"]); - var focusPreviousNode = function focusPreviousNode(id) { - return focus(getPreviousNode(id)); - }; + var _React$useState = external_React_["useState"]([]), + ripples = _React$useState[0], + setRipples = _React$useState[1]; - var focusFirstNode = function focusFirstNode() { - return focus(getFirstNode()); - }; + var nextKey = external_React_["useRef"](0); + var rippleCallback = external_React_["useRef"](null); + external_React_["useEffect"](function () { + if (rippleCallback.current) { + rippleCallback.current(); + rippleCallback.current = null; + } + }, [ripples]); // Used to filter out mouse emulated events on mobile. - var focusLastNode = function focusLastNode() { - return focus(getLastNode()); - }; - - var focusByFirstCharacter = function focusByFirstCharacter(id, char) { - var start; - var index; - var lowercaseChar = char.toLowerCase(); - var firstCharIds = []; - var firstChars = []; // This really only works since the ids are strings - - Object.keys(firstCharMap.current).forEach(function (nodeId) { - var firstChar = firstCharMap.current[nodeId]; - var map = nodeMap.current[nodeId]; - var visible = map.parent ? isExpanded(map.parent) : true; + var ignoringMouseDown = external_React_["useRef"](false); // We use a timer in order to only show the ripples for touch "click" like events. + // We don't want to display the ripple for touch scroll events. - if (visible) { - firstCharIds.push(nodeId); - firstChars.push(firstChar); - } - }); // Get start index for search based on position of currentItem + var startTimer = external_React_["useRef"](null); // This is the hook called once the previous timeout is ready. - start = firstCharIds.indexOf(id) + 1; + var startTimerCommit = external_React_["useRef"](null); + var container = external_React_["useRef"](null); + external_React_["useEffect"](function () { + return function () { + clearTimeout(startTimer.current); + }; + }, []); + var startCommit = external_React_["useCallback"](function (params) { + var pulsate = params.pulsate, + rippleX = params.rippleX, + rippleY = params.rippleY, + rippleSize = params.rippleSize, + cb = params.cb; + setRipples(function (oldRipples) { + return [].concat(Object(toConsumableArray["a" /* default */])(oldRipples), [/*#__PURE__*/external_React_["createElement"](ButtonBase_Ripple, { + key: nextKey.current, + classes: classes, + timeout: DURATION, + pulsate: pulsate, + rippleX: rippleX, + rippleY: rippleY, + rippleSize: rippleSize + })]); + }); + nextKey.current += 1; + rippleCallback.current = cb; + }, [classes]); + var start = external_React_["useCallback"](function () { + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var cb = arguments.length > 2 ? arguments[2] : undefined; + var _options$pulsate = options.pulsate, + pulsate = _options$pulsate === void 0 ? false : _options$pulsate, + _options$center = options.center, + center = _options$center === void 0 ? centerProp || options.pulsate : _options$center, + _options$fakeElement = options.fakeElement, + fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement; - if (start === nodeMap.current.length) { - start = 0; - } // Check remaining slots in the menu + if (event.type === 'mousedown' && ignoringMouseDown.current) { + ignoringMouseDown.current = false; + return; + } + if (event.type === 'touchstart') { + ignoringMouseDown.current = true; + } - index = findNextFirstChar(firstChars, start, lowercaseChar); // If not found in remaining slots, check from beginning + var element = fakeElement ? null : container.current; + var rect = element ? element.getBoundingClientRect() : { + width: 0, + height: 0, + left: 0, + top: 0 + }; // Get the size of the ripple - if (index === -1) { - index = findNextFirstChar(firstChars, 0, lowercaseChar); - } // If match was found... + var rippleX; + var rippleY; + var rippleSize; + if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) { + rippleX = Math.round(rect.width / 2); + rippleY = Math.round(rect.height / 2); + } else { + var _ref = event.touches ? event.touches[0] : event, + clientX = _ref.clientX, + clientY = _ref.clientY; - if (index > -1) { - focus(firstCharIds[index]); + rippleX = Math.round(clientX - rect.left); + rippleY = Math.round(clientY - rect.top); } - }; - /* - * Expansion Helpers - */ + if (center) { + rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even. - var toggleExpansion = function toggleExpansion(event) { - var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : focusedNodeId; - var newExpanded; + if (rippleSize % 2 === 0) { + rippleSize += 1; + } + } else { + var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2; + var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2; + rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2)); + } // Touche devices - if (expanded.indexOf(value) !== -1) { - newExpanded = expanded.filter(function (id) { - return id !== value; - }); - setTabbable(function (oldTabbable) { - var map = nodeMap.current[oldTabbable]; - if (oldTabbable && (map && map.parent ? map.parent.id : null) === value) { - return value; - } + if (event.touches) { + // check that this isn't another touchstart due to multitouch + // otherwise we will only clear a single timer when unmounting while two + // are running + if (startTimerCommit.current === null) { + // Prepare the ripple effect. + startTimerCommit.current = function () { + startCommit({ + pulsate: pulsate, + rippleX: rippleX, + rippleY: rippleY, + rippleSize: rippleSize, + cb: cb + }); + }; // Delay the execution of the ripple effect. - return oldTabbable; - }); + + startTimer.current = setTimeout(function () { + if (startTimerCommit.current) { + startTimerCommit.current(); + startTimerCommit.current = null; + } + }, DELAY_RIPPLE); // We have to make a tradeoff with this value. + } } else { - newExpanded = [value].concat(expanded); + startCommit({ + pulsate: pulsate, + rippleX: rippleX, + rippleY: rippleY, + rippleSize: rippleSize, + cb: cb + }); } + }, [centerProp, startCommit]); + var pulsate = external_React_["useCallback"](function () { + start({}, { + pulsate: true + }); + }, [start]); + var stop = external_React_["useCallback"](function (event, cb) { + clearTimeout(startTimer.current); // The touch interaction occurs too quickly. + // We still want to show ripple effect. - if (onNodeToggle) { - onNodeToggle(event, newExpanded); + if (event.type === 'touchend' && startTimerCommit.current) { + event.persist(); + startTimerCommit.current(); + startTimerCommit.current = null; + startTimer.current = setTimeout(function () { + stop(event, cb); + }); + return; } - setExpandedState(newExpanded); - }; + startTimerCommit.current = null; + setRipples(function (oldRipples) { + if (oldRipples.length > 0) { + return oldRipples.slice(1); + } - var expandAllSiblings = function expandAllSiblings(event, id) { - var map = nodeMap.current[id]; - var parent = nodeMap.current[map.parent]; - var diff; + return oldRipples; + }); + rippleCallback.current = cb; + }, []); + external_React_["useImperativeHandle"](ref, function () { + return { + pulsate: pulsate, + start: start, + stop: stop + }; + }, [pulsate, start, stop]); + return /*#__PURE__*/external_React_["createElement"]("span", Object(esm_extends["a" /* default */])({ + className: Object(clsx_m["a" /* default */])(classes.root, className), + ref: container + }, other), /*#__PURE__*/external_React_["createElement"](esm_TransitionGroup, { + component: null, + exit: true + }, ripples)); +}); + false ? undefined : void 0; +/* harmony default export */ var ButtonBase_TouchRipple = (Object(withStyles["a" /* default */])(TouchRipple_styles, { + flip: false, + name: 'MuiTouchRipple' +})( /*#__PURE__*/external_React_["memo"](TouchRipple_TouchRipple))); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js - if (parent) { - diff = parent.children.filter(function (child) { - return !isExpanded(child); - }); - } else { - var topLevelNodes = nodeMap.current[-1].children; - diff = topLevelNodes.filter(function (node) { - return !isExpanded(node); - }); - } - var newExpanded = expanded.concat(diff); - if (diff.length > 0) { - setExpandedState(newExpanded); - if (onNodeToggle) { - onNodeToggle(event, newExpanded); - } - } - }; - /* - * Selection Helpers - */ - var lastSelectedNode = external_React_["useRef"](null); - var lastSelectionWasRange = external_React_["useRef"](false); - var currentRangeSelection = external_React_["useRef"]([]); - var handleRangeArrowSelect = function handleRangeArrowSelect(event, nodes) { - var base = selected; - var start = nodes.start, - next = nodes.next, - current = nodes.current; - if (!next || !current) { - return; - } - if (currentRangeSelection.current.indexOf(current) === -1) { - currentRangeSelection.current = []; - } - if (lastSelectionWasRange.current) { - if (currentRangeSelection.current.indexOf(next) !== -1) { - base = base.filter(function (id) { - return id === start || id !== current; - }); - currentRangeSelection.current = currentRangeSelection.current.filter(function (id) { - return id === start || id !== current; - }); - } else { - base.push(next); - currentRangeSelection.current.push(next); - } - } else { - base.push(next); - currentRangeSelection.current.push(current, next); - } - - if (onNodeSelect) { - onNodeSelect(event, base); - } - setSelectedState(base); - }; - var handleRangeSelect = function handleRangeSelect(event, nodes) { - var base = selected; - var start = nodes.start, - end = nodes.end; // If last selection was a range selection ignore nodes that were selected. +var ButtonBase_styles = { + /* Styles applied to the root element. */ + root: { + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + position: 'relative', + WebkitTapHighlightColor: 'transparent', + backgroundColor: 'transparent', + // Reset default value + // We disable the focus ring for mouse, touch and keyboard users. + outline: 0, + border: 0, + margin: 0, + // Remove the margin in Safari + borderRadius: 0, + padding: 0, + // Remove the padding in Firefox + cursor: 'pointer', + userSelect: 'none', + verticalAlign: 'middle', + '-moz-appearance': 'none', + // Reset + '-webkit-appearance': 'none', + // Reset + textDecoration: 'none', + // So we take precedent over the style of a native
element. + color: 'inherit', + '&::-moz-focus-inner': { + borderStyle: 'none' // Remove Firefox dotted outline. - if (lastSelectionWasRange.current) { - base = selected.filter(function (id) { - return currentRangeSelection.current.indexOf(id) === -1; - }); + }, + '&$disabled': { + pointerEvents: 'none', + // Disable link interactions + cursor: 'default' + }, + '@media print': { + colorAdjust: 'exact' } + }, - var range = getNodesInRange(start, end); - currentRangeSelection.current = range; - var newSelected = base.concat(range); - newSelected = newSelected.filter(function (id, i) { - return newSelected.indexOf(id) === i; - }); + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, - if (onNodeSelect) { - onNodeSelect(event, newSelected); - } + /* Pseudo-class applied to the root element if keyboard focused. */ + focusVisible: {} +}; +/** + * `ButtonBase` contains as few styles as possible. + * It aims to be a simple building block for creating a button. + * It contains a load of style reset and some focus/ripple logic. + */ - setSelectedState(newSelected); - }; +var ButtonBase_ButtonBase = /*#__PURE__*/external_React_["forwardRef"](function ButtonBase(props, ref) { + var action = props.action, + buttonRefProp = props.buttonRef, + _props$centerRipple = props.centerRipple, + centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple, + children = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + component = _props$component === void 0 ? 'button' : _props$component, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$disableRipple = props.disableRipple, + disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple, + _props$disableTouchRi = props.disableTouchRipple, + disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi, + _props$focusRipple = props.focusRipple, + focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple, + focusVisibleClassName = props.focusVisibleClassName, + onBlur = props.onBlur, + onClick = props.onClick, + onFocus = props.onFocus, + onFocusVisible = props.onFocusVisible, + onKeyDown = props.onKeyDown, + onKeyUp = props.onKeyUp, + onMouseDown = props.onMouseDown, + onMouseLeave = props.onMouseLeave, + onMouseUp = props.onMouseUp, + onTouchEnd = props.onTouchEnd, + onTouchMove = props.onTouchMove, + onTouchStart = props.onTouchStart, + onDragLeave = props.onDragLeave, + _props$tabIndex = props.tabIndex, + tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, + TouchRippleProps = props.TouchRippleProps, + _props$type = props.type, + type = _props$type === void 0 ? 'button' : _props$type, + other = Object(objectWithoutProperties["a" /* default */])(props, ["action", "buttonRef", "centerRipple", "children", "classes", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "onBlur", "onClick", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "onDragLeave", "tabIndex", "TouchRippleProps", "type"]); - var handleMultipleSelect = function handleMultipleSelect(event, value) { - var newSelected = []; + var buttonRef = external_React_["useRef"](null); - if (selected.indexOf(value) !== -1) { - newSelected = selected.filter(function (id) { - return id !== value; - }); - } else { - newSelected = [value].concat(selected); - } + function getButtonNode() { + // #StrictMode ready + return external_ReactDOM_["findDOMNode"](buttonRef.current); + } - if (onNodeSelect) { - onNodeSelect(event, newSelected); - } + var rippleRef = external_React_["useRef"](null); - setSelectedState(newSelected); - }; + var _React$useState = external_React_["useState"](false), + focusVisible = _React$useState[0], + setFocusVisible = _React$useState[1]; - var handleSingleSelect = function handleSingleSelect(event, value) { - var newSelected = multiSelect ? [value] : value; + if (disabled && focusVisible) { + setFocusVisible(false); + } - if (onNodeSelect) { - onNodeSelect(event, newSelected); + var _useIsFocusVisible = Object(useIsFocusVisible["a" /* default */])(), + isFocusVisible = _useIsFocusVisible.isFocusVisible, + onBlurVisible = _useIsFocusVisible.onBlurVisible, + focusVisibleRef = _useIsFocusVisible.ref; + + external_React_["useImperativeHandle"](action, function () { + return { + focusVisible: function focusVisible() { + setFocusVisible(true); + buttonRef.current.focus(); + } + }; + }, []); + external_React_["useEffect"](function () { + if (focusVisible && focusRipple && !disableRipple) { + rippleRef.current.pulsate(); } + }, [disableRipple, focusRipple, focusVisible]); - setSelectedState(newSelected); - }; + function useRippleHandler(rippleAction, eventCallback) { + var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple; + return Object(useEventCallback["a" /* default */])(function (event) { + if (eventCallback) { + eventCallback(event); + } - var selectNode = function selectNode(event, id) { - var multiple = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var ignore = skipRippleAction; - if (id) { - if (multiple) { - handleMultipleSelect(event, id); - } else { - handleSingleSelect(event, id); + if (!ignore && rippleRef.current) { + rippleRef.current[rippleAction](event); } - lastSelectedNode.current = id; - lastSelectionWasRange.current = false; - currentRangeSelection.current = []; return true; - } - - return false; - }; - - var selectRange = function selectRange(event, nodes) { - var stacked = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - var _nodes$start = nodes.start, - start = _nodes$start === void 0 ? lastSelectedNode.current : _nodes$start, - end = nodes.end, - current = nodes.current; + }); + } - if (stacked) { - handleRangeArrowSelect(event, { - start: start, - next: end, - current: current - }); - } else { - handleRangeSelect(event, { - start: start, - end: end - }); + var handleMouseDown = useRippleHandler('start', onMouseDown); + var handleDragLeave = useRippleHandler('stop', onDragLeave); + var handleMouseUp = useRippleHandler('stop', onMouseUp); + var handleMouseLeave = useRippleHandler('stop', function (event) { + if (focusVisible) { + event.preventDefault(); } - lastSelectionWasRange.current = true; - return true; - }; + if (onMouseLeave) { + onMouseLeave(event); + } + }); + var handleTouchStart = useRippleHandler('start', onTouchStart); + var handleTouchEnd = useRippleHandler('stop', onTouchEnd); + var handleTouchMove = useRippleHandler('stop', onTouchMove); + var handleBlur = useRippleHandler('stop', function (event) { + if (focusVisible) { + onBlurVisible(event); + setFocusVisible(false); + } - var rangeSelectToFirst = function rangeSelectToFirst(event, id) { - if (!lastSelectedNode.current) { - lastSelectedNode.current = id; + if (onBlur) { + onBlur(event); + } + }, false); + var handleFocus = Object(useEventCallback["a" /* default */])(function (event) { + // Fix for https://github.com/facebook/react/issues/7769 + if (!buttonRef.current) { + buttonRef.current = event.currentTarget; } - var start = lastSelectionWasRange.current ? lastSelectedNode.current : id; - return selectRange(event, { - start: start, - end: getFirstNode() - }); - }; + if (isFocusVisible(event)) { + setFocusVisible(true); - var rangeSelectToLast = function rangeSelectToLast(event, id) { - if (!lastSelectedNode.current) { - lastSelectedNode.current = id; + if (onFocusVisible) { + onFocusVisible(event); + } } - var start = lastSelectionWasRange.current ? lastSelectedNode.current : id; - return selectRange(event, { - start: start, - end: getLastNode() - }); - }; - - var selectNextNode = function selectNextNode(event, id) { - return selectRange(event, { - end: getNextNode(id), - current: id - }, true); - }; - - var selectPreviousNode = function selectPreviousNode(event, id) { - return selectRange(event, { - end: getPreviousNode(id), - current: id - }, true); - }; + if (onFocus) { + onFocus(event); + } + }); - var selectAllNodes = function selectAllNodes(event) { - return selectRange(event, { - start: getFirstNode(), - end: getLastNode() - }); + var isNonNativeButton = function isNonNativeButton() { + var button = getButtonNode(); + return component && component !== 'button' && !(button.tagName === 'A' && button.href); }; - /* - * Mapping Helpers + /** + * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat */ - var addNodeToNodeMap = function addNodeToNodeMap(id, childrenIds) { - var currentMap = nodeMap.current[id]; - nodeMap.current[id] = Object(esm_extends["a" /* default */])({}, currentMap, { - children: childrenIds, - id: id - }); - childrenIds.forEach(function (childId) { - var currentChildMap = nodeMap.current[childId]; - nodeMap.current[childId] = Object(esm_extends["a" /* default */])({}, currentChildMap, { - parent: id, - id: childId + var keydownRef = external_React_["useRef"](false); + var handleKeyDown = Object(useEventCallback["a" /* default */])(function (event) { + // Check if key is already down to avoid repeats being counted as multiple activations + if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') { + keydownRef.current = true; + event.persist(); + rippleRef.current.stop(event, function () { + rippleRef.current.start(event); }); - }); - }; + } - var getNodesToRemove = external_React_["useCallback"](function (id) { - var map = nodeMap.current[id]; - var nodes = []; + if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') { + event.preventDefault(); + } - if (map) { - nodes.push(id); + if (onKeyDown) { + onKeyDown(event); + } // Keyboard accessibility for non interactive elements - if (map.children) { - nodes.concat(map.children); - map.children.forEach(function (node) { - nodes.concat(getNodesToRemove(node)); - }); - } - } - return nodes; - }, []); - var cleanUpFirstCharMap = external_React_["useCallback"](function (nodes) { - var newMap = Object(esm_extends["a" /* default */])({}, firstCharMap.current); + if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) { + event.preventDefault(); - nodes.forEach(function (node) { - if (newMap[node]) { - delete newMap[node]; + if (onClick) { + onClick(event); } - }); - firstCharMap.current = newMap; - }, []); - var removeNodeFromNodeMap = external_React_["useCallback"](function (id) { - var nodes = getNodesToRemove(id); - cleanUpFirstCharMap(nodes); + } + }); + var handleKeyUp = Object(useEventCallback["a" /* default */])(function (event) { + // calling preventDefault in keyUp on a + *
+ * ); + * } + * ``` + * + * When the button is clicked the component will shift to the `'entering'` state + * and stay there for 500ms (the value of `timeout`) before it finally switches + * to `'entered'`. + * + * When `in` is `false` the same thing happens except the state moves from + * `'exiting'` to `'exited'`. + */ + +var Transition_Transition = /*#__PURE__*/function (_React$Component) { + Object(inheritsLoose["a" /* default */])(Transition, _React$Component); + + function Transition(props, context) { + var _this; + + _this = _React$Component.call(this, props, context) || this; + var parentGroup = context; // In the context of a TransitionGroup all enters are really appears + + var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; + var initialStatus; + _this.appearStatus = null; + + if (props.in) { + if (appear) { + initialStatus = EXITED; + _this.appearStatus = ENTERING; + } else { + initialStatus = ENTERED; + } + } else { + if (props.unmountOnExit || props.mountOnEnter) { + initialStatus = UNMOUNTED; + } else { + initialStatus = EXITED; + } + } + + _this.state = { + status: initialStatus + }; + _this.nextCallback = null; + return _this; + } + + Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { + var nextIn = _ref.in; + + if (nextIn && prevState.status === UNMOUNTED) { + return { + status: EXITED + }; + } + + return null; + } // getSnapshotBeforeUpdate(prevProps) { + // let nextStatus = null + // if (prevProps !== this.props) { + // const { status } = this.state + // if (this.props.in) { + // if (status !== ENTERING && status !== ENTERED) { + // nextStatus = ENTERING + // } + // } else { + // if (status === ENTERING || status === ENTERED) { + // nextStatus = EXITING + // } + // } + // } + // return { nextStatus } + // } + ; + + var _proto = Transition.prototype; + + _proto.componentDidMount = function componentDidMount() { + this.updateStatus(true, this.appearStatus); + }; + + _proto.componentDidUpdate = function componentDidUpdate(prevProps) { + var nextStatus = null; + + if (prevProps !== this.props) { + var status = this.state.status; + + if (this.props.in) { + if (status !== ENTERING && status !== ENTERED) { + nextStatus = ENTERING; + } + } else { + if (status === ENTERING || status === ENTERED) { + nextStatus = EXITING; + } + } + } - var unsubscribeWrapper = function unsubscribeWrapper() { - didUnsubscribe = true; - subscription.tryUnsubscribe(); - subscription.onStateChange = null; + this.updateStatus(false, nextStatus); + }; - if (lastThrownError) { - // It's possible that we caught an error due to a bad mapState function, but the - // parent re-rendered without this component and we're about to unmount. - // This shouldn't happen as long as we do top-down subscriptions correctly, but - // if we ever do those wrong, this throw will surface the error in our tests. - // In that case, throw the error from here so it doesn't get lost. - throw lastThrownError; + _proto.componentWillUnmount = function componentWillUnmount() { + this.cancelNextCallback(); + }; + + _proto.getTimeouts = function getTimeouts() { + var timeout = this.props.timeout; + var exit, enter, appear; + exit = enter = appear = timeout; + + if (timeout != null && typeof timeout !== 'number') { + exit = timeout.exit; + enter = timeout.enter; // TODO: remove fallback for next major + + appear = timeout.appear !== undefined ? timeout.appear : enter; + } + + return { + exit: exit, + enter: enter, + appear: appear + }; + }; + + _proto.updateStatus = function updateStatus(mounting, nextStatus) { + if (mounting === void 0) { + mounting = false; + } + + if (nextStatus !== null) { + // nextStatus will always be ENTERING or EXITING. + this.cancelNextCallback(); + + if (nextStatus === ENTERING) { + this.performEnter(mounting); + } else { + this.performExit(); + } + } else if (this.props.unmountOnExit && this.state.status === EXITED) { + this.setState({ + status: UNMOUNTED + }); + } + }; + + _proto.performEnter = function performEnter(mounting) { + var _this2 = this; + + var enter = this.props.enter; + var appearing = this.context ? this.context.isMounting : mounting; + + var _ref2 = this.props.nodeRef ? [appearing] : [external_ReactDOM_default.a.findDOMNode(this), appearing], + maybeNode = _ref2[0], + maybeAppearing = _ref2[1]; + + var timeouts = this.getTimeouts(); + var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED + // if we are mounting and running this it means appear _must_ be set + + if (!mounting && !enter || config.disabled) { + this.safeSetState({ + status: ENTERED + }, function () { + _this2.props.onEntered(maybeNode); + }); + return; + } + + this.props.onEnter(maybeNode, maybeAppearing); + this.safeSetState({ + status: ENTERING + }, function () { + _this2.props.onEntering(maybeNode, maybeAppearing); + + _this2.onTransitionEnd(enterTimeout, function () { + _this2.safeSetState({ + status: ENTERED + }, function () { + _this2.props.onEntered(maybeNode, maybeAppearing); + }); + }); + }); + }; + + _proto.performExit = function performExit() { + var _this3 = this; + + var exit = this.props.exit; + var timeouts = this.getTimeouts(); + var maybeNode = this.props.nodeRef ? undefined : external_ReactDOM_default.a.findDOMNode(this); // no exit animation skip right to EXITED + + if (!exit || config.disabled) { + this.safeSetState({ + status: EXITED + }, function () { + _this3.props.onExited(maybeNode); + }); + return; + } + + this.props.onExit(maybeNode); + this.safeSetState({ + status: EXITING + }, function () { + _this3.props.onExiting(maybeNode); + + _this3.onTransitionEnd(timeouts.exit, function () { + _this3.safeSetState({ + status: EXITED + }, function () { + _this3.props.onExited(maybeNode); + }); + }); + }); + }; + + _proto.cancelNextCallback = function cancelNextCallback() { + if (this.nextCallback !== null) { + this.nextCallback.cancel(); + this.nextCallback = null; + } + }; + + _proto.safeSetState = function safeSetState(nextState, callback) { + // This shouldn't be necessary, but there are weird race conditions with + // setState callbacks and unmounting in testing, so always make sure that + // we can cancel any pending setState callbacks after we unmount. + callback = this.setNextCallback(callback); + this.setState(nextState, callback); + }; + + _proto.setNextCallback = function setNextCallback(callback) { + var _this4 = this; + + var active = true; + + this.nextCallback = function (event) { + if (active) { + active = false; + _this4.nextCallback = null; + callback(event); + } + }; + + this.nextCallback.cancel = function () { + active = false; + }; + + return this.nextCallback; + }; + + _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) { + this.setNextCallback(handler); + var node = this.props.nodeRef ? this.props.nodeRef.current : external_ReactDOM_default.a.findDOMNode(this); + var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener; + + if (!node || doesNotHaveTimeoutOrListener) { + setTimeout(this.nextCallback, 0); + return; + } + + if (this.props.addEndListener) { + var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback], + maybeNode = _ref3[0], + maybeNextCallback = _ref3[1]; + + this.props.addEndListener(maybeNode, maybeNextCallback); + } + + if (timeout != null) { + setTimeout(this.nextCallback, timeout); + } + }; + + _proto.render = function render() { + var status = this.state.status; + + if (status === UNMOUNTED) { + return null; } + + var _this$props = this.props, + children = _this$props.children, + _in = _this$props.in, + _mountOnEnter = _this$props.mountOnEnter, + _unmountOnExit = _this$props.unmountOnExit, + _appear = _this$props.appear, + _enter = _this$props.enter, + _exit = _this$props.exit, + _timeout = _this$props.timeout, + _addEndListener = _this$props.addEndListener, + _onEnter = _this$props.onEnter, + _onEntering = _this$props.onEntering, + _onEntered = _this$props.onEntered, + _onExit = _this$props.onExit, + _onExiting = _this$props.onExiting, + _onExited = _this$props.onExited, + _nodeRef = _this$props.nodeRef, + childProps = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); + + return ( + /*#__PURE__*/ + // allows for nested Transitions + external_React_default.a.createElement(TransitionGroupContext.Provider, { + value: null + }, typeof children === 'function' ? children(status, childProps) : external_React_default.a.cloneElement(external_React_default.a.Children.only(children), childProps)) + ); + }; + + return Transition; +}(external_React_default.a.Component); + +Transition_Transition.contextType = TransitionGroupContext; +Transition_Transition.propTypes = false ? undefined : {}; // Name the function so it is clearer in the documentation + +function noop() {} + +Transition_Transition.defaultProps = { + in: false, + mountOnEnter: false, + unmountOnExit: false, + appear: false, + enter: true, + exit: true, + onEnter: noop, + onEntering: noop, + onEntered: noop, + onExit: noop, + onExiting: noop, + onExited: noop +}; +Transition_Transition.UNMOUNTED = UNMOUNTED; +Transition_Transition.EXITED = EXITED; +Transition_Transition.ENTERING = ENTERING; +Transition_Transition.ENTERED = ENTERED; +Transition_Transition.EXITING = EXITING; +/* harmony default export */ var esm_Transition = (Transition_Transition); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/styles/transitions.js +var transitions = __webpack_require__(25); + +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/transitions/utils.js +var reflow = function reflow(node) { + return node.scrollTop; +}; +function getTransitionProps(props, options) { + var timeout = props.timeout, + _props$style = props.style, + style = _props$style === void 0 ? {} : _props$style; + return { + duration: style.transitionDuration || typeof timeout === 'number' ? timeout : timeout[options.mode] || 0, + delay: style.transitionDelay }; - - return unsubscribeWrapper; } +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/styles/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/styles/esm/useTheme/useTheme.js + 1 modules +var useTheme = __webpack_require__(86); -var initStateUpdates = function initStateUpdates() { - return [null, 0]; -}; - -function connectAdvanced( -/* - selectorFactory is a func that is responsible for returning the selector function used to - compute new props from state, props, and dispatch. For example: - export default connectAdvanced((dispatch, options) => (state, props) => ({ - thing: state.things[props.thingId], - saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), - }))(YourComponent) - Access to dispatch is provided to the factory so selectorFactories can bind actionCreators - outside of their selector as an optimization. Options passed to connectAdvanced are passed to - the selectorFactory, along with displayName and WrappedComponent, as the second argument. - Note that selectorFactory is responsible for all caching/memoization of inbound and outbound - props. Do not use connectAdvanced directly without memoizing results between calls to your - selector, otherwise the Connect component will re-render on every state or props change. -*/ -selectorFactory, // options object: -_ref) { - if (_ref === void 0) { - _ref = {}; - } - - var _ref2 = _ref, - _ref2$getDisplayName = _ref2.getDisplayName, - getDisplayName = _ref2$getDisplayName === void 0 ? function (name) { - return "ConnectAdvanced(" + name + ")"; - } : _ref2$getDisplayName, - _ref2$methodName = _ref2.methodName, - methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, - _ref2$renderCountProp = _ref2.renderCountProp, - renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, - _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, - shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, - _ref2$storeKey = _ref2.storeKey, - storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, - _ref2$withRef = _ref2.withRef, - withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, - _ref2$forwardRef = _ref2.forwardRef, - forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef, - _ref2$context = _ref2.context, - context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context, - connectOptions = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"]); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/styles/useTheme.js - if (false) { var customStoreWarningMessage; } - var Context = context; - return function wrapWithConnect(WrappedComponent) { - if (false) {} - var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; - var displayName = getDisplayName(wrappedComponentName); +function useTheme_useTheme() { + var theme = Object(useTheme["a" /* default */])() || defaultTheme["a" /* default */]; - var selectorFactoryOptions = Object(esm_extends["a" /* default */])({}, connectOptions, { - getDisplayName: getDisplayName, - methodName: methodName, - renderCountProp: renderCountProp, - shouldHandleStateChanges: shouldHandleStateChanges, - storeKey: storeKey, - displayName: displayName, - wrappedComponentName: wrappedComponentName, - WrappedComponent: WrappedComponent - }); + if (false) {} - var pure = connectOptions.pure; + return theme; +} +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/Collapse/Collapse.js - function createChildSelector(store) { - return selectorFactory(store.dispatch, selectorFactoryOptions); - } // If we aren't running in "pure" mode, we don't want to memoize values. - // To avoid conditionally calling hooks, we fall back to a tiny wrapper - // that just executes the given callback immediately. - var usePureOnlyMemo = pure ? external_React_["useMemo"] : function (callback) { - return callback(); - }; - function ConnectFunction(props) { - var _useMemo = Object(external_React_["useMemo"])(function () { - // Distinguish between actual "data" props that were passed to the wrapper component, - // and values needed to control behavior (forwarded refs, alternate context instances). - // To maintain the wrapperProps object reference, memoize this destructuring. - var reactReduxForwardedRef = props.reactReduxForwardedRef, - wrapperProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, ["reactReduxForwardedRef"]); - return [props.context, reactReduxForwardedRef, wrapperProps]; - }, [props]), - propsContext = _useMemo[0], - reactReduxForwardedRef = _useMemo[1], - wrapperProps = _useMemo[2]; - var ContextToUse = Object(external_React_["useMemo"])(function () { - // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext. - // Memoize the check that determines which context instance we should use. - return propsContext && propsContext.Consumer && Object(react_is["isContextConsumer"])( /*#__PURE__*/external_React_default.a.createElement(propsContext.Consumer, null)) ? propsContext : Context; - }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available - var contextValue = Object(external_React_["useContext"])(ContextToUse); // The store _must_ exist as either a prop or in context. - // We'll check to see if it _looks_ like a Redux store first. - // This allows us to pass through a `store` prop that is just a plain value. - var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch); - var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); - if (false) {} // Based on the previous check, one of these must be true - var store = didStoreComeFromProps ? props.store : contextValue.store; - var childPropsSelector = Object(external_React_["useMemo"])(function () { - // The child props selector needs the store reference as an input. - // Re-create this selector whenever the store changes. - return createChildSelector(store); - }, [store]); - var _useMemo2 = Object(external_React_["useMemo"])(function () { - if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component - // connected to the store via props shouldn't use subscription from context, or vice versa. +var Collapse_styles = function styles(theme) { + return { + /* Styles applied to the container element. */ + container: { + height: 0, + overflow: 'hidden', + transition: theme.transitions.create('height') + }, - var subscription = new Subscription(store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in - // the middle of the notification loop, where `subscription` will then be null. This can - // probably be avoided if Subscription's listeners logic is changed to not call listeners - // that have been unsubscribed in the middle of the notification loop. + /* Styles applied to the container element when the transition has entered. */ + entered: { + height: 'auto', + overflow: 'visible' + }, - var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription); - return [subscription, notifyNestedSubs]; - }, [store, didStoreComeFromProps, contextValue]), - subscription = _useMemo2[0], - notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary, - // and memoize that value to avoid unnecessary context updates. + /* Styles applied to the container element when the transition has exited and `collapsedHeight` != 0px. */ + hidden: { + visibility: 'hidden' + }, + /* Styles applied to the outer wrapper element. */ + wrapper: { + // Hack to get children with a negative margin to not falsify the height computation. + display: 'flex' + }, - var overriddenContextValue = Object(external_React_["useMemo"])(function () { - if (didStoreComeFromProps) { - // This component is directly subscribed to a store from props. - // We don't want descendants reading from this store - pass down whatever - // the existing context value is from the nearest connected ancestor. - return contextValue; - } // Otherwise, put this component's subscription instance into context, so that - // connected descendants won't update until after this component is done + /* Styles applied to the inner wrapper element. */ + wrapperInner: { + width: '100%' + } + }; +}; +/** + * The Collapse transition is used by the + * [Vertical Stepper](/components/steppers/#vertical-stepper) StepContent component. + * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. + */ +var Collapse_Collapse = /*#__PURE__*/external_React_["forwardRef"](function Collapse(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$collapsedHeigh = props.collapsedHeight, + collapsedHeightProp = _props$collapsedHeigh === void 0 ? '0px' : _props$collapsedHeigh, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$disableStrictM = props.disableStrictModeCompat, + disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM, + inProp = props.in, + onEnter = props.onEnter, + onEntered = props.onEntered, + onEntering = props.onEntering, + onExit = props.onExit, + onExited = props.onExited, + onExiting = props.onExiting, + style = props.style, + _props$timeout = props.timeout, + timeout = _props$timeout === void 0 ? transitions["b" /* duration */].standard : _props$timeout, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? esm_Transition : _props$TransitionComp, + other = Object(objectWithoutProperties["a" /* default */])(props, ["children", "classes", "className", "collapsedHeight", "component", "disableStrictModeCompat", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]); - return Object(esm_extends["a" /* default */])({}, contextValue, { - subscription: subscription - }); - }, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update - // causes a change to the calculated child component props (or we caught an error in mapState) + var theme = useTheme_useTheme(); + var timer = external_React_["useRef"](); + var wrapperRef = external_React_["useRef"](null); + var autoTransitionDuration = external_React_["useRef"](); + var collapsedHeight = typeof collapsedHeightProp === 'number' ? "".concat(collapsedHeightProp, "px") : collapsedHeightProp; + external_React_["useEffect"](function () { + return function () { + clearTimeout(timer.current); + }; + }, []); + var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat; + var nodeRef = external_React_["useRef"](null); + var handleRef = Object(useForkRef["a" /* default */])(ref, enableStrictModeCompat ? nodeRef : undefined); - var _useReducer = Object(external_React_["useReducer"])(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates), - _useReducer$ = _useReducer[0], - previousStateUpdateResult = _useReducer$[0], - forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards + var normalizedTransitionCallback = function normalizedTransitionCallback(callback) { + return function (nodeOrAppearing, maybeAppearing) { + if (callback) { + var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing], + _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2), + node = _ref2[0], + isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value. - if (previousStateUpdateResult && previousStateUpdateResult.error) { - throw previousStateUpdateResult.error; - } // Set up refs to coordinate values between the subscription effect and the render logic + if (isAppearing === undefined) { + callback(node); + } else { + callback(node, isAppearing); + } + } + }; + }; + var handleEnter = normalizedTransitionCallback(function (node, isAppearing) { + node.style.height = collapsedHeight; - var lastChildProps = Object(external_React_["useRef"])(); - var lastWrapperProps = Object(external_React_["useRef"])(wrapperProps); - var childPropsFromStoreUpdate = Object(external_React_["useRef"])(); - var renderIsScheduled = Object(external_React_["useRef"])(false); - var actualChildProps = usePureOnlyMemo(function () { - // Tricky logic here: - // - This render may have been triggered by a Redux store update that produced new child props - // - However, we may have gotten new wrapper props after that - // If we have new child props, and the same wrapper props, we know we should use the new child props as-is. - // But, if we have new wrapper props, those might change the child props, so we have to recalculate things. - // So, we'll use the child props from store update only if the wrapper props are the same as last time. - if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) { - return childPropsFromStoreUpdate.current; - } // TODO We're reading the store directly in render() here. Bad idea? - // This will likely cause Bad Things (TM) to happen in Concurrent Mode. - // Note that we do this because on renders _not_ caused by store updates, we need the latest store state - // to determine what the child props should be. + if (onEnter) { + onEnter(node, isAppearing); + } + }); + var handleEntering = normalizedTransitionCallback(function (node, isAppearing) { + var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0; + var _getTransitionProps = getTransitionProps({ + style: style, + timeout: timeout + }, { + mode: 'enter' + }), + transitionDuration = _getTransitionProps.duration; - return childPropsSelector(store.getState(), wrapperProps); - }, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns - // about useLayoutEffect in SSR, so we try to detect environment and fall back to - // just useEffect instead to avoid the warning, since neither will run anyway. + if (timeout === 'auto') { + var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight); + node.style.transitionDuration = "".concat(duration2, "ms"); + autoTransitionDuration.current = duration2; + } else { + node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : "".concat(transitionDuration, "ms"); + } - useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs]); // Our re-subscribe logic only runs when the store/subscription setup changes + node.style.height = "".concat(wrapperHeight, "px"); - useIsomorphicLayoutEffectWithArgs(subscribeUpdates, [shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch], [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component. - // We memoize the elements for the rendered child component as an optimization. + if (onEntering) { + onEntering(node, isAppearing); + } + }); + var handleEntered = normalizedTransitionCallback(function (node, isAppearing) { + node.style.height = 'auto'; - var renderedWrappedComponent = Object(external_React_["useMemo"])(function () { - return /*#__PURE__*/external_React_default.a.createElement(WrappedComponent, Object(esm_extends["a" /* default */])({}, actualChildProps, { - ref: reactReduxForwardedRef - })); - }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering - // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate. + if (onEntered) { + onEntered(node, isAppearing); + } + }); + var handleExit = normalizedTransitionCallback(function (node) { + var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0; + node.style.height = "".concat(wrapperHeight, "px"); - var renderedChild = Object(external_React_["useMemo"])(function () { - if (shouldHandleStateChanges) { - // If this component is subscribed to store updates, we need to pass its own - // subscription instance down to our descendants. That means rendering the same - // Context instance, and putting a different value into the context. - return /*#__PURE__*/external_React_default.a.createElement(ContextToUse.Provider, { - value: overriddenContextValue - }, renderedWrappedComponent); - } + if (onExit) { + onExit(node); + } + }); + var handleExited = normalizedTransitionCallback(onExited); + var handleExiting = normalizedTransitionCallback(function (node) { + var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0; - return renderedWrappedComponent; - }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]); - return renderedChild; - } // If we're in "pure" mode, ensure our wrapper component only re-renders when incoming props have changed. + var _getTransitionProps2 = getTransitionProps({ + style: style, + timeout: timeout + }, { + mode: 'exit' + }), + transitionDuration = _getTransitionProps2.duration; + if (timeout === 'auto') { + var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight); + node.style.transitionDuration = "".concat(duration2, "ms"); + autoTransitionDuration.current = duration2; + } else { + node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : "".concat(transitionDuration, "ms"); + } - var Connect = pure ? external_React_default.a.memo(ConnectFunction) : ConnectFunction; - Connect.WrappedComponent = WrappedComponent; - Connect.displayName = displayName; + node.style.height = collapsedHeight; - if (forwardRef) { - var forwarded = external_React_default.a.forwardRef(function forwardConnectRef(props, ref) { - return /*#__PURE__*/external_React_default.a.createElement(Connect, Object(esm_extends["a" /* default */])({}, props, { - reactReduxForwardedRef: ref - })); - }); - forwarded.displayName = displayName; - forwarded.WrappedComponent = WrappedComponent; - return hoist_non_react_statics_cjs_default()(forwarded, WrappedComponent); + if (onExiting) { + onExiting(node); } + }); - return hoist_non_react_statics_cjs_default()(Connect, WrappedComponent); + var addEndListener = function addEndListener(nodeOrNext, maybeNext) { + var next = enableStrictModeCompat ? nodeOrNext : maybeNext; + + if (timeout === 'auto') { + timer.current = setTimeout(next, autoTransitionDuration.current || 0); + } }; -} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/shallowEqual.js -function is(x, y) { - if (x === y) { - return x !== 0 || y !== 0 || 1 / x === 1 / y; - } else { - return x !== x && y !== y; - } -} -function shallowEqual(objA, objB) { - if (is(objA, objB)) return true; + return /*#__PURE__*/external_React_["createElement"](TransitionComponent, Object(esm_extends["a" /* default */])({ + in: inProp, + onEnter: handleEnter, + onEntered: handleEntered, + onEntering: handleEntering, + onExit: handleExit, + onExited: handleExited, + onExiting: handleExiting, + addEndListener: addEndListener, + nodeRef: enableStrictModeCompat ? nodeRef : undefined, + timeout: timeout === 'auto' ? null : timeout + }, other), function (state, childProps) { + return /*#__PURE__*/external_React_["createElement"](Component, Object(esm_extends["a" /* default */])({ + className: Object(clsx_m["a" /* default */])(classes.container, className, { + 'entered': classes.entered, + 'exited': !inProp && collapsedHeight === '0px' && classes.hidden + }[state]), + style: Object(esm_extends["a" /* default */])({ + minHeight: collapsedHeight + }, style), + ref: handleRef + }, childProps), /*#__PURE__*/external_React_["createElement"]("div", { + className: classes.wrapper, + ref: wrapperRef + }, /*#__PURE__*/external_React_["createElement"]("div", { + className: classes.wrapperInner + }, children))); + }); +}); + false ? undefined : void 0; +Collapse_Collapse.muiSupportAuto = true; +/* harmony default export */ var esm_Collapse_Collapse = (Object(withStyles["a" /* default */])(Collapse_styles, { + name: 'MuiCollapse' +})(Collapse_Collapse)); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/lab/4.0.0-alpha.57_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/lab/esm/TreeView/TreeViewContext.js - if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { - return false; - } +/** + * @ignore - internal component. + */ - var keysA = Object.keys(objA); - var keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return false; +var TreeViewContext = external_React_["createContext"]({}); - for (var i = 0; i < keysA.length; i++) { - if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { - return false; - } - } +if (false) {} - return true; -} -// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/symbol-observable/1.2.0/node_modules/symbol-observable/es/index.js -var es = __webpack_require__(32); +/* harmony default export */ var TreeView_TreeViewContext = (TreeViewContext); +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/lab/4.0.0-alpha.57_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/lab/esm/TreeItem/TreeItem.js -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/redux/4.0.5/node_modules/redux/es/redux.js -/** - * These are private action types reserved by Redux. - * For any unknown actions, you must return the current state. - * If the current state is undefined, you must return the initial state. - * Do not reference these action types directly in your code. - */ -var randomString = function randomString() { - return Math.random().toString(36).substring(7).split('').join('.'); -}; +/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */ -var ActionTypes = { - INIT: "@@redux/INIT" + randomString(), - REPLACE: "@@redux/REPLACE" + randomString(), - PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { - return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); - } -}; -/** - * @param {any} obj The object to inspect. - * @returns {boolean} True if the argument appears to be a plain object. - */ -function isPlainObject(obj) { - if (typeof obj !== 'object' || obj === null) return false; - var proto = obj; - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto); - } - return Object.getPrototypeOf(obj) === proto; -} -/** - * Creates a Redux store that holds the state tree. - * The only way to change the data in the store is to call `dispatch()` on it. - * - * There should only be a single store in your app. To specify how different - * parts of the state tree respond to actions, you may combine several reducers - * into a single reducer function by using `combineReducers`. - * - * @param {Function} reducer A function that returns the next state tree, given - * the current state tree and the action to handle. - * - * @param {any} [preloadedState] The initial state. You may optionally specify it - * to hydrate the state from the server in universal apps, or to restore a - * previously serialized user session. - * If you use `combineReducers` to produce the root reducer function, this must be - * an object with the same shape as `combineReducers` keys. - * - * @param {Function} [enhancer] The store enhancer. You may optionally specify it - * to enhance the store with third-party capabilities such as middleware, - * time travel, persistence, etc. The only store enhancer that ships with Redux - * is `applyMiddleware()`. - * - * @returns {Store} A Redux store that lets you read the state, dispatch actions - * and subscribe to changes. - */ -function createStore(reducer, preloadedState, enhancer) { - var _ref2; - if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { - throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.'); - } - if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { - enhancer = preloadedState; - preloadedState = undefined; - } +var TreeItem_styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + listStyle: 'none', + margin: 0, + padding: 0, + outline: 0, + WebkitTapHighlightColor: 'transparent', + '&:focus > $content $label': { + backgroundColor: theme.palette.action.hover + }, + '&$selected > $content $label': { + backgroundColor: Object(colorManipulator["b" /* fade */])(theme.palette.primary.main, theme.palette.action.selectedOpacity) + }, + '&$selected > $content $label:hover, &$selected:focus > $content $label': { + backgroundColor: Object(colorManipulator["b" /* fade */])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + + /* Pseudo-class applied to the root element when expanded. */ + expanded: {}, + + /* Pseudo-class applied to the root element when selected. */ + selected: {}, + + /* Styles applied to the `role="group"` element. */ + group: { + margin: 0, + padding: 0, + marginLeft: 17 + }, + + /* Styles applied to the tree node content. */ + content: { + width: '100%', + display: 'flex', + alignItems: 'center', + cursor: 'pointer' + }, + + /* Styles applied to the tree node icon and collapse/expand icon. */ + iconContainer: { + marginRight: 4, + width: 15, + display: 'flex', + flexShrink: 0, + justifyContent: 'center', + '& svg': { + fontSize: 18 + } + }, - if (typeof enhancer !== 'undefined') { - if (typeof enhancer !== 'function') { - throw new Error('Expected the enhancer to be a function.'); + /* Styles applied to the label element. */ + label: { + width: '100%', + paddingLeft: 4, + position: 'relative', + '&:hover': { + backgroundColor: theme.palette.action.hover, + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } } + }; +}; - return enhancer(createStore)(reducer, preloadedState); - } +var isPrintableCharacter = function isPrintableCharacter(str) { + return str && str.length === 1 && str.match(/\S/); +}; - if (typeof reducer !== 'function') { - throw new Error('Expected the reducer to be a function.'); - } +var TreeItem_TreeItem = /*#__PURE__*/external_React_["forwardRef"](function TreeItem(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + collapseIcon = props.collapseIcon, + endIcon = props.endIcon, + expandIcon = props.expandIcon, + iconProp = props.icon, + label = props.label, + nodeId = props.nodeId, + onClick = props.onClick, + onLabelClick = props.onLabelClick, + onIconClick = props.onIconClick, + onFocus = props.onFocus, + onKeyDown = props.onKeyDown, + onMouseDown = props.onMouseDown, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? esm_Collapse_Collapse : _props$TransitionComp, + TransitionProps = props.TransitionProps, + other = Object(objectWithoutProperties["a" /* default */])(props, ["children", "classes", "className", "collapseIcon", "endIcon", "expandIcon", "icon", "label", "nodeId", "onClick", "onLabelClick", "onIconClick", "onFocus", "onKeyDown", "onMouseDown", "TransitionComponent", "TransitionProps"]); - var currentReducer = reducer; - var currentState = preloadedState; - var currentListeners = []; - var nextListeners = currentListeners; - var isDispatching = false; - /** - * This makes a shallow copy of currentListeners so we can use - * nextListeners as a temporary list while dispatching. - * - * This prevents any bugs around consumers calling - * subscribe/unsubscribe in the middle of a dispatch. - */ + var _React$useContext = external_React_["useContext"](TreeView_TreeViewContext), + contextIcons = _React$useContext.icons, + focus = _React$useContext.focus, + focusFirstNode = _React$useContext.focusFirstNode, + focusLastNode = _React$useContext.focusLastNode, + focusNextNode = _React$useContext.focusNextNode, + focusPreviousNode = _React$useContext.focusPreviousNode, + focusByFirstCharacter = _React$useContext.focusByFirstCharacter, + selectNode = _React$useContext.selectNode, + selectRange = _React$useContext.selectRange, + selectNextNode = _React$useContext.selectNextNode, + selectPreviousNode = _React$useContext.selectPreviousNode, + rangeSelectToFirst = _React$useContext.rangeSelectToFirst, + rangeSelectToLast = _React$useContext.rangeSelectToLast, + selectAllNodes = _React$useContext.selectAllNodes, + expandAllSiblings = _React$useContext.expandAllSiblings, + toggleExpansion = _React$useContext.toggleExpansion, + isExpanded = _React$useContext.isExpanded, + isFocused = _React$useContext.isFocused, + isSelected = _React$useContext.isSelected, + isTabbable = _React$useContext.isTabbable, + multiSelect = _React$useContext.multiSelect, + getParent = _React$useContext.getParent, + mapFirstChar = _React$useContext.mapFirstChar, + addNodeToNodeMap = _React$useContext.addNodeToNodeMap, + removeNodeFromNodeMap = _React$useContext.removeNodeFromNodeMap; - function ensureCanMutateNextListeners() { - if (nextListeners === currentListeners) { - nextListeners = currentListeners.slice(); + var nodeRef = external_React_["useRef"](null); + var contentRef = external_React_["useRef"](null); + var handleRef = Object(useForkRef["a" /* default */])(nodeRef, ref); + var icon = iconProp; + var expandable = Boolean(Array.isArray(children) ? children.length : children); + var expanded = isExpanded ? isExpanded(nodeId) : false; + var focused = isFocused ? isFocused(nodeId) : false; + var tabbable = isTabbable ? isTabbable(nodeId) : false; + var selected = isSelected ? isSelected(nodeId) : false; + var icons = contextIcons || {}; + var theme = useTheme_useTheme(); + + if (!icon) { + if (expandable) { + if (!expanded) { + icon = expandIcon || icons.defaultExpandIcon; + } else { + icon = collapseIcon || icons.defaultCollapseIcon; + } + + if (!icon) { + icon = icons.defaultParentIcon; + } + } else { + icon = endIcon || icons.defaultEndIcon; } } - /** - * Reads the state tree managed by the store. - * - * @returns {any} The current state tree of your application. - */ - - function getState() { - if (isDispatching) { - throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.'); + var handleClick = function handleClick(event) { + if (!focused) { + focus(nodeId); } - return currentState; - } - /** - * Adds a change listener. It will be called any time an action is dispatched, - * and some part of the state tree may potentially have changed. You may then - * call `getState()` to read the current state tree inside the callback. - * - * You may call `dispatch()` from a change listener, with the following - * caveats: - * - * 1. The subscriptions are snapshotted just before every `dispatch()` call. - * If you subscribe or unsubscribe while the listeners are being invoked, this - * will not have any effect on the `dispatch()` that is currently in progress. - * However, the next `dispatch()` call, whether nested or not, will use a more - * recent snapshot of the subscription list. - * - * 2. The listener should not expect to see all state changes, as the state - * might have been updated multiple times during a nested `dispatch()` before - * the listener is called. It is, however, guaranteed that all subscribers - * registered before the `dispatch()` started will be called with the latest - * state by the time it exits. - * - * @param {Function} listener A callback to be invoked on every dispatch. - * @returns {Function} A function to remove this change listener. - */ + var multiple = multiSelect && (event.shiftKey || event.ctrlKey || event.metaKey); // If already expanded and trying to toggle selection don't close + if (expandable && !event.defaultPrevented && !(multiple && isExpanded(nodeId))) { + toggleExpansion(event, nodeId); + } - function subscribe(listener) { - if (typeof listener !== 'function') { - throw new Error('Expected the listener to be a function.'); + if (multiple) { + if (event.shiftKey) { + selectRange(event, { + end: nodeId + }); + } else { + selectNode(event, nodeId, true); + } + } else { + selectNode(event, nodeId); } - if (isDispatching) { - throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.'); + if (onClick) { + onClick(event); } + }; - var isSubscribed = true; - ensureCanMutateNextListeners(); - nextListeners.push(listener); - return function unsubscribe() { - if (!isSubscribed) { - return; - } + var handleMouseDown = function handleMouseDown(event) { + if (event.shiftKey || event.ctrlKey || event.metaKey) { + event.preventDefault(); + } - if (isDispatching) { - throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.'); - } + if (onMouseDown) { + onMouseDown(event); + } + }; - isSubscribed = false; - ensureCanMutateNextListeners(); - var index = nextListeners.indexOf(listener); - nextListeners.splice(index, 1); - currentListeners = null; - }; - } - /** - * Dispatches an action. It is the only way to trigger a state change. - * - * The `reducer` function, used to create the store, will be called with the - * current state tree and the given `action`. Its return value will - * be considered the **next** state of the tree, and the change listeners - * will be notified. - * - * The base implementation only supports plain object actions. If you want to - * dispatch a Promise, an Observable, a thunk, or something else, you need to - * wrap your store creating function into the corresponding middleware. For - * example, see the documentation for the `redux-thunk` package. Even the - * middleware will eventually dispatch plain object actions using this method. - * - * @param {Object} action A plain object representing “what changed”. It is - * a good idea to keep actions serializable so you can record and replay user - * sessions, or use the time travelling `redux-devtools`. An action must have - * a `type` property which may not be `undefined`. It is a good idea to use - * string constants for action types. - * - * @returns {Object} For convenience, the same action object you dispatched. - * - * Note that, if you use a custom middleware, it may wrap `dispatch()` to - * return something else (for example, a Promise you can await). - */ + var handleNextArrow = function handleNextArrow(event) { + if (expandable) { + if (expanded) { + focusNextNode(nodeId); + } else { + toggleExpansion(event); + } + } + return true; + }; - function dispatch(action) { - if (!isPlainObject(action)) { - throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + var handlePreviousArrow = function handlePreviousArrow(event) { + if (expanded) { + toggleExpansion(event, nodeId); + return true; } - if (typeof action.type === 'undefined') { - throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); - } + var parent = getParent(nodeId); - if (isDispatching) { - throw new Error('Reducers may not dispatch actions.'); + if (parent) { + focus(parent); + return true; } - try { - isDispatching = true; - currentState = currentReducer(currentState, action); - } finally { - isDispatching = false; - } + return false; + }; - var listeners = currentListeners = nextListeners; + var handleKeyDown = function handleKeyDown(event) { + var flag = false; + var key = event.key; - for (var i = 0; i < listeners.length; i++) { - var listener = listeners[i]; - listener(); + if (event.altKey || event.currentTarget !== event.target) { + return; } - return action; - } - /** - * Replaces the reducer currently used by the store to calculate the state. - * - * You might need this if your app implements code splitting and you want to - * load some of the reducers dynamically. You might also need this if you - * implement a hot reloading mechanism for Redux. - * - * @param {Function} nextReducer The reducer for the store to use instead. - * @returns {void} - */ + var ctrlPressed = event.ctrlKey || event.metaKey; + switch (key) { + case ' ': + if (nodeRef.current === event.currentTarget) { + if (multiSelect && event.shiftKey) { + flag = selectRange(event, { + end: nodeId + }); + } else if (multiSelect) { + flag = selectNode(event, nodeId, true); + } else { + flag = selectNode(event, nodeId); + } + } - function replaceReducer(nextReducer) { - if (typeof nextReducer !== 'function') { - throw new Error('Expected the nextReducer to be a function.'); - } + event.stopPropagation(); + break; - currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. - // Any reducers that existed in both the new and old rootReducer - // will receive the previous state. This effectively populates - // the new state tree with any relevant data from the old one. + case 'Enter': + if (nodeRef.current === event.currentTarget && expandable) { + toggleExpansion(event); + flag = true; + } - dispatch({ - type: ActionTypes.REPLACE - }); - } - /** - * Interoperability point for observable/reactive libraries. - * @returns {observable} A minimal observable of state changes. - * For more information, see the observable proposal: - * https://github.com/tc39/proposal-observable - */ + event.stopPropagation(); + break; + case 'ArrowDown': + if (multiSelect && event.shiftKey) { + selectNextNode(event, nodeId); + } - function observable() { - var _ref; + focusNextNode(nodeId); + flag = true; + break; - var outerSubscribe = subscribe; - return _ref = { - /** - * The minimal observable subscription method. - * @param {Object} observer Any object that can be used as an observer. - * The observer object should have a `next` method. - * @returns {subscription} An object with an `unsubscribe` method that can - * be used to unsubscribe the observable from the store, and prevent further - * emission of values from the observable. - */ - subscribe: function subscribe(observer) { - if (typeof observer !== 'object' || observer === null) { - throw new TypeError('Expected the observer to be an object.'); + case 'ArrowUp': + if (multiSelect && event.shiftKey) { + selectPreviousNode(event, nodeId); } - function observeState() { - if (observer.next) { - observer.next(getState()); - } + focusPreviousNode(nodeId); + flag = true; + break; + + case 'ArrowRight': + if (theme.direction === 'rtl') { + flag = handlePreviousArrow(event); + } else { + flag = handleNextArrow(event); } - observeState(); - var unsubscribe = outerSubscribe(observeState); - return { - unsubscribe: unsubscribe - }; - } - }, _ref[es["a" /* default */]] = function () { - return this; - }, _ref; - } // When a store is created, an "INIT" action is dispatched so that every - // reducer returns their initial state. This effectively populates - // the initial state tree. + break; + case 'ArrowLeft': + if (theme.direction === 'rtl') { + flag = handleNextArrow(event); + } else { + flag = handlePreviousArrow(event); + } - dispatch({ - type: ActionTypes.INIT - }); - return _ref2 = { - dispatch: dispatch, - subscribe: subscribe, - getState: getState, - replaceReducer: replaceReducer - }, _ref2[es["a" /* default */]] = observable, _ref2; -} + break; -/** - * Prints a warning in the console if it exists. - * - * @param {String} message The warning message. - * @returns {void} - */ -function warning(message) { - /* eslint-disable no-console */ - if (typeof console !== 'undefined' && typeof console.error === 'function') { - console.error(message); - } - /* eslint-enable no-console */ + case 'Home': + if (multiSelect && ctrlPressed && event.shiftKey) { + rangeSelectToFirst(event, nodeId); + } + + focusFirstNode(); + flag = true; + break; + case 'End': + if (multiSelect && ctrlPressed && event.shiftKey) { + rangeSelectToLast(event, nodeId); + } - try { - // This error was thrown as a convenience so that if you enable - // "break on all exceptions" in your console, - // it would pause the execution at this line. - throw new Error(message); - } catch (e) {} // eslint-disable-line no-empty + focusLastNode(); + flag = true; + break; + + default: + if (key === '*') { + expandAllSiblings(event, nodeId); + flag = true; + } else if (multiSelect && ctrlPressed && key.toLowerCase() === 'a') { + flag = selectAllNodes(event); + } else if (!ctrlPressed && !event.shiftKey && isPrintableCharacter(key)) { + focusByFirstCharacter(nodeId, key); + flag = true; + } + + } + + if (flag) { + event.preventDefault(); + event.stopPropagation(); + } + + if (onKeyDown) { + onKeyDown(event); + } + }; + + var handleFocus = function handleFocus(event) { + if (!focused && event.currentTarget === event.target) { + focus(nodeId); + } + + if (onFocus) { + onFocus(event); + } + }; + + external_React_["useEffect"](function () { + if (addNodeToNodeMap) { + var childIds = []; + external_React_["Children"].forEach(children, function (child) { + if ( /*#__PURE__*/external_React_["isValidElement"](child) && child.props.nodeId) { + childIds.push(child.props.nodeId); + } + }); + addNodeToNodeMap(nodeId, childIds); + } + }, [children, nodeId, addNodeToNodeMap]); + external_React_["useEffect"](function () { + if (removeNodeFromNodeMap) { + return function () { + removeNodeFromNodeMap(nodeId); + }; + } + + return undefined; + }, [nodeId, removeNodeFromNodeMap]); + external_React_["useEffect"](function () { + if (mapFirstChar && label) { + mapFirstChar(nodeId, contentRef.current.textContent.substring(0, 1).toLowerCase()); + } + }, [mapFirstChar, nodeId, label]); + external_React_["useEffect"](function () { + if (focused) { + nodeRef.current.focus(); + } + }, [focused]); + var ariaSelected; -} + if (multiSelect) { + ariaSelected = selected; + } else if (selected) { + // single-selection trees unset aria-selected + ariaSelected = true; + } -function getUndefinedStateErrorMessage(key, action) { - var actionType = action && action.type; - var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action'; - return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined."; -} + return /*#__PURE__*/external_React_["createElement"]("li", Object(esm_extends["a" /* default */])({ + className: Object(clsx_m["a" /* default */])(classes.root, className, expanded && classes.expanded, selected && classes.selected), + role: "treeitem", + onKeyDown: handleKeyDown, + onFocus: handleFocus, + "aria-expanded": expandable ? expanded : null, + "aria-selected": ariaSelected, + ref: handleRef, + tabIndex: tabbable ? 0 : -1 + }, other), /*#__PURE__*/external_React_["createElement"]("div", { + className: classes.content, + onClick: handleClick, + onMouseDown: handleMouseDown, + ref: contentRef + }, /*#__PURE__*/external_React_["createElement"]("div", { + onClick: onIconClick, + className: classes.iconContainer + }, icon), /*#__PURE__*/external_React_["createElement"](esm_Typography_Typography, { + onClick: onLabelClick, + component: "div", + className: classes.label + }, label)), children && /*#__PURE__*/external_React_["createElement"](TransitionComponent, Object(esm_extends["a" /* default */])({ + unmountOnExit: true, + className: classes.group, + in: expanded, + component: "ul", + role: "group" + }, TransitionProps), children)); +}); + false ? undefined : void 0; +/* harmony default export */ var esm_TreeItem_TreeItem = (Object(withStyles["a" /* default */])(TreeItem_styles, { + name: 'MuiTreeItem' +})(TreeItem_TreeItem)); +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/cuid/2.1.8/node_modules/cuid/index.js +var cuid = __webpack_require__(26); +var cuid_default = /*#__PURE__*/__webpack_require__.n(cuid); -function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { - var reducerKeys = Object.keys(reducers); - var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; +// CONCATENATED MODULE: ./src/app/components/Explorer/ExplorerCategoryItem.js - if (reducerKeys.length === 0) { - return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; - } - if (!isPlainObject(inputState)) { - return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); - } - var unexpectedKeys = Object.keys(inputState).filter(function (key) { - return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; - }); - unexpectedKeys.forEach(function (key) { - unexpectedKeyCache[key] = true; - }); - if (action && action.type === ActionTypes.REPLACE) return; - if (unexpectedKeys.length > 0) { - return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored."); +function ExplorerCategoryItem(props) { + var classes = useExplorerCategoryStyles(); + + if (!props.data.nodeId) { + props.data.nodeId = cuid_default()(); } -} -function assertReducerShape(reducers) { - Object.keys(reducers).forEach(function (key) { - var reducer = reducers[key]; - var initialState = reducer(undefined, { - type: ActionTypes.INIT + return React.createElement(esm_TreeItem_TreeItem, { + className: "explorer-tree__group", + classes: { + label: classes.label, + labelContainer: classes.labelContainer, + iconContainer: classes.iconContainer, + selected: classes.selected + }, + nodeId: props.data.nodeId, + label: props.title + }, props.data.map(function (explorerTarget, i) { + return React.createElement(ExplorerItem, { + key: i, + data: explorerTarget, + toggle: props.toggle }); - - if (typeof initialState === 'undefined') { - throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined."); - } - - if (typeof reducer(undefined, { - type: ActionTypes.PROBE_UNKNOWN_ACTION() - }) === 'undefined') { - throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null."); - } - }); + })); } -/** - * Turns an object whose values are different reducer functions, into a single - * reducer function. It will call every child reducer, and gather their results - * into a single state object, whose keys correspond to the keys of the passed - * reducer functions. - * - * @param {Object} reducers An object whose values correspond to different - * reducer functions that need to be combined into one. One handy way to obtain - * it is to use ES6 `import * as reducers` syntax. The reducers may never return - * undefined for any action. Instead, they should return their initial state - * if the state passed to them was undefined, and the current state for any - * unrecognized action. - * - * @returns {Function} A reducer function that invokes every reducer inside the - * passed object, and builds a state object with the same shape. - */ - +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/Link/Link.js -function combineReducers(reducers) { - var reducerKeys = Object.keys(reducers); - var finalReducers = {}; - for (var i = 0; i < reducerKeys.length; i++) { - var key = reducerKeys[i]; - if (false) {} - if (typeof reducers[key] === 'function') { - finalReducers[key] = reducers[key]; - } - } - var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same - // keys multiple times. - var unexpectedKeyCache; - if (false) {} - var shapeAssertionError; - try { - assertReducerShape(finalReducers); - } catch (e) { - shapeAssertionError = e; - } - return function combination(state, action) { - if (state === void 0) { - state = {}; - } - if (shapeAssertionError) { - throw shapeAssertionError; - } +var Link_styles = { + /* Styles applied to the root element. */ + root: {}, - if (false) { var warningMessage; } + /* Styles applied to the root element if `underline="none"`. */ + underlineNone: { + textDecoration: 'none' + }, - var hasChanged = false; - var nextState = {}; + /* Styles applied to the root element if `underline="hover"`. */ + underlineHover: { + textDecoration: 'none', + '&:hover': { + textDecoration: 'underline' + } + }, - for (var _i = 0; _i < finalReducerKeys.length; _i++) { - var _key = finalReducerKeys[_i]; - var reducer = finalReducers[_key]; - var previousStateForKey = state[_key]; - var nextStateForKey = reducer(previousStateForKey, action); + /* Styles applied to the root element if `underline="always"`. */ + underlineAlways: { + textDecoration: 'underline' + }, + // Same reset as ButtonBase.root - if (typeof nextStateForKey === 'undefined') { - var errorMessage = getUndefinedStateErrorMessage(_key, action); - throw new Error(errorMessage); - } + /* Styles applied to the root element if `component="button"`. */ + button: { + position: 'relative', + WebkitTapHighlightColor: 'transparent', + backgroundColor: 'transparent', + // Reset default value + // We disable the focus ring for mouse, touch and keyboard users. + outline: 0, + border: 0, + margin: 0, + // Remove the margin in Safari + borderRadius: 0, + padding: 0, + // Remove the padding in Firefox + cursor: 'pointer', + userSelect: 'none', + verticalAlign: 'middle', + '-moz-appearance': 'none', + // Reset + '-webkit-appearance': 'none', + // Reset + '&::-moz-focus-inner': { + borderStyle: 'none' // Remove Firefox dotted outline. - nextState[_key] = nextStateForKey; - hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + }, + '&$focusVisible': { + outline: 'auto' } + }, - hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; - return hasChanged ? nextState : state; - }; -} - -function bindActionCreator(actionCreator, dispatch) { - return function () { - return dispatch(actionCreator.apply(this, arguments)); - }; -} -/** - * Turns an object whose values are action creators, into an object with the - * same keys, but with every function wrapped into a `dispatch` call so they - * may be invoked directly. This is just a convenience method, as you can call - * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. - * - * For convenience, you can also pass an action creator as the first argument, - * and get a dispatch wrapped function in return. - * - * @param {Function|Object} actionCreators An object whose values are action - * creator functions. One handy way to obtain it is to use ES6 `import * as` - * syntax. You may also pass a single function. - * - * @param {Function} dispatch The `dispatch` function available on your Redux - * store. - * - * @returns {Function|Object} The object mimicking the original object, but with - * every action creator wrapped into the `dispatch` call. If you passed a - * function as `actionCreators`, the return value will also be a single - * function. - */ + /* Pseudo-class applied to the root element if the link is keyboard focused. */ + focusVisible: {} +}; +var Link_Link = /*#__PURE__*/external_React_["forwardRef"](function Link(props, ref) { + var classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'primary' : _props$color, + _props$component = props.component, + component = _props$component === void 0 ? 'a' : _props$component, + onBlur = props.onBlur, + onFocus = props.onFocus, + TypographyClasses = props.TypographyClasses, + _props$underline = props.underline, + underline = _props$underline === void 0 ? 'hover' : _props$underline, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'inherit' : _props$variant, + other = Object(objectWithoutProperties["a" /* default */])(props, ["classes", "className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant"]); + var _useIsFocusVisible = Object(useIsFocusVisible["a" /* default */])(), + isFocusVisible = _useIsFocusVisible.isFocusVisible, + onBlurVisible = _useIsFocusVisible.onBlurVisible, + focusVisibleRef = _useIsFocusVisible.ref; -function bindActionCreators(actionCreators, dispatch) { - if (typeof actionCreators === 'function') { - return bindActionCreator(actionCreators, dispatch); - } + var _React$useState = external_React_["useState"](false), + focusVisible = _React$useState[0], + setFocusVisible = _React$useState[1]; - if (typeof actionCreators !== 'object' || actionCreators === null) { - throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?"); - } + var handlerRef = Object(useForkRef["a" /* default */])(ref, focusVisibleRef); - var boundActionCreators = {}; + var handleBlur = function handleBlur(event) { + if (focusVisible) { + onBlurVisible(); + setFocusVisible(false); + } - for (var key in actionCreators) { - var actionCreator = actionCreators[key]; + if (onBlur) { + onBlur(event); + } + }; - if (typeof actionCreator === 'function') { - boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + var handleFocus = function handleFocus(event) { + if (isFocusVisible(event)) { + setFocusVisible(true); } - } - return boundActionCreators; -} + if (onFocus) { + onFocus(event); + } + }; -function redux_defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } + return /*#__PURE__*/external_React_["createElement"](esm_Typography_Typography, Object(esm_extends["a" /* default */])({ + className: Object(clsx_m["a" /* default */])(classes.root, classes["underline".concat(Object(capitalize["a" /* default */])(underline))], className, focusVisible && classes.focusVisible, component === 'button' && classes.button), + classes: TypographyClasses, + color: color, + component: component, + onBlur: handleBlur, + onFocus: handleFocus, + ref: handlerRef, + variant: variant + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ var esm_Link_Link = (Object(withStyles["a" /* default */])(Link_styles, { + name: 'MuiLink' +})(Link_Link)); +// CONCATENATED MODULE: ./src/app/components/Explorer/ExplorerItem.js +function ExplorerItem_slicedToArray(arr, i) { return ExplorerItem_arrayWithHoles(arr) || ExplorerItem_iterableToArrayLimit(arr, i) || ExplorerItem_unsupportedIterableToArray(arr, i) || ExplorerItem_nonIterableRest(); } - return obj; -} +function ExplorerItem_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function redux_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); +function ExplorerItem_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return ExplorerItem_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ExplorerItem_arrayLikeToArray(o, minLen); } - if (Object.getOwnPropertySymbols) { - keys.push.apply(keys, Object.getOwnPropertySymbols(object)); - } +function ExplorerItem_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - if (enumerableOnly) keys = keys.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - return keys; -} +function ExplorerItem_iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; +function ExplorerItem_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - if (i % 2) { - redux_ownKeys(source, true).forEach(function (key) { - redux_defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - redux_ownKeys(source).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - } - return target; -} -/** - * Composes single-argument functions from right to left. The rightmost - * function can take multiple arguments as it provides the signature for - * the resulting composite function. - * - * @param {...Function} funcs The functions to compose. - * @returns {Function} A function obtained by composing the argument functions - * from right to left. For example, compose(f, g, h) is identical to doing - * (...args) => f(g(h(...args))). - */ -function compose() { - for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { - funcs[_key] = arguments[_key]; - } - if (funcs.length === 0) { - return function (arg) { - return arg; - }; - } - if (funcs.length === 1) { - return funcs[0]; + +function ExplorerItem(props) { + if (!props.data.$nodeId) { + throw new Error("Ids must be assigned"); } - return funcs.reduce(function (a, b) { - return function () { - return a(b.apply(void 0, arguments)); - }; - }); -} + var classesItem = useExplorerStyles(); + var classesCategory = useExplorerCategoryStyles(); + var targetChildren = []; + var i = 0; -/** - * Creates a store enhancer that applies middleware to the dispatch method - * of the Redux store. This is handy for a variety of tasks, such as expressing - * asynchronous actions in a concise manner, or logging every action payload. - * - * See `redux-thunk` package as an example of the Redux middleware. - * - * Because middleware is potentially asynchronous, this should be the first - * store enhancer in the composition chain. - * - * Note that each middleware will be given the `dispatch` and `getState` functions - * as named arguments. - * - * @param {...Function} middlewares The middleware chain to be applied. - * @returns {Function} A store enhancer applying the middleware. - */ + for (var _i = 0, _Object$entries = Object.entries(props.data.children || {}); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = ExplorerItem_slicedToArray(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + value = _Object$entries$_i[1]; -function applyMiddleware() { - for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { - middlewares[_key] = arguments[_key]; + targetChildren.push(Array.isArray(value) ? external_React_default.a.createElement(ExplorerCategoryItem, { + key: i, + title: key, + data: value, + toggle: props.toggle + }) : external_React_default.a.createElement(ExplorerItem, { + key: i, + data: value, + toggle: props.toggle + })); + i++; } - return function (createStore) { - return function () { - var store = createStore.apply(void 0, arguments); + var classes = i > 0 ? classesCategory : classesItem; + var nodeId = props.data.$nodeId; + var toggle = external_React_default.a.useCallback(function () { + return props.toggle(nodeId); + }, [nodeId]); - var _dispatch = function dispatch() { - throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); - }; + if (props.data.title !== "(overview)" && props.data.$match === false) { + return null; + } - var middlewareAPI = { - getState: store.getState, - dispatch: function dispatch() { - return _dispatch.apply(void 0, arguments); - } - }; - var chain = middlewares.map(function (middleware) { - return middleware(middlewareAPI); - }); - _dispatch = compose.apply(void 0, chain)(store.dispatch); - return _objectSpread2({}, store, { - dispatch: _dispatch - }); - }; - }; + return external_React_default.a.createElement(esm_TreeItem_TreeItem, { + className: "explorer-tree__target", + classes: { + label: classes.label, + iconContainer: classes.iconContainer, + selected: classes.selected + }, + onClick: toggle, + nodeId: nodeId, + label: props.data.page ? external_React_default.a.createElement(esm_Link_Link, { + classes: { + root: classes.labelLinks + }, + href: props.data.page, + underline: "hover" + }, props.data.title) : props.data.title + }, targetChildren); } +// EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/core/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/core/esm/utils/useControlled.js +var useControlled = __webpack_require__(38); -/* - * This is a dummy function to check if the function name has been altered by minification. - * If the function has been minified and NODE_ENV !== 'production', warn the user. - */ - -function isCrushed() {} +// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/lab/4.0.0-alpha.57_3335f0bfb61930572868dabe45efc2f7/node_modules/@material-ui/lab/esm/TreeView/TreeView.js -if (false) {} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/isPlainObject.js -/** - * @param {any} obj The object to inspect. - * @returns {boolean} True if the argument appears to be a plain object. - */ -function isPlainObject_isPlainObject(obj) { - if (typeof obj !== 'object' || obj === null) return false; - var proto = Object.getPrototypeOf(obj); - if (proto === null) return true; - var baseProto = proto; - while (Object.getPrototypeOf(baseProto) !== null) { - baseProto = Object.getPrototypeOf(baseProto); - } - return proto === baseProto; -} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/warning.js -/** - * Prints a warning in the console if it exists. - * - * @param {String} message The warning message. - * @returns {void} - */ -function warning_warning(message) { - /* eslint-disable no-console */ - if (typeof console !== 'undefined' && typeof console.error === 'function') { - console.error(message); - } - /* eslint-enable no-console */ - try { - // This error was thrown as a convenience so that if you enable - // "break on all exceptions" in your console, - // it would pause the execution at this line. - throw new Error(message); - /* eslint-disable no-empty */ - } catch (e) {} - /* eslint-enable no-empty */ -} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/verifyPlainObject.js +var TreeView_styles = { + /* Styles applied to the root element. */ + root: { + padding: 0, + margin: 0, + listStyle: 'none' + } +}; +function arrayDiff(arr1, arr2) { + if (arr1.length !== arr2.length) return true; -function verifyPlainObject(value, displayName, methodName) { - if (!isPlainObject_isPlainObject(value)) { - warning_warning(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + "."); + for (var i = 0; i < arr1.length; i += 1) { + if (arr1[i] !== arr2[i]) return true; } -} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/wrapMapToProps.js -function wrapMapToPropsConstant(getConstant) { - return function initConstantSelector(dispatch, options) { - var constant = getConstant(dispatch, options); + return false; +} - function constantSelector() { - return constant; +var findNextFirstChar = function findNextFirstChar(firstChars, startIndex, char) { + for (var i = startIndex; i < firstChars.length; i += 1) { + if (char === firstChars[i]) { + return i; } + } - constantSelector.dependsOnOwnProps = false; - return constantSelector; - }; -} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args -// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine -// whether mapToProps needs to be invoked when props have changed. -// -// A length of one signals that mapToProps does not depend on props from the parent component. -// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and -// therefore not reporting its length accurately.. + return -1; +}; -function getDependsOnOwnProps(mapToProps) { - return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; -} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, -// this function wraps mapToProps in a proxy function which does several things: -// -// * Detects whether the mapToProps function being called depends on props, which -// is used by selectorFactory to decide if it should reinvoke on props changes. -// -// * On first call, handles mapToProps if returns another function, and treats that -// new function as the true mapToProps for subsequent calls. -// -// * On first call, verifies the first result is a plain object, in order to warn -// the developer that their mapToProps function is not returning a valid result. -// +var defaultExpandedDefault = []; +var defaultSelectedDefault = []; +var TreeView_TreeView = /*#__PURE__*/external_React_["forwardRef"](function TreeView(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + defaultCollapseIcon = props.defaultCollapseIcon, + defaultEndIcon = props.defaultEndIcon, + _props$defaultExpande = props.defaultExpanded, + defaultExpanded = _props$defaultExpande === void 0 ? defaultExpandedDefault : _props$defaultExpande, + defaultExpandIcon = props.defaultExpandIcon, + defaultParentIcon = props.defaultParentIcon, + _props$defaultSelecte = props.defaultSelected, + defaultSelected = _props$defaultSelecte === void 0 ? defaultSelectedDefault : _props$defaultSelecte, + _props$disableSelecti = props.disableSelection, + disableSelection = _props$disableSelecti === void 0 ? false : _props$disableSelecti, + _props$multiSelect = props.multiSelect, + multiSelect = _props$multiSelect === void 0 ? false : _props$multiSelect, + expandedProp = props.expanded, + onNodeSelect = props.onNodeSelect, + onNodeToggle = props.onNodeToggle, + selectedProp = props.selected, + other = Object(objectWithoutProperties["a" /* default */])(props, ["children", "classes", "className", "defaultCollapseIcon", "defaultEndIcon", "defaultExpanded", "defaultExpandIcon", "defaultParentIcon", "defaultSelected", "disableSelection", "multiSelect", "expanded", "onNodeSelect", "onNodeToggle", "selected"]); -function wrapMapToPropsFunc(mapToProps, methodName) { - return function initProxySelector(dispatch, _ref) { - var displayName = _ref.displayName; + var _React$useState = external_React_["useState"](null), + tabbable = _React$useState[0], + setTabbable = _React$useState[1]; - var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { - return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); - }; // allow detectFactoryAndVerify to get ownProps + var _React$useState2 = external_React_["useState"](null), + focusedNodeId = _React$useState2[0], + setFocusedNodeId = _React$useState2[1]; + var nodeMap = external_React_["useRef"]({}); + var firstCharMap = external_React_["useRef"]({}); + var visibleNodes = external_React_["useRef"]([]); - proxy.dependsOnOwnProps = true; + var _useControlled = Object(useControlled["a" /* default */])({ + controlled: expandedProp, + default: defaultExpanded, + name: 'TreeView', + state: 'expanded' + }), + _useControlled2 = Object(slicedToArray["a" /* default */])(_useControlled, 2), + expanded = _useControlled2[0], + setExpandedState = _useControlled2[1]; - proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { - proxy.mapToProps = mapToProps; - proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); - var props = proxy(stateOrDispatch, ownProps); + var _useControlled3 = Object(useControlled["a" /* default */])({ + controlled: selectedProp, + default: defaultSelected, + name: 'TreeView', + state: 'selected' + }), + _useControlled4 = Object(slicedToArray["a" /* default */])(_useControlled3, 2), + selected = _useControlled4[0], + setSelectedState = _useControlled4[1]; + /* + * Status Helpers + */ - if (typeof props === 'function') { - proxy.mapToProps = props; - proxy.dependsOnOwnProps = getDependsOnOwnProps(props); - props = proxy(stateOrDispatch, ownProps); - } - if (false) {} - return props; - }; + var isExpanded = external_React_["useCallback"](function (id) { + return Array.isArray(expanded) ? expanded.indexOf(id) !== -1 : false; + }, [expanded]); + var isSelected = external_React_["useCallback"](function (id) { + return Array.isArray(selected) ? selected.indexOf(id) !== -1 : selected === id; + }, [selected]); - return proxy; + var isTabbable = function isTabbable(id) { + return tabbable === id; }; -} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/mapDispatchToProps.js - - -function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { - return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined; -} -function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { - return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) { - return { - dispatch: dispatch - }; - }) : undefined; -} -function whenMapDispatchToPropsIsObject(mapDispatchToProps) { - return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) { - return bindActionCreators(mapDispatchToProps, dispatch); - }) : undefined; -} -/* harmony default export */ var connect_mapDispatchToProps = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/mapStateToProps.js -function whenMapStateToPropsIsFunction(mapStateToProps) { - return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined; -} -function whenMapStateToPropsIsMissing(mapStateToProps) { - return !mapStateToProps ? wrapMapToPropsConstant(function () { - return {}; - }) : undefined; -} -/* harmony default export */ var connect_mapStateToProps = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/mergeProps.js + var isFocused = function isFocused(id) { + return focusedNodeId === id; + }; + /* + * Node Helpers + */ -function defaultMergeProps(stateProps, dispatchProps, ownProps) { - return Object(esm_extends["a" /* default */])({}, ownProps, stateProps, dispatchProps); -} -function wrapMergePropsFunc(mergeProps) { - return function initMergePropsProxy(dispatch, _ref) { - var displayName = _ref.displayName, - pure = _ref.pure, - areMergedPropsEqual = _ref.areMergedPropsEqual; - var hasRunOnce = false; - var mergedProps; - return function mergePropsProxy(stateProps, dispatchProps, ownProps) { - var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + var getNextNode = function getNextNode(id) { + var nodeIndex = visibleNodes.current.indexOf(id); - if (hasRunOnce) { - if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; - } else { - hasRunOnce = true; - mergedProps = nextMergedProps; - if (false) {} - } + if (nodeIndex !== -1 && nodeIndex + 1 < visibleNodes.current.length) { + return visibleNodes.current[nodeIndex + 1]; + } - return mergedProps; - }; + return null; }; -} -function whenMergePropsIsFunction(mergeProps) { - return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; -} -function whenMergePropsIsOmitted(mergeProps) { - return !mergeProps ? function () { - return defaultMergeProps; - } : undefined; -} -/* harmony default export */ var connect_mergeProps = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/verifySubselectors.js + var getPreviousNode = function getPreviousNode(id) { + var nodeIndex = visibleNodes.current.indexOf(id); -function verify(selector, methodName, displayName) { - if (!selector) { - throw new Error("Unexpected value for " + methodName + " in " + displayName + "."); - } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { - if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) { - warning_warning("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps."); + if (nodeIndex !== -1 && nodeIndex - 1 >= 0) { + return visibleNodes.current[nodeIndex - 1]; } - } -} -function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { - verify(mapStateToProps, 'mapStateToProps', displayName); - verify(mapDispatchToProps, 'mapDispatchToProps', displayName); - verify(mergeProps, 'mergeProps', displayName); -} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/selectorFactory.js + return null; + }; + var getLastNode = function getLastNode() { + return visibleNodes.current[visibleNodes.current.length - 1]; + }; -function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { - return function impureFinalPropsSelector(state, ownProps) { - return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps); + var getFirstNode = function getFirstNode() { + return visibleNodes.current[0]; }; -} -function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) { - var areStatesEqual = _ref.areStatesEqual, - areOwnPropsEqual = _ref.areOwnPropsEqual, - areStatePropsEqual = _ref.areStatePropsEqual; - var hasRunAtLeastOnce = false; - var state; - var ownProps; - var stateProps; - var dispatchProps; - var mergedProps; - function handleFirstCall(firstState, firstOwnProps) { - state = firstState; - ownProps = firstOwnProps; - stateProps = mapStateToProps(state, ownProps); - dispatchProps = mapDispatchToProps(dispatch, ownProps); - mergedProps = mergeProps(stateProps, dispatchProps, ownProps); - hasRunAtLeastOnce = true; - return mergedProps; - } + var getParent = function getParent(id) { + return nodeMap.current[id].parent; + }; - function handleNewPropsAndNewState() { - stateProps = mapStateToProps(state, ownProps); - if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); - mergedProps = mergeProps(stateProps, dispatchProps, ownProps); - return mergedProps; - } + var getNodesInRange = function getNodesInRange(a, b) { + var aIndex = visibleNodes.current.indexOf(a); + var bIndex = visibleNodes.current.indexOf(b); + var start = Math.min(aIndex, bIndex); + var end = Math.max(aIndex, bIndex); + return visibleNodes.current.slice(start, end + 1); + }; + /* + * Focus Helpers + */ - function handleNewProps() { - if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); - if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); - mergedProps = mergeProps(stateProps, dispatchProps, ownProps); - return mergedProps; - } - function handleNewState() { - var nextStateProps = mapStateToProps(state, ownProps); - var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); - stateProps = nextStateProps; - if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); - return mergedProps; - } + var focus = function focus(id) { + if (id) { + setTabbable(id); + setFocusedNodeId(id); + } + }; - function handleSubsequentCalls(nextState, nextOwnProps) { - var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); - var stateChanged = !areStatesEqual(nextState, state); - state = nextState; - ownProps = nextOwnProps; - if (propsChanged && stateChanged) return handleNewPropsAndNewState(); - if (propsChanged) return handleNewProps(); - if (stateChanged) return handleNewState(); - return mergedProps; - } + var focusNextNode = function focusNextNode(id) { + return focus(getNextNode(id)); + }; - return function pureFinalPropsSelector(nextState, nextOwnProps) { - return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); + var focusPreviousNode = function focusPreviousNode(id) { + return focus(getPreviousNode(id)); }; -} // TODO: Add more comments -// If pure is true, the selector returned by selectorFactory will memoize its results, -// allowing connectAdvanced's shouldComponentUpdate to return false if final -// props have not changed. If false, the selector will always return a new -// object and shouldComponentUpdate will always return true. -function finalPropsSelectorFactory(dispatch, _ref2) { - var initMapStateToProps = _ref2.initMapStateToProps, - initMapDispatchToProps = _ref2.initMapDispatchToProps, - initMergeProps = _ref2.initMergeProps, - options = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]); + var focusFirstNode = function focusFirstNode() { + return focus(getFirstNode()); + }; - var mapStateToProps = initMapStateToProps(dispatch, options); - var mapDispatchToProps = initMapDispatchToProps(dispatch, options); - var mergeProps = initMergeProps(dispatch, options); + var focusLastNode = function focusLastNode() { + return focus(getLastNode()); + }; - if (false) {} + var focusByFirstCharacter = function focusByFirstCharacter(id, char) { + var start; + var index; + var lowercaseChar = char.toLowerCase(); + var firstCharIds = []; + var firstChars = []; // This really only works since the ids are strings - var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; - return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); -} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/connect/connect.js + Object.keys(firstCharMap.current).forEach(function (nodeId) { + var firstChar = firstCharMap.current[nodeId]; + var map = nodeMap.current[nodeId]; + var visible = map.parent ? isExpanded(map.parent) : true; + if (visible) { + firstCharIds.push(nodeId); + firstChars.push(firstChar); + } + }); // Get start index for search based on position of currentItem + start = firstCharIds.indexOf(id) + 1; + if (start === nodeMap.current.length) { + start = 0; + } // Check remaining slots in the menu + index = findNextFirstChar(firstChars, start, lowercaseChar); // If not found in remaining slots, check from beginning + if (index === -1) { + index = findNextFirstChar(firstChars, 0, lowercaseChar); + } // If match was found... -/* - connect is a facade over connectAdvanced. It turns its args into a compatible - selectorFactory, which has the signature: + if (index > -1) { + focus(firstCharIds[index]); + } + }; + /* + * Expansion Helpers + */ - (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps - - connect passes its args to connectAdvanced as options, which will in turn pass them to - selectorFactory each time a Connect component instance is instantiated or hot reloaded. - selectorFactory returns a final props selector from its mapStateToProps, - mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, - mergePropsFactories, and pure args. + var toggleExpansion = function toggleExpansion(event) { + var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : focusedNodeId; + var newExpanded; - The resulting final props selector is called by the Connect component instance whenever - it receives new props or store state. - */ + if (expanded.indexOf(value) !== -1) { + newExpanded = expanded.filter(function (id) { + return id !== value; + }); + setTabbable(function (oldTabbable) { + var map = nodeMap.current[oldTabbable]; -function match(arg, factories, name) { - for (var i = factories.length - 1; i >= 0; i--) { - var result = factories[i](arg); - if (result) return result; - } + if (oldTabbable && (map && map.parent ? map.parent.id : null) === value) { + return value; + } - return function (dispatch, options) { - throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + "."); - }; -} + return oldTabbable; + }); + } else { + newExpanded = [value].concat(expanded); + } -function strictEqual(a, b) { - return a === b; -} // createConnect with default args builds the 'official' connect behavior. Calling it with -// different options opens up some testing and extensibility scenarios + if (onNodeToggle) { + onNodeToggle(event, newExpanded); + } + setExpandedState(newExpanded); + }; -function createConnect(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - _ref$connectHOC = _ref.connectHOC, - connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC, - _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, - mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? connect_mapStateToProps : _ref$mapStateToPropsF, - _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, - mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? connect_mapDispatchToProps : _ref$mapDispatchToPro, - _ref$mergePropsFactor = _ref.mergePropsFactories, - mergePropsFactories = _ref$mergePropsFactor === void 0 ? connect_mergeProps : _ref$mergePropsFactor, - _ref$selectorFactory = _ref.selectorFactory, - selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory; + var expandAllSiblings = function expandAllSiblings(event, id) { + var map = nodeMap.current[id]; + var parent = nodeMap.current[map.parent]; + var diff; - return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { - if (_ref2 === void 0) { - _ref2 = {}; + if (parent) { + diff = parent.children.filter(function (child) { + return !isExpanded(child); + }); + } else { + var topLevelNodes = nodeMap.current[-1].children; + diff = topLevelNodes.filter(function (node) { + return !isExpanded(node); + }); } - var _ref3 = _ref2, - _ref3$pure = _ref3.pure, - pure = _ref3$pure === void 0 ? true : _ref3$pure, - _ref3$areStatesEqual = _ref3.areStatesEqual, - areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, - _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, - areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua, - _ref3$areStatePropsEq = _ref3.areStatePropsEqual, - areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq, - _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, - areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE, - extraOptions = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]); + var newExpanded = expanded.concat(diff); - var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); - var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps'); - var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); - return connectHOC(selectorFactory, Object(esm_extends["a" /* default */])({ - // used in error messages - methodName: 'connect', - // used to compute Connect's displayName from the wrapped component's displayName. - getDisplayName: function getDisplayName(name) { - return "Connect(" + name + ")"; - }, - // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes - shouldHandleStateChanges: Boolean(mapStateToProps), - // passed through to selectorFactory - initMapStateToProps: initMapStateToProps, - initMapDispatchToProps: initMapDispatchToProps, - initMergeProps: initMergeProps, - pure: pure, - areStatesEqual: areStatesEqual, - areOwnPropsEqual: areOwnPropsEqual, - areStatePropsEqual: areStatePropsEqual, - areMergedPropsEqual: areMergedPropsEqual - }, extraOptions)); + if (diff.length > 0) { + setExpandedState(newExpanded); + + if (onNodeToggle) { + onNodeToggle(event, newExpanded); + } + } }; -} -/* harmony default export */ var connect_connect = (/*#__PURE__*/createConnect()); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/hooks/useReduxContext.js + /* + * Selection Helpers + */ -/** - * A hook to access the value of the `ReactReduxContext`. This is a low-level - * hook that you should usually not need to call directly. - * - * @returns {any} the value of the `ReactReduxContext` - * - * @example - * - * import React from 'react' - * import { useReduxContext } from 'react-redux' - * - * export const CounterComponent = ({ value }) => { - * const { store } = useReduxContext() - * return
{store.getState()}
- * } - */ + var lastSelectedNode = external_React_["useRef"](null); + var lastSelectionWasRange = external_React_["useRef"](false); + var currentRangeSelection = external_React_["useRef"]([]); -function useReduxContext_useReduxContext() { - var contextValue = Object(external_React_["useContext"])(ReactReduxContext); + var handleRangeArrowSelect = function handleRangeArrowSelect(event, nodes) { + var base = selected; + var start = nodes.start, + next = nodes.next, + current = nodes.current; - if (false) {} + if (!next || !current) { + return; + } + + if (currentRangeSelection.current.indexOf(current) === -1) { + currentRangeSelection.current = []; + } + + if (lastSelectionWasRange.current) { + if (currentRangeSelection.current.indexOf(next) !== -1) { + base = base.filter(function (id) { + return id === start || id !== current; + }); + currentRangeSelection.current = currentRangeSelection.current.filter(function (id) { + return id === start || id !== current; + }); + } else { + base.push(next); + currentRangeSelection.current.push(next); + } + } else { + base.push(next); + currentRangeSelection.current.push(current, next); + } - return contextValue; -} -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/hooks/useStore.js + if (onNodeSelect) { + onNodeSelect(event, base); + } + setSelectedState(base); + }; + var handleRangeSelect = function handleRangeSelect(event, nodes) { + var base = selected; + var start = nodes.start, + end = nodes.end; // If last selection was a range selection ignore nodes that were selected. -/** - * Hook factory, which creates a `useStore` hook bound to a given context. - * - * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. - * @returns {Function} A `useStore` hook bound to the specified context. - */ + if (lastSelectionWasRange.current) { + base = selected.filter(function (id) { + return currentRangeSelection.current.indexOf(id) === -1; + }); + } -function createStoreHook(context) { - if (context === void 0) { - context = ReactReduxContext; - } + var range = getNodesInRange(start, end); + currentRangeSelection.current = range; + var newSelected = base.concat(range); + newSelected = newSelected.filter(function (id, i) { + return newSelected.indexOf(id) === i; + }); - var useReduxContext = context === ReactReduxContext ? useReduxContext_useReduxContext : function () { - return Object(external_React_["useContext"])(context); - }; - return function useStore() { - var _useReduxContext = useReduxContext(), - store = _useReduxContext.store; + if (onNodeSelect) { + onNodeSelect(event, newSelected); + } - return store; + setSelectedState(newSelected); }; -} -/** - * A hook to access the redux store. - * - * @returns {any} the redux store - * - * @example - * - * import React from 'react' - * import { useStore } from 'react-redux' - * - * export const ExampleComponent = () => { - * const store = useStore() - * return
{store.getState()}
- * } - */ - -var useStore_useStore = /*#__PURE__*/createStoreHook(); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/hooks/useDispatch.js + var handleMultipleSelect = function handleMultipleSelect(event, value) { + var newSelected = []; -/** - * Hook factory, which creates a `useDispatch` hook bound to a given context. - * - * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. - * @returns {Function} A `useDispatch` hook bound to the specified context. - */ + if (selected.indexOf(value) !== -1) { + newSelected = selected.filter(function (id) { + return id !== value; + }); + } else { + newSelected = [value].concat(selected); + } -function createDispatchHook(context) { - if (context === void 0) { - context = ReactReduxContext; - } + if (onNodeSelect) { + onNodeSelect(event, newSelected); + } - var useStore = context === ReactReduxContext ? useStore_useStore : createStoreHook(context); - return function useDispatch() { - var store = useStore(); - return store.dispatch; + setSelectedState(newSelected); }; -} -/** - * A hook to access the redux `dispatch` function. - * - * @returns {any|function} redux store's `dispatch` function - * - * @example - * - * import React, { useCallback } from 'react' - * import { useDispatch } from 'react-redux' - * - * export const CounterComponent = ({ value }) => { - * const dispatch = useDispatch() - * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), []) - * return ( - *
- * {value} - * - *
- * ) - * } - */ - -var useDispatch = /*#__PURE__*/createDispatchHook(); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/hooks/useSelector.js + var handleSingleSelect = function handleSingleSelect(event, value) { + var newSelected = multiSelect ? [value] : value; + if (onNodeSelect) { + onNodeSelect(event, newSelected); + } + setSelectedState(newSelected); + }; + var selectNode = function selectNode(event, id) { + var multiple = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (id) { + if (multiple) { + handleMultipleSelect(event, id); + } else { + handleSingleSelect(event, id); + } -var refEquality = function refEquality(a, b) { - return a === b; -}; + lastSelectedNode.current = id; + lastSelectionWasRange.current = false; + currentRangeSelection.current = []; + return true; + } -function useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) { - var _useReducer = Object(external_React_["useReducer"])(function (s) { - return s + 1; - }, 0), - forceRender = _useReducer[1]; + return false; + }; - var subscription = Object(external_React_["useMemo"])(function () { - return new Subscription(store, contextSub); - }, [store, contextSub]); - var latestSubscriptionCallbackError = Object(external_React_["useRef"])(); - var latestSelector = Object(external_React_["useRef"])(); - var latestStoreState = Object(external_React_["useRef"])(); - var latestSelectedState = Object(external_React_["useRef"])(); - var storeState = store.getState(); - var selectedState; + var selectRange = function selectRange(event, nodes) { + var stacked = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var _nodes$start = nodes.start, + start = _nodes$start === void 0 ? lastSelectedNode.current : _nodes$start, + end = nodes.end, + current = nodes.current; - try { - if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) { - selectedState = selector(storeState); + if (stacked) { + handleRangeArrowSelect(event, { + start: start, + next: end, + current: current + }); } else { - selectedState = latestSelectedState.current; - } - } catch (err) { - if (latestSubscriptionCallbackError.current) { - err.message += "\nThe error may be correlated with this previous error:\n" + latestSubscriptionCallbackError.current.stack + "\n\n"; + handleRangeSelect(event, { + start: start, + end: end + }); } - throw err; - } - - useIsomorphicLayoutEffect(function () { - latestSelector.current = selector; - latestStoreState.current = storeState; - latestSelectedState.current = selectedState; - latestSubscriptionCallbackError.current = undefined; - }); - useIsomorphicLayoutEffect(function () { - function checkForUpdates() { - try { - var newSelectedState = latestSelector.current(store.getState()); + lastSelectionWasRange.current = true; + return true; + }; - if (equalityFn(newSelectedState, latestSelectedState.current)) { - return; - } + var rangeSelectToFirst = function rangeSelectToFirst(event, id) { + if (!lastSelectedNode.current) { + lastSelectedNode.current = id; + } - latestSelectedState.current = newSelectedState; - } catch (err) { - // we ignore all errors here, since when the component - // is re-rendered, the selectors are called again, and - // will throw again, if neither props nor store state - // changed - latestSubscriptionCallbackError.current = err; - } + var start = lastSelectionWasRange.current ? lastSelectedNode.current : id; + return selectRange(event, { + start: start, + end: getFirstNode() + }); + }; - forceRender(); + var rangeSelectToLast = function rangeSelectToLast(event, id) { + if (!lastSelectedNode.current) { + lastSelectedNode.current = id; } - subscription.onStateChange = checkForUpdates; - subscription.trySubscribe(); - checkForUpdates(); - return function () { - return subscription.tryUnsubscribe(); - }; - }, [store, subscription]); - return selectedState; -} -/** - * Hook factory, which creates a `useSelector` hook bound to a given context. - * - * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. - * @returns {Function} A `useSelector` hook bound to the specified context. - */ - + var start = lastSelectionWasRange.current ? lastSelectedNode.current : id; + return selectRange(event, { + start: start, + end: getLastNode() + }); + }; -function createSelectorHook(context) { - if (context === void 0) { - context = ReactReduxContext; - } + var selectNextNode = function selectNextNode(event, id) { + return selectRange(event, { + end: getNextNode(id), + current: id + }, true); + }; - var useReduxContext = context === ReactReduxContext ? useReduxContext_useReduxContext : function () { - return Object(external_React_["useContext"])(context); + var selectPreviousNode = function selectPreviousNode(event, id) { + return selectRange(event, { + end: getPreviousNode(id), + current: id + }, true); }; - return function useSelector(selector, equalityFn) { - if (equalityFn === void 0) { - equalityFn = refEquality; - } - if (false) {} + var selectAllNodes = function selectAllNodes(event) { + return selectRange(event, { + start: getFirstNode(), + end: getLastNode() + }); + }; + /* + * Mapping Helpers + */ - var _useReduxContext = useReduxContext(), - store = _useReduxContext.store, - contextSub = _useReduxContext.subscription; - var selectedState = useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub); - Object(external_React_["useDebugValue"])(selectedState); - return selectedState; + var addNodeToNodeMap = function addNodeToNodeMap(id, childrenIds) { + var currentMap = nodeMap.current[id]; + nodeMap.current[id] = Object(esm_extends["a" /* default */])({}, currentMap, { + children: childrenIds, + id: id + }); + childrenIds.forEach(function (childId) { + var currentChildMap = nodeMap.current[childId]; + nodeMap.current[childId] = Object(esm_extends["a" /* default */])({}, currentChildMap, { + parent: id, + id: childId + }); + }); }; -} -/** - * A hook to access the redux store's state. This hook takes a selector function - * as an argument. The selector is called with the store state. - * - * This hook takes an optional equality comparison function as the second parameter - * that allows you to customize the way the selected state is compared to determine - * whether the component needs to be re-rendered. - * - * @param {Function} selector the selector function - * @param {Function=} equalityFn the function that will be used to determine equality - * - * @returns {any} the selected state - * - * @example - * - * import React from 'react' - * import { useSelector } from 'react-redux' - * - * export const CounterComponent = () => { - * const counter = useSelector(state => state.counter) - * return
{counter}
- * } - */ -var useSelector_useSelector = /*#__PURE__*/createSelectorHook(); -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/utils/reactBatchedUpdates.js -/* eslint-disable import/no-unresolved */ + var getNodesToRemove = external_React_["useCallback"](function (id) { + var map = nodeMap.current[id]; + var nodes = []; -// CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/react-redux/7.2.2_bbabd8c34ea235719dc50e75b43f85a4/node_modules/react-redux/es/index.js + if (map) { + nodes.push(id); + if (map.children) { + nodes.concat(map.children); + map.children.forEach(function (node) { + nodes.concat(getNodesToRemove(node)); + }); + } + } + return nodes; + }, []); + var cleanUpFirstCharMap = external_React_["useCallback"](function (nodes) { + var newMap = Object(esm_extends["a" /* default */])({}, firstCharMap.current); + nodes.forEach(function (node) { + if (newMap[node]) { + delete newMap[node]; + } + }); + firstCharMap.current = newMap; + }, []); + var removeNodeFromNodeMap = external_React_["useCallback"](function (id) { + var nodes = getNodesToRemove(id); + cleanUpFirstCharMap(nodes); + var newMap = Object(esm_extends["a" /* default */])({}, nodeMap.current); + nodes.forEach(function (node) { + var map = newMap[node]; + if (map) { + if (map.parent) { + var parentMap = newMap[map.parent]; + if (parentMap && parentMap.children) { + var parentChildren = parentMap.children.filter(function (c) { + return c !== node; + }); + newMap[map.parent] = Object(esm_extends["a" /* default */])({}, parentMap, { + children: parentChildren + }); + } + } + delete newMap[node]; + } + }); + nodeMap.current = newMap; + setFocusedNodeId(function (oldFocusedNodeId) { + if (oldFocusedNodeId === id) { + return null; + } + return oldFocusedNodeId; + }); + }, [getNodesToRemove, cleanUpFirstCharMap]); -setBatch(external_ReactDOM_["unstable_batchedUpdates"]); + var mapFirstChar = function mapFirstChar(id, firstChar) { + firstCharMap.current[id] = firstChar; + }; -// CONCATENATED MODULE: ./src/app/store.js -function store_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + var prevChildIds = external_React_["useRef"]([]); -function store_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { store_ownKeys(Object(source), true).forEach(function (key) { store_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + var _React$useState3 = external_React_["useState"](false), + childrenCalculated = _React$useState3[0], + setChildrenCalculated = _React$useState3[1]; -function store_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + external_React_["useEffect"](function () { + var childIds = []; + external_React_["Children"].forEach(children, function (child) { + if ( /*#__PURE__*/external_React_["isValidElement"](child) && child.props.nodeId) { + childIds.push(child.props.nodeId); + } + }); + if (arrayDiff(prevChildIds.current, childIds)) { + nodeMap.current[-1] = { + parent: null, + children: childIds + }; + childIds.forEach(function (id, index) { + if (index === 0) { + setTabbable(id); + } + }); + visibleNodes.current = nodeMap.current[-1].children; + prevChildIds.current = childIds; + setChildrenCalculated(true); + } + }, [children]); + external_React_["useEffect"](function () { + var buildVisible = function buildVisible(nodes) { + var list = []; + for (var i = 0; i < nodes.length; i += 1) { + var item = nodes[i]; + list.push(item); + var childs = nodeMap.current[item].children; -function globalReducer() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var action = arguments.length > 1 ? arguments[1] : undefined; + if (isExpanded(item) && childs) { + list = list.concat(buildVisible(childs)); + } + } - switch (action.type) { - case "setExplorerOpen": - return store_objectSpread(store_objectSpread({}, state), {}, { - explorerOpen: action.value - }); + return list; + }; - default: - return state; - } -} + if (childrenCalculated) { + visibleNodes.current = buildVisible(nodeMap.current[-1].children); + } + }, [expanded, childrenCalculated, isExpanded, children]); -/* harmony default export */ var app_store = (createStore(globalReducer, { - explorerOpen: true -})); + var noopSelection = function noopSelection() { + return false; + }; + + return /*#__PURE__*/external_React_["createElement"](TreeView_TreeViewContext.Provider, { + value: { + icons: { + defaultCollapseIcon: defaultCollapseIcon, + defaultExpandIcon: defaultExpandIcon, + defaultParentIcon: defaultParentIcon, + defaultEndIcon: defaultEndIcon + }, + focus: focus, + focusFirstNode: focusFirstNode, + focusLastNode: focusLastNode, + focusNextNode: focusNextNode, + focusPreviousNode: focusPreviousNode, + focusByFirstCharacter: focusByFirstCharacter, + expandAllSiblings: expandAllSiblings, + toggleExpansion: toggleExpansion, + isExpanded: isExpanded, + isFocused: isFocused, + isSelected: isSelected, + selectNode: disableSelection ? noopSelection : selectNode, + selectRange: disableSelection ? noopSelection : selectRange, + selectNextNode: disableSelection ? noopSelection : selectNextNode, + selectPreviousNode: disableSelection ? noopSelection : selectPreviousNode, + rangeSelectToFirst: disableSelection ? noopSelection : rangeSelectToFirst, + rangeSelectToLast: disableSelection ? noopSelection : rangeSelectToLast, + selectAllNodes: disableSelection ? noopSelection : selectAllNodes, + isTabbable: isTabbable, + multiSelect: multiSelect, + getParent: getParent, + mapFirstChar: mapFirstChar, + addNodeToNodeMap: addNodeToNodeMap, + removeNodeFromNodeMap: removeNodeFromNodeMap + } + }, /*#__PURE__*/external_React_["createElement"]("ul", Object(esm_extends["a" /* default */])({ + role: "tree", + "aria-multiselectable": multiSelect, + className: Object(clsx_m["a" /* default */])(classes.root, className), + ref: ref + }, other), children)); +}); + false ? undefined : void 0; +/* harmony default export */ var esm_TreeView_TreeView = (Object(withStyles["a" /* default */])(TreeView_styles, { + name: 'MuiTreeView' +})(TreeView_TreeView)); // CONCATENATED MODULE: ./src/app/components/Explorer/index.js function Explorer_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -8673,21 +9354,50 @@ function Explorer_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + + var fetched = false; + +function makeIds(data) { + data.$nodeId = cuid_default()(); + + if (data.children) { + for (var _i = 0, _Object$entries = Object.entries(data.children); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = Explorer_slicedToArray(_Object$entries[_i], 2), + value = _Object$entries$_i[1]; + + makeIds(value); + } + } +} + /* harmony default export */ var components_Explorer = (connect_connect(function (_ref) { - var explorerOpen = _ref.explorerOpen; + var expandedItems = _ref.expandedItems, + explorerOpen = _ref.explorerOpen, + query = _ref.query; return { isOpen: explorerOpen, + query: query, setOpen: function setOpen(isOpen) { return app_store.dispatch({ type: "setExplorerOpen", value: isOpen }); + }, + expandedItems: Array.from(expandedItems), + toggleItem: function toggleItem(nodeId, optValue) { + return app_store.dispatch({ + type: "toggleItem", + nodeId: nodeId, + value: optValue + }); } }; })(function Explorer(_ref2) { var isOpen = _ref2.isOpen, - setOpen = _ref2.setOpen; + setOpen = _ref2.setOpen, + expandedItems = _ref2.expandedItems, + toggleItem = _ref2.toggleItem; var _React$useState = external_React_default.a.useState(null), _React$useState2 = Explorer_slicedToArray(_React$useState, 2), @@ -8707,6 +9417,7 @@ var fetched = false; fetch(sitePrefix + "explorer/reference.json").then(function (response) { if (response.ok) { response.json().then(function (idata) { + makeIds(idata); setData(idata || {}); }); } else { @@ -8721,18 +9432,24 @@ var fetched = false; var i = 0; if (data) { - for (var _i2 = 0, _Object$entries = Object.entries(data.children || {}); _i2 < _Object$entries.length; _i2++) { - var _Object$entries$_i = Explorer_slicedToArray(_Object$entries[_i2], 2), - key = _Object$entries$_i[0], - value = _Object$entries$_i[1]; + for (var _i2 = 0, _Object$entries2 = Object.entries(data.children || {}); _i2 < _Object$entries2.length; _i2++) { + var _Object$entries2$_i = Explorer_slicedToArray(_Object$entries2[_i2], 2), + key = _Object$entries2$_i[0], + value = _Object$entries2$_i[1]; + + if (value.$match === false) { + continue; + } children.push(Array.isArray(value) ? external_React_default.a.createElement(ExplorerCategoryItem, { key: i, title: key, - data: value + data: value, + toggle: toggleItem }) : external_React_default.a.createElement(ExplorerItem, { key: i, - data: value + data: value, + toggle: toggleItem })); i++; } @@ -8756,7 +9473,10 @@ var fetched = false; }, external_React_default.a.createElement(ExplorerHeader, { isOpen: isOpen, toggleOpen: toggleOpen + }), data && external_React_default.a.createElement(Explorer_ExplorerFilter, { + data: data }), external_React_default.a.createElement(esm_TreeView_TreeView, { + expanded: expandedItems, className: "explorer__tree " + (isOpen ? "explorer__tree-open" : "explorer__tree-open"), classes: { root: root @@ -8838,23 +9558,23 @@ window.onload = function () { }; /***/ }), -/* 56 */, -/* 57 */, -/* 58 */, -/* 59 */, -/* 60 */, -/* 61 */, -/* 62 */, -/* 63 */, -/* 64 */, -/* 65 */, -/* 66 */, -/* 67 */, /* 68 */, /* 69 */, /* 70 */, /* 71 */, -/* 72 */ +/* 72 */, +/* 73 */, +/* 74 */, +/* 75 */, +/* 76 */, +/* 77 */, +/* 78 */, +/* 79 */, +/* 80 */, +/* 81 */, +/* 82 */, +/* 83 */, +/* 84 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -8892,7 +9612,7 @@ function deepmerge(target, source) { } /***/ }), -/* 73 */ +/* 85 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -8959,7 +9679,7 @@ function _createClass(Constructor, protoProps, staticProps) { var inheritsLoose = __webpack_require__(13); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js -var assertThisInitialized = __webpack_require__(20); +var assertThisInitialized = __webpack_require__(21); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@babel/runtime/7.12.5/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js var objectWithoutPropertiesLoose = __webpack_require__(5); @@ -11259,7 +11979,7 @@ var multiKeyStore = { }; /* harmony default export */ var makeStyles_multiKeyStore = (multiKeyStore); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/styles/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/styles/esm/useTheme/useTheme.js + 1 modules -var useTheme = __webpack_require__(74); +var useTheme = __webpack_require__(86); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/prop-types/15.7.2/node_modules/prop-types/index.js var prop_types = __webpack_require__(4); @@ -12818,7 +13538,7 @@ function increment() { var esm_typeof = __webpack_require__(18); // EXTERNAL MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/utils/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/utils/esm/deepmerge.js -var deepmerge = __webpack_require__(72); +var deepmerge = __webpack_require__(84); // CONCATENATED MODULE: /Users/shukantpal/Web Projects/webdoc/common/temp/node_modules/.pnpm/registry.npmjs.org/@material-ui/styles/4.11.2_react-dom@16.14.0+react@16.14.0/node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js @@ -13125,7 +13845,7 @@ function makeStyles(stylesOrCreator) { } /***/ }), -/* 74 */ +/* 86 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; diff --git a/packages/webdoc-default-template/static/styles/index.css b/packages/webdoc-default-template/static/styles/index.css index 068765c5..196d5bca 100644 --- a/packages/webdoc-default-template/static/styles/index.css +++ b/packages/webdoc-default-template/static/styles/index.css @@ -1 +1 @@ -body,html{margin:0;padding:0;height:100%}a{text-decoration:none;color:#3f51b5}a:hover{color:#102ac0;text-decoration:underline}.docs{flex-flow:column nowrap;color:var(--color-primary-text);font-family:Roboto,Lato,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;height:100%;min-height:100vh}.docs,.docs .page{display:flex;justify-content:flex-start;align-items:stretch;align-content:stretch}.docs .page{flex-flow:row nowrap;width:100%;margin:0 auto;word-break:break-word;min-height:0;flex-grow:2;flex-basis:0}.docs .page-explorer,.docs .page-members-explorer{max-width:400px;overflow:auto}.docs .page-members-explorer{min-width:200px}.docs .page-members-explorer>:first-child{margin-top:68px}.docs .page-content>:first-child{margin-top:8px}.docs .page-content>:last-child,.docs .page-members-explorer>:last-child{margin-bottom:8px}.docs .page-content{color:var(--color-text);font-family:Arial,Roboto,sans-serif;flex-grow:2;flex-shrink:1;height:100%;overflow-x:hidden;overflow-y:auto;max-width:800px;padding-left:67px;padding-right:83px;width:0}.docs .page-content>:first-child{margin-top:24px}.docs .page-r-divider{border:1px solid var(--color-primary-light);margin:68px 0 0;height:67vh}.md h1{font-size:3em}.md h2{font-size:2em}table{border:1px solid var(--color-borders);border-collapse:collapse;margin:8px 0}table caption{font-weight:700;margin-bottom:8px;text-align:left}table th{border-bottom:1px solid var(--color-borders);font-weight:500;word-break:normal}table th,td{padding:8px;font-size:92%;text-align:left}table td{word-break:normal}table td p:first-child{margin-top:0}table td p:last-child{margin-bottom:0}.table-wrapper{display:block;overflow-x:scroll}.header-content-container{display:flex;flex-direction:column;flex-grow:1;overflow-y:auto;min-width:0;max-height:100%}.header-content-container__content{display:flex;overflow:auto}.header{background-color:#fff;border-bottom:.5px solid rgba(0,0,0,.16);height:76px;top:0;width:100%}.header__container{justify-content:space-around}.header__container,.header__contents{align-items:center;backdrop-filter:blur(48px);display:flex;height:100%}.header__contents{flex-grow:1;padding-right:110px;justify-content:flex-end}.header__contents *{margin-right:42px}.header__link{color:#000;text-decoration:underline}.header__link__current{color:#0066cd;text-decoration:none}.header__title{margin:0;padding:0;max-width:80%;width:100%}.document{font-size:.875em;line-height:1.4em;width:100%}.document__breadcrumb a{color:var(--color-text);text-decoration:underline}.document__breadcrumb>:last-child{color:var(--color-primary)}.document>.document__title{font-size:3em;line-height:1.4em;margin:18px 0}.document>.document__brief,.document>.document__description{margin-left:8px}.document>*{margin:10px 0}.explorer{background-color:var(--color-sheet-secondary);display:flex;flex-direction:column;margin:0;min-height:100%;max-height:100%;min-width:291px}.explorer .MuiTreeView-root{padding:0 8px;overflow:auto}.explorer__tree>:first-child{margin-top:8px}.explorer__tree{margin-bottom:8px}.explorer__header{align-items:center;display:flex;flex-direction:row;min-height:76px;height:76px}.explorer__header__title{font-size:28px;font-weight:700;margin-left:30px;line-height:33px}.explorer__header-opened{border-bottom:.5px solid rgba(0,0,0,.16)}.explorer__header-closed{background-color:transparent}.members__category{font-size:1.5em;font-weight:700;line-height:1.4em;padding:8px}.members>hr{border:2px solid var(--color-sheet-secondary)}.members>*{margin-top:10px;margin-bottom:10px}.member{position:relative;padding-bottom:12px;width:100%}.member__title{align-items:center;display:flex;margin-left:12px;margin-bottom:10px}.member__title>a{height:16px}.member__title>span{font-size:1.3em;margin-left:8px;line-height:1.4em}.member>.table-wrapper,.member__brief,.member__description{margin-left:8px}.member>.signature{margin-bottom:8px}.page-members-explorer{font-family:Arial,sans-serif;font-size:12px;line-height:14px}.page-members-explorer-category{margin-left:16px;margin-bottom:7px}.page-members-explorer-category__title{font-weight:700;margin-bottom:7px}.page-members-explorer-category__items{margin-left:12px;margin-top:0;margin-bottom:0;padding:0;list-style:none}.page-members-explorer__item{align-items:center;border-radius:8px 0 0 8px;display:flex;font-weight:400;height:15px;line-height:1.5;padding-left:2px;vertical-align:middle}.page-members-explorer__item a{color:var(--color-text)}.page-members-explorer__item:hover{background-color:rgba(0,0,0,.04)}pre{margin:0;width:100%;align-items:center;display:flex;border-left-color:solid;border-bottom-color:var(--color-borders);border-right-color:solid;border-top-color:1px;padding:4px 6px;overflow-x:auto}code,pre{font-family:IBM Plex Mono,Consolas,Roboto Mono,monospace;font-size:14px;border-radius:8px;vertical-align:baseline;word-break:keep-all}.hljs,code,pre{background-color:var(--color-sheet-secondary)!important}.signature{border-radius:3px;padding:6px 6px 6px 24px}.signature__container{min-height:42px;overflow-x:scroll;overflow-y:visible}:root{--color-primary:#0066cd;--color-primary-light:#8ec4fb;--color-primary-dark:#c2c2c2;--color-primary-text:#212121;--color-text:#333;--color-secondary:#ffb74d;--color-secondary-light:#ffe97d;--color-secondary-dark:#c88719;--color-borders:#d9d9d9;--color-code-background:#f5f5f5;--color-sheet-primary:#fbfbfb;--color-sheet-secondary:#f7f7f7}.footer{bottom:0;width:100%;z-index:10000}.footer__container{display:flex;flex-flow:row nowrap;justify-content:center;align-items:center;align-content:stretch}.footer__text{margin:0;padding:0;background:#fff} \ No newline at end of file +body,html{margin:0;padding:0;height:100%}a{text-decoration:none;color:#3f51b5}a:hover{color:#102ac0;text-decoration:underline}.docs{flex-flow:column nowrap;color:var(--color-primary-text);font-family:Roboto,Lato,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;height:100%;min-height:100vh}.docs,.docs .page{display:flex;justify-content:flex-start;align-items:stretch;align-content:stretch}.docs .page{flex-flow:row nowrap;width:100%;margin:0 auto;word-break:break-word;min-height:0;flex-grow:2;flex-basis:0}.docs .page-explorer,.docs .page-members-explorer{max-width:400px;overflow:auto}.docs .page-members-explorer{min-width:200px}.docs .page-members-explorer>:first-child{margin-top:68px}.docs .page-content>:first-child{margin-top:8px}.docs .page-content>:last-child,.docs .page-members-explorer>:last-child{margin-bottom:8px}.docs .page-content{color:var(--color-text);font-family:Arial,Roboto,sans-serif;flex-grow:2;flex-shrink:1;height:100%;overflow-x:hidden;overflow-y:auto;max-width:800px;padding-left:67px;padding-right:83px;width:0}.docs .page-content>:first-child{margin-top:24px}.docs .page-r-divider{border:1px solid var(--color-primary-light);margin:68px 0 0;height:67vh}.md h1{font-size:3em}.md h2{font-size:2em}table{border:1px solid var(--color-borders);border-collapse:collapse;margin:8px 0}table caption{font-weight:700;margin-bottom:8px;text-align:left}table th{border-bottom:1px solid var(--color-borders);font-weight:500;word-break:normal}table th,td{padding:8px;font-size:92%;text-align:left}table td{word-break:normal}table td p:first-child{margin-top:0}table td p:last-child{margin-bottom:0}.table-wrapper{display:block;overflow-x:scroll}.header-content-container{display:flex;flex-direction:column;flex-grow:1;overflow-y:auto;min-width:0;max-height:100%}.header-content-container__content{display:flex;overflow:auto}.header{background-color:#fff;border-bottom:.5px solid rgba(0,0,0,.16);height:76px;top:0;width:100%}.header__container{justify-content:space-around}.header__container,.header__contents{align-items:center;backdrop-filter:blur(48px);display:flex;height:100%}.header__contents{flex-grow:1;padding-right:110px;justify-content:flex-end}.header__contents *{margin-right:42px}.header__link{color:#000;text-decoration:underline}.header__link__current{color:#0066cd;text-decoration:none}.header__title{margin:0;padding:0;max-width:80%;width:100%}.document{font-size:.875em;line-height:1.4em;width:100%}.document__breadcrumb a{color:var(--color-text);text-decoration:underline}.document__breadcrumb>:last-child{color:var(--color-primary)}.document>.document__title{font-size:3em;line-height:1.4em;margin:18px 0}.document>.document__brief,.document>.document__description{margin-left:8px}.document>*{margin:10px 0}.explorer{background-color:var(--color-sheet-secondary);display:flex;flex-direction:column;margin:0;min-height:100%;max-height:100%;min-width:291px}.explorer .MuiTreeView-root{padding:0 8px;overflow:auto}.explorer input{border:1px solid rgba(0,0,0,.04);border-radius:4px;font:12px Arial;margin:8px 24px 0;min-height:32px;padding:0 8px}.explorer input:focus{border:1px solid rgba(0,0,0,.4);outline:none}.explorer__tree>:first-child{margin-top:8px}.explorer__tree{margin-bottom:8px}.explorer__header{align-items:center;display:flex;flex-direction:row;min-height:76px;height:76px}.explorer__header__title{font-size:28px;font-weight:700;margin-left:30px;line-height:33px}.explorer__header-opened{border-bottom:.5px solid rgba(0,0,0,.16)}.explorer__header-closed{background-color:transparent}.members__category{font-size:1.5em;font-weight:700;line-height:1.4em;padding:8px}.members>hr{border:2px solid var(--color-sheet-secondary)}.members>*{margin-top:10px;margin-bottom:10px}.member{position:relative;padding-bottom:12px;width:100%}.member__title{align-items:center;display:flex;margin-left:12px;margin-bottom:10px}.member__title>a{height:16px}.member__title>span{font-size:1.3em;margin-left:8px;line-height:1.4em}.member>.table-wrapper,.member__brief,.member__description{margin-left:8px}.member>.signature{margin-bottom:8px}.page-members-explorer{font-family:Arial,sans-serif;font-size:12px;line-height:14px}.page-members-explorer-category{margin-left:16px;margin-bottom:7px}.page-members-explorer-category__title{font-weight:700;margin-bottom:7px}.page-members-explorer-category__items{margin-left:12px;margin-top:0;margin-bottom:0;padding:0;list-style:none}.page-members-explorer__item{align-items:center;border-radius:8px 0 0 8px;display:flex;font-weight:400;height:15px;line-height:1.5;padding-left:2px;vertical-align:middle}.page-members-explorer__item a{color:var(--color-text)}.page-members-explorer__item:hover{background-color:rgba(0,0,0,.04)}pre{margin:0;width:100%;align-items:center;display:flex;border-left-color:solid;border-bottom-color:var(--color-borders);border-right-color:solid;border-top-color:1px;padding:4px 6px;overflow-x:auto}code,pre{font-family:IBM Plex Mono,Consolas,Roboto Mono,monospace;font-size:14px;border-radius:8px;vertical-align:baseline;word-break:keep-all}.hljs,code,pre{background-color:var(--color-sheet-secondary)!important}.signature{border-radius:3px;padding:6px 6px 6px 24px}.signature__container{min-height:42px;overflow-x:scroll;overflow-y:visible}:root{--color-primary:#0066cd;--color-primary-light:#8ec4fb;--color-primary-dark:#c2c2c2;--color-primary-text:#212121;--color-text:#333;--color-secondary:#ffb74d;--color-secondary-light:#ffe97d;--color-secondary-dark:#c88719;--color-borders:#d9d9d9;--color-code-background:#f5f5f5;--color-sheet-primary:#fbfbfb;--color-sheet-secondary:#f7f7f7}.footer{bottom:0;width:100%;z-index:10000}.footer__container{display:flex;flex-flow:row nowrap;justify-content:center;align-items:center;align-content:stretch}.footer__text{margin:0;padding:0;background:#fff} \ No newline at end of file From ef452a73fa1ca064576d109ec14a9d3253e7aa46 Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Sat, 23 Jan 2021 14:30:00 -0500 Subject: [PATCH 7/8] Revert example build --- example/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/package.json b/example/package.json index 65b48b2d..8dfb0a0d 100644 --- a/example/package.json +++ b/example/package.json @@ -23,7 +23,7 @@ }, "scripts": { "unit-test": "", - "build": "webdoc --tutorials ./tutorials", + "build": "webdoc --tutorials ./tutorials --site-root example-documentation", "build-next": "cd .. && webdoc && cd example", "build-pixi-api": "cd ../../pixi-api && webdoc --site-root docs && cd ../webdoc/example", "build-pixi-api-prod": "cd ../../pixi-api && webdoc --site-root pixi-api && cd ../webdoc/example" From c7e6d1977f36c26026c6ef1e59562fd4fdc1d862 Mon Sep 17 00:00:00 2001 From: Shukant Pal Date: Sat, 23 Jan 2021 14:30:50 -0500 Subject: [PATCH 8/8] Update semver --- packages/webdoc-default-template/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/webdoc-default-template/package.json b/packages/webdoc-default-template/package.json index 6f449ae2..432b977e 100644 --- a/packages/webdoc-default-template/package.json +++ b/packages/webdoc-default-template/package.json @@ -81,8 +81,8 @@ "sass-loader": "^9.0.3", "webpack": "^4.43.0", "webpack-stream": "^5.2.1", - "redux": "~4.0.5", - "react-redux": "~7.2.2", - "lodash": "~4.17.20" + "redux": "^4.0.5", + "react-redux": "^7.2.2", + "lodash": "^4.17.20" } }