tocco-admin 1.0.44 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/changelog.md +4 -0
  2. package/dist/chunk-135.a2f32a62486e579d897b.js +1 -0
  3. package/dist/{chunk-143.07fb6e3ab17c62d06e0e.js → chunk-143.fc16be291cf6d54ca4b8.js} +1 -2
  4. package/dist/{chunk-383.3bea29cae95f2d47b418.js → chunk-383.aa4aad85c4802ddbd3a9.js} +1 -2
  5. package/dist/{chunk-399.355bc76f23887d9a37b3.js → chunk-399.03d6b40ef2591128a669.js} +1 -2
  6. package/dist/{chunk-44.bf59c78f5a5d21755958.js → chunk-44.e3196f993039e3b60173.js} +1 -2
  7. package/dist/{chunk-813.4998affef210c5dbd815.js → chunk-498.4934250eb7477bdacd04.js} +7 -8
  8. package/dist/{chunk-611.26848ba322eb3c41ce8b.js → chunk-611.a41cc743af6f875068f3.js} +1 -2
  9. package/dist/{chunk-633.9552786aee4e7f99f623.js → chunk-633.42a7aa51f1557a183a9b.js} +1 -2
  10. package/dist/{chunk-701.8b1211e0545b404ca702.js → chunk-701.3662adf1a6b672e52f16.js} +1 -2
  11. package/dist/{chunk-884.ce155145c201a7fd4e8b.js → chunk-884.4ded078b91383b749516.js} +1 -2
  12. package/dist/{chunk-949.505f8d4e1df3d922358f.js → chunk-949.353a8ded32aea5ad11d7.js} +1 -2
  13. package/dist/{chunk-actions.218163a53759832011b1.js → chunk-actions.400ef33beac096e0c968.js} +1 -2
  14. package/dist/chunk-code-editor.a23fc9febce5842514d0.js +1 -0
  15. package/dist/chunk-phone-formatter.918582677a5684e3737b.js +1 -0
  16. package/dist/chunk-vendor-icons.6d7f9999f6abc775b3bc.js +1 -0
  17. package/dist/index.js +2 -3
  18. package/package.json +1 -1
  19. package/dist/chunk-143.07fb6e3ab17c62d06e0e.js.map +0 -1
  20. package/dist/chunk-18.e1b24b703c97426d790a.js +0 -2
  21. package/dist/chunk-18.e1b24b703c97426d790a.js.map +0 -1
  22. package/dist/chunk-383.3bea29cae95f2d47b418.js.map +0 -1
  23. package/dist/chunk-399.355bc76f23887d9a37b3.js.map +0 -1
  24. package/dist/chunk-44.bf59c78f5a5d21755958.js.map +0 -1
  25. package/dist/chunk-611.26848ba322eb3c41ce8b.js.map +0 -1
  26. package/dist/chunk-633.9552786aee4e7f99f623.js.map +0 -1
  27. package/dist/chunk-701.8b1211e0545b404ca702.js.map +0 -1
  28. package/dist/chunk-813.4998affef210c5dbd815.js.map +0 -1
  29. package/dist/chunk-884.ce155145c201a7fd4e8b.js.map +0 -1
  30. package/dist/chunk-949.505f8d4e1df3d922358f.js.map +0 -1
  31. package/dist/chunk-actions.218163a53759832011b1.js.map +0 -1
  32. package/dist/chunk-code-editor.5079bb8da3a832f77b2c.js +0 -2
  33. package/dist/chunk-code-editor.5079bb8da3a832f77b2c.js.map +0 -1
  34. package/dist/chunk-phone-formatter.9a315c77d97352ad918e.js +0 -2
  35. package/dist/chunk-phone-formatter.9a315c77d97352ad918e.js.map +0 -1
  36. package/dist/chunk-vendor-icons.5c5ab8af221c75ca9bc9.js +0 -1
  37. package/dist/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./packages/widgets/docs-browser/src/modules/create/actions.js","webpack:///./packages/widgets/docs-browser/src/modules/path/actions.js","webpack:///./packages/widgets/docs-browser/src/utils/isRootLocation.js","webpack:///./packages/widgets/docs-browser/src/components/DocsBrowser/Breadcrumbs/Breadcrumbs.js","webpack:///./packages/widgets/docs-browser/src/components/DocsBrowser/Breadcrumbs/RouterlessBreadcrumbs.js","webpack:///./packages/widgets/docs-browser/src/components/DocsBrowser/Breadcrumbs/BreadcrumbsContainer.js","webpack:///./packages/widgets/docs-browser/src/modules/list/actions.js","webpack:///./packages/widgets/docs-browser/src/components/Action/LazyAction.js","webpack:///./packages/widgets/docs-browser/src/components/FileInput/FileInput.js","webpack:///./packages/widgets/docs-browser/src/components/FileInput/FileInputContainer.js","webpack:///./packages/widgets/docs-browser/src/components/DocsView/StyledComponents.js","webpack:///./packages/widgets/docs-browser/src/components/DocsView/DocsView.js","webpack:///./packages/widgets/docs-browser/src/components/DocsView/DocsViewContainer.js","webpack:///./packages/widgets/docs-browser/src/components/DocumentView/StyledComponents.js","webpack:///./packages/widgets/docs-browser/src/components/DocumentView/DocumentView.js","webpack:///./packages/widgets/docs-browser/src/components/DocumentView/DocumentViewContainer.js","webpack:///./packages/widgets/docs-browser/src/components/DocsBrowser/Content/RouterlessContent.js","webpack:///./packages/widgets/docs-browser/src/components/DocsBrowser/Content/RoutesContent.js","webpack:///./packages/widgets/docs-browser/src/components/DocsBrowser/Content/ContentContainer.js","webpack:///./packages/widgets/docs-browser/src/components/DocsBrowser/StyledComponents.js","webpack:///./packages/widgets/docs-browser/src/components/DocsBrowser/DocsBrowser.js","webpack:///./packages/widgets/docs-browser/src/components/DocsBrowser/DocsBrowserContainer.js","webpack:///./packages/widgets/docs-browser/src/components/App/RouterlessApp.js","webpack:///./packages/widgets/docs-browser/src/components/App/InheritedApp.js","webpack:///./packages/widgets/docs-browser/src/components/App/StandaloneApp.js","webpack:///./packages/widgets/docs-browser/src/input.js","webpack:///./packages/widgets/docs-browser/src/modules/create/reducer.js","webpack:///./packages/widgets/docs-browser/src/modules/create/sagas.js","webpack:///./packages/widgets/docs-browser/src/modules/create/index.js","webpack:///./packages/widgets/docs-browser/src/modules/list/reducer.js","webpack:///./packages/widgets/docs-browser/src/modules/list/index.js","webpack:///./packages/widgets/docs-browser/src/modules/list/sagas.js","webpack:///./packages/widgets/docs-browser/src/modules/move/reducer.js","webpack:///./packages/widgets/docs-browser/src/modules/move/sagas.js","webpack:///./packages/widgets/docs-browser/src/modules/move/index.js","webpack:///./packages/widgets/docs-browser/src/modules/path/reducer.js","webpack:///./packages/widgets/docs-browser/src/modules/path/sagas.js","webpack:///./packages/widgets/docs-browser/src/modules/path/index.js","webpack:///./packages/widgets/docs-browser/src/modules/routing/reducer.js","webpack:///./packages/widgets/docs-browser/src/modules/routing/sagas.js","webpack:///./packages/widgets/docs-browser/src/modules/routing/index.js","webpack:///./packages/widgets/docs-browser/src/modules/reducers.js","webpack:///./packages/widgets/docs-browser/src/main.js","webpack:///./packages/widgets/docs-browser/src/modules/move/actions.js","webpack:///./packages/widgets/docs-browser/src/modules/routing/actions.js","webpack:///./packages/widgets/docs-browser/src/utils/getNode.js","webpack:///./packages/widgets/docs-browser/src/utils/withRouter.js","webpack:///./packages/widgets/docs-browser/src/utils/withRouterTypeCompProvider.js","webpack:///./node_modules/history/DOMUtils.js","webpack:///./node_modules/history/LocationUtils.js","webpack:///./node_modules/history/PathUtils.js","webpack:///./node_modules/history/createHashHistory.js","webpack:///./node_modules/history/createTransitionManager.js"],"names":["OPEN_DIALOG","FILES_SELECTED","LOAD_BREADCRUMBS","SET_BREADCRUMBS","SET_SEARCH_MODE","setBreadcrumbs","breadcrumbs","type","payload","ROOT_PATH_REGEX","pathname","test","withTheme","embedded","resetSearchMode","theme","pathPrefix","breadcrumbsInfo","Breadcrumbs","backgroundColor","themeUtil","onClick","breadcrumbsItem","path","BreadcrumbLink","props","navigate","linkComp","mapActionCreators","mapStateToProps","state","docs","input","RouterBreadcumbs","connect","injectIntl","RouterlessBreadcrumbs","RouterlessBreadcrumbsComp","withRouterTypeCompProvider","routerless","router","CHANGE_LIST_PARENT","CHANGE_SELECTION","CHANGE_SEARCH_FORM_COLLAPSED","SET_SEARCH_FORM_COLLAPSED","SET_SCROLL_BEHAVIOUR","actions","lazy","delete","appId","LazyAction","consoleLogger","ActionComponent","emitAction","action","actionEmitter","Suspense","fallback","LoadMask","instanceCount","directory","onChange","fileInput","useRef","prevInstanceCount","react","useEffect","current","click","ref","style","display","e","files","target","length","value","multiple","webkitdirectory","location","isDirectory","create","dialog","FileInput","StyledContentWrapper","styled","StyledIconWrapper","scale","LazyListApp","React","domainTypes","rootNodes","navigationStrategy","changeListParent","onSearchChange","openFileDialog","limit","searchFormType","selectionStyle","getCustomLocation","disableViewPersistor","getListFormName","domainDetailFormName","folderDetailFormName","showActions","scrollBehaviour","sortable","searchMode","openResource","searchFormCollapsed","locale","changeSelection","changeSearchFormCollapsed","params","useReducer","x","entityListNumber","forceEntityListUpdate","entityListKey","useState","selection","setSelection","parent","useMemo","model","charAt","toUpperCase","slice","key","getParent","keys","map","node","entityName","formName","getFormName","mounted","searchModeRef","onSelectChange","tql","Array","isArray","join","getTql","handleUploadDocument","definition","config","onSuccess","onError","handleUploadDirectory","store","undefined","isRootLocation","viewPersistor","id","searchListFormName","onRowClick","searchStore","split","Error","getDefaultLocation","searchFormPosition","onStoreCreate","cellRenderers","rowData","column","cellRenderer","icon","children","filter","c","dmsEntityModel","actionAppComponent","Action","contextParams","detailFormNames","Domain","Folder","customActions","onSearchFormCollapsedChange","collapsed","listLimit","list","intl","DocsView","StyledDocumentViewWrapper","LazyDetailApp","entityId","mode","onEntityDeleted","lastList","reverse","find","breadcrumb","lastListUrl","documentDetailFormName","DocumentView","handleSearchChange","docsKey","view","exact","render","RouterlessContent","RoutesContent","StyledWrapper","StyledContent","StyledScrollbar","StyledBreadcrumbs","noLeftPadding","setSearchMode","loadBreadcrumbs","docsViewNumber","forceDocsViewUpdate","query","hasUserChanges","DocsBrowser","withInternalRouter","handleNotifications","rootPath","notification","GlobalStyles","to","history","getDispatchActions","actionSettings","name","argsFactory","ACTION_HANDLERS","initialState","handleFilesSelected","createDocuments","mainSagas","dialogSelector","textResourceSelector","messages","call","uuid","blockingInfoId","put","select","response","status","title","message","remoteEvents","entities","body","items","item","bean","msgId","getNode","formData","FormData","file","append","f","resource","options","method","acceptedStatusCodes","rest","all","takeEvery","sagas","fork","moduleSagas","handler","reducerUtil","externalEvents","takeLatest","isWaiting","moveElements","setDone","inputSelector","move","targetEntityKey","selectedEntityKeys","selected","errorCode","validation","errors","ids","getSearchBreadcrumbs","getRootNodesParam","docsPathSelector","rootNodesSelector","url","rootnodes","queryParams","result","setParams","route","combineReducers","routing","pathSagas","createSagas","listSagas","moveSagas","routingSagas","packageName","EXTERNAL_EVENTS","getContent","routerType","createHashHistory","getUserConfirmation","confirmCallback","getState","okText","cancelText","dispatch","createHistory","initApp","events","publicPath","appFactory","reducers","env","errorLogging","cache","singleRootNode","toLowerCase","content","initialLocation","textResourceModules","DocsBrowserApp","component","prevProps","changedProps","_pickBy","_isEqual","_isEmpty","forEach","propTypes","PropTypes","searchFormTypePropTypes","selectionStylePropType","scrollBehaviourPropType","businessUnit","backendUrl","appContext","reduce","event","INITIALIZE","MOVE_ELEMENTS","SET_WAITING","CLOSE","initialize","setWaiting","close","NAVIGATE","SET_PARAMS","DOC_PATH_REGEX","PARENT_PATH_REGEX","docMatches","exec","getResourceNode","parentMatches","getParentNode","withReactRouter","WrappedComponent","useLocation","useHistory","useParams","push","compProviderRouterType","RouterlessComp","RouterComp","exports","__esModule","canUseDOM","window","document","createElement","addEventListener","listener","attachEvent","removeEventListener","detachEvent","getConfirmation","callback","confirm","supportsHistory","ua","navigator","userAgent","indexOf","supportsPopStateOnHashChange","supportsGoWithoutReloadUsingHash","isExtraneousPopstateEvent","locationsAreEqual","createLocation","_extends","Object","assign","i","arguments","source","prototype","hasOwnProperty","_resolvePathname2","_interopRequireDefault","_valueEqual2","_PathUtils","obj","default","currentLocation","parsePath","search","hash","decodeURI","URIError","a","b","addLeadingSlash","stripLeadingSlash","substr","hasBasename","prefix","RegExp","stripBasename","stripTrailingSlash","hashIndex","searchIndex","createPath","_warning2","_invariant2","_LocationUtils","_createTransitionManager2","_DOMUtils","HashChangeEvent","HashPathCoders","hashbang","encodePath","decodePath","noslash","slash","getHashPath","href","substring","pushHashPath","replaceHashPath","replace","globalHistory","canGoWithoutReload","_props$getUserConfirm","_props$hashType","hashType","basename","_HashPathCoders$hashT","getDOMLocation","transitionManager","setState","nextState","notifyListeners","forceNextPop","ignorePath","handleHashChange","encodedPath","prevLocation","handlePop","confirmTransitionTo","ok","revertPop","fromLocation","toLocation","toIndex","allPaths","lastIndexOf","fromIndex","delta","go","createHref","prevIndex","nextPaths","n","goBack","goForward","listenerCount","checkDOMListeners","isBlocked","block","prompt","unblock","setPrompt","listen","unlisten","appendListener","_warning","listeners","nextPrompt","fn","isActive","apply","_len","args","_key"],"mappings":"weAAaA,EAAc,0BACdC,EAAiB,6BCDjBC,EAAmB,6BACnBC,EAAkB,4BAClBC,EAAkB,4BASlBC,EAAiB,SAAAC,GAAW,MAAK,CAC5CC,KAAMJ,EACNK,QAAS,CACPF,iB,0CCdEG,EAAkB,cAIxB,QAFuB,SAAAC,GAAQ,OAAID,EAAgBE,KAAKD,I,inBC2BxD,SAAeE,SAzBgB,SAAC,GAAoE,IAAnEC,EAAmE,EAAnEA,SAAUC,EAAyD,EAAzDA,gBAAiBC,EAAwC,EAAxCA,MAAOC,EAAiC,EAAjCA,WAAYC,EAAqB,EAArBA,gBAO7E,OACE,SAACC,EAAA,EAAD,OACOL,EAAW,CAACM,gBAAiBC,UAAgB,QAAhBA,CAAyB,CAACL,WAAW,IADzE,IAEEM,QAT2B,SAAAC,GACA,KAAzBA,EAAgBC,MAClBT,KAQAE,WAAYA,EACZC,gBAAiBA,Q,kkBCZvB,IAAMO,GAAiB,SAAAC,GACrB,OAAO,sBAAUA,KA+BnB,UAAeb,SA5BgB,SAAC,GAA8E,IAA7EC,EAA6E,EAA7EA,SAAUa,EAAmE,EAAnEA,SAAUZ,EAAyD,EAAzDA,gBAAiBC,EAAwC,EAAxCA,MAAOC,EAAiC,EAAjCA,WAAYC,EAAqB,EAArBA,gBAQvF,OACE,SAACC,EAAA,EAAD,SACOL,EAAW,CAACM,gBAAiBC,UAAgB,QAAhBA,CAAyB,CAACL,WAAW,IADzE,IAEEM,QAV2B,SAAAC,GACA,KAAzBA,EAAgBC,MAClBT,IAEFY,EAAS,SAAD,OAAUJ,EAAgBC,QAOhCI,SAAUH,GACVR,WAAYA,EACZC,gBAAiBA,QCfvB,IAAMW,GAAoB,GAEpBC,GAAkB,SAAAC,GA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D,iBAAXhM,EAC0B,mBAAxBe,EACTA,EAAoBf,EAAQ0F,KAE5B,EAAI6C,EAAUpB,UAAS,EAAO,mFAE9BzB,GAAS,IAIXA,GAAoB,IAAX1F,QAGX0F,GAAS,IAoCX2G,eA9BmB,SAAwBI,GAC3C,IAAIC,GAAW,EAEXrH,EAAW,WACTqH,GAAUD,EAAGE,WAAMtV,EAAWqP,YAKpC,OAFA6F,EAAU7H,KAAKW,GAER,WACLqH,GAAW,EACXH,EAAYA,EAAUhU,QAAO,SAAU+E,GACrC,OAAOA,IAAS+H,OAmBpB+E,gBAdoB,WACpB,IAAK,IAAIwC,EAAOlG,UAAUjU,OAAQoa,EAAOnW,MAAMkW,GAAOE,EAAO,EAAGA,EAAOF,EAAME,IAC3ED,EAAKC,GAAQpG,UAAUoG,GAGzBP,EAAU7J,SAAQ,SAAU2C,GAC1B,OAAOA,EAASsH,WAAMtV,EAAWwV","file":"chunk-884.ce155145c201a7fd4e8b.js","sourcesContent":["export const OPEN_DIALOG = 'docs/create/OPEN_DIALOG'\nexport const FILES_SELECTED = 'docs/create/FILES_SELECTED'\n\nexport const openDialog = (directory, onSuccess, onError) => ({\n type: OPEN_DIALOG,\n payload: {\n directory,\n onSuccess,\n onError\n }\n})\n\nexport const filesSelected = (location, files, isDirectory) => ({\n type: FILES_SELECTED,\n payload: {\n location,\n files,\n isDirectory\n }\n})\n","export const LOAD_BREADCRUMBS = 'docs/path/LOAD_BREADCRUMBS'\nexport const SET_BREADCRUMBS = 'docs/path/SET_BREADCRUMBS'\nexport const SET_SEARCH_MODE = 'docs/path/SET_SEARCH_MODE'\n\nexport const loadBreadcrumbs = location => ({\n type: LOAD_BREADCRUMBS,\n payload: {\n location\n }\n})\n\nexport const setBreadcrumbs = breadcrumbs => ({\n type: SET_BREADCRUMBS,\n payload: {\n breadcrumbs\n }\n})\n\nexport const setSearchMode = searchMode => ({\n type: SET_SEARCH_MODE,\n payload: {\n searchMode\n }\n})\n","const ROOT_PATH_REGEX = /^\\/docs\\/?$/\n\nconst isRootLocation = pathname => ROOT_PATH_REGEX.test(pathname)\n\nexport default isRootLocation\n","import PropTypes from 'prop-types'\nimport {withTheme} from 'styled-components'\nimport {Breadcrumbs, theme as themeUtil} from 'tocco-ui'\n\nconst DocsBrowserBreadcrumbs = ({embedded, resetSearchMode, theme, pathPrefix, breadcrumbsInfo}) => {\n const handleBreadcrumbsClick = breadcrumbsItem => {\n if (breadcrumbsItem.path === '') {\n resetSearchMode()\n }\n }\n\n return (\n <Breadcrumbs\n {...(embedded ? {backgroundColor: themeUtil.color('paper')({theme})} : {})}\n onClick={handleBreadcrumbsClick}\n pathPrefix={pathPrefix}\n breadcrumbsInfo={breadcrumbsInfo}\n />\n )\n}\n\nDocsBrowserBreadcrumbs.propTypes = {\n embedded: PropTypes.bool,\n resetSearchMode: PropTypes.func,\n pathPrefix: PropTypes.string,\n breadcrumbsInfo: PropTypes.array,\n theme: PropTypes.object\n}\n\nexport default withTheme(DocsBrowserBreadcrumbs)\n","import PropTypes from 'prop-types'\nimport {withTheme} from 'styled-components'\nimport {Breadcrumbs, theme as themeUtil} from 'tocco-ui'\n\nconst BreadcrumbLink = props => {\n return <span {...props}></span>\n}\n\nconst DocsBrowserBreadcrumbs = ({embedded, navigate, resetSearchMode, theme, pathPrefix, breadcrumbsInfo}) => {\n const handleBreadcrumbsClick = breadcrumbsItem => {\n if (breadcrumbsItem.path === '') {\n resetSearchMode()\n }\n navigate(`/docs/${breadcrumbsItem.path}`)\n }\n\n return (\n <Breadcrumbs\n {...(embedded ? {backgroundColor: themeUtil.color('paper')({theme})} : {})}\n onClick={handleBreadcrumbsClick}\n linkComp={BreadcrumbLink}\n pathPrefix={pathPrefix}\n breadcrumbsInfo={breadcrumbsInfo}\n />\n )\n}\n\nDocsBrowserBreadcrumbs.propTypes = {\n embedded: PropTypes.bool,\n resetSearchMode: PropTypes.func,\n navigate: PropTypes.func,\n pathPrefix: PropTypes.string,\n breadcrumbsInfo: PropTypes.array,\n theme: PropTypes.object\n}\n\nexport default withTheme(DocsBrowserBreadcrumbs)\n","import {injectIntl} from 'react-intl'\nimport {connect} from 'react-redux'\n\nimport {withRouterTypeCompProvider} from '../../../utils/withRouterTypeCompProvider'\nimport Breadcrumbs from './Breadcrumbs'\nimport RouterlessBreadcrumbsComp from './RouterlessBreadcrumbs'\n\nconst mapActionCreators = {}\n\nconst mapStateToProps = state => ({\n pathPrefix: '/docs',\n breadcrumbsInfo: state.docs.path.breadcrumbs,\n embedded: state.input.embedded\n})\n\nconst RouterBreadcumbs = connect(mapStateToProps, mapActionCreators)(injectIntl(Breadcrumbs))\nconst RouterlessBreadcrumbs = connect(mapStateToProps, mapActionCreators)(injectIntl(RouterlessBreadcrumbsComp))\n\nexport default withRouterTypeCompProvider({routerless: RouterlessBreadcrumbs, router: RouterBreadcumbs})\n","export const CHANGE_LIST_PARENT = 'docs/list/CHANGE_LIST_PARENT'\nexport const CHANGE_SELECTION = 'docs/list/CHANGE_SELECTION'\nexport const CHANGE_SEARCH_FORM_COLLAPSED = 'docs/list/CHANGE_SEARCH_FORM_COLLAPSED'\nexport const SET_SEARCH_FORM_COLLAPSED = 'docs/list/SET_SEARCH_FORM_COLLAPSED'\nexport const SET_SCROLL_BEHAVIOUR = 'docs/list/SET_SCROLL_BEHAVIOUR'\n\nexport const changeListParent = parent => ({\n type: CHANGE_LIST_PARENT,\n payload: {\n parent\n }\n})\n\nexport const changeSelection = selection => ({\n type: CHANGE_SELECTION,\n payload: {\n selection\n }\n})\n\nexport const changeSearchFormCollapsed = collapsed => ({\n type: CHANGE_SEARCH_FORM_COLLAPSED,\n payload: {\n collapsed\n }\n})\n\nexport const setSearchFormCollapsed = searchFormCollapsed => ({\n type: SET_SEARCH_FORM_COLLAPSED,\n payload: {\n searchFormCollapsed\n }\n})\n\nexport const setScrollBehaviour = scrollBehaviour => ({\n type: SET_SCROLL_BEHAVIOUR,\n payload: {\n scrollBehaviour\n }\n})\n","import PropTypes from 'prop-types'\nimport {lazy, Suspense} from 'react'\nimport {connect} from 'react-redux'\nimport {actionEmitter} from 'tocco-app-extensions'\nimport {LoadMask} from 'tocco-ui'\nimport {consoleLogger} from 'tocco-util'\n\nconst actions = {\n 'dms-create-folder': lazy(() => import(/* webpackChunkName: \"docs-actions\" */ './actions/CreateFolder')),\n 'dms-create-domain': lazy(() => import(/* webpackChunkName: \"docs-actions\" */ './actions/CreateDomain')),\n 'dms-edit': lazy(() => import(/* webpackChunkName: \"docs-actions\" */ './actions/Edit')),\n 'dms-move': lazy(() => import(/* webpackChunkName: \"docs-actions\" */ './actions/MoveContainer')),\n delete: lazy(() => import(/* webpackChunkName: \"docs-actions\" */ './actions/Delete'))\n}\n\nconst renderLoader = () => <LoadMask />\n\nconst LazyAction = props => {\n const {appId} = props\n const LazyAction = actions[appId]\n\n if (!LazyAction) {\n consoleLogger.logError(`no action found with id: ${appId}`)\n return null\n }\n\n const ActionComponent = connect(null, {\n emitAction: action => actionEmitter.dispatchEmittedAction(action)\n })(LazyAction)\n\n return (\n <Suspense fallback={renderLoader()}>\n <ActionComponent {...props} />\n </Suspense>\n )\n}\n\nLazyAction.propTypes = {\n appId: PropTypes.string.isRequired\n}\n\nexport default LazyAction\n","import PropTypes from 'prop-types'\nimport {useRef, useEffect} from 'react'\nimport {react} from 'tocco-util'\n\nconst FileInput = ({instanceCount, directory, onChange, path}) => {\n const fileInput = useRef()\n\n const prevInstanceCount = react.usePrevious(instanceCount)\n\n useEffect(() => {\n if (fileInput.current && instanceCount > prevInstanceCount) {\n fileInput.current.click()\n }\n })\n\n const handleChange = e => {\n const files = e.target.files\n if (files && files.length > 0 && onChange) {\n onChange(path, files, directory)\n }\n e.target.value = null\n }\n\n return (\n <input\n type=\"file\"\n ref={fileInput}\n style={{display: 'none'}}\n onChange={handleChange}\n multiple\n {...(directory ? {webkitdirectory: 'true', directory: 'true'} : {})}\n />\n )\n}\n\nFileInput.propTypes = {\n instanceCount: PropTypes.number.isRequired,\n directory: PropTypes.bool,\n onChange: PropTypes.func,\n path: PropTypes.string\n}\n\nexport default FileInput\n","import {connect} from 'react-redux'\n\nimport {filesSelected} from '../../modules/create/actions'\nimport {withRouterTypeCompProvider} from '../../utils/withRouterTypeCompProvider'\nimport FileInput from './FileInput'\n\nconst mapActionCreators = {\n onChange: filesSelected\n}\n\nconst mapStateToProps = state => ({\n instanceCount: state.docs.create.dialog.instanceCount,\n directory: state.docs.create.dialog.directory\n})\n\nexport default withRouterTypeCompProvider(connect(mapStateToProps, mapActionCreators)(FileInput))\n","import styled from 'styled-components'\nimport {scale} from 'tocco-ui'\n\nexport const StyledContentWrapper = styled.div`\n display: flex;\n align-items: center;\n`\n\nexport const StyledIconWrapper = styled.span`\n font-size: ${scale.font(1)};\n display: inline-block;\n margin-right: ${scale.space(-2)};\n`\n","import PropTypes from 'prop-types'\nimport React, {Suspense, useEffect, useMemo, useReducer, useRef, useState} from 'react'\nimport {searchFormTypePropTypes, selectionStylePropType} from 'tocco-entity-list/src/main'\nimport {Icon, LoadMask, scrollBehaviourPropType} from 'tocco-ui'\nimport {viewPersistor} from 'tocco-util'\n\nimport isRootLocation from '../../utils/isRootLocation'\nimport Action from '../Action'\nimport FileInput from '../FileInput'\nimport {StyledContentWrapper, StyledIconWrapper} from './StyledComponents'\n\nexport const getParent = params => {\n if (params && params.model) {\n const model = params.model.charAt(0).toUpperCase() + params.model.slice(1)\n const key = params.key\n const fullKey = `${model}/${key}`\n return {\n model: 'Docs_list_item',\n key: fullKey // e.g. \"Domain/118\"\n }\n }\n return null\n}\n\nexport const getTql = domainTypes =>\n Array.isArray(domainTypes) && domainTypes.length > 0\n ? `exists(relDomain_type where IN(unique_id, ${domainTypes.map(type => `\"${type}\"`).join(',')}))`\n : null\n\nexport const getFormName = (parent, keys) =>\n parent ? 'Docs_list_item' : keys ? 'Root_docs_list_item_specific' : 'Root_docs_list_item'\n\nexport const getDefaultLocation = (model, key) => {\n switch (model) {\n case 'Domain':\n return `/docs/domain/${key}/list`\n case 'Folder':\n return `/docs/folder/${key}/list`\n case 'Resource':\n return `/docs/doc/${key}/detail`\n default:\n throw new Error(`Unexpected model: ${model}`)\n }\n}\n\nconst LazyListApp = React.lazy(() => import('./LazyListApp'))\n\nconst DocsView = props => {\n const {\n domainTypes,\n rootNodes,\n navigationStrategy,\n changeListParent,\n onSearchChange,\n emitAction,\n openFileDialog,\n limit,\n searchFormType,\n selectionStyle,\n getCustomLocation,\n disableViewPersistor,\n getListFormName,\n domainDetailFormName,\n folderDetailFormName,\n showActions,\n scrollBehaviour,\n sortable,\n searchMode,\n openResource,\n searchFormCollapsed,\n locale,\n changeSelection,\n changeSearchFormCollapsed,\n params,\n navigate,\n path\n } = props\n // eslint-disable-next-line no-unused-vars\n const [entityListNumber, forceEntityListUpdate] = useReducer(x => x + 1, 0)\n\n const entityListKey = `entity-list-${entityListNumber}`\n\n const [selection, setSelection] = useState([])\n const parent = useMemo(() => getParent(params), [params])\n\n const keys = !parent && rootNodes ? rootNodes.map(node => `${node.entityName}/${node.key}`) : null\n const formName = useMemo(\n () => (getListFormName ? getListFormName(parent, keys) : getFormName(parent, keys)),\n [parent, keys, getListFormName]\n )\n\n const mounted = useRef(false)\n const searchModeRef = useRef(searchMode)\n\n searchModeRef.current = searchMode\n\n useEffect(() => {\n mounted.current = true\n return () => (mounted.current = false)\n })\n\n useEffect(() => {\n changeListParent(parent)\n setSelection([])\n }, [parent, changeListParent])\n\n const onSelectChange = selection => {\n setSelection(selection)\n changeSelection(selection)\n }\n\n const handleRowClick = ({id}) => {\n onSelectChange([id])\n\n if (searchModeRef.current && isRootLocation(path)) {\n if (!viewPersistor.viewInfoSelector('search').store) {\n // persist search store to allow a \"go back to search\"\n const searchStore = viewPersistor.viewInfoSelector(entityListKey).store\n viewPersistor.persistViewInfo('search', {store: searchStore})\n }\n forceEntityListUpdate()\n }\n\n const [model, key] = id.split('/')\n const location = getCustomLocation ? getCustomLocation(model, key) : getDefaultLocation(model, key)\n\n if (location) {\n if (openResource && model === 'Resource') {\n openResource(location)\n } else {\n navigate(location)\n }\n }\n }\n\n const tql = !parent && !keys ? getTql(domainTypes) : null\n\n const handleUploadDocument = function* (definition, selection, parent, params, config, onSuccess, onError) {\n const directory = false\n openFileDialog(directory, onSuccess, onError)\n }\n\n const handleUploadDirectory = function* (definition, selection, parent, params, config, onSuccess, onError) {\n const directory = true\n openFileDialog(directory, onSuccess, onError)\n }\n\n const handleSearch = e => {\n if (mounted.current) {\n onSearchChange(e)\n }\n }\n\n const store = disableViewPersistor\n ? undefined\n : isRootLocation(path)\n ? viewPersistor.viewInfoSelector('search').store\n : null\n\n const handleStoreCreation = store => {\n if (!disableViewPersistor) {\n viewPersistor.persistViewInfo(entityListKey, {store})\n }\n }\n\n return (\n <>\n <Suspense fallback={<LoadMask />}>\n <LazyListApp\n key={entityListKey}\n id=\"documents\"\n entityName=\"Docs_list_item\"\n formName={formName}\n searchListFormName=\"Search_docs_list_item\"\n limit={limit || 25}\n onRowClick={handleRowClick}\n searchFormPosition=\"left\"\n searchFormType={searchFormType || 'admin'}\n parent={parent}\n onSearchChange={handleSearch}\n store={store}\n onStoreCreate={handleStoreCreation}\n cellRenderers={{\n 'dms-label-with-icon': (rowData, column, cellRenderer) => (\n <StyledContentWrapper>\n <StyledIconWrapper>\n <Icon icon={rowData.icon} />\n </StyledIconWrapper>\n <span>{cellRenderer(column.children[0])}</span>\n </StyledContentWrapper>\n ),\n 'dms-actions': (rowData, column, cellRenderer) => (\n <StyledContentWrapper>\n {column.children\n .filter(c => !c.dmsEntityModel || c.dmsEntityModel === rowData.type)\n .map(c => cellRenderer(c))}\n </StyledContentWrapper>\n )\n }}\n emitAction={emitAction}\n actionAppComponent={Action}\n contextParams={{\n detailFormNames: {\n Domain: domainDetailFormName,\n Folder: folderDetailFormName\n }\n }}\n customActions={{\n 'upload-document': handleUploadDocument,\n 'upload-directory': handleUploadDirectory\n }}\n navigationStrategy={navigationStrategy}\n tql={tql}\n keys={keys}\n selectionStyle={selectionStyle || 'multi_explicit'}\n onSelectChange={onSelectChange}\n selection={selection}\n showActions={showActions}\n sortable={sortable}\n searchFormCollapsed={searchFormCollapsed}\n scrollBehaviour={scrollBehaviour}\n onSearchFormCollapsedChange={changeSearchFormCollapsed}\n locale={locale}\n />\n </Suspense>\n <FileInput />\n </>\n )\n}\n\nDocsView.propTypes = {\n navigationStrategy: PropTypes.object,\n domainTypes: PropTypes.arrayOf(PropTypes.string),\n rootNodes: PropTypes.arrayOf(\n PropTypes.shape({\n entityName: PropTypes.string,\n key: PropTypes.string\n })\n ),\n path: PropTypes.string.isRequired,\n params: PropTypes.object.isRequired,\n navigate: PropTypes.func.isRequired,\n changeListParent: PropTypes.func.isRequired,\n onSearchChange: PropTypes.func.isRequired,\n emitAction: PropTypes.func.isRequired,\n openFileDialog: PropTypes.func.isRequired,\n limit: PropTypes.number,\n searchFormType: searchFormTypePropTypes,\n selectionStyle: selectionStylePropType,\n getCustomLocation: PropTypes.func,\n disableViewPersistor: PropTypes.bool,\n getListFormName: PropTypes.func,\n domainDetailFormName: PropTypes.string,\n folderDetailFormName: PropTypes.string,\n showActions: PropTypes.bool,\n sortable: PropTypes.bool,\n searchMode: PropTypes.bool,\n openResource: PropTypes.func,\n searchFormCollapsed: PropTypes.bool,\n scrollBehaviour: scrollBehaviourPropType,\n locale: PropTypes.string,\n changeSelection: PropTypes.func.isRequired,\n changeSearchFormCollapsed: PropTypes.func.isRequired\n}\n\nexport default DocsView\n","import {injectIntl} from 'react-intl'\nimport {connect} from 'react-redux'\n\nimport {changeListParent, changeSearchFormCollapsed, changeSelection} from '../../modules/list/actions'\nimport {withRouterTypeCompProvider} from '../../utils/withRouterTypeCompProvider'\nimport DocsView from './DocsView'\n\nconst mapStateToProps = state => ({\n domainTypes: state.input.domainTypes,\n rootNodes: state.input.rootNodes,\n limit: state.input.listLimit,\n searchFormType: state.input.searchFormType,\n selectionStyle: state.input.selectionStyle,\n getCustomLocation: state.input.getCustomLocation,\n disableViewPersistor: state.input.disableViewPersistor,\n getListFormName: state.input.getListFormName,\n domainDetailFormName: state.input.domainDetailFormName,\n folderDetailFormName: state.input.folderDetailFormName,\n showActions: state.input.showActions,\n sortable: state.input.sortable,\n openResource: state.input.openResource,\n searchFormCollapsed: state.docs.list.searchFormCollapsed,\n scrollBehaviour: state.docs.list.scrollBehaviour,\n locale: state.intl.locale\n})\n\nconst mapActionCreators = {\n changeListParent,\n changeSelection,\n changeSearchFormCollapsed\n}\n\nexport default withRouterTypeCompProvider(connect(mapStateToProps, mapActionCreators)(injectIntl(DocsView)))\n","import styled from 'styled-components'\nimport {theme, scale} from 'tocco-ui'\n\nexport const StyledDocumentViewWrapper = styled.div`\n height: 100%;\n background-color: ${theme.color('paper')};\n padding-left: ${scale.space(0.5)};\n overflow-y: hidden;\n`\n","import PropTypes from 'prop-types'\nimport React, {Suspense} from 'react'\nimport {LoadMask} from 'tocco-ui'\n\nimport Action from '../Action/'\nimport {StyledDocumentViewWrapper} from './StyledComponents'\n\nconst LazyDetailApp = React.lazy(() => import('./LazyDetailApp'))\n\nconst DocumentView = ({breadcrumbs, formName, navigationStrategy, locale, emitAction, navigate, params}) => {\n const handleEntityDeleted = () => {\n const lastList = breadcrumbs\n .slice()\n .reverse()\n .find(breadcrumb => breadcrumb.type === 'list')\n const lastListUrl = `/docs/${lastList.path}`\n navigate(lastListUrl)\n }\n\n return (\n <StyledDocumentViewWrapper>\n <Suspense fallback={<LoadMask />}>\n <LazyDetailApp\n entityName=\"Resource\"\n entityId={params.key}\n formName={formName || 'DmsResource'}\n mode=\"update\"\n actionAppComponent={Action}\n navigationStrategy={navigationStrategy}\n emitAction={emitAction}\n onEntityDeleted={handleEntityDeleted}\n locale={locale}\n />\n </Suspense>\n </StyledDocumentViewWrapper>\n )\n}\n\nDocumentView.propTypes = {\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n path: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired\n })\n ).isRequired,\n formName: PropTypes.string,\n navigationStrategy: PropTypes.object,\n locale: PropTypes.string,\n emitAction: PropTypes.func.isRequired,\n navigate: PropTypes.func,\n params: PropTypes.object\n}\n\nexport default DocumentView\n","import {injectIntl} from 'react-intl'\nimport {connect} from 'react-redux'\nimport {actionEmitter} from 'tocco-app-extensions'\n\nimport {withRouterTypeCompProvider} from '../../utils/withRouterTypeCompProvider'\nimport DocumentView from './DocumentView'\n\nconst mapStateToProps = state => ({\n breadcrumbs: state.docs.path.breadcrumbs,\n formName: state.input.documentDetailFormName,\n locale: state.intl.locale\n})\n\nconst mapActionCreators = {\n emitAction: action => actionEmitter.dispatchEmittedAction(action)\n}\n\nexport default withRouterTypeCompProvider(connect(mapStateToProps, mapActionCreators)(injectIntl(DocumentView)))\n","import PropTypes from 'prop-types'\n\nimport DocsView from '../../DocsView'\nimport DocumentView from '../../DocumentView'\n\nconst RouterlessContent = ({\n params,\n navigationStrategy,\n handleSearchChange,\n emitAction,\n openFileDialog,\n searchMode,\n docsKey\n}) => {\n const {model, view} = params\n\n if (model === 'doc' && view === 'detail') {\n return <DocumentView navigationStrategy={navigationStrategy} />\n }\n\n return (\n <DocsView\n key={docsKey}\n navigationStrategy={navigationStrategy}\n onSearchChange={handleSearchChange}\n emitAction={emitAction}\n openFileDialog={openFileDialog}\n searchMode={searchMode}\n />\n )\n}\n\nRouterlessContent.propTypes = {\n params: PropTypes.object,\n emitAction: PropTypes.func.isRequired,\n handleSearchChange: PropTypes.func.isRequired,\n openFileDialog: PropTypes.func.isRequired,\n searchMode: PropTypes.bool.isRequired,\n navigationStrategy: PropTypes.object,\n docsKey: PropTypes.string\n}\n\nexport default RouterlessContent\n","import PropTypes from 'prop-types'\nimport {Route, Switch} from 'react-router-dom'\n\nimport DocsView from '../../DocsView'\nimport DocumentView from '../../DocumentView'\n\nconst RoutesContent = ({navigationStrategy, handleSearchChange, emitAction, openFileDialog, searchMode, docsKey}) => (\n <Switch>\n <Route\n exact\n path={'/docs/doc/:key/detail'}\n render={() => <DocumentView navigationStrategy={navigationStrategy} />}\n />\n <Route\n exact\n path={['/docs/:model/:key/list', '/docs']}\n render={() => (\n <DocsView\n key={docsKey}\n navigationStrategy={navigationStrategy}\n onSearchChange={handleSearchChange}\n emitAction={emitAction}\n openFileDialog={openFileDialog}\n searchMode={searchMode}\n />\n )}\n />\n </Switch>\n)\n\nRoutesContent.propTypes = {\n params: PropTypes.object,\n emitAction: PropTypes.func.isRequired,\n handleSearchChange: PropTypes.func.isRequired,\n openFileDialog: PropTypes.func.isRequired,\n searchMode: PropTypes.bool.isRequired,\n navigationStrategy: PropTypes.object,\n docsKey: PropTypes.string\n}\n\nexport default RoutesContent\n","import {withRouterTypeCompProvider} from '../../../utils/withRouterTypeCompProvider'\nimport RouterlessContent from './RouterlessContent'\nimport RoutesContent from './RoutesContent'\n\nexport default withRouterTypeCompProvider({routerless: RouterlessContent, router: RoutesContent})\n","import styled from 'styled-components'\nimport {StyledScrollbar} from 'tocco-ui'\n\nexport const StyledWrapper = styled.div`\n display: grid;\n grid-template-rows: auto 1fr;\n grid-template-areas:\n 'breadcrumbs'\n 'content';\n ${({scrollBehaviour}) => scrollBehaviour === 'inline' && 'height: 100%;'}\n width: 100%;\n`\n\nexport const StyledContent = styled.div`\n grid-area: content;\n ${({scrollBehaviour}) => scrollBehaviour === 'inline' && 'overflow-x: hidden;'}\n ${StyledScrollbar}\n`\n\nexport const StyledBreadcrumbs = styled.div`\n grid-area: breadcrumbs;\n ${({noLeftPadding}) =>\n noLeftPadding &&\n `\n > div {\n padding-left: 0;\n }\n `}\n`\n","import PropTypes from 'prop-types'\nimport {useEffect, useReducer, useRef} from 'react'\nimport {scrollBehaviourPropType} from 'tocco-ui'\nimport {viewPersistor} from 'tocco-util'\n\nimport isRootLocation from '../../utils/isRootLocation'\nimport Breadcrumbs from './Breadcrumbs'\nimport Content from './Content'\nimport {StyledWrapper, StyledBreadcrumbs, StyledContent} from './StyledComponents'\n\nconst DocsBrowser = ({\n navigate,\n path,\n searchMode,\n navigationStrategy,\n setSearchMode,\n loadBreadcrumbs,\n emitAction,\n openFileDialog,\n noLeftPadding,\n scrollBehaviour\n}) => {\n // eslint-disable-next-line no-unused-vars\n const [docsViewNumber, forceDocsViewUpdate] = useReducer(x => x + 1, 0)\n\n const searchModeRef = useRef(searchMode)\n searchModeRef.current = searchMode\n\n useEffect(() => {\n loadBreadcrumbs(path)\n })\n\n const resetSearchMode = () => {\n if (searchModeRef.current) {\n viewPersistor.clearPersistedViews()\n setSearchMode(false)\n loadBreadcrumbs(path)\n forceDocsViewUpdate()\n }\n }\n\n const handleSearchChange = e => {\n const hasUserChanges = e.query && e.query.hasUserChanges\n if (hasUserChanges) {\n setSearchMode(true)\n navigate('/docs/')\n loadBreadcrumbs(path)\n } else if (isRootLocation(path)) {\n resetSearchMode()\n }\n }\n\n const key = `docs-view-${docsViewNumber}`\n\n return (\n <StyledWrapper scrollBehaviour={scrollBehaviour}>\n <StyledBreadcrumbs noLeftPadding={noLeftPadding}>\n <Breadcrumbs resetSearchMode={resetSearchMode} />\n </StyledBreadcrumbs>\n <StyledContent scrollBehaviour={scrollBehaviour}>\n <Content\n navigationStrategy={navigationStrategy}\n handleSearchChange={handleSearchChange}\n emitAction={emitAction}\n openFileDialog={openFileDialog}\n searchMode={searchMode}\n docsKey={key}\n />\n </StyledContent>\n </StyledWrapper>\n )\n}\n\nDocsBrowser.propTypes = {\n loadBreadcrumbs: PropTypes.func.isRequired,\n setSearchMode: PropTypes.func.isRequired,\n emitAction: PropTypes.func.isRequired,\n openFileDialog: PropTypes.func.isRequired,\n navigate: PropTypes.func.isRequired,\n path: PropTypes.string.isRequired,\n searchMode: PropTypes.bool.isRequired,\n navigationStrategy: PropTypes.object,\n noLeftPadding: PropTypes.bool,\n scrollBehaviour: scrollBehaviourPropType\n}\n\nexport default DocsBrowser\n","import {injectIntl} from 'react-intl'\nimport {connect} from 'react-redux'\nimport {actionEmitter} from 'tocco-app-extensions'\n\nimport {openDialog} from '../../modules/create/actions'\nimport {loadBreadcrumbs, setSearchMode} from '../../modules/path/actions'\nimport {withRouterTypeCompProvider} from '../../utils/withRouterTypeCompProvider'\nimport DocsBrowser from './DocsBrowser'\n\nconst mapStateToProps = state => ({\n searchMode: state.docs.path.searchMode,\n navigationStrategy: state.input.navigationStrategy,\n noLeftPadding: state.input.noLeftPadding,\n scrollBehaviour: state.docs.list.scrollBehaviour\n})\n\nconst mapActionCreators = {\n loadBreadcrumbs,\n setSearchMode,\n emitAction: action => actionEmitter.dispatchEmittedAction(action),\n openFileDialog: openDialog\n}\n\nexport default withRouterTypeCompProvider(connect(mapStateToProps, mapActionCreators)(injectIntl(DocsBrowser)))\n","import PropTypes from 'prop-types'\nimport {useEffect} from 'react'\nimport {notification} from 'tocco-app-extensions'\nimport {GlobalStyles} from 'tocco-ui'\n\nimport {withInternalRouter} from '../../utils/withRouter'\nimport DocsBrowser from '../DocsBrowser'\n\nconst RouterlessApp = ({handleNotifications, rootPath, navigate, path}) => {\n useEffect(() => {\n const isRoot = !path || path === '/' || path === '/docs'\n if (isRoot && rootPath !== path) {\n navigate(rootPath)\n }\n }, [rootPath, path, navigate])\n\n return (\n <>\n {handleNotifications && <notification.Notifications />}\n <GlobalStyles />\n <DocsBrowser />\n </>\n )\n}\n\nRouterlessApp.propTypes = {\n handleNotifications: PropTypes.bool,\n rootPath: PropTypes.string,\n navigate: PropTypes.func.isRequired,\n path: PropTypes.string\n}\n\nexport default withInternalRouter(RouterlessApp)\n","import PropTypes from 'prop-types'\nimport {Redirect, Route} from 'react-router-dom'\nimport {notification} from 'tocco-app-extensions'\nimport {GlobalStyles} from 'tocco-ui'\n\nimport DocsBrowser from '../DocsBrowser'\n\nconst InheritedApp = ({rootPath, handleNotifications}) => (\n <>\n {handleNotifications && <notification.Notifications />}\n <GlobalStyles />\n <DocsBrowser />\n <Route exact path=\"/\">\n <Redirect to={rootPath} />\n </Route>\n {rootPath !== '/docs' && (\n <Route exact path=\"/docs\">\n <Redirect to={rootPath} />\n </Route>\n )}\n </>\n)\n\nInheritedApp.propTypes = {\n handleNotifications: PropTypes.bool,\n rootPath: PropTypes.string\n}\n\nexport default InheritedApp\n","import PropTypes from 'prop-types'\nimport {Redirect, Route, Router as ReactRouter} from 'react-router'\nimport {notification} from 'tocco-app-extensions'\nimport {GlobalStyles} from 'tocco-ui'\n\nimport DocsBrowser from '../DocsBrowser'\n\nconst StandaloneApp = ({rootPath, handleNotifications, history}) => (\n <ReactRouter history={history}>\n {handleNotifications && <notification.Notifications />}\n <GlobalStyles />\n\n <DocsBrowser />\n <Route exact path=\"/\">\n <Redirect to={rootPath} />\n </Route>\n {rootPath !== '/docs' && (\n <Route exact path=\"/docs\">\n <Redirect to={rootPath} />\n </Route>\n )}\n </ReactRouter>\n)\n\nStandaloneApp.propTypes = {\n history: PropTypes.object,\n handleNotifications: PropTypes.bool,\n rootPath: PropTypes.string\n}\n\nexport default StandaloneApp\n","import {action} from 'tocco-util'\n\nimport {setScrollBehaviour, setSearchFormCollapsed} from './modules/list/actions'\n\nexport const getDispatchActions = input => action.getDispatchActions(input, actionSettings)\n\nconst actionSettings = [\n {\n name: 'searchFormCollapsed',\n action: setSearchFormCollapsed,\n argsFactory: input => [input.searchFormCollapsed]\n },\n {\n name: 'scrollBehaviour',\n action: setScrollBehaviour,\n argsFactory: input => [input.scrollBehaviour]\n }\n]\n","import * as actions from './actions'\n\nconst openDialog = (state, {payload: {directory, onSuccess, onError}}) => ({\n ...state,\n dialog: {\n instanceCount: state.dialog.instanceCount + 1,\n directory,\n onSuccess,\n onError\n }\n})\n\nconst ACTION_HANDLERS = {\n [actions.OPEN_DIALOG]: openDialog\n}\n\nconst initialState = {\n dialog: {\n instanceCount: 0,\n directory: false,\n onSuccess: null,\n onError: null\n }\n}\n\nexport default function reducer(state = initialState, action) {\n const handler = ACTION_HANDLERS[action.type]\n return handler ? handler(state, action) : state\n}\n","import {all, takeEvery, call, put, select} from 'redux-saga/effects'\nimport {rest, notification} from 'tocco-app-extensions'\nimport {consoleLogger} from 'tocco-util'\nimport {v4 as uuid} from 'uuid'\n\nimport getNode from '../../utils/getNode'\nimport * as actions from './actions'\n\nexport const dialogSelector = state => state.docs.create.dialog\nexport const textResourceSelector = (state, key) => state.intl.messages[key]\n\nconst CREATED_STATUS = 201\n\nexport function* handleFilesSelected({payload: {location, files, isDirectory}}) {\n const blockingInfoId = yield call(uuid)\n yield put(\n notification.blockingInfo(\n blockingInfoId,\n isDirectory\n ? 'client.docs-browser.uploadInProgressDirectory'\n : files.length > 1\n ? 'client.docs-browser.uploadInProgressMultiple'\n : 'client.docs-browser.uploadInProgress',\n null\n )\n )\n\n const {onSuccess, onError} = yield select(dialogSelector)\n\n try {\n const response = yield call(createDocuments, location, files)\n\n if (response.status === 403) {\n yield put(notification.removeBlockingInfo(blockingInfoId))\n onError({\n title: yield select(textResourceSelector, 'client.entity-detail.saveAbortedTitle'),\n message: yield select(textResourceSelector, 'client.docs-browser.failedNoPermission')\n })\n } else {\n const remoteEvents = [\n {\n type: 'entity-create-event',\n payload: {\n entities: response.body.items\n .filter(item => item.status === CREATED_STATUS)\n .map(item => ({\n entityName: item.bean.model,\n key: item.bean.key\n }))\n }\n }\n ]\n\n yield put(notification.removeBlockingInfo(blockingInfoId))\n\n const msgId = isDirectory\n ? 'client.docs-browser.uploadSuccessfulDirectory'\n : 'client.docs-browser.uploadSuccessful'\n onSuccess({\n title: yield select(textResourceSelector, msgId),\n remoteEvents\n })\n }\n } catch (e) {\n consoleLogger.logError('Failed to upload files', e)\n yield put(notification.removeBlockingInfo(blockingInfoId))\n onError({\n title: yield select(textResourceSelector, 'client.docs-browser.uploadFailed')\n })\n }\n}\n\nexport function* createDocuments(location, files) {\n const node = getNode(location)\n\n if (!node) {\n return\n }\n\n const formData = new FormData()\n for (const file of files) {\n formData.append('files[]', file)\n }\n\n const resource = `documents/${node.model}/${node.key}`\n const options = {\n method: 'POST',\n body: formData,\n acceptedStatusCodes: [403]\n }\n\n return yield call(rest.requestSaga, resource, options)\n}\n\nexport default function* mainSagas() {\n yield all([takeEvery(actions.FILES_SELECTED, handleFilesSelected)])\n}\n","import {fork, all} from 'redux-saga/effects'\n\nimport reducer from './reducer'\nimport moduleSagas from './sagas'\n\nexport function* sagas() {\n yield all([fork(moduleSagas)])\n}\n\nexport default reducer\n","import {reducer as reducerUtil} from 'tocco-util'\n\nimport * as actions from './actions'\n\nconst ACTION_HANDLERS = {\n [actions.SET_SEARCH_FORM_COLLAPSED]: reducerUtil.singleTransferReducer('searchFormCollapsed'),\n [actions.SET_SCROLL_BEHAVIOUR]: reducerUtil.singleTransferReducer('scrollBehaviour')\n}\n\nconst initialState = {\n searchFormCollapsed: null,\n scrollBehaviour: 'inline'\n}\n\nexport default function reducer(state = initialState, action) {\n const handler = ACTION_HANDLERS[action.type]\n return handler ? handler(state, action) : state\n}\n","import reducer from './reducer'\nimport sagas from './sagas'\n\nexport {sagas}\n\nexport default reducer\n","import {all, put, takeLatest} from 'redux-saga/effects'\nimport {externalEvents} from 'tocco-app-extensions'\n\nimport * as actions from './actions'\n\nexport function* changeListParent({payload}) {\n yield put(externalEvents.fireExternalEvent('onListParentChange', payload.parent))\n}\n\nexport function* changeSelection({payload}) {\n yield put(externalEvents.fireExternalEvent('onSelectChange', payload.selection))\n}\n\nexport function* changeSearchFormCollapsed({payload}) {\n yield put(externalEvents.fireExternalEvent('onSearchFormCollapsedChange', payload.collapsed))\n}\n\nexport default function* mainSagas() {\n yield all([\n takeLatest(actions.CHANGE_LIST_PARENT, changeListParent),\n takeLatest(actions.CHANGE_SELECTION, changeSelection),\n takeLatest(actions.CHANGE_SEARCH_FORM_COLLAPSED, changeSearchFormCollapsed)\n ])\n}\n","import {reducer as reducerUtil} from 'tocco-util'\n\nimport * as actions from './actions'\n\nconst initialize = (state, {payload: {selection, onSuccess, onError}}) => ({\n ...state,\n input: {\n selection,\n onSuccess,\n onError\n }\n})\n\nconst close = () => ({\n ...initialState\n})\n\nconst ACTION_HANDLERS = {\n [actions.INITIALIZE]: initialize,\n [actions.SET_WAITING]: reducerUtil.singleTransferReducer('isWaiting'),\n [actions.CLOSE]: close\n}\n\nconst initialState = {\n isWaiting: false,\n input: {\n selection: null,\n onSuccess: null,\n onError: null\n }\n}\n\nexport default function reducer(state = initialState, action) {\n const handler = ACTION_HANDLERS[action.type]\n return handler ? handler(state, action) : state\n}\n","import {takeLatest, all, call, put, select} from 'redux-saga/effects'\nimport {notification, rest} from 'tocco-app-extensions'\nimport {validation} from 'tocco-util'\n\nimport * as actions from './actions'\n\nexport const inputSelector = state => state.docs.move.input\nexport const textResourceSelector = (state, key) => state.intl.messages[key]\n\nexport function* moveElements({payload}) {\n const resource = 'documents/move'\n const options = {\n method: 'POST',\n acceptedStatusCodes: [400, 403],\n body: {\n targetEntityKey: payload.target,\n selectedEntityKeys: payload.selected\n }\n }\n\n yield put(actions.setWaiting(true))\n const response = yield call(rest.requestSaga, resource, options)\n\n if (response.status === 204) {\n yield call(setDone)\n } else {\n yield put(actions.setWaiting(false))\n let message = 'client.actions.dms-move.failed.message'\n if (response.body?.errorCode === 'VALIDATION_FAILED') {\n message = validation.getErrorCompact(response.body.errors)\n }\n if (response.status === 403) {\n message = 'client.docs-browser.failedNoPermission'\n }\n yield put(notification.toaster({type: 'error', title: 'client.actions.dms-move.failed.title', body: message}))\n }\n}\n\nexport function* setDone() {\n const {selection, onSuccess} = yield select(inputSelector)\n\n const remoteEvents = [\n {\n type: 'entity-update-event',\n payload: {\n entities: selection.ids.map(id => ({\n entityName: 'Docs_list_item',\n key: id\n }))\n }\n }\n ]\n\n onSuccess({\n title: yield select(textResourceSelector, 'client.docs-browser.moveSuccessful'),\n remoteEvents\n })\n\n yield put(actions.close())\n}\n\nexport default function* mainSagas() {\n yield all([takeLatest(actions.MOVE_ELEMENTS, moveElements)])\n}\n","import {fork, all} from 'redux-saga/effects'\n\nimport reducer from './reducer'\nimport moduleSagas from './sagas'\n\nexport function* sagas() {\n yield all([fork(moduleSagas)])\n}\n\nexport default reducer\n","import {reducer as reducerUtil} from 'tocco-util'\n\nimport * as actions from './actions'\n\nconst ACTION_HANDLERS = {\n [actions.SET_BREADCRUMBS]: reducerUtil.singleTransferReducer('breadcrumbs'),\n [actions.SET_SEARCH_MODE]: reducerUtil.singleTransferReducer('searchMode')\n}\n\nconst initialState = {\n breadcrumbs: [],\n searchMode: false\n}\n\nexport default function reducer(state = initialState, action) {\n const handler = ACTION_HANDLERS[action.type]\n return handler ? handler(state, action) : state\n}\n","import {takeLatest, all, call, put, select} from 'redux-saga/effects'\nimport {rest} from 'tocco-app-extensions'\n\nimport getNode from '../../utils/getNode'\nimport * as actions from './actions'\n\nexport const textResourceSelector = (state, key) => state.intl.messages[key] || key\nexport const docsPathSelector = state => state.docs.path\nexport const rootNodesSelector = state => state.input.rootNodes\n\nexport function* getSearchBreadcrumbs() {\n return [\n {\n display: yield select(textResourceSelector, 'client.docs-browser.breadcrumbs.start'),\n path: '',\n type: 'list'\n },\n {\n display: yield select(textResourceSelector, 'client.docs-browser.breadcrumbs.searchResults'),\n path: '',\n type: 'list'\n }\n ]\n}\n\nexport function* loadBreadcrumbs({payload: {location}}) {\n const node = getNode(location)\n const pathState = yield select(docsPathSelector)\n\n let breadcrumbs\n\n if (pathState.searchMode && !node) {\n breadcrumbs = yield call(getSearchBreadcrumbs)\n } else {\n const url = node ? `documents/${node.model}/${node.key}/breadcrumbs` : 'documents/breadcrumbs'\n const options = {\n queryParams: {\n rootnodes: yield call(getRootNodesParam)\n }\n }\n const result = yield call(rest.requestSaga, url, options)\n breadcrumbs = result.body.breadcrumbs\n }\n\n yield put(actions.setBreadcrumbs(breadcrumbs))\n}\n\nfunction* getRootNodesParam() {\n const rootNodes = yield select(rootNodesSelector)\n return Array.isArray(rootNodes) && rootNodes.length > 0\n ? rootNodes.map(node => `${node.entityName}/${node.key}`).join(',')\n : null\n}\n\nexport default function* mainSagas() {\n yield all([takeLatest(actions.LOAD_BREADCRUMBS, loadBreadcrumbs)])\n}\n","import {fork, all} from 'redux-saga/effects'\n\nimport reducer from './reducer'\nimport moduleSagas from './sagas'\n\nexport function* sagas() {\n yield all([fork(moduleSagas)])\n}\n\nexport default reducer\n","import {reducer as reducerUtil} from 'tocco-util'\n\nimport * as actions from './actions'\n\nconst ACTION_HANDLERS = {\n [actions.NAVIGATE]: reducerUtil.singleTransferReducer('path'),\n [actions.SET_PARAMS]: reducerUtil.singleTransferReducer('params')\n}\n\nconst initialState = {\n path: '',\n params: {}\n}\n\nexport default function reducer(state = initialState, action) {\n const handler = ACTION_HANDLERS[action.type]\n return handler ? handler(state, action) : state\n}\n","import {takeLatest, all, put} from 'redux-saga/effects'\nimport {route} from 'tocco-util'\n\nimport * as actions from './actions'\n\nconst pathRegex = '/docs/:model/:key/:view(list|detail)'\n\nexport function* setParams({payload: {path}}) {\n const params = route.extractParamsFromPath(pathRegex, path) || {}\n\n yield put(actions.setParams(params))\n}\n\nexport default function* mainSagas() {\n yield all([takeLatest(actions.NAVIGATE, setParams)])\n}\n","import {fork, all} from 'redux-saga/effects'\n\nimport reducer from './reducer'\nimport moduleSagas from './sagas'\n\nexport function* sagas() {\n yield all([fork(moduleSagas)])\n}\n\nexport default reducer\n","import {combineReducers} from 'redux'\n\nimport create, {sagas as createSagas} from './create'\nimport list, {sagas as listSagas} from './list'\nimport move, {sagas as moveSagas} from './move'\nimport path, {sagas as pathSagas} from './path'\nimport routing, {sagas as routingSagas} from './routing'\n\nexport default {\n docs: combineReducers({path, create, list, move, routing})\n}\n\nexport const sagas = [pathSagas, createSagas, listSagas, moveSagas, routingSagas]\n","import createHashHistory from 'history/createHashHistory'\nimport _isEmpty from 'lodash/isEmpty'\nimport _isEqual from 'lodash/isEqual'\nimport _pickBy from 'lodash/pickBy'\nimport PropTypes from 'prop-types'\nimport {actionEmitter, appFactory, cache, errorLogging, externalEvents, notification} from 'tocco-app-extensions'\nimport {searchFormTypePropTypes, selectionStylePropType} from 'tocco-entity-list/src/main'\nimport {scrollBehaviourPropType} from 'tocco-ui'\nimport {appContext, react, reducer as reducerUtil, env} from 'tocco-util'\n\nimport {InheritedApp, RouterlessApp, StandaloneApp} from './components/App'\nimport {getDispatchActions} from './input'\nimport chooseDocument from './modules/chooseDocument'\nimport reducers, {sagas} from './modules/reducers'\nimport {navigate} from './modules/routing/actions'\n\nconst packageName = 'docs-browser'\n\nconst EXTERNAL_EVENTS = ['onListParentChange', 'openResource', 'onSelectChange', 'onSearchFormCollapsedChange']\n\nconst textResourceSelector = (state, key) => state.intl.messages[key] || key\n\nconst createHistory = store => {\n return createHashHistory({\n getUserConfirmation: (message, confirmCallback) => {\n const state = store.getState()\n\n const okText = textResourceSelector(state, 'client.common.ok')\n const cancelText = textResourceSelector(state, 'client.common.cancel')\n\n const action = notification.confirm(\n '',\n message,\n okText,\n cancelText,\n () => confirmCallback(true),\n () => confirmCallback(false)\n )\n store.dispatch(action)\n }\n })\n}\n\nconst getContent = ({routerType, store, rootPath, handleNotifications}) => {\n if (routerType === 'routerless') {\n return <RouterlessApp rootPath={rootPath} handleNotifications={handleNotifications} />\n }\n\n if (routerType === 'inherit') {\n return <InheritedApp rootPath={rootPath} handleNotifications={handleNotifications} />\n }\n\n // only create new histroy object for standalone docs-browser (e.g. Widget)\n const history = createHistory(store)\n return <StandaloneApp history={history} rootPath={rootPath} handleNotifications={handleNotifications} />\n}\n\nconst initApp = (id, input, events = {}, publicPath) => {\n const store = appFactory.createStore(reducers, sagas, input, packageName)\n\n env.setInputEnvs(input)\n\n externalEvents.addToStore(store, events)\n actionEmitter.addToStore(store)\n errorLogging.addToStore(store, true, ['console', 'remote', 'notification'])\n const handleNotifications = !events.emitAction\n notification.addToStore(store, handleNotifications)\n cache.addToStore(store)\n\n const singleRootNode =\n Array.isArray(input.rootNodes) && input.rootNodes.length === 1 && input.rootNodes[0].entityName !== 'Resource'\n ? input.rootNodes[0]\n : null\n\n const rootPath = singleRootNode\n ? `/docs/${singleRootNode.entityName.toLowerCase()}/${singleRootNode.key}/list`\n : '/docs'\n\n const content = getContent({\n routerType: input.routerType,\n store,\n rootPath,\n handleNotifications\n })\n\n return appFactory.createApp(packageName, content, store, {\n input,\n events,\n actions: [...getDispatchActions(input), navigate(input.initialLocation)],\n publicPath,\n textResourceModules: ['component', 'common', 'actions', 'entity-list', 'entity-detail', packageName]\n })\n}\n\n;(() => {\n if (__PACKAGE_NAME__ === packageName) {\n appFactory.registerAppInRegistry(packageName, initApp)\n\n if (__DEV__) {\n const input = require('./dev/input.json')\n\n if (!__NO_MOCK__) {\n const fetchMock = require('fetch-mock').default\n fetchMock.config.overwriteRoutes = false\n const setupFetchMocks = require('./dev/fetchMocks').default\n setupFetchMocks(packageName, fetchMock)\n fetchMock.spy()\n }\n\n const app = initApp(packageName, input)\n\n if (module.hot) {\n module.hot.accept('./modules/reducers', () => {\n const reducers = require('./modules/reducers').default\n reducerUtil.hotReloadReducers(app.store, reducers)\n })\n }\n\n appFactory.renderApp(app.component)\n }\n }\n})()\n\nconst DocsBrowserApp = props => {\n const {component, store} = appFactory.useApp({initApp, props, packageName, externalEvents: EXTERNAL_EVENTS})\n\n const prevProps = react.usePrevious(props)\n react.useDidUpdate(() => {\n const changedProps = _pickBy(props, (value, key) => !_isEqual(value, prevProps[key]))\n if (!_isEmpty(changedProps)) {\n getDispatchActions(changedProps).forEach(action => {\n store.dispatch(action)\n })\n }\n }, [props])\n\n return component\n}\n\nDocsBrowserApp.propTypes = {\n routerType: PropTypes.oneOf(['standalone', 'inherit', 'routerless']),\n navigationStrategy: PropTypes.object,\n domainTypes: PropTypes.arrayOf(PropTypes.string),\n rootNodes: PropTypes.arrayOf(\n PropTypes.shape({\n entityName: PropTypes.string,\n key: PropTypes.string\n })\n ),\n initialLocation: PropTypes.string,\n listLimit: PropTypes.number,\n documentDetailFormName: PropTypes.string,\n searchFormType: searchFormTypePropTypes,\n selectionStyle: selectionStylePropType,\n scrollBehaviour: scrollBehaviourPropType,\n getListFormName: PropTypes.func,\n disableViewPersistor: PropTypes.bool,\n getCustomLocation: PropTypes.func,\n businessUnit: PropTypes.string,\n searchFormCollapsed: PropTypes.bool,\n backendUrl: PropTypes.string,\n appContext: appContext.propTypes,\n ...EXTERNAL_EVENTS.reduce((propTypes, event) => {\n propTypes[event] = PropTypes.func\n return propTypes\n }, {})\n}\n\nexport default DocsBrowserApp\nexport {chooseDocument}\n","export const INITIALIZE = 'docs/move/INITIALIZE'\nexport const INVALID_SELECTION = 'docs/move/INVALID_SELECTION'\nexport const MOVE_ELEMENTS = 'docs/move/MOVE_ELEMENTS'\nexport const SET_WAITING = 'docs/move/SET_WAITING'\nexport const SET_DONE = 'docs/move/SET_DONE'\nexport const CLOSE = 'docs/move/CLOSE'\n\nexport const initialize = (selection, onSuccess, onError) => ({\n type: INITIALIZE,\n payload: {\n selection,\n onSuccess,\n onError\n }\n})\n\nexport const invalidSelection = () => ({\n type: INVALID_SELECTION\n})\n\nexport const moveElements = (target, selected) => ({\n type: MOVE_ELEMENTS,\n payload: {\n target,\n selected\n }\n})\n\nexport const setWaiting = (isWaiting = true) => ({\n type: SET_WAITING,\n payload: {\n isWaiting\n }\n})\n\nexport const close = () => ({\n type: CLOSE\n})\n","export const NAVIGATE = 'docs/routing/NAVIGATE'\nexport const SET_PARAMS = 'docs/routing/SET_PARAMS'\n\nexport const navigate = path => ({\n type: NAVIGATE,\n payload: {\n path: path || ''\n }\n})\n\nexport const setParams = params => ({\n type: SET_PARAMS,\n payload: {\n params\n }\n})\n","const DOC_PATH_REGEX = /^\\/docs\\/doc\\/(\\d+)\\/detail$/\nconst PARENT_PATH_REGEX = /^\\/docs\\/(domain|folder)\\/(\\d+)\\/list$/\n\nconst getResourceNode = pathname => {\n const docMatches = DOC_PATH_REGEX.exec(pathname)\n return docMatches && docMatches.length >= 2\n ? {\n model: 'Resource',\n key: docMatches[1]\n }\n : null\n}\n\nconst getParentNode = pathname => {\n const parentMatches = PARENT_PATH_REGEX.exec(pathname)\n if (parentMatches && parentMatches.length >= 3) {\n const model = parentMatches[1].charAt(0).toUpperCase() + parentMatches[1].slice(1)\n const key = parentMatches[2]\n return {\n model,\n key\n }\n }\n return null\n}\n\nconst getNode = pathname => getResourceNode(pathname) || getParentNode(pathname)\n\nexport default getNode\n","import {connect} from 'react-redux'\nimport {useHistory, useLocation, useParams} from 'react-router-dom'\n\nimport {navigate} from '../modules/routing/actions'\n\nconst mapActionCreators = {\n navigate\n}\n\nconst mapStateToProps = state => ({\n path: state.docs.routing.path,\n params: state.docs.routing.params\n})\n\nexport const withInternalRouter = connect(mapStateToProps, mapActionCreators)\n\nexport const withReactRouter = WrappedComponent => props => {\n const location = useLocation()\n const history = useHistory()\n const params = useParams()\n\n return <WrappedComponent {...props} path={location.pathname} navigate={history.push} params={params} />\n}\n","import PropTypes from 'prop-types'\nimport {connect} from 'react-redux'\n\nimport {withInternalRouter, withReactRouter} from './withRouter'\n\nconst mapStateToProps = state => ({\n compProviderRouterType: state.input.routerType\n})\n\n/**\n * Handles different router types:\n * - enhance component with `path`, `params` and `navigate`\n * - renders either internal routing or react router wrapper\n *\n * Example with one component for all router types:\n * ```\n * const MyComp = ({path, params, navigate}) => {}\n *\n * export default withRouterTypeCompProvider(MyComp)\n * ```\n *\n * Example with two component for routerless vs router type:\n * ```\n * const MyRouterlessComp = ({path, params, navigate}) => {}\n * const MyRouterComp = ({path, params, navigate}) => {}\n *\n * export default withRouterTypeCompProvider({routerless: MyRouterlessComp, router: MyRouterComp})\n * ```\n *\n * @param {object} config\n */\nexport const withRouterTypeCompProvider = config => {\n const {routerless, router} = config\n\n const RouterlessComp = routerless ? withInternalRouter(routerless) : withInternalRouter(config)\n const RouterComp = router ? withReactRouter(router) : withReactRouter(config)\n\n const ComponentProvider = ({compProviderRouterType, ...props}) => {\n if (compProviderRouterType === 'routerless') {\n return <RouterlessComp {...props} />\n }\n\n // inherit & standalone are both using router lib\n return <RouterComp {...props} />\n }\n\n ComponentProvider.propTypes = {\n compProviderRouterType: PropTypes.oneOf(['routerless', 'inherit', 'standalone'])\n }\n\n return connect(mapStateToProps)(ComponentProvider)\n}\n","'use strict';\n\nexports.__esModule = true;\nvar canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {\n return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);\n};\n\nvar removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {\n return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);\n};\n\nvar getConfirmation = exports.getConfirmation = function getConfirmation(message, callback) {\n return callback(window.confirm(message));\n}; // eslint-disable-line no-alert\n\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\nvar supportsHistory = exports.supportsHistory = function supportsHistory() {\n var ua = window.navigator.userAgent;\n\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n\n return window.history && 'pushState' in window.history;\n};\n\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\nvar supportsPopStateOnHashChange = exports.supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n};\n\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\nvar supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n};\n\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\nvar isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n};","'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.createLocation = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _resolvePathname = require('resolve-pathname');\n\nvar _resolvePathname2 = _interopRequireDefault(_resolvePathname);\n\nvar _valueEqual = require('value-equal');\n\nvar _valueEqual2 = _interopRequireDefault(_valueEqual);\n\nvar _PathUtils = require('./PathUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {\n var location = void 0;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = (0, _PathUtils.parsePath)(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n};\n\nvar locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && (0, _valueEqual2.default)(a.state, b.state);\n};","'use strict';\n\nexports.__esModule = true;\nvar addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n};\n\nvar stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n};\n\nvar hasBasename = exports.hasBasename = function hasBasename(path, prefix) {\n return new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path);\n};\n\nvar stripBasename = exports.stripBasename = function stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n};\n\nvar stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n};\n\nvar parsePath = exports.parsePath = function parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n};\n\nvar createPath = exports.createPath = function createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n\n\n var path = pathname || '/';\n\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;\n\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;\n\n return path;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _LocationUtils = require('./LocationUtils');\n\nvar _PathUtils = require('./PathUtils');\n\nvar _createTransitionManager = require('./createTransitionManager');\n\nvar _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);\n\nvar _DOMUtils = require('./DOMUtils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HashChangeEvent = 'hashchange';\n\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + (0, _PathUtils.stripLeadingSlash)(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: _PathUtils.stripLeadingSlash,\n decodePath: _PathUtils.addLeadingSlash\n },\n slash: {\n encodePath: _PathUtils.addLeadingSlash,\n decodePath: _PathUtils.addLeadingSlash\n }\n};\n\nvar getHashPath = function getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n};\n\nvar pushHashPath = function pushHashPath(path) {\n return window.location.hash = path;\n};\n\nvar replaceHashPath = function replaceHashPath(path) {\n var hashIndex = window.location.href.indexOf('#');\n\n window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);\n};\n\nvar createHashHistory = function createHashHistory() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n (0, _invariant2.default)(_DOMUtils.canUseDOM, 'Hash history needs a DOM');\n\n var globalHistory = window.history;\n var canGoWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)();\n\n var _props$getUserConfirm = props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === undefined ? _DOMUtils.getConfirmation : _props$getUserConfirm,\n _props$hashType = props.hashType,\n hashType = _props$hashType === undefined ? 'slash' : _props$hashType;\n\n var basename = props.basename ? (0, _PathUtils.stripTrailingSlash)((0, _PathUtils.addLeadingSlash)(props.basename)) : '';\n\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n\n var getDOMLocation = function getDOMLocation() {\n var path = decodePath(getHashPath());\n\n (0, _warning2.default)(!basename || (0, _PathUtils.hasBasename)(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n\n if (basename) path = (0, _PathUtils.stripBasename)(path, basename);\n\n return (0, _LocationUtils.createLocation)(path);\n };\n\n var transitionManager = (0, _createTransitionManager2.default)();\n\n var setState = function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n\n transitionManager.notifyListeners(history.location, history.action);\n };\n\n var forceNextPop = false;\n var ignorePath = null;\n\n var handleHashChange = function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n\n if (!forceNextPop && (0, _LocationUtils.locationsAreEqual)(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === (0, _PathUtils.createPath)(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n\n handlePop(location);\n }\n };\n\n var handlePop = function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({ action: action, location: location });\n } else {\n revertPop(location);\n }\n });\n }\n };\n\n var revertPop = function revertPop(fromLocation) {\n var toLocation = history.location;\n\n // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(toLocation));\n\n if (toIndex === -1) toIndex = 0;\n\n var fromIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(fromLocation));\n\n if (fromIndex === -1) fromIndex = 0;\n\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n };\n\n // Ensure the hash is encoded properly before doing anything else.\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) replaceHashPath(encodedPath);\n\n var initialLocation = getDOMLocation();\n var allPaths = [(0, _PathUtils.createPath)(initialLocation)];\n\n // Public interface\n\n var createHref = function createHref(location) {\n return '#' + encodePath(basename + (0, _PathUtils.createPath)(location));\n };\n\n var push = function push(path, state) {\n (0, _warning2.default)(state === undefined, 'Hash history cannot push state; it is ignored');\n\n var action = 'PUSH';\n var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = (0, _PathUtils.createPath)(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n\n var prevIndex = allPaths.lastIndexOf((0, _PathUtils.createPath)(history.location));\n var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n\n nextPaths.push(path);\n allPaths = nextPaths;\n\n setState({ action: action, location: location });\n } else {\n (0, _warning2.default)(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');\n\n setState();\n }\n });\n };\n\n var replace = function replace(path, state) {\n (0, _warning2.default)(state === undefined, 'Hash history cannot replace state; it is ignored');\n\n var action = 'REPLACE';\n var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);\n\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n\n var path = (0, _PathUtils.createPath)(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf((0, _PathUtils.createPath)(history.location));\n\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n\n setState({ action: action, location: location });\n });\n };\n\n var go = function go(n) {\n (0, _warning2.default)(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');\n\n globalHistory.go(n);\n };\n\n var goBack = function goBack() {\n return go(-1);\n };\n\n var goForward = function goForward() {\n return go(1);\n };\n\n var listenerCount = 0;\n\n var checkDOMListeners = function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1) {\n (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);\n }\n };\n\n var isBlocked = false;\n\n var block = function block() {\n var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n };\n\n var listen = function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n };\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n\n return history;\n};\n\nexports.default = createHashHistory;","'use strict';\n\nexports.__esModule = true;\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar createTransitionManager = function createTransitionManager() {\n var prompt = null;\n\n var setPrompt = function setPrompt(nextPrompt) {\n (0, _warning2.default)(prompt == null, 'A history supports only one prompt at a time');\n\n prompt = nextPrompt;\n\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n };\n\n var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n (0, _warning2.default)(false, 'A history needs a getUserConfirmation function in order to use a prompt message');\n\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n };\n\n var listeners = [];\n\n var appendListener = function appendListener(fn) {\n var isActive = true;\n\n var listener = function listener() {\n if (isActive) fn.apply(undefined, arguments);\n };\n\n listeners.push(listener);\n\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n };\n\n var notifyListeners = function notifyListeners() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(undefined, args);\n });\n };\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n};\n\nexports.default = createTransitionManager;"],"sourceRoot":""}