admin2 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +11 -0
- package/.env +1 -0
- package/.eslintrc +87 -0
- package/README.md +57 -0
- package/bin/build-private.sh +9 -0
- package/bin/build.sh +9 -0
- package/config/assets_prefix.js +3 -0
- package/config/config.js +170 -0
- package/config/proxy.js +61 -0
- package/config/theme.js +42 -0
- package/jsconfig.json +11 -0
- package/loader/buildEnvLoader.js +15 -0
- package/loader/privateRemoveText.js +20 -0
- package/mock/auditLog.js +26 -0
- package/mock/basics/app.js +98 -0
- package/mock/basics/menu.js +42 -0
- package/mock/basics/user.js +0 -0
- package/mock/bill.js +188 -0
- package/mock/errorCase.js +24 -0
- package/mock/fieldsManage.js +52 -0
- package/mock/history.js +675 -0
- package/mock/listTableList.js +178 -0
- package/mock/notices.js +147 -0
- package/mock/opinion.js +51 -0
- package/mock/qps.js +63 -0
- package/mock/rank.js +172 -0
- package/mock/riskyMember.js +98 -0
- package/mock/route.js +104 -0
- package/mock/tj/check/index.js +0 -0
- package/mock/trend.js +1442 -0
- package/mock/tw/event/trend.js +0 -0
- package/mock/tw/list/list.js +251 -0
- package/mock/tx/history/index.js +81 -0
- package/mock/tx/trend/index.js +94 -0
- package/mock/user.js +194 -0
- package/package.json +154 -0
- package/plugin.js +15 -0
- package/public/CNAME +1 -0
- package/public/favicon.ico +0 -0
- package/public/fengkong.ico +0 -0
- package/public/home_bg.png +0 -0
- package/public/iconfont.js +1 -0
- package/public/icons/icon-128x128.ico +0 -0
- package/public/icons/icon-192x192.ico +0 -0
- package/public/icons/icon-512x512.ico +0 -0
- package/public/index/upload-icon.png +0 -0
- package/public/intlLoading.gif +0 -0
- package/public/loading.gif +0 -0
- package/public/loadingPRIVATE.gif +0 -0
- package/public/pro_icon.svg +5 -0
- package/public/txt/example.txt +2 -0
- package/src/assets/bigLogo.png +0 -0
- package/src/assets/demoImg/fengkong.ico +0 -0
- package/src/assets/demoImg/headerLogo.png +0 -0
- package/src/assets/demoImg/index.js +17 -0
- package/src/assets/demoImg/leftBanner.png +0 -0
- package/src/assets/demoImg/leftLogo.png +0 -0
- package/src/assets/demoImg/systemLogo.png +0 -0
- package/src/assets/logo.svg +1 -0
- package/src/assets/menuLeft.png +0 -0
- package/src/assets/menuLeftHover.png +0 -0
- package/src/assets/noData.png +0 -0
- package/src/assets/notFind.svg +6 -0
- package/src/assets/pdf.svg +20 -0
- package/src/assets/privateSmallLogo.png +0 -0
- package/src/assets/smallLogo.png +0 -0
- package/src/assets/ssoImg/index.js +5 -0
- package/src/assets/ssoImg/leftLogo.png +0 -0
- package/src/assets/tab.png +0 -0
- package/src/assets/zhonghang.png +0 -0
- package/src/components/ApprovalUploader/constants.js +6 -0
- package/src/components/ApprovalUploader/img/default.png +0 -0
- package/src/components/ApprovalUploader/img/downloadIcon.png +0 -0
- package/src/components/ApprovalUploader/img/index.js +15 -0
- package/src/components/ApprovalUploader/img/previewIcon.png +0 -0
- package/src/components/ApprovalUploader/img/remove.png +0 -0
- package/src/components/ApprovalUploader/index.js +181 -0
- package/src/components/ApprovalUploader/index.less +80 -0
- package/src/components/Authorized/Authorized.jsx +21 -0
- package/src/components/Authorized/AuthorizedRoute.jsx +25 -0
- package/src/components/Authorized/CheckPermissions.jsx +72 -0
- package/src/components/Authorized/PromiseRender.jsx +80 -0
- package/src/components/Authorized/Secured.jsx +75 -0
- package/src/components/Authorized/index.jsx +8 -0
- package/src/components/Authorized/renderAuthorize.js +27 -0
- package/src/components/CaseDetail/index.jsx +150 -0
- package/src/components/CaseDetail/index.less +32 -0
- package/src/components/ClusterChanger/index.jsx +110 -0
- package/src/components/CustomMessageContent/index.js +23 -0
- package/src/components/CustomVideo/index.js +77 -0
- package/src/components/ElementDateRangeTime/assets/arrow.svg +11 -0
- package/src/components/ElementDateRangeTime/assets/calendar.svg +13 -0
- package/src/components/ElementDateRangeTime/assets/last-month.svg +11 -0
- package/src/components/ElementDateRangeTime/assets/next-month.svg +11 -0
- package/src/components/ElementDateRangeTime/assets/next-year.svg +14 -0
- package/src/components/ElementDateRangeTime/assets/pre-year.svg +14 -0
- package/src/components/ElementDateRangeTime/constants.js +11 -0
- package/src/components/ElementDateRangeTime/index.jsx +106 -0
- package/src/components/ElementDateRangeTime/index.less +206 -0
- package/src/components/EsExportTaskModal/index.jsx +194 -0
- package/src/components/FieldMessageModal/DraggableBody/index.js +39 -0
- package/src/components/FieldMessageModal/DraggableBody/index.less +0 -0
- package/src/components/FieldMessageModal/index.js +329 -0
- package/src/components/FieldMessageModal/index.less +113 -0
- package/src/components/GlobalFilterListener/index.jsx +92 -0
- package/src/components/GlobalHeader/AppDropdown.jsx +157 -0
- package/src/components/GlobalHeader/AvatarDropdown.jsx +184 -0
- package/src/components/GlobalHeader/BottomContent.jsx +55 -0
- package/src/components/GlobalHeader/Message.jsx +93 -0
- package/src/components/GlobalHeader/NoticeIconView.jsx +153 -0
- package/src/components/GlobalHeader/PayMent.jsx +112 -0
- package/src/components/GlobalHeader/RightContent.jsx +137 -0
- package/src/components/GlobalHeader/index.less +226 -0
- package/src/components/HeaderDropdown/index.jsx +10 -0
- package/src/components/HeaderDropdown/index.less +16 -0
- package/src/components/HeaderFilter/index.jsx +447 -0
- package/src/components/HeaderFilter/index.less +33 -0
- package/src/components/IconLoading/index.jsx +24 -0
- package/src/components/IconLoading/index.less +17 -0
- package/src/components/IconLoading/loading.gif +0 -0
- package/src/components/InputSelect/index.jsx +186 -0
- package/src/components/InputSelect/index.less +6 -0
- package/src/components/NoticeIcon/NoticeList.jsx +95 -0
- package/src/components/NoticeIcon/NoticeList.less +103 -0
- package/src/components/NoticeIcon/index.jsx +112 -0
- package/src/components/NoticeIcon/index.less +35 -0
- package/src/components/PageLoading/index.jsx +37 -0
- package/src/components/PageLoading/index.less +18 -0
- package/src/components/PageLoading/intlLoading.gif +0 -0
- package/src/components/PageLoading/loading.gif +0 -0
- package/src/components/RemindPage/index.jsx +69 -0
- package/src/components/RemindPage/index.less +53 -0
- package/src/components/SMAlert/img/succeed.png +0 -0
- package/src/components/SMAlert/img/warning.png +0 -0
- package/src/components/SMAlert/index.js +169 -0
- package/src/components/SMAlert/index.less +36 -0
- package/src/components/SMAudio/index.jsx +297 -0
- package/src/components/SMAudio/index.less +65 -0
- package/src/components/SMBackTop/index.js +48 -0
- package/src/components/SMBackTop/index.less +35 -0
- package/src/components/SMBreadcrumb/index.js +42 -0
- package/src/components/SMBreadcrumb/index.less +4 -0
- package/src/components/SMCascader/index.jsx +124 -0
- package/src/components/SMCascader/index.less +10 -0
- package/src/components/SMCheckableTag/index.jsx +51 -0
- package/src/components/SMColorRect/img/icon_accomplish.png +0 -0
- package/src/components/SMColorRect/img/icon_activate.png +0 -0
- package/src/components/SMColorRect/img/icon_increase.png +0 -0
- package/src/components/SMColorRect/img/icon_invalid.png +0 -0
- package/src/components/SMColorRect/img/icon_jiaohuliang.png +0 -0
- package/src/components/SMColorRect/img/icon_lanjieliang.png +0 -0
- package/src/components/SMColorRect/img/icon_order_one.png +0 -0
- package/src/components/SMColorRect/img/icon_order_two.png +0 -0
- package/src/components/SMColorRect/img/icon_pass.png +0 -0
- package/src/components/SMColorRect/img/icon_reject.png +0 -0
- package/src/components/SMColorRect/img/icon_reject_total.png +0 -0
- package/src/components/SMColorRect/img/icon_review.png +0 -0
- package/src/components/SMColorRect/img/icon_review_total.png +0 -0
- package/src/components/SMColorRect/img/icon_robot.png +0 -0
- package/src/components/SMColorRect/img/icon_time.png +0 -0
- package/src/components/SMColorRect/img/icon_total.png +0 -0
- package/src/components/SMColorRect/img/icon_verify.png +0 -0
- package/src/components/SMColorRect/img/icon_zhanshiliang.png +0 -0
- package/src/components/SMColorRect/index.jsx +205 -0
- package/src/components/SMColorRect/index.less +135 -0
- package/src/components/SMCopy/index.jsx +33 -0
- package/src/components/SMCount/index.jsx +49 -0
- package/src/components/SMCount/index.less +80 -0
- package/src/components/SMCustomInput/index.jsx +115 -0
- package/src/components/SMCustomInput/index.less +11 -0
- package/src/components/SMDataCard/index.jsx +59 -0
- package/src/components/SMDataCard/index.less +3 -0
- package/src/components/SMDataCount/index.jsx +22 -0
- package/src/components/SMDataCount/index.less +39 -0
- package/src/components/SMDatePicker/assets/arrow.svg +11 -0
- package/src/components/SMDatePicker/assets/calendar.png +0 -0
- package/src/components/SMDatePicker/assets/calendar.svg +13 -0
- package/src/components/SMDatePicker/assets/last-month.svg +11 -0
- package/src/components/SMDatePicker/assets/next-month.svg +11 -0
- package/src/components/SMDatePicker/assets/next-year.svg +14 -0
- package/src/components/SMDatePicker/assets/pre-year.svg +14 -0
- package/src/components/SMDatePicker/assets/time.png +0 -0
- package/src/components/SMDatePicker/constants.js +13 -0
- package/src/components/SMDatePicker/index.jsx +222 -0
- package/src/components/SMDatePicker/index.less +318 -0
- package/src/components/SMDateSearch/index.js +63 -0
- package/src/components/SMElementPicker/index.jsx +38 -0
- package/src/components/SMElementPicker/index.less +22 -0
- package/src/components/SMEmpty/index.jsx +28 -0
- package/src/components/SMEmpty/index.less +9 -0
- package/src/components/SMIcon/index.jsx +25 -0
- package/src/components/SMImage/index.jsx +277 -0
- package/src/components/SMImage/index.less +46 -0
- package/src/components/SMInputSelect/index.jsx +117 -0
- package/src/components/SMInputSelect/index.less +6 -0
- package/src/components/SMLabelSearch/index.jsx +107 -0
- package/src/components/SMLabelSearch/index.less +41 -0
- package/src/components/SMLineChart/index.jsx +369 -0
- package/src/components/SMLineChart/index.less +49 -0
- package/src/components/SMLineChart2/index.jsx +453 -0
- package/src/components/SMLineChart2/index.less +140 -0
- package/src/components/SMLinePieChart/index.jsx +25 -0
- package/src/components/SMLinePieChart/index.less +0 -0
- package/src/components/SMList/index.jsx +153 -0
- package/src/components/SMList/index.less +103 -0
- package/src/components/SMMessageModal/index.jsx +67 -0
- package/src/components/SMMessageModal/index.less +111 -0
- package/src/components/SMMonthPicker/constants.js +91 -0
- package/src/components/SMMonthPicker/img/inputPanel.png +0 -0
- package/src/components/SMMonthPicker/index.jsx +393 -0
- package/src/components/SMMonthPicker/index.less +109 -0
- package/src/components/SMNewPieChart/index.jsx +204 -0
- package/src/components/SMNewPieChart/index.less +21 -0
- package/src/components/SMNewSelect/index.jsx +147 -0
- package/src/components/SMNewSelect/index.less +39 -0
- package/src/components/SMNewText/index.jsx +50 -0
- package/src/components/SMNoteTip/index.jsx +17 -0
- package/src/components/SMNoteTip/index.less +8 -0
- package/src/components/SMPageSize/index.jsx +84 -0
- package/src/components/SMPageSize/index.less +38 -0
- package/src/components/SMPieChart/index.jsx +187 -0
- package/src/components/SMPieChart/index.less +39 -0
- package/src/components/SMPopConfirm/index.jsx +82 -0
- package/src/components/SMPopConfirm/index.less +63 -0
- package/src/components/SMPopConfirm/tip.png +0 -0
- package/src/components/SMReply/constants.jsx +18 -0
- package/src/components/SMReply/img/apply.png +0 -0
- package/src/components/SMReply/img/guide.png +0 -0
- package/src/components/SMReply/img/open.png +0 -0
- package/src/components/SMReply/img/user.png +0 -0
- package/src/components/SMReply/index.jsx +54 -0
- package/src/components/SMReply/index.less +69 -0
- package/src/components/SMRiskLevel/index.jsx +50 -0
- package/src/components/SMSearchForm/index.jsx +501 -0
- package/src/components/SMSearchForm/index.less +88 -0
- package/src/components/SMSelect/index.jsx +170 -0
- package/src/components/SMSelect/index.less +28 -0
- package/src/components/SMTJCascader/index.js +694 -0
- package/src/components/SMTJCascader/index.less +129 -0
- package/src/components/SMText/index.jsx +90 -0
- package/src/components/SMTimeTip/index.jsx +16 -0
- package/src/components/SMTimeTip/index.less +13 -0
- package/src/components/SMTips/index.js +37 -0
- package/src/components/SMTips/index.less +24 -0
- package/src/components/SMUpload/index.js +174 -0
- package/src/components/SMUpload/index.less +200 -0
- package/src/components/SearchFormV2/DatePickerV2/index.less +9 -0
- package/src/components/SearchFormV2/DatePickerV2/index.tsx +73 -0
- package/src/components/SearchFormV2/DatePickerV3/index.jsx +109 -0
- package/src/components/SearchFormV2/DatePickerV3/index.less +9 -0
- package/src/components/SearchFormV2/ExportDom/index.less +6 -0
- package/src/components/SearchFormV2/ExportDom/index.tsx +69 -0
- package/src/components/SearchFormV2/LabelSearchV2/index.less +0 -0
- package/src/components/SearchFormV2/LabelSearchV2/index.tsx +84 -0
- package/src/components/SearchFormV2/getFormItems.tsx +132 -0
- package/src/components/SearchFormV2/index.less +91 -0
- package/src/components/SearchFormV2/index.tsx +73 -0
- package/src/components/SensitiveWordSpin/index.jsx +28 -0
- package/src/components/SensitiveWordSpin/index.less +9 -0
- package/src/components/TotalCount/index.jsx +42 -0
- package/src/components/TrialResult/index.jsx +125 -0
- package/src/components/TrialResult/index.less +128 -0
- package/src/components/TwDatePicker/index.jsx +76 -0
- package/src/components/TwDatePicker/index.less +17 -0
- package/src/components/common.less +13 -0
- package/src/components/iframe/index.jsx +186 -0
- package/src/components/index.js +122 -0
- package/src/components/modal/index.js +9 -0
- package/src/configure/api.js +270 -0
- package/src/configure/configData/feedbackOrgList.js +6 -0
- package/src/configure/configData/lineChartConfig.js +382 -0
- package/src/configure/configData/newPageConfig.js +45 -0
- package/src/configure/defaultSettings.js +19 -0
- package/src/configure/index.js +11 -0
- package/src/configure/oldPage/appDropdownList.js +536 -0
- package/src/configure/oldPage/rankData.js +14 -0
- package/src/configure/oldPage/routeContrastData.js +414 -0
- package/src/configure/oldPage/strategyData.js +13 -0
- package/src/configure/pageType.js +12 -0
- package/src/configure/routes/document/config.js +9 -0
- package/src/configure/routes/heichan/config.js +70 -0
- package/src/configure/routes/index.js +131 -0
- package/src/configure/routes/manage/config.js +426 -0
- package/src/configure/routes/message/config.js +10 -0
- package/src/configure/routes/opinion/index.js +21 -0
- package/src/configure/routes/overview/config.js +14 -0
- package/src/configure/routes/path.js +582 -0
- package/src/configure/routes/payment/config.js +113 -0
- package/src/configure/routes/policy/config.js +43 -0
- package/src/configure/routes/policyOld/config.js +71 -0
- package/src/configure/routes/riskyMember/config.js +28 -0
- package/src/configure/routes/tj/audioAlbRoutes/config.js +635 -0
- package/src/configure/routes/tj/audioBleiRoutes/config.js +372 -0
- package/src/configure/routes/tj/audioEngRoutes/config.js +635 -0
- package/src/configure/routes/tj/audioRoutes/config.js +779 -0
- package/src/configure/routes/tj/audioStreamAlbRoutes/config.js +671 -0
- package/src/configure/routes/tj/audioStreamBleiRoutes/config.js +349 -0
- package/src/configure/routes/tj/audioStreamEngRoutes/config.js +671 -0
- package/src/configure/routes/tj/audioStreamRoutes/config.js +738 -0
- package/src/configure/routes/tj/config.js +257 -0
- package/src/configure/routes/tj/imageRoutes/config.js +1209 -0
- package/src/configure/routes/tj/multiModalRoutes/config.js +92 -0
- package/src/configure/routes/tj/textAlbRoutes/config.js +772 -0
- package/src/configure/routes/tj/textEngRoutes/config.js +780 -0
- package/src/configure/routes/tj/textRoutes/config.js +812 -0
- package/src/configure/routes/tj/videoRoutes/config.js +1705 -0
- package/src/configure/routes/tj/videoStreamAlbRoutes/config.js +1419 -0
- package/src/configure/routes/tj/videoStreamEngRoutes/config.js +1419 -0
- package/src/configure/routes/tj/videoStreamRoutes/config.js +1588 -0
- package/src/configure/routes/tj/webRoutes/config.js +281 -0
- package/src/configure/routes/ts/config.js +942 -0
- package/src/configure/routes/tw/config.js +908 -0
- package/src/configure/routes/twCaptcha/config.js +86 -0
- package/src/configure/routes/twCertifiy/config.js +201 -0
- package/src/configure/routes/twChannel/config.js +125 -0
- package/src/configure/routes/tx/config.js +254 -0
- package/src/contants/account.js +7 -0
- package/src/contants/auth.js +3 -0
- package/src/contants/buildEnv.js +7 -0
- package/src/contants/exportUrl.js +11 -0
- package/src/contants/global.js +78 -0
- package/src/contants/headMenu.jsx +81 -0
- package/src/contants/histroy.js +18 -0
- package/src/contants/i18n.js +24 -0
- package/src/contants/img/bingsheng.png +0 -0
- package/src/contants/img/fengkong.png +0 -0
- package/src/contants/img/index.js +11 -0
- package/src/contants/img/jinjiang.png +0 -0
- package/src/contants/img/xiaodou.png +0 -0
- package/src/contants/imgBlackSimilayOrgs.js +15 -0
- package/src/contants/index.js +673 -0
- package/src/contants/judgeServiceIdType/index.ts +52 -0
- package/src/contants/modelType.js +57 -0
- package/src/contants/operation.js +6 -0
- package/src/contants/organizationMap.js +12 -0
- package/src/contants/pageSize.js +1 -0
- package/src/contants/role.js +5 -0
- package/src/contants/safe.js +8 -0
- package/src/contants/select.js +3 -0
- package/src/contants/serviceId.js +13 -0
- package/src/contants/storage.js +1 -0
- package/src/contants/tokenId.js +25 -0
- package/src/global.jsx +110 -0
- package/src/global.less +237 -0
- package/src/hoc/withIntlComponents.js +30 -0
- package/src/hooks/biz/useColumns.js +273 -0
- package/src/hooks/biz/useColumns.less +14 -0
- package/src/hooks/biz/useDraggable.js +26 -0
- package/src/hooks/biz/useElLanguage.js +22 -0
- package/src/hooks/biz/useHotkeys.js +60 -0
- package/src/hooks/biz/useLanguage.js +44 -0
- package/src/hooks/common/useInterval.js +21 -0
- package/src/hooks/common/useUpload.js +154 -0
- package/src/hooks/common/useUploadClick.js +56 -0
- package/src/hooks/index.js +72 -0
- package/src/hooks/object/useApiCallList.js +87 -0
- package/src/hooks/object/useApiSecretKey.js +88 -0
- package/src/hooks/object/useApp.js +51 -0
- package/src/hooks/object/useAppChannel.js +51 -0
- package/src/hooks/object/useAuthServiceId.ts +52 -0
- package/src/hooks/object/useBill.js +195 -0
- package/src/hooks/object/useChannel.js +121 -0
- package/src/hooks/object/useDataBack.js +165 -0
- package/src/hooks/object/useDetailKeyDown.js +81 -0
- package/src/hooks/object/useDeviceExport.js +57 -0
- package/src/hooks/object/useDeviceTrend.js +97 -0
- package/src/hooks/object/useHistoryExport.js +46 -0
- package/src/hooks/object/useLabel.js +77 -0
- package/src/hooks/object/useMdList.js +251 -0
- package/src/hooks/object/useOpenOrganization.js +34 -0
- package/src/hooks/object/useOpinion.js +27 -0
- package/src/hooks/object/useOrganization.js +47 -0
- package/src/hooks/object/useQueryMethod.js +32 -0
- package/src/hooks/object/useRiskType.js +41 -0
- package/src/hooks/object/useRoleList.js +39 -0
- package/src/hooks/object/useService.js +37 -0
- package/src/hooks/object/useTokenTrend.js +108 -0
- package/src/hooks/object/useTopn.js +0 -0
- package/src/hooks/object/useTwHistory.js +69 -0
- package/src/hooks/object/useUser.js +109 -0
- package/src/layouts/BasicLayout.jsx +155 -0
- package/src/layouts/BlankLayout.jsx +5 -0
- package/src/layouts/CollapsibleMenu.js +196 -0
- package/src/layouts/CollapsibleMenu.less +50 -0
- package/src/layouts/LeftMenu.jsx +264 -0
- package/src/layouts/MenuContext.js +22 -0
- package/src/layouts/SecurityLayout.jsx +329 -0
- package/src/layouts/TabContentLayout.jsx +270 -0
- package/src/layouts/TabContentLayout.less +61 -0
- package/src/layouts/TopMenu.jsx +115 -0
- package/src/layouts/TopSide.jsx +394 -0
- package/src/layouts/TopSide.less +339 -0
- package/src/layouts/TopSideMenuLayout.jsx +203 -0
- package/src/layouts/TopSideMenuLayout.less +81 -0
- package/src/layouts/UserLayout.jsx +59 -0
- package/src/layouts/UserLayout.less +71 -0
- package/src/layouts/constants.js +28 -0
- package/src/locales/basic-US.js +227 -0
- package/src/locales/en-US/component.js +2 -0
- package/src/locales/en-US/globalHeader.js +2 -0
- package/src/locales/en-US/menu.js +2 -0
- package/src/locales/en-US/module/history.js +19 -0
- package/src/locales/en-US/module/md.js +230 -0
- package/src/locales/en-US/product/tw/index.js +33 -0
- package/src/locales/en-US/pwa.js +2 -0
- package/src/locales/en-US/settingDrawer.js +2 -0
- package/src/locales/en-US/settings.js +2 -0
- package/src/locales/en-US.js +762 -0
- package/src/locales/product/md.js +88 -0
- package/src/locales/pt-BR/component.js +5 -0
- package/src/locales/pt-BR/globalHeader.js +18 -0
- package/src/locales/pt-BR/menu.js +52 -0
- package/src/locales/pt-BR/pwa.js +7 -0
- package/src/locales/pt-BR/settingDrawer.js +32 -0
- package/src/locales/pt-BR/settings.js +61 -0
- package/src/locales/pt-BR.js +13 -0
- package/src/locales/request-US.js +28 -0
- package/src/locales/special.js +11 -0
- package/src/locales/tj-US.js +811 -0
- package/src/locales/zh-CN/component.js +2 -0
- package/src/locales/zh-CN/globalHeader.js +2 -0
- package/src/locales/zh-CN/menu.js +2 -0
- package/src/locales/zh-CN/module/history.js +11 -0
- package/src/locales/zh-CN/module/md.js +0 -0
- package/src/locales/zh-CN/product/Information/index.js +2 -0
- package/src/locales/zh-CN/product/celue/index.js +2 -0
- package/src/locales/zh-CN/product/index.js +13 -0
- package/src/locales/zh-CN/product/tj/audio/index.js +2 -0
- package/src/locales/zh-CN/product/tj/audioStream/index.js +2 -0
- package/src/locales/zh-CN/product/tj/image/index.js +2 -0
- package/src/locales/zh-CN/product/tj/index.js +35 -0
- package/src/locales/zh-CN/product/tj/text/index.js +2 -0
- package/src/locales/zh-CN/product/tj/video/index.js +2 -0
- package/src/locales/zh-CN/product/tj/videoStream/index.js +2 -0
- package/src/locales/zh-CN/product/tj/web/index.js +2 -0
- package/src/locales/zh-CN/product/tw/index.js +32 -0
- package/src/locales/zh-CN/product/tx/index.js +2 -0
- package/src/locales/zh-CN/pwa.js +2 -0
- package/src/locales/zh-CN/settingDrawer.js +2 -0
- package/src/locales/zh-CN/settings.js +2 -0
- package/src/locales/zh-CN.js +1493 -0
- package/src/locales/zh-TW/component.js +5 -0
- package/src/locales/zh-TW/globalHeader.js +17 -0
- package/src/locales/zh-TW/menu.js +52 -0
- package/src/locales/zh-TW/pwa.js +6 -0
- package/src/locales/zh-TW/settingDrawer.js +31 -0
- package/src/locales/zh-TW/settings.js +2 -0
- package/src/locales/zh-TW.js +13 -0
- package/src/models/base.js +71 -0
- package/src/models/dataBack.js +51 -0
- package/src/models/global.js +20 -0
- package/src/models/history.js +141 -0
- package/src/models/information.js +27 -0
- package/src/models/login.js +195 -0
- package/src/models/manage.js +214 -0
- package/src/models/mingdan.js +243 -0
- package/src/models/rank.js +25 -0
- package/src/models/riskAccount.js +41 -0
- package/src/models/setting.js +27 -0
- package/src/models/strategy.js +179 -0
- package/src/models/strategyLab.js +84 -0
- package/src/models/trend.js +102 -0
- package/src/models/twChannel.js +50 -0
- package/src/models/user.js +205 -0
- package/src/pages/404.jsx +19 -0
- package/src/pages/Admin.jsx +40 -0
- package/src/pages/IFrame/index.jsx +173 -0
- package/src/pages/Welcome.jsx +48 -0
- package/src/pages/Welcome.less +8 -0
- package/src/pages/account/IntlLogin/index.js +27 -0
- package/src/pages/account/IntlLogin/index.less +26 -0
- package/src/pages/account/components/EmailTwoFactor/index.jsx +94 -0
- package/src/pages/account/components/EmailTwoFactor/index.less +128 -0
- package/src/pages/account/components/Header/index.jsx +66 -0
- package/src/pages/account/components/Header/index.less +62 -0
- package/src/pages/account/components/HeaderList/index.jsx +20 -0
- package/src/pages/account/components/IntlHeader/index.js +43 -0
- package/src/pages/account/components/IntlHeader/index.less +54 -0
- package/src/pages/account/components/IntlLoginLeft/index.jsx +33 -0
- package/src/pages/account/components/IntlLoginLeft/index.less +44 -0
- package/src/pages/account/components/IntlLoginRight/index.js +514 -0
- package/src/pages/account/components/IntlLoginRight/index.less +259 -0
- package/src/pages/account/components/LoginEmail/index.jsx +188 -0
- package/src/pages/account/components/LoginEmail/index.less +105 -0
- package/src/pages/account/components/LoginLeft/index.jsx +73 -0
- package/src/pages/account/components/LoginLeft/index.less +44 -0
- package/src/pages/account/components/LoginModeError/index.js +14 -0
- package/src/pages/account/components/LoginModeError/index.less +14 -0
- package/src/pages/account/components/LoginPhone/index.jsx +230 -0
- package/src/pages/account/components/LoginPhone/index.less +131 -0
- package/src/pages/account/components/LoginRight/index.jsx +560 -0
- package/src/pages/account/components/LoginRight/index.less +172 -0
- package/src/pages/account/components/ResetSuccee/index.jsx +18 -0
- package/src/pages/account/components/ResetSuccee/index.less +29 -0
- package/src/pages/account/components/WscLoginLeft/index.jsx +41 -0
- package/src/pages/account/components/WscLoginLeft/index.less +45 -0
- package/src/pages/account/components/WscLoginRight/index.jsx +252 -0
- package/src/pages/account/components/WscLoginRight/index.less +142 -0
- package/src/pages/account/components/loginLeftList/index.jsx +23 -0
- package/src/pages/account/forgetPwd/index.jsx +111 -0
- package/src/pages/account/forgetPwd/index.less +73 -0
- package/src/pages/account/img/google.png +0 -0
- package/src/pages/account/img/icon-checked.png +0 -0
- package/src/pages/account/img/icon-unchecked.png +0 -0
- package/src/pages/account/img/intl-left-banner.png +0 -0
- package/src/pages/account/img/intlLogo.png +0 -0
- package/src/pages/account/img/intlLogo.svg +14 -0
- package/src/pages/account/img/left-banner-private.png +0 -0
- package/src/pages/account/img/left-banner.png +0 -0
- package/src/pages/account/img/logo.png +0 -0
- package/src/pages/account/img/newLogo.png +0 -0
- package/src/pages/account/index.js +17 -0
- package/src/pages/account/intlForgetPwd/index.js +70 -0
- package/src/pages/account/intlForgetPwd/index.less +87 -0
- package/src/pages/account/intlResetPwd/index.js +212 -0
- package/src/pages/account/intlResetPwd/index.less +122 -0
- package/src/pages/account/login/index.jsx +153 -0
- package/src/pages/account/login/index.less +35 -0
- package/src/pages/account/resetPwd/index.jsx +145 -0
- package/src/pages/account/resetPwd/index.less +109 -0
- package/src/pages/audit/auditLog/fieldsConfig.ts +22 -0
- package/src/pages/audit/auditLog/formatDetailData.ts +46 -0
- package/src/pages/audit/auditLog/index.less +22 -0
- package/src/pages/audit/auditLog/index.tsx +183 -0
- package/src/pages/audit/auditLog/searchFormConfig.tsx +91 -0
- package/src/pages/audit/auditLog/tableConfig.tsx +79 -0
- package/src/pages/audit/components/AuditDetailDrawer/index.less +27 -0
- package/src/pages/audit/components/AuditDetailDrawer/index.tsx +105 -0
- package/src/pages/audit/components/AuditLabelSearch/index.less +11 -0
- package/src/pages/audit/components/AuditLabelSearch/index.tsx +103 -0
- package/src/pages/audit/hooks/useAuditAction.ts +54 -0
- package/src/pages/audit/hooks/useAuditLog.ts +40 -0
- package/src/pages/audit/type.ts +65 -0
- package/src/pages/basic/AccountList/index.js +69 -0
- package/src/pages/basic/AccountList/index.less +37 -0
- package/src/pages/basic/components/BasicTitle/index.jsx +31 -0
- package/src/pages/basic/components/BasicTitle/index.less +16 -0
- package/src/pages/basic/constants.js +731 -0
- package/src/pages/basic/hooks/index.js +21 -0
- package/src/pages/basic/hooks/useAppChannel.js +50 -0
- package/src/pages/basic/hooks/useBasicApiCallList.js +67 -0
- package/src/pages/basic/hooks/useBasicApiSecretKey.js +62 -0
- package/src/pages/basic/hooks/useBasicUser.js +256 -0
- package/src/pages/basic/hooks/useBasicsChannel.js +43 -0
- package/src/pages/basic/hooks/useBasicsObject.js +149 -0
- package/src/pages/basic/list/index.jsx +326 -0
- package/src/pages/basic/list/index.less +62 -0
- package/src/pages/configure/tj/md/list/index.js +612 -0
- package/src/pages/configure/tj/rank/detail/index.js +0 -0
- package/src/pages/configure/tj/rank/list/index.js +1157 -0
- package/src/pages/constants.js +73 -0
- package/src/pages/document.ejs +102 -0
- package/src/pages/historySearch/constants.js +262 -0
- package/src/pages/historySearch/index.jsx +1217 -0
- package/src/pages/historySearch/index.less +0 -0
- package/src/pages/information/constants.js +70 -0
- package/src/pages/information/img/blue.png +0 -0
- package/src/pages/information/img/red.png +0 -0
- package/src/pages/information/img/yellow.png +0 -0
- package/src/pages/information/record/index.jsx +155 -0
- package/src/pages/information/trend/index.jsx +24 -0
- package/src/pages/manage/correctionCallback/index.jsx +440 -0
- package/src/pages/manage/correctionCallback/index.less +22 -0
- package/src/pages/manage/fieldsManage/components/FieldsManage/index.js +148 -0
- package/src/pages/manage/fieldsManage/components/FieldsManage/index.less +13 -0
- package/src/pages/manage/fieldsManage/components/PageTemplate/index.js +149 -0
- package/src/pages/manage/fieldsManage/components/SelectSuffix/index.js +86 -0
- package/src/pages/manage/fieldsManage/components/SelectSuffix/index.less +13 -0
- package/src/pages/manage/fieldsManage/components/TableTitle/index.js +24 -0
- package/src/pages/manage/fieldsManage/components/TableTitle/index.less +22 -0
- package/src/pages/manage/fieldsManage/components/index.js +14 -0
- package/src/pages/manage/fieldsManage/constants/index.js +462 -0
- package/src/pages/manage/fieldsManage/field/add/index.js +171 -0
- package/src/pages/manage/fieldsManage/field/add/index.less +37 -0
- package/src/pages/manage/fieldsManage/field/index.js +66 -0
- package/src/pages/manage/fieldsManage/field/index.less +9 -0
- package/src/pages/manage/fieldsManage/fieldSet/add/index.js +350 -0
- package/src/pages/manage/fieldsManage/fieldSet/add/index.less +42 -0
- package/src/pages/manage/fieldsManage/fieldSet/index.js +187 -0
- package/src/pages/manage/pageSetup/logo/index.js +220 -0
- package/src/pages/manage/pageSetup/logo/index.less +35 -0
- package/src/pages/manage/password/index.jsx +225 -0
- package/src/pages/manage/password/index.less +188 -0
- package/src/pages/manage/qpsError/Trend/getSearchFormConfig.jsx +131 -0
- package/src/pages/manage/qpsError/Trend/index.jsx +226 -0
- package/src/pages/manage/qpsError/Trend/index.less +41 -0
- package/src/pages/manage/qpsError/Trend/useAuthServiceId.js +43 -0
- package/src/pages/manage/qpsError/Trend/useQpsError.js +105 -0
- package/src/pages/manage/qpsError/formatSubmitParams.js +21 -0
- package/src/pages/manage/qpsTrend/formatSearchParams.ts +24 -0
- package/src/pages/manage/qpsTrend/hooks/useQps.ts +117 -0
- package/src/pages/manage/qpsTrend/index.less +0 -0
- package/src/pages/manage/qpsTrend/index.tsx +284 -0
- package/src/pages/manage/qpsTrend/searchFormConfig.ts +117 -0
- package/src/pages/manage/qpsTrend/type.ts +9 -0
- package/src/pages/manage/safe/index.jsx +86 -0
- package/src/pages/manage/safe/index.less +58 -0
- package/src/pages/manage/safe/loginMethod/index.jsx +15 -0
- package/src/pages/manage/safe/loginMethod/index.less +0 -0
- package/src/pages/manage/safe/useSafe.js +143 -0
- package/src/pages/manage/safe/waterMark/index.jsx +15 -0
- package/src/pages/manage/safe/waterMark/index.less +0 -0
- package/src/pages/message/index.jsx +139 -0
- package/src/pages/message/index.less +75 -0
- package/src/pages/opinion/index.jsx +179 -0
- package/src/pages/opinion/index.less +141 -0
- package/src/pages/overview/components/ApplyModal/constants.js +78 -0
- package/src/pages/overview/components/ApplyModal/index.jsx +135 -0
- package/src/pages/overview/components/ApplyModal/index.less +41 -0
- package/src/pages/overview/components/CarouselMap/img/en-aigc.jpg +0 -0
- package/src/pages/overview/components/CarouselMap/img/en-intelligent.jpg +0 -0
- package/src/pages/overview/components/CarouselMap/img/image1.png +0 -0
- package/src/pages/overview/components/CarouselMap/img/image2.jpg +0 -0
- package/src/pages/overview/components/CarouselMap/img/image3.jpg +0 -0
- package/src/pages/overview/components/CarouselMap/img/image4.jpg +0 -0
- package/src/pages/overview/components/CarouselMap/index.jsx +67 -0
- package/src/pages/overview/components/CarouselMap/index.less +11 -0
- package/src/pages/overview/components/DataCard/index.jsx +60 -0
- package/src/pages/overview/components/DataCard/index.less +107 -0
- package/src/pages/overview/components/EmptyLineChart/index.jsx +50 -0
- package/src/pages/overview/components/EmptyLineChart/index.less +29 -0
- package/src/pages/overview/components/IntroduceBox/constants.js +96 -0
- package/src/pages/overview/components/IntroduceBox/img/anti-theft-crawling.svg +19 -0
- package/src/pages/overview/components/IntroduceBox/img/audio.svg +20 -0
- package/src/pages/overview/components/IntroduceBox/img/brush-list-protection.svg +18 -0
- package/src/pages/overview/components/IntroduceBox/img/captcha.svg +14 -0
- package/src/pages/overview/components/IntroduceBox/img/channel-traffic.svg +17 -0
- package/src/pages/overview/components/IntroduceBox/img/device-risk-sdk.svg +16 -0
- package/src/pages/overview/components/IntroduceBox/img/market-activity.svg +20 -0
- package/src/pages/overview/components/IntroduceBox/img/payment-risk-control.svg +17 -0
- package/src/pages/overview/components/IntroduceBox/img/pic.svg +16 -0
- package/src/pages/overview/components/IntroduceBox/img/text.svg +20 -0
- package/src/pages/overview/components/IntroduceBox/img/video.svg +16 -0
- package/src/pages/overview/components/IntroduceBox/img/virtual-user-fission.svg +25 -0
- package/src/pages/overview/components/IntroduceBox/index.jsx +155 -0
- package/src/pages/overview/components/IntroduceBox/index.less +75 -0
- package/src/pages/overview/components/NewUserGuide/img/apply.png +0 -0
- package/src/pages/overview/components/NewUserGuide/img/guide.png +0 -0
- package/src/pages/overview/components/NewUserGuide/img/guideCopy.png +0 -0
- package/src/pages/overview/components/NewUserGuide/img/open.png +0 -0
- package/src/pages/overview/components/NewUserGuide/img/phone.png +0 -0
- package/src/pages/overview/components/NewUserGuide/img/user.png +0 -0
- package/src/pages/overview/components/NewUserGuide/index.jsx +114 -0
- package/src/pages/overview/components/NewUserGuide/index.less +158 -0
- package/src/pages/overview/components/UserInfoBox/img/app-manage-dark.svg +16 -0
- package/src/pages/overview/components/UserInfoBox/img/app-manage-light.svg +16 -0
- package/src/pages/overview/components/UserInfoBox/img/channel-manage-dark.svg +24 -0
- package/src/pages/overview/components/UserInfoBox/img/channel-manage-light.svg +26 -0
- package/src/pages/overview/components/UserInfoBox/img/user-account-dark.svg +30 -0
- package/src/pages/overview/components/UserInfoBox/img/user-account-light.svg +30 -0
- package/src/pages/overview/components/UserInfoBox/img/user-manage-dark.svg +20 -0
- package/src/pages/overview/components/UserInfoBox/img/user-manage-light.svg +20 -0
- package/src/pages/overview/components/UserInfoBox/img/user.svg +43 -0
- package/src/pages/overview/components/UserInfoBox/index.jsx +139 -0
- package/src/pages/overview/components/UserInfoBox/index.less +117 -0
- package/src/pages/overview/img/risk-account.svg +21 -0
- package/src/pages/overview/img/risk-audio.svg +25 -0
- package/src/pages/overview/img/risk-device.svg +24 -0
- package/src/pages/overview/img/risk-event.svg +21 -0
- package/src/pages/overview/img/risk-pic.svg +21 -0
- package/src/pages/overview/img/risk-text.svg +25 -0
- package/src/pages/overview/img/risk-video.svg +29 -0
- package/src/pages/overview/index.jsx +841 -0
- package/src/pages/overview/index.less +107 -0
- package/src/pages/pageComponents/RankPageTwo/constants.js +106 -0
- package/src/pages/pageComponents/RankPageTwo/index.jsx +606 -0
- package/src/pages/pageComponents/RankPageTwo/index.less +30 -0
- package/src/pages/pageComponents/StrategyPage/components/AddRuleMdoal/index.js +81 -0
- package/src/pages/pageComponents/StrategyPage/components/AddRuleMdoal/index.less +4 -0
- package/src/pages/pageComponents/StrategyPage/components/BatchUpdateModal/index.js +48 -0
- package/src/pages/pageComponents/StrategyPage/components/BatchUpdateModal/index.less +0 -0
- package/src/pages/pageComponents/StrategyPage/components/OneKeyLabModal/index.js +303 -0
- package/src/pages/pageComponents/StrategyPage/components/OneKeyLabModal/index.less +46 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleCollapse/index.js +1554 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleCollapse/index.less +56 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleConditions/ConditionContent/index.jsx +60 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleConditions/ConditionItem/index.jsx +189 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleConditions/ConditionItem/index.less +11 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleConditions/index.jsx +67 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleConditions/index.less +71 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleModal/index.js +243 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleModal/index.less +13 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleModalCustomer/index.js +244 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleModalCustomer/index.less +13 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleTable/index.js +15 -0
- package/src/pages/pageComponents/StrategyPage/components/RuleTable/index.less +36 -0
- package/src/pages/pageComponents/StrategyPage/components/customBlackFields/index.less +16 -0
- package/src/pages/pageComponents/StrategyPage/components/customBlackFields/index.tsx +106 -0
- package/src/pages/pageComponents/StrategyPage/contants.js +2000 -0
- package/src/pages/pageComponents/StrategyPage/index.js +864 -0
- package/src/pages/pageComponents/StrategyPage/index.less +95 -0
- package/src/pages/pageComponents/configure/adminApply.js +72 -0
- package/src/pages/pageComponents/configure/index.js +5 -0
- package/src/pages/pageComponents/formatMdListByAppId.js +39 -0
- package/src/pages/pageComponents/historyPage/CaptchaList/index.jsx +1235 -0
- package/src/pages/pageComponents/historyPage/CaptchaList/index.less +43 -0
- package/src/pages/pageComponents/historyPage/ChannelList/index.jsx +1340 -0
- package/src/pages/pageComponents/historyPage/ChannelList/index.less +134 -0
- package/src/pages/pageComponents/historyPage/ChannelRetain/index.jsx +666 -0
- package/src/pages/pageComponents/historyPage/ChannelRetain/index.less +40 -0
- package/src/pages/pageComponents/historyPage/DisposalModal/index.js +46 -0
- package/src/pages/pageComponents/historyPage/DisposalModal/index.less +17 -0
- package/src/pages/pageComponents/historyPage/MultiContentsRender/index.jsx +20 -0
- package/src/pages/pageComponents/historyPage/TwDetail/export.js +233 -0
- package/src/pages/pageComponents/historyPage/TwDetail/export.less +120 -0
- package/src/pages/pageComponents/historyPage/TwDetail/helper.js +794 -0
- package/src/pages/pageComponents/historyPage/TwDetail/index.jsx +427 -0
- package/src/pages/pageComponents/historyPage/TwDetail/index.less +63 -0
- package/src/pages/pageComponents/historyPage/TwNewDetail/export.js +231 -0
- package/src/pages/pageComponents/historyPage/TwNewDetail/export.less +120 -0
- package/src/pages/pageComponents/historyPage/TwNewDetail/helper.js +815 -0
- package/src/pages/pageComponents/historyPage/TwNewDetail/index.jsx +363 -0
- package/src/pages/pageComponents/historyPage/TwNewDetail/index.less +63 -0
- package/src/pages/pageComponents/historyPage/TypeOne/constants.js +195 -0
- package/src/pages/pageComponents/historyPage/TypeOne/index.jsx +2792 -0
- package/src/pages/pageComponents/historyPage/TypeOne/index.less +146 -0
- package/src/pages/pageComponents/historyPage/TypeThree/constants.js +29 -0
- package/src/pages/pageComponents/historyPage/TypeThree/index.jsx +2158 -0
- package/src/pages/pageComponents/historyPage/TypeThree/index.less +192 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/components/Fields/constant.js +11 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/components/Fields/index.jsx +261 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/components/Fields/styles.less +79 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/components/ImgSlider/index.jsx +99 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/components/ImgSlider/styles.less +64 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/components/ImgSliderDetail/index.jsx +113 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/components/ImgSliderDetail/styles.less +14 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/components/ImgTable/index.jsx +197 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/components/ImgTable/styles.less +52 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/constants.js +32 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/index.jsx +2225 -0
- package/src/pages/pageComponents/historyPage/TypeTwo/index.less +237 -0
- package/src/pages/pageComponents/historyPage/components/AddFilterDom/index.jsx +0 -0
- package/src/pages/pageComponents/historyPage/components/AddListModal/index.jsx +148 -0
- package/src/pages/pageComponents/historyPage/components/AddListModal/index.less +54 -0
- package/src/pages/pageComponents/historyPage/components/AddTextMdModal/constants.js +50 -0
- package/src/pages/pageComponents/historyPage/components/AddTextMdModal/index.jsx +233 -0
- package/src/pages/pageComponents/historyPage/components/AddTextMdModal/index.less +64 -0
- package/src/pages/pageComponents/historyPage/components/ExportTask/index.jsx +707 -0
- package/src/pages/pageComponents/historyPage/components/ExportTask/styles.less +120 -0
- package/src/pages/pageComponents/historyPage/components/FeedbackContent/index.jsx +463 -0
- package/src/pages/pageComponents/historyPage/components/FeedbackContent/index.less +47 -0
- package/src/pages/pageComponents/historyPage/components/FeedbackPanel/constants.js +1 -0
- package/src/pages/pageComponents/historyPage/components/FeedbackPanel/index.jsx +135 -0
- package/src/pages/pageComponents/historyPage/components/FeedbackPanel/styles.less +60 -0
- package/src/pages/pageComponents/historyPage/components/GroupFilter/index.js +378 -0
- package/src/pages/pageComponents/historyPage/components/GroupFilter/index.less +178 -0
- package/src/pages/pageComponents/historyPage/components/GroupFilter/type.ts +16 -0
- package/src/pages/pageComponents/historyPage/components/HistoryDetailDrawer/index.jsx +716 -0
- package/src/pages/pageComponents/historyPage/components/HistoryDetailDrawer/index.less +102 -0
- package/src/pages/pageComponents/historyPage/components/HistoryDetailDrawer/rgba.png +0 -0
- package/src/pages/pageComponents/historyPage/components/HistoryExport/export.png +0 -0
- package/src/pages/pageComponents/historyPage/components/HistoryExport/index.jsx +29 -0
- package/src/pages/pageComponents/historyPage/components/HistoryExport/index.less +21 -0
- package/src/pages/pageComponents/historyPage/components/ImgSimilar/index.js +124 -0
- package/src/pages/pageComponents/historyPage/components/ImgSimilar/index.less +130 -0
- package/src/pages/pageComponents/historyPage/components/ImgTextDetail/index.js +164 -0
- package/src/pages/pageComponents/historyPage/components/ImgTextDetail/index.less +75 -0
- package/src/pages/pageComponents/historyPage/components/NewHistoryDetailDrawer/formatSpecialFeature.ts +20 -0
- package/src/pages/pageComponents/historyPage/components/NewHistoryDetailDrawer/index.js +959 -0
- package/src/pages/pageComponents/historyPage/components/NewHistoryDetailDrawer/index.less +61 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/components/RiskInfo/index.less +26 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/components/RiskInfo/index.tsx +38 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/components/renderStreamAudios/index.less +18 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/components/renderStreamAudios/index.tsx +40 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/components/renderStreamImages/index.less +21 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/components/renderStreamImages/index.tsx +48 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/fieldsConfig.ts +9 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/hooks/useStreamInfo.ts +49 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/index.less +11 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/index.tsx +101 -0
- package/src/pages/pageComponents/historyPage/components/StreamInfoModal/tableColumns.tsx +51 -0
- package/src/pages/pageComponents/historyPage/components/TJExportTask/components/HistoryTaskDetail/index.jsx +41 -0
- package/src/pages/pageComponents/historyPage/components/TJExportTask/components/HistoryTaskDetail/index.less +22 -0
- package/src/pages/pageComponents/historyPage/components/TJExportTask/components/TJExportForm/index.jsx +73 -0
- package/src/pages/pageComponents/historyPage/components/TJExportTask/components/TJExportForm/index.less +0 -0
- package/src/pages/pageComponents/historyPage/components/TJExportTask/constants.js +487 -0
- package/src/pages/pageComponents/historyPage/components/TJExportTask/getExportForm.js +103 -0
- package/src/pages/pageComponents/historyPage/components/TJExportTask/index.jsx +309 -0
- package/src/pages/pageComponents/historyPage/components/TJExportTask/styles.less +142 -0
- package/src/pages/pageComponents/historyPage/components/contentRender/index.jsx +34 -0
- package/src/pages/pageComponents/historyPage/components/index.js +33 -0
- package/src/pages/pageComponents/historyPage/constants.js +611 -0
- package/src/pages/pageComponents/historyPage/help.js +224 -0
- package/src/pages/pageComponents/hooks/index.js +14 -0
- package/src/pages/pageComponents/hooks/index.less +10 -0
- package/src/pages/pageComponents/hooks/useForm.js +113 -0
- package/src/pages/pageComponents/hooks/useGetStorageTime/index.js +24 -0
- package/src/pages/pageComponents/hooks/useTableColumn.js +136 -0
- package/src/pages/pageComponents/mdPage/components/AddMdModal/index.jsx +240 -0
- package/src/pages/pageComponents/mdPage/components/AddMdModal/index.less +25 -0
- package/src/pages/pageComponents/mdPage/components/AddVideoModal/index.jsx +113 -0
- package/src/pages/pageComponents/mdPage/components/AddVideoModal/index.less +33 -0
- package/src/pages/pageComponents/mdPage/components/CreateMdForm/index.jsx +1205 -0
- package/src/pages/pageComponents/mdPage/components/CreateMdForm/index.less +140 -0
- package/src/pages/pageComponents/mdPage/components/ExpansionTable/index.js +150 -0
- package/src/pages/pageComponents/mdPage/components/ExpansionTable/index.less +9 -0
- package/src/pages/pageComponents/mdPage/components/MdContentImportModal/index.jsx +218 -0
- package/src/pages/pageComponents/mdPage/components/MdContentImportModal/index.less +11 -0
- package/src/pages/pageComponents/mdPage/components/MdContentModal/index.jsx +288 -0
- package/src/pages/pageComponents/mdPage/components/MdContentModal/index.less +11 -0
- package/src/pages/pageComponents/mdPage/components/RedTextViewer/index.jsx +33 -0
- package/src/pages/pageComponents/mdPage/components/RedTextViewer/index.less +4 -0
- package/src/pages/pageComponents/mdPage/components/RegexContents/img/example.png +0 -0
- package/src/pages/pageComponents/mdPage/components/RegexContents/index.js +1154 -0
- package/src/pages/pageComponents/mdPage/components/RegexContents/index.less +404 -0
- package/src/pages/pageComponents/mdPage/components/SMAdminForm/index.jsx +165 -0
- package/src/pages/pageComponents/mdPage/components/SMAdminForm/index.less +17 -0
- package/src/pages/pageComponents/mdPage/components/SMDatePicker/index.jsx +173 -0
- package/src/pages/pageComponents/mdPage/components/SMPopConfirm/img/tip.png +0 -0
- package/src/pages/pageComponents/mdPage/components/SMPopConfirm/index.jsx +116 -0
- package/src/pages/pageComponents/mdPage/components/SMPopConfirm/index.less +64 -0
- package/src/pages/pageComponents/mdPage/components/SegmentStatusTag/index.tsx +45 -0
- package/src/pages/pageComponents/mdPage/components/SensitivewordHintList/index.jsx +467 -0
- package/src/pages/pageComponents/mdPage/components/SensitivewordHintList/index.less +65 -0
- package/src/pages/pageComponents/mdPage/components/SensitivewordHintModal/index.jsx +80 -0
- package/src/pages/pageComponents/mdPage/components/SensitivewordHintModal/index.less +38 -0
- package/src/pages/pageComponents/mdPage/components/UpdateMdModal/index.jsx +929 -0
- package/src/pages/pageComponents/mdPage/components/UpdateMdModal/index.less +10 -0
- package/src/pages/pageComponents/mdPage/components/UploadImg/index.jsx +178 -0
- package/src/pages/pageComponents/mdPage/components/UploadImg/index.less +66 -0
- package/src/pages/pageComponents/mdPage/components/UploadVideo/index.jsx +409 -0
- package/src/pages/pageComponents/mdPage/components/UploadVideo/index.less +134 -0
- package/src/pages/pageComponents/mdPage/components/getIllegalWordList.jsx +14 -0
- package/src/pages/pageComponents/mdPage/components/isIllegalWord.jsx +8 -0
- package/src/pages/pageComponents/mdPage/constants.js +770 -0
- package/src/pages/pageComponents/mdPage/list/CommonType/contants.js +114 -0
- package/src/pages/pageComponents/mdPage/list/CommonType/index.jsx +2177 -0
- package/src/pages/pageComponents/mdPage/list/CommonType/index.less +21 -0
- package/src/pages/pageComponents/mdPage/listContent/CommonType/img/tip.png +0 -0
- package/src/pages/pageComponents/mdPage/listContent/CommonType/index.jsx +1584 -0
- package/src/pages/pageComponents/mdPage/listContent/CommonType/index.less +124 -0
- package/src/pages/pageComponents/mdPage/listContent/ImgBlackType/img/tip.png +0 -0
- package/src/pages/pageComponents/mdPage/listContent/ImgBlackType/index.jsx +1053 -0
- package/src/pages/pageComponents/mdPage/listContent/ImgBlackType/index.less +142 -0
- package/src/pages/pageComponents/mdPage/listContent/ImgType/img/tip.png +0 -0
- package/src/pages/pageComponents/mdPage/listContent/ImgType/index.jsx +1185 -0
- package/src/pages/pageComponents/mdPage/listContent/ImgType/index.less +135 -0
- package/src/pages/pageComponents/mdPage/listContent/TextBlackType/img/tip.png +0 -0
- package/src/pages/pageComponents/mdPage/listContent/TextBlackType/index.jsx +1184 -0
- package/src/pages/pageComponents/mdPage/listContent/TextBlackType/index.less +104 -0
- package/src/pages/pageComponents/mdPage/listContentOpLog/CommonType/contants.js +24 -0
- package/src/pages/pageComponents/mdPage/listContentOpLog/CommonType/index.jsx +569 -0
- package/src/pages/pageComponents/mdPage/listContentOpLog/CommonType/index.less +7 -0
- package/src/pages/pageComponents/mdPage/listOpLog/CommonType/index.jsx +897 -0
- package/src/pages/pageComponents/mdPage/listOpLog/CommonType/index.less +11 -0
- package/src/pages/pageComponents/mdPage/listSearch/CommonType/index.jsx +696 -0
- package/src/pages/pageComponents/mdPage/listSearch/CommonType/index.less +16 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/ExtraButton/index.jsx +20 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/ExtraButton/index.less +15 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdContentTip/index.jsx +73 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdContentTip/index.less +16 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdLabel/index.jsx +18 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdLabel/index.less +9 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdTagSelect/defaultIcon.png +0 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdTagSelect/index.jsx +204 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdTagSelect/index.less +88 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdTagSelect/intlDefaultIcon.png +0 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdTimeInput/index.jsx +32 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/MdTimeInput/index.less +13 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/TabsImg/index.jsx +50 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/TabsImg/index.less +11 -0
- package/src/pages/pageComponents/newMdPage/NewList/components/index.js +15 -0
- package/src/pages/pageComponents/newMdPage/NewList/configure.js +179 -0
- package/src/pages/pageComponents/newMdPage/NewList/constants.js +2508 -0
- package/src/pages/pageComponents/newMdPage/NewList/getSubmitOperationSegmentStatus.js +41 -0
- package/src/pages/pageComponents/newMdPage/NewList/getUpdateOperationSegmentStatus.js +26 -0
- package/src/pages/pageComponents/newMdPage/NewList/index.jsx +761 -0
- package/src/pages/pageComponents/newMdPage/NewList/index.less +46 -0
- package/src/pages/pageComponents/newMdPage/components/CreateMdForm/index.jsx +82 -0
- package/src/pages/pageComponents/newMdPage/components/CreateMdForm/index.less +28 -0
- package/src/pages/pageComponents/newMdPage/components/MdFormV2/index.jsx +190 -0
- package/src/pages/pageComponents/newMdPage/components/MdFormV2/index.less +43 -0
- package/src/pages/pageComponents/newMdPage/list/constants.js +18 -0
- package/src/pages/pageComponents/newMdPage/list/index.jsx +465 -0
- package/src/pages/pageComponents/newMdPage/list/index.less +26 -0
- package/src/pages/pageComponents/newMdPage/listContent/index.jsx +0 -0
- package/src/pages/pageComponents/newMdPage/listContent/index.less +0 -0
- package/src/pages/pageComponents/newMdPage/listContentOplog/index.jsx +0 -0
- package/src/pages/pageComponents/newMdPage/listContentOplog/index.less +0 -0
- package/src/pages/pageComponents/newMdPage/listOplog/index.jsx +0 -0
- package/src/pages/pageComponents/newMdPage/listOplog/index.less +0 -0
- package/src/pages/pageComponents/rankPage/SensitiveRank/index.jsx +592 -0
- package/src/pages/pageComponents/rankPage/SensitiveRank/index.less +17 -0
- package/src/pages/pageComponents/riskAccount/img/tip.png +0 -0
- package/src/pages/pageComponents/riskAccount/index.jsx +568 -0
- package/src/pages/pageComponents/riskAccount/index.less +104 -0
- package/src/pages/pageComponents/trendPage/CaptchRisk/index.jsx +564 -0
- package/src/pages/pageComponents/trendPage/CaptchSecond/index.jsx +517 -0
- package/src/pages/pageComponents/trendPage/ChannelRisk/index.jsx +533 -0
- package/src/pages/pageComponents/trendPage/TwNewTrend/configure.js +88 -0
- package/src/pages/pageComponents/trendPage/TwNewTrend/index.jsx +274 -0
- package/src/pages/pageComponents/trendPage/TwNewTrend/index.less +11 -0
- package/src/pages/pageComponents/trendPage/TwTrend/configure.js +128 -0
- package/src/pages/pageComponents/trendPage/TwTrend/index.jsx +130 -0
- package/src/pages/pageComponents/trendPage/TwTrend/index.less +11 -0
- package/src/pages/pageComponents/trendPage/TypeFour/contants.js +119 -0
- package/src/pages/pageComponents/trendPage/TypeFour/index.jsx +527 -0
- package/src/pages/pageComponents/trendPage/TypeOne/index.jsx +1474 -0
- package/src/pages/pageComponents/trendPage/TypeThree/index.jsx +676 -0
- package/src/pages/pageComponents/trendPage/TypeTwo/index.jsx +772 -0
- package/src/pages/pageComponents/trendPage/helper.js +80 -0
- package/src/pages/pageComponents/trendPage/hooks/useLineChart.js +45 -0
- package/src/pages/pageComponents/trendPage/trend.less +28 -0
- package/src/pages/pageComponents/typeErrorCorrection/TypeErrorPage.js +657 -0
- package/src/pages/pageComponents/typeErrorCorrection/constants.js +1017 -0
- package/src/pages/pageComponents/typeErrorCorrection/index.jsx +1090 -0
- package/src/pages/pageComponents/typeErrorCorrection/index.less +76 -0
- package/src/pages/payment/common/index.js +635 -0
- package/src/pages/payment/components/SMBillCard/index.js +102 -0
- package/src/pages/payment/components/SMBillCard/index.less +76 -0
- package/src/pages/payment/components/SMExport/index.js +43 -0
- package/src/pages/payment/components/SMExport/index.less +15 -0
- package/src/pages/payment/components/SMTimeRange/index.js +31 -0
- package/src/pages/payment/components/SMTimeRange/index.less +22 -0
- package/src/pages/payment/components/index.js +14 -0
- package/src/pages/payment/contants.js +107 -0
- package/src/pages/payment/index.less +160 -0
- package/src/pages/payment/manual/index.js +190 -0
- package/src/pages/payment/manual/index.less +11 -0
- package/src/pages/payment/options.js +686 -0
- package/src/pages/riskyMember/three.js +438 -0
- package/src/pages/riskyMember/three.less +80 -0
- package/src/pages/tj/audioStream/errorCorrection/list/index.jsx +8 -0
- package/src/pages/tj/audioStream/errorCorrection/missReason/index.jsx +26 -0
- package/src/pages/tj/audioStream/errorCorrection/trend/index.jsx +19 -0
- package/src/pages/tj/audioStream/history/audioClips/index.jsx +62 -0
- package/src/pages/tj/audioStream/history/audioStream/index.jsx +240 -0
- package/src/pages/tj/audioStream/history/constants.js +401 -0
- package/src/pages/tj/audioStream/list/blackWhite/company/list/contants.js +80 -0
- package/src/pages/tj/audioStream/list/blackWhite/company/list/index.jsx +229 -0
- package/src/pages/tj/audioStream/list/blackWhite/company/listContent/index.jsx +27 -0
- package/src/pages/tj/audioStream/list/blackWhite/company/listContentOpLog/index.jsx +25 -0
- package/src/pages/tj/audioStream/list/blackWhite/company/listOpLog/index.jsx +120 -0
- package/src/pages/tj/audioStream/list/blackWhite/company/listRepetition/index.jsx +20 -0
- package/src/pages/tj/audioStream/list/blackWhite/custom/list/contants.js +66 -0
- package/src/pages/tj/audioStream/list/blackWhite/custom/list/index.jsx +227 -0
- package/src/pages/tj/audioStream/list/blackWhite/custom/listContent/index.jsx +26 -0
- package/src/pages/tj/audioStream/list/blackWhite/custom/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/audioStream/list/blackWhite/custom/listOpLog/index.jsx +118 -0
- package/src/pages/tj/audioStream/list/blackWhite/custom/listRepetition/index.jsx +19 -0
- package/src/pages/tj/audioStream/list/blackWhite/global/list/contants.js +73 -0
- package/src/pages/tj/audioStream/list/blackWhite/global/list/index.jsx +164 -0
- package/src/pages/tj/audioStream/list/blackWhite/global/listContent/index.jsx +28 -0
- package/src/pages/tj/audioStream/list/blackWhite/global/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/audioStream/list/blackWhite/global/listOpLog/index.jsx +120 -0
- package/src/pages/tj/audioStream/list/blackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tj/audioStream/list/text/black/listContent/index.jsx +27 -0
- package/src/pages/tj/audioStream/list/text/black/listContentOpLog/index.jsx +26 -0
- package/src/pages/tj/audioStream/list/text/black/listRepetition/index.jsx +16 -0
- package/src/pages/tj/audioStream/list/text/company/list/contants.js +101 -0
- package/src/pages/tj/audioStream/list/text/company/list/index.jsx +403 -0
- package/src/pages/tj/audioStream/list/text/company/listContent/index.jsx +26 -0
- package/src/pages/tj/audioStream/list/text/company/listContent/listRepetition/index.jsx +17 -0
- package/src/pages/tj/audioStream/list/text/company/listContentOpLog/index.jsx +25 -0
- package/src/pages/tj/audioStream/list/text/company/listOpLog/index.jsx +120 -0
- package/src/pages/tj/audioStream/list/text/company/listRepetition/index.jsx +17 -0
- package/src/pages/tj/audioStream/list/text/custom/list/contants.js +87 -0
- package/src/pages/tj/audioStream/list/text/custom/list/index.jsx +323 -0
- package/src/pages/tj/audioStream/list/text/custom/listContent/index.jsx +26 -0
- package/src/pages/tj/audioStream/list/text/custom/listContent/listRepetition/index.jsx +17 -0
- package/src/pages/tj/audioStream/list/text/custom/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/audioStream/list/text/custom/listOpLog/index.jsx +111 -0
- package/src/pages/tj/audioStream/list/text/custom/listRepetition/index.jsx +17 -0
- package/src/pages/tj/audioStream/list/text/global/list/contants.js +94 -0
- package/src/pages/tj/audioStream/list/text/global/list/index.jsx +301 -0
- package/src/pages/tj/audioStream/list/text/global/listContent/index.jsx +28 -0
- package/src/pages/tj/audioStream/list/text/global/listContentOpLog/index.jsx +25 -0
- package/src/pages/tj/audioStream/list/text/global/listOpLog/index.jsx +109 -0
- package/src/pages/tj/audioStream/list/text/listSearch/index.jsx +19 -0
- package/src/pages/tj/audioStream/rank/audioSensitiveWord/index.jsx +18 -0
- package/src/pages/tj/audioStream/trend/audioClips/index.jsx +59 -0
- package/src/pages/tj/audioStream/trend/audioStream/index.jsx +76 -0
- package/src/pages/tj/blackWhite/contants.js +112 -0
- package/src/pages/tj/blackWhite/list/index.jsx +224 -0
- package/src/pages/tj/blackWhite/listContent/index.jsx +24 -0
- package/src/pages/tj/blackWhite/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/blackWhite/listOpLog/index.jsx +66 -0
- package/src/pages/tj/blackWhite/listRepetition/index.jsx +15 -0
- package/src/pages/tj/blackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tj/components/BatchDisplay/index.jsx +107 -0
- package/src/pages/tj/components/BatchDisplay/index.less +39 -0
- package/src/pages/tj/components/CheckItemPage/index.jsx +278 -0
- package/src/pages/tj/components/CheckTaskPage/constants.js +98 -0
- package/src/pages/tj/components/CheckTaskPage/img/0.png +0 -0
- package/src/pages/tj/components/CheckTaskPage/img/1.png +0 -0
- package/src/pages/tj/components/CheckTaskPage/img/2.png +0 -0
- package/src/pages/tj/components/CheckTaskPage/img/4.png +0 -0
- package/src/pages/tj/components/CheckTaskPage/img/5.png +0 -0
- package/src/pages/tj/components/CheckTaskPage/img/index.js +13 -0
- package/src/pages/tj/components/CheckTaskPage/index.jsx +627 -0
- package/src/pages/tj/components/CheckTaskPage/index.less +54 -0
- package/src/pages/tj/components/CheckUpload/img/img-close.png +0 -0
- package/src/pages/tj/components/CheckUpload/img/img-open.png +0 -0
- package/src/pages/tj/components/CheckUpload/img/index.js +9 -0
- package/src/pages/tj/components/CheckUpload/img/remove.png +0 -0
- package/src/pages/tj/components/CheckUpload/index.jsx +301 -0
- package/src/pages/tj/components/CheckUpload/index.less +102 -0
- package/src/pages/tj/components/Custom/img/icon-add.png +0 -0
- package/src/pages/tj/components/Custom/index.jsx +400 -0
- package/src/pages/tj/components/Custom/index.less +122 -0
- package/src/pages/tj/components/IconOther/index.jsx +25 -0
- package/src/pages/tj/components/IconOther/index.less +17 -0
- package/src/pages/tj/components/ImgUpload/constants.js +12 -0
- package/src/pages/tj/components/ImgUpload/img/icon-add.png +0 -0
- package/src/pages/tj/components/ImgUpload/index.jsx +146 -0
- package/src/pages/tj/components/ImgUpload/index.less +105 -0
- package/src/pages/tj/components/KnowledgeResult/index.jsx +115 -0
- package/src/pages/tj/components/KnowledgeResult/index.less +103 -0
- package/src/pages/tj/components/MediaUpload/help.js +99 -0
- package/src/pages/tj/components/MediaUpload/img/img-close.png +0 -0
- package/src/pages/tj/components/MediaUpload/img/img-open.png +0 -0
- package/src/pages/tj/components/MediaUpload/img/index.js +9 -0
- package/src/pages/tj/components/MediaUpload/img/remove.png +0 -0
- package/src/pages/tj/components/MediaUpload/index.jsx +182 -0
- package/src/pages/tj/components/MediaUpload/index.less +123 -0
- package/src/pages/tj/components/ShowResult/constants.js +20 -0
- package/src/pages/tj/components/ShowResult/img/index.js +9 -0
- package/src/pages/tj/components/ShowResult/img/pass.png +0 -0
- package/src/pages/tj/components/ShowResult/img/reject.png +0 -0
- package/src/pages/tj/components/ShowResult/img/review.png +0 -0
- package/src/pages/tj/components/ShowResult/index.jsx +156 -0
- package/src/pages/tj/components/ShowResult/index.less +118 -0
- package/src/pages/tj/components/TrialForm/config.js +68 -0
- package/src/pages/tj/components/TrialForm/constants.js +20 -0
- package/src/pages/tj/components/TrialForm/img/img-close.png +0 -0
- package/src/pages/tj/components/TrialForm/img/img-open.png +0 -0
- package/src/pages/tj/components/TrialForm/index.js +302 -0
- package/src/pages/tj/components/TrialForm/index.less +76 -0
- package/src/pages/tj/components/help.js +41 -0
- package/src/pages/tj/components/hooks/constants.js +13 -0
- package/src/pages/tj/components/hooks/index.js +9 -0
- package/src/pages/tj/components/hooks/useAppChannel.js +353 -0
- package/src/pages/tj/components/hooks/useTrialItem.js +611 -0
- package/src/pages/tj/components/img/img-close.png +0 -0
- package/src/pages/tj/components/img/img-open.png +0 -0
- package/src/pages/tj/components/img/index.js +7 -0
- package/src/pages/tj/constants.js +524 -0
- package/src/pages/tj/multiModal/history/constants.js +535 -0
- package/src/pages/tj/multiModal/history/text/buildHistoryTaskDetail.js +134 -0
- package/src/pages/tj/multiModal/history/text/index.jsx +526 -0
- package/src/pages/tj/multiModal/trend/text/index.jsx +8 -0
- package/src/pages/tj/postAudio/errorCorrection/list/index.jsx +8 -0
- package/src/pages/tj/postAudio/errorCorrection/missReason/index.jsx +26 -0
- package/src/pages/tj/postAudio/errorCorrection/trend/index.jsx +19 -0
- package/src/pages/tj/postAudio/history/audioClips/index.jsx +28 -0
- package/src/pages/tj/postAudio/history/constants.js +427 -0
- package/src/pages/tj/postAudio/history/postAudio/index.jsx +28 -0
- package/src/pages/tj/postAudio/list/blackWhite/company/list/contants.js +80 -0
- package/src/pages/tj/postAudio/list/blackWhite/company/list/index.jsx +232 -0
- package/src/pages/tj/postAudio/list/blackWhite/company/listContent/index.jsx +27 -0
- package/src/pages/tj/postAudio/list/blackWhite/company/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/postAudio/list/blackWhite/company/listOpLog/index.jsx +113 -0
- package/src/pages/tj/postAudio/list/blackWhite/company/listRepetition/index.jsx +19 -0
- package/src/pages/tj/postAudio/list/blackWhite/custom/list/contants.js +66 -0
- package/src/pages/tj/postAudio/list/blackWhite/custom/list/index.jsx +221 -0
- package/src/pages/tj/postAudio/list/blackWhite/custom/listContent/index.jsx +27 -0
- package/src/pages/tj/postAudio/list/blackWhite/custom/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/postAudio/list/blackWhite/custom/listOpLog/index.jsx +112 -0
- package/src/pages/tj/postAudio/list/blackWhite/custom/listRepetition/index.jsx +19 -0
- package/src/pages/tj/postAudio/list/blackWhite/global/list/contants.js +73 -0
- package/src/pages/tj/postAudio/list/blackWhite/global/list/index.jsx +147 -0
- package/src/pages/tj/postAudio/list/blackWhite/global/listContent/index.jsx +27 -0
- package/src/pages/tj/postAudio/list/blackWhite/global/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/postAudio/list/blackWhite/global/listOpLog/index.jsx +113 -0
- package/src/pages/tj/postAudio/list/blackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tj/postAudio/list/text/black/listContent/index.jsx +27 -0
- package/src/pages/tj/postAudio/list/text/black/listContentOpLog/index.jsx +26 -0
- package/src/pages/tj/postAudio/list/text/black/listRepetition/index.jsx +16 -0
- package/src/pages/tj/postAudio/list/text/company/list/contants.js +101 -0
- package/src/pages/tj/postAudio/list/text/company/list/index.jsx +411 -0
- package/src/pages/tj/postAudio/list/text/company/listContent/index.jsx +26 -0
- package/src/pages/tj/postAudio/list/text/company/listContent/listRepetition/index.jsx +16 -0
- package/src/pages/tj/postAudio/list/text/company/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/postAudio/list/text/company/listOpLog/index.jsx +119 -0
- package/src/pages/tj/postAudio/list/text/company/listRepetition/index.jsx +16 -0
- package/src/pages/tj/postAudio/list/text/custom/list/contants.js +87 -0
- package/src/pages/tj/postAudio/list/text/custom/list/index.jsx +322 -0
- package/src/pages/tj/postAudio/list/text/custom/listContent/index.jsx +28 -0
- package/src/pages/tj/postAudio/list/text/custom/listContent/listRepetition/index.jsx +16 -0
- package/src/pages/tj/postAudio/list/text/custom/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/postAudio/list/text/custom/listOpLog/index.jsx +111 -0
- package/src/pages/tj/postAudio/list/text/custom/listRepetition/index.jsx +16 -0
- package/src/pages/tj/postAudio/list/text/global/list/contants.js +94 -0
- package/src/pages/tj/postAudio/list/text/global/list/index.jsx +290 -0
- package/src/pages/tj/postAudio/list/text/global/listContent/index.jsx +28 -0
- package/src/pages/tj/postAudio/list/text/global/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/postAudio/list/text/global/listOpLog/index.jsx +108 -0
- package/src/pages/tj/postAudio/list/text/listSearch/index.jsx +19 -0
- package/src/pages/tj/postAudio/rank/audioSensitiveWord/index.jsx +18 -0
- package/src/pages/tj/postAudio/trend/audioClips/index.jsx +57 -0
- package/src/pages/tj/postAudio/trend/postAudio/index.jsx +8 -0
- package/src/pages/tj/postImg/errorCorrection/list/index.jsx +35 -0
- package/src/pages/tj/postImg/errorCorrection/list/index.less +0 -0
- package/src/pages/tj/postImg/errorCorrection/missReason/index.jsx +26 -0
- package/src/pages/tj/postImg/errorCorrection/trend/index.jsx +19 -0
- package/src/pages/tj/postImg/history/constants.js +112 -0
- package/src/pages/tj/postImg/history/postImg/buildHistoryTaskDetail.js +129 -0
- package/src/pages/tj/postImg/history/postImg/index.jsx +190 -0
- package/src/pages/tj/postImg/list/blackWhite/company/list/contants.js +90 -0
- package/src/pages/tj/postImg/list/blackWhite/company/list/index.jsx +233 -0
- package/src/pages/tj/postImg/list/blackWhite/company/listContent/index.jsx +19 -0
- package/src/pages/tj/postImg/list/blackWhite/company/listContentOpLog/index.jsx +17 -0
- package/src/pages/tj/postImg/list/blackWhite/company/listOpLog/index.jsx +100 -0
- package/src/pages/tj/postImg/list/blackWhite/company/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postImg/list/blackWhite/custom/list/contants.js +66 -0
- package/src/pages/tj/postImg/list/blackWhite/custom/list/index.jsx +217 -0
- package/src/pages/tj/postImg/list/blackWhite/custom/listContent/index.jsx +25 -0
- package/src/pages/tj/postImg/list/blackWhite/custom/listContentOpLog/index.jsx +21 -0
- package/src/pages/tj/postImg/list/blackWhite/custom/listOpLog/index.jsx +99 -0
- package/src/pages/tj/postImg/list/blackWhite/custom/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postImg/list/blackWhite/global/list/contants.js +73 -0
- package/src/pages/tj/postImg/list/blackWhite/global/list/index.jsx +147 -0
- package/src/pages/tj/postImg/list/blackWhite/global/listContent/index.jsx +26 -0
- package/src/pages/tj/postImg/list/blackWhite/global/listContentOpLog/index.jsx +21 -0
- package/src/pages/tj/postImg/list/blackWhite/global/listOpLog/index.jsx +100 -0
- package/src/pages/tj/postImg/list/blackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tj/postImg/list/components/DatePickerV2/index.less +0 -0
- package/src/pages/tj/postImg/list/components/DatePickerV2/index.tsx +34 -0
- package/src/pages/tj/postImg/list/components/ExportDom/index.less +6 -0
- package/src/pages/tj/postImg/list/components/ExportDom/index.tsx +63 -0
- package/src/pages/tj/postImg/list/components/LabelSearchV2/index.less +0 -0
- package/src/pages/tj/postImg/list/components/LabelSearchV2/index.tsx +84 -0
- package/src/pages/tj/postImg/list/components/SearchFormV2/getFormItems.tsx +121 -0
- package/src/pages/tj/postImg/list/components/SearchFormV2/index.less +91 -0
- package/src/pages/tj/postImg/list/components/SearchFormV2/index.tsx +73 -0
- package/src/pages/tj/postImg/list/formatAppIdOrChannelRender.js +52 -0
- package/src/pages/tj/postImg/list/formatSubmitParams.js +32 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/detail/components/BreadCrumbSimilar/index.less +4 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/detail/components/BreadCrumbSimilar/index.tsx +57 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/detail/components/SimilarImage/index.less +30 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/detail/components/SimilarImage/index.tsx +135 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/detail/getSearchFormConfig.ts +71 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/detail/index.less +24 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/detail/index.tsx +151 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/list/formatSubmitParams.ts +18 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/list/getLabColumns.tsx +135 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/list/getSearchFormConfig.ts +81 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/list/index.less +63 -0
- package/src/pages/tj/postImg/list/laboratory/blackImgSimilar/list/index.tsx +271 -0
- package/src/pages/tj/postImg/list/laboratory/formatQueryParams.ts +5 -0
- package/src/pages/tj/postImg/list/laboratory/hooks/useMdLab.ts +67 -0
- package/src/pages/tj/postImg/list/laboratory/hooks/useMdLabHit.ts +39 -0
- package/src/pages/tj/postImg/list/laboratory/type.d.ts +23 -0
- package/src/pages/tj/postImg/list/laboratory/whiteImgSimilar/detail/index.tsx +9 -0
- package/src/pages/tj/postImg/list/laboratory/whiteImgSimilar/index.tsx +9 -0
- package/src/pages/tj/postImg/list/laboratory/whiteImgSimilar/list/index.tsx +9 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/List/components/ListUpdateForm/index.tsx +92 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/List/getImgListColumns.tsx +173 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/List/getSearchFormConfig.ts +49 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/List/hooks/useImgSimilarList.tsx +142 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/List/index.less +25 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/List/index.tsx +237 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/components/BatchForm/BatchUpload.tsx +49 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/components/BatchForm/index.less +11 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/components/BatchForm/index.tsx +113 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/components/CreateForm/index.less +0 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/components/CreateForm/index.tsx +72 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/getImgListColumns.tsx +72 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/getSearchFormConfig.ts +41 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/getSelectionExtraDom.tsx +34 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/hooks/useImgSimilarListContent.tsx +118 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/index.less +74 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContent/index.tsx +301 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContentRecord/getImgListColumns.tsx +80 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContentRecord/getSearchFormConfig.ts +69 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContentRecord/hooks/useSimilarListRecord.ts +41 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContentRecord/index.less +20 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListContentRecord/index.tsx +145 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListCreate/index.less +15 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListCreate/index.tsx +172 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListRecord/getImgListColumns.tsx +68 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListRecord/getSearchFormConfig.ts +87 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListRecord/hooks/useSimilarListRecord.ts +41 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListRecord/index.less +19 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/ListRecord/index.tsx +158 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/ImgSimilarForm/index.tsx +120 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/MultiSelect/index.less +0 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/MultiSelect/index.tsx +118 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/SimilarUpload/checkImageExist.ts +36 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/SimilarUpload/constants.ts +25 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/SimilarUpload/getBase64.ts +9 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/SimilarUpload/icon-add.png +0 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/SimilarUpload/index.less +306 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/SimilarUpload/index.tsx +238 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/SimilarUpload/uploadIcon.svg +14 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/SingleSelect/index.less +0 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/components/SingleSelect/index.tsx +28 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/constants.js +29 -0
- package/src/pages/tj/postImg/list/postImg/ImgSimilar/index.tsx +40 -0
- package/src/pages/tj/postImg/list/postImg/black/listContent/index.jsx +24 -0
- package/src/pages/tj/postImg/list/postImg/black/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postImg/list/postImg/company/list/contants.js +94 -0
- package/src/pages/tj/postImg/list/postImg/company/list/index.jsx +254 -0
- package/src/pages/tj/postImg/list/postImg/company/listContent/index.jsx +29 -0
- package/src/pages/tj/postImg/list/postImg/company/listContentOpLog/index.jsx +28 -0
- package/src/pages/tj/postImg/list/postImg/company/listOpLog/index.jsx +86 -0
- package/src/pages/tj/postImg/list/postImg/company/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postImg/list/postImg/custom/list/contants.js +73 -0
- package/src/pages/tj/postImg/list/postImg/custom/list/index.jsx +247 -0
- package/src/pages/tj/postImg/list/postImg/custom/listContent/index.jsx +34 -0
- package/src/pages/tj/postImg/list/postImg/custom/listContentOpLog/index.jsx +27 -0
- package/src/pages/tj/postImg/list/postImg/custom/listOpLog/index.jsx +86 -0
- package/src/pages/tj/postImg/list/postImg/custom/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postImg/list/postImg/global/list/contants.js +87 -0
- package/src/pages/tj/postImg/list/postImg/global/list/index.jsx +196 -0
- package/src/pages/tj/postImg/list/postImg/global/listContent/index.jsx +27 -0
- package/src/pages/tj/postImg/list/postImg/global/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/postImg/list/postImg/global/listOpLog/index.jsx +82 -0
- package/src/pages/tj/postImg/list/postImg/listSearch/index.jsx +20 -0
- package/src/pages/tj/postImg/list/postImg/similarBlack/listContent/index.jsx +27 -0
- package/src/pages/tj/postImg/list/postImg/similarBlack/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/postImg/list/postImg/tabContentLayoutImage/index.jsx +64 -0
- package/src/pages/tj/postImg/list/text/black/listContent/index.jsx +24 -0
- package/src/pages/tj/postImg/list/text/black/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/postImg/list/text/black/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postImg/list/text/company/list/contants.js +101 -0
- package/src/pages/tj/postImg/list/text/company/list/index.jsx +368 -0
- package/src/pages/tj/postImg/list/text/company/listContent/index.jsx +24 -0
- package/src/pages/tj/postImg/list/text/company/listContent/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postImg/list/text/company/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postImg/list/text/company/listOpLog/index.jsx +109 -0
- package/src/pages/tj/postImg/list/text/company/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postImg/list/text/custom/list/contants.js +87 -0
- package/src/pages/tj/postImg/list/text/custom/list/index.jsx +318 -0
- package/src/pages/tj/postImg/list/text/custom/listContent/index.jsx +32 -0
- package/src/pages/tj/postImg/list/text/custom/listContent/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postImg/list/text/custom/listContentOpLog/index.jsx +26 -0
- package/src/pages/tj/postImg/list/text/custom/listOpLog/index.jsx +110 -0
- package/src/pages/tj/postImg/list/text/custom/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postImg/list/text/global/list/contants.js +94 -0
- package/src/pages/tj/postImg/list/text/global/list/index.jsx +289 -0
- package/src/pages/tj/postImg/list/text/global/listContent/index.jsx +26 -0
- package/src/pages/tj/postImg/list/text/global/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postImg/list/text/global/listOpLog/index.jsx +99 -0
- package/src/pages/tj/postImg/list/text/listSearch/index.jsx +19 -0
- package/src/pages/tj/postImg/trend/postImg/index.jsx +50 -0
- package/src/pages/tj/postVideo/errorCorrection/audioList/index.jsx +8 -0
- package/src/pages/tj/postVideo/errorCorrection/audioMissReason/index.jsx +26 -0
- package/src/pages/tj/postVideo/errorCorrection/constants.js +490 -0
- package/src/pages/tj/postVideo/errorCorrection/imgList/index.jsx +8 -0
- package/src/pages/tj/postVideo/errorCorrection/imgMissReason/index.jsx +26 -0
- package/src/pages/tj/postVideo/errorCorrection/trend/index.jsx +19 -0
- package/src/pages/tj/postVideo/history/audioClips/index.jsx +27 -0
- package/src/pages/tj/postVideo/history/constants.js +590 -0
- package/src/pages/tj/postVideo/history/imgClips/index.jsx +64 -0
- package/src/pages/tj/postVideo/history/videoFile/index.jsx +25 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/company/list/contants.js +80 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/company/list/index.jsx +228 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/company/listContent/index.jsx +25 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/company/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/company/listOpLog/index.jsx +112 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/company/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/custom/list/contants.js +66 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/custom/list/index.jsx +203 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/custom/listContent/index.jsx +25 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/custom/listContentOpLog/index.jsx +21 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/custom/listOpLog/index.jsx +111 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/custom/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/global/list/contants.js +73 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/global/list/index.jsx +148 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/global/listContent/index.jsx +26 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/global/listContentOpLog/index.jsx +21 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/global/listOpLog/index.jsx +112 -0
- package/src/pages/tj/postVideo/list/audioBlackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tj/postVideo/list/audioText/black/listContent/index.jsx +24 -0
- package/src/pages/tj/postVideo/list/audioText/black/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/postVideo/list/audioText/black/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/audioText/company/list/contants.js +101 -0
- package/src/pages/tj/postVideo/list/audioText/company/list/index.jsx +397 -0
- package/src/pages/tj/postVideo/list/audioText/company/listContent/index.jsx +24 -0
- package/src/pages/tj/postVideo/list/audioText/company/listContent/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/audioText/company/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postVideo/list/audioText/company/listOpLog/index.jsx +118 -0
- package/src/pages/tj/postVideo/list/audioText/company/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/audioText/custom/list/contants.js +87 -0
- package/src/pages/tj/postVideo/list/audioText/custom/list/index.jsx +304 -0
- package/src/pages/tj/postVideo/list/audioText/custom/listContent/index.jsx +24 -0
- package/src/pages/tj/postVideo/list/audioText/custom/listContent/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/audioText/custom/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postVideo/list/audioText/custom/listOpLog/index.jsx +112 -0
- package/src/pages/tj/postVideo/list/audioText/custom/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/audioText/global/list/contants.js +94 -0
- package/src/pages/tj/postVideo/list/audioText/global/list/index.jsx +297 -0
- package/src/pages/tj/postVideo/list/audioText/global/listContent/index.jsx +26 -0
- package/src/pages/tj/postVideo/list/audioText/global/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postVideo/list/audioText/global/listOpLog/index.jsx +108 -0
- package/src/pages/tj/postVideo/list/audioText/listSearch/index.jsx +19 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/company/list/contants.js +80 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/company/list/index.jsx +229 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/company/listContent/index.jsx +25 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/company/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/company/listOpLog/index.jsx +100 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/company/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/custom/list/contants.js +66 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/custom/list/index.jsx +217 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/custom/listContent/index.jsx +25 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/custom/listContentOpLog/index.jsx +21 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/custom/listOpLog/index.jsx +99 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/custom/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/global/list/contants.js +73 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/global/list/index.jsx +146 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/global/listContent/index.jsx +26 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/global/listContentOpLog/index.jsx +21 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/global/listOpLog/index.jsx +100 -0
- package/src/pages/tj/postVideo/list/imgBlackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tj/postVideo/list/imgText/black/listContent/index.jsx +24 -0
- package/src/pages/tj/postVideo/list/imgText/black/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/postVideo/list/imgText/black/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/imgText/company/list/contants.js +101 -0
- package/src/pages/tj/postVideo/list/imgText/company/list/index.jsx +363 -0
- package/src/pages/tj/postVideo/list/imgText/company/listContent/index.jsx +24 -0
- package/src/pages/tj/postVideo/list/imgText/company/listContent/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/imgText/company/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postVideo/list/imgText/company/listOpLog/index.jsx +110 -0
- package/src/pages/tj/postVideo/list/imgText/company/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/imgText/custom/list/contants.js +87 -0
- package/src/pages/tj/postVideo/list/imgText/custom/list/index.jsx +310 -0
- package/src/pages/tj/postVideo/list/imgText/custom/listContent/index.jsx +24 -0
- package/src/pages/tj/postVideo/list/imgText/custom/listContent/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/imgText/custom/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postVideo/list/imgText/custom/listOpLog/index.jsx +104 -0
- package/src/pages/tj/postVideo/list/imgText/custom/listRepetition/index.jsx +15 -0
- package/src/pages/tj/postVideo/list/imgText/global/list/contants.js +94 -0
- package/src/pages/tj/postVideo/list/imgText/global/list/index.jsx +293 -0
- package/src/pages/tj/postVideo/list/imgText/global/listContent/index.jsx +26 -0
- package/src/pages/tj/postVideo/list/imgText/global/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postVideo/list/imgText/global/listOpLog/index.jsx +100 -0
- package/src/pages/tj/postVideo/list/imgText/listSearch/index.jsx +19 -0
- package/src/pages/tj/postVideo/list/postImg/black/listContent/index.jsx +24 -0
- package/src/pages/tj/postVideo/list/postImg/black/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/postVideo/list/postImg/company/list/contants.js +94 -0
- package/src/pages/tj/postVideo/list/postImg/company/list/index.jsx +245 -0
- package/src/pages/tj/postVideo/list/postImg/company/listContent/index.jsx +26 -0
- package/src/pages/tj/postVideo/list/postImg/company/listContentOpLog/index.jsx +26 -0
- package/src/pages/tj/postVideo/list/postImg/company/listOpLog/index.jsx +84 -0
- package/src/pages/tj/postVideo/list/postImg/company/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postVideo/list/postImg/custom/list/contants.js +73 -0
- package/src/pages/tj/postVideo/list/postImg/custom/list/index.jsx +233 -0
- package/src/pages/tj/postVideo/list/postImg/custom/listContent/index.jsx +27 -0
- package/src/pages/tj/postVideo/list/postImg/custom/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/postVideo/list/postImg/custom/listOpLog/index.jsx +80 -0
- package/src/pages/tj/postVideo/list/postImg/custom/listRepetition/index.jsx +17 -0
- package/src/pages/tj/postVideo/list/postImg/global/list/contants.js +87 -0
- package/src/pages/tj/postVideo/list/postImg/global/list/index.jsx +196 -0
- package/src/pages/tj/postVideo/list/postImg/global/listContent/index.jsx +27 -0
- package/src/pages/tj/postVideo/list/postImg/global/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/postVideo/list/postImg/global/listOpLog/index.jsx +82 -0
- package/src/pages/tj/postVideo/list/postImg/listSearch/index.jsx +21 -0
- package/src/pages/tj/postVideo/rank/audioSensitiveWord/index.jsx +18 -0
- package/src/pages/tj/postVideo/rank/imgSensitiveWord/index.jsx +18 -0
- package/src/pages/tj/postVideo/trend/audioClips/index.jsx +50 -0
- package/src/pages/tj/postVideo/trend/imgClips/index.jsx +50 -0
- package/src/pages/tj/postVideo/trend/videoFile/index.jsx +50 -0
- package/src/pages/tj/risk/account/index.jsx +18 -0
- package/src/pages/tj/sensitive/list/contants.js +24 -0
- package/src/pages/tj/sensitive/list/index.jsx +20 -0
- package/src/pages/tj/sensitive/listContent/index.jsx +29 -0
- package/src/pages/tj/sensitive/listContent/listRepetition/index.jsx +17 -0
- package/src/pages/tj/sensitive/listContentOpLog/index.jsx +26 -0
- package/src/pages/tj/sensitive/listOpLog/index.jsx +121 -0
- package/src/pages/tj/text/check/batch/index.jsx +24 -0
- package/src/pages/tj/text/check/constants.js +1696 -0
- package/src/pages/tj/text/check/item/index.jsx +26 -0
- package/src/pages/tj/text/errorCorrection/list/index.jsx +52 -0
- package/src/pages/tj/text/errorCorrection/missReason/index.jsx +26 -0
- package/src/pages/tj/text/errorCorrection/trend/index.jsx +19 -0
- package/src/pages/tj/text/history/constants.js +535 -0
- package/src/pages/tj/text/history/text/buildHistoryTaskDetail.js +134 -0
- package/src/pages/tj/text/history/text/index.jsx +526 -0
- package/src/pages/tj/text/list/blackWhite/company/list/contants.js +98 -0
- package/src/pages/tj/text/list/blackWhite/company/list/index.jsx +230 -0
- package/src/pages/tj/text/list/blackWhite/company/listContent/index.jsx +25 -0
- package/src/pages/tj/text/list/blackWhite/company/listContent/listRepetition/index.jsx +15 -0
- package/src/pages/tj/text/list/blackWhite/company/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/text/list/blackWhite/company/listOpLog/index.jsx +120 -0
- package/src/pages/tj/text/list/blackWhite/company/listRepetition/index.jsx +19 -0
- package/src/pages/tj/text/list/blackWhite/custom/list/contants.js +82 -0
- package/src/pages/tj/text/list/blackWhite/custom/list/index.jsx +219 -0
- package/src/pages/tj/text/list/blackWhite/custom/listContent/index.jsx +25 -0
- package/src/pages/tj/text/list/blackWhite/custom/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/text/list/blackWhite/custom/listOpLog/index.jsx +117 -0
- package/src/pages/tj/text/list/blackWhite/custom/listRepetition/index.jsx +19 -0
- package/src/pages/tj/text/list/blackWhite/global/list/contants.js +73 -0
- package/src/pages/tj/text/list/blackWhite/global/list/index.jsx +145 -0
- package/src/pages/tj/text/list/blackWhite/global/listContent/index.jsx +26 -0
- package/src/pages/tj/text/list/blackWhite/global/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/text/list/blackWhite/global/listOpLog/index.jsx +113 -0
- package/src/pages/tj/text/list/blackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tj/text/list/text/black/listContent/index.jsx +25 -0
- package/src/pages/tj/text/list/text/black/listContentOpLog/index.jsx +26 -0
- package/src/pages/tj/text/list/text/black/listRepetition/index.jsx +16 -0
- package/src/pages/tj/text/list/text/company/list/contants.js +114 -0
- package/src/pages/tj/text/list/text/company/list/index.jsx +422 -0
- package/src/pages/tj/text/list/text/company/listContent/index.jsx +32 -0
- package/src/pages/tj/text/list/text/company/listContent/listRepetition/index.jsx +16 -0
- package/src/pages/tj/text/list/text/company/listContentOpLog/index.jsx +29 -0
- package/src/pages/tj/text/list/text/company/listOpLog/index.jsx +129 -0
- package/src/pages/tj/text/list/text/company/listRepetition/index.jsx +17 -0
- package/src/pages/tj/text/list/text/custom/list/contants.js +743 -0
- package/src/pages/tj/text/list/text/custom/list/index.jsx +36 -0
- package/src/pages/tj/text/list/text/custom/listContent/index.jsx +36 -0
- package/src/pages/tj/text/list/text/custom/listContent/listRepetition/index.jsx +15 -0
- package/src/pages/tj/text/list/text/custom/listContentOpLog/index.jsx +27 -0
- package/src/pages/tj/text/list/text/custom/listOpLog/index.jsx +124 -0
- package/src/pages/tj/text/list/text/custom/listRepetition/index.jsx +15 -0
- package/src/pages/tj/text/list/text/global/list/contants.js +94 -0
- package/src/pages/tj/text/list/text/global/list/index.jsx +326 -0
- package/src/pages/tj/text/list/text/global/listContent/index.jsx +27 -0
- package/src/pages/tj/text/list/text/global/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/text/list/text/global/listOpLog/index.jsx +111 -0
- package/src/pages/tj/text/list/text/lab/contants.js +346 -0
- package/src/pages/tj/text/list/text/lab/hooks/useHitListExport.js +38 -0
- package/src/pages/tj/text/list/text/lab/index.jsx +479 -0
- package/src/pages/tj/text/list/text/lab/index.less +29 -0
- package/src/pages/tj/text/list/text/lab/viewHit/index.jsx +231 -0
- package/src/pages/tj/text/list/text/lab/viewHit/index.less +43 -0
- package/src/pages/tj/text/list/text/listSearch/index.jsx +19 -0
- package/src/pages/tj/text/rank/constants.js +10 -0
- package/src/pages/tj/text/rank/index.js +36 -0
- package/src/pages/tj/text/trend/text/index.jsx +8 -0
- package/src/pages/tj/videoStream/errorCorrection/audioList/index.jsx +8 -0
- package/src/pages/tj/videoStream/errorCorrection/audioMissReason/index.jsx +26 -0
- package/src/pages/tj/videoStream/errorCorrection/imgList/index.jsx +8 -0
- package/src/pages/tj/videoStream/errorCorrection/imgMissReason/index.jsx +26 -0
- package/src/pages/tj/videoStream/errorCorrection/trend/index.jsx +19 -0
- package/src/pages/tj/videoStream/history/audioClips/index.jsx +160 -0
- package/src/pages/tj/videoStream/history/constants.js +394 -0
- package/src/pages/tj/videoStream/history/imgClips/index.jsx +58 -0
- package/src/pages/tj/videoStream/history/videoStream/index.jsx +120 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/company/list/contants.js +80 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/company/list/index.jsx +217 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/company/listContent/index.jsx +25 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/company/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/company/listOpLog/index.jsx +116 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/company/listRepetition/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/custom/list/contants.js +66 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/custom/list/index.jsx +205 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/custom/listContent/index.jsx +26 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/custom/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/custom/listOpLog/index.jsx +115 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/custom/listRepetition/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/global/list/contants.js +73 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/global/list/index.jsx +149 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/global/listContent/index.jsx +27 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/global/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/global/listOpLog/index.jsx +116 -0
- package/src/pages/tj/videoStream/list/audioBlackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/audioText/black/listContent/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/audioText/black/listContentOpLog/index.jsx +26 -0
- package/src/pages/tj/videoStream/list/audioText/black/listRepetition/index.jsx +16 -0
- package/src/pages/tj/videoStream/list/audioText/company/list/contants.js +94 -0
- package/src/pages/tj/videoStream/list/audioText/company/list/index.jsx +395 -0
- package/src/pages/tj/videoStream/list/audioText/company/listContent/index.jsx +25 -0
- package/src/pages/tj/videoStream/list/audioText/company/listContent/listRepetition/index.jsx +16 -0
- package/src/pages/tj/videoStream/list/audioText/company/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/audioText/company/listOpLog/index.jsx +120 -0
- package/src/pages/tj/videoStream/list/audioText/company/listRepetition/index.jsx +16 -0
- package/src/pages/tj/videoStream/list/audioText/custom/list/contants.js +80 -0
- package/src/pages/tj/videoStream/list/audioText/custom/list/index.jsx +312 -0
- package/src/pages/tj/videoStream/list/audioText/custom/listContent/index.jsx +26 -0
- package/src/pages/tj/videoStream/list/audioText/custom/listContent/listRepetition/index.jsx +17 -0
- package/src/pages/tj/videoStream/list/audioText/custom/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/audioText/custom/listOpLog/index.jsx +114 -0
- package/src/pages/tj/videoStream/list/audioText/custom/listRepetition/index.jsx +16 -0
- package/src/pages/tj/videoStream/list/audioText/global/list/contants.js +87 -0
- package/src/pages/tj/videoStream/list/audioText/global/list/index.jsx +306 -0
- package/src/pages/tj/videoStream/list/audioText/global/listContent/index.jsx +27 -0
- package/src/pages/tj/videoStream/list/audioText/global/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/audioText/global/listOpLog/index.jsx +110 -0
- package/src/pages/tj/videoStream/list/audioText/listSearch/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/company/list/contants.js +80 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/company/list/index.jsx +231 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/company/listContent/index.jsx +26 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/company/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/company/listOpLog/index.jsx +104 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/company/listRepetition/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/custom/list/contants.js +66 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/custom/list/index.jsx +220 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/custom/listContent/index.jsx +26 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/custom/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/custom/listOpLog/index.jsx +103 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/custom/listRepetition/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/global/list/contants.js +73 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/global/list/index.jsx +149 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/global/listContent/index.jsx +27 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/global/listContentOpLog/index.jsx +22 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/global/listOpLog/index.jsx +104 -0
- package/src/pages/tj/videoStream/list/imgBlackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/imgText/black/listContent/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/imgText/black/listContentOpLog/index.jsx +23 -0
- package/src/pages/tj/videoStream/list/imgText/black/listRepetition/index.jsx +17 -0
- package/src/pages/tj/videoStream/list/imgText/company/list/contants.js +94 -0
- package/src/pages/tj/videoStream/list/imgText/company/list/index.jsx +357 -0
- package/src/pages/tj/videoStream/list/imgText/company/listContent/index.jsx +25 -0
- package/src/pages/tj/videoStream/list/imgText/company/listContent/listRepetition/index.jsx +17 -0
- package/src/pages/tj/videoStream/list/imgText/company/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/imgText/company/listOpLog/index.jsx +112 -0
- package/src/pages/tj/videoStream/list/imgText/company/listRepetition/index.jsx +17 -0
- package/src/pages/tj/videoStream/list/imgText/custom/list/contants.js +80 -0
- package/src/pages/tj/videoStream/list/imgText/custom/list/index.jsx +305 -0
- package/src/pages/tj/videoStream/list/imgText/custom/listContent/index.jsx +26 -0
- package/src/pages/tj/videoStream/list/imgText/custom/listContent/listRepetition/index.jsx +17 -0
- package/src/pages/tj/videoStream/list/imgText/custom/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/imgText/custom/listOpLog/index.jsx +106 -0
- package/src/pages/tj/videoStream/list/imgText/custom/listRepetition/index.jsx +17 -0
- package/src/pages/tj/videoStream/list/imgText/global/list/contants.js +87 -0
- package/src/pages/tj/videoStream/list/imgText/global/list/index.jsx +276 -0
- package/src/pages/tj/videoStream/list/imgText/global/listContent/index.jsx +27 -0
- package/src/pages/tj/videoStream/list/imgText/global/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/imgText/global/listOpLog/index.jsx +102 -0
- package/src/pages/tj/videoStream/list/imgText/listSearch/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/postImg/black/listContent/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/postImg/black/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/videoStream/list/postImg/company/list/contants.js +94 -0
- package/src/pages/tj/videoStream/list/postImg/company/list/index.jsx +250 -0
- package/src/pages/tj/videoStream/list/postImg/company/listContent/index.jsx +26 -0
- package/src/pages/tj/videoStream/list/postImg/company/listContentOpLog/index.jsx +25 -0
- package/src/pages/tj/videoStream/list/postImg/company/listOpLog/index.jsx +86 -0
- package/src/pages/tj/videoStream/list/postImg/company/listRepetition/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/postImg/custom/list/contants.js +73 -0
- package/src/pages/tj/videoStream/list/postImg/custom/list/index.jsx +249 -0
- package/src/pages/tj/videoStream/list/postImg/custom/listContent/index.jsx +26 -0
- package/src/pages/tj/videoStream/list/postImg/custom/listContentOpLog/index.jsx +25 -0
- package/src/pages/tj/videoStream/list/postImg/custom/listOpLog/index.jsx +84 -0
- package/src/pages/tj/videoStream/list/postImg/custom/listRepetition/index.jsx +19 -0
- package/src/pages/tj/videoStream/list/postImg/global/list/contants.js +87 -0
- package/src/pages/tj/videoStream/list/postImg/global/list/index.jsx +176 -0
- package/src/pages/tj/videoStream/list/postImg/global/listContent/index.jsx +27 -0
- package/src/pages/tj/videoStream/list/postImg/global/listContentOpLog/index.jsx +25 -0
- package/src/pages/tj/videoStream/list/postImg/global/listOpLog/index.jsx +86 -0
- package/src/pages/tj/videoStream/list/postImg/listSearch/index.jsx +21 -0
- package/src/pages/tj/videoStream/rank/audioSensitiveWord/index.jsx +18 -0
- package/src/pages/tj/videoStream/rank/imgSensitiveWord/index.jsx +18 -0
- package/src/pages/tj/videoStream/trend/audioClips/index.jsx +50 -0
- package/src/pages/tj/videoStream/trend/imgClips/index.jsx +49 -0
- package/src/pages/tj/videoStream/trend/videoStream/index.jsx +76 -0
- package/src/pages/tj/web/history/web/buildHistoryTaskDetail.js +240 -0
- package/src/pages/tj/web/history/web/index.jsx +26 -0
- package/src/pages/tj/web/list/web/company/list/contants.js +114 -0
- package/src/pages/tj/web/list/web/company/list/index.jsx +400 -0
- package/src/pages/tj/web/list/web/company/listContent/index.jsx +24 -0
- package/src/pages/tj/web/list/web/company/listContent/listRepetition/index.jsx +16 -0
- package/src/pages/tj/web/list/web/company/listContentOpLog/index.jsx +24 -0
- package/src/pages/tj/web/list/web/company/listOpLog/index.jsx +126 -0
- package/src/pages/tj/web/list/web/company/listRepetition/index.jsx +17 -0
- package/src/pages/tj/web/trend/web/index.jsx +8 -0
- package/src/pages/tw/activity/components/ActivityOverviewCard/index.jsx +109 -0
- package/src/pages/tw/activity/components/ActivityOverviewCard/index.less +36 -0
- package/src/pages/tw/activity/components/riskFilter.js +180 -0
- package/src/pages/tw/activity/components/riskFilter.less +32 -0
- package/src/pages/tw/activity/index.less +77 -0
- package/src/pages/tw/activity/ranking/index.jsx +532 -0
- package/src/pages/tw/activity/trend/index.jsx +296 -0
- package/src/pages/tw/activity/user/index.jsx +112 -0
- package/src/pages/tw/antiRobotSms/history/constants.js +299 -0
- package/src/pages/tw/antiRobotSms/history/exportConfig.js +159 -0
- package/src/pages/tw/antiRobotSms/history/index.jsx +303 -0
- package/src/pages/tw/antiRobotSms/trend/index.jsx +13 -0
- package/src/pages/tw/blackWhite/company/list/contants.js +80 -0
- package/src/pages/tw/blackWhite/company/list/index.jsx +270 -0
- package/src/pages/tw/blackWhite/company/listContent/index.jsx +25 -0
- package/src/pages/tw/blackWhite/company/listContentOpLog/index.jsx +22 -0
- package/src/pages/tw/blackWhite/company/listOpLog/index.jsx +119 -0
- package/src/pages/tw/blackWhite/company/listRepetition/index.jsx +17 -0
- package/src/pages/tw/blackWhite/constants.js +3 -0
- package/src/pages/tw/blackWhite/custom/list/contants.js +82 -0
- package/src/pages/tw/blackWhite/custom/list/index.jsx +260 -0
- package/src/pages/tw/blackWhite/custom/listContent/index.jsx +19 -0
- package/src/pages/tw/blackWhite/custom/listContentOpLog/index.jsx +15 -0
- package/src/pages/tw/blackWhite/custom/listOpLog/index.jsx +117 -0
- package/src/pages/tw/blackWhite/custom/listRepetition/index.jsx +17 -0
- package/src/pages/tw/blackWhite/global/list/contants.js +82 -0
- package/src/pages/tw/blackWhite/global/list/index.jsx +155 -0
- package/src/pages/tw/blackWhite/global/listContent/index.jsx +20 -0
- package/src/pages/tw/blackWhite/global/listContentOpLog/index.jsx +15 -0
- package/src/pages/tw/blackWhite/global/listOpLog/index.jsx +118 -0
- package/src/pages/tw/blackWhite/listSearch/index.jsx +19 -0
- package/src/pages/tw/components/exportConfig.js +330 -0
- package/src/pages/tw/constants.js +87 -0
- package/src/pages/tw/event/dataUpload/index.jsx +405 -0
- package/src/pages/tw/event/dataUpload/index.less +73 -0
- package/src/pages/tw/event/disposal/constants.js +71 -0
- package/src/pages/tw/event/disposal/getSearchForm.js +158 -0
- package/src/pages/tw/event/disposal/getTableColumns.js +99 -0
- package/src/pages/tw/event/disposal/index.jsx +86 -0
- package/src/pages/tw/event/disposal/index.less +13 -0
- package/src/pages/tw/event/history/constants.js +700 -0
- package/src/pages/tw/event/history/exportConfig.js +170 -0
- package/src/pages/tw/event/history/index.jsx +795 -0
- package/src/pages/tw/event/occupyRate/index.jsx +53 -0
- package/src/pages/tw/event/queryOrder/index.jsx +102 -0
- package/src/pages/tw/event/trend/index.jsx +78 -0
- package/src/pages/tw/login/history/constants.js +484 -0
- package/src/pages/tw/login/history/exportConfig.js +158 -0
- package/src/pages/tw/login/history/index.jsx +406 -0
- package/src/pages/tw/login/trend/index.jsx +78 -0
- package/src/pages/tw/marketing/history/constants.js +407 -0
- package/src/pages/tw/marketing/history/exportConfig.js +159 -0
- package/src/pages/tw/marketing/history/index.jsx +384 -0
- package/src/pages/tw/marketing/trend/index.jsx +11 -0
- package/src/pages/tw/register/history/constants.js +503 -0
- package/src/pages/tw/register/history/exportConfig.js +158 -0
- package/src/pages/tw/register/history/index.jsx +414 -0
- package/src/pages/tw/register/trend/index.jsx +78 -0
- package/src/pages/tw/risk/account/index.jsx +17 -0
- package/src/pages/tw/riskQueryCenter/components/AccountPage.js +711 -0
- package/src/pages/tw/riskQueryCenter/components/ColorLegend/index.js +25 -0
- package/src/pages/tw/riskQueryCenter/components/ColorLegend/index.less +20 -0
- package/src/pages/tw/riskQueryCenter/components/DeviceId.js +300 -0
- package/src/pages/tw/riskQueryCenter/components/PhonePage.js +330 -0
- package/src/pages/tw/riskQueryCenter/components/RiskFilter.js +411 -0
- package/src/pages/tw/riskQueryCenter/components/detailDrawer.js +399 -0
- package/src/pages/tw/riskQueryCenter/components/detailDrawer.less +101 -0
- package/src/pages/tw/riskQueryCenter/components/index.less +316 -0
- package/src/pages/tw/riskQueryCenter/components/riskFilter.less +27 -0
- package/src/pages/tw/riskQueryCenter/configure.js +958 -0
- package/src/pages/tw/riskQueryCenter/index.jsx +40 -0
- package/src/pages/tw/riskQueryCenter/index.less +0 -0
- package/src/pages/tw/strategy/components/StrategyNoPermission/index.jsx +20 -0
- package/src/pages/tw/strategy/components/StrategyNoPermission/index.less +32 -0
- package/src/pages/tw/strategy/experiment/components/ExperimentRuleTable/index.jsx +1219 -0
- package/src/pages/tw/strategy/experiment/components/ExperimentRuleTable/index.less +40 -0
- package/src/pages/tw/strategy/experiment/components/RuleDiffModal/index.jsx +149 -0
- package/src/pages/tw/strategy/experiment/components/RuleEventModal/index.jsx +203 -0
- package/src/pages/tw/strategy/experiment/components/RuleGroupCopyModal/index.jsx +132 -0
- package/src/pages/tw/strategy/experiment/components/RuleOnlineModal/index.jsx +226 -0
- package/src/pages/tw/strategy/experiment/index.jsx +545 -0
- package/src/pages/tw/strategy/experiment/index.less +15 -0
- package/src/pages/tw/strategy/experimentLog/components/CreateEvaluationTask/index.jsx +69 -0
- package/src/pages/tw/strategy/experimentLog/components/CreateEvaluationTask/index.less +3 -0
- package/src/pages/tw/strategy/experimentLog/components/LabStatistic/index.jsx +16 -0
- package/src/pages/tw/strategy/experimentLog/components/LabStatistic/index.less +38 -0
- package/src/pages/tw/strategy/experimentLog/index.jsx +944 -0
- package/src/pages/tw/strategy/experimentLog/index.less +18 -0
- package/src/pages/tw/strategy/hooks/useStrategyOpenStatus.js +64 -0
- package/src/pages/tw/strategy/labRecord/index.jsx +136 -0
- package/src/pages/tw/strategy/labRecord/index.less +8 -0
- package/src/pages/tw/strategy/policy/index.jsx +14 -0
- package/src/pages/tw/strategy/ruleLog/index.jsx +257 -0
- package/src/pages/tw/strategy/ruleLog/index.less +16 -0
- package/src/pages/twCaptcha/constants.js +158 -0
- package/src/pages/twCaptcha/risk/history/index.jsx +57 -0
- package/src/pages/twCaptcha/risk/trend/index.jsx +8 -0
- package/src/pages/twCaptcha/secondCheck/history/index.jsx +189 -0
- package/src/pages/twCaptcha/secondCheck/trend/index.jsx +8 -0
- package/src/pages/twCertifiy/constants.js +118 -0
- package/src/pages/twCertifiy/machine/history/index.jsx +52 -0
- package/src/pages/twCertifiy/machine/trend/index.jsx +19 -0
- package/src/pages/twCertifiy/oneKeyLogin/history/index.jsx +53 -0
- package/src/pages/twCertifiy/oneKeyLogin/trend/index.jsx +34 -0
- package/src/pages/twChannel/activeHistory/index.jsx +182 -0
- package/src/pages/twChannel/constants.js +499 -0
- package/src/pages/twChannel/retain/index.jsx +117 -0
- package/src/pages/twChannel/risk/activate/index.jsx +46 -0
- package/src/pages/twChannel/risk/channel/index.jsx +77 -0
- package/src/pages/twChannel/risk/trend/index.jsx +8 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useChannelEventList.ts +76 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useDefaultRangeTimeData.ts +65 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useDefaultServiceDataAndServiceIdMap.ts +66 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useEventList.ts +65 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useGlobalFilterListener.ts +169 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useHistoryList.ts +116 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useQueryParams.ts +178 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useRiskLevelList.ts +103 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useRiskReasonList.ts +57 -0
- package/src/pages/tw_history_trend_ts_backup/hooks/useTableExtraDom.tsx +194 -0
- package/src/pages/tw_history_trend_ts_backup/index.tsx +659 -0
- package/src/pages/tw_history_trend_ts_backup/tableMethods/tableColumnRenders.tsx +119 -0
- package/src/pages/tw_history_trend_ts_backup/tableMethods/tableExportData.ts +65 -0
- package/src/pages/tw_history_trend_ts_backup/tableMethods/tableFormatColumn.ts +76 -0
- package/src/pages/tw_history_trend_ts_backup/tableMethods/tableSaveColumns.ts +31 -0
- package/src/pages/tw_history_trend_ts_backup/utils/getFormData.ts +64 -0
- package/src/pages/tw_history_trend_ts_backup/utils/getSearchParams.ts +55 -0
- package/src/pages/tw_history_trend_ts_backup/utils/hasFilterValue.ts +21 -0
- package/src/pages/tw_history_trend_ts_backup/utils/setDefaultSearchParams.ts +96 -0
- package/src/pages/tx/components/TxExport/index.jsx +70 -0
- package/src/pages/tx/components/TxExport/index.less +0 -0
- package/src/pages/tx/device/history/index.jsx +341 -0
- package/src/pages/tx/device/history/index.less +11 -0
- package/src/pages/tx/device/history/searchFormConfig.js +43 -0
- package/src/pages/tx/device/history/tableConfig.js +107 -0
- package/src/pages/tx/device/trend/index.jsx +204 -0
- package/src/pages/tx/helper/formatHistoryParams.js +34 -0
- package/src/pages/tx/helper/formatTrendParams.js +101 -0
- package/src/pages/tx/hooks/useTxHistory.ts +72 -0
- package/src/pages/tx/hooks/useTxRiskLabel.ts +53 -0
- package/src/pages/tx/hooks/useTxTrend.ts +109 -0
- package/src/pages/tx/ip/history/index.jsx +250 -0
- package/src/pages/tx/ip/history/index.less +11 -0
- package/src/pages/tx/ip/history/searchFormConfig.js +43 -0
- package/src/pages/tx/ip/history/tableConfig.js +85 -0
- package/src/pages/tx/ip/trend/index.jsx +204 -0
- package/src/pages/tx/phoneNum/history/index.jsx +307 -0
- package/src/pages/tx/phoneNum/history/index.less +11 -0
- package/src/pages/tx/phoneNum/history/searchFormConfig.js +43 -0
- package/src/pages/tx/phoneNum/history/tableConfig.js +111 -0
- package/src/pages/tx/phoneNum/trend/index.jsx +204 -0
- package/src/pages/tx/tokenId/history/index.jsx +248 -0
- package/src/pages/tx/tokenId/history/index.less +11 -0
- package/src/pages/tx/tokenId/history/searchFormConfig.js +43 -0
- package/src/pages/tx/tokenId/history/tableConfig.js +85 -0
- package/src/pages/tx/tokenId/trend/index.jsx +203 -0
- package/src/privateCustomConfig/WeiLai/Header/index.js +23 -0
- package/src/privateCustomConfig/WeiLai/Header/index.less +28 -0
- package/src/privateCustomConfig/WeiLai/LoginLeft/index.jsx +35 -0
- package/src/privateCustomConfig/WeiLai/LoginLeft/index.less +53 -0
- package/src/privateCustomConfig/WeiLai/img/favicon.png +0 -0
- package/src/privateCustomConfig/WeiLai/img/left-banner.png +0 -0
- package/src/privateCustomConfig/WeiLai/img/login.png +0 -0
- package/src/privateCustomConfig/WeiLai/index.jsx +7 -0
- package/src/privateCustomConfig/WeiLai/index.less +53 -0
- package/src/privateCustomConfig/ZhongYiHuLian/Header/index.js +23 -0
- package/src/privateCustomConfig/ZhongYiHuLian/Header/index.less +28 -0
- package/src/privateCustomConfig/ZhongYiHuLian/LoginLeft/index.jsx +33 -0
- package/src/privateCustomConfig/ZhongYiHuLian/LoginLeft/index.less +55 -0
- package/src/privateCustomConfig/ZhongYiHuLian/img/favicon.png +0 -0
- package/src/privateCustomConfig/ZhongYiHuLian/index.jsx +7 -0
- package/src/privateCustomConfig/ZhongYiHuLian/index.less +53 -0
- package/src/services/activity.js +44 -0
- package/src/services/base.js +66 -0
- package/src/services/bill.js +50 -0
- package/src/services/dataBack.js +45 -0
- package/src/services/dataUpload.js +26 -0
- package/src/services/helper.js +22 -0
- package/src/services/history.js +99 -0
- package/src/services/information.js +8 -0
- package/src/services/login.js +178 -0
- package/src/services/manage.js +203 -0
- package/src/services/mingdan.js +265 -0
- package/src/services/opinion.js +13 -0
- package/src/services/qps.ts +20 -0
- package/src/services/rank.js +26 -0
- package/src/services/riskAccount.js +25 -0
- package/src/services/strategy.js +269 -0
- package/src/services/strategyLab.js +31 -0
- package/src/services/streamInfo.ts +11 -0
- package/src/services/system.js +17 -0
- package/src/services/trend.js +154 -0
- package/src/services/twChannel.js +211 -0
- package/src/services/tx.js +24 -0
- package/src/services/user.js +127 -0
- package/src/type/index.ts +3 -0
- package/src/type.ts +32 -0
- package/src/utils/AuthorityManage.js +197 -0
- package/src/utils/Authorized.js +18 -0
- package/src/utils/adal.js +1936 -0
- package/src/utils/authority.js +36 -0
- package/src/utils/formatPrefixLink.ts +17 -0
- package/src/utils/getRejectRatio.js +18 -0
- package/src/utils/getTimeName.js +31 -0
- package/src/utils/getUniqueColor.ts +136 -0
- package/src/utils/helpers.js +168 -0
- package/src/utils/md5.js +206 -0
- package/src/utils/newRequest.js +139 -0
- package/src/utils/removeExportBtnOfForm.js +12 -0
- package/src/utils/request.js +139 -0
- package/src/utils/tableHelper.js +23 -0
- package/src/utils/translateSMImageTable.js +42 -0
- package/src/utils/utils.js +1521 -0
- package/src/wrappers/auth/ApplyNaModal/index.js +61 -0
- package/src/wrappers/auth/constants.js +114 -0
- package/src/wrappers/auth/img/account.png +0 -0
- package/src/wrappers/auth/img/article.png +0 -0
- package/src/wrappers/auth/img/audio.png +0 -0
- package/src/wrappers/auth/img/audioStream.png +0 -0
- package/src/wrappers/auth/img/blackWhite.png +0 -0
- package/src/wrappers/auth/img/captchaSverify.png +0 -0
- package/src/wrappers/auth/img/captchaVerify.png +0 -0
- package/src/wrappers/auth/img/channelAnticheat.png +0 -0
- package/src/wrappers/auth/img/channelHistory.png +0 -0
- package/src/wrappers/auth/img/channelRetain.png +0 -0
- package/src/wrappers/auth/img/device.png +0 -0
- package/src/wrappers/auth/img/event.png +0 -0
- package/src/wrappers/auth/img/login.png +0 -0
- package/src/wrappers/auth/img/noApplyAuth.png +0 -0
- package/src/wrappers/auth/img/pic.png +0 -0
- package/src/wrappers/auth/img/policy.png +0 -0
- package/src/wrappers/auth/img/register.png +0 -0
- package/src/wrappers/auth/img/success.png +0 -0
- package/src/wrappers/auth/img/team.png +0 -0
- package/src/wrappers/auth/img/text.png +0 -0
- package/src/wrappers/auth/img/video.png +0 -0
- package/src/wrappers/auth/img/videoStream.png +0 -0
- package/src/wrappers/auth/index.jsx +218 -0
- package/src/wrappers/auth/index.less +42 -0
|
@@ -0,0 +1,1936 @@
|
|
|
1
|
+
//----------------------------------------------------------------------
|
|
2
|
+
// AdalJS v1.0.17
|
|
3
|
+
// @preserve Copyright (c) Microsoft Open Technologies, Inc.
|
|
4
|
+
// All Rights Reserved
|
|
5
|
+
// Apache License 2.0
|
|
6
|
+
//
|
|
7
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
// you may not use this file except in compliance with the License.
|
|
9
|
+
// You may obtain a copy of the License at
|
|
10
|
+
//
|
|
11
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
// id
|
|
13
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
// See the License for the specific language governing permissions and
|
|
17
|
+
// limitations under the License.
|
|
18
|
+
//----------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
var AuthenticationContext = (function () {
|
|
21
|
+
|
|
22
|
+
'use strict';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Configuration options for Authentication Context.
|
|
26
|
+
* @class config
|
|
27
|
+
* @property {string} tenant - Your target tenant.
|
|
28
|
+
* @property {string} clientId - Client ID assigned to your app by Azure Active Directory.
|
|
29
|
+
* @property {string} redirectUri - Endpoint at which you expect to receive tokens.Defaults to `window.location.href`.
|
|
30
|
+
* @property {string} instance - Azure Active Directory Instance.Defaults to `https://login.microsoftonline.com/`.
|
|
31
|
+
* @property {Array} endpoints - Collection of {Endpoint-ResourceId} used for automatically attaching tokens in webApi calls.
|
|
32
|
+
* @property {Boolean} popUp - Set this to true to enable login in a popup winodow instead of a full redirect.Defaults to `false`.
|
|
33
|
+
* @property {string} localLoginUrl - Set this to redirect the user to a custom login page.
|
|
34
|
+
* @property {function} displayCall - User defined function of handling the navigation to Azure AD authorization endpoint in case of login. Defaults to 'null'.
|
|
35
|
+
* @property {string} postLogoutRedirectUri - Redirects the user to postLogoutRedirectUri after logout. Defaults is 'redirectUri'.
|
|
36
|
+
* @property {string} cacheLocation - Sets browser storage to either 'localStorage' or sessionStorage'. Defaults to 'sessionStorage'.
|
|
37
|
+
* @property {Array.<string>} anonymousEndpoints Array of keywords or URI's. Adal will not attach a token to outgoing requests that have these keywords or uri. Defaults to 'null'.
|
|
38
|
+
* @property {number} expireOffsetSeconds If the cached token is about to be expired in the expireOffsetSeconds (in seconds), Adal will renew the token instead of using the cached token. Defaults to 300 seconds.
|
|
39
|
+
* @property {string} correlationId Unique identifier used to map the request with the response. Defaults to RFC4122 version 4 guid (128 bits).
|
|
40
|
+
* @property {number} loadFrameTimeout The number of milliseconds of inactivity before a token renewal response from AAD should be considered timed out.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new AuthenticationContext object.
|
|
45
|
+
* @constructor
|
|
46
|
+
* @param {config} config Configuration options for AuthenticationContext
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
AuthenticationContext = function (config) {
|
|
50
|
+
/**
|
|
51
|
+
* Enum for request type
|
|
52
|
+
* @enum {string}
|
|
53
|
+
*/
|
|
54
|
+
this.REQUEST_TYPE = {
|
|
55
|
+
LOGIN: 'LOGIN',
|
|
56
|
+
RENEW_TOKEN: 'RENEW_TOKEN',
|
|
57
|
+
UNKNOWN: 'UNKNOWN',
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
this.RESPONSE_TYPE = {
|
|
61
|
+
ID_TOKEN_TOKEN: 'id_token token',
|
|
62
|
+
TOKEN: 'token',
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Enum for storage constants
|
|
67
|
+
* @enum {string}
|
|
68
|
+
*/
|
|
69
|
+
this.CONSTANTS = {
|
|
70
|
+
ACCESS_TOKEN: 'access_token',
|
|
71
|
+
EXPIRES_IN: 'expires_in',
|
|
72
|
+
ID_TOKEN: 'id_token',
|
|
73
|
+
ERROR_DESCRIPTION: 'error_description',
|
|
74
|
+
SESSION_STATE: 'session_state',
|
|
75
|
+
ERROR: 'error',
|
|
76
|
+
STORAGE: {
|
|
77
|
+
TOKEN_KEYS: 'adal.token.keys',
|
|
78
|
+
ACCESS_TOKEN_KEY: 'adal.access.token.key',
|
|
79
|
+
EXPIRATION_KEY: 'adal.expiration.key',
|
|
80
|
+
STATE_LOGIN: 'adal.state.login',
|
|
81
|
+
STATE_RENEW: 'adal.state.renew',
|
|
82
|
+
NONCE_IDTOKEN: 'adal.nonce.idtoken',
|
|
83
|
+
SESSION_STATE: 'adal.session.state',
|
|
84
|
+
USERNAME: 'adal.username',
|
|
85
|
+
IDTOKEN: 'adal.idtoken',
|
|
86
|
+
ERROR: 'adal.error',
|
|
87
|
+
ERROR_DESCRIPTION: 'adal.error.description',
|
|
88
|
+
LOGIN_REQUEST: 'adal.login.request',
|
|
89
|
+
LOGIN_ERROR: 'adal.login.error',
|
|
90
|
+
RENEW_STATUS: 'adal.token.renew.status',
|
|
91
|
+
ANGULAR_LOGIN_REQUEST: 'adal.angular.login.request',
|
|
92
|
+
},
|
|
93
|
+
RESOURCE_DELIMETER: '|',
|
|
94
|
+
CACHE_DELIMETER: '||',
|
|
95
|
+
LOADFRAME_TIMEOUT: 6000,
|
|
96
|
+
TOKEN_RENEW_STATUS_CANCELED: 'Canceled',
|
|
97
|
+
TOKEN_RENEW_STATUS_COMPLETED: 'Completed',
|
|
98
|
+
TOKEN_RENEW_STATUS_IN_PROGRESS: 'In Progress',
|
|
99
|
+
LOGGING_LEVEL: {
|
|
100
|
+
ERROR: 0,
|
|
101
|
+
WARN: 1,
|
|
102
|
+
INFO: 2,
|
|
103
|
+
VERBOSE: 3,
|
|
104
|
+
},
|
|
105
|
+
LEVEL_STRING_MAP: {
|
|
106
|
+
0: 'ERROR:',
|
|
107
|
+
1: 'WARNING:',
|
|
108
|
+
2: 'INFO:',
|
|
109
|
+
3: 'VERBOSE:',
|
|
110
|
+
},
|
|
111
|
+
POPUP_WIDTH: 483,
|
|
112
|
+
POPUP_HEIGHT: 600,
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
if (AuthenticationContext.prototype._singletonInstance) {
|
|
116
|
+
return AuthenticationContext.prototype._singletonInstance;
|
|
117
|
+
}
|
|
118
|
+
AuthenticationContext.prototype._singletonInstance = this;
|
|
119
|
+
|
|
120
|
+
// public
|
|
121
|
+
this.instance = 'https://login.microsoftonline.com/';
|
|
122
|
+
this.config = {};
|
|
123
|
+
this.callback = null;
|
|
124
|
+
this.popUp = false;
|
|
125
|
+
this.isAngular = false;
|
|
126
|
+
|
|
127
|
+
// private
|
|
128
|
+
this._user = null;
|
|
129
|
+
this._activeRenewals = {};
|
|
130
|
+
this._loginInProgress = false;
|
|
131
|
+
this._acquireTokenInProgress = false;
|
|
132
|
+
this._renewStates = [];
|
|
133
|
+
this._callBackMappedToRenewStates = {};
|
|
134
|
+
this._callBacksMappedToRenewStates = {};
|
|
135
|
+
this._openedWindows = [];
|
|
136
|
+
this._requestType = this.REQUEST_TYPE.LOGIN;
|
|
137
|
+
window._adalInstance = this;
|
|
138
|
+
|
|
139
|
+
// validate before constructor assignments
|
|
140
|
+
if (config.displayCall && typeof config.displayCall !== 'function') {
|
|
141
|
+
throw new Error('displayCall is not a function');
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (!config.clientId) {
|
|
145
|
+
throw new Error('clientId is required');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
this.config = this._cloneConfig(config);
|
|
149
|
+
|
|
150
|
+
if (this.config.navigateToLoginRequestUrl === undefined)
|
|
151
|
+
{this.config.navigateToLoginRequestUrl = true;}
|
|
152
|
+
|
|
153
|
+
if (this.config.popUp)
|
|
154
|
+
{this.popUp = true;}
|
|
155
|
+
|
|
156
|
+
if (this.config.callback && typeof this.config.callback === 'function')
|
|
157
|
+
{this.callback = this.config.callback;}
|
|
158
|
+
|
|
159
|
+
if (this.config.instance) {
|
|
160
|
+
this.instance = this.config.instance;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// App can request idtoken for itself using clientid as resource
|
|
164
|
+
if (!this.config.loginResource) {
|
|
165
|
+
this.config.loginResource = this.config.clientId;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// redirect and logout_redirect are set to current location by default
|
|
169
|
+
if (!this.config.redirectUri) {
|
|
170
|
+
// strip off query parameters or hashes from the redirect uri as AAD does not allow those.
|
|
171
|
+
this.config.redirectUri = window.location.href.split('?')[0].split('#')[0];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (!this.config.postLogoutRedirectUri) {
|
|
175
|
+
// strip off query parameters or hashes from the post logout redirect uri as AAD does not allow those.
|
|
176
|
+
this.config.postLogoutRedirectUri = window.location.href.split('?')[0].split('#')[0];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (!this.config.anonymousEndpoints) {
|
|
180
|
+
this.config.anonymousEndpoints = [];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (this.config.isAngular) {
|
|
184
|
+
this.isAngular = this.config.isAngular;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (this.config.loadFrameTimeout) {
|
|
188
|
+
this.CONSTANTS.LOADFRAME_TIMEOUT = this.config.loadFrameTimeout;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
if (typeof window !== 'undefined') {
|
|
193
|
+
window.Logging = {
|
|
194
|
+
piiLoggingEnabled: false,
|
|
195
|
+
level: 0,
|
|
196
|
+
log: function (message) { },
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Initiates the login process by redirecting the user to Azure AD authorization endpoint.
|
|
202
|
+
*/
|
|
203
|
+
AuthenticationContext.prototype.login = function () {
|
|
204
|
+
if (this._loginInProgress) {
|
|
205
|
+
this.info('Login in progress');
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
this._loginInProgress = true;
|
|
210
|
+
|
|
211
|
+
// Token is not present and user needs to login
|
|
212
|
+
let expectedState = this._guid();
|
|
213
|
+
this.config.state = expectedState;
|
|
214
|
+
this._idTokenNonce = this._guid();
|
|
215
|
+
let loginStartPage = this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);
|
|
216
|
+
|
|
217
|
+
if (!loginStartPage || loginStartPage === '') {
|
|
218
|
+
loginStartPage = window.location.href;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST, '');
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
this.verbose('Expected state: ' + expectedState + ' startPage:' + loginStartPage);
|
|
225
|
+
this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST, loginStartPage);
|
|
226
|
+
this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, '');
|
|
227
|
+
this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN, expectedState, true);
|
|
228
|
+
this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, true);
|
|
229
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR, '');
|
|
230
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, '');
|
|
231
|
+
let urlNavigate = this._getNavigateUrl('id_token', null) + '&nonce=' + encodeURIComponent(this._idTokenNonce);
|
|
232
|
+
if (this.config.displayCall) {
|
|
233
|
+
// User defined way of handling the navigation
|
|
234
|
+
this.config.displayCall(urlNavigate);
|
|
235
|
+
}
|
|
236
|
+
else if (this.popUp) {
|
|
237
|
+
this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN, '');// so requestInfo does not match redirect case
|
|
238
|
+
this._renewStates.push(expectedState);
|
|
239
|
+
this.registerCallback(expectedState, this.config.clientId, this.callback);
|
|
240
|
+
this._loginPopup(urlNavigate);
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
this.promptUser(urlNavigate);
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Configures popup window for login.
|
|
249
|
+
* @ignore
|
|
250
|
+
*/
|
|
251
|
+
AuthenticationContext.prototype._openPopup = function (urlNavigate, title, popUpWidth, popUpHeight) {
|
|
252
|
+
try {
|
|
253
|
+
/**
|
|
254
|
+
* adding winLeft and winTop to account for dual monitor
|
|
255
|
+
* using screenLeft and screenTop for IE8 and earlier
|
|
256
|
+
*/
|
|
257
|
+
let winLeft = window.screenLeft ? window.screenLeft : window.screenX;
|
|
258
|
+
let winTop = window.screenTop ? window.screenTop : window.screenY;
|
|
259
|
+
/**
|
|
260
|
+
* window.innerWidth displays browser window's height and width excluding toolbars
|
|
261
|
+
* using document.documentElement.clientWidth for IE8 and earlier
|
|
262
|
+
*/
|
|
263
|
+
let width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
264
|
+
let height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
|
265
|
+
let left = ((width / 2) - (popUpWidth / 2)) + winLeft;
|
|
266
|
+
let top = ((height / 2) - (popUpHeight / 2)) + winTop;
|
|
267
|
+
|
|
268
|
+
let popupWindow = window.open(urlNavigate, title, 'width=' + popUpWidth + ', height=' + popUpHeight + ', top=' + top + ', left=' + left);
|
|
269
|
+
|
|
270
|
+
if (popupWindow.focus) {
|
|
271
|
+
popupWindow.focus();
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return popupWindow;
|
|
275
|
+
} catch (e) {
|
|
276
|
+
this.warn('Error opening popup, ' + e.message);
|
|
277
|
+
this._loginInProgress = false;
|
|
278
|
+
this._acquireTokenInProgress = false;
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
AuthenticationContext.prototype._handlePopupError = function (loginCallback, resource, error, errorDesc, loginError) {
|
|
284
|
+
this.warn(errorDesc);
|
|
285
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR, error);
|
|
286
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, errorDesc);
|
|
287
|
+
this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, loginError);
|
|
288
|
+
|
|
289
|
+
if (resource && this._activeRenewals[resource]) {
|
|
290
|
+
this._activeRenewals[resource] = null;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
this._loginInProgress = false;
|
|
294
|
+
this._acquireTokenInProgress = false;
|
|
295
|
+
|
|
296
|
+
if (loginCallback) {
|
|
297
|
+
loginCallback(errorDesc, null, error);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* After authorization, the user will be sent to your specified redirect_uri with the user's bearer token
|
|
303
|
+
* attached to the URI fragment as an id_token field. It closes popup window after redirection.
|
|
304
|
+
* @ignore
|
|
305
|
+
*/
|
|
306
|
+
AuthenticationContext.prototype._loginPopup = function (urlNavigate, resource, callback) {
|
|
307
|
+
let popupWindow = this._openPopup(urlNavigate, 'login', this.CONSTANTS.POPUP_WIDTH, this.CONSTANTS.POPUP_HEIGHT);
|
|
308
|
+
let loginCallback = callback || this.callback;
|
|
309
|
+
|
|
310
|
+
if (popupWindow == null) {
|
|
311
|
+
let error = 'Error opening popup';
|
|
312
|
+
let errorDesc = 'Popup Window is null. This can happen if you are using IE';
|
|
313
|
+
this._handlePopupError(loginCallback, resource, error, errorDesc, errorDesc);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
this._openedWindows.push(popupWindow);
|
|
318
|
+
|
|
319
|
+
if (this.config.redirectUri.indexOf('#') != -1) {
|
|
320
|
+
var registeredRedirectUri = this.config.redirectUri.split('#')[0];
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
else {
|
|
324
|
+
var registeredRedirectUri = this.config.redirectUri;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
let that = this;
|
|
328
|
+
|
|
329
|
+
var pollTimer = window.setInterval(function () {
|
|
330
|
+
if (!popupWindow || popupWindow.closed || popupWindow.closed === undefined) {
|
|
331
|
+
let error = 'Popup Window closed';
|
|
332
|
+
let errorDesc = 'Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge';
|
|
333
|
+
|
|
334
|
+
if (that.isAngular) {
|
|
335
|
+
that._broadcast('adal:popUpClosed', errorDesc + that.CONSTANTS.RESOURCE_DELIMETER + error);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
that._handlePopupError(loginCallback, resource, error, errorDesc, errorDesc);
|
|
339
|
+
window.clearInterval(pollTimer);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
try {
|
|
343
|
+
let popUpWindowLocation = popupWindow.location;
|
|
344
|
+
if (encodeURI(popUpWindowLocation.href).indexOf(encodeURI(registeredRedirectUri)) != -1) {
|
|
345
|
+
if (that.isAngular) {
|
|
346
|
+
that._broadcast('adal:popUpHashChanged', popUpWindowLocation.hash);
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
that.handleWindowCallback(popUpWindowLocation.hash);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
window.clearInterval(pollTimer);
|
|
353
|
+
that._loginInProgress = false;
|
|
354
|
+
that._acquireTokenInProgress = false;
|
|
355
|
+
that.info('Closing popup window');
|
|
356
|
+
that._openedWindows = [];
|
|
357
|
+
popupWindow.close();
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
} catch (e) {
|
|
361
|
+
}
|
|
362
|
+
}, 1);
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
AuthenticationContext.prototype._broadcast = function (eventName, data) {
|
|
366
|
+
// Custom Event is not supported in IE, below IIFE will polyfill the CustomEvent() constructor functionality in Internet Explorer 9 and higher
|
|
367
|
+
(function () {
|
|
368
|
+
|
|
369
|
+
if (typeof window.CustomEvent === 'function') {
|
|
370
|
+
return false;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function CustomEvent(event, params) {
|
|
374
|
+
params = params || { bubbles: false, cancelable: false, detail: undefined };
|
|
375
|
+
let evt = document.createEvent('CustomEvent');
|
|
376
|
+
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
377
|
+
return evt;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
CustomEvent.prototype = window.Event.prototype;
|
|
381
|
+
window.CustomEvent = CustomEvent;
|
|
382
|
+
})();
|
|
383
|
+
|
|
384
|
+
let evt = new CustomEvent(eventName, { detail: data });
|
|
385
|
+
window.dispatchEvent(evt);
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
AuthenticationContext.prototype.loginInProgress = function () {
|
|
389
|
+
return this._loginInProgress;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Checks for the resource in the cache. By default, cache location is Session Storage
|
|
394
|
+
* @ignore
|
|
395
|
+
* @returns {Boolean} 'true' if login is in progress, else returns 'false'.
|
|
396
|
+
*/
|
|
397
|
+
AuthenticationContext.prototype._hasResource = function (key) {
|
|
398
|
+
let keys = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);
|
|
399
|
+
return keys && !this._isEmpty(keys) && (keys.indexOf(key + this.CONSTANTS.RESOURCE_DELIMETER) > -1);
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Gets token for the specified resource from the cache.
|
|
404
|
+
* @param {string} resource A URI that identifies the resource for which the token is requested.
|
|
405
|
+
* @returns {string} token if if it exists and not expired, otherwise null.
|
|
406
|
+
*/
|
|
407
|
+
AuthenticationContext.prototype.getCachedToken = function (resource) {
|
|
408
|
+
if (!this._hasResource(resource)) {
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
let token = this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource);
|
|
413
|
+
let expiry = this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource);
|
|
414
|
+
|
|
415
|
+
// If expiration is within offset, it will force renew
|
|
416
|
+
let offset = this.config.expireOffsetSeconds || 300;
|
|
417
|
+
|
|
418
|
+
if (expiry && (expiry > this._now() + offset)) {
|
|
419
|
+
return token;
|
|
420
|
+
}
|
|
421
|
+
this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource, '');
|
|
422
|
+
this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource, 0);
|
|
423
|
+
return null;
|
|
424
|
+
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* User information from idtoken.
|
|
429
|
+
* @class User
|
|
430
|
+
* @property {string} userName - username assigned from upn or email.
|
|
431
|
+
* @property {object} profile - properties parsed from idtoken.
|
|
432
|
+
*/
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* If user object exists, returns it. Else creates a new user object by decoding id_token from the cache.
|
|
436
|
+
* @returns {User} user object
|
|
437
|
+
*/
|
|
438
|
+
AuthenticationContext.prototype.getCachedUser = function () {
|
|
439
|
+
if (this._user) {
|
|
440
|
+
return this._user;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
let idtoken = this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);
|
|
444
|
+
this._user = this._createUser(idtoken);
|
|
445
|
+
return this._user;
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Adds the passed callback to the array of callbacks for the specified resource and puts the array on the window object.
|
|
450
|
+
* @param {string} resource A URI that identifies the resource for which the token is requested.
|
|
451
|
+
* @param {string} expectedState A unique identifier (guid).
|
|
452
|
+
* @param {tokenCallback} callback - The callback provided by the caller. It will be called with token or error.
|
|
453
|
+
*/
|
|
454
|
+
AuthenticationContext.prototype.registerCallback = function (expectedState, resource, callback) {
|
|
455
|
+
this._activeRenewals[resource] = expectedState;
|
|
456
|
+
|
|
457
|
+
if (!this._callBacksMappedToRenewStates[expectedState]) {
|
|
458
|
+
this._callBacksMappedToRenewStates[expectedState] = [];
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
let self = this;
|
|
462
|
+
this._callBacksMappedToRenewStates[expectedState].push(callback);
|
|
463
|
+
|
|
464
|
+
if (!this._callBackMappedToRenewStates[expectedState]) {
|
|
465
|
+
this._callBackMappedToRenewStates[expectedState] = function (errorDesc, token, error, tokenType) {
|
|
466
|
+
self._activeRenewals[resource] = null;
|
|
467
|
+
|
|
468
|
+
for (let i = 0; i < self._callBacksMappedToRenewStates[expectedState].length; ++i) {
|
|
469
|
+
try {
|
|
470
|
+
self._callBacksMappedToRenewStates[expectedState][i](errorDesc, token, error, tokenType);
|
|
471
|
+
}
|
|
472
|
+
catch (error) {
|
|
473
|
+
self.warn(error);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
self._callBacksMappedToRenewStates[expectedState] = null;
|
|
478
|
+
self._callBackMappedToRenewStates[expectedState] = null;
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
// var errorResponse = {error:'', error_description:''};
|
|
484
|
+
// var token = 'string token';
|
|
485
|
+
// callback(errorResponse, token)
|
|
486
|
+
// with callback
|
|
487
|
+
/**
|
|
488
|
+
* Acquires access token with hidden iframe
|
|
489
|
+
* @ignore
|
|
490
|
+
*/
|
|
491
|
+
AuthenticationContext.prototype._renewToken = function (resource, callback, responseType) {
|
|
492
|
+
// use iframe to try to renew token
|
|
493
|
+
// use given resource to create new authz url
|
|
494
|
+
this.info('renewToken is called for resource:' + resource);
|
|
495
|
+
let frameHandle = this._addAdalFrame('adalRenewFrame' + resource);
|
|
496
|
+
let expectedState = this._guid() + '|' + resource;
|
|
497
|
+
this.config.state = expectedState;
|
|
498
|
+
// renew happens in iframe, so it keeps javascript context
|
|
499
|
+
this._renewStates.push(expectedState);
|
|
500
|
+
this.verbose('Renew token Expected state: ' + expectedState);
|
|
501
|
+
// remove the existing prompt=... query parameter and add prompt=none
|
|
502
|
+
responseType = responseType || 'token';
|
|
503
|
+
let urlNavigate = this._urlRemoveQueryStringParameter(this._getNavigateUrl(responseType, resource), 'prompt');
|
|
504
|
+
|
|
505
|
+
if (responseType === this.RESPONSE_TYPE.ID_TOKEN_TOKEN) {
|
|
506
|
+
this._idTokenNonce = this._guid();
|
|
507
|
+
this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, true);
|
|
508
|
+
urlNavigate += '&nonce=' + encodeURIComponent(this._idTokenNonce);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
urlNavigate = urlNavigate + '&prompt=none';
|
|
512
|
+
urlNavigate = this._addHintParameters(urlNavigate);
|
|
513
|
+
this.registerCallback(expectedState, resource, callback);
|
|
514
|
+
this.verbosePii('Navigate to:' + urlNavigate);
|
|
515
|
+
frameHandle.src = 'about:blank';
|
|
516
|
+
this._loadFrameTimeout(urlNavigate, 'adalRenewFrame' + resource, resource);
|
|
517
|
+
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Renews idtoken for app's own backend when resource is clientId and calls the callback with token/error
|
|
522
|
+
* @ignore
|
|
523
|
+
*/
|
|
524
|
+
AuthenticationContext.prototype._renewIdToken = function (callback, responseType) {
|
|
525
|
+
// use iframe to try to renew token
|
|
526
|
+
this.info('renewIdToken is called');
|
|
527
|
+
let frameHandle = this._addAdalFrame('adalIdTokenFrame');
|
|
528
|
+
let expectedState = this._guid() + '|' + this.config.clientId;
|
|
529
|
+
this._idTokenNonce = this._guid();
|
|
530
|
+
this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, true);
|
|
531
|
+
this.config.state = expectedState;
|
|
532
|
+
// renew happens in iframe, so it keeps javascript context
|
|
533
|
+
this._renewStates.push(expectedState);
|
|
534
|
+
this.verbose('Renew Idtoken Expected state: ' + expectedState);
|
|
535
|
+
// remove the existing prompt=... query parameter and add prompt=none
|
|
536
|
+
let resource = responseType === null || typeof (responseType) === 'undefined' ? null : this.config.clientId;
|
|
537
|
+
var responseType = responseType || 'id_token';
|
|
538
|
+
let urlNavigate = this._urlRemoveQueryStringParameter(this._getNavigateUrl(responseType, resource), 'prompt');
|
|
539
|
+
urlNavigate = urlNavigate + '&prompt=none';
|
|
540
|
+
urlNavigate = this._addHintParameters(urlNavigate);
|
|
541
|
+
urlNavigate += '&nonce=' + encodeURIComponent(this._idTokenNonce);
|
|
542
|
+
this.registerCallback(expectedState, this.config.clientId, callback);
|
|
543
|
+
this.verbosePii('Navigate to:' + urlNavigate);
|
|
544
|
+
frameHandle.src = 'about:blank';
|
|
545
|
+
this._loadFrameTimeout(urlNavigate, 'adalIdTokenFrame', this.config.clientId);
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Checks if the authorization endpoint URL contains query string parameters
|
|
550
|
+
* @ignore
|
|
551
|
+
*/
|
|
552
|
+
AuthenticationContext.prototype._urlContainsQueryStringParameter = function (name, url) {
|
|
553
|
+
// regex to detect pattern of a ? or & followed by the name parameter and an equals character
|
|
554
|
+
let regex = new RegExp('[\\?&]' + name + '=');
|
|
555
|
+
return regex.test(url);
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Removes the query string parameter from the authorization endpoint URL if it exists
|
|
560
|
+
* @ignore
|
|
561
|
+
*/
|
|
562
|
+
AuthenticationContext.prototype._urlRemoveQueryStringParameter = function (url, name) {
|
|
563
|
+
// we remove &name=value, name=value& and name=value
|
|
564
|
+
// &name=value
|
|
565
|
+
let regex = new RegExp('(\\&' + name + '=)[^\&]+');
|
|
566
|
+
url = url.replace(regex, '');
|
|
567
|
+
// name=value&
|
|
568
|
+
regex = new RegExp('(' + name + '=)[^\&]+&');
|
|
569
|
+
url = url.replace(regex, '');
|
|
570
|
+
// name=value
|
|
571
|
+
regex = new RegExp('(' + name + '=)[^\&]+');
|
|
572
|
+
url = url.replace(regex, '');
|
|
573
|
+
return url;
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
// Calling _loadFrame but with a timeout to signal failure in loadframeStatus. Callbacks are left
|
|
577
|
+
// registered when network errors occur and subsequent token requests for same resource are registered to the pending request
|
|
578
|
+
/**
|
|
579
|
+
* @ignore
|
|
580
|
+
*/
|
|
581
|
+
AuthenticationContext.prototype._loadFrameTimeout = function (urlNavigation, frameName, resource) {
|
|
582
|
+
// set iframe session to pending
|
|
583
|
+
this.verbose('Set loading state to pending for: ' + resource);
|
|
584
|
+
this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS + resource, this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS);
|
|
585
|
+
this._loadFrame(urlNavigation, frameName);
|
|
586
|
+
let self = this;
|
|
587
|
+
|
|
588
|
+
setTimeout(function () {
|
|
589
|
+
if (self._getItem(self.CONSTANTS.STORAGE.RENEW_STATUS + resource) === self.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS) {
|
|
590
|
+
// fail the iframe session if it's in pending state
|
|
591
|
+
self.verbose('Loading frame has timed out after: ' + (self.CONSTANTS.LOADFRAME_TIMEOUT / 1000) + ' seconds for resource ' + resource);
|
|
592
|
+
let expectedState = self._activeRenewals[resource];
|
|
593
|
+
|
|
594
|
+
if (expectedState && self._callBackMappedToRenewStates[expectedState]) {
|
|
595
|
+
self._callBackMappedToRenewStates[expectedState]('Token renewal operation failed due to timeout', null, 'Token Renewal Failed');
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
self._saveItem(self.CONSTANTS.STORAGE.RENEW_STATUS + resource, self.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED);
|
|
599
|
+
}
|
|
600
|
+
}, self.CONSTANTS.LOADFRAME_TIMEOUT);
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Loads iframe with authorization endpoint URL
|
|
605
|
+
* @ignore
|
|
606
|
+
*/
|
|
607
|
+
AuthenticationContext.prototype._loadFrame = function (urlNavigate, frameName) {
|
|
608
|
+
// This trick overcomes iframe navigation in IE
|
|
609
|
+
// IE does not load the page consistently in iframe
|
|
610
|
+
let self = this;
|
|
611
|
+
self.info('LoadFrame: ' + frameName);
|
|
612
|
+
let frameCheck = frameName;
|
|
613
|
+
setTimeout(function () {
|
|
614
|
+
let frameHandle = self._addAdalFrame(frameCheck);
|
|
615
|
+
|
|
616
|
+
if (frameHandle.src === '' || frameHandle.src === 'about:blank') {
|
|
617
|
+
frameHandle.src = urlNavigate;
|
|
618
|
+
self._loadFrame(urlNavigate, frameCheck);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
}, 500);
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* @callback tokenCallback
|
|
626
|
+
* @param {string} error_description error description returned from AAD if token request fails.
|
|
627
|
+
* @param {string} token token returned from AAD if token request is successful.
|
|
628
|
+
* @param {string} error error message returned from AAD if token request fails.
|
|
629
|
+
*/
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Acquires token from the cache if it is not expired. Otherwise sends request to AAD to obtain a new token.
|
|
633
|
+
* @param {string} resource ResourceUri identifying the target resource
|
|
634
|
+
* @param {tokenCallback} callback - The callback provided by the caller. It will be called with token or error.
|
|
635
|
+
*/
|
|
636
|
+
AuthenticationContext.prototype.acquireToken = function (resource, callback) {
|
|
637
|
+
if (this._isEmpty(resource)) {
|
|
638
|
+
this.warn('resource is required');
|
|
639
|
+
callback('resource is required', null, 'resource is required');
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
let token = this.getCachedToken(resource);
|
|
644
|
+
|
|
645
|
+
if (token) {
|
|
646
|
+
this.info('Token is already in cache for resource:' + resource);
|
|
647
|
+
callback(null, token, null);
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
if (!this._user && !(this.config.extraQueryParameter && this.config.extraQueryParameter.indexOf('login_hint') !== -1)) {
|
|
652
|
+
this.warn('User login is required');
|
|
653
|
+
callback('User login is required', null, 'login required');
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
// renew attempt with iframe
|
|
658
|
+
// Already renewing for this resource, callback when we get the token.
|
|
659
|
+
if (this._activeRenewals[resource]) {
|
|
660
|
+
// Active renewals contains the state for each renewal.
|
|
661
|
+
this.registerCallback(this._activeRenewals[resource], resource, callback);
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
this._requestType = this.REQUEST_TYPE.RENEW_TOKEN;
|
|
665
|
+
if (resource === this.config.clientId) {
|
|
666
|
+
// App uses idtoken to send to api endpoints
|
|
667
|
+
// Default resource is tracked as clientid to store this token
|
|
668
|
+
if (this._user) {
|
|
669
|
+
this.verbose('renewing idtoken');
|
|
670
|
+
this._renewIdToken(callback);
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
this.verbose('renewing idtoken and access_token');
|
|
674
|
+
this._renewIdToken(callback, this.RESPONSE_TYPE.ID_TOKEN_TOKEN);
|
|
675
|
+
}
|
|
676
|
+
} else {
|
|
677
|
+
if (this._user) {
|
|
678
|
+
this.verbose('renewing access_token');
|
|
679
|
+
this._renewToken(resource, callback);
|
|
680
|
+
}
|
|
681
|
+
else {
|
|
682
|
+
this.verbose('renewing idtoken and access_token');
|
|
683
|
+
this._renewToken(resource, callback, this.RESPONSE_TYPE.ID_TOKEN_TOKEN);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* Acquires token (interactive flow using a popUp window) by sending request to AAD to obtain a new token.
|
|
691
|
+
* @param {string} resource ResourceUri identifying the target resource
|
|
692
|
+
* @param {string} extraQueryParameters extraQueryParameters to add to the authentication request
|
|
693
|
+
* @param {tokenCallback} callback - The callback provided by the caller. It will be called with token or error.
|
|
694
|
+
*/
|
|
695
|
+
AuthenticationContext.prototype.acquireTokenPopup = function (resource, extraQueryParameters, claims, callback) {
|
|
696
|
+
if (this._isEmpty(resource)) {
|
|
697
|
+
this.warn('resource is required');
|
|
698
|
+
callback('resource is required', null, 'resource is required');
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
if (!this._user) {
|
|
703
|
+
this.warn('User login is required');
|
|
704
|
+
callback('User login is required', null, 'login required');
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
if (this._acquireTokenInProgress) {
|
|
709
|
+
this.warn('Acquire token interactive is already in progress');
|
|
710
|
+
callback('Acquire token interactive is already in progress', null, 'Acquire token interactive is already in progress');
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
let expectedState = this._guid() + '|' + resource;
|
|
715
|
+
this.config.state = expectedState;
|
|
716
|
+
this._renewStates.push(expectedState);
|
|
717
|
+
this._requestType = this.REQUEST_TYPE.RENEW_TOKEN;
|
|
718
|
+
this.verbose('Renew token Expected state: ' + expectedState);
|
|
719
|
+
// remove the existing prompt=... query parameter and add prompt=select_account
|
|
720
|
+
let urlNavigate = this._urlRemoveQueryStringParameter(this._getNavigateUrl('token', resource), 'prompt');
|
|
721
|
+
urlNavigate = urlNavigate + '&prompt=select_account';
|
|
722
|
+
|
|
723
|
+
if (extraQueryParameters) {
|
|
724
|
+
urlNavigate += extraQueryParameters;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
if (claims && (urlNavigate.indexOf('&claims') === -1)) {
|
|
728
|
+
urlNavigate += '&claims=' + encodeURIComponent(claims);
|
|
729
|
+
}
|
|
730
|
+
else if (claims && (urlNavigate.indexOf('&claims') !== -1)) {
|
|
731
|
+
throw new Error('Claims cannot be passed as an extraQueryParameter');
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
urlNavigate = this._addHintParameters(urlNavigate);
|
|
735
|
+
this._acquireTokenInProgress = true;
|
|
736
|
+
this.info('acquireToken interactive is called for the resource ' + resource);
|
|
737
|
+
this.registerCallback(expectedState, resource, callback);
|
|
738
|
+
this._loginPopup(urlNavigate, resource, callback);
|
|
739
|
+
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Acquires token (interactive flow using a redirect) by sending request to AAD to obtain a new token. In this case the callback passed in the Authentication
|
|
744
|
+
* request constructor will be called.
|
|
745
|
+
* @param {string} resource ResourceUri identifying the target resource
|
|
746
|
+
* @param {string} extraQueryParameters extraQueryParameters to add to the authentication request
|
|
747
|
+
*/
|
|
748
|
+
AuthenticationContext.prototype.acquireTokenRedirect = function (resource, extraQueryParameters, claims) {
|
|
749
|
+
if (this._isEmpty(resource)) {
|
|
750
|
+
this.warn('resource is required');
|
|
751
|
+
callback('resource is required', null, 'resource is required');
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
var callback = this.callback;
|
|
756
|
+
|
|
757
|
+
if (!this._user) {
|
|
758
|
+
this.warn('User login is required');
|
|
759
|
+
callback('User login is required', null, 'login required');
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
if (this._acquireTokenInProgress) {
|
|
764
|
+
this.warn('Acquire token interactive is already in progress');
|
|
765
|
+
callback('Acquire token interactive is already in progress', null, 'Acquire token interactive is already in progress');
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
let expectedState = this._guid() + '|' + resource;
|
|
770
|
+
this.config.state = expectedState;
|
|
771
|
+
this.verbose('Renew token Expected state: ' + expectedState);
|
|
772
|
+
|
|
773
|
+
// remove the existing prompt=... query parameter and add prompt=select_account
|
|
774
|
+
let urlNavigate = this._urlRemoveQueryStringParameter(this._getNavigateUrl('token', resource), 'prompt');
|
|
775
|
+
urlNavigate = urlNavigate + '&prompt=select_account';
|
|
776
|
+
if (extraQueryParameters) {
|
|
777
|
+
urlNavigate += extraQueryParameters;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
if (claims && (urlNavigate.indexOf('&claims') === -1)) {
|
|
781
|
+
urlNavigate += '&claims=' + encodeURIComponent(claims);
|
|
782
|
+
}
|
|
783
|
+
else if (claims && (urlNavigate.indexOf('&claims') !== -1)) {
|
|
784
|
+
throw new Error('Claims cannot be passed as an extraQueryParameter');
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
urlNavigate = this._addHintParameters(urlNavigate);
|
|
788
|
+
this._acquireTokenInProgress = true;
|
|
789
|
+
this.info('acquireToken interactive is called for the resource ' + resource);
|
|
790
|
+
this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST, window.location.href);
|
|
791
|
+
this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW, expectedState, true);
|
|
792
|
+
this.promptUser(urlNavigate);
|
|
793
|
+
};
|
|
794
|
+
/**
|
|
795
|
+
* Redirects the browser to Azure AD authorization endpoint.
|
|
796
|
+
* @param {string} urlNavigate Url of the authorization endpoint.
|
|
797
|
+
*/
|
|
798
|
+
AuthenticationContext.prototype.promptUser = function (urlNavigate) {
|
|
799
|
+
if (urlNavigate) {
|
|
800
|
+
this.infoPii('Navigate to:' + urlNavigate);
|
|
801
|
+
window.location.replace(urlNavigate);
|
|
802
|
+
} else {
|
|
803
|
+
this.info('Navigate url is empty');
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Clears cache items.
|
|
809
|
+
*/
|
|
810
|
+
AuthenticationContext.prototype.clearCache = function () {
|
|
811
|
+
this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST, '');
|
|
812
|
+
this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST, '');
|
|
813
|
+
this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE, '');
|
|
814
|
+
this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN, '');
|
|
815
|
+
this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW, '');
|
|
816
|
+
this._renewStates = [];
|
|
817
|
+
this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, '');
|
|
818
|
+
this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN, '');
|
|
819
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR, '');
|
|
820
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, '');
|
|
821
|
+
this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, '');
|
|
822
|
+
this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, '');
|
|
823
|
+
let keys = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);
|
|
824
|
+
|
|
825
|
+
if (!this._isEmpty(keys)) {
|
|
826
|
+
keys = keys.split(this.CONSTANTS.RESOURCE_DELIMETER);
|
|
827
|
+
for (let i = 0; i < keys.length && keys[i] !== ''; i++) {
|
|
828
|
+
this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + keys[i], '');
|
|
829
|
+
this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + keys[i], 0);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS, '');
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Clears cache items for a given resource.
|
|
838
|
+
* @param {string} resource a URI that identifies the resource.
|
|
839
|
+
*/
|
|
840
|
+
AuthenticationContext.prototype.clearCacheForResource = function (resource) {
|
|
841
|
+
this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW, '');
|
|
842
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR, '');
|
|
843
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, '');
|
|
844
|
+
|
|
845
|
+
if (this._hasResource(resource)) {
|
|
846
|
+
this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource, '');
|
|
847
|
+
this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource, 0);
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Redirects user to logout endpoint.
|
|
853
|
+
* After logout, it will redirect to postLogoutRedirectUri if added as a property on the config object.
|
|
854
|
+
*/
|
|
855
|
+
AuthenticationContext.prototype.logOut = function () {
|
|
856
|
+
this.clearCache();
|
|
857
|
+
this._user = null;
|
|
858
|
+
let urlNavigate;
|
|
859
|
+
|
|
860
|
+
if (this.config.logOutUri) {
|
|
861
|
+
urlNavigate = this.config.logOutUri;
|
|
862
|
+
} else {
|
|
863
|
+
let tenant = 'common';
|
|
864
|
+
let logout = '';
|
|
865
|
+
|
|
866
|
+
if (this.config.tenant) {
|
|
867
|
+
tenant = this.config.tenant;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
if (this.config.postLogoutRedirectUri) {
|
|
871
|
+
logout = 'post_logout_redirect_uri=' + encodeURIComponent(this.config.postLogoutRedirectUri);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
urlNavigate = this.instance + tenant + '/oauth2/logout?' + logout;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
this.infoPii('Logout navigate to: ' + urlNavigate);
|
|
878
|
+
this.promptUser(urlNavigate);
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
AuthenticationContext.prototype._isEmpty = function (str) {
|
|
882
|
+
return (typeof str === 'undefined' || !str || 0 === str.length);
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* @callback userCallback
|
|
887
|
+
* @param {string} error error message if user info is not available.
|
|
888
|
+
* @param {User} user user object retrieved from the cache.
|
|
889
|
+
*/
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Calls the passed in callback with the user object or error message related to the user.
|
|
893
|
+
* @param {userCallback} callback - The callback provided by the caller. It will be called with user or error.
|
|
894
|
+
*/
|
|
895
|
+
AuthenticationContext.prototype.getUser = function (callback) {
|
|
896
|
+
// IDToken is first call
|
|
897
|
+
if (typeof callback !== 'function') {
|
|
898
|
+
throw new Error('callback is not a function');
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
// user in memory
|
|
902
|
+
if (this._user) {
|
|
903
|
+
callback(null, this._user);
|
|
904
|
+
return;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
// frame is used to get idtoken
|
|
908
|
+
let idtoken = this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);
|
|
909
|
+
|
|
910
|
+
if (!this._isEmpty(idtoken)) {
|
|
911
|
+
this.info('User exists in cache: ');
|
|
912
|
+
this._user = this._createUser(idtoken);
|
|
913
|
+
callback(null, this._user);
|
|
914
|
+
} else {
|
|
915
|
+
this.warn('User information is not available');
|
|
916
|
+
callback('User information is not available', null);
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* Adds login_hint to authorization URL which is used to pre-fill the username field of sign in page for the user if known ahead of time.
|
|
922
|
+
* domain_hint can be one of users/organisations which when added skips the email based discovery process of the user.
|
|
923
|
+
* @ignore
|
|
924
|
+
*/
|
|
925
|
+
AuthenticationContext.prototype._addHintParameters = function (urlNavigate) {
|
|
926
|
+
// If you don抰 use prompt=none, then if the session does not exist, there will be a failure.
|
|
927
|
+
// If sid is sent alongside domain or login hints, there will be a failure since request is ambiguous.
|
|
928
|
+
// If sid is sent with a prompt value other than none or attempt_none, there will be a failure since the request is ambiguous.
|
|
929
|
+
|
|
930
|
+
if (this._user && this._user.profile) {
|
|
931
|
+
if (this._user.profile.sid && urlNavigate.indexOf('&prompt=none') !== -1) {
|
|
932
|
+
// don't add sid twice if user provided it in the extraQueryParameter value
|
|
933
|
+
if (!this._urlContainsQueryStringParameter('sid', urlNavigate)) {
|
|
934
|
+
// add sid
|
|
935
|
+
urlNavigate += '&sid=' + encodeURIComponent(this._user.profile.sid);
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
else if (this._user.profile.upn) {
|
|
939
|
+
// don't add login_hint twice if user provided it in the extraQueryParameter value
|
|
940
|
+
if (!this._urlContainsQueryStringParameter('login_hint', urlNavigate)) {
|
|
941
|
+
// add login_hint
|
|
942
|
+
urlNavigate += '&login_hint=' + encodeURIComponent(this._user.profile.upn);
|
|
943
|
+
}
|
|
944
|
+
// don't add domain_hint twice if user provided it in the extraQueryParameter value
|
|
945
|
+
if (!this._urlContainsQueryStringParameter('domain_hint', urlNavigate) && this._user.profile.upn.indexOf('@') > -1) {
|
|
946
|
+
let parts = this._user.profile.upn.split('@');
|
|
947
|
+
// local part can include @ in quotes. Sending last part handles that.
|
|
948
|
+
urlNavigate += '&domain_hint=' + encodeURIComponent(parts[parts.length - 1]);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
return urlNavigate;
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Creates a user object by decoding the id_token
|
|
959
|
+
* @ignore
|
|
960
|
+
*/
|
|
961
|
+
AuthenticationContext.prototype._createUser = function (idToken) {
|
|
962
|
+
let user = null;
|
|
963
|
+
let parsedJson = this._extractIdToken(idToken);
|
|
964
|
+
if (parsedJson && parsedJson.hasOwnProperty('aud')) {
|
|
965
|
+
if (parsedJson.aud.toLowerCase() === this.config.clientId.toLowerCase()) {
|
|
966
|
+
|
|
967
|
+
user = {
|
|
968
|
+
userName: '',
|
|
969
|
+
profile: parsedJson,
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
if (parsedJson.hasOwnProperty('upn')) {
|
|
973
|
+
user.userName = parsedJson.upn;
|
|
974
|
+
} else if (parsedJson.hasOwnProperty('email')) {
|
|
975
|
+
user.userName = parsedJson.email;
|
|
976
|
+
}
|
|
977
|
+
} else {
|
|
978
|
+
this.warn('IdToken has invalid aud field');
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
return user;
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Returns the anchor part(#) of the URL
|
|
988
|
+
* @ignore
|
|
989
|
+
*/
|
|
990
|
+
AuthenticationContext.prototype._getHash = function (hash) {
|
|
991
|
+
if (hash.indexOf('#/') > -1) {
|
|
992
|
+
hash = hash.substring(hash.indexOf('#/') + 2);
|
|
993
|
+
} else if (hash.indexOf('#') > -1) {
|
|
994
|
+
hash = hash.substring(1);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
return hash;
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Checks if the URL fragment contains access token, id token or error_description.
|
|
1002
|
+
* @param {string} hash - Hash passed from redirect page
|
|
1003
|
+
* @returns {Boolean} true if response contains id_token, access_token or error, false otherwise.
|
|
1004
|
+
*/
|
|
1005
|
+
AuthenticationContext.prototype.isCallback = function (hash) {
|
|
1006
|
+
hash = this._getHash(hash);
|
|
1007
|
+
let parameters = this._deserialize(hash);
|
|
1008
|
+
return (
|
|
1009
|
+
parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)
|
|
1010
|
+
|| parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)
|
|
1011
|
+
|| parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)
|
|
1012
|
+
);
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Gets login error
|
|
1017
|
+
* @returns {string} error message related to login.
|
|
1018
|
+
*/
|
|
1019
|
+
AuthenticationContext.prototype.getLoginError = function () {
|
|
1020
|
+
return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR);
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Request info object created from the response received from AAD.
|
|
1025
|
+
* @class RequestInfo
|
|
1026
|
+
* @property {object} parameters - object comprising of fields such as id_token/error, session_state, state, e.t.c.
|
|
1027
|
+
* @property {REQUEST_TYPE} requestType - either LOGIN, RENEW_TOKEN or UNKNOWN.
|
|
1028
|
+
* @property {boolean} stateMatch - true if state is valid, false otherwise.
|
|
1029
|
+
* @property {string} stateResponse - unique guid used to match the response with the request.
|
|
1030
|
+
* @property {boolean} valid - true if requestType contains id_token, access_token or error, false otherwise.
|
|
1031
|
+
*/
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Creates a requestInfo object from the URL fragment and returns it.
|
|
1035
|
+
* @returns {RequestInfo} an object created from the redirect response from AAD comprising of the keys - parameters, requestType, stateMatch, stateResponse and valid.
|
|
1036
|
+
*/
|
|
1037
|
+
AuthenticationContext.prototype.getRequestInfo = function (hash) {
|
|
1038
|
+
hash = this._getHash(hash);
|
|
1039
|
+
let parameters = this._deserialize(hash);
|
|
1040
|
+
let requestInfo = {
|
|
1041
|
+
valid: false,
|
|
1042
|
+
parameters: {},
|
|
1043
|
+
stateMatch: false,
|
|
1044
|
+
stateResponse: '',
|
|
1045
|
+
requestType: this.REQUEST_TYPE.UNKNOWN,
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
if (parameters) {
|
|
1049
|
+
requestInfo.parameters = parameters;
|
|
1050
|
+
if (parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)
|
|
1051
|
+
|| parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)
|
|
1052
|
+
|| parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)) {
|
|
1053
|
+
|
|
1054
|
+
requestInfo.valid = true;
|
|
1055
|
+
|
|
1056
|
+
// which call
|
|
1057
|
+
let stateResponse = '';
|
|
1058
|
+
if (parameters.hasOwnProperty('state')) {
|
|
1059
|
+
this.verbose('State: ' + parameters.state);
|
|
1060
|
+
stateResponse = parameters.state;
|
|
1061
|
+
} else {
|
|
1062
|
+
this.warn('No state returned');
|
|
1063
|
+
return requestInfo;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
requestInfo.stateResponse = stateResponse;
|
|
1067
|
+
|
|
1068
|
+
// async calls can fire iframe and login request at the same time if developer does not use the API as expected
|
|
1069
|
+
// incoming callback needs to be looked up to find the request type
|
|
1070
|
+
if (this._matchState(requestInfo)) { // loginRedirect or acquireTokenRedirect
|
|
1071
|
+
return requestInfo;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
// external api requests may have many renewtoken requests for different resource
|
|
1075
|
+
if (!requestInfo.stateMatch && window.parent) {
|
|
1076
|
+
requestInfo.requestType = this._requestType;
|
|
1077
|
+
let statesInParentContext = this._renewStates;
|
|
1078
|
+
for (let i = 0; i < statesInParentContext.length; i++) {
|
|
1079
|
+
if (statesInParentContext[i] === requestInfo.stateResponse) {
|
|
1080
|
+
requestInfo.stateMatch = true;
|
|
1081
|
+
break;
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
return requestInfo;
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Matches nonce from the request with the response.
|
|
1092
|
+
* @ignore
|
|
1093
|
+
*/
|
|
1094
|
+
AuthenticationContext.prototype._matchNonce = function (user) {
|
|
1095
|
+
let requestNonce = this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN);
|
|
1096
|
+
|
|
1097
|
+
if (requestNonce) {
|
|
1098
|
+
requestNonce = requestNonce.split(this.CONSTANTS.CACHE_DELIMETER);
|
|
1099
|
+
for (let i = 0; i < requestNonce.length; i++) {
|
|
1100
|
+
if (requestNonce[i] === user.profile.nonce) {
|
|
1101
|
+
return true;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
return false;
|
|
1107
|
+
};
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* Matches state from the request with the response.
|
|
1111
|
+
* @ignore
|
|
1112
|
+
*/
|
|
1113
|
+
AuthenticationContext.prototype._matchState = function (requestInfo) {
|
|
1114
|
+
let loginStates = this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN);
|
|
1115
|
+
|
|
1116
|
+
if (loginStates) {
|
|
1117
|
+
loginStates = loginStates.split(this.CONSTANTS.CACHE_DELIMETER);
|
|
1118
|
+
for (var i = 0; i < loginStates.length; i++) {
|
|
1119
|
+
if (loginStates[i] === requestInfo.stateResponse) {
|
|
1120
|
+
requestInfo.requestType = this.REQUEST_TYPE.LOGIN;
|
|
1121
|
+
requestInfo.stateMatch = true;
|
|
1122
|
+
return true;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
let acquireTokenStates = this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW);
|
|
1128
|
+
|
|
1129
|
+
if (acquireTokenStates) {
|
|
1130
|
+
acquireTokenStates = acquireTokenStates.split(this.CONSTANTS.CACHE_DELIMETER);
|
|
1131
|
+
for (var i = 0; i < acquireTokenStates.length; i++) {
|
|
1132
|
+
if (acquireTokenStates[i] === requestInfo.stateResponse) {
|
|
1133
|
+
requestInfo.requestType = this.REQUEST_TYPE.RENEW_TOKEN;
|
|
1134
|
+
requestInfo.stateMatch = true;
|
|
1135
|
+
return true;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
return false;
|
|
1141
|
+
|
|
1142
|
+
};
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Extracts resource value from state.
|
|
1146
|
+
* @ignore
|
|
1147
|
+
*/
|
|
1148
|
+
AuthenticationContext.prototype._getResourceFromState = function (state) {
|
|
1149
|
+
if (state) {
|
|
1150
|
+
let splitIndex = state.indexOf('|');
|
|
1151
|
+
|
|
1152
|
+
if (splitIndex > -1 && splitIndex + 1 < state.length) {
|
|
1153
|
+
return state.substring(splitIndex + 1);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
return '';
|
|
1158
|
+
};
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* Saves token or error received in the response from AAD in the cache. In case of id_token, it also creates the user object.
|
|
1162
|
+
*/
|
|
1163
|
+
AuthenticationContext.prototype.saveTokenFromHash = function (requestInfo) {
|
|
1164
|
+
this.info('State status:' + requestInfo.stateMatch + '; Request type:' + requestInfo.requestType);
|
|
1165
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR, '');
|
|
1166
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, '');
|
|
1167
|
+
|
|
1168
|
+
let resource = this._getResourceFromState(requestInfo.stateResponse);
|
|
1169
|
+
|
|
1170
|
+
// Record error
|
|
1171
|
+
if (requestInfo.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)) {
|
|
1172
|
+
this.infoPii('Error :' + requestInfo.parameters.error + '; Error description:' + requestInfo.parameters[this.CONSTANTS.ERROR_DESCRIPTION]);
|
|
1173
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR, requestInfo.parameters.error);
|
|
1174
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, requestInfo.parameters[this.CONSTANTS.ERROR_DESCRIPTION]);
|
|
1175
|
+
|
|
1176
|
+
if (requestInfo.requestType === this.REQUEST_TYPE.LOGIN) {
|
|
1177
|
+
this._loginInProgress = false;
|
|
1178
|
+
this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, requestInfo.parameters.error_description);
|
|
1179
|
+
}
|
|
1180
|
+
} else {
|
|
1181
|
+
// It must verify the state from redirect
|
|
1182
|
+
if (requestInfo.stateMatch) {
|
|
1183
|
+
// record tokens to storage if exists
|
|
1184
|
+
this.info('State is right');
|
|
1185
|
+
if (requestInfo.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)) {
|
|
1186
|
+
this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE, requestInfo.parameters[this.CONSTANTS.SESSION_STATE]);
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
let keys;
|
|
1190
|
+
|
|
1191
|
+
if (requestInfo.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)) {
|
|
1192
|
+
this.info('Fragment has access token');
|
|
1193
|
+
|
|
1194
|
+
if (!this._hasResource(resource)) {
|
|
1195
|
+
keys = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS) || '';
|
|
1196
|
+
this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS, keys + resource + this.CONSTANTS.RESOURCE_DELIMETER);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
// save token with related resource
|
|
1200
|
+
this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource, requestInfo.parameters[this.CONSTANTS.ACCESS_TOKEN]);
|
|
1201
|
+
this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource, this._expiresIn(requestInfo.parameters[this.CONSTANTS.EXPIRES_IN]));
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
if (requestInfo.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)) {
|
|
1205
|
+
this.info('Fragment has id token');
|
|
1206
|
+
this._loginInProgress = false;
|
|
1207
|
+
this._user = this._createUser(requestInfo.parameters[this.CONSTANTS.ID_TOKEN]);
|
|
1208
|
+
if (this._user && this._user.profile) {
|
|
1209
|
+
if (!this._matchNonce(this._user)) {
|
|
1210
|
+
this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, 'Nonce received: ' + this._user.profile.nonce + ' is not same as requested: '
|
|
1211
|
+
+ this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN));
|
|
1212
|
+
this._user = null;
|
|
1213
|
+
} else {
|
|
1214
|
+
this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN, requestInfo.parameters[this.CONSTANTS.ID_TOKEN]);
|
|
1215
|
+
|
|
1216
|
+
// Save idtoken as access token for app itself
|
|
1217
|
+
resource = this.config.loginResource ? this.config.loginResource : this.config.clientId;
|
|
1218
|
+
|
|
1219
|
+
if (!this._hasResource(resource)) {
|
|
1220
|
+
keys = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS) || '';
|
|
1221
|
+
this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS, keys + resource + this.CONSTANTS.RESOURCE_DELIMETER);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + resource, requestInfo.parameters[this.CONSTANTS.ID_TOKEN]);
|
|
1225
|
+
this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + resource, this._user.profile.exp);
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
else {
|
|
1229
|
+
requestInfo.parameters.error = 'invalid id_token';
|
|
1230
|
+
requestInfo.parameters.error_description = 'Invalid id_token. id_token: ' + requestInfo.parameters[this.CONSTANTS.ID_TOKEN];
|
|
1231
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR, 'invalid id_token');
|
|
1232
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, 'Invalid id_token. id_token: ' + requestInfo.parameters[this.CONSTANTS.ID_TOKEN]);
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
} else {
|
|
1236
|
+
requestInfo.parameters.error = 'Invalid_state';
|
|
1237
|
+
requestInfo.parameters.error_description = 'Invalid_state. state: ' + requestInfo.stateResponse;
|
|
1238
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR, 'Invalid_state');
|
|
1239
|
+
this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, 'Invalid_state. state: ' + requestInfo.stateResponse);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS + resource, this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED);
|
|
1244
|
+
};
|
|
1245
|
+
|
|
1246
|
+
/**
|
|
1247
|
+
* Gets resource for given endpoint if mapping is provided with config.
|
|
1248
|
+
* @param {string} endpoint - The URI for which the resource Id is requested.
|
|
1249
|
+
* @returns {string} resource for this API endpoint.
|
|
1250
|
+
*/
|
|
1251
|
+
AuthenticationContext.prototype.getResourceForEndpoint = function (endpoint) {
|
|
1252
|
+
|
|
1253
|
+
// if user specified list of anonymous endpoints, no need to send token to these endpoints, return null.
|
|
1254
|
+
if (this.config && this.config.anonymousEndpoints) {
|
|
1255
|
+
for (let i = 0; i < this.config.anonymousEndpoints.length; i++) {
|
|
1256
|
+
if (endpoint.indexOf(this.config.anonymousEndpoints[i]) > -1) {
|
|
1257
|
+
return null;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
if (this.config && this.config.endpoints) {
|
|
1263
|
+
for (let configEndpoint in this.config.endpoints) {
|
|
1264
|
+
// configEndpoint is like /api/Todo requested endpoint can be /api/Todo/1
|
|
1265
|
+
if (endpoint.indexOf(configEndpoint) > -1) {
|
|
1266
|
+
return this.config.endpoints[configEndpoint];
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
// default resource will be clientid if nothing specified
|
|
1272
|
+
// App will use idtoken for calls to itself
|
|
1273
|
+
// check if it's staring from http or https, needs to match with app host
|
|
1274
|
+
if (endpoint.indexOf('http://') > -1 || endpoint.indexOf('https://') > -1) {
|
|
1275
|
+
if (this._getHostFromUri(endpoint) === this._getHostFromUri(this.config.redirectUri)) {
|
|
1276
|
+
return this.config.loginResource;
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
else {
|
|
1280
|
+
// in angular level, the url for $http interceptor call could be relative url,
|
|
1281
|
+
// if it's relative call, we'll treat it as app backend call.
|
|
1282
|
+
return this.config.loginResource;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
// if not the app's own backend or not a domain listed in the endpoints structure
|
|
1286
|
+
return null;
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Strips the protocol part of the URL and returns it.
|
|
1291
|
+
* @ignore
|
|
1292
|
+
*/
|
|
1293
|
+
AuthenticationContext.prototype._getHostFromUri = function (uri) {
|
|
1294
|
+
// remove http:// or https:// from uri
|
|
1295
|
+
let extractedUri = String(uri).replace(/^(https?:)\/\//, '');
|
|
1296
|
+
extractedUri = extractedUri.split('/')[0];
|
|
1297
|
+
return extractedUri;
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* This method must be called for processing the response received from AAD. It extracts the hash, processes the token or error, saves it in the cache and calls the registered callbacks with the result.
|
|
1302
|
+
* @param {string} [hash=window.location.hash] - Hash fragment of Url.
|
|
1303
|
+
*/
|
|
1304
|
+
AuthenticationContext.prototype.handleWindowCallback = function (hash) {
|
|
1305
|
+
// This is for regular javascript usage for redirect handling
|
|
1306
|
+
// need to make sure this is for callback
|
|
1307
|
+
if (hash == null) {
|
|
1308
|
+
hash = window.location.hash;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
if (this.isCallback(hash)) {
|
|
1312
|
+
let self = null;
|
|
1313
|
+
let isPopup = false;
|
|
1314
|
+
|
|
1315
|
+
if (this._openedWindows.length > 0 && this._openedWindows[this._openedWindows.length - 1].opener
|
|
1316
|
+
&& this._openedWindows[this._openedWindows.length - 1].opener._adalInstance) {
|
|
1317
|
+
self = this._openedWindows[this._openedWindows.length - 1].opener._adalInstance;
|
|
1318
|
+
isPopup = true;
|
|
1319
|
+
}
|
|
1320
|
+
else if (window.parent && window.parent._adalInstance) {
|
|
1321
|
+
self = window.parent._adalInstance;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
let requestInfo = self.getRequestInfo(hash);
|
|
1325
|
+
let token; let tokenReceivedCallback; let tokenType = null;
|
|
1326
|
+
|
|
1327
|
+
if (isPopup || window.parent !== window) {
|
|
1328
|
+
tokenReceivedCallback = self._callBackMappedToRenewStates[requestInfo.stateResponse];
|
|
1329
|
+
}
|
|
1330
|
+
else {
|
|
1331
|
+
tokenReceivedCallback = self.callback;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
self.info('Returned from redirect url');
|
|
1335
|
+
self.saveTokenFromHash(requestInfo);
|
|
1336
|
+
|
|
1337
|
+
if ((requestInfo.requestType === this.REQUEST_TYPE.RENEW_TOKEN) && window.parent) {
|
|
1338
|
+
if (window.parent !== window) {
|
|
1339
|
+
self.verbose('Window is in iframe, acquiring token silently');
|
|
1340
|
+
} else {
|
|
1341
|
+
self.verbose('acquiring token interactive in progress');
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
token = requestInfo.parameters[self.CONSTANTS.ACCESS_TOKEN] || requestInfo.parameters[self.CONSTANTS.ID_TOKEN];
|
|
1345
|
+
tokenType = self.CONSTANTS.ACCESS_TOKEN;
|
|
1346
|
+
} else if (requestInfo.requestType === this.REQUEST_TYPE.LOGIN) {
|
|
1347
|
+
token = requestInfo.parameters[self.CONSTANTS.ID_TOKEN];
|
|
1348
|
+
tokenType = self.CONSTANTS.ID_TOKEN;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
let errorDesc = requestInfo.parameters[self.CONSTANTS.ERROR_DESCRIPTION];
|
|
1352
|
+
let error = requestInfo.parameters[self.CONSTANTS.ERROR];
|
|
1353
|
+
try {
|
|
1354
|
+
if (tokenReceivedCallback) {
|
|
1355
|
+
tokenReceivedCallback(errorDesc, token, error, tokenType);
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
} catch (err) {
|
|
1359
|
+
self.error('Error occurred in user defined callback function: ' + err);
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
if (window.parent === window && !isPopup) {
|
|
1363
|
+
if (self.config.navigateToLoginRequestUrl) {
|
|
1364
|
+
window.location.href = self._getItem(self.CONSTANTS.STORAGE.LOGIN_REQUEST);
|
|
1365
|
+
} else {window.location.hash = '';}
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* Constructs the authorization endpoint URL and returns it.
|
|
1372
|
+
* @ignore
|
|
1373
|
+
*/
|
|
1374
|
+
AuthenticationContext.prototype._getNavigateUrl = function (responseType, resource) {
|
|
1375
|
+
let tenant = 'common';
|
|
1376
|
+
if (this.config.tenant) {
|
|
1377
|
+
tenant = this.config.tenant;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
let urlNavigate = this.instance + tenant + '/oauth2/authorize' + this._serialize(responseType, this.config, resource) + this._addLibMetadata();
|
|
1381
|
+
this.info('Navigate url:' + urlNavigate);
|
|
1382
|
+
return urlNavigate;
|
|
1383
|
+
};
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* Returns the decoded id_token.
|
|
1387
|
+
* @ignore
|
|
1388
|
+
*/
|
|
1389
|
+
AuthenticationContext.prototype._extractIdToken = function (encodedIdToken) {
|
|
1390
|
+
// id token will be decoded to get the username
|
|
1391
|
+
let decodedToken = this._decodeJwt(encodedIdToken);
|
|
1392
|
+
|
|
1393
|
+
if (!decodedToken) {
|
|
1394
|
+
return null;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
try {
|
|
1398
|
+
let base64IdToken = decodedToken.JWSPayload;
|
|
1399
|
+
let base64Decoded = this._base64DecodeStringUrlSafe(base64IdToken);
|
|
1400
|
+
|
|
1401
|
+
if (!base64Decoded) {
|
|
1402
|
+
this.info('The returned id_token could not be base64 url safe decoded.');
|
|
1403
|
+
return null;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
// ECMA script has JSON built-in support
|
|
1407
|
+
return JSON.parse(base64Decoded);
|
|
1408
|
+
} catch (err) {
|
|
1409
|
+
this.error('The returned id_token could not be decoded', err);
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
return null;
|
|
1413
|
+
};
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* Decodes a string of data which has been encoded using base-64 encoding.
|
|
1417
|
+
* @ignore
|
|
1418
|
+
*/
|
|
1419
|
+
AuthenticationContext.prototype._base64DecodeStringUrlSafe = function (base64IdToken) {
|
|
1420
|
+
// html5 should support atob function for decoding
|
|
1421
|
+
base64IdToken = base64IdToken.replace(/-/g, '+').replace(/_/g, '/');
|
|
1422
|
+
|
|
1423
|
+
if (window.atob) {
|
|
1424
|
+
return decodeURIComponent(escape(window.atob(base64IdToken))); // jshint ignore:line
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
return decodeURIComponent(escape(this._decode(base64IdToken)));
|
|
1428
|
+
|
|
1429
|
+
};
|
|
1430
|
+
|
|
1431
|
+
// Take https://cdnjs.cloudflare.com/ajax/libs/Base64/0.3.0/base64.js and https://en.wikipedia.org/wiki/Base64 as reference.
|
|
1432
|
+
AuthenticationContext.prototype._decode = function (base64IdToken) {
|
|
1433
|
+
let codes = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
1434
|
+
base64IdToken = String(base64IdToken).replace(/=+$/, '');
|
|
1435
|
+
|
|
1436
|
+
let length = base64IdToken.length;
|
|
1437
|
+
|
|
1438
|
+
if (length % 4 === 1) {
|
|
1439
|
+
throw new Error('The token to be decoded is not correctly encoded.');
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
let h1; let h2; let h3; let h4; let bits; let c1; let c2; let c3; let decoded = '';
|
|
1443
|
+
|
|
1444
|
+
for (let i = 0; i < length; i += 4) {
|
|
1445
|
+
// Every 4 base64 encoded character will be converted to 3 byte string, which is 24 bits
|
|
1446
|
+
// then 6 bits per base64 encoded character
|
|
1447
|
+
h1 = codes.indexOf(base64IdToken.charAt(i));
|
|
1448
|
+
h2 = codes.indexOf(base64IdToken.charAt(i + 1));
|
|
1449
|
+
h3 = codes.indexOf(base64IdToken.charAt(i + 2));
|
|
1450
|
+
h4 = codes.indexOf(base64IdToken.charAt(i + 3));
|
|
1451
|
+
|
|
1452
|
+
// For padding, if last two are '='
|
|
1453
|
+
if (i + 2 === length - 1) {
|
|
1454
|
+
bits = h1 << 18 | h2 << 12 | h3 << 6;
|
|
1455
|
+
c1 = bits >> 16 & 255;
|
|
1456
|
+
c2 = bits >> 8 & 255;
|
|
1457
|
+
decoded += String.fromCharCode(c1, c2);
|
|
1458
|
+
break;
|
|
1459
|
+
}
|
|
1460
|
+
// if last one is '='
|
|
1461
|
+
else if (i + 1 === length - 1) {
|
|
1462
|
+
bits = h1 << 18 | h2 << 12;
|
|
1463
|
+
c1 = bits >> 16 & 255;
|
|
1464
|
+
decoded += String.fromCharCode(c1);
|
|
1465
|
+
break;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
|
|
1469
|
+
|
|
1470
|
+
// then convert to 3 byte chars
|
|
1471
|
+
c1 = bits >> 16 & 255;
|
|
1472
|
+
c2 = bits >> 8 & 255;
|
|
1473
|
+
c3 = bits & 255;
|
|
1474
|
+
|
|
1475
|
+
decoded += String.fromCharCode(c1, c2, c3);
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
return decoded;
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* Decodes an id token into an object with header, payload and signature fields.
|
|
1483
|
+
* @ignore
|
|
1484
|
+
*/
|
|
1485
|
+
// Adal.node js crack function
|
|
1486
|
+
AuthenticationContext.prototype._decodeJwt = function (jwtToken) {
|
|
1487
|
+
if (this._isEmpty(jwtToken)) {
|
|
1488
|
+
return null;
|
|
1489
|
+
};
|
|
1490
|
+
|
|
1491
|
+
let idTokenPartsRegex = /^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/;
|
|
1492
|
+
|
|
1493
|
+
let matches = idTokenPartsRegex.exec(jwtToken);
|
|
1494
|
+
|
|
1495
|
+
if (!matches || matches.length < 4) {
|
|
1496
|
+
this.warn('The returned id_token is not parseable.');
|
|
1497
|
+
return null;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
let crackedToken = {
|
|
1501
|
+
header: matches[1],
|
|
1502
|
+
JWSPayload: matches[2],
|
|
1503
|
+
JWSSig: matches[3],
|
|
1504
|
+
};
|
|
1505
|
+
|
|
1506
|
+
return crackedToken;
|
|
1507
|
+
};
|
|
1508
|
+
|
|
1509
|
+
/**
|
|
1510
|
+
* Converts string to represent binary data in ASCII string format by translating it into a radix-64 representation and returns it
|
|
1511
|
+
* @ignore
|
|
1512
|
+
*/
|
|
1513
|
+
AuthenticationContext.prototype._convertUrlSafeToRegularBase64EncodedString = function (str) {
|
|
1514
|
+
return str.replace('-', '+').replace('_', '/');
|
|
1515
|
+
};
|
|
1516
|
+
|
|
1517
|
+
/**
|
|
1518
|
+
* Serializes the parameters for the authorization endpoint URL and returns the serialized uri string.
|
|
1519
|
+
* @ignore
|
|
1520
|
+
*/
|
|
1521
|
+
AuthenticationContext.prototype._serialize = function (responseType, obj, resource) {
|
|
1522
|
+
let str = [];
|
|
1523
|
+
if (obj !== null) {
|
|
1524
|
+
str.push('?response_type=' + responseType);
|
|
1525
|
+
str.push('client_id=' + encodeURIComponent(obj.clientId));
|
|
1526
|
+
if (resource) {
|
|
1527
|
+
str.push('resource=' + encodeURIComponent(resource));
|
|
1528
|
+
}
|
|
1529
|
+
str.push('redirect_uri=' + encodeURIComponent(obj.redirectUri));
|
|
1530
|
+
str.push('state=' + encodeURIComponent(obj.state));
|
|
1531
|
+
|
|
1532
|
+
if (obj.hasOwnProperty('slice')) {
|
|
1533
|
+
str.push('slice=' + encodeURIComponent(obj.slice));
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
if (obj.hasOwnProperty('extraQueryParameter')) {
|
|
1537
|
+
str.push(obj.extraQueryParameter);
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
let correlationId = obj.correlationId ? obj.correlationId : this._guid();
|
|
1541
|
+
str.push('client-request-id=' + encodeURIComponent(correlationId));
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
return str.join('&');
|
|
1545
|
+
};
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* Parses the query string parameters into a key-value pair object.
|
|
1549
|
+
* @ignore
|
|
1550
|
+
*/
|
|
1551
|
+
AuthenticationContext.prototype._deserialize = function (query) {
|
|
1552
|
+
let match;
|
|
1553
|
+
let pl = /\+/g; // Regex for replacing addition symbol with a space
|
|
1554
|
+
let search = /([^&=]+)=([^&]*)/g;
|
|
1555
|
+
let decode = function (s) {
|
|
1556
|
+
return decodeURIComponent(s.replace(pl, ' '));
|
|
1557
|
+
};
|
|
1558
|
+
let obj = {};
|
|
1559
|
+
match = search.exec(query);
|
|
1560
|
+
|
|
1561
|
+
while (match) {
|
|
1562
|
+
obj[decode(match[1])] = decode(match[2]);
|
|
1563
|
+
match = search.exec(query);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
return obj;
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
/**
|
|
1570
|
+
* Converts decimal value to hex equivalent
|
|
1571
|
+
* @ignore
|
|
1572
|
+
*/
|
|
1573
|
+
AuthenticationContext.prototype._decimalToHex = function (number) {
|
|
1574
|
+
let hex = number.toString(16);
|
|
1575
|
+
|
|
1576
|
+
while (hex.length < 2) {
|
|
1577
|
+
hex = '0' + hex;
|
|
1578
|
+
}
|
|
1579
|
+
return hex;
|
|
1580
|
+
};
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* Generates RFC4122 version 4 guid (128 bits)
|
|
1584
|
+
* @ignore
|
|
1585
|
+
*/
|
|
1586
|
+
/* jshint ignore:start */
|
|
1587
|
+
AuthenticationContext.prototype._guid = function () {
|
|
1588
|
+
// RFC4122: The version 4 UUID is meant for generating UUIDs from truly-random or
|
|
1589
|
+
// pseudo-random numbers.
|
|
1590
|
+
// The algorithm is as follows:
|
|
1591
|
+
// Set the two most significant bits (bits 6 and 7) of the
|
|
1592
|
+
// clock_seq_hi_and_reserved to zero and one, respectively.
|
|
1593
|
+
// Set the four most significant bits (bits 12 through 15) of the
|
|
1594
|
+
// time_hi_and_version field to the 4-bit version number from
|
|
1595
|
+
// Section 4.1.3. Version4
|
|
1596
|
+
// Set all the other bits to randomly (or pseudo-randomly) chosen
|
|
1597
|
+
// values.
|
|
1598
|
+
// UUID = time-low "-" time-mid "-"time-high-and-version "-"clock-seq-reserved and low(2hexOctet)"-" node
|
|
1599
|
+
// time-low = 4hexOctet
|
|
1600
|
+
// time-mid = 2hexOctet
|
|
1601
|
+
// time-high-and-version = 2hexOctet
|
|
1602
|
+
// clock-seq-and-reserved = hexOctet:
|
|
1603
|
+
// clock-seq-low = hexOctet
|
|
1604
|
+
// node = 6hexOctet
|
|
1605
|
+
// Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
|
|
1606
|
+
// y could be 1000, 1001, 1010, 1011 since most significant two bits needs to be 10
|
|
1607
|
+
// y values are 8, 9, A, B
|
|
1608
|
+
let cryptoObj = window.crypto || window.msCrypto; // for IE 11
|
|
1609
|
+
if (cryptoObj && cryptoObj.getRandomValues) {
|
|
1610
|
+
let buffer = new Uint8Array(16);
|
|
1611
|
+
cryptoObj.getRandomValues(buffer);
|
|
1612
|
+
// buffer[6] and buffer[7] represents the time_hi_and_version field. We will set the four most significant bits (4 through 7) of buffer[6] to represent decimal number 4 (UUID version number).
|
|
1613
|
+
buffer[6] |= 0x40; // buffer[6] | 01000000 will set the 6 bit to 1.
|
|
1614
|
+
buffer[6] &= 0x4f; // buffer[6] & 01001111 will set the 4, 5, and 7 bit to 0 such that bits 4-7 == 0100 = "4".
|
|
1615
|
+
// buffer[8] represents the clock_seq_hi_and_reserved field. We will set the two most significant bits (6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively.
|
|
1616
|
+
buffer[8] |= 0x80; // buffer[8] | 10000000 will set the 7 bit to 1.
|
|
1617
|
+
buffer[8] &= 0xbf; // buffer[8] & 10111111 will set the 6 bit to 0.
|
|
1618
|
+
return this._decimalToHex(buffer[0]) + this._decimalToHex(buffer[1]) + this._decimalToHex(buffer[2]) + this._decimalToHex(buffer[3]) + '-' + this._decimalToHex(buffer[4]) + this._decimalToHex(buffer[5]) + '-' + this._decimalToHex(buffer[6]) + this._decimalToHex(buffer[7]) + '-'
|
|
1619
|
+
+ this._decimalToHex(buffer[8]) + this._decimalToHex(buffer[9]) + '-' + this._decimalToHex(buffer[10]) + this._decimalToHex(buffer[11]) + this._decimalToHex(buffer[12]) + this._decimalToHex(buffer[13]) + this._decimalToHex(buffer[14]) + this._decimalToHex(buffer[15]);
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
let guidHolder = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
|
|
1623
|
+
let hex = '0123456789abcdef';
|
|
1624
|
+
let r = 0;
|
|
1625
|
+
let guidResponse = '';
|
|
1626
|
+
for (let i = 0; i < 36; i++) {
|
|
1627
|
+
if (guidHolder[i] !== '-' && guidHolder[i] !== '4') {
|
|
1628
|
+
// each x and y needs to be random
|
|
1629
|
+
r = Math.random() * 16 | 0;
|
|
1630
|
+
}
|
|
1631
|
+
if (guidHolder[i] === 'x') {
|
|
1632
|
+
guidResponse += hex[r];
|
|
1633
|
+
} else if (guidHolder[i] === 'y') {
|
|
1634
|
+
// clock-seq-and-reserved first hex is filtered and remaining hex values are random
|
|
1635
|
+
r &= 0x3; // bit and with 0011 to set pos 2 to zero ?0??
|
|
1636
|
+
r |= 0x8; // set pos 3 to 1 as 1???
|
|
1637
|
+
guidResponse += hex[r];
|
|
1638
|
+
} else {
|
|
1639
|
+
guidResponse += guidHolder[i];
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
return guidResponse;
|
|
1643
|
+
|
|
1644
|
+
};
|
|
1645
|
+
/* jshint ignore:end */
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
* Calculates the expires in value in milliseconds for the acquired token
|
|
1649
|
+
* @ignore
|
|
1650
|
+
*/
|
|
1651
|
+
AuthenticationContext.prototype._expiresIn = function (expires) {
|
|
1652
|
+
// if AAD did not send "expires_in" property, use default expiration of 3599 seconds, for some reason AAD sends 3599 as "expires_in" value instead of 3600
|
|
1653
|
+
if (!expires) {expires = 3599;}
|
|
1654
|
+
return this._now() + parseInt(expires, 10);
|
|
1655
|
+
};
|
|
1656
|
+
|
|
1657
|
+
/**
|
|
1658
|
+
* Return the number of milliseconds since 1970/01/01
|
|
1659
|
+
* @ignore
|
|
1660
|
+
*/
|
|
1661
|
+
AuthenticationContext.prototype._now = function () {
|
|
1662
|
+
return Math.round(new Date().getTime() / 1000.0);
|
|
1663
|
+
};
|
|
1664
|
+
|
|
1665
|
+
/**
|
|
1666
|
+
* Adds the hidden iframe for silent token renewal
|
|
1667
|
+
* @ignore
|
|
1668
|
+
*/
|
|
1669
|
+
AuthenticationContext.prototype._addAdalFrame = function (iframeId) {
|
|
1670
|
+
if (typeof iframeId === 'undefined') {
|
|
1671
|
+
return;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
this.info('Add adal frame to document:' + iframeId);
|
|
1675
|
+
let adalFrame = document.getElementById(iframeId);
|
|
1676
|
+
|
|
1677
|
+
if (!adalFrame) {
|
|
1678
|
+
if (document.createElement && document.documentElement
|
|
1679
|
+
&& (window.opera || window.navigator.userAgent.indexOf('MSIE 5.0') === -1)) {
|
|
1680
|
+
let ifr = document.createElement('iframe');
|
|
1681
|
+
ifr.setAttribute('id', iframeId);
|
|
1682
|
+
ifr.setAttribute('aria-hidden', 'true');
|
|
1683
|
+
ifr.style.visibility = 'hidden';
|
|
1684
|
+
ifr.style.position = 'absolute';
|
|
1685
|
+
ifr.style.width = ifr.style.height = ifr.borderWidth = '0px';
|
|
1686
|
+
|
|
1687
|
+
adalFrame = document.getElementsByTagName('body')[0].appendChild(ifr);
|
|
1688
|
+
}
|
|
1689
|
+
else if (document.body && document.body.insertAdjacentHTML) {
|
|
1690
|
+
document.body.insertAdjacentHTML('beforeEnd', '<iframe name="' + iframeId + '" id="' + iframeId + '" style="display:none"></iframe>');
|
|
1691
|
+
}
|
|
1692
|
+
if (window.frames && window.frames[iframeId]) {
|
|
1693
|
+
adalFrame = window.frames[iframeId];
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
return adalFrame;
|
|
1698
|
+
};
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* Saves the key-value pair in the cache
|
|
1702
|
+
* @ignore
|
|
1703
|
+
*/
|
|
1704
|
+
AuthenticationContext.prototype._saveItem = function (key, obj, preserve) {
|
|
1705
|
+
|
|
1706
|
+
if (this.config && this.config.cacheLocation && this.config.cacheLocation === 'localStorage') {
|
|
1707
|
+
|
|
1708
|
+
if (!this._supportsLocalStorage()) {
|
|
1709
|
+
this.info('Local storage is not supported');
|
|
1710
|
+
return false;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
if (preserve) {
|
|
1714
|
+
let value = this._getItem(key) || '';
|
|
1715
|
+
localStorage.setItem(key, value + obj + this.CONSTANTS.CACHE_DELIMETER);
|
|
1716
|
+
}
|
|
1717
|
+
else {
|
|
1718
|
+
localStorage.setItem(key, obj);
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
return true;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
// Default as session storage
|
|
1725
|
+
if (!this._supportsSessionStorage()) {
|
|
1726
|
+
this.info('Session storage is not supported');
|
|
1727
|
+
return false;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
sessionStorage.setItem(key, obj);
|
|
1731
|
+
return true;
|
|
1732
|
+
};
|
|
1733
|
+
|
|
1734
|
+
/**
|
|
1735
|
+
* Searches the value for the given key in the cache
|
|
1736
|
+
* @ignore
|
|
1737
|
+
*/
|
|
1738
|
+
AuthenticationContext.prototype._getItem = function (key) {
|
|
1739
|
+
|
|
1740
|
+
if (this.config && this.config.cacheLocation && this.config.cacheLocation === 'localStorage') {
|
|
1741
|
+
|
|
1742
|
+
if (!this._supportsLocalStorage()) {
|
|
1743
|
+
this.info('Local storage is not supported');
|
|
1744
|
+
return null;
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
return localStorage.getItem(key);
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
// Default as session storage
|
|
1751
|
+
if (!this._supportsSessionStorage()) {
|
|
1752
|
+
this.info('Session storage is not supported');
|
|
1753
|
+
return null;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
return sessionStorage.getItem(key);
|
|
1757
|
+
};
|
|
1758
|
+
|
|
1759
|
+
/**
|
|
1760
|
+
* Returns true if browser supports localStorage, false otherwise.
|
|
1761
|
+
* @ignore
|
|
1762
|
+
*/
|
|
1763
|
+
AuthenticationContext.prototype._supportsLocalStorage = function () {
|
|
1764
|
+
try {
|
|
1765
|
+
if (!window.localStorage) {return false;} // Test availability
|
|
1766
|
+
window.localStorage.setItem('storageTest', 'A'); // Try write
|
|
1767
|
+
if (window.localStorage.getItem('storageTest') != 'A') {return false;} // Test read/write
|
|
1768
|
+
window.localStorage.removeItem('storageTest'); // Try delete
|
|
1769
|
+
if (window.localStorage.getItem('storageTest')) {return false;} // Test delete
|
|
1770
|
+
return true; // Success
|
|
1771
|
+
} catch (e) {
|
|
1772
|
+
return false;
|
|
1773
|
+
}
|
|
1774
|
+
};
|
|
1775
|
+
|
|
1776
|
+
/**
|
|
1777
|
+
* Returns true if browser supports sessionStorage, false otherwise.
|
|
1778
|
+
* @ignore
|
|
1779
|
+
*/
|
|
1780
|
+
AuthenticationContext.prototype._supportsSessionStorage = function () {
|
|
1781
|
+
try {
|
|
1782
|
+
if (!window.sessionStorage) {return false;} // Test availability
|
|
1783
|
+
window.sessionStorage.setItem('storageTest', 'A'); // Try write
|
|
1784
|
+
if (window.sessionStorage.getItem('storageTest') != 'A') {return false;} // Test read/write
|
|
1785
|
+
window.sessionStorage.removeItem('storageTest'); // Try delete
|
|
1786
|
+
if (window.sessionStorage.getItem('storageTest')) {return false;} // Test delete
|
|
1787
|
+
return true; // Success
|
|
1788
|
+
} catch (e) {
|
|
1789
|
+
return false;
|
|
1790
|
+
}
|
|
1791
|
+
};
|
|
1792
|
+
|
|
1793
|
+
/**
|
|
1794
|
+
* Returns a cloned copy of the passed object.
|
|
1795
|
+
* @ignore
|
|
1796
|
+
*/
|
|
1797
|
+
AuthenticationContext.prototype._cloneConfig = function (obj) {
|
|
1798
|
+
if (null === obj || 'object' !== typeof obj) {
|
|
1799
|
+
return obj;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
let copy = {};
|
|
1803
|
+
for (let attr in obj) {
|
|
1804
|
+
if (obj.hasOwnProperty(attr)) {
|
|
1805
|
+
copy[attr] = obj[attr];
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
return copy;
|
|
1809
|
+
};
|
|
1810
|
+
|
|
1811
|
+
/**
|
|
1812
|
+
* Adds the library version and returns it.
|
|
1813
|
+
* @ignore
|
|
1814
|
+
*/
|
|
1815
|
+
AuthenticationContext.prototype._addLibMetadata = function () {
|
|
1816
|
+
// x-client-SKU
|
|
1817
|
+
// x-client-Ver
|
|
1818
|
+
return '&x-client-SKU=Js&x-client-Ver=' + this._libVersion();
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* Checks the Logging Level, constructs the Log message and logs it. Users need to implement/override this method to turn on Logging.
|
|
1823
|
+
* @param {number} level - Level can be set 0,1,2 and 3 which turns on 'error', 'warning', 'info' or 'verbose' level logging respectively.
|
|
1824
|
+
* @param {string} message - Message to log.
|
|
1825
|
+
* @param {string} error - Error to log.
|
|
1826
|
+
*/
|
|
1827
|
+
AuthenticationContext.prototype.log = function (level, message, error, containsPii) {
|
|
1828
|
+
|
|
1829
|
+
if (level <= Logging.level) {
|
|
1830
|
+
|
|
1831
|
+
if (!Logging.piiLoggingEnabled && containsPii)
|
|
1832
|
+
{return;}
|
|
1833
|
+
|
|
1834
|
+
let timestamp = new Date().toUTCString();
|
|
1835
|
+
let formattedMessage = '';
|
|
1836
|
+
|
|
1837
|
+
if (this.config.correlationId)
|
|
1838
|
+
{formattedMessage = timestamp + ':' + this.config.correlationId + '-' + this._libVersion() + '-' + this.CONSTANTS.LEVEL_STRING_MAP[level] + ' ' + message;}
|
|
1839
|
+
else
|
|
1840
|
+
{formattedMessage = timestamp + ':' + this._libVersion() + '-' + this.CONSTANTS.LEVEL_STRING_MAP[level] + ' ' + message;}
|
|
1841
|
+
|
|
1842
|
+
if (error) {
|
|
1843
|
+
formattedMessage += '\nstack:\n' + error.stack;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
Logging.log(formattedMessage);
|
|
1847
|
+
}
|
|
1848
|
+
};
|
|
1849
|
+
|
|
1850
|
+
/**
|
|
1851
|
+
* Logs messages when Logging Level is set to 0.
|
|
1852
|
+
* @param {string} message - Message to log.
|
|
1853
|
+
* @param {string} error - Error to log.
|
|
1854
|
+
*/
|
|
1855
|
+
AuthenticationContext.prototype.error = function (message, error) {
|
|
1856
|
+
this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR, message, error);
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* Logs messages when Logging Level is set to 1.
|
|
1861
|
+
* @param {string} message - Message to log.
|
|
1862
|
+
*/
|
|
1863
|
+
AuthenticationContext.prototype.warn = function (message) {
|
|
1864
|
+
this.log(this.CONSTANTS.LOGGING_LEVEL.WARN, message, null);
|
|
1865
|
+
};
|
|
1866
|
+
|
|
1867
|
+
/**
|
|
1868
|
+
* Logs messages when Logging Level is set to 2.
|
|
1869
|
+
* @param {string} message - Message to log.
|
|
1870
|
+
*/
|
|
1871
|
+
AuthenticationContext.prototype.info = function (message) {
|
|
1872
|
+
this.log(this.CONSTANTS.LOGGING_LEVEL.INFO, message, null);
|
|
1873
|
+
};
|
|
1874
|
+
|
|
1875
|
+
/**
|
|
1876
|
+
* Logs messages when Logging Level is set to 3.
|
|
1877
|
+
* @param {string} message - Message to log.
|
|
1878
|
+
*/
|
|
1879
|
+
AuthenticationContext.prototype.verbose = function (message) {
|
|
1880
|
+
this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE, message, null);
|
|
1881
|
+
};
|
|
1882
|
+
|
|
1883
|
+
/**
|
|
1884
|
+
* Logs Pii messages when Logging Level is set to 0 and window.piiLoggingEnabled is set to true.
|
|
1885
|
+
* @param {string} message - Message to log.
|
|
1886
|
+
* @param {string} error - Error to log.
|
|
1887
|
+
*/
|
|
1888
|
+
AuthenticationContext.prototype.errorPii = function (message, error) {
|
|
1889
|
+
this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR, message, error, true);
|
|
1890
|
+
};
|
|
1891
|
+
|
|
1892
|
+
/**
|
|
1893
|
+
* Logs Pii messages when Logging Level is set to 1 and window.piiLoggingEnabled is set to true.
|
|
1894
|
+
* @param {string} message - Message to log.
|
|
1895
|
+
*/
|
|
1896
|
+
AuthenticationContext.prototype.warnPii = function (message) {
|
|
1897
|
+
this.log(this.CONSTANTS.LOGGING_LEVEL.WARN, message, null, true);
|
|
1898
|
+
};
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* Logs messages when Logging Level is set to 2 and window.piiLoggingEnabled is set to true.
|
|
1902
|
+
* @param {string} message - Message to log.
|
|
1903
|
+
*/
|
|
1904
|
+
AuthenticationContext.prototype.infoPii = function (message) {
|
|
1905
|
+
this.log(this.CONSTANTS.LOGGING_LEVEL.INFO, message, null, true);
|
|
1906
|
+
};
|
|
1907
|
+
|
|
1908
|
+
/**
|
|
1909
|
+
* Logs messages when Logging Level is set to 3 and window.piiLoggingEnabled is set to true.
|
|
1910
|
+
* @param {string} message - Message to log.
|
|
1911
|
+
*/
|
|
1912
|
+
AuthenticationContext.prototype.verbosePii = function (message) {
|
|
1913
|
+
this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE, message, null, true);
|
|
1914
|
+
};
|
|
1915
|
+
/**
|
|
1916
|
+
* Returns the library version.
|
|
1917
|
+
* @ignore
|
|
1918
|
+
*/
|
|
1919
|
+
AuthenticationContext.prototype._libVersion = function () {
|
|
1920
|
+
return '1.0.17';
|
|
1921
|
+
};
|
|
1922
|
+
|
|
1923
|
+
/**
|
|
1924
|
+
* Returns a reference of Authentication Context as a result of a require call.
|
|
1925
|
+
* @ignore
|
|
1926
|
+
*/
|
|
1927
|
+
if (typeof module !== 'undefined' && module.exports) {
|
|
1928
|
+
module.exports = AuthenticationContext;
|
|
1929
|
+
module.exports.inject = function (conf) {
|
|
1930
|
+
return new AuthenticationContext(conf);
|
|
1931
|
+
};
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
return AuthenticationContext;
|
|
1935
|
+
|
|
1936
|
+
}());
|