{"version":3,"sources":["redux/Actions/Security/ActionTypes.tsx","components/Api/ApiAxios.tsx","components/Api/index.tsx","components/SecuredRoute/SecuredRoute.tsx","pages/Payables/Payables.tsx","redux/Actions/BreadCrumbs/ActionTypes.tsx","components/BreadCrumbs/BreadCrumbs.tsx","redux/Actions/BreadCrumbs/ActionCreators.tsx","components/404/404.tsx","pages/Search/DrawerGroupsAdmin/DrawerGroupsAdmin.tsx","pages/Search/Home/Home.tsx","utils/MenuItems.types.tsx","pages/Search/MenuAdmin/MenuAdmin.tsx","pages/Search/SearchTemplate/SearchTemplate.tsx","pages/Search/SearchSimple/SearchSimple.tsx","pages/Search/DocumentPreview/DocumentPreview.tsx","pages/Search/SearchResults/SearchResults.tsx","pages/Search/Tabs/Tabs.tsx","pages/Search/TemplateAdmin/TemplateAdmin.tsx","pages/Search/layout/Content/Content.tsx","pages/Search/layout/Header/Header.tsx","pages/Search/Search.tsx","Apps.tsx","components/Auth/Auth.tsx","components/Auth/ForgotNewPw/ForgotNewPw.tsx","components/Auth/ForgotPW/ForgotPW.tsx","components/Auth/Login/Login.tsx","redux/Actions/Security/ActionCreators.tsx","i18n.tsx","redux/Reducers/BreadCrumbs/Reducer.tsx","redux/Reducers/Security/Reducer.tsx","redux/Reducers/RootReducer.tsx","redux/Store/Store.tsx","registerServiceWorker.ts","index.tsx"],"names":["SecurityActionTypes","LoginMode","defaultOptions","process","Axios","defaults","baseURL","headers","common","Api","connect","state","ownProps","security","securityState","props","Component","component","others","render","token","Authorization","to","pathname","search","encodeURIComponent","location","Payables","isNull","bind","getUrl","className","this","handleResponse","selectionMode","SelectionMode","none","enableSearch","enableSort","height","value","undefined","items","page","sortBy","sortDesc","qValue","sortByValue","sortDescValue","url","console","log","React","withRouter","username","loginMode","BreadCrumbsActiontypes","BreadCrumbs","onBreadcrumbItemClicked","ev","item","key","history","push","forEach","onClick","Breadcrumb","styles","root","margin","breadCrumbsState","updateBreadCrumbs","param","type","UPDATE","payload","NotFound","click","text","isCurrentItem","Fabric","Spinner","size","SpinnerSize","large","label","ariaLive","dispatch","divStyle","fallbacks","DrawerGroupsAdmin","selection","getItems","name","t","iconProps","iconName","onNew","getFarItems","onDelete","params","match","drawerGroupId","showList","onCancel","onSubmitSuccess","onSubmitError","onCustomBuildColumns","onSelectionChanged","Selection","getKey","index","id","getSelection","prevProps","lastIdArray","exec","replace","lastId","getIdArray","setState","dir","style","padding","borderRight","CommandBar","farItems","ariaLabel","single","selectKeyOnInit","underlined","marginTop","exact","path","title","labelCmdBarBtnSave","labelCmdBarBtnEdit","labelCmdBarBtnCancel","labelValidationMessage","labelDrawerGroupsValidationMessage","labelFormName","labelFormSite","labelFormSitePlaceholder","labelFormDescription","labelFormMovableAvailable","labelFormMovableSelected","labelFormMovableProperty","baseUrl","renderToastContainer","fieldName","minWidth","maxWidth","isRowHeader","isResizable","isSorted","isSortedDescending","sortAscendingAriaLabel","sortDescendingAriaLabel","data","isPadded","length","setAllSelected","response","msg","message","successToast","error","errorObj","errorToast","delete","then","catch","status","withTranslation","Home","withViewport","textAlign","width","paddingTop","AnimationClassNames","fadeIn500","color","getTheme","palette","themePrimary","AllMenuCommandsEnum","XLSX","icon","PDF","EDIT","AllMenuCommands","MenuAdmin","menuId","labelFormId","labelFormCommand","labelFormFieldset","labelToggleOn","labelToggleOff","labelFormMenuItemId","labelFormMenuItemName","labelFormMenuItemIcon","commands","receivedError","SearchTemplate","closeDialog","hideDialog","templateId","onSubmit","isModal","modal","renderType","RenderType","DIALOG","COMMANDBAR","user","hideExternalSurface","labelCmdBarCancel","labelCmdBarSearch","goBack","formAsJsonEncoded","SearchSimple","Date","getMilliseconds","DocumentPreview","properties","errorValue","Image","src","alt","map","element","rowKey","Label","fontWeight","getCommandBarFarItems","excelExportCommand","contentType","MimeTypes","fileType","urlCommand","pdfExportCommand","SearchResults","selectedElems","loadMenuItems","newMenuItems","get","iconOnlyValue","textMode","excelCmdItem","getMenuCommandIfExists","exportToExcel","pdfCmdItem","exportToPdf","menuItems","renderError","command","funcToExecute","some","cmd","iconOnly","showPanel","closePanel","ttl","retError","errorMsg","getSelectionIds","ids","executeExportCommand","documentId","display","flexDirection","flex","multiple","overrideDevice","Panel","isBlocking","isOpen","PanelType","medium","isHiddenOnDismiss","onDismiss","closeButtonAriaLabel","splice","TabsSemanticHome","idx","tabs","activeIndex","openNewTab","onTabChange","onCloseTab","getTabIndex","getTabName","Tab","menu","secondary","pointing","panes","renderActiveOnly","locKey","activeTab","find","x","newTab","menuItem","Menu","Item","IconButton","iconHovered","pane","content","newTabs","update","$push","findIndex","query","queryString","parsedProps","JSON","parse","q","event","stopPropagation","preventDefault","$splice","TemplateAdmin","getDynamicTranslationInternal","keySuffix","toLowerCase","getId","getDynamicTranslation","titleOnPanels","allowMenus","allowDisplayProperties","labelTitleNew","labelTitleEdit","labelFormTemplateName","labelCmdBarFarBtnAdd","labelCmdBarFarBtnReset","labelCmdBarFarBtnResults","labelDialogTitleDelete","labelDialogSubtextPrefixDelete","labelDialogSubtextSuffixDelete","labelDialogBtnDelete","labelDialogBtnCancel","labelDialogTitleReset","labelDialogSubtextReset","labelDialogBtnReset","labelPanelSettingsPropertyTitle","labelPanelSettingsOperatorsTitle","labelPanelSettingsBtnUseAll","labelPanelSettingsBtnUseSelected","labelPanelSettingsEquals","labelPanelSettingsStartsWith","labelPanelSettingsContains","labelPanelSettingsIsEmpty","labelPanelSettingsGreaterThan","labelPanelSettingsLessThan","labelPanelSettingsWithin","labelPanelSettingsIncludes","labelPanelDisplayPropertiesTitle","labelPanelAddPropertiesTitle","labelPanelAddPropertiesProperty","labelPanelAddBtnAdd","labelPanelAddBtnCancel","labelMovListAvailable","labelMovListSelected","labelIconOperatorDelete","labelIconOperatorSetting","labelIconOperatorUp","labelIconOperatorDown","labelPanelMenusTitle","Content","previousLocation","nextProps","action","Tabs","DrawerGroupAdmin","headerTheme","createTheme","neutralPrimary","embeddedStyle","backgroundRepeat","backgroundColor","normalStyle","backgroundImage","fontSize","lineHeight","Header","isCalloutVisible","isSearchCalloutVisible","recentSearches","quickButtons","getLogo","getPersona","getQuickButtons","goToHome","goToSettings","goToTemplates","goToMenus","goToShortcut","goToQuickButton","goToDrawerGroups","logout","isEmbeddedLogin","EMBEDDED","ActionButton","allowDisabledFocus","verticalAlign","fallback","loading","afterInjection","svg","beforeInjection","classList","add","renumerateIRIElements","wrapper","extraMenuItems","itemType","ContextualMenuItemType","Divider","target","disabled","checked","menuProps","shouldFocusOnMount","Persona","PersonaSize","size24","initialsColor","PersonaInitialsColor","purple","theme","btn","template","getFAIcon","encoded","toTemplateResult","LOGOUT_USER","Search","Apps","Auth","mergeStyleSets","background","backgroundSize","stackMargin","selectors","marginRight","login","boxShadow","loginMsg","inputs","marginBottom","Stack","horizontal","horizontalAlign","verticalFill","setAttribute","onKeyPress","children","visibility","buttonShow","DefaultButton","primary","buttonOnClick","buttonDisabled","border","isProcessing","labelPosition","buttonText","messageText","MessageBar","messageBarType","messageType","isMultiline","defaultProps","ForgotNewPw","componentRef","guid","validInput","validGuid","success","getForm","submit","validateGuid","getErrorMessage","onNotifyValidationResult","validatePw","validateConfPw","getSuccessMsg","getInvalidGuid","MessageBarType","blocked","Link","href","TextField","placeholder","defaultValue","password","deferredValidationTime","validateOnLoad","onGetErrorMessage","errorMessage","validMsg","onChange","input","prefix","onRenderPrefix","confPassword","Icon","temp","resp","statusText","toJSON","request","post","ForgotPW","document","referrer","email","RegExp","test","Login","isAutoLogin","pwd","goTo","hasMsg","isPasswordEncrypted","NORMAL","saveToken","LOGIN_USER","loginToken","resources","en","translation","pt","i18n","use","LanguageDetector","initReactI18next","init","debug","interpolation","escapeValue","fallbackLng","initialState","rootReducer","combineReducers","Object","assign","UNAUTH_USER","persistConfig","storage","persistedReducer","persistReducer","isLocalhost","Boolean","window","hostname","registerValidSW","swUrl","navigator","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","controller","initializeIcons","library","fab","fas","far","store","createStore","persistor","persistStore","CreateStore","purge","interceptors","Promise","reject","mainTheme","themeLighterAlt","themeLighter","themeLight","themeTertiary","themeSecondary","themeDarkAlt","themeDark","themeDarker","neutralLighterAlt","neutralLighter","neutralLight","neutralQuaternaryAlt","neutralQuaternary","neutralTertiaryAlt","neutralTertiary","neutralSecondary","neutralPrimaryAlt","neutralDark","black","white","loadTheme","ReactDOM","basename","getElementById","URL","toString","origin","addEventListener","fetch","indexOf","ready","unregister","reload","checkValidServiceWorker","registerServiceWorker"],"mappings":"8xMAAYA,EAMAC,E,+KANAD,K,wBAAAA,E,0BAAAA,E,2BAAAA,M,cAMAC,K,gBAAAA,E,qBAAAA,M,KCHZ,IAAMC,EACKC,aADLD,EAEK,CACP,eAAgB,oBAIpBE,IAAMC,SAASC,QAAUJ,EACzBE,IAAMC,SAASE,QAAQC,OAAO,gBAAkBN,EAEhD,IAAMO,EAAML,ICVGK,MDWAA,E,gBEyBAC,mBA9Bf,SAAyBC,EAAmBC,GAC1C,MAAO,CAAEC,SAAUF,EAAMG,cAAcD,YA6B1BH,EA1Bf,SAAsBK,GACpB,IAAmBC,EAAyBD,EAApCE,UAAyBC,EAAjC,YAA4CH,EAA5C,GACA,OACE,gBAAC,IAAD,iBACMG,EADN,CAGEC,OAAQ,WACN,OAAIJ,EAAMF,UAAYE,EAAMF,SAASO,OACnCX,EAAIJ,SAASE,QAAQC,OAAOa,cAAgBN,EAAMF,SAASO,MAEpD,gBAACJ,EAAD,OAGL,gBAAC,IAAD,CACEM,GAAI,CACFC,SAAU,SACVC,OAAQ,QAAUC,mBAAmBV,EAAMW,SAASH,SAAWR,EAAMW,SAASF,kB,iCCjBxFG,E,kDACJ,WAAYZ,GAAa,IAAD,8BACtB,cAAMA,IAEDa,OAAS,EAAKA,OAAOC,KAAZ,gBACd,EAAKC,OAAS,EAAKA,OAAOD,KAAZ,gBAJQ,E,0CAOxB,WACE,OACE,uBAAKE,UAAU,YACb,gBAAC,IAAD,CACED,OAAQE,KAAKF,OACbG,eAAgBD,KAAKC,eACrBC,cAAeC,IAA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OGOUT_USER',\r\n UNAUTH_USER = 'UNAUTH_USER'\r\n}\r\n\r\nexport enum LoginMode {\r\n NORMAL = 'NORMAL',\r\n EMBEDDED = 'EMBEDDED'\r\n}\r\n\r\nexport interface ISecurityPayload {\r\n username?: string;\r\n password?: string;\r\n token?: string;\r\n message?: string;\r\n loginMode: LoginMode;\r\n}\r\n\r\nexport interface ISecurityLoginAction {\r\n type: SecurityActionTypes.LOGIN_USER;\r\n payload: { security: ISecurityPayload };\r\n}\r\n\r\nexport interface ISecurityLogoutAction {\r\n type: SecurityActionTypes.LOGOUT_USER;\r\n}\r\n\r\nexport interface ISecurityUnauthAction {\r\n type: SecurityActionTypes.UNAUTH_USER;\r\n payload: { message: string };\r\n}\r\n\r\nexport type SecurityActions = ISecurityLoginAction | ISecurityLogoutAction | ISecurityUnauthAction;\r\n","import Axios from 'axios';\r\nimport { SecurityActionTypes } from '../../redux/Actions/Security/ActionTypes';\r\n\r\nconst defaultOptions = {\r\n baseURL: process.env.REACT_APP_API_URL,\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n};\r\n\r\nAxios.defaults.baseURL = defaultOptions.baseURL;\r\nAxios.defaults.headers.common['Content-Type'] = defaultOptions.headers;\r\n\r\nconst Api = Axios;\r\nexport default Api;\r\n\r\nexport function setupInterceptors(store: any): void {\r\n Api.interceptors.response.use(undefined, error => {\r\n if (error.response && error.response.status === 401) {\r\n console.log('401 error', error);\r\n store.dispatch({\r\n type: SecurityActionTypes.UNAUTH_USER,\r\n payload: { message: 'Your Session expired!' }\r\n });\r\n }\r\n return Promise.reject(error);\r\n });\r\n}\r\n","import Api from './ApiAxios';\r\n\r\nexport { setupInterceptors } from './ApiAxios';\r\nexport default Api;\r\n","import * as React from 'react';\r\n\r\nimport { Redirect, Route } from 'react-router-dom';\r\n\r\nimport { connect } from 'react-redux';\r\nimport { IRootState } from '../../redux/Reducers/RootReducer';\r\n\r\nimport Api from '../Api';\r\n\r\nfunction mapStateToProps(state: IRootState, ownProps: any) {\r\n return { security: state.securityState.security };\r\n}\r\n\r\nfunction SecuredRoute(props: any) {\r\n const { component: Component, ...others } = props;\r\n return (\r\n {\r\n if (props.security && props.security.token) {\r\n Api.defaults.headers.common.Authorization = props.security.token;\r\n\r\n return ;\r\n } else {\r\n return (\r\n {\r\n constructor(props: any) {\r\n super(props);\r\n\r\n this.isNull = this.isNull.bind(this);\r\n this.getUrl = this.getUrl.bind(this);\r\n }\r\n\r\n public render() {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n private isNull(value: any) {\r\n return value === null || value === 'null' || value === undefined;\r\n }\r\n\r\n private handleResponse(items: any[]) {\r\n return items;\r\n }\r\n\r\n private getUrl(search: string, page: number, sortBy?: string | undefined, sortDesc?: boolean | undefined): string {\r\n const qValue = this.isNull(search) ? '' : `&q=${search}`;\r\n const sortByValue = this.isNull(sortBy) ? '' : `&_sort=${sortBy}`;\r\n let sortDescValue = '';\r\n\r\n if (!this.isNull(sortDesc)) {\r\n sortDescValue = sortDesc ? '&_order=desc' : '&_order=asc';\r\n }\r\n\r\n const url = `https://localhost:44300/api/documents?_start=${page}&_limit=20${qValue}${sortByValue}${sortDescValue}`;\r\n console.log(url);\r\n return url;\r\n }\r\n}\r\n\r\nexport default withRouter(connect(\r\n mapStateToProps,\r\n null\r\n)(Payables) as any);\r\n","import { IBreadcrumbItem } from \"office-ui-fabric-react/lib/Breadcrumb\";\r\n\r\nexport enum BreadCrumbsActiontypes {\r\n UPDATE = 'UPDATE'\r\n}\r\nexport interface IBreadCrumbsAction {\r\n type: BreadCrumbsActiontypes.UPDATE;\r\n payload: { items: IBreadcrumbItem[] };\r\n}\r\n","import { Breadcrumb, IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { /* RouteComponentProps, */ withRouter } from 'react-router-dom';\r\nimport { IRootState } from '../../redux/Reducers/RootReducer';\r\nimport './BreadCrumbs.css';\r\n\r\n/* export interface IBreadCrumbsProps extends RouteComponentProps {\r\n items?: IBreadcrumbItem[]\r\n}; */\r\n\r\nfunction mapStateToProps(state: IRootState, ownProps: any) {\r\n return { items: state.breadCrumbsState.items };\r\n}\r\n\r\nclass BreadCrumbs extends React.PureComponent {\r\n public render(): JSX.Element {\r\n if (this.props.items) {\r\n this.props.items.forEach((item: any) => {\r\n item.onClick = this.onBreadcrumbItemClicked;\r\n });\r\n return ;\r\n } else {\r\n return

loading...

;\r\n }\r\n }\r\n\r\n private onBreadcrumbItemClicked = (ev: React.MouseEvent, item: IBreadcrumbItem): void => {\r\n console.log(`Breadcrumb item with key \"${item.key}\" has been clicked.`);\r\n this.props.history.push(`${item.key}`);\r\n };\r\n}\r\n\r\nexport default withRouter(connect(mapStateToProps)(BreadCrumbs) as any);\r\n","import { IBreadcrumbItem } from \"office-ui-fabric-react/lib/Breadcrumb\";\r\nimport { BreadCrumbsActiontypes, IBreadCrumbsAction } from './ActionTypes'\r\n\r\nexport function updateBreadCrumbs(param: IBreadcrumbItem[]): IBreadCrumbsAction {\r\n return {\r\n type: BreadCrumbsActiontypes.UPDATE,\r\n payload: {\r\n items: param\r\n }\r\n };\r\n}","import { IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport { Fabric } from 'office-ui-fabric-react/lib/Fabric';\r\nimport { Spinner, SpinnerSize } from 'office-ui-fabric-react/lib/Spinner';\r\nimport * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Dispatch } from 'redux';\r\nimport { updateBreadCrumbs } from '../../redux/Actions/BreadCrumbs/ActionCreators';\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n updateBreadCrumbs: (items: IBreadcrumbItem[]) => dispatch(updateBreadCrumbs(items))\r\n };\r\n};\r\n\r\nclass NotFound extends React.PureComponent {\r\n constructor(props: any) {\r\n super(props);\r\n\r\n this.click = this.click.bind(this);\r\n }\r\n\r\n public componentDidMount() {\r\n const items: IBreadcrumbItem[] = [{ text: 'Home', key: '/home' }, { text: 'Not Found', key: '/', isCurrentItem: true }];\r\n\r\n this.props.updateBreadCrumbs(items);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n private click(): void {\r\n const items: IBreadcrumbItem[] = [{ text: 'Home', key: '/home' }, { text: 'Not Found', key: '/', isCurrentItem: true }];\r\n\r\n this.props.updateBreadCrumbs(items);\r\n }\r\n}\r\n\r\nexport default connect(\r\n null,\r\n mapDispatchToProps\r\n)(NotFound);\r\n","import {\r\n DrawerGroups,\r\n errorToast,\r\n IErrorMessage,\r\n ISuccessMessage,\r\n List,\r\n renderToastContainer,\r\n successToast\r\n} from 'enchoice-fabric-react-lib';\r\nimport { CommandBar, IColumn, IObjectWithKey, Selection, SelectionMode } from 'office-ui-fabric-react';\r\nimport { IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport * as React from 'react';\r\nimport { withTranslation } from 'react-i18next';\r\nimport { connect } from 'react-redux';\r\nimport { Route, Switch, withRouter } from 'react-router';\r\nimport { Dispatch } from 'redux';\r\nimport Api from '../../../components/Api';\r\nimport { updateBreadCrumbs } from '../../../redux/Actions/BreadCrumbs/ActionCreators';\r\nimport './DrawerGroupsAdmin.css';\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n updateBreadCrumbs: (items: IBreadcrumbItem[]) => dispatch(updateBreadCrumbs(items))\r\n };\r\n};\r\n\r\nconst URL_BASE = '';\r\n\r\nconst divStyle = {\r\n height: 'calc(100% - 85px)',\r\n fallbacks: [{ height: '-moz-calc(100% - 85px)' }, { height: '-webkit-calc(100% - 85px)' }, { height: '-o-calc(100% - 85px)' }]\r\n};\r\n\r\nclass DrawerGroupsAdmin extends React.PureComponent {\r\n private selection: Selection;\r\n\r\n constructor(props: any) {\r\n super(props);\r\n\r\n const {\r\n match: { params }\r\n } = this.props;\r\n\r\n this.state = {\r\n drawerGroupId: params.drawerGroupId,\r\n showList: true\r\n };\r\n\r\n this.onCancel = this.onCancel.bind(this);\r\n this.onSubmitSuccess = this.onSubmitSuccess.bind(this);\r\n this.onSubmitError = this.onSubmitError.bind(this);\r\n this.isNull = this.isNull.bind(this);\r\n this.getUrl = this.getUrl.bind(this);\r\n this.onCustomBuildColumns = this.onCustomBuildColumns.bind(this);\r\n this.onSelectionChanged = this.onSelectionChanged.bind(this);\r\n this.onNew = this.onNew.bind(this);\r\n this.onDelete = this.onDelete.bind(this);\r\n\r\n this.selection = new Selection({\r\n getKey: (item: IObjectWithKey, index?: number | undefined): string | number => {\r\n return item && (item as any).id ? (item as any).id : `${index}`;\r\n },\r\n onSelectionChanged: () => {\r\n this.onSelectionChanged(this.selection.getSelection());\r\n }\r\n });\r\n }\r\n\r\n public componentDidUpdate(prevProps: any) {\r\n const lastIdArray = /\\w+/.exec(prevProps.location.pathname.replace(prevProps.match.url, ''));\r\n\r\n if (lastIdArray) {\r\n const lastId = lastIdArray[0];\r\n const id = this.getIdArray();\r\n if (lastId && id == null) {\r\n this.setState({ showList: false }, () => this.setState({ showList: true }));\r\n }\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n const { t } = this.props;\r\n\r\n const items: IBreadcrumbItem[] = [\r\n { text: t('drawerGroupAdmin.breadcrumb.home'), key: '/home' },\r\n { text: t('drawerGroupAdmin.breadcrumb.1level'), key: `/search/drawergroups`, isCurrentItem: true }\r\n ];\r\n this.props.updateBreadCrumbs(items);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { t, match } = this.props;\r\n\r\n const id = this.getIdArray();\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n {this.state.showList && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n
\r\n \r\n (\r\n
\r\n \r\n
\r\n )}\r\n />\r\n (\r\n
\r\n \r\n
\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {renderToastContainer()}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private onCustomBuildColumns(): IColumn[] {\r\n console.log('Set custom columns');\r\n return [\r\n {\r\n key: 'name',\r\n name: 'Name',\r\n fieldName: 'name',\r\n minWidth: 100,\r\n maxWidth: 150,\r\n isRowHeader: true,\r\n isResizable: false,\r\n isSorted: true,\r\n isSortedDescending: false,\r\n sortAscendingAriaLabel: 'Sorted A to Z',\r\n sortDescendingAriaLabel: 'Sorted Z to A',\r\n data: 'string',\r\n isPadded: true\r\n },\r\n {\r\n key: 'site',\r\n name: 'Site',\r\n fieldName: 'site',\r\n minWidth: 100,\r\n maxWidth: 150,\r\n isRowHeader: true,\r\n isResizable: false,\r\n isSorted: true,\r\n isSortedDescending: false,\r\n sortAscendingAriaLabel: 'Sorted A to Z',\r\n sortDescendingAriaLabel: 'Sorted Z to A',\r\n data: 'string',\r\n isPadded: true\r\n },\r\n {\r\n key: 'drawers',\r\n name: 'Drawers',\r\n fieldName: 'groups',\r\n minWidth: 100,\r\n maxWidth: 150,\r\n isRowHeader: true,\r\n isResizable: false,\r\n isSorted: false,\r\n data: 'number',\r\n isPadded: true\r\n }\r\n ];\r\n }\r\n\r\n private onSelectionChanged(selection: IObjectWithKey[]) {\r\n if (selection.length === 1) {\r\n this.props.history.push(`/search/drawergroups/${(selection[0] as any).id}/edit`);\r\n } else {\r\n this.props.history.push(`/search/drawergroups/`);\r\n }\r\n }\r\n\r\n private isNull(value: any) {\r\n return value == null || value === 'null' || value === undefined;\r\n }\r\n\r\n private handleResponse(items: any[]) {\r\n return items;\r\n }\r\n\r\n private getUrl(search: string, page: number, sortBy?: string, sortDesc?: boolean) {\r\n const qValue = this.isNull(search) ? '' : `&q=${search}`;\r\n const sortByValue = this.isNull(sortBy) ? '' : `&_sort=${sortBy}`;\r\n let sortDescValue = '';\r\n\r\n if (!this.isNull(sortDesc)) {\r\n sortDescValue = sortDesc ? '&_order=desc' : '&_order=asc';\r\n }\r\n const url = `${URL_BASE}/drawergroups?_start=${page}&_limit=20${qValue}${sortByValue}${sortDescValue}`;\r\n console.log(url);\r\n return url;\r\n }\r\n\r\n private onCancel(): void {\r\n console.log('onCancel ...');\r\n this.selection.setAllSelected(false);\r\n\r\n this.props.history.push(`/search/drawergroups/`);\r\n }\r\n\r\n private onSubmitSuccess(response: any): void {\r\n console.log('onSubmitSuccess ...', response);\r\n const id = this.getIdArray();\r\n const message = id ? 'Drawer Group edited.' : 'Drawer Group created';\r\n const msg: ISuccessMessage = {\r\n title: 'Success',\r\n message\r\n };\r\n successToast(msg);\r\n this.selection.setAllSelected(false);\r\n this.props.history.push(`/search/drawergroups/`);\r\n }\r\n\r\n private onSubmitError(error: any): void {\r\n const errorObj = error.response.data;\r\n const id = this.getIdArray();\r\n const title = id ? 'Error editing Drawer Group' : 'Error creating new Drawer Group';\r\n const msg: IErrorMessage = {\r\n title,\r\n message: errorObj.message,\r\n error: errorObj\r\n };\r\n errorToast(msg);\r\n }\r\n\r\n private getItems = () => {\r\n const { t } = this.props;\r\n return [\r\n {\r\n key: 'newItem',\r\n name: t('drawerGroupAdmin.list.cmdBar.new'),\r\n iconProps: {\r\n iconName: 'Add'\r\n },\r\n onClick: this.onNew\r\n }\r\n ];\r\n };\r\n\r\n private getFarItems = () => {\r\n const { t } = this.props;\r\n return [\r\n {\r\n key: 'delete',\r\n name: t('drawerGroupAdmin.list.cmdBar.delete'),\r\n iconProps: {\r\n iconName: 'Delete'\r\n },\r\n onClick: this.onDelete\r\n }\r\n ];\r\n };\r\n\r\n private getIdArray(): any {\r\n return /\\w+/.exec(this.props.location.pathname.replace(this.props.match.url, ''));\r\n }\r\n\r\n private onNew() {\r\n this.selection.setAllSelected(false);\r\n this.props.history.push(`/search/drawergroups/new`);\r\n }\r\n\r\n private onDelete(): any {\r\n const drawerGroupId = this.getIdArray();\r\n const id = drawerGroupId ? drawerGroupId[0] : undefined;\r\n\r\n if (!id) {\r\n return;\r\n }\r\n\r\n Api.delete(`drawergroups/${id}`)\r\n .then(response => {\r\n const msg: ISuccessMessage = {\r\n title: 'Success',\r\n message: 'Drawer Group Deleted with success!'\r\n };\r\n successToast(msg);\r\n this.selection.setAllSelected(false);\r\n this.props.history.push(`/search/drawergroups/`);\r\n })\r\n .catch(error => {\r\n const data = error.response.data;\r\n const msg: IErrorMessage = {\r\n title: 'Error',\r\n message: `Error Deleting Drawer Group: ${data.status}:${data.message}`,\r\n error: data\r\n };\r\n errorToast(msg);\r\n });\r\n }\r\n}\r\n\r\nexport default withRouter(connect(\r\n null,\r\n mapDispatchToProps\r\n)(withTranslation()(DrawerGroupsAdmin)) as any);\r\n","import { AnimationClassNames } from '@uifabric/styling';\r\nimport { IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport { Fabric } from 'office-ui-fabric-react/lib/Fabric';\r\nimport { getTheme } from 'office-ui-fabric-react/lib/Styling';\r\nimport { withViewport } from 'office-ui-fabric-react/lib/utilities/decorators/withViewport';\r\nimport * as React from 'react';\r\nimport { withTranslation } from 'react-i18next';\r\nimport { connect } from 'react-redux';\r\nimport { Dispatch } from 'redux';\r\nimport { updateBreadCrumbs } from '../../../redux/Actions/BreadCrumbs/ActionCreators';\r\nimport { IRootState } from '../../../redux/Reducers/RootReducer';\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n updateBreadCrumbs: (items: IBreadcrumbItem[]) => dispatch(updateBreadCrumbs(items))\r\n };\r\n};\r\n\r\nconst mapStateToProps = (state: IRootState, ownProps: any) => {\r\n return { security: state.securityState.security };\r\n};\r\n\r\n@withViewport\r\nclass Home extends React.PureComponent {\r\n public componentDidMount() {\r\n const { t } = this.props;\r\n const items: IBreadcrumbItem[] = [{ text: t('home.breadcrumb.home'), key: 'home', isCurrentItem: true }];\r\n this.props.updateBreadCrumbs(items);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n \r\n
\r\n
\r\n
\r\n \r\n {this.props.t('Welcome to KTX React')}\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(withTranslation()(Home));\r\n","import { IMenuCommand } from 'enchoice-fabric-react-lib';\r\n\r\nexport const exportToExcelCmd: IMenuCommand = {\r\n id: 'ExportToExcel',\r\n name: 'Export to Excel',\r\n icon: 'ExcelDocument'\r\n};\r\n\r\nexport const exportToPdfCmd: IMenuCommand = {\r\n id: 'ExportToPdf',\r\n name: 'Export to Pdf',\r\n icon: 'Pdf'\r\n};\r\n\r\nexport const editDocumentCmd: IMenuCommand = {\r\n id: 'EditDocument',\r\n name: 'Edit Document',\r\n icon: 'Edit'\r\n};\r\n\r\nexport const AllMenuCommandsEnum = {\r\n XLSX: exportToExcelCmd,\r\n PDF: exportToPdfCmd,\r\n EDIT: editDocumentCmd\r\n};\r\n\r\nexport const AllMenuCommands: IMenuCommand[] = [AllMenuCommandsEnum.XLSX, AllMenuCommandsEnum.PDF, AllMenuCommandsEnum.EDIT];\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { updateBreadCrumbs } from '../../../redux/Actions/BreadCrumbs/ActionCreators';\r\n\r\nimport { errorToast, IErrorMessage, ISuccessMessage, MenusAdminForm, renderToastContainer, successToast } from 'enchoice-fabric-react-lib';\r\nimport { List } from 'enchoice-fabric-react-lib';\r\nimport { IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport { Route, Switch, withRouter } from 'react-router';\r\nimport { Dispatch } from 'redux';\r\n\r\nimport { CommandBar, IColumn, IObjectWithKey, Selection, SelectionMode } from 'office-ui-fabric-react';\r\nimport { withTranslation } from 'react-i18next';\r\n\r\nimport Api from '../../../components/Api';\r\n\r\nimport { AllMenuCommands } from '../../../utils/MenuItems.types';\r\n\r\nimport './MenuAdmin.css';\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n updateBreadCrumbs: (items: IBreadcrumbItem[]) => dispatch(updateBreadCrumbs(items))\r\n };\r\n};\r\n\r\nconst URL_BASE = '';\r\n\r\nconst divStyle = {\r\n height: 'calc(100% - 85px)',\r\n fallbacks: [{ height: '-moz-calc(100% - 85px)' }, { height: '-webkit-calc(100% - 85px)' }, { height: '-o-calc(100% - 85px)' }]\r\n};\r\n\r\nclass MenuAdmin extends React.PureComponent {\r\n private selection: Selection;\r\n\r\n constructor(props: any) {\r\n super(props);\r\n\r\n const {\r\n match: { params }\r\n } = this.props;\r\n\r\n this.state = {\r\n menuId: params.menuId\r\n };\r\n\r\n this.onCancel = this.onCancel.bind(this);\r\n this.onSubmitSuccess = this.onSubmitSuccess.bind(this);\r\n this.onSubmitError = this.onSubmitError.bind(this);\r\n this.isNull = this.isNull.bind(this);\r\n this.getUrl = this.getUrl.bind(this);\r\n this.onCustomBuildColumns = this.onCustomBuildColumns.bind(this);\r\n this.onSelectionChanged = this.onSelectionChanged.bind(this);\r\n this.onNew = this.onNew.bind(this);\r\n this.onDelete = this.onDelete.bind(this);\r\n\r\n this.selection = new Selection({\r\n getKey: (item: IObjectWithKey, index?: number | undefined): string | number => {\r\n console.log('item getKey', item, index, (item as any).id);\r\n return item && (item as any).id ? (item as any).id : `${index}`;\r\n },\r\n onSelectionChanged: () => {\r\n this.onSelectionChanged(this.selection.getSelection());\r\n }\r\n });\r\n }\r\n\r\n public componentDidMount() {\r\n const { t } = this.props;\r\n\r\n const items: IBreadcrumbItem[] = [\r\n { text: t('menuAdmin.breadcrumb.home'), key: '/home' },\r\n { text: t('menuAdmin.breadcrumb.1level'), key: `/search/menu`, isCurrentItem: true }\r\n ];\r\n this.props.updateBreadCrumbs(items);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { t, match } = this.props;\r\n\r\n const id = this.getIdArray();\r\n\r\n console.log('substring: ', this.props.location.pathname, match.url, this.props.location.pathname.replace(match.url, ''), id);\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n (\r\n \r\n )}\r\n />\r\n (\r\n
\r\n \r\n
\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {renderToastContainer()}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private onCustomBuildColumns(): IColumn[] {\r\n console.log('Set custom columns');\r\n return [\r\n {\r\n key: 'name',\r\n name: 'Name',\r\n fieldName: 'name',\r\n minWidth: 210,\r\n maxWidth: 350,\r\n isRowHeader: true,\r\n isResizable: false,\r\n isSorted: true,\r\n isSortedDescending: false,\r\n sortAscendingAriaLabel: 'Sorted A to Z',\r\n sortDescendingAriaLabel: 'Sorted Z to A',\r\n data: 'string',\r\n isPadded: true\r\n }\r\n ];\r\n }\r\n\r\n private onSelectionChanged(selection: IObjectWithKey[]) {\r\n if (selection.length === 1) {\r\n this.props.history.push(`/search/menu/${(selection[0] as any).id}/edit`);\r\n } else {\r\n this.props.history.push(`/search/menu/`);\r\n }\r\n }\r\n\r\n private isNull(value: any) {\r\n return value == null || value === 'null' || value === undefined;\r\n }\r\n\r\n private handleResponse(items: any[]) {\r\n return items;\r\n }\r\n\r\n private getUrl(search: string, page: number, sortBy?: string, sortDesc?: boolean) {\r\n const qValue = this.isNull(search) ? '' : `&q=${search}`;\r\n const sortByValue = this.isNull(sortBy) ? '' : `&_sort=${sortBy}`;\r\n let sortDescValue = '';\r\n\r\n if (!this.isNull(sortDesc)) {\r\n sortDescValue = sortDesc ? '&_order=desc' : '&_order=asc';\r\n }\r\n const url = `${URL_BASE}/menus?_start=${page}&_limit=20${qValue}${sortByValue}${sortDescValue}`;\r\n console.log(url);\r\n return url;\r\n }\r\n\r\n private onCancel(): void {\r\n console.log('onCancel ...');\r\n this.selection.setAllSelected(false);\r\n\r\n this.props.history.push(`/search/menu/`);\r\n }\r\n\r\n private onSubmitSuccess(response: any): void {\r\n console.log('onSubmitSuccess ...', response);\r\n const msg: ISuccessMessage = {\r\n title: 'Success',\r\n message: 'Menu Created.'\r\n };\r\n successToast(msg);\r\n this.selection.setAllSelected(false);\r\n\r\n this.props.history.push(`/search/menu/`);\r\n }\r\n\r\n private onSubmitError(receivedError: any): void {\r\n const msg: IErrorMessage = {\r\n title: 'Error',\r\n message: 'Error Creating Menu.',\r\n error: receivedError\r\n };\r\n errorToast(msg);\r\n }\r\n\r\n private getItems = () => {\r\n const { t } = this.props;\r\n return [\r\n {\r\n key: 'newItem',\r\n name: t('menuAdmin.list.cmdBar.new'),\r\n iconProps: {\r\n iconName: 'Add'\r\n },\r\n onClick: this.onNew\r\n }\r\n ];\r\n };\r\n\r\n private getFarItems = () => {\r\n const { t } = this.props;\r\n return [\r\n {\r\n key: 'delete',\r\n name: t('menuAdmin.list.cmdBar.delete'),\r\n iconProps: {\r\n iconName: 'Delete'\r\n },\r\n onClick: this.onDelete\r\n }\r\n ];\r\n };\r\n\r\n private getIdArray(): any {\r\n return /\\w+/.exec(this.props.location.pathname.replace(this.props.match.url, ''));\r\n }\r\n\r\n private onNew() {\r\n this.selection.setAllSelected(false);\r\n this.props.history.push(`/search/menu/new`);\r\n }\r\n\r\n private onDelete(): any {\r\n const menuId = this.getIdArray();\r\n const id = menuId ? menuId[0] : undefined;\r\n\r\n if (!id) {\r\n return;\r\n }\r\n\r\n Api.delete(`menus/${id}`)\r\n .then(response => {\r\n const msg: ISuccessMessage = {\r\n title: 'Success',\r\n message: 'Menu Deleted with success!'\r\n };\r\n successToast(msg);\r\n })\r\n .catch(error => {\r\n const msg: IErrorMessage = {\r\n title: 'Error',\r\n message: 'Error deleting Menu.',\r\n error: error\r\n };\r\n errorToast(msg);\r\n });\r\n this.selection.setAllSelected(false);\r\n }\r\n}\r\n\r\nexport default withRouter(connect(\r\n null,\r\n mapDispatchToProps\r\n)(withTranslation()(MenuAdmin)) as any);\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { updateBreadCrumbs } from '../../../redux/Actions/BreadCrumbs/ActionCreators';\r\n\r\nimport { RenderType, TemplateForm } from 'enchoice-fabric-react-lib';\r\nimport { IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport { withRouter } from 'react-router';\r\nimport { Dispatch } from 'redux';\r\n\r\nimport { withTranslation } from 'react-i18next';\r\n\r\nimport './SearchTemplate.css';\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n updateBreadCrumbs: (items: IBreadcrumbItem[]) => dispatch(updateBreadCrumbs(items))\r\n };\r\n};\r\n\r\nconst URL_BASE = '/templates/';\r\n\r\nclass SearchTemplate extends React.PureComponent {\r\n constructor(props: any) {\r\n super(props);\r\n\r\n const {\r\n match: { params }\r\n } = this.props;\r\n\r\n this.state = {\r\n templateId: params.templateId,\r\n hideDialog: false\r\n };\r\n\r\n this.onSubmit = this.onSubmit.bind(this);\r\n this.onCancel = this.onCancel.bind(this);\r\n }\r\n\r\n public componentDidMount() {\r\n const items: IBreadcrumbItem[] = [\r\n { text: 'Home', key: '/home' },\r\n { text: 'Search By Template', key: `/search/template/${this.state.templateId}`, isCurrentItem: true }\r\n ];\r\n this.props.updateBreadCrumbs(items);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { t, location } = this.props;\r\n\r\n console.log(location);\r\n const isModal = !!(location.state && location.state.modal);\r\n const renderType: RenderType = isModal ? RenderType.DIALOG : RenderType.COMMANDBAR;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private closeDialog = (): void => {\r\n this.setState({ hideDialog: true });\r\n };\r\n\r\n private onCancel(): void {\r\n console.log('onCancel ...');\r\n this.props.history.goBack();\r\n this.closeDialog();\r\n }\r\n\r\n private onSubmit(formAsJsonEncoded: string): void {\r\n console.log('onSubmit ...', formAsJsonEncoded);\r\n this.props.history.push(`/search/template/${this.state.templateId}/results?properties=${formAsJsonEncoded}`);\r\n this.closeDialog();\r\n }\r\n}\r\n\r\nexport default withRouter(connect(\r\n null,\r\n mapDispatchToProps\r\n)(withTranslation()(SearchTemplate)) as any);\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { updateBreadCrumbs } from '../../../redux/Actions/BreadCrumbs/ActionCreators';\r\n\r\nimport { IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport { withRouter } from 'react-router';\r\nimport { Dispatch } from 'redux';\r\n\r\nimport './SearchSimple.css';\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n updateBreadCrumbs: (items: IBreadcrumbItem[]) => dispatch(updateBreadCrumbs(items))\r\n };\r\n};\r\n\r\nclass SearchSimple extends React.Component {\r\n constructor(props: any) {\r\n super(props);\r\n\r\n const {\r\n match: { params }\r\n } = this.props;\r\n\r\n this.state = {\r\n templateId: params.templateId\r\n };\r\n }\r\n\r\n public componentDidMount() {\r\n const items: IBreadcrumbItem[] = [{ text: 'Home', key: '/home' }, { text: 'Search', key: '/search', isCurrentItem: true }];\r\n this.props.updateBreadCrumbs(items);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n You just searched for {this.props.location.search}\r\n {new Date().getMilliseconds()}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withRouter(connect(\r\n null,\r\n mapDispatchToProps\r\n)(SearchSimple) as any);\r\n","import * as React from 'react';\r\n\r\nimport { CommandBar, ICommandBarItemProps } from 'office-ui-fabric-react/lib/CommandBar';\r\nimport { Image } from 'office-ui-fabric-react/lib/Image';\r\nimport { Label } from 'office-ui-fabric-react/lib/Label';\r\n\r\nimport { Title } from 'enchoice-fabric-react-lib';\r\n\r\nimport Api from '../../../components/Api';\r\n\r\nexport interface IDocumentPreviewProps {\r\n id: number;\r\n}\r\n\r\nclass DocumentPreview extends React.PureComponent {\r\n constructor(props: IDocumentPreviewProps) {\r\n super(props);\r\n this.state = {\r\n properties: [],\r\n error: undefined\r\n };\r\n }\r\n\r\n public componentDidMount() {\r\n console.log('fetching: ', this.props.id);\r\n Api(`documents/${this.props.id}/default`)\r\n .then(response => {\r\n this.setState({\r\n properties: response.data.data\r\n });\r\n })\r\n .catch(errorValue => this.setState({ error: errorValue }));\r\n }\r\n /* \r\n public componentDidUpdate() {\r\n console.log('fetching: ', this.props.id);\r\n fetch(`${URL_BASE}/${this.props.id}/default`, {\r\n method: 'GET',\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n })\r\n .then(response => response.json())\r\n .then(response => {\r\n this.setState({\r\n properties: response.data\r\n });\r\n })\r\n .catch(errorValue => this.setState({ error: errorValue }));\r\n } */\r\n\r\n public render(): JSX.Element {\r\n const { properties } = this.state;\r\n return (\r\n
\r\n
\r\n
\r\n \"Document\r\n
\r\n
\r\n
\r\n
\r\n \r\n </div>\r\n </div>\r\n <div className=\"ms-Grid-row\">\r\n <div className=\"ms-Grid-col ms-sm12 ms-md12 ms-lg12\">\r\n {properties.map((element: any) => {\r\n const rowKey = 'row' + element.name;\r\n return (\r\n <div className=\"ms-Grid-row\" key={rowKey}>\r\n <div className=\"ms-Grid-col ms-sm4 ms-md4 ms-lg4\">\r\n <Label className=\"ms-font-m-plus\" style={{ fontWeight: 'bold' }}>\r\n {element.name}\r\n </Label>\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm8 ms-md8 ms-lg8\">\r\n <Label className=\"ms-font-m-plus\">{element.value}</Label>\r\n </div>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n <div className=\"ms-Grid-row\">\r\n <div className=\"ms-Grid-col ms-sm12 ms-md12 ms-lg12\">\r\n <CommandBar items={[]} farItems={this.getCommandBarFarItems()} />\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private getCommandBarFarItems(): ICommandBarItemProps[] {\r\n const items: ICommandBarItemProps[] = [\r\n {\r\n key: 'Download',\r\n name: 'Download',\r\n iconProps: {\r\n iconName: 'DownloadDocument'\r\n },\r\n onClick: () => {\r\n console.log('Download');\r\n }\r\n }\r\n ];\r\n\r\n return items;\r\n }\r\n}\r\n\r\nexport default DocumentPreview;\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { updateBreadCrumbs } from '../../../redux/Actions/BreadCrumbs/ActionCreators';\r\n\r\nimport {\r\n errorToast,\r\n executeExportCommand,\r\n IErrorMessage,\r\n IExportCommand,\r\n IMenuCommand,\r\n List,\r\n MimeTypes,\r\n renderToastContainer\r\n} from 'enchoice-fabric-react-lib';\r\nimport { SelectionMode } from 'office-ui-fabric-react';\r\nimport { IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport { ICommandBarItemProps } from 'office-ui-fabric-react/lib/CommandBar';\r\nimport { Panel, PanelType } from 'office-ui-fabric-react/lib/Panel';\r\nimport { IObjectWithKey, Selection } from 'office-ui-fabric-react/lib/Selection';\r\nimport { Dispatch } from 'redux';\r\nimport { IBreadCrumbsAction } from '../../../redux/Actions/BreadCrumbs/ActionTypes';\r\nimport DocumentPreview from '../DocumentPreview/DocumentPreview';\r\n\r\nimport { CommandBar } from 'office-ui-fabric-react/lib/CommandBar';\r\n\r\n// import { ContextualMenuItemType, IContextualMenuProps } from 'office-ui-fabric-react/lib/ContextualMenu';\r\n\r\nimport { withTranslation } from 'react-i18next';\r\n\r\nimport Api from '../../../components/Api';\r\n\r\nimport { AllMenuCommandsEnum } from '../../../utils/MenuItems.types';\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n updateBreadCrumbs: (items: IBreadcrumbItem[]) => dispatch(updateBreadCrumbs(items))\r\n };\r\n};\r\n\r\nconst hOffsite = '40px';\r\nconst divStyle = {\r\n height: `calc(100% - ${hOffsite})`,\r\n fallbacks: [\r\n { height: `-moz-calc(100% - ${hOffsite})` },\r\n { height: `-webkit-calc(100% - ${hOffsite})` },\r\n { height: `-o-calc(100% - ${hOffsite})` }\r\n ]\r\n};\r\n\r\nconst excelExportCommand: IExportCommand = {\r\n contentType: MimeTypes.XLSX,\r\n fileType: 'xlsx',\r\n urlCommand: 'export'\r\n};\r\n\r\nconst pdfExportCommand: IExportCommand = {\r\n contentType: MimeTypes.PDF,\r\n fileType: 'pdf',\r\n urlCommand: 'export'\r\n};\r\n\r\nexport interface ISearchResultsProps {\r\n templateId: number;\r\n requestData: string;\r\n match: any;\r\n location: any;\r\n updateBreadCrumbs(param: IBreadcrumbItem[]): IBreadCrumbsAction;\r\n}\r\n\r\nclass SearchResults extends React.PureComponent<any, any> {\r\n private selectedElems: IObjectWithKey[] = [];\r\n private selection: Selection;\r\n\r\n constructor(props: any) {\r\n super(props);\r\n\r\n const {\r\n match: { params }\r\n } = this.props;\r\n\r\n this.state = {\r\n templateId: params.templateId,\r\n properties: params.properties,\r\n menuItems: [],\r\n showPanel: false,\r\n documentId: -1\r\n };\r\n\r\n this.isNull = this.isNull.bind(this);\r\n this.getUrl = this.getUrl.bind(this);\r\n this.onSelectionChanged = this.onSelectionChanged.bind(this);\r\n\r\n this.selection = new Selection({\r\n onSelectionChanged: () => {\r\n this.onSelectionChanged(this.selection.getSelection());\r\n }\r\n });\r\n }\r\n\r\n public componentDidMount() {\r\n const { t } = this.props;\r\n\r\n this.loadMenuItems();\r\n\r\n const items: IBreadcrumbItem[] = [\r\n { text: t('searchResults.breadcrumb.home'), key: '/home' },\r\n { text: t('searchResults.breadcrumb.search'), key: '/search/template/' + this.state.templateId },\r\n {\r\n text: t('searchResults.breadcrumb.results'),\r\n key: '/search/template/' + this.state.templateId + '/results',\r\n isCurrentItem: true\r\n }\r\n ];\r\n this.props.updateBreadCrumbs(items);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { menuItems } = this.state;\r\n return (\r\n <div style={{ height: '100%', width: '100%', display: 'flex', flexDirection: 'column', flex: 1 }}>\r\n <CommandBar items={menuItems} styles={{ root: { padding: 0 } }} />\r\n {/* <div style={{ width: '100%', marginTop: '20px' }}>\r\n <Title title=\"Search By Template\" icon={true} />\r\n </div> */}\r\n <div style={divStyle}>\r\n <List\r\n getUrl={this.getUrl}\r\n handleResponse={this.handleResponse}\r\n selectionMode={SelectionMode.multiple}\r\n enableSearch={false}\r\n enableSort={true}\r\n selection={this.selection}\r\n height={'100%'}\r\n // onItemContextMenu={this.onItemContextMenu}\r\n overrideDevice={true}\r\n styles={{ root: { height: '100%', padding: 0 } }}\r\n />\r\n </div>\r\n <div>\r\n {this.state.documentId != null && (\r\n <Panel\r\n isBlocking={false}\r\n isOpen={this.state.showPanel}\r\n type={PanelType.medium}\r\n isHiddenOnDismiss={false}\r\n onDismiss={this.closePanel}\r\n closeButtonAriaLabel=\"Close\"\r\n >\r\n <DocumentPreview id={this.state.documentId} />\r\n </Panel>\r\n )}\r\n </div>\r\n <div>{renderToastContainer()}</div>\r\n </div>\r\n );\r\n }\r\n\r\n private loadMenuItems = (): void => {\r\n const { templateId } = this.state;\r\n const url = `templates/${templateId}/menu`;\r\n const newMenuItems: ICommandBarItemProps[] = [];\r\n\r\n Api.get(url)\r\n .then((response: any) => {\r\n const data = response.data;\r\n const commands: IMenuCommand[] = data.items;\r\n const iconOnlyValue = !data.textMode;\r\n\r\n const excelCmdItem = this.getMenuCommandIfExists(commands, AllMenuCommandsEnum.XLSX, iconOnlyValue, this.exportToExcel);\r\n if (excelCmdItem) {\r\n newMenuItems.push(excelCmdItem);\r\n }\r\n\r\n const pdfCmdItem = this.getMenuCommandIfExists(commands, AllMenuCommandsEnum.PDF, iconOnlyValue, this.exportToPdf);\r\n if (pdfCmdItem) {\r\n newMenuItems.push(pdfCmdItem);\r\n }\r\n\r\n this.setState({\r\n menuItems: newMenuItems\r\n });\r\n })\r\n .catch(error => this.renderError('Error!', 'Error Loading Menus', error));\r\n };\r\n\r\n private getMenuCommandIfExists = (\r\n commands: IMenuCommand[],\r\n command: IMenuCommand,\r\n iconOnlyValue: boolean,\r\n funcToExecute: any\r\n ): ICommandBarItemProps | undefined => {\r\n const cmdExist = commands.some(cmd => cmd.id === command.id);\r\n let item: ICommandBarItemProps | undefined = undefined;\r\n\r\n if (cmdExist) {\r\n item = {\r\n key: command.id,\r\n name: command.name,\r\n iconProps: {\r\n iconName: command.icon\r\n },\r\n iconOnly: iconOnlyValue,\r\n onClick: () => {\r\n funcToExecute();\r\n }\r\n };\r\n }\r\n return item;\r\n };\r\n\r\n private showPanel = (): void => {\r\n this.setState({ showPanel: true });\r\n };\r\n\r\n private closePanel = (): void => {\r\n this.setState({ showPanel: false });\r\n };\r\n\r\n private onSelectionChanged(selection: IObjectWithKey[]): any {\r\n this.selectedElems.splice(0, this.selectedElems.length, ...selection);\r\n\r\n if (selection.length !== 1) {\r\n return false;\r\n }\r\n\r\n const item = selection[0] as any;\r\n console.log('Selected', item.id);\r\n this.setState({ documentId: null }, () => this.setState({ documentId: item.id }, () => this.showPanel()));\r\n }\r\n\r\n private isNull(value: any) {\r\n return value == null || value === 'null' || value === undefined;\r\n }\r\n\r\n private handleResponse(items: any[]) {\r\n return items;\r\n }\r\n\r\n private getUrl(search: string, page: number, sortBy?: string, sortDesc?: boolean) {\r\n const qValue = this.isNull(search) ? '' : `&q=${search}`;\r\n const sortByValue = this.isNull(sortBy) ? '' : `&_sort=${sortBy}`;\r\n let sortDescValue = '';\r\n\r\n if (!this.isNull(sortDesc)) {\r\n sortDescValue = sortDesc ? '&_order=desc' : '&_order=asc';\r\n }\r\n\r\n const url = `documents${this.props.location.search}&_start=${page}&_limit=20${qValue}${sortByValue}${sortDescValue}`;\r\n console.log(url);\r\n return url;\r\n }\r\n\r\n private renderError = (ttl: string, msg: string, retError: any): any => {\r\n const errorMsg: IErrorMessage = {\r\n title: ttl,\r\n message: msg,\r\n error: retError\r\n };\r\n errorToast(errorMsg);\r\n };\r\n\r\n private getSelectionIds = (): string[] => {\r\n const selection = this.selection.getSelection();\r\n\r\n if (!selection || selection.length === 0) {\r\n return [];\r\n }\r\n\r\n const ids: string[] = [];\r\n\r\n selection.forEach((item: any) => {\r\n const id = item.id;\r\n ids.push(id);\r\n });\r\n\r\n return ids;\r\n };\r\n\r\n private exportToExcel = (): void => {\r\n const ids: string[] = this.getSelectionIds();\r\n executeExportCommand('', this.state.templateId, excelExportCommand, ids);\r\n };\r\n\r\n private exportToPdf = (): void => {\r\n const ids: string[] = this.getSelectionIds();\r\n executeExportCommand('', this.state.templateId, pdfExportCommand, ids);\r\n };\r\n\r\n /*\r\n private onItemContextMenu(item: any, index: number, ev: MouseEvent) {\r\n const empty = {} as IContextualMenuProps;\r\n\r\n if (index <= -1) {\r\n return empty;\r\n }\r\n\r\n const contextualMenuProps: IContextualMenuProps = {\r\n target: ev.target as HTMLElement,\r\n items: [\r\n {\r\n key: 'section' + item.key,\r\n itemType: ContextualMenuItemType.Section,\r\n sectionProps: {\r\n key: 'sectionProps' + item.key + '1',\r\n topDivider: true,\r\n bottomDivider: true,\r\n title: 'Export Actions',\r\n items: [\r\n {\r\n key: 'Mail' + item.key,\r\n text: 'Excel',\r\n iconProps: {\r\n iconName: 'ExcelDocument'\r\n },\r\n onClick: () => console.log(item)\r\n },\r\n {\r\n key: 'deleteItem' + item.key,\r\n text: 'Pdf',\r\n iconProps: {\r\n iconName: 'Pdf'\r\n },\r\n onClick: () => console.log(item)\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n key: 'section2' + item.key,\r\n itemType: ContextualMenuItemType.Section,\r\n sectionProps: {\r\n key: 'sectionProps' + item.key + '2',\r\n title: 'Document Actions',\r\n items: [\r\n {\r\n key: 'share' + item.key,\r\n text: 'Download',\r\n iconProps: {\r\n iconName: 'Download'\r\n },\r\n onClick: () => console.log(item)\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n };\r\n\r\n return contextualMenuProps;\r\n }\r\n */\r\n}\r\n\r\nexport default connect(\r\n null,\r\n mapDispatchToProps\r\n)(withTranslation()(SearchResults));\r\n","import * as React from 'react';\r\nimport { Route, Switch, withRouter } from 'react-router';\r\n\r\n/* import { connect } from 'react-redux';\r\nimport { Dispatch } from 'redux';\r\nimport { updateBreadCrumbs } from 'src/redux/Actions/BreadCrumbs/ActionCreators';\r\n\r\nimport { IBreadcrumbItem, IconButton } from 'office-ui-fabric-react'; */\r\nimport { getTheme } from 'office-ui-fabric-react/lib/Styling';\r\n\r\nimport { Menu, Tab } from 'semantic-ui-react';\r\nimport SearchSimple from '../SearchSimple/SearchSimple';\r\n\r\nimport SearchResults from '../SearchResults/SearchResults';\r\nimport './Tabs.css';\r\n\r\nimport update from 'immutability-helper';\r\nimport { IconButton } from 'office-ui-fabric-react';\r\nimport * as queryString from 'query-string';\r\n\r\nexport interface ITabsState {\r\n tabs: any[];\r\n idx: number;\r\n activeIndex: number;\r\n}\r\n\r\n/* const mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n updateBreadCrumbs: (items: IBreadcrumbItem[]) => dispatch(updateBreadCrumbs(items))\r\n };\r\n}; */\r\n\r\nclass TabsSemanticHome extends React.PureComponent<any, ITabsState> {\r\n constructor(props: any) {\r\n super(props);\r\n\r\n this.state = {\r\n idx: 1,\r\n tabs: [],\r\n activeIndex: 0\r\n };\r\n\r\n this.openNewTab = this.openNewTab.bind(this);\r\n this.onTabChange = this.onTabChange.bind(this);\r\n this.onCloseTab = this.onCloseTab.bind(this);\r\n this.getTabIndex = this.getTabIndex.bind(this);\r\n this.getTabName = this.getTabName.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n <Tab\r\n menu={{ color: 'orange', secondary: true, pointing: true }}\r\n panes={this.state.tabs}\r\n renderActiveOnly={false}\r\n onTabChange={this.onTabChange}\r\n activeIndex={this.state.activeIndex}\r\n style={{ height: '100%' }}\r\n className={'TabResults'}\r\n />\r\n );\r\n }\r\n\r\n public componentDidMount() {\r\n // const items: IBreadcrumbItem[] = [{ text: 'Home', key: '/home' }, { text: 'Search', key: '/search', isCurrentItem: true }];\r\n // this.props.updateBreadCrumbs(items);\r\n\r\n this.openNewTab();\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.openNewTab();\r\n }\r\n\r\n private openNewTab(): void {\r\n const { pathname, search } = this.props.location;\r\n const locKey: string = pathname + search;\r\n\r\n const activeTab = this.state.tabs.find(x => x.key === locKey);\r\n\r\n if (!activeTab) {\r\n const newTab = {\r\n key: locKey,\r\n menuItem: (\r\n <Menu.Item key={locKey}>\r\n {this.getTabName(this.props.location)}\r\n <IconButton\r\n iconProps={{ iconName: 'StatusCircleErrorX' }}\r\n styles={{\r\n root: { height: 'unset', padding: 0, width: '16px' },\r\n icon: { margin: 0, fontWeight: 'bold' },\r\n iconHovered: { color: getTheme().palette.themePrimary }\r\n }}\r\n // tslint:disable-next-line:jsx-no-lambda\r\n onClick={ev => this.onCloseTab(ev, locKey)}\r\n />\r\n </Menu.Item>\r\n ),\r\n pane: {\r\n className: 'noBorder',\r\n key: locKey,\r\n content: (\r\n <div style={{ height: '100%' }}>\r\n <Switch location={this.props.location}>\r\n <Route exact={true} path=\"/search/results\" component={SearchSimple} />\r\n\r\n <Route exact={true} path=\"/search/template/:templateId(\\d+)/results\" component={SearchResults} />\r\n </Switch>\r\n </div>\r\n )\r\n }\r\n };\r\n\r\n const newTabs = update(this.state.tabs, { $push: [newTab] });\r\n\r\n this.setState({ idx: this.state.idx + 1, tabs: newTabs, activeIndex: newTabs.length - 1 });\r\n } else {\r\n this.setState({ activeIndex: this.getTabIndex(activeTab.key) });\r\n }\r\n }\r\n\r\n private getTabIndex(key: string): number {\r\n return this.state.tabs.findIndex(x => x.key === key);\r\n }\r\n\r\n private getTabName(location: any): string {\r\n const query = queryString.parse(this.props.location.search);\r\n if (location.pathname === '/search/results') {\r\n if (query.q) {\r\n return `${query.q}`;\r\n }\r\n } else {\r\n if (query.properties) {\r\n const props = query.properties as string;\r\n const parsedProps = JSON.parse(props);\r\n return `${parsedProps.name}`;\r\n }\r\n return 'Template Search';\r\n }\r\n return '';\r\n }\r\n\r\n private onCloseTab(event: React.MouseEvent<any>, key: string): void {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n\r\n const index = this.getTabIndex(key);\r\n\r\n const newTabs = update(this.state.tabs, { $splice: [[index, 1]] });\r\n\r\n this.setState({ tabs: newTabs });\r\n\r\n if (newTabs.length === 0) {\r\n this.props.history.push('/search');\r\n } else if (this.state.activeIndex === index) {\r\n this.setState({ activeIndex: 0 });\r\n this.props.history.push(this.state.tabs[0].key);\r\n }\r\n }\r\n\r\n private onTabChange(ev: React.SyntheticEvent, data: any) {\r\n ev.stopPropagation();\r\n ev.preventDefault();\r\n\r\n this.props.history.push(this.state.tabs[data.activeIndex].key);\r\n this.setState({ activeIndex: data.activeIndex });\r\n }\r\n}\r\n\r\n/* export default withRouter(connect(\r\n null,\r\n mapDispatchToProps\r\n)(TabsSemanticHome) as any); */\r\n\r\nexport default withRouter(TabsSemanticHome);\r\n","import {\r\n errorToast,\r\n IErrorMessage,\r\n ISuccessMessage,\r\n List,\r\n renderToastContainer,\r\n successToast,\r\n TemplateAdminForm\r\n} from 'enchoice-fabric-react-lib';\r\nimport { CommandBar, IColumn, IObjectWithKey, Selection, SelectionMode } from 'office-ui-fabric-react';\r\nimport { IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport * as React from 'react';\r\nimport { withTranslation } from 'react-i18next';\r\nimport { connect } from 'react-redux';\r\nimport { Route, Switch, withRouter } from 'react-router';\r\nimport 'react-toastify/dist/ReactToastify.css';\r\nimport { Dispatch } from 'redux';\r\nimport Api from '../../../components/Api';\r\nimport { updateBreadCrumbs } from '../../../redux/Actions/BreadCrumbs/ActionCreators';\r\nimport './TemplateAdmin.css';\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n updateBreadCrumbs: (items: IBreadcrumbItem[]) => dispatch(updateBreadCrumbs(items))\r\n };\r\n};\r\n\r\nconst URL_BASE = '';\r\n\r\nconst divStyle = {\r\n height: 'calc(100% - 85px)',\r\n fallbacks: [{ height: '-moz-calc(100% - 85px)' }, { height: '-webkit-calc(100% - 85px)' }, { height: '-o-calc(100% - 85px)' }]\r\n};\r\n\r\nclass TemplateAdmin extends React.PureComponent<any, any> {\r\n private selection: Selection;\r\n\r\n constructor(props: any) {\r\n super(props);\r\n\r\n const {\r\n match: { params }\r\n } = this.props;\r\n\r\n this.state = {\r\n templateId: params.templateId,\r\n showList: true\r\n };\r\n\r\n this.onCancel = this.onCancel.bind(this);\r\n this.onSubmitSuccess = this.onSubmitSuccess.bind(this);\r\n this.onSubmitError = this.onSubmitError.bind(this);\r\n this.isNull = this.isNull.bind(this);\r\n this.getUrl = this.getUrl.bind(this);\r\n this.onCustomBuildColumns = this.onCustomBuildColumns.bind(this);\r\n this.onSelectionChanged = this.onSelectionChanged.bind(this);\r\n this.onNew = this.onNew.bind(this);\r\n this.onDelete = this.onDelete.bind(this);\r\n this.getDynamicTranslationInternal = this.getDynamicTranslationInternal.bind(this);\r\n\r\n this.selection = new Selection({\r\n getKey: (item: IObjectWithKey, index?: number | undefined): string | number => {\r\n return item && (item as any).id ? (item as any).id : `${index}`;\r\n },\r\n onSelectionChanged: () => {\r\n this.onSelectionChanged(this.selection.getSelection());\r\n }\r\n });\r\n }\r\n\r\n public componentDidUpdate(prevProps: any) {\r\n console.log('componentDidUpdate');\r\n\r\n const lastIdArray = /\\d+/.exec(prevProps.location.pathname);\r\n const id = this.getId();\r\n\r\n if (lastIdArray === null && id == null) {\r\n this.setState({ showList: false }, () => this.setState({ showList: true }));\r\n }\r\n\r\n if (lastIdArray) {\r\n const lastId = lastIdArray[0];\r\n\r\n if (lastId && id == null) {\r\n this.setState({ showList: false }, () => this.setState({ showList: true }));\r\n }\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n const { t } = this.props;\r\n\r\n const items: IBreadcrumbItem[] = [\r\n { text: t('templateAdmin.breadcrumb.home'), key: '/home' },\r\n { text: t('templateAdmin.breadcrumb.1level'), key: `/search/template`, isCurrentItem: true }\r\n ];\r\n this.props.updateBreadCrumbs(items);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { t, match } = this.props;\r\n\r\n const id = this.getId();\r\n\r\n return (\r\n <div className=\"ms-Grid\" dir=\"ltr\" style={{ padding: 0, height: '100%' }}>\r\n <div className=\"ms-Grid-row\" style={{ height: '100%' }}>\r\n <div className=\"ms-Grid-col ms-sm4\" style={{ padding: 0, height: '100%', borderRight: '1px solid #eaeaea' }}>\r\n <CommandBar\r\n items={this.getItems()}\r\n farItems={this.getFarItems()}\r\n ariaLabel={'Use left and right arrow keys to navigate between commands'}\r\n />\r\n {this.state.showList && (\r\n <div style={divStyle}>\r\n <List\r\n getUrl={this.getUrl}\r\n handleResponse={this.handleResponse}\r\n onCustomBuildColumns={this.onCustomBuildColumns}\r\n selection={this.selection}\r\n selectionMode={SelectionMode.single}\r\n selectKeyOnInit={`${id}`}\r\n enableSearch={true}\r\n enableSort={true}\r\n height={'100%'}\r\n underlined={true}\r\n styles={{ root: { marginTop: '5px', height: '100%' } }}\r\n />\r\n </div>\r\n )}\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm8\" style={{ padding: 0 }}>\r\n <Switch>\r\n <Route\r\n exact={true}\r\n path={`${match.url}/new`}\r\n // tslint:disable-next-line:jsx-no-lambda\r\n render={props => (\r\n <TemplateAdminForm\r\n baseUrl={URL_BASE}\r\n onCancel={this.onCancel}\r\n onSubmitSuccess={this.onSubmitSuccess}\r\n onSubmitError={this.onSubmitError}\r\n getDynamicTranslation={this.getDynamicTranslationInternal}\r\n titleOnPanels={true}\r\n allowMenus={false}\r\n allowDisplayProperties={false}\r\n labelTitleNew={t('templateAdmin.title.new')}\r\n labelTitleEdit={t('templateAdmin.title.edit')}\r\n labelFormTemplateName={t('templateAdmin.form.templateName')}\r\n labelCmdBarBtnSave={t('templateAdmin.cmdBar.main.save')}\r\n labelCmdBarBtnEdit={t('templateAdmin.cmdBar.main.edit')}\r\n labelCmdBarBtnCancel={t('templateAdmin.cmdBar.main.cancel')}\r\n labelCmdBarFarBtnAdd={t('templateAdmin.cmdBar.far.addProperty')}\r\n labelCmdBarFarBtnReset={t('templateAdmin.cmdBar.far.reset')}\r\n labelCmdBarFarBtnResults={t('templateAdmin.cmdBar.far.results')}\r\n labelDialogTitleDelete={t('templateAdmin.dialog.delete.title')}\r\n labelDialogSubtextPrefixDelete={t('templateAdmin.dialog.delete.subtext.prefix')}\r\n labelDialogSubtextSuffixDelete={t('templateAdmin.dialog.delete.subtext.suffix')}\r\n labelDialogBtnDelete={t('templateAdmin.dialog.delete.buttons.delete')}\r\n labelDialogBtnCancel={t('templateAdmin.dialog.delete.buttons.cancel')}\r\n labelDialogTitleReset={t('templateAdmin.dialog.reset.title')}\r\n labelDialogSubtextReset={t('templateAdmin.dialog.reset.subtext')}\r\n labelDialogBtnReset={t('templateAdmin.dialog.reset.buttons.reset')}\r\n labelPanelSettingsPropertyTitle={t('templateAdmin.panel.settings.title')}\r\n labelPanelSettingsOperatorsTitle={t('templateAdmin.panel.settings.operators.title')}\r\n labelPanelSettingsBtnUseAll={t('templateAdmin.panel.settings.buttons.all')}\r\n labelPanelSettingsBtnUseSelected={t('templateAdmin.panel.settings.buttons.selected')}\r\n labelPanelSettingsEquals={t('templateAdmin.panel.settings.operators.equals')}\r\n labelPanelSettingsStartsWith={t('templateAdmin.panel.settings.operators.startsWith')}\r\n labelPanelSettingsContains={t('templateAdmin.panel.settings.operators.contains')}\r\n labelPanelSettingsIsEmpty={t('templateAdmin.panel.settings.operators.empty')}\r\n labelPanelSettingsGreaterThan={t('templateAdmin.panel.settings.operators.gt')}\r\n labelPanelSettingsLessThan={t('templateAdmin.panel.settings.operators.lt')}\r\n labelPanelSettingsWithin={t('templateAdmin.panel.settings.operators.within')}\r\n labelPanelSettingsIncludes={t('templateAdmin.panel.settings.operators.includes')}\r\n labelPanelDisplayPropertiesTitle={t('templateAdmin.panel.display.title')}\r\n labelPanelAddPropertiesTitle={t('templateAdmin.panel.addProperties.title')}\r\n labelPanelAddPropertiesProperty={t('templateAdmin.panel.addProperties.property')}\r\n labelPanelAddBtnAdd={t('templateAdmin.panel.addProperties.buttons.add')}\r\n labelPanelAddBtnCancel={t('templateAdmin.panel.addProperties.buttons.cancel')}\r\n labelMovListAvailable={t('templateAdmin.move.available')}\r\n labelMovListSelected={t('templateAdmin.move.selected')}\r\n labelIconOperatorDelete={t('templateAdmin.form.icons.delete')}\r\n labelIconOperatorSetting={t('templateAdmin.form.icons.settings')}\r\n labelIconOperatorUp={t('templateAdmin.form.icons.up')}\r\n labelIconOperatorDown={t('templateAdmin.form.icons.down')}\r\n labelPanelMenusTitle={t('templateAdmin.panel.menus.title')}\r\n />\r\n )}\r\n />\r\n <Route\r\n exact={true}\r\n path={`${match.url}/:templateId(\\\\d+)/edit`}\r\n // tslint:disable-next-line:jsx-no-lambda\r\n render={props => (\r\n <div>\r\n <TemplateAdminForm\r\n baseUrl={URL_BASE}\r\n id={props.match.params.templateId}\r\n onCancel={this.onCancel}\r\n onSubmitSuccess={this.onSubmitSuccess}\r\n onSubmitError={this.onSubmitError}\r\n getDynamicTranslation={this.getDynamicTranslationInternal}\r\n titleOnPanels={true}\r\n allowMenus={false}\r\n allowDisplayProperties={false}\r\n labelTitleNew={t('templateAdmin.title.new')}\r\n labelTitleEdit={t('templateAdmin.title.edit')}\r\n labelFormTemplateName={t('templateAdmin.form.templateName')}\r\n labelCmdBarBtnSave={t('templateAdmin.cmdBar.main.save')}\r\n labelCmdBarBtnEdit={t('templateAdmin.cmdBar.main.edit')}\r\n labelCmdBarBtnCancel={t('templateAdmin.cmdBar.main.cancel')}\r\n labelCmdBarFarBtnAdd={t('templateAdmin.cmdBar.far.addProperty')}\r\n labelCmdBarFarBtnReset={t('templateAdmin.cmdBar.far.reset')}\r\n labelCmdBarFarBtnResults={t('templateAdmin.cmdBar.far.results')}\r\n labelDialogTitleDelete={t('templateAdmin.dialog.delete.title')}\r\n labelDialogSubtextPrefixDelete={t('templateAdmin.dialog.delete.subtext.prefix')}\r\n labelDialogSubtextSuffixDelete={t('templateAdmin.dialog.delete.subtext.suffix')}\r\n labelDialogBtnDelete={t('templateAdmin.dialog.delete.buttons.delete')}\r\n labelDialogBtnCancel={t('templateAdmin.dialog.delete.buttons.cancel')}\r\n labelDialogTitleReset={t('templateAdmin.dialog.reset.title')}\r\n labelDialogSubtextReset={t('templateAdmin.dialog.reset.subtext')}\r\n labelDialogBtnReset={t('templateAdmin.dialog.reset.buttons.reset')}\r\n labelPanelSettingsPropertyTitle={t('templateAdmin.panel.settings.title')}\r\n labelPanelSettingsOperatorsTitle={t('templateAdmin.panel.settings.operators.title')}\r\n labelPanelSettingsBtnUseAll={t('templateAdmin.panel.settings.buttons.all')}\r\n labelPanelSettingsBtnUseSelected={t('templateAdmin.panel.settings.buttons.selected')}\r\n labelPanelSettingsEquals={t('templateAdmin.panel.settings.operators.equals')}\r\n labelPanelSettingsStartsWith={t('templateAdmin.panel.settings.operators.startsWith')}\r\n labelPanelSettingsContains={t('templateAdmin.panel.settings.operators.contains')}\r\n labelPanelSettingsIsEmpty={t('templateAdmin.panel.settings.operators.empty')}\r\n labelPanelSettingsGreaterThan={t('templateAdmin.panel.settings.operators.gt')}\r\n labelPanelSettingsLessThan={t('templateAdmin.panel.settings.operators.lt')}\r\n labelPanelSettingsWithin={t('templateAdmin.panel.settings.operators.within')}\r\n labelPanelSettingsIncludes={t('templateAdmin.panel.settings.operators.includes')}\r\n labelPanelDisplayPropertiesTitle={t('templateAdmin.panel.display.title')}\r\n labelPanelAddPropertiesTitle={t('templateAdmin.panel.addProperties.title')}\r\n labelPanelAddBtnAdd={t('templateAdmin.panel.addProperties.buttons.add')}\r\n labelPanelAddBtnCancel={t('templateAdmin.panel.addProperties.buttons.cancel')}\r\n labelMovListAvailable={t('templateAdmin.move.available')}\r\n labelMovListSelected={t('templateAdmin.move.selected')}\r\n labelIconOperatorDelete={t('templateAdmin.form.icons.delete')}\r\n labelIconOperatorSetting={t('templateAdmin.form.icons.settings')}\r\n labelIconOperatorUp={t('templateAdmin.form.icons.up')}\r\n labelIconOperatorDown={t('templateAdmin.form.icons.down')}\r\n labelPanelMenusTitle={t('templateAdmin.panel.menus.title')}\r\n />\r\n </div>\r\n )}\r\n />\r\n </Switch>\r\n </div>\r\n </div>\r\n <div className=\"ms-Grid-row\">\r\n <div className=\"ms-Grid-col ms-sm12\" style={{ height: '1px' }}>\r\n {renderToastContainer()}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private onCustomBuildColumns(): IColumn[] {\r\n console.log('Set custom columns');\r\n return [\r\n {\r\n key: 'name',\r\n name: 'Name',\r\n fieldName: 'name',\r\n minWidth: 210,\r\n maxWidth: 350,\r\n isRowHeader: true,\r\n isResizable: false,\r\n isSorted: true,\r\n isSortedDescending: false,\r\n sortAscendingAriaLabel: 'Sorted A to Z',\r\n sortDescendingAriaLabel: 'Sorted Z to A',\r\n data: 'string',\r\n isPadded: true\r\n }\r\n ];\r\n }\r\n\r\n private onSelectionChanged(selection: IObjectWithKey[]) {\r\n if (selection.length === 1) {\r\n this.props.history.push(`/search/template/${(selection[0] as any).id}/edit`);\r\n } else {\r\n this.props.history.push(`/search/template/`);\r\n }\r\n }\r\n\r\n private isNull(value: any) {\r\n return value == null || value === 'null' || value === undefined;\r\n }\r\n\r\n private handleResponse(items: any[]) {\r\n return items;\r\n }\r\n\r\n private getUrl(search: string, page: number, sortBy?: string, sortDesc?: boolean) {\r\n const qValue = this.isNull(search) ? '' : `&q=${search}`;\r\n const sortByValue = this.isNull(sortBy) ? '' : `&_sort=${sortBy}`;\r\n let sortDescValue = '';\r\n\r\n if (!this.isNull(sortDesc)) {\r\n sortDescValue = sortDesc ? '&_order=desc' : '&_order=asc';\r\n }\r\n const url = `${URL_BASE}templates/?_start=${page}&_limit=20${qValue}${sortByValue}${sortDescValue}`;\r\n return url;\r\n }\r\n\r\n private onCancel(): void {\r\n console.log('onCancel ...');\r\n this.selection.setAllSelected(false);\r\n\r\n this.props.history.push(`/search/template/`);\r\n }\r\n\r\n private onSubmitSuccess(response: any): void {\r\n console.log('onSubmitSuccess ...', response);\r\n const id = this.getId();\r\n const message = id ? 'Template edited.' : 'Template created';\r\n const msg: ISuccessMessage = {\r\n title: 'Success',\r\n message\r\n };\r\n successToast(msg);\r\n this.selection.setAllSelected(false);\r\n this.props.history.push(`/search/template/`);\r\n }\r\n\r\n private onSubmitError(error: any): void {\r\n const errorObj = error.response.data;\r\n const id = this.getId();\r\n const title = id ? 'Error editing Template' : 'Error creating new Template';\r\n\r\n const msg: IErrorMessage = {\r\n title,\r\n message: errorObj.message,\r\n error: errorObj\r\n };\r\n errorToast(msg);\r\n }\r\n\r\n private getItems = () => {\r\n const { t } = this.props;\r\n return [\r\n {\r\n key: 'newItem',\r\n name: t('templateAdmin.list.cmdBar.new'),\r\n iconProps: {\r\n iconName: 'Add'\r\n },\r\n onClick: this.onNew\r\n }\r\n ];\r\n };\r\n\r\n private getFarItems = () => {\r\n const { t } = this.props;\r\n return [\r\n {\r\n key: 'delete',\r\n name: t('templateAdmin.list.cmdBar.delete'),\r\n iconProps: {\r\n iconName: 'Delete'\r\n },\r\n onClick: this.onDelete\r\n }\r\n ];\r\n };\r\n\r\n private getId(): any {\r\n return /\\d+/.exec(this.props.location.pathname);\r\n }\r\n\r\n private onNew() {\r\n this.selection.setAllSelected(false);\r\n this.props.history.push(`/search/template/new`);\r\n }\r\n\r\n private onDelete(): any {\r\n const id = this.getId();\r\n if (!id) {\r\n return;\r\n }\r\n Api.delete(`templates/${id}`)\r\n .then(response => {\r\n const msg: ISuccessMessage = {\r\n title: 'Success',\r\n message: 'Template Deleted with success!'\r\n };\r\n successToast(msg);\r\n this.selection.setAllSelected(false);\r\n this.props.history.push(`/search/template/`);\r\n })\r\n .catch(error => {\r\n const data = error.response.data;\r\n const msg: IErrorMessage = {\r\n title: 'Error',\r\n message: `Error Deleting Template: ${data.status}:${data.message}`,\r\n error: data\r\n };\r\n errorToast(msg);\r\n });\r\n }\r\n\r\n private getDynamicTranslationInternal = (keySuffix: string): string => {\r\n if (!keySuffix) {\r\n return keySuffix;\r\n }\r\n const { t } = this.props;\r\n const key = `templateAdmin.form.dynamic.${keySuffix.toLowerCase()}`;\r\n const value = t(key);\r\n\r\n return value !== key ? value : keySuffix;\r\n };\r\n}\r\n\r\nexport default withRouter(connect(\r\n null,\r\n mapDispatchToProps\r\n)(withTranslation()(TemplateAdmin)) as any);\r\n","import { Fabric } from 'office-ui-fabric-react/lib/Fabric';\r\nimport * as React from 'react';\r\nimport { Route, Switch, withRouter } from 'react-router-dom';\r\nimport NotFound from '../../../../components/404/404';\r\nimport SecuredRoute from '../../../../components/SecuredRoute/SecuredRoute';\r\nimport DrawerGroupAdmin from '../../DrawerGroupsAdmin/DrawerGroupsAdmin';\r\nimport Home from '../../Home/Home';\r\nimport MenuAdmin from '../../MenuAdmin/MenuAdmin';\r\nimport SearchTemplate from '../../SearchTemplate/SearchTemplate';\r\nimport Tabs from '../../Tabs/Tabs';\r\nimport TemplateAdmin from '../../TemplateAdmin/TemplateAdmin';\r\nimport './Content.css';\r\n\r\nclass Content extends React.PureComponent<any, any> {\r\n constructor(props: any) {\r\n super(props);\r\n\r\n this.state = {\r\n previousLocation: this.props.location\r\n };\r\n }\r\n\r\n public componentDidUpdate(nextProps: any) {\r\n const { location } = this.props;\r\n // set previousLocation if props.location is not modal\r\n if (nextProps.history.action !== 'POP' && (!location.state || !location.state.modal)) {\r\n this.setState({ previousLocation: this.props.location });\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { location } = this.props;\r\n const isModal = !!(location.state && location.state.modal && this.state.previousLocation !== location);\r\n\r\n return (\r\n <Fabric className=\"content\" style={{ height: '100%' }}>\r\n <Switch location={isModal ? this.state.previousLocation : location}>\r\n <SecuredRoute exact={true} path=\"/search\" component={Home} />\r\n <SecuredRoute exact={true} path=\"/search/home\" component={Home} />\r\n\r\n <SecuredRoute exact={true} path=\"/search/results\" component={Tabs} />\r\n <SecuredRoute exact={true} path=\"/search/template/:templateId(\\d+)/results\" component={Tabs} />\r\n\r\n <SecuredRoute path=\"/search/template\" component={TemplateAdmin} />\r\n\r\n <SecuredRoute path=\"/search/menu\" component={MenuAdmin} />\r\n <SecuredRoute exact={true} path=\"/search/template/:templateId(\\d+)\" component={SearchTemplate} />\r\n\r\n <SecuredRoute path=\"/search/drawergroups\" component={DrawerGroupAdmin} />\r\n\r\n <SecuredRoute component={NotFound} />\r\n </Switch>\r\n\r\n {isModal ? <Route exact={true} path=\"/search/template/:templateId(\\d+)\" component={SearchTemplate} /> : null}\r\n </Fabric>\r\n );\r\n }\r\n}\r\n\r\nexport default withRouter(Content);\r\n","import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { getFAIcon, toTemplateResult } from 'enchoice-fabric-react-lib';\r\nimport { ActionButton, IconButton } from 'office-ui-fabric-react/lib/Button';\r\nimport { ContextualMenuItemType } from 'office-ui-fabric-react/lib/ContextualMenu';\r\nimport { Fabric } from 'office-ui-fabric-react/lib/Fabric';\r\nimport { Persona, PersonaInitialsColor, PersonaSize } from 'office-ui-fabric-react/lib/Persona';\r\nimport { createTheme, getTheme } from 'office-ui-fabric-react/lib/Styling';\r\nimport * as React from 'react';\r\nimport { withTranslation } from 'react-i18next';\r\nimport { connect } from 'react-redux';\r\nimport { withRouter } from 'react-router';\r\nimport ReactSVG from 'react-svg';\r\nimport { Dispatch } from 'redux';\r\nimport Api from '../../../../components/Api';\r\nimport { LoginMode, SecurityActionTypes } from '../../../../redux/Actions/Security/ActionTypes';\r\nimport { IRootState } from '../../../../redux/Reducers/RootReducer';\r\n// import HeaderSearchBox from './HeaderSearchBox/HeaderSearchBox';\r\nimport './Header.css';\r\n\r\nconst numberOfQuickButtons = 2;\r\n\r\nconst headerTheme = createTheme({\r\n palette: {\r\n neutralPrimary: '#fff'\r\n }\r\n});\r\n\r\nconst embeddedStyle: React.CSSProperties = {\r\n height: '70px',\r\n backgroundRepeat: 'repeat-x',\r\n backgroundColor: 'unset !important',\r\n padding: 0\r\n};\r\n\r\nconst normalStyle: React.CSSProperties = {\r\n height: '70px',\r\n backgroundRepeat: 'repeat-x',\r\n backgroundImage: 'linear-gradient(#666565, #454343 50%, #242121)',\r\n padding: '8px 0 0 0',\r\n color: '#fff',\r\n fontSize: '22px',\r\n fontWeight: 400,\r\n lineHeight: '50px'\r\n};\r\n\r\nfunction mapDispatchToProps(dispatch: Dispatch) {\r\n return {\r\n logout: () => dispatch({ type: SecurityActionTypes.LOGOUT_USER })\r\n };\r\n}\r\n\r\nfunction mapStateToProps(state: IRootState, ownProps: any) {\r\n return { username: state.securityState.security.username, loginMode: state.securityState.security.loginMode };\r\n}\r\n\r\nexport interface IQuickButtonInfo {\r\n id: number;\r\n name: string;\r\n template: number;\r\n icon: string;\r\n}\r\n\r\nexport interface IHeaderState {\r\n isCalloutVisible: boolean;\r\n isSearchCalloutVisible: boolean;\r\n recentSearches: any[];\r\n quickButtons: IQuickButtonInfo[];\r\n}\r\n\r\nclass Header extends React.PureComponent<any, IHeaderState> {\r\n /* private menuButtonElement = createRef<HTMLElement>(); */\r\n\r\n constructor(props: any) {\r\n super(props);\r\n this.state = {\r\n isCalloutVisible: false,\r\n isSearchCalloutVisible: false,\r\n recentSearches: [],\r\n quickButtons: []\r\n };\r\n\r\n this.getLogo = this.getLogo.bind(this);\r\n this.getPersona = this.getPersona.bind(this);\r\n this.getQuickButtons = this.getQuickButtons.bind(this);\r\n\r\n this.goToHome = this.goToHome.bind(this);\r\n this.goToSettings = this.goToSettings.bind(this);\r\n this.goToTemplates = this.goToTemplates.bind(this);\r\n this.goToMenus = this.goToMenus.bind(this);\r\n this.goToShortcut = this.goToShortcut.bind(this);\r\n this.goToQuickButton = this.goToQuickButton.bind(this);\r\n this.goToDrawerGroups = this.goToDrawerGroups.bind(this);\r\n\r\n this.logout = this.logout.bind(this);\r\n }\r\n\r\n public componentDidMount() {\r\n Api.get(`quickbuttons?_limit=${numberOfQuickButtons}`)\r\n .then(response => {\r\n this.setState({ quickButtons: response.data.data });\r\n })\r\n .catch(error => {\r\n console.log('Error:', error);\r\n });\r\n }\r\n\r\n public render(): JSX.Element {\r\n const isEmbeddedLogin = !!(this.props.loginMode && this.props.loginMode === LoginMode.EMBEDDED);\r\n\r\n return (\r\n <Fabric className=\"ms-Grid headerBar\" dir=\"ltr\" style={isEmbeddedLogin ? embeddedStyle : normalStyle}>\r\n <div className=\"ms-Grid-row \" style={{ padding: '0', margin: 0 }}>\r\n <div className=\"ms-Grid-col ms-sm3 ms-md3 ms-lg3\" style={{ padding: '0' }}>\r\n <div className=\"headerIcon\" /* ref={this.menuButtonElement} */>\r\n {this.getLogo(isEmbeddedLogin)}\r\n {/* <DefaultButton\r\n primary={true}\r\n disabled={false}\r\n checked={false}\r\n iconProps={{\r\n iconName: 'Waffle',\r\n style: {\r\n color: 'white',\r\n fontSize: '40px'\r\n }\r\n }}\r\n onClick={this.onShowMenuClicked}\r\n style={{ height: '50px', width: '50px', minWidth: '50px' }}\r\n /> */}\r\n </div>\r\n\r\n {/* <Callout\r\n ariaLabelledBy={'callout-label-1'}\r\n ariaDescribedBy={'callout-description-1'}\r\n role={'alertdialog'}\r\n gapSpace={1}\r\n isBeakVisible={true}\r\n beakWidth={10}\r\n onDismiss={this.onCalloutDismiss}\r\n setInitialFocus={true}\r\n hidden={!this.state.isCalloutVisible}\r\n target={this.menuButtonElement.value}\r\n >\r\n <div className=\"ms-Grid\">\r\n <div className=\"ms-Grid-row\">\r\n <div className=\"ms-Grid-col ms-sm ms-md ms-lg calloutDiv calloutDivBlue\" onClick={this.onCalloutDismiss}>\r\n <i className=\"ms-Icon ms-Icon--FolderList calloutIcon\" aria-hidden=\"true\" />\r\n <br />\r\n <span className=\"calloutText\">KTX</span>\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm ms-md ms-lg calloutDiv calloutDivPurle\" onClick={this.onCalloutDismiss}>\r\n <i className=\"ms-Icon ms-Icon--Money calloutIcon\" aria-hidden=\"true\" />\r\n <br />\r\n <span className=\"calloutText\">Kwiwk Expense</span>\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm ms-md ms-lg calloutDiv calloutDivOrange\" onClick={this.onCalloutDismiss}>\r\n <i className=\"ms-Icon ms-Icon--Suitcase calloutIcon\" aria-hidden=\"true\" />\r\n <br />\r\n <span className=\"calloutText\">Case Manager</span>\r\n </div>\r\n </div>\r\n <div className=\"ms-Grid-row\">\r\n <div className=\"ms-Grid-col ms-sm ms-md ms-lg calloutDiv calloutDivDeepBlue\" onClick={this.onCalloutDismiss}>\r\n <i className=\"ms-Icon ms-Icon--Chart calloutIcon\" aria-hidden=\"true\" />\r\n <br />\r\n <span className=\"calloutText\">Reports</span>\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm ms-md ms-lg calloutDiv calloutDivGreen\" onClick={this.onCalloutDismiss}>\r\n <i className=\"ms-Icon ms-Icon--GroupObject calloutIcon\" aria-hidden=\"true\" />\r\n <br />\r\n <span className=\"calloutText\">Module Manager</span>\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm ms-md ms-lg calloutDiv calloutDivFadedRed\" onClick={this.onCalloutDismiss}>\r\n <i className=\"ms-Icon ms-Icon--People calloutIcon\" aria-hidden=\"true\" />\r\n <br />\r\n <span className=\"calloutText\">User Manager</span>\r\n </div>\r\n </div>\r\n <div className=\"ms-Grid-row\">\r\n <div className=\"ms-Grid-col ms-sm ms-md ms-lg calloutDiv calloutDivLightBlue\" onClick={this.onCalloutDismiss}>\r\n <i className=\"ms-Icon ms-Icon--Settings calloutIcon\" aria-hidden=\"true\" />\r\n <br />\r\n <span className=\"calloutText\">Settings</span>\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm ms-md ms-lg calloutDiv calloutDivRed\" onClick={this.onCalloutDismiss}>\r\n <i className=\"ms-Icon ms-Icon--Admin calloutIcon\" aria-hidden=\"true\" />\r\n <br />\r\n <span className=\"calloutText\">KwikTag Admin</span>\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm ms-md ms-lg calloutDiv calloutDivLightGreen\" onClick={this.onCalloutDismiss}>\r\n <i className=\"ms-Icon ms-Icon--Boards calloutIcon\" aria-hidden=\"true\" />\r\n <br />\r\n <span className=\"calloutText\">Logs</span>\r\n </div>\r\n </div>\r\n </div>\r\n </Callout> */}\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm6\" style={{ paddingTop: '10px' }}>\r\n {/*<HeaderSearchBox />*/}\r\n </div>\r\n <div className=\"ms-Grid-col ms-sm3\" style={{ paddingTop: '10px' }}>\r\n {this.getPersona(isEmbeddedLogin)}\r\n {this.getQuickButtons()}\r\n </div>\r\n </div>\r\n </Fabric>\r\n );\r\n }\r\n\r\n private getLogo(isEmbeddedLogin: boolean): JSX.Element {\r\n if (isEmbeddedLogin) {\r\n return <></>;\r\n }\r\n return (\r\n <ActionButton\r\n className=\"headerText\"\r\n allowDisabledFocus={true}\r\n onClick={this.goToHome}\r\n styles={{ root: { color: getTheme().palette.themePrimary, verticalAlign: 'middle' } }}\r\n >\r\n <ReactSVG\r\n src={process.env.PUBLIC_URL + '/KTX_Logo_4.svg'}\r\n //evalScripts=\"always\"\r\n // tslint:disable-next-line:jsx-no-lambda\r\n fallback={() => <span>KTX</span>}\r\n // tslint:disable-next-line:jsx-no-lambda\r\n loading={() => <span>KTX</span>}\r\n // tslint:disable-next-line:jsx-no-lambda\r\n afterInjection={(error, svg) => {\r\n if (error) {\r\n console.error(error);\r\n return;\r\n }\r\n }}\r\n beforeInjection={svg => {\r\n svg.classList.add('ktxHeaderLogo');\r\n }}\r\n renumerateIRIElements={false}\r\n wrapper=\"span\"\r\n className=\"wrapper-class-name\"\r\n />\r\n </ActionButton>\r\n );\r\n }\r\n\r\n private getPersona(isEmbeddedLogin: boolean): JSX.Element {\r\n const { t } = this.props;\r\n\r\n const menuItems = [\r\n /*\r\n {\r\n iconProps: {\r\n iconName: 'PlayerSettings'\r\n },\r\n key: 'settings',\r\n onClick: this.goToSettings,\r\n text: t('header.menu.settings')\r\n },*/\r\n {\r\n iconProps: {\r\n iconName: 'SearchAndApps'\r\n },\r\n key: 'templates',\r\n onClick: this.goToTemplates,\r\n text: t('header.menu.templates')\r\n },\r\n {\r\n iconProps: {\r\n iconName: 'FabricFolder'\r\n },\r\n key: 'drawergroups',\r\n onClick: this.goToDrawerGroups,\r\n text: t('header.menu.drawergroups')\r\n }\r\n /*,\r\n {\r\n iconProps: {\r\n iconName: 'CollapseMenu'\r\n },\r\n key: 'menus',\r\n onClick: this.goToMenus,\r\n text: t('header.menu.menus')\r\n },\r\n {\r\n iconProps: {\r\n iconName: 'PowerButton'\r\n },\r\n key: 'quickbutton',\r\n onClick: this.goToQuickButton,\r\n text: t('header.menu.quickbuttons')\r\n }*/\r\n ];\r\n\r\n const extraMenuItems = [\r\n {\r\n key: 'divider_1',\r\n itemType: ContextualMenuItemType.Divider\r\n },\r\n {\r\n key: 'logout',\r\n text: t('header.menu.logout'),\r\n iconProps: {\r\n iconName: 'SignOut'\r\n },\r\n onClick: this.logout,\r\n target: '_blank'\r\n }\r\n ];\r\n\r\n return (\r\n <ActionButton\r\n className=\"pullRight persona\"\r\n allowDisabledFocus={true}\r\n disabled={false}\r\n checked={true}\r\n menuProps={{\r\n items: isEmbeddedLogin ? menuItems : [...menuItems, ...extraMenuItems],\r\n shouldFocusOnMount: true\r\n }}\r\n styles={{ root: { marginTop: '-5px' } }}\r\n >\r\n {!isEmbeddedLogin ? (\r\n <Persona\r\n size={PersonaSize.size24}\r\n initialsColor={PersonaInitialsColor.purple}\r\n text={this.props.username}\r\n className=\"pullRight persona\"\r\n theme={headerTheme}\r\n />\r\n ) : (\r\n <></>\r\n )}\r\n </ActionButton>\r\n );\r\n }\r\n\r\n private getQuickButtons(): JSX.Element[] {\r\n const { quickButtons } = this.state;\r\n\r\n return quickButtons.map(btn => {\r\n return (\r\n <IconButton\r\n key={btn.id}\r\n className=\"quickbutton\"\r\n allowDisabledFocus={true}\r\n disabled={false}\r\n checked={false}\r\n title={btn.name}\r\n ariaLabel={btn.name}\r\n // tslint:disable-next-line:jsx-no-lambda\r\n onClick={() => this.goToShortcut(btn.template)}\r\n styles={{ root: { color: getTheme().palette.themePrimary, fontSize: '20px' } }}\r\n >\r\n <FontAwesomeIcon icon={getFAIcon(btn.icon)} />\r\n </IconButton>\r\n );\r\n });\r\n }\r\n\r\n private goToHome(): void {\r\n this.props.history.push('/search');\r\n }\r\n\r\n private goToSettings(): void {\r\n this.props.history.push('/search/settings');\r\n }\r\n private goToTemplates(): void {\r\n this.props.history.push('/search/template');\r\n }\r\n\r\n private goToDrawerGroups(): void {\r\n this.props.history.push('/search/drawergroups');\r\n }\r\n\r\n private goToMenus(): void {\r\n this.props.history.push('/search/menu');\r\n }\r\n\r\n private goToQuickButton(): void {\r\n this.props.history.push('/search/quickbutton');\r\n }\r\n\r\n private logout(): void {\r\n this.props.logout();\r\n }\r\n\r\n private goToShortcut(template: number | string): void {\r\n Api.get(`templates/${template}`)\r\n .then(response => {\r\n const encoded = toTemplateResult(response.data);\r\n this.props.history.push(`/search/template/${template}/results?properties=${encoded}`);\r\n })\r\n .catch(error => {\r\n console.log('Error:', error);\r\n console.log('Error Response:', 'Request failed with status code ' + error.response.status, error.response);\r\n });\r\n }\r\n\r\n /* private onShowMenuClicked = (): void => {\r\n this.setState({\r\n isCalloutVisible: !this.state.isCalloutVisible\r\n });\r\n };\r\n\r\n private onCalloutDismiss = (): void => {\r\n this.setState({\r\n isCalloutVisible: false\r\n });\r\n }; */\r\n}\r\n\r\nexport default withRouter(connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(withTranslation()(Header)) as any);\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { withRouter } from 'react-router';\r\nimport BreadCrumbs from '../../components/BreadCrumbs/BreadCrumbs';\r\nimport { LoginMode } from '../../redux/Actions/Security/ActionTypes';\r\nimport { IRootState } from '../../redux/Reducers/RootReducer';\r\nimport Content from './layout/Content/Content';\r\nimport Header from './layout/Header/Header';\r\nimport './Search.css';\r\n\r\n/* import SideNav from './layout/SideNav/SideNav'; */\r\n\r\nfunction mapStateToProps(state: IRootState, ownProps: any) {\r\n return { username: state.securityState.security.username, loginMode: state.securityState.security.loginMode };\r\n}\r\n\r\nclass Search extends React.Component<any, any> {\r\n public render() {\r\n const isEmbeddedLogin = !!(this.props.loginMode && this.props.loginMode === LoginMode.EMBEDDED);\r\n\r\n return (\r\n <div className=\"Search\">\r\n {!isEmbeddedLogin ? (\r\n <div className=\"header\">\r\n <Header />\r\n </div>\r\n ) : (\r\n <></>\r\n )}\r\n <div className=\"body\">\r\n <div className=\"center\">\r\n <Content />\r\n </div>\r\n {/* <div className=\"sidebar\">\r\n <SideNav />\r\n </div> */}\r\n </div>\r\n {!isEmbeddedLogin ? (\r\n <div className=\"footer\">\r\n <BreadCrumbs />\r\n </div>\r\n ) : (\r\n <></>\r\n )}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default withRouter(connect(\r\n mapStateToProps,\r\n null\r\n)(Search) as any);\r\n","import * as React from 'react';\r\nimport { Redirect, Switch, withRouter } from 'react-router';\r\nimport './Apps.css';\r\nimport SecuredRoute from './components/SecuredRoute/SecuredRoute';\r\nimport Payables from './pages/Payables/Payables';\r\nimport Search from './pages/Search/Search';\r\n\r\nclass Apps extends React.Component<any, any> {\r\n public render() {\r\n return (\r\n <Switch>\r\n <SecuredRoute path=\"/search\" component={Search} />\r\n <SecuredRoute path=\"/payables\" component={Payables} />\r\n\r\n <Redirect\r\n to={{\r\n pathname: '/search'\r\n }}\r\n />\r\n </Switch>\r\n );\r\n }\r\n}\r\n\r\nexport default withRouter(Apps);\r\n","import {\r\n BaseButton,\r\n Button,\r\n DefaultButton,\r\n mergeStyleSets,\r\n MessageBar,\r\n MessageBarType,\r\n Spinner,\r\n SpinnerSize,\r\n Stack\r\n} from 'office-ui-fabric-react';\r\nimport * as React from 'react';\r\nimport ReactSVG from 'react-svg';\r\nimport './Auth.css';\r\n\r\nexport interface IAuthState {}\r\n\r\nexport interface IAuthProps {\r\n buttonShow?: boolean;\r\n buttonText: string;\r\n buttonDisabled: boolean;\r\n isProcessing: boolean;\r\n buttonOnClick: () => void;\r\n messageText?: string;\r\n messageType?: MessageBarType;\r\n onKeyPress: (ev: React.KeyboardEvent<HTMLDivElement | HTMLAnchorElement | HTMLButtonElement | BaseButton | Button>) => void;\r\n}\r\n\r\nclass Auth extends React.PureComponent<IAuthProps, IAuthState> {\r\n public static defaultProps = {\r\n buttonShow: true\r\n };\r\n\r\n constructor(props: IAuthProps) {\r\n super(props);\r\n\r\n this.state = {};\r\n }\r\n\r\n public componentDidMount() {}\r\n\r\n public render(): JSX.Element {\r\n const styles = mergeStyleSets({\r\n root: {\r\n background: 'url(\"' + process.env.PUBLIC_URL + '/background.jpg\") 50% fixed',\r\n backgroundSize: 'cover',\r\n height: '100vh'\r\n },\r\n stackMargin: {\r\n selectors: {\r\n '@media screen and (min-width: 640px)': {\r\n marginRight: '20%'\r\n },\r\n '@media screen and (max-width: 640px)': {\r\n margin: 'auto',\r\n width: '90%'\r\n }\r\n }\r\n },\r\n login: {\r\n background: '#ffffff',\r\n boxShadow: '0px 1px 5px rgba(0, 0, 0, 0.3)',\r\n selectors: {\r\n '@media screen and (min-width: 640px)': {\r\n width: '400px',\r\n marginTop: '35%'\r\n },\r\n '@media screen and (max-width: 640px)': {\r\n width: '100%',\r\n marginTop: '0'\r\n }\r\n }\r\n },\r\n loginMsg: {\r\n selectors: {\r\n '@media screen and (min-width: 640px)': {\r\n width: '400px'\r\n },\r\n '@media screen and (max-width: 640px)': {\r\n width: '100%'\r\n }\r\n }\r\n },\r\n inputs: {\r\n padding: '0 20px',\r\n selectors: {\r\n '& > div': {\r\n marginBottom: '5px'\r\n }\r\n }\r\n }\r\n });\r\n\r\n return (\r\n <div className={styles.root}>\r\n <Stack horizontal horizontalAlign=\"end\" verticalFill>\r\n <Stack verticalAlign={'start'} style={{ background: 'rgba(255, 255, 255, 0.62)' }} className={styles.stackMargin}>\r\n <Stack.Item>\r\n <div className={styles.login}>\r\n <ReactSVG\r\n src={process.env.PUBLIC_URL + '/KTX_Logo_4.svg'}\r\n fallback={() => <span>KTX</span>}\r\n loading={() => <span>KTX</span>}\r\n afterInjection={(error, svg) => {\r\n if (error) {\r\n console.error(error);\r\n return;\r\n }\r\n }}\r\n beforeInjection={svg => {\r\n svg.classList.add('ktxlogo');\r\n svg.setAttribute('style', 'max-width: 250px; display: block; margin: auto; padding: 30px 0 30px 0');\r\n }}\r\n // svgStyle={{ maxWidth: '250px', display: 'block', margin: 'auto', padding: '30px 0 30px 0' }}\r\n renumerateIRIElements={false}\r\n wrapper=\"span\"\r\n className=\"ktxlogowrapper\"\r\n />\r\n <div className={styles.inputs} onKeyPress={this.props.onKeyPress}>\r\n {this.props.children}\r\n </div>\r\n <div className=\"footer\" style={{ visibility: this.props.buttonShow ? 'visible' : 'hidden' }}>\r\n <DefaultButton\r\n primary={true}\r\n type={'submit'}\r\n onClick={this.props.buttonOnClick}\r\n disabled={this.props.buttonDisabled}\r\n style={{\r\n width: '100%',\r\n height: '60px',\r\n marginTop: '20px',\r\n border: '0px solid rgba(0,0,0,0.1)'\r\n }}\r\n >\r\n {this.props.isProcessing ? (\r\n <Spinner size={SpinnerSize.large} label=\"Submitting...\" ariaLive=\"assertive\" labelPosition=\"right\" />\r\n ) : (\r\n <div style={{ fontSize: '17px' }}>\r\n {/* <Icon iconName=\"FollowUser\" style={{ marginRight: 10 }} /> */}\r\n {this.props.buttonText}\r\n </div>\r\n )}\r\n </DefaultButton>\r\n </div>\r\n </div>\r\n {this.props.messageText ? (\r\n <div style={{ backgroundColor: '#fff' }} className={styles.loginMsg}>\r\n <MessageBar messageBarType={this.props.messageType} isMultiline={true}>\r\n {this.props.messageText}\r\n </MessageBar>\r\n </div>\r\n ) : null}\r\n </Stack.Item>\r\n </Stack>\r\n </Stack>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default Auth;\r\n","import { BaseButton, Button, Icon, ITextField, ITextFieldProps, Link, MessageBar, MessageBarType, TextField } from 'office-ui-fabric-react';\r\nimport * as React from 'react';\r\nimport { withRouter } from 'react-router';\r\nimport Api from '../../Api';\r\nimport Auth from '../Auth';\r\nimport '../Auth.css';\r\nimport './ForgotNewPw.css';\r\n\r\nexport interface IForgotNewPwState {\r\n guid: string;\r\n password?: string;\r\n confPassword?: string;\r\n success?: boolean;\r\n validInput: boolean;\r\n validMsg?: string;\r\n validGuid: boolean;\r\n message?: string;\r\n messageType?: MessageBarType;\r\n isProcessing: boolean;\r\n}\r\n\r\nclass ForgotNewPw extends React.PureComponent<any, IForgotNewPwState> {\r\n constructor(props: any) {\r\n super(props);\r\n\r\n const {\r\n match: { params }\r\n } = this.props;\r\n\r\n this.state = {\r\n guid: params.guid,\r\n isProcessing: false,\r\n validInput: false,\r\n validGuid: true,\r\n success: false\r\n };\r\n this.getForm = this.getForm.bind(this);\r\n this.submit = this.submit.bind(this);\r\n this.validateGuid = this.validateGuid.bind(this);\r\n this.onKeyPress = this.onKeyPress.bind(this);\r\n this.getErrorMessage = this.getErrorMessage.bind(this);\r\n this.onNotifyValidationResult = this.onNotifyValidationResult.bind(this);\r\n\r\n this.validatePw = this.validatePw.bind(this);\r\n this.validateConfPw = this.validateConfPw.bind(this);\r\n }\r\n\r\n private componentRef = React.createRef<ITextField>();\r\n\r\n public componentDidMount() {\r\n this.validateGuid();\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n <Auth\r\n buttonShow={this.state.validGuid && !this.state.success}\r\n buttonText={'Submit'}\r\n buttonDisabled={this.state.isProcessing || !this.state.validInput}\r\n buttonOnClick={this.submit}\r\n isProcessing={this.state.isProcessing}\r\n messageText={this.state.message}\r\n messageType={this.state.messageType}\r\n onKeyPress={this.onKeyPress}\r\n >\r\n {this.state.validGuid ? (this.state.success ? this.getSuccessMsg() : this.getForm()) : this.getInvalidGuid()}\r\n </Auth>\r\n );\r\n }\r\n\r\n private getInvalidGuid(): JSX.Element {\r\n return (\r\n <MessageBar messageBarType={MessageBarType.blocked} isMultiline={true}>\r\n Password reset link is not valid! <Link href=\"../forgot\">Try again?</Link>\r\n </MessageBar>\r\n );\r\n }\r\n\r\n private getSuccessMsg(): JSX.Element {\r\n return (\r\n <MessageBar messageBarType={MessageBarType.success} isMultiline={true}>\r\n Your password has been changed successfully!\r\n </MessageBar>\r\n );\r\n }\r\n\r\n private getForm(): JSX.Element {\r\n return (\r\n <>\r\n <div>Forgotten your password?</div>\r\n <div>Enter a new password for your account!</div>\r\n <TextField\r\n componentRef={this.componentRef}\r\n className=\"inputField\"\r\n type={'password'}\r\n placeholder=\"Password\"\r\n ariaLabel=\"Please enter password here\"\r\n defaultValue={this.state.password ? this.state.password : undefined}\r\n disabled={this.state.isProcessing}\r\n deferredValidationTime={100}\r\n validateOnLoad={false}\r\n onGetErrorMessage={this.getErrorMessage}\r\n errorMessage={this.state.validMsg}\r\n onNotifyValidationResult={this.onNotifyValidationResult}\r\n onChange={(ev, input) => {\r\n this.setState({ password: input ? input : '' });\r\n // this.validateConfPw();\r\n }}\r\n prefix=\"AzureKeyVault\"\r\n onRenderPrefix={this.onRenderPrefix}\r\n />\r\n <TextField\r\n className=\"inputField\"\r\n type={'password'}\r\n placeholder=\"Re-enter Password\"\r\n ariaLabel=\"Please confirm password\"\r\n defaultValue={this.state.confPassword ? this.state.confPassword : undefined}\r\n disabled={this.state.isProcessing}\r\n deferredValidationTime={50}\r\n validateOnLoad={false}\r\n onGetErrorMessage={this.getErrorMessage}\r\n errorMessage={this.state.validMsg}\r\n onNotifyValidationResult={this.onNotifyValidationResult}\r\n onChange={(ev, input) => {\r\n this.setState({ confPassword: input ? input : '' });\r\n // this.validatePw();\r\n }}\r\n prefix=\"AzureKeyVault\"\r\n onRenderPrefix={this.onRenderPrefix}\r\n />\r\n </>\r\n );\r\n }\r\n\r\n private onRenderPrefix(props: ITextFieldProps | undefined): JSX.Element {\r\n return props ? <Icon iconName={props.prefix} /> : <></>;\r\n }\r\n\r\n private getErrorMessage(value: string): string | undefined {\r\n if (!value) return 'Required';\r\n if (this.state.password !== this.state.confPassword) {\r\n this.setState({ validMsg: 'Passwords must match!' });\r\n } else {\r\n this.setState({ validMsg: undefined });\r\n }\r\n }\r\n\r\n private onNotifyValidationResult(errorMessage: string | JSX.Element, value: string | undefined): void {\r\n this.setState({ validInput: !errorMessage });\r\n }\r\n\r\n private onKeyPress(ev: React.KeyboardEvent<HTMLDivElement | HTMLAnchorElement | HTMLButtonElement | BaseButton | Button>): void {\r\n if (ev.key === 'Enter' && this.state.validInput && !this.state.isProcessing) {\r\n this.submit();\r\n }\r\n }\r\n\r\n private validatePw(): void {\r\n var temp = this.state.password;\r\n this.setState({ password: temp + 'x' }, () => {\r\n this.setState({ password: temp });\r\n });\r\n }\r\n\r\n private validateConfPw(): void {\r\n var temp = this.state.confPassword;\r\n this.setState({ confPassword: temp + 'x' }, () => {\r\n this.setState({ confPassword: temp });\r\n });\r\n }\r\n\r\n private validateGuid(): void {\r\n Api.get('auth/forgot/' + this.state.guid)\r\n .then(response => {\r\n const resp: string = response.data;\r\n console.log('Response: ', resp);\r\n this.setState({ validGuid: resp ? true : false });\r\n })\r\n .catch(error => {\r\n console.log('error: ', error);\r\n console.log('error resp: ', error.response);\r\n const message = error.response\r\n ? `Request failed with status code ${error.response.status}: ${error.response.statusText}`\r\n : error.toJSON().message;\r\n\r\n this.setState({\r\n success: false,\r\n isProcessing: false,\r\n message: message,\r\n messageType: MessageBarType.error\r\n });\r\n });\r\n }\r\n\r\n private submit(): void {\r\n this.setState({ isProcessing: true });\r\n\r\n const request = {\r\n password: this.state.password\r\n };\r\n\r\n Api.post('auth/forgot/' + this.state.guid, request)\r\n .then(response => {\r\n const resp = response.data;\r\n console.log('Response: ', resp);\r\n\r\n this.setState({\r\n success: resp && resp.success,\r\n isProcessing: false,\r\n message: resp && resp.success ? '' : resp.errorMessage,\r\n messageType: resp && resp.success ? MessageBarType.success : MessageBarType.error\r\n });\r\n })\r\n .catch(error => {\r\n console.log('error: ', error);\r\n console.log('error resp: ', error.response);\r\n const message = error.response\r\n ? `Request failed with status code ${error.response.status}: ${error.response.statusText}`\r\n : error.toJSON().message;\r\n\r\n this.setState({\r\n success: false,\r\n isProcessing: false,\r\n message: message,\r\n messageType: MessageBarType.error\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport default withRouter(ForgotNewPw);\r\n","import { BaseButton, Button, Icon, ITextFieldProps, MessageBarType, TextField } from 'office-ui-fabric-react';\r\nimport * as React from 'react';\r\nimport { withRouter } from 'react-router';\r\nimport Api from '../../Api';\r\nimport Auth from '../Auth';\r\nimport '../Auth.css';\r\nimport './ForgotPW.css';\r\n\r\nexport interface IForgotPWState {\r\n email?: string;\r\n success?: boolean;\r\n validInput: boolean;\r\n message?: string;\r\n messageType?: MessageBarType;\r\n isProcessing: boolean;\r\n}\r\n\r\nclass ForgotPW extends React.PureComponent<any, IForgotPWState> {\r\n constructor(props: any) {\r\n super(props);\r\n\r\n this.state = {\r\n isProcessing: false,\r\n validInput: false\r\n };\r\n\r\n this.submit = this.submit.bind(this);\r\n this.onKeyPress = this.onKeyPress.bind(this);\r\n this.onNotifyValidationResult = this.onNotifyValidationResult.bind(this);\r\n }\r\n\r\n public componentDidMount() {\r\n console.log('Origin:', document.referrer);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n <Auth\r\n buttonText={'Submit'}\r\n buttonDisabled={this.state.isProcessing || !this.state.validInput}\r\n buttonOnClick={this.submit}\r\n isProcessing={this.state.isProcessing}\r\n messageText={this.state.message}\r\n messageType={this.state.messageType}\r\n onKeyPress={this.onKeyPress}\r\n >\r\n <div>Forgot your password?</div>\r\n <div>Enter your email to reset your password.</div>\r\n <TextField\r\n className=\"inputField\"\r\n type={'email'}\r\n placeholder=\"E-mail Address\"\r\n ariaLabel=\"Please enter your e-mail address here\"\r\n defaultValue={undefined}\r\n disabled={this.state.isProcessing}\r\n deferredValidationTime={50}\r\n validateOnLoad={false}\r\n onGetErrorMessage={this.getErrorMessage}\r\n onNotifyValidationResult={this.onNotifyValidationResult}\r\n // tslint:disable-next-line:jsx-no-lambda\r\n onChange={(ev, input) => {\r\n this.setState({ email: input ? input : '' });\r\n }}\r\n prefix=\"MailSolid\"\r\n onRenderPrefix={this.onRenderPrefix}\r\n />\r\n </Auth>\r\n );\r\n }\r\n\r\n private onRenderPrefix(props: ITextFieldProps | undefined): JSX.Element {\r\n return props ? <Icon iconName={props.prefix} /> : <></>;\r\n }\r\n\r\n private getErrorMessage(value: string): string | undefined {\r\n if (!value) return 'Required';\r\n var regexp = new RegExp(\r\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\r\n );\r\n var test = regexp.test(value);\r\n return !test ? 'Invalid email format' : '';\r\n }\r\n\r\n private onNotifyValidationResult(errorMessage: string | JSX.Element, value: string | undefined): void {\r\n this.setState({ validInput: !errorMessage });\r\n }\r\n\r\n private onKeyPress(ev: React.KeyboardEvent<HTMLDivElement | HTMLAnchorElement | HTMLButtonElement | BaseButton | Button>): void {\r\n if (ev.key === 'Enter' && this.state.validInput && !this.state.isProcessing) {\r\n this.submit();\r\n }\r\n }\r\n\r\n private submit(): void {\r\n this.setState({ isProcessing: true });\r\n\r\n const request = {\r\n email: this.state.email\r\n };\r\n\r\n Api.post('auth/forgot', request)\r\n .then(response => {\r\n const resp: string = response.data;\r\n console.log('Response: ', resp);\r\n this.setState({\r\n success: true,\r\n isProcessing: false,\r\n message: 'Request successfully received! If this email belongs to a valid user, an email will be sent with further instructions.',\r\n messageType: MessageBarType.success\r\n });\r\n })\r\n .catch(error => {\r\n console.log('error: ', error);\r\n console.log('error resp: ', error.response);\r\n const message = error.response\r\n ? `Request failed with status code ${error.response.status}: ${error.response.statusText}`\r\n : error.toJSON().message;\r\n\r\n this.setState({\r\n success: false,\r\n isProcessing: false,\r\n message: message,\r\n messageType: MessageBarType.error\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport default withRouter(ForgotPW);\r\n","import { BaseButton, Button, Icon, ITextFieldProps, Link, MessageBarType, TextField } from 'office-ui-fabric-react';\r\nimport * as queryString from 'query-string';\r\nimport * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { withRouter } from 'react-router';\r\nimport { Dispatch } from 'redux';\r\nimport { loginToken } from '../../../redux/Actions/Security/ActionCreators';\r\nimport { ISecurityPayload, LoginMode } from '../../../redux/Actions/Security/ActionTypes';\r\nimport { IRootState } from '../../../redux/Reducers/RootReducer';\r\nimport Api from '../../Api';\r\nimport Auth from '../Auth';\r\nimport '../Auth.css';\r\nimport './Login.css';\r\n\r\nconst mapDispatchToProps = (dispatch: Dispatch) => {\r\n return {\r\n saveToken: (param: ISecurityPayload) => dispatch(loginToken(param))\r\n };\r\n};\r\n\r\nexport interface ILoginState {\r\n username?: string;\r\n password?: string;\r\n token?: string;\r\n isProcessing: boolean;\r\n isAutoLogin: boolean;\r\n goTo?: string;\r\n message?: string;\r\n}\r\n\r\nfunction mapStateToProps(state: IRootState, ownProps: any) {\r\n return { security: state.securityState.security };\r\n}\r\n\r\nclass Login extends React.PureComponent<any, ILoginState> {\r\n constructor(props: any) {\r\n super(props);\r\n\r\n this.state = {\r\n isProcessing: false,\r\n isAutoLogin: false\r\n };\r\n\r\n this.login = this.login.bind(this);\r\n this.onKeyPress = this.onKeyPress.bind(this);\r\n }\r\n\r\n public componentDidMount() {\r\n const query = queryString.parse(this.props.location.search);\r\n\r\n const user = query.user ? `${query.user}` : undefined;\r\n const pwd = query.pwd ? `${query.pwd}` : undefined;\r\n const goTo = query.goTo ? `${query.goTo}` : undefined;\r\n\r\n if (query.user && query.pwd) {\r\n this.setState({ username: user, password: pwd, goTo: goTo, isAutoLogin: true }, () => {\r\n this.login();\r\n });\r\n } else {\r\n const { security } = this.props;\r\n const hasMsg = !!(security && security.message);\r\n this.setState({ goTo: goTo, isAutoLogin: false, message: hasMsg ? security.message : undefined });\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n if (this.state.isAutoLogin) {\r\n return <></>;\r\n }\r\n\r\n return (\r\n <Auth\r\n buttonText={'Login'}\r\n buttonDisabled={this.state.isProcessing || !this.state.username || !this.state.password}\r\n buttonOnClick={this.login}\r\n isProcessing={this.state.isProcessing}\r\n messageText={this.state.message}\r\n messageType={MessageBarType.blocked}\r\n onKeyPress={this.onKeyPress}\r\n >\r\n <TextField\r\n className=\"inputField\"\r\n placeholder=\"Username\"\r\n ariaLabel=\"Please enter username here\"\r\n defaultValue={this.state.username ? this.state.username : undefined}\r\n disabled={this.state.isProcessing}\r\n deferredValidationTime={50}\r\n validateOnLoad={false}\r\n onGetErrorMessage={this.getErrorMessage}\r\n // tslint:disable-next-line:jsx-no-lambda\r\n onChange={(ev, input) => {\r\n this.setState({ username: input ? input : '' });\r\n }}\r\n prefix=\"Contact\"\r\n onRenderPrefix={this.onRenderPrefix}\r\n />\r\n <TextField\r\n className=\"inputField\"\r\n type={'password'}\r\n placeholder=\"Password\"\r\n ariaLabel=\"Please enter password here\"\r\n defaultValue={this.state.password ? this.state.password : undefined}\r\n disabled={this.state.isProcessing}\r\n deferredValidationTime={50}\r\n validateOnLoad={false}\r\n onGetErrorMessage={this.getErrorMessage}\r\n // tslint:disable-next-line:jsx-no-lambda\r\n onChange={(ev, input) => {\r\n this.setState({ password: input ? input : '' });\r\n }}\r\n prefix=\"AzureKeyVault\"\r\n onRenderPrefix={this.onRenderPrefix}\r\n />\r\n <div style={{ textAlign: 'end' }}>\r\n <Link href=\"forgot\" styles={{ root: { fontSize: '.85em' } }}>\r\n Forgot Password?\r\n </Link>\r\n </div>\r\n </Auth>\r\n );\r\n }\r\n\r\n private onRenderPrefix(props: ITextFieldProps | undefined): JSX.Element {\r\n return props ? <Icon iconName={props.prefix} /> : <></>;\r\n }\r\n\r\n private getErrorMessage(value: string): string | undefined {\r\n return !value ? 'Required' : undefined;\r\n }\r\n\r\n private onKeyPress(ev: React.KeyboardEvent<HTMLDivElement | HTMLAnchorElement | HTMLButtonElement | BaseButton | Button>): void {\r\n if (ev.key === 'Enter' && !this.state.isProcessing) {\r\n console.log('Enter!');\r\n this.login();\r\n }\r\n }\r\n\r\n private login(): void {\r\n this.setState({ isProcessing: true });\r\n\r\n const request = {\r\n username: this.state.username,\r\n password: this.state.password,\r\n isPasswordEncrypted: this.state.isAutoLogin\r\n };\r\n\r\n Api.post('auth', request)\r\n .then(response => {\r\n const token: string = `Bearer ${response.data.token}`;\r\n const payload: ISecurityPayload = {\r\n username: this.state.username,\r\n password: this.state.password,\r\n token,\r\n loginMode: this.state.isAutoLogin ? LoginMode.EMBEDDED : LoginMode.NORMAL\r\n };\r\n\r\n this.props.saveToken(payload);\r\n\r\n this.state.goTo ? this.props.history.push(this.state.goTo) : this.props.history.push('/search');\r\n })\r\n .catch(error => {\r\n const message = error.response\r\n ? `Request failed with status code ${error.response.data.status}: ${error.response.data.message}`\r\n : error.toJSON().message;\r\n\r\n this.setState({\r\n isProcessing: false,\r\n message: message\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport default withRouter(connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(Login) as any);\r\n","import { ISecurityLoginAction, ISecurityLogoutAction, ISecurityPayload, ISecurityUnauthAction, SecurityActionTypes } from './ActionTypes';\r\n\r\nexport function loginToken(param: ISecurityPayload): ISecurityLoginAction {\r\n return {\r\n type: SecurityActionTypes.LOGIN_USER,\r\n payload: {\r\n security: param\r\n }\r\n };\r\n}\r\n\r\nexport function logoutUser(): ISecurityLogoutAction {\r\n return {\r\n type: SecurityActionTypes.LOGOUT_USER\r\n };\r\n}\r\n\r\nexport function unauthUser(param: string): ISecurityUnauthAction {\r\n return {\r\n type: SecurityActionTypes.UNAUTH_USER,\r\n payload: {\r\n message: param\r\n }\r\n };\r\n}\r\n","import i18n from 'i18next';\r\nimport LanguageDetector from 'i18next-browser-languagedetector';\r\nimport { initReactI18next } from 'react-i18next';\r\nimport translationEN from './i18n/locales/en/translation.json';\r\nimport translationPT from './i18n/locales/pt/translation.json';\r\n\r\nconst resources = {\r\n en: {\r\n translation: translationEN\r\n },\r\n pt: {\r\n translation: translationPT\r\n }\r\n};\r\n\r\ni18n\r\n .use(LanguageDetector)\r\n .use(initReactI18next) // passes i18n down to react-i18next\r\n .init({\r\n resources,\r\n\r\n debug: false,\r\n // keySeparator: false, // we do not use keys in form messages.welcome\r\n\r\n interpolation: {\r\n escapeValue: false // react already safes from xss\r\n },\r\n\r\n fallbackLng: 'en' // use en if detected lng is not available\r\n });\r\nexport default i18n;\r\n","import { IBreadcrumbItem } from 'office-ui-fabric-react/lib/Breadcrumb';\r\nimport { BreadCrumbsActiontypes, IBreadCrumbsAction } from '../../Actions/BreadCrumbs/ActionTypes';\r\n\r\nconst emptyBC: IBreadcrumbItem[] = [];\r\n\r\nexport const initialState: IBreadCrumbsState = {\r\n items: emptyBC\r\n};\r\n\r\nexport interface IBreadCrumbsState {\r\n items: IBreadcrumbItem[];\r\n}\r\n\r\nexport function reducer(state = initialState, action: IBreadCrumbsAction) {\r\n switch (action.type) {\r\n case BreadCrumbsActiontypes.UPDATE:\r\n return Object.assign({}, state, action.payload);\r\n default:\r\n return state;\r\n }\r\n}\r\n","import { ISecurityPayload, LoginMode, SecurityActions, SecurityActionTypes } from '../../Actions/Security/ActionTypes';\r\n\r\nconst emptySecurity: ISecurityPayload = {\r\n username: undefined,\r\n password: undefined,\r\n token: undefined,\r\n message: undefined,\r\n loginMode: LoginMode.NORMAL\r\n};\r\n\r\nexport const initialState: ISecurityState = {\r\n security: emptySecurity\r\n};\r\n\r\nexport interface ISecurityState {\r\n security: ISecurityPayload;\r\n}\r\n\r\nexport function reducer(state = initialState, action: SecurityActions) {\r\n switch (action.type) {\r\n case SecurityActionTypes.LOGIN_USER:\r\n return { ...state, ...action.payload };\r\n\r\n case SecurityActionTypes.LOGOUT_USER:\r\n return { ...initialState, security: { loginMode: state.security.loginMode } };\r\n\r\n case SecurityActionTypes.UNAUTH_USER:\r\n return { ...initialState, security: { message: action.payload.message, loginMode: state.security.loginMode } };\r\n\r\n default:\r\n return state;\r\n }\r\n}\r\n","import { combineReducers } from 'redux';\r\nimport * as fromBreadCrumbs from './BreadCrumbs/Reducer';\r\nimport * as fromSecurity from './Security/Reducer';\r\n\r\nexport interface IRootState {\r\n breadCrumbsState: fromBreadCrumbs.IBreadCrumbsState;\r\n securityState: fromSecurity.ISecurityState;\r\n}\r\n\r\nexport const rootInitialState: IRootState = {\r\n breadCrumbsState: fromBreadCrumbs.initialState,\r\n securityState: fromSecurity.initialState\r\n};\r\n\r\nexport const rootReducer = combineReducers<IRootState>({\r\n breadCrumbsState: fromBreadCrumbs.reducer,\r\n securityState: fromSecurity.reducer\r\n});\r\n","import { applyMiddleware, createStore } from 'redux';\r\nimport { composeWithDevTools } from 'redux-devtools-extension';\r\nimport logger from 'redux-logger';\r\nimport { PersistPartial, persistReducer, persistStore } from 'redux-persist';\r\nimport storage from 'redux-persist/lib/storage';\r\nimport { IRootState, rootReducer } from '../Reducers/RootReducer';\r\n\r\nconst middlewares: any[] = [];\r\n\r\nif (process.env.NODE_ENV === `development`) {\r\n middlewares.push(logger);\r\n}\r\n\r\nconst persistConfig = {\r\n key: 'root',\r\n storage\r\n};\r\n\r\nconst persistedReducer = persistReducer<IRootState, any>(persistConfig, rootReducer);\r\n\r\nexport default () => {\r\n const store =\r\n process.env.NODE_ENV === `development`\r\n ? createStore<IRootState & PersistPartial, any, any, any>(persistedReducer, composeWithDevTools(applyMiddleware(...middlewares)))\r\n : createStore<IRootState & PersistPartial, any, any, any>(persistedReducer);\r\n\r\n const persistor = persistStore(store);\r\n return { store, persistor };\r\n};\r\n","// tslint:disable:no-console\r\n// In production, we register a service worker to serve assets from local cache.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on the 'N+1' visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport default function register() {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(\r\n process.env.PUBLIC_URL!,\r\n window.location.toString()\r\n );\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Lets check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://goo.gl/SC7cgQ'\r\n );\r\n });\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl: string) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker) {\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a 'New content is\r\n // available; please refresh.' message in your web app.\r\n console.log('New content is available; please refresh.');\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // 'Content is cached for offline use.' message.\r\n console.log('Content is cached for offline use.');\r\n }\r\n }\r\n };\r\n }\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl: string) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n if (\r\n response.status === 404 ||\r\n response.headers.get('content-type')!.indexOf('javascript') === -1\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import { library } from '@fortawesome/fontawesome-svg-core';\r\nimport { fab } from '@fortawesome/free-brands-svg-icons';\r\nimport { far } from '@fortawesome/free-regular-svg-icons';\r\nimport { fas } from '@fortawesome/free-solid-svg-icons';\r\nimport { initializeIcons } from '@uifabric/icons';\r\nimport { createTheme, loadTheme } from 'office-ui-fabric-react/lib/Styling';\r\nimport * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport { BrowserRouter, Route, Switch } from 'react-router-dom';\r\nimport { PersistGate } from 'redux-persist/integration/react';\r\nimport Apps from './Apps';\r\nimport { setupInterceptors } from './components/Api';\r\nimport ForgotNewPw from './components/Auth/ForgotNewPw/ForgotNewPw';\r\nimport ForgotPW from './components/Auth/ForgotPW/ForgotPW';\r\nimport Login from './components/Auth/Login/Login';\r\nimport SecuredRoute from './components/SecuredRoute/SecuredRoute';\r\nimport './i18n';\r\nimport './index.css';\r\nimport './ktx.css';\r\nimport CreateStore from './redux/Store/Store';\r\nimport registerServiceWorker from './registerServiceWorker';\r\n\r\ninitializeIcons();\r\nlibrary.add(fab, fas, far);\r\n\r\nconst { persistor, store } = CreateStore();\r\n\r\nif (window.location.search === '?debug') {\r\n persistor.purge();\r\n}\r\n\r\nsetupInterceptors(store);\r\n\r\nconst mainTheme = createTheme({\r\n palette: {\r\n themePrimary: '#f68932',\r\n themeLighterAlt: '#fffaf6',\r\n themeLighter: '#fdecdd',\r\n themeLight: '#fcdbbf',\r\n themeTertiary: '#f9b781',\r\n themeSecondary: '#f69749',\r\n themeDarkAlt: '#dc7b2c',\r\n themeDark: '#ba6825',\r\n themeDarker: '#894d1b',\r\n neutralLighterAlt: '#f8f8f8',\r\n neutralLighter: '#f4f4f4',\r\n neutralLight: '#eaeaea',\r\n neutralQuaternaryAlt: '#dadada',\r\n neutralQuaternary: '#d0d0d0',\r\n neutralTertiaryAlt: '#c8c8c8',\r\n neutralTertiary: '#c2c2c2',\r\n neutralSecondary: '#858585',\r\n neutralPrimaryAlt: '#4b4b4b',\r\n neutralPrimary: '#333333',\r\n neutralDark: '#272727',\r\n black: '#1d1d1d',\r\n white: '#ffffff'\r\n }\r\n});\r\n\r\nloadTheme(mainTheme);\r\n\r\n// TODO: Decide how to receive the user/pass from OLD KTX\r\nReactDOM.render(\r\n <Provider store={store}>\r\n <PersistGate loading={null} persistor={persistor}>\r\n <BrowserRouter basename={process.env.REACT_APP_ALIAS}>\r\n <Switch>\r\n <Route exact={true} path=\"/login\" component={Login} />\r\n <Route exact={true} path=\"/forgot\" component={ForgotPW} />\r\n <Route exact={true} path=\"/forgot/:guid\" component={ForgotNewPw} />\r\n <SecuredRoute path=\"/\" component={Apps} />\r\n </Switch>\r\n </BrowserRouter>\r\n </PersistGate>\r\n </Provider>,\r\n document.getElementById('root') as HTMLElement\r\n);\r\nregisterServiceWorker();\r\n"],"sourceRoot":""}