@shzlx/ui-default 4.58.2
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/README.md +5 -0
- package/api.ts +61 -0
- package/backendlib/builder.ts +182 -0
- package/backendlib/markdown-it-imsize.ts +235 -0
- package/backendlib/markdown-it-katex.ts +139 -0
- package/backendlib/markdown-it-media.ts +163 -0
- package/backendlib/markdown-it-xss.ts +200 -0
- package/backendlib/markdown.js +64 -0
- package/backendlib/misc.ts +54 -0
- package/backendlib/template.ts +279 -0
- package/breakpoints.json +5 -0
- package/components/DOMAttachedObject.ts +128 -0
- package/components/autocomplete/AssignSelectAutoComplete.tsx +22 -0
- package/components/autocomplete/CustomSelectAutoComplete.tsx +23 -0
- package/components/autocomplete/DomainSelectAutoComplete.tsx +18 -0
- package/components/autocomplete/FileSelectAutoComplete.tsx +26 -0
- package/components/autocomplete/LanguageSelectAutoComplete.tsx +24 -0
- package/components/autocomplete/ProblemSelectAutoComplete.tsx +18 -0
- package/components/autocomplete/UserSelectAutoComplete.tsx +23 -0
- package/components/autocomplete/components/AssignSelectAutoComplete.tsx +118 -0
- package/components/autocomplete/components/DomainSelectAutoComplete.tsx +53 -0
- package/components/autocomplete/components/FileSelectAutoComplete.tsx +50 -0
- package/components/autocomplete/components/LanguageSelectAutoComplete.tsx +48 -0
- package/components/autocomplete/components/ProblemSelectAutoComplete.tsx +54 -0
- package/components/autocomplete/components/UserSelectAutoComplete.tsx +54 -0
- package/components/autocomplete/domainselectautocomplete.page.styl +6 -0
- package/components/autocomplete/index.tsx +110 -0
- package/components/autocomplete/problemselectautocomplete.page.styl +6 -0
- package/components/autocomplete/userselectautocomplete.page.styl +6 -0
- package/components/browser-update.page.ts +27 -0
- package/components/calendar/calendar.page.styl +129 -0
- package/components/calendar/index.js +367 -0
- package/components/clipboard.page.ts +23 -0
- package/components/contest/contest.page.styl +119 -0
- package/components/contest/contest.page.ts +23 -0
- package/components/contest/contest_sidebar.page.styl +21 -0
- package/components/contest/problem-contest-bg.png +0 -0
- package/components/contest/problem-contest-bg@2x.png +0 -0
- package/components/customFont.page.tsx +90 -0
- package/components/datepicker/datepicker.page.tsx +94 -0
- package/components/dialog/DomDialog.ts +145 -0
- package/components/dialog/dialog.page.styl +40 -0
- package/components/dialog/index.tsx +285 -0
- package/components/discussion/CommentBox.js +103 -0
- package/components/discussion/collapsible.page.styl +40 -0
- package/components/discussion/collapsible.page.tsx +62 -0
- package/components/discussion/comments.page.styl +142 -0
- package/components/discussion/comments.page.tsx +192 -0
- package/components/discussion/discussion.page.styl +17 -0
- package/components/discussion/history.page.tsx +81 -0
- package/components/discussion/reaction.page.styl +30 -0
- package/components/discussion/reaction.page.tsx +103 -0
- package/components/drop/drop.page.styl +40 -0
- package/components/dropdown/Dropdown.js +50 -0
- package/components/dropdown/dropdown.page.styl +33 -0
- package/components/dropdown/dropdown.page.ts +8 -0
- package/components/editor/cmeditor.page.ts +23 -0
- package/components/editor/cmeditor.styl +10 -0
- package/components/editor/index.tsx +293 -0
- package/components/editor/mdeditor.ts +60 -0
- package/components/editor/textareaHandler.ts +29 -0
- package/components/footer/footer.page.styl +94 -0
- package/components/footer/footer.page.ts +26 -0
- package/components/form/button.page.default.styl +59 -0
- package/components/form/button.page.styl +36 -0
- package/components/form/checkbox.page.styl +89 -0
- package/components/form/form.page.styl +200 -0
- package/components/form/form.page.ts +20 -0
- package/components/form/multiSelectCheckbox.page.js +46 -0
- package/components/form/radiobox.page.styl +62 -0
- package/components/form/select.page.styl +29 -0
- package/components/form/textbox.page.styl +79 -0
- package/components/form/textbox.page.ts +21 -0
- package/components/form/var.inc.styl +14 -0
- package/components/header/header.page.styl +79 -0
- package/components/highlighter/code-example.js +111 -0
- package/components/highlighter/highlighter.page.styl +99 -0
- package/components/highlighter/highlighter.page.ts +72 -0
- package/components/highlighter/meta.js +15 -0
- package/components/highlighter/prismjs.js +122 -0
- package/components/hint.page.styl +9 -0
- package/components/hint.ts +19 -0
- package/components/hitokoto/index.page.js +21 -0
- package/components/hotkey/hotkey.page.js +83 -0
- package/components/katex/katex.page.js +26 -0
- package/components/katex/katex.page.styl +2 -0
- package/components/languageselect.tsx +94 -0
- package/components/loader/loader.page.styl +40 -0
- package/components/mantine.page.tsx +39 -0
- package/components/marker/Marker.js +192 -0
- package/components/marker/MarkerReactive.js +55 -0
- package/components/marker/marker.page.js +8 -0
- package/components/marker/marker.page.styl +57 -0
- package/components/media/media.page.js +46 -0
- package/components/menu/menu-heading.page.js +28 -0
- package/components/menu/menu.page.js +18 -0
- package/components/menu/menu.page.styl +68 -0
- package/components/message/index.page.ts +166 -0
- package/components/message/worker.ts +110 -0
- package/components/messagepad/DialogueListItem.page.styl +28 -0
- package/components/messagepad/DialogueListItemComponent.jsx +39 -0
- package/components/messagepad/Message.page.styl +64 -0
- package/components/messagepad/MessageComponent.jsx +33 -0
- package/components/messagepad/MessagePad.page.styl +99 -0
- package/components/messagepad/MessagePadDialogueContentContainer.jsx +104 -0
- package/components/messagepad/MessagePadDialogueListContainer.jsx +49 -0
- package/components/messagepad/MessagePadInputContainer.jsx +100 -0
- package/components/messagepad/index.jsx +49 -0
- package/components/messagepad/reducers/activeId.ts +36 -0
- package/components/messagepad/reducers/dialogues.js +53 -0
- package/components/messagepad/reducers/index.ts +14 -0
- package/components/messagepad/reducers/inputs.js +43 -0
- package/components/messagepad/reducers/isPosting.ts +49 -0
- package/components/monaco/index.ts +178 -0
- package/components/monaco/languages/markdown.ts +97 -0
- package/components/monaco/languages/typescript.ts +45 -0
- package/components/monaco/languages/yaml.ts +22 -0
- package/components/monaco/loader.ts +96 -0
- package/components/monaco/monaco.styl +30 -0
- package/components/monaco/nls.js +31 -0
- package/components/monaco/schema/problemconfig.ts +123 -0
- package/components/navigation/hamburgers.page.styl +87 -0
- package/components/navigation/nav-logo-small_dark.png +0 -0
- package/components/navigation/navigation.page.js +203 -0
- package/components/navigation/navigation.page.styl +211 -0
- package/components/notification/index.ts +105 -0
- package/components/notification/notification.page.js +14 -0
- package/components/notification/notification.page.styl +84 -0
- package/components/nprogress.page.styl +50 -0
- package/components/omnisearch/index.page.tsx +124 -0
- package/components/omnisearch/omnibar.page.styl +138 -0
- package/components/pager/pager.page.styl +57 -0
- package/components/preview/preview.page.ts +187 -0
- package/components/problem/create.page.js +12 -0
- package/components/problem/list.page.js +9 -0
- package/components/problem/rp.page.styl +4 -0
- package/components/problem/tag.page.styl +84 -0
- package/components/problemconfig/BasicForm.tsx +92 -0
- package/components/problemconfig/ProblemConfigEditor.tsx +170 -0
- package/components/problemconfig/ProblemConfigForm.tsx +140 -0
- package/components/problemconfig/ProblemConfigTree.tsx +163 -0
- package/components/problemconfig/ProblemType.tsx +165 -0
- package/components/problemconfig/index.tsx +91 -0
- package/components/problemconfig/reducer/config.ts +173 -0
- package/components/problemconfig/reducer/index.ts +11 -0
- package/components/problemconfig/reducer/testdata.ts +16 -0
- package/components/problemconfig/tree/AddTestcase.tsx +137 -0
- package/components/problemconfig/tree/SelectionManager.tsx +140 -0
- package/components/problemconfig/tree/SubtaskSettings.tsx +180 -0
- package/components/problemconfig/tree/Testcase.tsx +98 -0
- package/components/profile/backgrounds/1.jpg +0 -0
- package/components/profile/backgrounds/10.jpg +0 -0
- package/components/profile/backgrounds/11.jpg +0 -0
- package/components/profile/backgrounds/12.jpg +0 -0
- package/components/profile/backgrounds/13.jpg +0 -0
- package/components/profile/backgrounds/14.jpg +0 -0
- package/components/profile/backgrounds/15.jpg +0 -0
- package/components/profile/backgrounds/16.jpg +0 -0
- package/components/profile/backgrounds/17.jpg +0 -0
- package/components/profile/backgrounds/18.jpg +0 -0
- package/components/profile/backgrounds/19.jpg +0 -0
- package/components/profile/backgrounds/2.jpg +0 -0
- package/components/profile/backgrounds/20.jpg +0 -0
- package/components/profile/backgrounds/21.jpg +0 -0
- package/components/profile/backgrounds/3.jpg +0 -0
- package/components/profile/backgrounds/4.jpg +0 -0
- package/components/profile/backgrounds/5.jpg +0 -0
- package/components/profile/backgrounds/6.jpg +0 -0
- package/components/profile/backgrounds/7.jpg +0 -0
- package/components/profile/backgrounds/8.jpg +0 -0
- package/components/profile/backgrounds/9.jpg +0 -0
- package/components/profile/backgrounds/gen_thumbnails.sh +7 -0
- package/components/profile/backgrounds/thumbnail/1.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/10.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/11.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/12.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/13.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/14.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/15.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/16.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/17.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/18.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/19.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/2.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/20.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/21.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/3.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/4.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/5.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/6.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/7.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/8.jpg +0 -0
- package/components/profile/backgrounds/thumbnail/9.jpg +0 -0
- package/components/profile/profile.page.styl +23 -0
- package/components/react/DomComponent.tsx +14 -0
- package/components/react/IconComponent.tsx +20 -0
- package/components/record/record.page.styl +26 -0
- package/components/rotator/index.js +75 -0
- package/components/rotator/rotator.page.styl +20 -0
- package/components/scratchpad/DataInput.page.styl +17 -0
- package/components/scratchpad/DataInputComponent.jsx +45 -0
- package/components/scratchpad/Editor.page.styl +13 -0
- package/components/scratchpad/Panel.page.styl +18 -0
- package/components/scratchpad/PanelButton.page.styl +15 -0
- package/components/scratchpad/PanelButtonComponent.jsx +19 -0
- package/components/scratchpad/PanelComponent.jsx +25 -0
- package/components/scratchpad/ScratchpadEditorContainer.tsx +137 -0
- package/components/scratchpad/ScratchpadPretestContainer.jsx +57 -0
- package/components/scratchpad/ScratchpadRecordsContainer.jsx +45 -0
- package/components/scratchpad/ScratchpadRecordsRowContainer.jsx +83 -0
- package/components/scratchpad/ScratchpadSettings.tsx +48 -0
- package/components/scratchpad/ScratchpadToolbarContainer.jsx +190 -0
- package/components/scratchpad/Tab.page.styl +24 -0
- package/components/scratchpad/Toolbar.page.styl +53 -0
- package/components/scratchpad/ToolbarComponent.jsx +85 -0
- package/components/scratchpad/index.tsx +132 -0
- package/components/scratchpad/reducers/editor.ts +24 -0
- package/components/scratchpad/reducers/index.ts +17 -0
- package/components/scratchpad/reducers/pretest.ts +34 -0
- package/components/scratchpad/reducers/records.ts +40 -0
- package/components/scratchpad/reducers/state.ts +10 -0
- package/components/scratchpad/reducers/ui.ts +152 -0
- package/components/scratchpad/scratchpad.page.styl +55 -0
- package/components/scratchpad/var.inc.styl +2 -0
- package/components/selectUser.tsx +16 -0
- package/components/signin/signInDialog.page.js +84 -0
- package/components/signin/signin_dialog.page.styl +57 -0
- package/components/smoothscroll/smoothscroll.page.js +44 -0
- package/components/socket/index.ts +68 -0
- package/components/star/star.page.styl +20 -0
- package/components/star/star.page.ts +58 -0
- package/components/sticky/sticky.page.js +66 -0
- package/components/tab/Tab.js +168 -0
- package/components/tab/tab.page.js +9 -0
- package/components/tab/tab.page.styl +105 -0
- package/components/tab/var.inc.styl +3 -0
- package/components/table/StyledTable.js +51 -0
- package/components/table/styledTable.page.js +8 -0
- package/components/table/table.page.styl +73 -0
- package/components/time/time.page.js +47 -0
- package/components/tooltip/Tooltip.js +49 -0
- package/components/tooltip/tooltip.page.js +29 -0
- package/components/tooltip/tooltip.page.styl +69 -0
- package/components/training/training.page.styl +25 -0
- package/components/upload.tsx +103 -0
- package/components/vote/vote.page.js +43 -0
- package/components/zipDownloader/index.ts +157 -0
- package/constant/domain.js +21 -0
- package/constant/message.js +5 -0
- package/constant/record.js +52 -0
- package/context.ts +11 -0
- package/entry.js +72 -0
- package/hydro.ts +112 -0
- package/index.ts +226 -0
- package/lazyload.ts +69 -0
- package/locales/en.yaml +71 -0
- package/locales/ko.yaml +823 -0
- package/locales/zh.yaml +1137 -0
- package/locales/zh_TW.yaml +1133 -0
- package/misc/Page.ts +49 -0
- package/misc/PageLoader.js +31 -0
- package/misc/float.styl +14 -0
- package/misc/grid.styl +1048 -0
- package/misc/immersive-background.jpg +0 -0
- package/misc/immersive-background@2x.jpg +0 -0
- package/misc/immersive.styl +23 -0
- package/misc/nothing.styl +13 -0
- package/misc/puzzled_twd2.svg +1 -0
- package/misc/section.styl +105 -0
- package/misc/slideout.styl +46 -0
- package/misc/structure.styl +158 -0
- package/misc/textalign.styl +11 -0
- package/misc/typography.styl +485 -0
- package/package.json +148 -0
- package/polyfill.ts +90 -0
- package/postcss.config.js +15 -0
- package/sentry.ts +26 -0
- package/service-worker.ts +265 -0
- package/setting.yaml +98 -0
- package/templates/about.html +14 -0
- package/templates/bsod.html +35 -0
- package/templates/components/comments_discussion.html +165 -0
- package/templates/components/comments_solution.html +171 -0
- package/templates/components/contest.html +12 -0
- package/templates/components/form.html +214 -0
- package/templates/components/home.html +20 -0
- package/templates/components/homework.html +8 -0
- package/templates/components/md_hint.html +39 -0
- package/templates/components/noscript_note.html +15 -0
- package/templates/components/nothing.html +6 -0
- package/templates/components/paginator.html +25 -0
- package/templates/components/problem.html +33 -0
- package/templates/components/record.html +21 -0
- package/templates/components/sidemenu.html +11 -0
- package/templates/components/user.html +49 -0
- package/templates/contest_balloon.html +48 -0
- package/templates/contest_clarification.html +103 -0
- package/templates/contest_detail.html +56 -0
- package/templates/contest_edit.html +259 -0
- package/templates/contest_main.html +146 -0
- package/templates/contest_manage.html +80 -0
- package/templates/contest_print.html +27 -0
- package/templates/contest_problemlist.html +231 -0
- package/templates/contest_scoreboard.html +46 -0
- package/templates/contest_scoreboard_download_html.html +71 -0
- package/templates/contest_user.html +47 -0
- package/templates/discussion_create.html +28 -0
- package/templates/discussion_detail.html +149 -0
- package/templates/discussion_edit.html +30 -0
- package/templates/discussion_main_or_node.html +47 -0
- package/templates/domain_base.html +26 -0
- package/templates/domain_create.html +55 -0
- package/templates/domain_dashboard.html +45 -0
- package/templates/domain_edit.html +6 -0
- package/templates/domain_group.html +51 -0
- package/templates/domain_join.html +47 -0
- package/templates/domain_join_applications.html +67 -0
- package/templates/domain_permission.html +66 -0
- package/templates/domain_role.html +71 -0
- package/templates/domain_user.html +86 -0
- package/templates/domain_user_raw.html +5 -0
- package/templates/error.html +25 -0
- package/templates/home_domain.html +64 -0
- package/templates/home_files.html +16 -0
- package/templates/home_messages.html +9 -0
- package/templates/home_security.html +224 -0
- package/templates/home_settings.html +21 -0
- package/templates/homework_detail.html +82 -0
- package/templates/homework_edit.html +138 -0
- package/templates/homework_files.html +24 -0
- package/templates/homework_main.html +76 -0
- package/templates/layout/basic.html +27 -0
- package/templates/layout/home_base.html +13 -0
- package/templates/layout/html5.html +74 -0
- package/templates/layout/immersive.html +22 -0
- package/templates/layout/mail.html +31 -0
- package/templates/layout/simple.html +4 -0
- package/templates/layout/wiki_base.html +16 -0
- package/templates/main.html +22 -0
- package/templates/manage_base.html +24 -0
- package/templates/manage_config.html +6 -0
- package/templates/manage_dashboard.html +27 -0
- package/templates/manage_script.html +56 -0
- package/templates/manage_setting.html +6 -0
- package/templates/manage_user_import.html +23 -0
- package/templates/manage_user_priv.html +76 -0
- package/templates/partials/category.html +19 -0
- package/templates/partials/contest.html +3 -0
- package/templates/partials/contest_balloon.html +37 -0
- package/templates/partials/contest_sidebar.html +150 -0
- package/templates/partials/contest_sidebar_management.html +56 -0
- package/templates/partials/contest_user.html +19 -0
- package/templates/partials/discussion_edit_form.html +45 -0
- package/templates/partials/discussion_list.html +50 -0
- package/templates/partials/discussion_nodes_widget.html +17 -0
- package/templates/partials/files.html +49 -0
- package/templates/partials/footer.html +108 -0
- package/templates/partials/hamburger.html +7 -0
- package/templates/partials/header_mobile.html +12 -0
- package/templates/partials/homepage/bulletin.html +7 -0
- package/templates/partials/homepage/contest.html +48 -0
- package/templates/partials/homepage/discussion.html +13 -0
- package/templates/partials/homepage/discussion_nodes.html +4 -0
- package/templates/partials/homepage/error.html +5 -0
- package/templates/partials/homepage/hitokoto.html +6 -0
- package/templates/partials/homepage/homework.html +45 -0
- package/templates/partials/homepage/problem_search.html +13 -0
- package/templates/partials/homepage/ranking.html +39 -0
- package/templates/partials/homepage/recent_problems.html +17 -0
- package/templates/partials/homepage/starred_problems.html +15 -0
- package/templates/partials/homepage/suggestion.html +34 -0
- package/templates/partials/homepage/training.html +50 -0
- package/templates/partials/homework.html +3 -0
- package/templates/partials/homework_default_penalty_rules.yaml +6 -0
- package/templates/partials/homework_sidebar.html +93 -0
- package/templates/partials/login_dialog.html +56 -0
- package/templates/partials/manage_user_priv.html +78 -0
- package/templates/partials/nav.html +138 -0
- package/templates/partials/problem-sidebar-information.html +25 -0
- package/templates/partials/problem.html +2 -0
- package/templates/partials/problem_category_dialog.html +43 -0
- package/templates/partials/problem_default.md +26 -0
- package/templates/partials/problem_description.html +33 -0
- package/templates/partials/problem_files.html +63 -0
- package/templates/partials/problem_list.html +68 -0
- package/templates/partials/problem_lucky.html +10 -0
- package/templates/partials/problem_sidebar.html +14 -0
- package/templates/partials/problem_sidebar_contest.html +43 -0
- package/templates/partials/problem_sidebar_homework.html +42 -0
- package/templates/partials/problem_sidebar_normal.html +152 -0
- package/templates/partials/problem_stat.html +3 -0
- package/templates/partials/scoreboard.html +79 -0
- package/templates/partials/setting.html +92 -0
- package/templates/partials/training_default.json +14 -0
- package/templates/partials/training_detail.html +153 -0
- package/templates/partials/user.html +2 -0
- package/templates/partials/user_detail/activity.html +18 -0
- package/templates/partials/user_detail/solution.html +29 -0
- package/templates/problem_config.html +39 -0
- package/templates/problem_detail.html +150 -0
- package/templates/problem_edit.html +111 -0
- package/templates/problem_files.html +91 -0
- package/templates/problem_hack.html +41 -0
- package/templates/problem_import.html +58 -0
- package/templates/problem_main.html +100 -0
- package/templates/problem_solution.html +55 -0
- package/templates/problem_statistics.html +96 -0
- package/templates/problem_submit.html +40 -0
- package/templates/ranking.html +81 -0
- package/templates/record_detail.html +134 -0
- package/templates/record_detail_status.html +93 -0
- package/templates/record_detail_summary.html +19 -0
- package/templates/record_main.html +142 -0
- package/templates/record_main_tr.html +35 -0
- package/templates/status.html +75 -0
- package/templates/training_detail.html +120 -0
- package/templates/training_edit.html +68 -0
- package/templates/training_files.html +64 -0
- package/templates/training_main.html +107 -0
- package/templates/user_changemail_mail.html +6 -0
- package/templates/user_changemail_mail_sent.html +9 -0
- package/templates/user_delete_pending.html +10 -0
- package/templates/user_detail.html +181 -0
- package/templates/user_login.html +46 -0
- package/templates/user_logout.html +13 -0
- package/templates/user_lostpass.html +27 -0
- package/templates/user_lostpass_mail.html +6 -0
- package/templates/user_lostpass_mail_sent.html +9 -0
- package/templates/user_lostpass_with_code.html +29 -0
- package/templates/user_register.html +22 -0
- package/templates/user_register_mail.html +6 -0
- package/templates/user_register_mail_sent.html +9 -0
- package/templates/user_register_with_code.html +35 -0
- package/templates/user_sudo.html +54 -0
- package/templates/user_sudo_redirect.html +18 -0
- package/templates/wiki_help.html +189 -0
- package/theme/bp6-compat.css +48 -0
- package/theme/dark.styl +397 -0
- package/theme/default.js +33 -0
- package/typed.d.ts +20 -0
- package/utils/base.ts +209 -0
- package/utils/base64.js +104 -0
- package/utils/db.ts +32 -0
- package/utils/index.ts +73 -0
- package/utils/loadReactRedux.ts +32 -0
- package/utils/mediaQuery.ts +13 -0
- package/utils/pjax.js +148 -0
- package/utils/slide.ts +57 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { AutoComplete, AutoCompleteHandle, AutoCompleteProps } from '@hydrooj/components';
|
|
2
|
+
import type { DomainDoc } from 'hydrooj/src/interface';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { request } from 'vj/utils';
|
|
6
|
+
|
|
7
|
+
const DomainSelectAutoComplete = forwardRef<AutoCompleteHandle<DomainDoc>, AutoCompleteProps<DomainDoc>>((props, ref) => (
|
|
8
|
+
<AutoComplete<DomainDoc>
|
|
9
|
+
ref={ref as any}
|
|
10
|
+
cacheKey="domain"
|
|
11
|
+
renderItem={(domain) => (
|
|
12
|
+
<div className="media">
|
|
13
|
+
<div className="media__left medium">
|
|
14
|
+
<img className="small domain-profile-avatar" src={domain.avatarUrl} alt="" width="30" height="30" />
|
|
15
|
+
</div>
|
|
16
|
+
<div className="media__body medium">
|
|
17
|
+
<div className="domain-select__name">{domain.name}</div>
|
|
18
|
+
<div className="domain-select__id">ID = {domain._id}</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
)}
|
|
22
|
+
queryItems={(query) => request.get('/domain/search', { q: query })}
|
|
23
|
+
itemText={(domain) => domain.name}
|
|
24
|
+
itemKey={(domain) => domain._id}
|
|
25
|
+
{...{
|
|
26
|
+
width: '100%',
|
|
27
|
+
height: 'auto',
|
|
28
|
+
listStyle: {},
|
|
29
|
+
multi: false,
|
|
30
|
+
selectedKeys: [],
|
|
31
|
+
allowEmptyQuery: true,
|
|
32
|
+
freeSolo: false,
|
|
33
|
+
freeSoloConverter: (input) => input,
|
|
34
|
+
...props,
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
));
|
|
38
|
+
|
|
39
|
+
DomainSelectAutoComplete.propTypes = {
|
|
40
|
+
width: PropTypes.string,
|
|
41
|
+
height: PropTypes.string,
|
|
42
|
+
listStyle: PropTypes.object,
|
|
43
|
+
onChange: PropTypes.func.isRequired,
|
|
44
|
+
multi: PropTypes.bool,
|
|
45
|
+
selectedKeys: PropTypes.arrayOf(PropTypes.string),
|
|
46
|
+
allowEmptyQuery: PropTypes.bool,
|
|
47
|
+
freeSolo: PropTypes.bool,
|
|
48
|
+
freeSoloConverter: PropTypes.func,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
DomainSelectAutoComplete.displayName = 'DomainSelectAutoComplete';
|
|
52
|
+
|
|
53
|
+
export default DomainSelectAutoComplete;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { AutoComplete } from '@hydrooj/components';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
type DefaultProps = {
|
|
6
|
+
_id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
} & string;
|
|
9
|
+
|
|
10
|
+
const FileSelectAutoComplete = React.forwardRef<any, any>((props, ref) => (
|
|
11
|
+
<AutoComplete<DefaultProps>
|
|
12
|
+
ref={ref as any}
|
|
13
|
+
fetchItems={(keys) => props.data.filter((i) => (i._id ? keys.includes(i._id) : keys.includes(i)))}
|
|
14
|
+
queryItems={(query) => props.data.filter((i) => (i.name
|
|
15
|
+
? i.name.toLowerCase().match(query.toLowerCase())
|
|
16
|
+
: i.toString().toLowerCase().match(query.toLowerCase())
|
|
17
|
+
))}
|
|
18
|
+
itemText={(item) => `${item.name || item}`}
|
|
19
|
+
itemKey={(item) => `${item._id?.toString() || item.name || item}`}
|
|
20
|
+
renderItem={(item) => item.name || item._id || item} // TODO icon
|
|
21
|
+
allowEmptyQuery
|
|
22
|
+
{...{
|
|
23
|
+
width: '100%',
|
|
24
|
+
height: 'auto',
|
|
25
|
+
listStyle: {},
|
|
26
|
+
multi: false,
|
|
27
|
+
selectedKeys: [],
|
|
28
|
+
freeSolo: false,
|
|
29
|
+
freeSoloConverter: (input) => input,
|
|
30
|
+
...props,
|
|
31
|
+
}}
|
|
32
|
+
/>
|
|
33
|
+
));
|
|
34
|
+
|
|
35
|
+
FileSelectAutoComplete.propTypes = {
|
|
36
|
+
width: PropTypes.string,
|
|
37
|
+
height: PropTypes.string,
|
|
38
|
+
listStyle: PropTypes.object,
|
|
39
|
+
onChange: PropTypes.func.isRequired,
|
|
40
|
+
multi: PropTypes.bool,
|
|
41
|
+
selectedKeys: PropTypes.arrayOf(PropTypes.string),
|
|
42
|
+
allowEmptyQuery: PropTypes.bool,
|
|
43
|
+
freeSolo: PropTypes.bool,
|
|
44
|
+
freeSoloConverter: PropTypes.func,
|
|
45
|
+
data: PropTypes.arrayOf(PropTypes.any),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
FileSelectAutoComplete.displayName = 'FileSelectAutoComplete';
|
|
49
|
+
|
|
50
|
+
export default FileSelectAutoComplete;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CustomSelectAutoComplete } from '@hydrooj/components';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
const prefixes = new Set(Object.keys(window.LANGS).filter((i) => i.includes('.')).map((i) => i.split('.')[0]));
|
|
6
|
+
const data = Object.keys(window.LANGS).filter((i) => !prefixes.has(i))
|
|
7
|
+
.map((i) => ({ name: `${i.includes('.') ? `${window.LANGS[i.split('.')[0]].display || ''}/` : ''}${window.LANGS[i].display}`, _id: i }));
|
|
8
|
+
const withAuto = [...data, { name: 'Auto', _id: 'auto' }];
|
|
9
|
+
|
|
10
|
+
const LanguageSelectAutoComplete = React.forwardRef<any, any>((props, ref) => (
|
|
11
|
+
<CustomSelectAutoComplete
|
|
12
|
+
ref={ref as any}
|
|
13
|
+
{...props}
|
|
14
|
+
selectedKeys={typeof props.selectedKeys === 'string' ? props.selectedKeys.split(',') : props.selectedKeys}
|
|
15
|
+
data={props.withAuto ? withAuto : data}
|
|
16
|
+
renderItem={(item) => (prefixes.has(item._id) ? '' : `${item.name}`)}
|
|
17
|
+
onChange={(val) => {
|
|
18
|
+
if (!props.multi) {
|
|
19
|
+
props.onChange(val);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
let value = val.split(',');
|
|
23
|
+
const active = new Set(value.filter((i) => i.includes('.')).map((i) => i.split('.')[0]));
|
|
24
|
+
value = value.filter((i) => !prefixes.has(i) || active.has(i));
|
|
25
|
+
for (const i of active) if (!value.includes(i)) value.push(i);
|
|
26
|
+
props.onChange(value.join(','));
|
|
27
|
+
}}
|
|
28
|
+
multi={!!props.multi}
|
|
29
|
+
/>
|
|
30
|
+
));
|
|
31
|
+
|
|
32
|
+
LanguageSelectAutoComplete.propTypes = {
|
|
33
|
+
width: PropTypes.string,
|
|
34
|
+
height: PropTypes.string,
|
|
35
|
+
listStyle: PropTypes.object,
|
|
36
|
+
onChange: PropTypes.func.isRequired,
|
|
37
|
+
multi: PropTypes.bool,
|
|
38
|
+
selectedKeys: PropTypes.arrayOf(PropTypes.string),
|
|
39
|
+
allowEmptyQuery: PropTypes.bool,
|
|
40
|
+
freeSolo: PropTypes.bool,
|
|
41
|
+
freeSoloConverter: PropTypes.func,
|
|
42
|
+
data: PropTypes.arrayOf(PropTypes.any),
|
|
43
|
+
withAuto: PropTypes.bool,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
LanguageSelectAutoComplete.displayName = 'LanguageSelectAutoComplete';
|
|
47
|
+
|
|
48
|
+
export default LanguageSelectAutoComplete;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AutoComplete, AutoCompleteHandle, AutoCompleteProps } from '@hydrooj/components';
|
|
2
|
+
import type { ProblemDoc } from 'hydrooj/src/interface';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { api, request } from 'vj/utils';
|
|
6
|
+
|
|
7
|
+
const ProblemSelectAutoComplete = forwardRef<AutoCompleteHandle<ProblemDoc>, AutoCompleteProps<ProblemDoc>>((props, ref) => (
|
|
8
|
+
<AutoComplete<ProblemDoc>
|
|
9
|
+
ref={ref as any}
|
|
10
|
+
cacheKey={`problem-${UiContext.domainId}`}
|
|
11
|
+
queryItems={async (query) => {
|
|
12
|
+
const { pdocs } = await request.get(`/d/${UiContext.domainId}/p`, { q: query, quick: true, sort: query ? 'default' : 'recent' });
|
|
13
|
+
return pdocs;
|
|
14
|
+
}}
|
|
15
|
+
fetchItems={(ids) => api('problems', { ids: ids.map((i) => +i) }, ['docId', 'pid', 'title'])}
|
|
16
|
+
itemText={(pdoc) => `${`${pdoc.docId} ${pdoc.title}`}`}
|
|
17
|
+
itemKey={(pdoc) => `${pdoc.docId || pdoc}`}
|
|
18
|
+
renderItem={(pdoc) => (
|
|
19
|
+
<div className="media">
|
|
20
|
+
<div className="media__body medium">
|
|
21
|
+
<div className="problem-select__name">{pdoc.pid ? `${pdoc.pid} ` : ''}{pdoc.title}</div>
|
|
22
|
+
<div className="problem-select__id">ID = {pdoc.docId}</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
)}
|
|
26
|
+
{...{
|
|
27
|
+
width: '100%',
|
|
28
|
+
height: 'auto',
|
|
29
|
+
listStyle: {},
|
|
30
|
+
multi: false,
|
|
31
|
+
selectedKeys: [],
|
|
32
|
+
allowEmptyQuery: true,
|
|
33
|
+
freeSolo: false,
|
|
34
|
+
freeSoloConverter: (input) => input,
|
|
35
|
+
...props,
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
));
|
|
39
|
+
|
|
40
|
+
ProblemSelectAutoComplete.propTypes = {
|
|
41
|
+
width: PropTypes.string,
|
|
42
|
+
height: PropTypes.string,
|
|
43
|
+
listStyle: PropTypes.object,
|
|
44
|
+
onChange: PropTypes.func.isRequired,
|
|
45
|
+
multi: PropTypes.bool,
|
|
46
|
+
selectedKeys: PropTypes.arrayOf(PropTypes.string),
|
|
47
|
+
allowEmptyQuery: PropTypes.bool,
|
|
48
|
+
freeSolo: PropTypes.bool,
|
|
49
|
+
freeSoloConverter: PropTypes.func,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
ProblemSelectAutoComplete.displayName = 'ProblemSelectAutoComplete';
|
|
53
|
+
|
|
54
|
+
export default ProblemSelectAutoComplete;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AutoComplete, AutoCompleteHandle, AutoCompleteProps } from '@hydrooj/components';
|
|
2
|
+
import type { Udoc } from 'hydrooj/src/interface';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { api } from 'vj/utils';
|
|
6
|
+
|
|
7
|
+
const UserSelectAutoComplete = forwardRef<AutoCompleteHandle<Udoc>, AutoCompleteProps<Udoc>>((props, ref) => (
|
|
8
|
+
<AutoComplete<Udoc>
|
|
9
|
+
ref={ref as any}
|
|
10
|
+
cacheKey="user"
|
|
11
|
+
queryItems={(query) => api('users', { search: query }, ['_id', 'uname', 'displayName', 'avatarUrl'])}
|
|
12
|
+
fetchItems={(ids) => api('users', { auto: ids }, ['_id', 'uname', 'displayName'])}
|
|
13
|
+
itemText={(user) => user.uname + (user.displayName ? ` (${user.displayName})` : '')}
|
|
14
|
+
itemKey={(user) => ((props.multi || /^[+-]?\d+$/.test(user.uname.trim())) ? user._id.toString() : user.uname)}
|
|
15
|
+
renderItem={(user) => (
|
|
16
|
+
<div className="media">
|
|
17
|
+
<div className="media__left medium">
|
|
18
|
+
<img className="small user-profile-avatar" alt="" src={user.avatarUrl} width="30" height="30" />
|
|
19
|
+
</div>
|
|
20
|
+
<div className="media__body medium">
|
|
21
|
+
<div className="user-select__uname">{user.uname}{user.displayName && ` (${user.displayName})`}</div>
|
|
22
|
+
<div className="user-select__uid">UID = {user._id}</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
)}
|
|
26
|
+
{...{
|
|
27
|
+
width: '100%',
|
|
28
|
+
height: 'auto',
|
|
29
|
+
listStyle: {},
|
|
30
|
+
multi: false,
|
|
31
|
+
selectedKeys: [],
|
|
32
|
+
allowEmptyQuery: false,
|
|
33
|
+
freeSolo: false,
|
|
34
|
+
freeSoloConverter: (input) => input,
|
|
35
|
+
...props,
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
));
|
|
39
|
+
|
|
40
|
+
UserSelectAutoComplete.propTypes = {
|
|
41
|
+
width: PropTypes.string,
|
|
42
|
+
height: PropTypes.string,
|
|
43
|
+
listStyle: PropTypes.object,
|
|
44
|
+
onChange: PropTypes.func.isRequired,
|
|
45
|
+
multi: PropTypes.bool,
|
|
46
|
+
selectedKeys: PropTypes.arrayOf(PropTypes.string),
|
|
47
|
+
allowEmptyQuery: PropTypes.bool,
|
|
48
|
+
freeSolo: PropTypes.bool,
|
|
49
|
+
freeSoloConverter: PropTypes.func,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
UserSelectAutoComplete.displayName = 'UserSelectAutoComplete';
|
|
53
|
+
|
|
54
|
+
export default UserSelectAutoComplete;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { AutoComplete as AutoCompleteFC } from '@hydrooj/components';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import ReactDOM from 'react-dom/client';
|
|
4
|
+
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
|
5
|
+
|
|
6
|
+
export interface AutoCompleteOptions<Multi extends boolean = boolean> {
|
|
7
|
+
multi?: Multi;
|
|
8
|
+
defaultItems?: string;
|
|
9
|
+
width?: string;
|
|
10
|
+
height?: string;
|
|
11
|
+
classes?: string;
|
|
12
|
+
listStyle?: any;
|
|
13
|
+
allowEmptyQuery?: boolean;
|
|
14
|
+
freeSolo?: boolean;
|
|
15
|
+
freeSoloConverter?: any;
|
|
16
|
+
onChange?: (value) => any;
|
|
17
|
+
items?: () => Promise<any[]>;
|
|
18
|
+
render?: () => string;
|
|
19
|
+
text?: () => string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default class AutoComplete<Options extends Record<string, any> = object, Multi extends boolean = boolean> extends DOMAttachedObject {
|
|
23
|
+
static DOMAttachKey = 'ucwAutoCompleteInstance';
|
|
24
|
+
ref = null;
|
|
25
|
+
container = document.createElement('div');
|
|
26
|
+
options: AutoCompleteOptions<Multi> & Options;
|
|
27
|
+
component = ReactDOM.createRoot(this.container);
|
|
28
|
+
changeListener = [
|
|
29
|
+
(val) => this.$dom.val(val),
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
constructor($dom, options = {} as Options & { component?: React.ComponentType<any>, props?: Record<string, any> }) {
|
|
33
|
+
super($dom);
|
|
34
|
+
this.options = {
|
|
35
|
+
items: async () => [],
|
|
36
|
+
render: () => '',
|
|
37
|
+
text: () => null,
|
|
38
|
+
multi: false as Multi,
|
|
39
|
+
...options,
|
|
40
|
+
};
|
|
41
|
+
this.clear = this.clear.bind(this);
|
|
42
|
+
this.onChange = this.onChange.bind(this);
|
|
43
|
+
this.attach = this.attach.bind(this);
|
|
44
|
+
this.open = this.open.bind(this);
|
|
45
|
+
this.close = this.close.bind(this);
|
|
46
|
+
this.value = this.value.bind(this);
|
|
47
|
+
this.detach = this.detach.bind(this);
|
|
48
|
+
this.focus = this.focus.bind(this);
|
|
49
|
+
this.$dom.addClass('autocomplete-dummy').after(this.container);
|
|
50
|
+
// Note: use `setTimeout(fn, 0)` to ensure that code is executed after browser autofill
|
|
51
|
+
// also see https://stackoverflow.com/a/779785/13553984
|
|
52
|
+
setTimeout(() => this.attach(), 0);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
clear(clearValue = true) {
|
|
56
|
+
if (!this.ref) return;
|
|
57
|
+
if (clearValue) this.ref.clear();
|
|
58
|
+
else this.ref.closeList();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
onChange(val: string | ((v: string) => any)) {
|
|
62
|
+
if (typeof val === 'string') this.changeListener.forEach((f) => f(val));
|
|
63
|
+
else this.changeListener.push(val);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
attach() {
|
|
67
|
+
const Component = this.options.component || AutoCompleteFC;
|
|
68
|
+
const Wrapper = (props) => {
|
|
69
|
+
const [value, setValue] = React.useState(props.value);
|
|
70
|
+
return <Component
|
|
71
|
+
ref={(ref) => { this.ref = ref; }}
|
|
72
|
+
onChange={(v) => {
|
|
73
|
+
setValue(v);
|
|
74
|
+
this.onChange(v);
|
|
75
|
+
}}
|
|
76
|
+
selectedKeys={(Array.isArray(value) ? value : value.split(',')).map((i) => i.trim()).filter((i) => i)}
|
|
77
|
+
height="34px"
|
|
78
|
+
{...this.options.props}
|
|
79
|
+
/>;
|
|
80
|
+
};
|
|
81
|
+
this.component.render(<Wrapper value={this.$dom.val()} />);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
open() {
|
|
85
|
+
if (!this.ref) return;
|
|
86
|
+
this.ref.triggerQuery();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
close() {
|
|
90
|
+
if (!this.ref) return;
|
|
91
|
+
this.ref.closeList();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
value(): Multi extends true ? (string | number)[] : string {
|
|
95
|
+
if (this.options.multi) return this.ref?.getSelectedItemKeys() ?? this.$dom.val();
|
|
96
|
+
return this.ref?.getSelectedItems()[0] ?? null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
detach() {
|
|
100
|
+
if (this.detached) return;
|
|
101
|
+
super.detach();
|
|
102
|
+
this.component.unmount();
|
|
103
|
+
this.$dom.removeClass('autocomplete-dummy');
|
|
104
|
+
this.container.parentNode.removeChild(this.container);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
focus() {
|
|
108
|
+
this.ref.focus();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AutoloadPage } from 'vj/misc/Page';
|
|
2
|
+
import { i18n, tpl } from 'vj/utils';
|
|
3
|
+
import { InfoDialog } from './dialog';
|
|
4
|
+
|
|
5
|
+
function isSupported() {
|
|
6
|
+
try {
|
|
7
|
+
if (!navigator.userAgent.includes('Chrome/')) return false;
|
|
8
|
+
const ver = +navigator.userAgent.split('Chrome/')[1].split('.')[0];
|
|
9
|
+
if (!Number.isSafeInteger(ver)) return false;
|
|
10
|
+
if (ver < 80) return false;
|
|
11
|
+
return true;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default new AutoloadPage('browser-update', () => {
|
|
18
|
+
if (UserContext.priv !== -1) return; // Only warn superadmins
|
|
19
|
+
if ((+localStorage.getItem('su-browser-warn') || 0) - Date.now() < 24 * 3600 * 1000) return;
|
|
20
|
+
const key = 'warn::admin:unsupportedbrowser';
|
|
21
|
+
if (!isSupported() && i18n(key) !== key) {
|
|
22
|
+
new InfoDialog({
|
|
23
|
+
$body: tpl.typoMsg(i18n(key)),
|
|
24
|
+
}).open();
|
|
25
|
+
localStorage.setItem('su-browser-warn', Date.now().toString());
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
.calendar__header
|
|
2
|
+
line-height: rem(45px)
|
|
3
|
+
text-align: center
|
|
4
|
+
|
|
5
|
+
h1
|
|
6
|
+
display: inline-block
|
|
7
|
+
line-height: inherit
|
|
8
|
+
width: rem(280px)
|
|
9
|
+
|
|
10
|
+
button
|
|
11
|
+
font-size: rem($font-size-title)
|
|
12
|
+
color: $text-3-color
|
|
13
|
+
padding: 0 rem(10px)
|
|
14
|
+
outline: 0
|
|
15
|
+
|
|
16
|
+
&:hover
|
|
17
|
+
color: $primary-color
|
|
18
|
+
|
|
19
|
+
.calendar__week-title
|
|
20
|
+
table
|
|
21
|
+
width: 100%
|
|
22
|
+
|
|
23
|
+
th
|
|
24
|
+
width: 14.28%
|
|
25
|
+
padding: rem(20px 10px)
|
|
26
|
+
color: $supplementary-color
|
|
27
|
+
|
|
28
|
+
.calendar__row
|
|
29
|
+
position: relative
|
|
30
|
+
|
|
31
|
+
.calendar__row__bg
|
|
32
|
+
position: absolute
|
|
33
|
+
left: 0
|
|
34
|
+
top: 0
|
|
35
|
+
width: 100%
|
|
36
|
+
height: 100%
|
|
37
|
+
|
|
38
|
+
table
|
|
39
|
+
width: 100%
|
|
40
|
+
height: 100%
|
|
41
|
+
|
|
42
|
+
td
|
|
43
|
+
width: 14.28%
|
|
44
|
+
border: 1px solid $table-border-color
|
|
45
|
+
|
|
46
|
+
&.is-current-day
|
|
47
|
+
background: lighten($highlight-color, 85%)
|
|
48
|
+
|
|
49
|
+
.calendar__row__content
|
|
50
|
+
min-height: rem(100px)
|
|
51
|
+
position: relative
|
|
52
|
+
z-index: 2
|
|
53
|
+
padding-bottom: rem(10px)
|
|
54
|
+
|
|
55
|
+
table
|
|
56
|
+
width: 100%
|
|
57
|
+
|
|
58
|
+
th
|
|
59
|
+
width: 14.28%
|
|
60
|
+
padding: rem(10px)
|
|
61
|
+
color: $text-2-color
|
|
62
|
+
|
|
63
|
+
&.is-inactive
|
|
64
|
+
opacity: 0.3
|
|
65
|
+
|
|
66
|
+
&.is-current-day
|
|
67
|
+
color: $highlight-color
|
|
68
|
+
|
|
69
|
+
td
|
|
70
|
+
position: relative
|
|
71
|
+
height: rem(24px)
|
|
72
|
+
|
|
73
|
+
.calendar__banner
|
|
74
|
+
position: absolute
|
|
75
|
+
display: block
|
|
76
|
+
top: rem(2px)
|
|
77
|
+
left: rem(5px)
|
|
78
|
+
right: rem(5px)
|
|
79
|
+
height: rem(20px)
|
|
80
|
+
line-height: rem(20px)
|
|
81
|
+
padding: rem(0 5px)
|
|
82
|
+
font-size: rem($font-size-small)
|
|
83
|
+
border-radius: rem(5px)
|
|
84
|
+
white-space: nowrap
|
|
85
|
+
overflow: hidden
|
|
86
|
+
text-overflow: ellipsis
|
|
87
|
+
|
|
88
|
+
&, &:visited, &:hover, &:active
|
|
89
|
+
color: #FFF
|
|
90
|
+
text-decoration: none
|
|
91
|
+
|
|
92
|
+
&.is-trunc-begin, &.is-snap-begin
|
|
93
|
+
border-top-left-radius: 0
|
|
94
|
+
border-bottom-left-radius: 0
|
|
95
|
+
|
|
96
|
+
&.is-trunc-end, &.is-snap-end
|
|
97
|
+
border-top-right-radius: 0
|
|
98
|
+
border-bottom-right-radius: 0
|
|
99
|
+
|
|
100
|
+
&.is-snap-begin
|
|
101
|
+
left: 0
|
|
102
|
+
padding-left: rem(10px)
|
|
103
|
+
|
|
104
|
+
&.is-snap-end
|
|
105
|
+
right: 0
|
|
106
|
+
padding-right: rem(10px)
|
|
107
|
+
|
|
108
|
+
&.is-masked
|
|
109
|
+
background-image: repeating-linear-gradient(
|
|
110
|
+
45deg,
|
|
111
|
+
rgba(#000, 0.1),
|
|
112
|
+
rgba(#000, 0.1) 10px,
|
|
113
|
+
rgba(#000, 0) 10px,
|
|
114
|
+
rgba(#000, 0) 20px
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
for key, value in $calendar-banner-color
|
|
118
|
+
&.color-{key}
|
|
119
|
+
background-color: value
|
|
120
|
+
|
|
121
|
+
.calendar__body-container
|
|
122
|
+
position: relative
|
|
123
|
+
|
|
124
|
+
.calendar__body.exit
|
|
125
|
+
position: absolute
|
|
126
|
+
left: 0
|
|
127
|
+
top: 0
|
|
128
|
+
width: 100%
|
|
129
|
+
user-select: none
|