amis-rev-ui 6.13.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/LICENSE +201 -0
- package/esm/HTMLFilterContext.d.ts +3 -0
- package/esm/HTMLFilterContext.js +10 -0
- package/esm/components/404.js +35 -0
- package/esm/components/Alert.js +266 -0
- package/esm/components/Alert2.js +58 -0
- package/esm/components/AlphabetIndexer.d.ts +11 -0
- package/esm/components/AlphabetIndexer.js +48 -0
- package/esm/components/AnchorNav.js +153 -0
- package/esm/components/AnchorNavSection.d.ts +2 -0
- package/esm/components/AnchorNavSection.js +7 -0
- package/esm/components/ArrayInput.js +146 -0
- package/esm/components/AsideNav.js +133 -0
- package/esm/components/AssociatedSelection.js +107 -0
- package/esm/components/AutoFoldedList.js +124 -0
- package/esm/components/AutoSizer.d.ts +2 -0
- package/esm/components/AutoSizer.js +8 -0
- package/esm/components/Avatar.js +126 -0
- package/esm/components/Badge.d.ts +20 -0
- package/esm/components/Badge.js +154 -0
- package/esm/components/BaiduMapPicker.js +366 -0
- package/esm/components/BarCode.js +42 -0
- package/esm/components/Breadcrumb.js +160 -0
- package/esm/components/Button.js +64 -0
- package/esm/components/CalendarMobile.js +538 -0
- package/esm/components/Card.js +88 -0
- package/esm/components/Cascader.js +515 -0
- package/esm/components/ChainedDropdownSelection.js +104 -0
- package/esm/components/ChainedSelection.js +184 -0
- package/esm/components/Checkbox.js +87 -0
- package/esm/components/CityArea.js +190 -0
- package/esm/components/CityDB.d.ts +13 -0
- package/esm/components/CityDB.js +3942 -0
- package/esm/components/CodeMirror.d.ts +29 -0
- package/esm/components/CodeMirror.js +140 -0
- package/esm/components/Collapse.js +184 -0
- package/esm/components/CollapseGroup.js +117 -0
- package/esm/components/ColorPicker.js +259 -0
- package/esm/components/Combo.js +212 -0
- package/esm/components/ConditionBuilder.d.ts +2 -0
- package/esm/components/ConditionBuilder.js +7 -0
- package/esm/components/ConfirmBox.js +128 -0
- package/esm/components/ContextMenu.js +310 -0
- package/esm/components/DatePicker.js +716 -0
- package/esm/components/DateRangePicker.js +1385 -0
- package/esm/components/DiffEditor.d.ts +21 -0
- package/esm/components/DiffEditor.js +119 -0
- package/esm/components/DndContainer.js +25 -0
- package/esm/components/Drawer.js +272 -0
- package/esm/components/DropDownSelection.js +77 -0
- package/esm/components/DropdownContextMenus.js +93 -0
- package/esm/components/Editor.js +238 -0
- package/esm/components/Form.d.ts +31 -0
- package/esm/components/Form.js +84 -0
- package/esm/components/FormField.js +78 -0
- package/esm/components/FormulaPicker.d.ts +2 -0
- package/esm/components/FormulaPicker.js +7 -0
- package/esm/components/GaodeMapPicker.js +204 -0
- package/esm/components/GridNav.d.ts +53 -0
- package/esm/components/GridNav.js +125 -0
- package/esm/components/GridNavItem.d.ts +2 -0
- package/esm/components/GridNavItem.js +7 -0
- package/esm/components/GroupedSelection.js +138 -0
- package/esm/components/HeadCellDropDown.d.ts +2 -0
- package/esm/components/HeadCellDropDown.js +7 -0
- package/esm/components/HorizontalScroll.d.ts +74 -0
- package/esm/components/HorizontalScroll.js +271 -0
- package/esm/components/Html.js +55 -0
- package/esm/components/Icon.d.ts +2 -0
- package/esm/components/Icon.js +7 -0
- package/esm/components/ImageGallery.js +396 -0
- package/esm/components/Input.d.ts +18 -0
- package/esm/components/Input.js +75 -0
- package/esm/components/InputBox.js +99 -0
- package/esm/components/InputBoxWithSuggestion.js +70 -0
- package/esm/components/InputJSONSchema.d.ts +2 -0
- package/esm/components/InputJSONSchema.js +7 -0
- package/esm/components/InputTable.js +176 -0
- package/esm/components/JSONSchemaEditor.d.ts +2 -0
- package/esm/components/JSONSchemaEditor.js +7 -0
- package/esm/components/Layout.js +60 -0
- package/esm/components/Link.js +44 -0
- package/esm/components/ListGroup.js +31 -0
- package/esm/components/ListMenu.js +62 -0
- package/esm/components/LocationPicker.js +208 -0
- package/esm/components/Markdown.d.ts +25 -0
- package/esm/components/Markdown.js +70 -0
- package/esm/components/Menu.d.ts +2 -0
- package/esm/components/Menu.js +7 -0
- package/esm/components/MixedInput.js +88 -0
- package/esm/components/MobileDevTool.d.ts +12 -0
- package/esm/components/MobileDevTool.js +312 -0
- package/esm/components/Modal.js +261 -0
- package/esm/components/ModalManager.d.ts +16 -0
- package/esm/components/ModalManager.js +42 -0
- package/esm/components/MultilineText.js +90 -0
- package/esm/components/NumberInput.js +274 -0
- package/esm/components/OverflowTpl.js +100 -0
- package/esm/components/Pagination.js +377 -0
- package/esm/components/PdfViewer.js +83 -0
- package/esm/components/Picker.js +73 -0
- package/esm/components/PickerColumn.js +276 -0
- package/esm/components/PickerContainer.js +157 -0
- package/esm/components/PopOverContainer.d.ts +59 -0
- package/esm/components/PopOverContainer.js +148 -0
- package/esm/components/PopUp.js +85 -0
- package/esm/components/Progress.js +136 -0
- package/esm/components/PullRefresh.js +172 -0
- package/esm/components/Radios.js +129 -0
- package/esm/components/Range.js +516 -0
- package/esm/components/Rating.js +341 -0
- package/esm/components/ResultBox.js +195 -0
- package/esm/components/ResultList.js +253 -0
- package/esm/components/ResultTableList.js +152 -0
- package/esm/components/ResultTreeList.js +241 -0
- package/esm/components/RichText.d.ts +48 -0
- package/esm/components/RichText.js +271 -0
- package/esm/components/SearchBox.js +298 -0
- package/esm/components/Select.js +814 -0
- package/esm/components/SelectMobile.d.ts +38 -0
- package/esm/components/SelectMobile.js +369 -0
- package/esm/components/Selection.js +166 -0
- package/esm/components/Shape.js +429 -0
- package/esm/components/Signature.js +294 -0
- package/esm/components/Slider.js +140 -0
- package/esm/components/SparkLine.js +62 -0
- package/esm/components/Spinner.js +202 -0
- package/esm/components/Steps.js +76 -0
- package/esm/components/Switch.js +73 -0
- package/esm/components/Tab.d.ts +2 -0
- package/esm/components/Tab.js +7 -0
- package/esm/components/Table.d.ts +2 -0
- package/esm/components/Table.js +7 -0
- package/esm/components/TableSelection.js +169 -0
- package/esm/components/Tabs.js +607 -0
- package/esm/components/TabsTransfer.js +221 -0
- package/esm/components/TabsTransferPicker.js +81 -0
- package/esm/components/Tag.js +137 -0
- package/esm/components/Textarea.js +146 -0
- package/esm/components/Timeline.js +60 -0
- package/esm/components/TimelineItem.js +101 -0
- package/esm/components/Tinymce.d.ts +66 -0
- package/esm/components/Tinymce.js +634 -0
- package/esm/components/TitleBar.js +48 -0
- package/esm/components/Toast.js +247 -0
- package/esm/components/Tooltip.js +36 -0
- package/esm/components/TooltipWrapper.js +180 -0
- package/esm/components/Transfer.js +485 -0
- package/esm/components/TransferDropDown.js +98 -0
- package/esm/components/TransferPicker.js +98 -0
- package/esm/components/TransferSearch.js +100 -0
- package/esm/components/Tree.js +1256 -0
- package/esm/components/TreeSelection.js +201 -0
- package/esm/components/UserSelect.js +674 -0
- package/esm/components/UserTabSelect.js +227 -0
- package/esm/components/VerificationCode.js +172 -0
- package/esm/components/VirtualList.d.ts +2 -0
- package/esm/components/VirtualList.js +7 -0
- package/esm/components/WithRemoteConfig.d.ts +70 -0
- package/esm/components/WithRemoteConfig.js +301 -0
- package/esm/components/WithStore.d.ts +13 -0
- package/esm/components/WithStore.js +48 -0
- package/esm/components/calendar/Calendar.d.ts +83 -0
- package/esm/components/calendar/Calendar.js +529 -0
- package/esm/components/calendar/CalendarContainer.d.ts +10 -0
- package/esm/components/calendar/CalendarContainer.js +27 -0
- package/esm/components/calendar/DaysView.js +528 -0
- package/esm/components/calendar/MonthsView.js +175 -0
- package/esm/components/calendar/QuartersView.js +125 -0
- package/esm/components/calendar/TimeView.js +559 -0
- package/esm/components/calendar/YearsView.js +122 -0
- package/esm/components/condition-builder/Expression.js +121 -0
- package/esm/components/condition-builder/Field.js +32 -0
- package/esm/components/condition-builder/Func.js +75 -0
- package/esm/components/condition-builder/Group.js +196 -0
- package/esm/components/condition-builder/GroupOrItem.js +107 -0
- package/esm/components/condition-builder/InputSwitch.js +28 -0
- package/esm/components/condition-builder/Item.js +233 -0
- package/esm/components/condition-builder/Value.js +115 -0
- package/esm/components/condition-builder/config.d.ts +36 -0
- package/esm/components/condition-builder/config.js +120 -0
- package/esm/components/condition-builder/index.js +242 -0
- package/esm/components/condition-builder/types.d.ts +116 -0
- package/esm/components/formula/CodeEditor.js +99 -0
- package/esm/components/formula/Editor.js +446 -0
- package/esm/components/formula/FuncList.js +64 -0
- package/esm/components/formula/Input.js +141 -0
- package/esm/components/formula/Picker.js +454 -0
- package/esm/components/formula/VariableList.js +185 -0
- package/esm/components/formula/plugin.d.ts +51 -0
- package/esm/components/formula/plugin.js +445 -0
- package/esm/components/icons.d.ts +61 -0
- package/esm/components/icons.js +458 -0
- package/esm/components/index.d.ts +138 -0
- package/esm/components/json-schema/Array.d.ts +3 -0
- package/esm/components/json-schema/Array.js +129 -0
- package/esm/components/json-schema/Item.d.ts +5 -0
- package/esm/components/json-schema/Item.js +63 -0
- package/esm/components/json-schema/Object.d.ts +5 -0
- package/esm/components/json-schema/Object.js +272 -0
- package/esm/components/json-schema/index.js +29 -0
- package/esm/components/menu/MenuContext.d.ts +82 -0
- package/esm/components/menu/MenuContext.js +25 -0
- package/esm/components/menu/MenuItem.js +112 -0
- package/esm/components/menu/PanelMenu.js +68 -0
- package/esm/components/menu/SubMenu.js +137 -0
- package/esm/components/menu/index.js +368 -0
- package/esm/components/schema-editor/Array.d.ts +11 -0
- package/esm/components/schema-editor/Array.js +84 -0
- package/esm/components/schema-editor/Common.d.ts +61 -0
- package/esm/components/schema-editor/Common.js +162 -0
- package/esm/components/schema-editor/Item.d.ts +8 -0
- package/esm/components/schema-editor/Item.js +24 -0
- package/esm/components/schema-editor/Object.d.ts +51 -0
- package/esm/components/schema-editor/Object.js +294 -0
- package/esm/components/schema-editor/SchemaVariableList.js +74 -0
- package/esm/components/schema-editor/SchemaVariableListPicker.js +34 -0
- package/esm/components/schema-editor/index.js +122 -0
- package/esm/components/table/Cell.d.ts +36 -0
- package/esm/components/table/Cell.js +43 -0
- package/esm/components/table/ColGroup.d.ts +24 -0
- package/esm/components/table/ColGroup.js +77 -0
- package/esm/components/table/Head.d.ts +45 -0
- package/esm/components/table/Head.js +150 -0
- package/esm/components/table/HeadCellDropDown.js +54 -0
- package/esm/components/table/HeadCellFilter.js +130 -0
- package/esm/components/table/HeadCellSelect.js +51 -0
- package/esm/components/table/HeadCellSort.js +88 -0
- package/esm/components/table/ItemActionsWrapper.d.ts +10 -0
- package/esm/components/table/ItemActionsWrapper.js +29 -0
- package/esm/components/table/Row.d.ts +56 -0
- package/esm/components/table/Row.js +224 -0
- package/esm/components/table/SummaryRow.d.ts +28 -0
- package/esm/components/table/SummaryRow.js +73 -0
- package/esm/components/table/index.js +1095 -0
- package/esm/components/table/util.d.ts +25 -0
- package/esm/components/table/util.js +279 -0
- package/esm/components/virtual-list/AutoSizer.d.ts +19 -0
- package/esm/components/virtual-list/AutoSizer.js +48 -0
- package/esm/components/virtual-list/SizeAndPositionManager.d.ts +70 -0
- package/esm/components/virtual-list/SizeAndPositionManager.js +216 -0
- package/esm/components/virtual-list/constants.d.ts +34 -0
- package/esm/components/virtual-list/constants.js +45 -0
- package/esm/components/virtual-list/index.d.ts +98 -0
- package/esm/components/virtual-list/index.js +288 -0
- package/esm/components/withBadge.d.ts +2 -0
- package/esm/components/withBadge.js +7 -0
- package/esm/hooks/index.d.ts +8 -0
- package/esm/hooks/use-click-away.d.ts +12 -0
- package/esm/hooks/use-click-away.js +55 -0
- package/esm/hooks/use-on-screen.d.ts +2 -0
- package/esm/hooks/use-on-screen.js +28 -0
- package/esm/hooks/use-set-state.d.ts +2 -0
- package/esm/hooks/use-set-state.js +19 -0
- package/esm/hooks/use-sub-form.d.ts +4 -0
- package/esm/hooks/use-sub-form.js +39 -0
- package/esm/hooks/use-touch.d.ts +16 -0
- package/esm/hooks/use-touch.js +77 -0
- package/esm/hooks/use-update-effect.d.ts +3 -0
- package/esm/hooks/use-update-effect.js +21 -0
- package/esm/hooks/use-validation-resolver.d.ts +7 -0
- package/esm/hooks/use-validation-resolver.js +115 -0
- package/esm/icons/alert-danger.svg.js +22 -0
- package/esm/icons/alert-info.svg.js +22 -0
- package/esm/icons/alert-success.svg.js +22 -0
- package/esm/icons/alert-warning.svg.js +22 -0
- package/esm/icons/arrow-double-left.svg.js +24 -0
- package/esm/icons/arrow-double-right.svg.js +24 -0
- package/esm/icons/back.svg.js +21 -0
- package/esm/icons/calendar.svg.js +31 -0
- package/esm/icons/caret.svg.js +21 -0
- package/esm/icons/check.svg.js +21 -0
- package/esm/icons/clock.svg.js +29 -0
- package/esm/icons/close-small.svg.js +24 -0
- package/esm/icons/close.svg.js +21 -0
- package/esm/icons/cloud-upload.svg.js +22 -0
- package/esm/icons/column-filter.svg.js +22 -0
- package/esm/icons/columns.svg.js +21 -0
- package/esm/icons/compress-alt.svg.js +21 -0
- package/esm/icons/copy.svg.js +26 -0
- package/esm/icons/date.svg.js +26 -0
- package/esm/icons/department.svg.js +52 -0
- package/esm/icons/desk-empty.svg.js +73 -0
- package/esm/icons/dot.svg.js +36 -0
- package/esm/icons/down-arrow-bold.svg.js +22 -0
- package/esm/icons/down.svg.js +23 -0
- package/esm/icons/download.svg.js +24 -0
- package/esm/icons/drag-bar.svg.js +53 -0
- package/esm/icons/drag.svg.js +22 -0
- package/esm/icons/edit.svg.js +21 -0
- package/esm/icons/ellipsis-v.svg.js +21 -0
- package/esm/icons/enter.svg.js +20 -0
- package/esm/icons/exchange.svg.js +21 -0
- package/esm/icons/expand-alt.svg.js +21 -0
- package/esm/icons/fail.svg.js +31 -0
- package/esm/icons/file.svg.js +22 -0
- package/esm/icons/filter.svg.js +21 -0
- package/esm/icons/folder.svg.js +24 -0
- package/esm/icons/fullscreen.svg.js +21 -0
- package/esm/icons/function.svg.js +21 -0
- package/esm/icons/home.svg.js +21 -0
- package/esm/icons/if.svg.js +21 -0
- package/esm/icons/image.svg.js +20 -0
- package/esm/icons/info-circle.svg.js +21 -0
- package/esm/icons/info.svg.js +27 -0
- package/esm/icons/input-clear.svg.js +20 -0
- package/esm/icons/invisible.svg.js +22 -0
- package/esm/icons/left-arrow.svg.js +23 -0
- package/esm/icons/loading-outline.svg.js +21 -0
- package/esm/icons/location.svg.js +20 -0
- package/esm/icons/menu.svg.js +20 -0
- package/esm/icons/minus.svg.js +21 -0
- package/esm/icons/move.svg.js +22 -0
- package/esm/icons/mute.svg.js +21 -0
- package/esm/icons/new-edit.svg.js +22 -0
- package/esm/icons/pause.svg.js +21 -0
- package/esm/icons/pencil.svg.js +21 -0
- package/esm/icons/play.svg.js +20 -0
- package/esm/icons/plus-cicle.svg.js +20 -0
- package/esm/icons/plus-fine.svg.js +21 -0
- package/esm/icons/plus.svg.js +21 -0
- package/esm/icons/post.svg.js +48 -0
- package/esm/icons/question-mark.svg.js +26 -0
- package/esm/icons/question.svg.js +21 -0
- package/esm/icons/question2.svg.js +34 -0
- package/esm/icons/redo.svg.js +21 -0
- package/esm/icons/refresh.svg.js +21 -0
- package/esm/icons/reload.svg.js +21 -0
- package/esm/icons/remove.svg.js +21 -0
- package/esm/icons/retry.svg.js +24 -0
- package/esm/icons/right-arrow-bold.svg.js +21 -0
- package/esm/icons/right-arrow.svg.js +23 -0
- package/esm/icons/right-double-arrow.svg.js +22 -0
- package/esm/icons/role.svg.js +43 -0
- package/esm/icons/rotate-left.svg.js +22 -0
- package/esm/icons/rotate-right.svg.js +22 -0
- package/esm/icons/rotate-screen.svg.js +21 -0
- package/esm/icons/scale-origin.svg.js +24 -0
- package/esm/icons/schedule.svg.js +24 -0
- package/esm/icons/search.svg.js +21 -0
- package/esm/icons/setting.svg.js +21 -0
- package/esm/icons/slider-handle-icon.svg.js +22 -0
- package/esm/icons/sort-asc.svg.js +21 -0
- package/esm/icons/sort-default.svg.js +21 -0
- package/esm/icons/sort-desc.svg.js +21 -0
- package/esm/icons/star.svg.js +21 -0
- package/esm/icons/status-close.svg.js +23 -0
- package/esm/icons/steps-finsh.svg.js +22 -0
- package/esm/icons/sub-plus.svg.js +20 -0
- package/esm/icons/success.svg.js +29 -0
- package/esm/icons/transparent.svg.js +38 -0
- package/esm/icons/trash.svg.js +22 -0
- package/esm/icons/tree-down.svg.js +21 -0
- package/esm/icons/undo-normal.svg.js +25 -0
- package/esm/icons/undo.svg.js +21 -0
- package/esm/icons/unfullscreen.svg.js +21 -0
- package/esm/icons/upload.svg.js +21 -0
- package/esm/icons/user-remove.svg.js +33 -0
- package/esm/icons/view.svg.js +22 -0
- package/esm/icons/volume.svg.js +24 -0
- package/esm/icons/warning-mark.svg.js +22 -0
- package/esm/icons/warning.svg.js +21 -0
- package/esm/icons/window-restore.svg.js +21 -0
- package/esm/icons/zoom-in.svg.js +21 -0
- package/esm/icons/zoom-out.svg.js +21 -0
- package/esm/index.d.ts +16 -0
- package/esm/index.js +157 -0
- package/esm/locale/de-DE.d.ts +1 -0
- package/esm/locale/de-DE.js +423 -0
- package/esm/locale/en-US.d.ts +1 -0
- package/esm/locale/en-US.js +429 -0
- package/esm/locale/zh-CN.d.ts +1 -0
- package/esm/locale/zh-CN.js +438 -0
- package/esm/themes/ang.d.ts +3 -0
- package/esm/themes/ang.js +15 -0
- package/esm/themes/antd.d.ts +1 -0
- package/esm/themes/antd.js +42 -0
- package/esm/themes/cxd.d.ts +3 -0
- package/esm/themes/cxd.js +455 -0
- package/esm/themes/dark.d.ts +3 -0
- package/esm/themes/dark.js +23 -0
- package/esm/themes/default.d.ts +4 -0
- package/esm/utils/index.d.ts +2 -0
- package/esm/utils/smoothSignature.d.ts +86 -0
- package/esm/utils/vectorComputed.d.ts +20 -0
- package/esm/utils/vectorComputed.js +75 -0
- package/esm/withRemoteConfig.d.ts +2 -0
- package/esm/withRemoteConfig.js +7 -0
- package/esm/withStore.d.ts +2 -0
- package/esm/withStore.js +7 -0
- package/lib/HTMLFilterContext.d.ts +3 -0
- package/lib/components/AlphabetIndexer.d.ts +11 -0
- package/lib/components/AnchorNavSection.d.ts +2 -0
- package/lib/components/AutoSizer.d.ts +2 -0
- package/lib/components/Badge.d.ts +20 -0
- package/lib/components/BarCode.js +44 -0
- package/lib/components/CityDB.d.ts +13 -0
- package/lib/components/CityDB.js +3945 -0
- package/lib/components/CodeMirror.d.ts +29 -0
- package/lib/components/ColorPicker.js +267 -0
- package/lib/components/ConditionBuilder.d.ts +2 -0
- package/lib/components/DiffEditor.d.ts +21 -0
- package/lib/components/Form.d.ts +31 -0
- package/lib/components/FormulaPicker.d.ts +2 -0
- package/lib/components/GridNav.d.ts +53 -0
- package/lib/components/GridNavItem.d.ts +2 -0
- package/lib/components/HeadCellDropDown.d.ts +2 -0
- package/lib/components/HorizontalScroll.d.ts +74 -0
- package/lib/components/Icon.d.ts +2 -0
- package/lib/components/Input.d.ts +18 -0
- package/lib/components/InputJSONSchema.d.ts +2 -0
- package/lib/components/JSONSchemaEditor.d.ts +2 -0
- package/lib/components/Markdown.d.ts +25 -0
- package/lib/components/Markdown.js +76 -0
- package/lib/components/Menu.d.ts +2 -0
- package/lib/components/MobileDevTool.d.ts +12 -0
- package/lib/components/ModalManager.d.ts +16 -0
- package/lib/components/PdfViewer.js +83 -0
- package/lib/components/PopOverContainer.d.ts +59 -0
- package/lib/components/RichText.d.ts +48 -0
- package/lib/components/RichText.js +275 -0
- package/lib/components/SelectMobile.d.ts +38 -0
- package/lib/components/Tab.d.ts +2 -0
- package/lib/components/Table.d.ts +2 -0
- package/lib/components/Tinymce.d.ts +66 -0
- package/lib/components/Tinymce.js +641 -0
- package/lib/components/VirtualList.d.ts +2 -0
- package/lib/components/WithRemoteConfig.d.ts +70 -0
- package/lib/components/WithStore.d.ts +13 -0
- package/lib/components/calendar/Calendar.d.ts +83 -0
- package/lib/components/calendar/CalendarContainer.d.ts +10 -0
- package/lib/components/condition-builder/config.d.ts +36 -0
- package/lib/components/condition-builder/types.d.ts +116 -0
- package/lib/components/formula/plugin.d.ts +51 -0
- package/lib/components/icons.d.ts +61 -0
- package/lib/components/index.d.ts +138 -0
- package/lib/components/json-schema/Array.d.ts +3 -0
- package/lib/components/json-schema/Item.d.ts +5 -0
- package/lib/components/json-schema/Object.d.ts +5 -0
- package/lib/components/menu/MenuContext.d.ts +82 -0
- package/lib/components/schema-editor/Array.d.ts +11 -0
- package/lib/components/schema-editor/Common.d.ts +61 -0
- package/lib/components/schema-editor/Item.d.ts +8 -0
- package/lib/components/schema-editor/Object.d.ts +51 -0
- package/lib/components/table/Cell.d.ts +36 -0
- package/lib/components/table/ColGroup.d.ts +24 -0
- package/lib/components/table/Head.d.ts +45 -0
- package/lib/components/table/ItemActionsWrapper.d.ts +10 -0
- package/lib/components/table/Row.d.ts +56 -0
- package/lib/components/table/SummaryRow.d.ts +28 -0
- package/lib/components/table/util.d.ts +25 -0
- package/lib/components/virtual-list/AutoSizer.d.ts +19 -0
- package/lib/components/virtual-list/SizeAndPositionManager.d.ts +70 -0
- package/lib/components/virtual-list/constants.d.ts +34 -0
- package/lib/components/virtual-list/index.d.ts +98 -0
- package/lib/components/withBadge.d.ts +2 -0
- package/lib/helper.css +47762 -0
- package/lib/hooks/index.d.ts +8 -0
- package/lib/hooks/use-click-away.d.ts +12 -0
- package/lib/hooks/use-on-screen.d.ts +2 -0
- package/lib/hooks/use-set-state.d.ts +2 -0
- package/lib/hooks/use-sub-form.d.ts +4 -0
- package/lib/hooks/use-touch.d.ts +16 -0
- package/lib/hooks/use-update-effect.d.ts +3 -0
- package/lib/hooks/use-validation-resolver.d.ts +7 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.js +28 -0
- package/lib/locale/de-DE.d.ts +1 -0
- package/lib/locale/en-US.d.ts +1 -0
- package/lib/locale/zh-CN.d.ts +1 -0
- package/lib/scss/helper.scss.js +12 -0
- package/lib/scss/themes/ang.scss.js +12 -0
- package/lib/scss/themes/antd.scss.js +12 -0
- package/lib/scss/themes/cxd.scss.js +12 -0
- package/lib/scss/themes/dark.scss.js +12 -0
- package/lib/scss/themes/default.scss.js +12 -0
- package/lib/themes/ang.css +45895 -0
- package/lib/themes/ang.d.ts +3 -0
- package/lib/themes/antd.css +45882 -0
- package/lib/themes/antd.d.ts +1 -0
- package/lib/themes/cxd.css +45871 -0
- package/lib/themes/cxd.d.ts +3 -0
- package/lib/themes/dark.css +45902 -0
- package/lib/themes/dark.d.ts +3 -0
- package/lib/themes/default.css +45871 -0
- package/lib/themes/default.d.ts +4 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/smoothSignature.d.ts +86 -0
- package/lib/utils/vectorComputed.d.ts +20 -0
- package/lib/withRemoteConfig.d.ts +2 -0
- package/lib/withStore.d.ts +2 -0
- package/package.json +158 -0
- package/scss/README.md +9 -0
- package/scss/_components.scss +4346 -0
- package/scss/_functions.scss +137 -0
- package/scss/_mixins.scss +805 -0
- package/scss/_properties.scss +898 -0
- package/scss/_thirds.scss +12 -0
- package/scss/_utilities.scss +1757 -0
- package/scss/_variables.scss +439 -0
- package/scss/base/_animate.scss +84 -0
- package/scss/base/_common.scss +19 -0
- package/scss/base/_normalize.scss +376 -0
- package/scss/base/_reset.scss +18 -0
- package/scss/base/_typography.scss +79 -0
- package/scss/components/_alert.scss +123 -0
- package/scss/components/_anchor-nav.scss +158 -0
- package/scss/components/_app.scss +46 -0
- package/scss/components/_array-input.scss +107 -0
- package/scss/components/_audio.scss +146 -0
- package/scss/components/_auto-folder.scss +40 -0
- package/scss/components/_avatar.scss +55 -0
- package/scss/components/_badge.scss +145 -0
- package/scss/components/_barcode.scss +6 -0
- package/scss/components/_breadcrumb.scss +110 -0
- package/scss/components/_button-group.scss +165 -0
- package/scss/components/_button.scss +871 -0
- package/scss/components/_calendar.scss +442 -0
- package/scss/components/_card.scss +389 -0
- package/scss/components/_card2.scss +28 -0
- package/scss/components/_cards.scss +221 -0
- package/scss/components/_carousel.scss +292 -0
- package/scss/components/_cascader.scss +157 -0
- package/scss/components/_chart.scss +22 -0
- package/scss/components/_city-area.scss +37 -0
- package/scss/components/_code.scss +10 -0
- package/scss/components/_collapse-group.scss +83 -0
- package/scss/components/_collapse.scss +245 -0
- package/scss/components/_color.scss +17 -0
- package/scss/components/_column-toggler.scss +261 -0
- package/scss/components/_condition-builder.scss +521 -0
- package/scss/components/_context-menu.scss +204 -0
- package/scss/components/_copyable.scss +10 -0
- package/scss/components/_crud.scss +195 -0
- package/scss/components/_crud2.scss +345 -0
- package/scss/components/_debug.scss +259 -0
- package/scss/components/_divider.scss +81 -0
- package/scss/components/_drawer.scss +393 -0
- package/scss/components/_dropdown-context-menus.scss +27 -0
- package/scss/components/_dropdown.scss +159 -0
- package/scss/components/_each.scss +7 -0
- package/scss/components/_formula.scss +723 -0
- package/scss/components/_grid-nav.scss +128 -0
- package/scss/components/_horizontal-scroll.scss +51 -0
- package/scss/components/_icon.scss +4 -0
- package/scss/components/_image-gallery.scss +331 -0
- package/scss/components/_images.scss +650 -0
- package/scss/components/_input-box.scss +111 -0
- package/scss/components/_json-schema-editor.scss +149 -0
- package/scss/components/_json-schema.scss +166 -0
- package/scss/components/_json.scss +7 -0
- package/scss/components/_link.scss +22 -0
- package/scss/components/_list-menu.scss +114 -0
- package/scss/components/_list.scss +313 -0
- package/scss/components/_log.scss +169 -0
- package/scss/components/_mapping.scss +6 -0
- package/scss/components/_markdown.scss +266 -0
- package/scss/components/_menu.scss +795 -0
- package/scss/components/_mobile-dev-tool.scss +175 -0
- package/scss/components/_modal.scss +282 -0
- package/scss/components/_multiline-text.scss +20 -0
- package/scss/components/_nav.scss +45 -0
- package/scss/components/_overflow-tpl.scss +5 -0
- package/scss/components/_page.scss +198 -0
- package/scss/components/_pagination.scss +403 -0
- package/scss/components/_panel.scss +263 -0
- package/scss/components/_pdf_viewer.scss +47 -0
- package/scss/components/_picker-columns.scss +140 -0
- package/scss/components/_popover.scss +54 -0
- package/scss/components/_popoverable.scss +100 -0
- package/scss/components/_popup.scss +171 -0
- package/scss/components/_portlet.scss +51 -0
- package/scss/components/_print.scss +13 -0
- package/scss/components/_progress.scss +165 -0
- package/scss/components/_property.scss +47 -0
- package/scss/components/_pull-refresh.scss +30 -0
- package/scss/components/_quick-edit.scss +53 -0
- package/scss/components/_remark.scss +58 -0
- package/scss/components/_result-box.scss +380 -0
- package/scss/components/_search-box.scss +267 -0
- package/scss/components/_service.scss +3 -0
- package/scss/components/_shape.scss +19 -0
- package/scss/components/_signature.scss +98 -0
- package/scss/components/_slider.scss +27 -0
- package/scss/components/_sparkline.scss +18 -0
- package/scss/components/_spinner.scss +214 -0
- package/scss/components/_status.scss +118 -0
- package/scss/components/_steps.scss +481 -0
- package/scss/components/_table.scss +1234 -0
- package/scss/components/_table2.scss +1066 -0
- package/scss/components/_tabs.scss +1410 -0
- package/scss/components/_tag.scss +191 -0
- package/scss/components/_timeline.scss +572 -0
- package/scss/components/_toast.scss +342 -0
- package/scss/components/_tooltip.scss +340 -0
- package/scss/components/_tpl.scss +51 -0
- package/scss/components/_verificationCode.scss +33 -0
- package/scss/components/_video.scss +38 -0
- package/scss/components/_wizard.scss +287 -0
- package/scss/components/_wrapper.scss +26 -0
- package/scss/components/form/_chained-select.scss +10 -0
- package/scss/components/form/_checks.scss +433 -0
- package/scss/components/form/_city.scss +33 -0
- package/scss/components/form/_color.scss +148 -0
- package/scss/components/form/_combo.scss +360 -0
- package/scss/components/form/_date-range.scss +332 -0
- package/scss/components/form/_date.scss +807 -0
- package/scss/components/form/_editor.scss +139 -0
- package/scss/components/form/_excel.scss +150 -0
- package/scss/components/form/_fieldset.scss +202 -0
- package/scss/components/form/_file.scss +308 -0
- package/scss/components/form/_form.scss +936 -0
- package/scss/components/form/_group.scss +116 -0
- package/scss/components/form/_icon-picker.scss +113 -0
- package/scss/components/form/_icon-select.scss +245 -0
- package/scss/components/form/_image.scss +359 -0
- package/scss/components/form/_input-group.scss +213 -0
- package/scss/components/form/_input-table.scss +17 -0
- package/scss/components/form/_list.scss +225 -0
- package/scss/components/form/_location.scss +210 -0
- package/scss/components/form/_matrix.scss +7 -0
- package/scss/components/form/_nested-select.scss +149 -0
- package/scss/components/form/_number.scss +633 -0
- package/scss/components/form/_picker.scss +237 -0
- package/scss/components/form/_qr-code.scss +4 -0
- package/scss/components/form/_range.scss +438 -0
- package/scss/components/form/_rating.scss +94 -0
- package/scss/components/form/_repeat.scss +40 -0
- package/scss/components/form/_result-list.scss +98 -0
- package/scss/components/form/_rich-text.scss +163 -0
- package/scss/components/form/_select.scss +712 -0
- package/scss/components/form/_selection.scss +485 -0
- package/scss/components/form/_sub-form.scss +118 -0
- package/scss/components/form/_switch.scss +228 -0
- package/scss/components/form/_tag.scss +146 -0
- package/scss/components/form/_text.scss +508 -0
- package/scss/components/form/_textarea.scss +78 -0
- package/scss/components/form/_tinymce.scss +6 -0
- package/scss/components/form/_transfer.scss +624 -0
- package/scss/components/form/_tree-select.scss +47 -0
- package/scss/components/form/_tree.scss +458 -0
- package/scss/components/form/_user-select.scss +643 -0
- package/scss/components/react-datetime.scss +267 -0
- package/scss/helper/background/_background-color.md +131 -0
- package/scss/helper/background/_background-color.scss +214 -0
- package/scss/helper/border/_border-color.md +109 -0
- package/scss/helper/border/_border-color.scss +178 -0
- package/scss/helper/border/_border-radius.md +86 -0
- package/scss/helper/border/_border-radius.scss +152 -0
- package/scss/helper/border/_border-style.md +11 -0
- package/scss/helper/border/_border-style.scss +40 -0
- package/scss/helper/border/_border-width.md +31 -0
- package/scss/helper/border/_border-width.scss +72 -0
- package/scss/helper/box-alignment/_align-content.md +12 -0
- package/scss/helper/box-alignment/_align-content.scss +44 -0
- package/scss/helper/box-alignment/_align-items.md +11 -0
- package/scss/helper/box-alignment/_align-items.scss +41 -0
- package/scss/helper/box-alignment/_align-self.md +11 -0
- package/scss/helper/box-alignment/_align-self.scss +40 -0
- package/scss/helper/box-alignment/_justify-content.md +12 -0
- package/scss/helper/box-alignment/_justify-content.scss +44 -0
- package/scss/helper/box-alignment/_justify-items.md +11 -0
- package/scss/helper/box-alignment/_justify-items.scss +40 -0
- package/scss/helper/box-alignment/_justify-self.md +11 -0
- package/scss/helper/box-alignment/_justify-self.scss +40 -0
- package/scss/helper/box-alignment/_place-content.md +13 -0
- package/scss/helper/box-alignment/_place-content.scss +48 -0
- package/scss/helper/box-alignment/_place-items.md +11 -0
- package/scss/helper/box-alignment/_place-items.scss +40 -0
- package/scss/helper/box-alignment/_place-self.md +11 -0
- package/scss/helper/box-alignment/_place-self.scss +40 -0
- package/scss/helper/effect/_box-shadow.md +16 -0
- package/scss/helper/effect/_box-shadow.scss +74 -0
- package/scss/helper/effect/_opacity.md +21 -0
- package/scss/helper/effect/_opacity.scss +66 -0
- package/scss/helper/flex/_direction.md +10 -0
- package/scss/helper/flex/_direction.scss +41 -0
- package/scss/helper/flex/_flex.md +10 -0
- package/scss/helper/flex/_flex.scss +38 -0
- package/scss/helper/flex/_grow.md +8 -0
- package/scss/helper/flex/_grow.scss +28 -0
- package/scss/helper/flex/_order.md +20 -0
- package/scss/helper/flex/_order.scss +56 -0
- package/scss/helper/flex/_shrink.md +8 -0
- package/scss/helper/flex/_shrink.scss +27 -0
- package/scss/helper/flex/_wrap.md +9 -0
- package/scss/helper/flex/_wrap.scss +36 -0
- package/scss/helper/grid/_auto-columns.md +10 -0
- package/scss/helper/grid/_auto-columns.scss +38 -0
- package/scss/helper/grid/_auto-flow.md +10 -0
- package/scss/helper/grid/_auto-flow.scss +38 -0
- package/scss/helper/grid/_auto-rows.md +10 -0
- package/scss/helper/grid/_auto-rows.scss +38 -0
- package/scss/helper/grid/_column-start-end.md +48 -0
- package/scss/helper/grid/_column-start-end.scss +201 -0
- package/scss/helper/grid/_columns.md +19 -0
- package/scss/helper/grid/_columns.scss +74 -0
- package/scss/helper/grid/_gap.md +117 -0
- package/scss/helper/grid/_gap.scss +154 -0
- package/scss/helper/grid/_row-start-end.md +48 -0
- package/scss/helper/grid/_row-start-end.scss +201 -0
- package/scss/helper/grid/_rows.md +13 -0
- package/scss/helper/grid/_rows.scss +50 -0
- package/scss/helper/layout/_box-sizing.md +35 -0
- package/scss/helper/layout/_box-sizing.scss +51 -0
- package/scss/helper/layout/_clear.md +27 -0
- package/scss/helper/layout/_clear.scss +56 -0
- package/scss/helper/layout/_display.md +41 -0
- package/scss/helper/layout/_display.scss +82 -0
- package/scss/helper/layout/_float.md +47 -0
- package/scss/helper/layout/_float.scss +71 -0
- package/scss/helper/layout/_overflow.md +34 -0
- package/scss/helper/layout/_overflow.scss +85 -0
- package/scss/helper/layout/_position.md +27 -0
- package/scss/helper/layout/_position.scss +55 -0
- package/scss/helper/layout/_top-right-bottom-left.md +150 -0
- package/scss/helper/layout/_top-right-bottom-left.scss +292 -0
- package/scss/helper/layout/_visibility.md +21 -0
- package/scss/helper/layout/_visibility.scss +42 -0
- package/scss/helper/layout/_z-index.md +37 -0
- package/scss/helper/layout/_z-index.scss +67 -0
- package/scss/helper/sizing/_height.md +103 -0
- package/scss/helper/sizing/_height.scss +161 -0
- package/scss/helper/sizing/_width.md +109 -0
- package/scss/helper/sizing/_width.scss +174 -0
- package/scss/helper/spacing/_margin.md +527 -0
- package/scss/helper/spacing/_margin.scss +821 -0
- package/scss/helper/spacing/_padding.md +265 -0
- package/scss/helper/spacing/_padding.scss +394 -0
- package/scss/helper/spacing/_space-between.md +155 -0
- package/scss/helper/spacing/_space-between.scss +224 -0
- package/scss/helper/typography/_font-family.md +9 -0
- package/scss/helper/typography/_font-family.scss +28 -0
- package/scss/helper/typography/_font-size.md +19 -0
- package/scss/helper/typography/_font-size.scss +40 -0
- package/scss/helper/typography/_font-style.md +8 -0
- package/scss/helper/typography/_font-style.scss +31 -0
- package/scss/helper/typography/_font-weight.md +15 -0
- package/scss/helper/typography/_font-weight.scss +49 -0
- package/scss/helper/typography/_letter-spacing.md +12 -0
- package/scss/helper/typography/_letter-spacing.scss +43 -0
- package/scss/helper/typography/_line-height.md +20 -0
- package/scss/helper/typography/_line-height.scss +59 -0
- package/scss/helper/typography/_list-style-type.md +11 -0
- package/scss/helper/typography/_list-style-type.scss +43 -0
- package/scss/helper/typography/_text-align.md +10 -0
- package/scss/helper/typography/_text-align.scss +34 -0
- package/scss/helper/typography/_text-color.md +110 -0
- package/scss/helper/typography/_text-color.scss +184 -0
- package/scss/helper/typography/_text-decoration.md +9 -0
- package/scss/helper/typography/_text-decoration.scss +34 -0
- package/scss/helper/typography/_text-overflow.md +9 -0
- package/scss/helper/typography/_text-overflow.scss +40 -0
- package/scss/helper/typography/_text-transform.md +10 -0
- package/scss/helper/typography/_text-transform.scss +40 -0
- package/scss/helper/typography/_vertical-align.md +12 -0
- package/scss/helper/typography/_vertical-align.scss +44 -0
- package/scss/helper/typography/_whitespace.md +11 -0
- package/scss/helper/typography/_whitespace.scss +42 -0
- package/scss/helper/typography/_word-break.md +9 -0
- package/scss/helper/typography/_word-break.scss +36 -0
- package/scss/helper.scss +72 -0
- package/scss/layout/_aside.scss +361 -0
- package/scss/layout/_grid.scss +173 -0
- package/scss/layout/_hbox.scss +127 -0
- package/scss/layout/_header.scss +0 -0
- package/scss/layout/_layout.scss +492 -0
- package/scss/layout/_vbox.scss +38 -0
- package/scss/themes/_ang-variables.scss +224 -0
- package/scss/themes/_antd-variables.scss +238 -0
- package/scss/themes/_common.scss +157 -0
- package/scss/themes/_cxd-variables.scss +222 -0
- package/scss/themes/_dark-variables.scss +229 -0
- package/scss/themes/ang-ie11.scss +1 -0
- package/scss/themes/ang.scss +27 -0
- package/scss/themes/antd-ie11.scss +1 -0
- package/scss/themes/antd.scss +5 -0
- package/scss/themes/cxd-ie11.scss +1 -0
- package/scss/themes/cxd.scss +5 -0
- package/scss/themes/dark-ie11.scss +1 -0
- package/scss/themes/dark.scss +34 -0
- package/scss/themes/default.scss +2 -0
- package/scss/themes/extract-antd-color.py +27 -0
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends, __assign, __decorate, __metadata } from 'tslib';
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import moment from 'moment';
|
|
9
|
+
import Calendar from './calendar/Calendar.js';
|
|
10
|
+
import { autobind, themeable, localeable } from 'amis-rev-core';
|
|
11
|
+
import PopUp from './PopUp.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @file CalendarMobile
|
|
15
|
+
* @description 移动端日历组件
|
|
16
|
+
* @author hongyang03
|
|
17
|
+
*/
|
|
18
|
+
var CalendarMobile = /** @class */ (function (_super) {
|
|
19
|
+
__extends(CalendarMobile, _super);
|
|
20
|
+
function CalendarMobile(props) {
|
|
21
|
+
var _this = _super.call(this, props) || this;
|
|
22
|
+
_this.mobileBody = React__default.createRef();
|
|
23
|
+
_this.mobileHeader = React__default.createRef();
|
|
24
|
+
var _a = _this.props, startDate = _a.startDate, endDate = _a.endDate, defaultDate = _a.defaultDate, minDate = _a.minDate, maxDate = _a.maxDate;
|
|
25
|
+
var dateRange = _this.getDateRange(minDate, maxDate, defaultDate);
|
|
26
|
+
_this.state = {
|
|
27
|
+
minDate: dateRange.minDate,
|
|
28
|
+
maxDate: dateRange.maxDate,
|
|
29
|
+
startDate: startDate,
|
|
30
|
+
endDate: endDate,
|
|
31
|
+
showToast: false,
|
|
32
|
+
currentDate: dateRange.currentDate,
|
|
33
|
+
isScrollToBottom: false,
|
|
34
|
+
dateTime: endDate ? [endDate.hour(), endDate.minute()] : [0, 0],
|
|
35
|
+
isPopupOpen: false
|
|
36
|
+
};
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
CalendarMobile.prototype.getDateRange = function (minDate, maxDate, defaultDate) {
|
|
40
|
+
!moment.isMoment(minDate) || (!minDate.isValid() && (minDate = undefined));
|
|
41
|
+
!moment.isMoment(maxDate) || (!maxDate.isValid() && (maxDate = undefined));
|
|
42
|
+
var currentDate = defaultDate || moment();
|
|
43
|
+
var dateRange = {
|
|
44
|
+
minDate: currentDate.clone().subtract(1, 'year').startOf('months'),
|
|
45
|
+
maxDate: currentDate.clone().add(1, 'year').endOf('months')
|
|
46
|
+
};
|
|
47
|
+
if (minDate && maxDate) {
|
|
48
|
+
dateRange = {
|
|
49
|
+
minDate: minDate,
|
|
50
|
+
maxDate: maxDate
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
else if (minDate && !maxDate) {
|
|
54
|
+
dateRange = {
|
|
55
|
+
minDate: minDate,
|
|
56
|
+
maxDate: moment(minDate).add(2, 'year')
|
|
57
|
+
};
|
|
58
|
+
currentDate = minDate.clone();
|
|
59
|
+
}
|
|
60
|
+
else if (!minDate && maxDate) {
|
|
61
|
+
dateRange = {
|
|
62
|
+
minDate: moment(maxDate).subtract(2, 'year'),
|
|
63
|
+
maxDate: maxDate
|
|
64
|
+
};
|
|
65
|
+
currentDate = maxDate.clone();
|
|
66
|
+
}
|
|
67
|
+
if (!currentDate.isBetween(dateRange.minDate, dateRange.maxDate, 'days', '[]')) {
|
|
68
|
+
currentDate = dateRange.minDate.clone();
|
|
69
|
+
}
|
|
70
|
+
return __assign(__assign({}, dateRange), { currentDate: currentDate });
|
|
71
|
+
};
|
|
72
|
+
CalendarMobile.prototype.componentDidMount = function () {
|
|
73
|
+
this.initMonths();
|
|
74
|
+
};
|
|
75
|
+
CalendarMobile.prototype.componentDidUpdate = function (prevProps) {
|
|
76
|
+
var _this = this;
|
|
77
|
+
var props = this.props;
|
|
78
|
+
var ns = props.classPrefix;
|
|
79
|
+
if (prevProps.minDate !== props.minDate ||
|
|
80
|
+
prevProps.maxDate !== props.maxDate) {
|
|
81
|
+
var currentDate = this.state.currentDate;
|
|
82
|
+
var dateRange = this.getDateRange(props.minDate, props.maxDate, moment(currentDate));
|
|
83
|
+
this.setState({
|
|
84
|
+
minDate: dateRange.minDate,
|
|
85
|
+
maxDate: dateRange.maxDate,
|
|
86
|
+
currentDate: dateRange.currentDate
|
|
87
|
+
}, function () { return _this.initMonths(); });
|
|
88
|
+
}
|
|
89
|
+
if ((prevProps.startDate !== props.startDate &&
|
|
90
|
+
props.startDate !== this.state.startDate) ||
|
|
91
|
+
(prevProps.endDate !== props.endDate &&
|
|
92
|
+
props.endDate !== this.state.endDate)) {
|
|
93
|
+
this.setState({
|
|
94
|
+
startDate: props.startDate,
|
|
95
|
+
endDate: props.endDate
|
|
96
|
+
}, function () {
|
|
97
|
+
return requestAnimationFrame(function () {
|
|
98
|
+
var _a;
|
|
99
|
+
(_a = document
|
|
100
|
+
.querySelector(".".concat(ns, "CalendarMobile:not(.").concat(ns, "CalendarMobile-embed) .rdtRangeStart:not(.rdtNew)"))) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
CalendarMobile.prototype.componentWillUnmount = function () {
|
|
106
|
+
this.setState({ showToast: false });
|
|
107
|
+
clearTimeout(this.timer);
|
|
108
|
+
};
|
|
109
|
+
CalendarMobile.prototype.initMonths = function () {
|
|
110
|
+
if (this.mobileBody.current) {
|
|
111
|
+
var defaultDate = this.props.defaultDate || this.state.currentDate;
|
|
112
|
+
this.scollToDate(defaultDate ? moment(defaultDate) : moment());
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
CalendarMobile.prototype.scollToDate = function (date) {
|
|
116
|
+
var index = date.month();
|
|
117
|
+
var currentEl = this.mobileBody.current.children[index];
|
|
118
|
+
if (!currentEl) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
var header = this.mobileHeader.current;
|
|
122
|
+
this.mobileBody.current.scrollBy(0, currentEl.offsetTop -
|
|
123
|
+
this.mobileBody.current.scrollTop -
|
|
124
|
+
header.clientHeight);
|
|
125
|
+
};
|
|
126
|
+
CalendarMobile.prototype.scrollPreYear = function () {
|
|
127
|
+
if (!this.state.currentDate) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
var _a = this.state, currentDate = _a.currentDate, minDate = _a.minDate;
|
|
131
|
+
currentDate = currentDate.clone().subtract(1, 'years');
|
|
132
|
+
if (minDate && currentDate.isBefore(minDate)) {
|
|
133
|
+
currentDate = minDate;
|
|
134
|
+
}
|
|
135
|
+
this.setState({
|
|
136
|
+
currentDate: currentDate
|
|
137
|
+
});
|
|
138
|
+
this.scollToDate(currentDate);
|
|
139
|
+
};
|
|
140
|
+
CalendarMobile.prototype.scrollAfterYear = function () {
|
|
141
|
+
if (!this.state.currentDate) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
var _a = this.state, currentDate = _a.currentDate, maxDate = _a.maxDate;
|
|
145
|
+
currentDate = currentDate.clone().add(1, 'years');
|
|
146
|
+
if (maxDate && currentDate.isAfter(maxDate)) {
|
|
147
|
+
currentDate = maxDate;
|
|
148
|
+
}
|
|
149
|
+
this.setState({
|
|
150
|
+
currentDate: currentDate
|
|
151
|
+
});
|
|
152
|
+
this.scollToDate(currentDate);
|
|
153
|
+
};
|
|
154
|
+
CalendarMobile.prototype.getDaysOfWeek = function () {
|
|
155
|
+
var locale = moment().localeData();
|
|
156
|
+
var days = locale.weekdaysMin();
|
|
157
|
+
var first = locale.firstDayOfWeek();
|
|
158
|
+
var dow = [];
|
|
159
|
+
var i = 0;
|
|
160
|
+
days.forEach(function (day) {
|
|
161
|
+
dow[(7 + i++ - first) % 7] = day;
|
|
162
|
+
});
|
|
163
|
+
return dow;
|
|
164
|
+
};
|
|
165
|
+
CalendarMobile.prototype.handleCalendarClick = function (isDisabled) {
|
|
166
|
+
var _this = this;
|
|
167
|
+
if (isDisabled) {
|
|
168
|
+
this.setState({ showToast: true });
|
|
169
|
+
this.timer = setTimeout(function () {
|
|
170
|
+
_this.setState({ showToast: false });
|
|
171
|
+
}, 2000);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
CalendarMobile.prototype.getRenderProps = function (props, currentDate) {
|
|
175
|
+
var _a = this.state, startDate = _a.startDate, endDate = _a.endDate;
|
|
176
|
+
var _b = this.props, __ = _b.translate, viewMode = _b.viewMode, isDatePicker = _b.isDatePicker;
|
|
177
|
+
var precision = viewMode === 'time' ? 'hours' : viewMode || 'day';
|
|
178
|
+
var footerText = '';
|
|
179
|
+
if (startDate &&
|
|
180
|
+
endDate &&
|
|
181
|
+
currentDate.isBetween(startDate, endDate, precision, '()')) {
|
|
182
|
+
props.className += ' rdtBetween';
|
|
183
|
+
}
|
|
184
|
+
else if (startDate &&
|
|
185
|
+
endDate &&
|
|
186
|
+
startDate.isSame(endDate, precision) &&
|
|
187
|
+
currentDate.isSame(startDate, precision)) {
|
|
188
|
+
props.className += ' rdtRangeStart';
|
|
189
|
+
footerText = __('Calendar.beginAndEnd');
|
|
190
|
+
}
|
|
191
|
+
else if (startDate && currentDate.isSame(startDate, precision)) {
|
|
192
|
+
props.className += ' rdtRangeStart';
|
|
193
|
+
footerText = __('Calendar.begin');
|
|
194
|
+
if (endDate) {
|
|
195
|
+
props.className += ' rdtRangeHasEnd';
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
else if (endDate && currentDate.isSame(endDate, precision)) {
|
|
199
|
+
props.className += ' rdtRangeEnd';
|
|
200
|
+
footerText = __('Calendar.end');
|
|
201
|
+
}
|
|
202
|
+
if (precision === 'day' &&
|
|
203
|
+
currentDate.date() === 1 &&
|
|
204
|
+
currentDate.day() === 1) {
|
|
205
|
+
props.className += ' rdtOldNone';
|
|
206
|
+
}
|
|
207
|
+
if (isDatePicker) {
|
|
208
|
+
footerText = '';
|
|
209
|
+
}
|
|
210
|
+
var rdtDisabled = props.className.indexOf('rdtDisabled') > -1;
|
|
211
|
+
return {
|
|
212
|
+
props: props,
|
|
213
|
+
footerText: footerText,
|
|
214
|
+
rdtDisabled: rdtDisabled
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
CalendarMobile.prototype.handleTimeChange = function (newTime) {
|
|
218
|
+
var _this = this;
|
|
219
|
+
if (!newTime) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
var onChange = this.props.onChange;
|
|
223
|
+
var _a = this.state, startDate = _a.startDate, endDate = _a.endDate;
|
|
224
|
+
if (startDate) {
|
|
225
|
+
var obj = {
|
|
226
|
+
dateTime: newTime,
|
|
227
|
+
startDate: endDate
|
|
228
|
+
? startDate
|
|
229
|
+
: startDate === null || startDate === void 0 ? void 0 : startDate.clone().set({
|
|
230
|
+
hour: newTime[0],
|
|
231
|
+
minute: newTime[1],
|
|
232
|
+
second: newTime[2] || 0
|
|
233
|
+
}),
|
|
234
|
+
endDate: !endDate
|
|
235
|
+
? endDate
|
|
236
|
+
: endDate === null || endDate === void 0 ? void 0 : endDate.clone().set({
|
|
237
|
+
hour: newTime[0],
|
|
238
|
+
minute: newTime[1],
|
|
239
|
+
second: newTime[2] || 0
|
|
240
|
+
})
|
|
241
|
+
};
|
|
242
|
+
this.setState(obj, function () {
|
|
243
|
+
onChange && onChange(_this.state);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
CalendarMobile.prototype.checkIsValidDate = function (currentDate) {
|
|
248
|
+
var _a = this.state, startDate = _a.startDate, endDate = _a.endDate, minDate = _a.minDate, maxDate = _a.maxDate;
|
|
249
|
+
var _b = this.props, minDuration = _b.minDuration, maxDuration = _b.maxDuration, viewMode = _b.viewMode;
|
|
250
|
+
var precision = viewMode === 'time' ? 'hours' : viewMode || 'day';
|
|
251
|
+
if (minDate && currentDate.isBefore(minDate, precision)) {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
else if (maxDate && currentDate.isAfter(maxDate, precision)) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
else if (startDate && !endDate) {
|
|
258
|
+
if (minDuration &&
|
|
259
|
+
currentDate.isBefore(startDate.clone().add(minDuration)) &&
|
|
260
|
+
currentDate.isSameOrAfter(startDate)) {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
else if (maxDuration &&
|
|
264
|
+
currentDate.isAfter(startDate.clone().add(maxDuration))) {
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return true;
|
|
269
|
+
};
|
|
270
|
+
CalendarMobile.prototype.renderMobileDay = function (props, currentDate) {
|
|
271
|
+
var _this = this;
|
|
272
|
+
var cx = this.props.classnames;
|
|
273
|
+
var renderProps = this.getRenderProps(props, currentDate);
|
|
274
|
+
return (React__default.createElement("td", __assign({}, renderProps.props),
|
|
275
|
+
React__default.createElement("div", { className: "calendar-wrap", onClick: function () { return _this.handleCalendarClick(renderProps.rdtDisabled); } },
|
|
276
|
+
currentDate.date(),
|
|
277
|
+
React__default.createElement("div", { className: cx('CalendarMobile-range-text') }, renderProps.footerText))));
|
|
278
|
+
};
|
|
279
|
+
CalendarMobile.prototype.renderMonth = function (props, month, year) {
|
|
280
|
+
var _this = this;
|
|
281
|
+
var cx = this.props.classnames;
|
|
282
|
+
var currentDate = moment().year(year).month(month);
|
|
283
|
+
var monthStr = currentDate
|
|
284
|
+
.localeData()
|
|
285
|
+
.monthsShort(currentDate.month(month));
|
|
286
|
+
var strLength = 3;
|
|
287
|
+
var monthStrFixedLength = monthStr.substring(0, strLength);
|
|
288
|
+
var renderProps = this.getRenderProps(props, currentDate);
|
|
289
|
+
return (React__default.createElement("td", __assign({}, renderProps.props),
|
|
290
|
+
React__default.createElement("div", { className: "calendar-wrap", onClick: function () { return _this.handleCalendarClick(renderProps.rdtDisabled); } },
|
|
291
|
+
monthStrFixedLength,
|
|
292
|
+
React__default.createElement("div", { className: cx('CalendarMobile-range-text') }, renderProps.footerText))));
|
|
293
|
+
};
|
|
294
|
+
CalendarMobile.prototype.renderQuarter = function (props, quarter, year) {
|
|
295
|
+
var _this = this;
|
|
296
|
+
var cx = this.props.classnames;
|
|
297
|
+
var currentDate = moment().year(year).quarter(quarter);
|
|
298
|
+
var renderProps = this.getRenderProps(props, currentDate);
|
|
299
|
+
return (React__default.createElement("td", __assign({}, props),
|
|
300
|
+
React__default.createElement("div", { className: "calendar-wrap", onClick: function () { return _this.handleCalendarClick(renderProps.rdtDisabled); } },
|
|
301
|
+
"Q",
|
|
302
|
+
quarter,
|
|
303
|
+
React__default.createElement("div", { className: cx('CalendarMobile-range-text') }, renderProps.footerText))));
|
|
304
|
+
};
|
|
305
|
+
CalendarMobile.prototype.handleMobileChange = function (newValue) {
|
|
306
|
+
var _this = this;
|
|
307
|
+
var _a = this.props, embed = _a.embed, minDuration = _a.minDuration, maxDuration = _a.maxDuration, confirm = _a.confirm, onChange = _a.onChange, viewMode = _a.viewMode, isDatePicker = _a.isDatePicker;
|
|
308
|
+
var _b = this.state, startDate = _b.startDate, endDate = _b.endDate, dateTime = _b.dateTime, minDate = _b.minDate, maxDate = _b.maxDate;
|
|
309
|
+
var precision = viewMode === 'time' ? 'hours' : viewMode || 'day';
|
|
310
|
+
if (minDate && newValue && newValue.isBefore(minDate, 'second')) {
|
|
311
|
+
newValue = minDate;
|
|
312
|
+
}
|
|
313
|
+
if (maxDate && newValue && newValue.isAfter(maxDate, 'second')) {
|
|
314
|
+
newValue = maxDate;
|
|
315
|
+
}
|
|
316
|
+
if (!isDatePicker &&
|
|
317
|
+
startDate &&
|
|
318
|
+
!endDate &&
|
|
319
|
+
newValue.isSameOrAfter(startDate) &&
|
|
320
|
+
(!minDuration ||
|
|
321
|
+
newValue.isSameOrAfter(startDate.clone().add(minDuration))) &&
|
|
322
|
+
(!maxDuration ||
|
|
323
|
+
newValue.isSameOrBefore(startDate.clone().add(maxDuration)))) {
|
|
324
|
+
return this.setState({
|
|
325
|
+
endDate: newValue.clone().endOf(precision)
|
|
326
|
+
// .set({
|
|
327
|
+
// hour: dateTime[0],
|
|
328
|
+
// minute: dateTime[1],
|
|
329
|
+
// second: dateTime[2] || 0
|
|
330
|
+
// })
|
|
331
|
+
}, function () {
|
|
332
|
+
onChange &&
|
|
333
|
+
onChange(_this.state, function () { return embed && confirm && confirm(startDate, endDate); });
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
this.setState({
|
|
337
|
+
startDate: newValue
|
|
338
|
+
.clone()
|
|
339
|
+
.startOf(precision)
|
|
340
|
+
.set({
|
|
341
|
+
hour: dateTime[0],
|
|
342
|
+
minute: dateTime[1],
|
|
343
|
+
second: dateTime[2] || 0
|
|
344
|
+
}),
|
|
345
|
+
endDate: undefined
|
|
346
|
+
}, function () {
|
|
347
|
+
onChange && onChange(_this.state);
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
CalendarMobile.prototype.renderMobileCalendarBody = function () {
|
|
351
|
+
var _this = this;
|
|
352
|
+
var _a = this.props, cx = _a.classnames, dateFormat = _a.dateFormat; _a.timeFormat; var inputFormat = _a.inputFormat, displayForamt = _a.displayForamt, locale = _a.locale, _b = _a.viewMode, viewMode = _b === void 0 ? 'days' : _b, close = _a.close, defaultDate = _a.defaultDate, showViewMode = _a.showViewMode, isEndDate = _a.isEndDate;
|
|
353
|
+
var __ = this.props.translate;
|
|
354
|
+
var _c = this.state, minDate = _c.minDate, maxDate = _c.maxDate, currentDate = _c.currentDate;
|
|
355
|
+
if (!minDate || !maxDate) {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
var calendarDates = [];
|
|
359
|
+
var currentYear = moment(currentDate).format('YYYY');
|
|
360
|
+
for (var minDateClone = minDate.clone(); minDateClone.isSameOrBefore(maxDate); minDateClone.add(1, showViewMode)) {
|
|
361
|
+
var date = minDateClone.clone();
|
|
362
|
+
if (defaultDate) {
|
|
363
|
+
date = moment(defaultDate).set({
|
|
364
|
+
year: date.get('year'),
|
|
365
|
+
month: date.get('month')
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
if (date.year() === +currentYear) {
|
|
369
|
+
calendarDates.push(date);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return (React__default.createElement("div", { className: cx('CalendarMobile-body'), ref: this.mobileBody }, calendarDates.map(function (calendarDate, index) {
|
|
373
|
+
var rdtOldNone = showViewMode === 'months' &&
|
|
374
|
+
calendarDate.clone().startOf('month').day() === 1
|
|
375
|
+
? 'rdtOldNone'
|
|
376
|
+
: '';
|
|
377
|
+
return (React__default.createElement("div", { className: cx('CalendarMobile-calendar-wrap', rdtOldNone), key: 'calendar-wrap' + index },
|
|
378
|
+
showViewMode === 'months' && (React__default.createElement("div", { className: cx('CalendarMobile-calendar-mark'), key: 'calendar-mark' + index }, calendarDate.month() + 1)),
|
|
379
|
+
React__default.createElement("div", { className: cx('CalendarMobile-calendar-header') },
|
|
380
|
+
React__default.createElement("span", { className: "rdtSwitch" }, calendarDate.format(__('dateformat.year'))),
|
|
381
|
+
showViewMode === 'months' && (React__default.createElement("span", { className: "rdtSwitch" }, calendarDate.format(__('MMM'))))),
|
|
382
|
+
React__default.createElement(Calendar, { className: cx('CalendarMobile-calendar', rdtOldNone), viewDate: calendarDate, value: calendarDate, onChange: _this.handleMobileChange, requiredConfirm: false, dateFormat: dateFormat, displayForamt: displayForamt || inputFormat, timeFormat: "", isValidDate: _this.checkIsValidDate, viewMode: viewMode, input: false, onClose: close, renderDay: _this.renderMobileDay, renderMonth: _this.renderMonth, renderQuarter: _this.renderQuarter, locale: locale, hideHeader: true, updateOn: viewMode, key: 'calendar' + index, isEndDate: isEndDate })));
|
|
383
|
+
})));
|
|
384
|
+
};
|
|
385
|
+
CalendarMobile.prototype.renderMobileTimePicker = function () {
|
|
386
|
+
var _a = this.props, cx = _a.classnames, timeFormat = _a.timeFormat, locale = _a.locale, close = _a.close, timeConstraints = _a.timeConstraints, defaultDate = _a.defaultDate, isDatePicker = _a.isDatePicker, isEndDate = _a.isEndDate;
|
|
387
|
+
var __ = this.props.translate;
|
|
388
|
+
var _b = this.state, startDate = _b.startDate, endDate = _b.endDate, dateTime = _b.dateTime;
|
|
389
|
+
return (React__default.createElement("div", { className: cx('CalendarMobile-time') },
|
|
390
|
+
React__default.createElement("div", { className: cx('CalendarMobile-time-title') }, isDatePicker
|
|
391
|
+
? __('Date.titleTime')
|
|
392
|
+
: startDate && endDate
|
|
393
|
+
? __('Calendar.endPick')
|
|
394
|
+
: __('Calendar.startPick')),
|
|
395
|
+
React__default.createElement(Calendar, { className: cx('CalendarMobile-time-calendar'), value: defaultDate, onChange: this.handleTimeChange, requiredConfirm: false, timeFormat: timeFormat, viewMode: "time", input: false, onClose: close, locale: locale, mobileUI: true, showToolbar: false, viewDate: moment().set({
|
|
396
|
+
hour: dateTime[0],
|
|
397
|
+
minute: dateTime[1],
|
|
398
|
+
second: dateTime[2] || 0
|
|
399
|
+
}), timeConstraints: timeConstraints, isValidDate: this.checkIsValidDate, isEndDate: isEndDate })));
|
|
400
|
+
};
|
|
401
|
+
CalendarMobile.prototype.openDatePicker = function () {
|
|
402
|
+
this.setState({ isPopupOpen: true });
|
|
403
|
+
};
|
|
404
|
+
CalendarMobile.prototype.closePopup = function () {
|
|
405
|
+
this.setState({ isPopupOpen: false });
|
|
406
|
+
};
|
|
407
|
+
CalendarMobile.prototype.handleDateChange = function (currentDate) {
|
|
408
|
+
this.setState({
|
|
409
|
+
currentDate: currentDate
|
|
410
|
+
});
|
|
411
|
+
this.scollToDate(currentDate);
|
|
412
|
+
this.closePopup();
|
|
413
|
+
};
|
|
414
|
+
CalendarMobile.prototype.render = function () {
|
|
415
|
+
var _a = this.props, className = _a.className, cx = _a.classnames, embed = _a.embed, close = _a.close, confirm = _a.confirm, footerExtra = _a.footerExtra, timeFormat = _a.timeFormat, showViewMode = _a.showViewMode, isDatePicker = _a.isDatePicker, locale = _a.locale, popOverContainer = _a.popOverContainer, timeConstraints = _a.timeConstraints;
|
|
416
|
+
var __ = this.props.translate;
|
|
417
|
+
var _b = this.state, startDate = _b.startDate, endDate = _b.endDate, currentDate = _b.currentDate, showToast = _b.showToast, isScrollToBottom = _b.isScrollToBottom, minDate = _b.minDate, maxDate = _b.maxDate, isPopupOpen = _b.isPopupOpen;
|
|
418
|
+
var header = (React__default.createElement("div", { className: cx('CalendarMobile-header'), ref: this.mobileHeader },
|
|
419
|
+
React__default.createElement("div", { className: cx('CalendarMobile-subtitle') },
|
|
420
|
+
React__default.createElement("span", { className: "subtitle-text" },
|
|
421
|
+
currentDate &&
|
|
422
|
+
currentDate.isSameOrBefore(minDate, showViewMode) ? null : (React__default.createElement("a", { className: "rdtPrev", onClick: this.scrollPreYear }, "\u2039")),
|
|
423
|
+
React__default.createElement("span", { onClick: this.openDatePicker }, moment(currentDate).format('YYYY')),
|
|
424
|
+
(currentDate &&
|
|
425
|
+
currentDate.isSameOrAfter(maxDate, showViewMode)) ||
|
|
426
|
+
isScrollToBottom ? null : (React__default.createElement("a", { className: "rdtNext", onClick: this.scrollAfterYear }, "\u203A")))),
|
|
427
|
+
showViewMode === 'months' ? (React__default.createElement("div", { className: cx('CalendarMobile-weekdays') }, this.getDaysOfWeek().map(function (day, index) { return (React__default.createElement("span", { key: day + index, className: "weekday" }, day)); }))) : null));
|
|
428
|
+
var footer = (React__default.createElement("div", { className: cx('CalendarMobile-footer') },
|
|
429
|
+
timeFormat && startDate && this.renderMobileTimePicker(),
|
|
430
|
+
React__default.createElement("div", { className: cx('CalendarMobile-footer-toolbar') },
|
|
431
|
+
React__default.createElement("div", { className: cx('CalendarMobile-footer-ranges') }, footerExtra),
|
|
432
|
+
confirm && !embed && (React__default.createElement("a", { className: cx('Button', 'Button--primary', 'date-range-confirm', {
|
|
433
|
+
'is-disabled': !startDate || !(endDate || isDatePicker)
|
|
434
|
+
}), onClick: function () {
|
|
435
|
+
confirm(startDate, endDate);
|
|
436
|
+
close && close();
|
|
437
|
+
} }, __('confirm'))))));
|
|
438
|
+
return (React__default.createElement("div", { className: cx('CalendarMobile', embed ? 'CalendarMobile-embed' : '', className) },
|
|
439
|
+
React__default.createElement("div", { className: cx('CalendarMobile-wrap') },
|
|
440
|
+
header,
|
|
441
|
+
this.renderMobileCalendarBody(),
|
|
442
|
+
footer),
|
|
443
|
+
showToast ? (React__default.createElement("div", { className: cx('CalendarMobile-toast') }, __('Calendar.toast'))) : null,
|
|
444
|
+
React__default.createElement(PopUp, { className: cx("DatePicker-popup DatePicker-mobile"), container: popOverContainer, isShow: isPopupOpen, showClose: false, onHide: this.closePopup },
|
|
445
|
+
React__default.createElement(Calendar, { value: currentDate, onChange: this.handleDateChange, requiredConfirm: false, isValidDate: this.checkIsValidDate, viewMode: "months", timeConstraints: timeConstraints, input: false, onClose: this.closePopup, locale: locale, minDate: minDate, maxDate: maxDate, mobileUI: true }))));
|
|
446
|
+
};
|
|
447
|
+
CalendarMobile.defaultProps = {
|
|
448
|
+
showViewMode: 'months'
|
|
449
|
+
};
|
|
450
|
+
__decorate([
|
|
451
|
+
autobind,
|
|
452
|
+
__metadata("design:type", Function),
|
|
453
|
+
__metadata("design:paramtypes", []),
|
|
454
|
+
__metadata("design:returntype", void 0)
|
|
455
|
+
], CalendarMobile.prototype, "scrollPreYear", null);
|
|
456
|
+
__decorate([
|
|
457
|
+
autobind,
|
|
458
|
+
__metadata("design:type", Function),
|
|
459
|
+
__metadata("design:paramtypes", []),
|
|
460
|
+
__metadata("design:returntype", void 0)
|
|
461
|
+
], CalendarMobile.prototype, "scrollAfterYear", null);
|
|
462
|
+
__decorate([
|
|
463
|
+
autobind,
|
|
464
|
+
__metadata("design:type", Function),
|
|
465
|
+
__metadata("design:paramtypes", [Boolean]),
|
|
466
|
+
__metadata("design:returntype", void 0)
|
|
467
|
+
], CalendarMobile.prototype, "handleCalendarClick", null);
|
|
468
|
+
__decorate([
|
|
469
|
+
autobind,
|
|
470
|
+
__metadata("design:type", Function),
|
|
471
|
+
__metadata("design:paramtypes", [Object]),
|
|
472
|
+
__metadata("design:returntype", void 0)
|
|
473
|
+
], CalendarMobile.prototype, "handleTimeChange", null);
|
|
474
|
+
__decorate([
|
|
475
|
+
autobind,
|
|
476
|
+
__metadata("design:type", Function),
|
|
477
|
+
__metadata("design:paramtypes", [Object]),
|
|
478
|
+
__metadata("design:returntype", void 0)
|
|
479
|
+
], CalendarMobile.prototype, "checkIsValidDate", null);
|
|
480
|
+
__decorate([
|
|
481
|
+
autobind,
|
|
482
|
+
__metadata("design:type", Function),
|
|
483
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
484
|
+
__metadata("design:returntype", void 0)
|
|
485
|
+
], CalendarMobile.prototype, "renderMobileDay", null);
|
|
486
|
+
__decorate([
|
|
487
|
+
autobind,
|
|
488
|
+
__metadata("design:type", Function),
|
|
489
|
+
__metadata("design:paramtypes", [Object, Number, Number]),
|
|
490
|
+
__metadata("design:returntype", void 0)
|
|
491
|
+
], CalendarMobile.prototype, "renderMonth", null);
|
|
492
|
+
__decorate([
|
|
493
|
+
autobind,
|
|
494
|
+
__metadata("design:type", Function),
|
|
495
|
+
__metadata("design:paramtypes", [Object, Number, Number]),
|
|
496
|
+
__metadata("design:returntype", void 0)
|
|
497
|
+
], CalendarMobile.prototype, "renderQuarter", null);
|
|
498
|
+
__decorate([
|
|
499
|
+
autobind,
|
|
500
|
+
__metadata("design:type", Function),
|
|
501
|
+
__metadata("design:paramtypes", [Object]),
|
|
502
|
+
__metadata("design:returntype", void 0)
|
|
503
|
+
], CalendarMobile.prototype, "handleMobileChange", null);
|
|
504
|
+
__decorate([
|
|
505
|
+
autobind,
|
|
506
|
+
__metadata("design:type", Function),
|
|
507
|
+
__metadata("design:paramtypes", []),
|
|
508
|
+
__metadata("design:returntype", void 0)
|
|
509
|
+
], CalendarMobile.prototype, "renderMobileCalendarBody", null);
|
|
510
|
+
__decorate([
|
|
511
|
+
autobind,
|
|
512
|
+
__metadata("design:type", Function),
|
|
513
|
+
__metadata("design:paramtypes", []),
|
|
514
|
+
__metadata("design:returntype", void 0)
|
|
515
|
+
], CalendarMobile.prototype, "renderMobileTimePicker", null);
|
|
516
|
+
__decorate([
|
|
517
|
+
autobind,
|
|
518
|
+
__metadata("design:type", Function),
|
|
519
|
+
__metadata("design:paramtypes", []),
|
|
520
|
+
__metadata("design:returntype", void 0)
|
|
521
|
+
], CalendarMobile.prototype, "openDatePicker", null);
|
|
522
|
+
__decorate([
|
|
523
|
+
autobind,
|
|
524
|
+
__metadata("design:type", Function),
|
|
525
|
+
__metadata("design:paramtypes", []),
|
|
526
|
+
__metadata("design:returntype", void 0)
|
|
527
|
+
], CalendarMobile.prototype, "closePopup", null);
|
|
528
|
+
__decorate([
|
|
529
|
+
autobind,
|
|
530
|
+
__metadata("design:type", Function),
|
|
531
|
+
__metadata("design:paramtypes", [Object]),
|
|
532
|
+
__metadata("design:returntype", void 0)
|
|
533
|
+
], CalendarMobile.prototype, "handleDateChange", null);
|
|
534
|
+
return CalendarMobile;
|
|
535
|
+
}(React__default.Component));
|
|
536
|
+
var CalendarMobile$1 = themeable(localeable(CalendarMobile));
|
|
537
|
+
|
|
538
|
+
export { CalendarMobile, CalendarMobile$1 as default };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends } from 'tslib';
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import { isClickOnInput, buildStyle, themeable } from 'amis-rev-core';
|
|
9
|
+
|
|
10
|
+
var Card = /** @class */ (function (_super) {
|
|
11
|
+
__extends(Card, _super);
|
|
12
|
+
function Card(props) {
|
|
13
|
+
var _this = _super.call(this, props) || this;
|
|
14
|
+
_this.handleClick = _this.handleClick.bind(_this);
|
|
15
|
+
return _this;
|
|
16
|
+
}
|
|
17
|
+
Card.prototype.handleClick = function (e) {
|
|
18
|
+
if (isClickOnInput(e)) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
this.props.onClick && this.props.onClick(e);
|
|
22
|
+
};
|
|
23
|
+
Card.prototype.render = function () {
|
|
24
|
+
var _a = this.props, cx = _a.classnames, className = _a.className, style = _a.style, headerClassName = _a.headerClassName, bodyClassName = _a.bodyClassName, titleClassName = _a.titleClassName, subTitleClassName = _a.subTitleClassName, descriptionClassName = _a.descriptionClassName, avatarClassName = _a.avatarClassName, avatarTextStyle = _a.avatarTextStyle, imageClassName = _a.imageClassName, avatarTextClassName = _a.avatarTextClassName, secondaryClassName = _a.secondaryClassName, footerClassName = _a.footerClassName, media = _a.media, mediaPosition = _a.mediaPosition, mediaActionPosition = _a.mediaActionPosition, actions = _a.actions, children = _a.children, onClick = _a.onClick, toolbar = _a.toolbar, title = _a.title, subTitle = _a.subTitle, subTitlePlaceholder = _a.subTitlePlaceholder, description = _a.description, descriptionPlaceholder = _a.descriptionPlaceholder, secondary = _a.secondary, avatar = _a.avatar, avatarText = _a.avatarText, data = _a.data;
|
|
25
|
+
var heading = null;
|
|
26
|
+
var isShowHeading = avatar ||
|
|
27
|
+
avatarText ||
|
|
28
|
+
title ||
|
|
29
|
+
subTitle ||
|
|
30
|
+
subTitlePlaceholder ||
|
|
31
|
+
description ||
|
|
32
|
+
descriptionPlaceholder ||
|
|
33
|
+
toolbar;
|
|
34
|
+
if (isShowHeading) {
|
|
35
|
+
heading = (React__default.createElement("div", { className: cx('Card-heading', headerClassName) },
|
|
36
|
+
avatar ? (React__default.createElement("span", { className: cx('Card-avtar', avatarClassName) },
|
|
37
|
+
React__default.createElement("img", { className: cx('Card-img', imageClassName), src: avatar }))) : avatarText ? (React__default.createElement("span", { className: cx('Card-avtarText', avatarTextClassName), style: buildStyle(avatarTextStyle, data) }, avatarText)) : null,
|
|
38
|
+
React__default.createElement("div", { className: cx('Card-meta') },
|
|
39
|
+
title ? (React__default.createElement("div", { className: cx('Card-title', titleClassName) }, title)) : null,
|
|
40
|
+
subTitle || subTitlePlaceholder ? (React__default.createElement("div", { className: cx('Card-subTitle', subTitleClassName) }, subTitle
|
|
41
|
+
? subTitle
|
|
42
|
+
: subTitlePlaceholder
|
|
43
|
+
? subTitlePlaceholder
|
|
44
|
+
: null)) : null,
|
|
45
|
+
description || descriptionPlaceholder ? (React__default.createElement("div", { className: cx('Card-desc', descriptionClassName) }, description
|
|
46
|
+
? description
|
|
47
|
+
: descriptionPlaceholder
|
|
48
|
+
? descriptionPlaceholder
|
|
49
|
+
: null)) : null),
|
|
50
|
+
toolbar));
|
|
51
|
+
}
|
|
52
|
+
var body = children;
|
|
53
|
+
var actionView = secondary || actions ? (React__default.createElement("div", { className: cx('Card-footer-wrapper', footerClassName) },
|
|
54
|
+
secondary ? (React__default.createElement("div", { className: cx('Card-secondary', secondaryClassName) }, secondary)) : null,
|
|
55
|
+
actions ? (React__default.createElement("div", { className: cx('Card-actions-wrapper') }, actions)) : null)) : null;
|
|
56
|
+
return (React__default.createElement("div", { onClick: this.handleClick, className: cx('Card', className, {
|
|
57
|
+
'Card--link': onClick
|
|
58
|
+
}), style: style }, media ? (React__default.createElement(React__default.Fragment, null,
|
|
59
|
+
React__default.createElement("div", { className: cx("Card-multiMedia--".concat(mediaPosition)) },
|
|
60
|
+
media,
|
|
61
|
+
React__default.createElement("div", { className: cx('Card-multiMedia-flex') },
|
|
62
|
+
heading,
|
|
63
|
+
body ? (React__default.createElement("div", { className: cx('Card-body', bodyClassName) }, body)) : null,
|
|
64
|
+
!mediaActionPosition ? actionView : null)),
|
|
65
|
+
mediaActionPosition === 'outside' ? actionView : null)) : (React__default.createElement(React__default.Fragment, null,
|
|
66
|
+
heading,
|
|
67
|
+
body ? (React__default.createElement("div", { className: cx('Card-body', bodyClassName) }, body)) : null,
|
|
68
|
+
actionView))));
|
|
69
|
+
};
|
|
70
|
+
Card.defaultProps = {
|
|
71
|
+
className: '',
|
|
72
|
+
avatarClassName: '',
|
|
73
|
+
headerClassName: '',
|
|
74
|
+
footerClassName: '',
|
|
75
|
+
secondaryClassName: '',
|
|
76
|
+
avatarTextClassName: '',
|
|
77
|
+
bodyClassName: '',
|
|
78
|
+
titleClassName: '',
|
|
79
|
+
subTitleClassName: '',
|
|
80
|
+
descriptionClassName: '',
|
|
81
|
+
imageClassName: '',
|
|
82
|
+
mediaPosition: 'left'
|
|
83
|
+
};
|
|
84
|
+
return Card;
|
|
85
|
+
}(React__default.Component));
|
|
86
|
+
var Card$1 = themeable(Card);
|
|
87
|
+
|
|
88
|
+
export { Card, Card$1 as default };
|