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,121 @@
|
|
|
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 ConditionField from './Field.js';
|
|
9
|
+
import { themeable, localeable, findTree, filterTree, autobind } from 'amis-rev-core';
|
|
10
|
+
import FieldValue from './Value.js';
|
|
11
|
+
import InputSwitch from './InputSwitch.js';
|
|
12
|
+
import ConditionFunc from './Func.js';
|
|
13
|
+
|
|
14
|
+
var fieldMap = {
|
|
15
|
+
value: '值',
|
|
16
|
+
field: '字段',
|
|
17
|
+
func: '函数'
|
|
18
|
+
};
|
|
19
|
+
var Expression = /** @class */ (function (_super) {
|
|
20
|
+
__extends(Expression, _super);
|
|
21
|
+
function Expression() {
|
|
22
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
23
|
+
}
|
|
24
|
+
Expression.prototype.handleInputTypeChange = function (type) {
|
|
25
|
+
var _a;
|
|
26
|
+
var value = this.props.value;
|
|
27
|
+
var onChange = this.props.onChange;
|
|
28
|
+
if (type === 'value') {
|
|
29
|
+
value = '';
|
|
30
|
+
}
|
|
31
|
+
else if (type === 'func') {
|
|
32
|
+
value = {
|
|
33
|
+
type: 'func',
|
|
34
|
+
func: (_a = findTree(this.props.funcs, function (item) { return item.type; })) === null || _a === void 0 ? void 0 : _a.type,
|
|
35
|
+
args: []
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
else if (type === 'field') {
|
|
39
|
+
value = {
|
|
40
|
+
type: 'field',
|
|
41
|
+
field: ''
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
onChange(value, this.props.index);
|
|
45
|
+
};
|
|
46
|
+
Expression.prototype.handleValueChange = function (data) {
|
|
47
|
+
this.props.onChange(data, this.props.index);
|
|
48
|
+
};
|
|
49
|
+
Expression.prototype.handleFieldChange = function (field) {
|
|
50
|
+
var value = this.props.value;
|
|
51
|
+
var onChange = this.props.onChange;
|
|
52
|
+
value = {
|
|
53
|
+
type: 'field',
|
|
54
|
+
field: field
|
|
55
|
+
};
|
|
56
|
+
onChange(value, this.props.index);
|
|
57
|
+
};
|
|
58
|
+
Expression.prototype.handleFuncChange = function (func) {
|
|
59
|
+
var value = this.props.value;
|
|
60
|
+
var onChange = this.props.onChange;
|
|
61
|
+
value = __assign(__assign({}, func), { type: 'func' });
|
|
62
|
+
onChange(value, this.props.index);
|
|
63
|
+
};
|
|
64
|
+
Expression.prototype.render = function () {
|
|
65
|
+
var _a = this.props, value = _a.value, valueField = _a.valueField, allowedTypes = _a.allowedTypes, funcs = _a.funcs, fields = _a.fields, op = _a.op; _a.classnames; var fieldClassName = _a.fieldClassName, config = _a.config, data = _a.data, disabled = _a.disabled, searchable = _a.searchable, formula = _a.formula, popOverContainer = _a.popOverContainer, selectMode = _a.selectMode, renderEtrValue = _a.renderEtrValue, testIdBuilder = _a.testIdBuilder;
|
|
66
|
+
var inputType = ((value === null || value === void 0 ? void 0 : value.type) === 'field'
|
|
67
|
+
? 'field'
|
|
68
|
+
: (value === null || value === void 0 ? void 0 : value.type) === 'func'
|
|
69
|
+
? 'func'
|
|
70
|
+
: value !== undefined
|
|
71
|
+
? 'value'
|
|
72
|
+
: undefined) ||
|
|
73
|
+
(allowedTypes === null || allowedTypes === void 0 ? void 0 : allowedTypes[0]) ||
|
|
74
|
+
'value';
|
|
75
|
+
var types = allowedTypes || ['value', 'field', 'func'];
|
|
76
|
+
if ((!Array.isArray(funcs) || !funcs.length) && ~types.indexOf('func')) {
|
|
77
|
+
types.splice(types.indexOf('func'), 1);
|
|
78
|
+
}
|
|
79
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
80
|
+
inputType === 'value' ? (React__default.createElement(FieldValue, { field: valueField, value: value, onChange: this.handleValueChange, op: op, data: data, disabled: disabled, formula: formula, popOverContainer: popOverContainer, renderEtrValue: renderEtrValue, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('tValue') })) : null,
|
|
81
|
+
inputType === 'field' ? (React__default.createElement(ConditionField, { value: value === null || value === void 0 ? void 0 : value.field, onChange: this.handleFieldChange, fieldClassName: fieldClassName, disabled: disabled, searchable: searchable, popOverContainer: popOverContainer, selectMode: selectMode, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('tField'), options: valueField
|
|
82
|
+
? filterTree(fields, function (item) {
|
|
83
|
+
return item.children ||
|
|
84
|
+
item.type === valueField.type;
|
|
85
|
+
})
|
|
86
|
+
: fields })) : null,
|
|
87
|
+
inputType === 'func' ? (React__default.createElement(ConditionFunc, { config: config, value: value, onChange: this.handleFuncChange, fieldClassName: fieldClassName, funcs: funcs, fields: fields, allowedTypes: allowedTypes, disabled: disabled, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('tFunc') })) : null,
|
|
88
|
+
types.length > 1 ? (React__default.createElement(InputSwitch, { disabled: disabled, value: inputType, popOverContainer: popOverContainer, onChange: this.handleInputTypeChange, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('tSwitch'), options: types.map(function (item) { return ({
|
|
89
|
+
label: fieldMap[item],
|
|
90
|
+
value: item
|
|
91
|
+
}); }) })) : null));
|
|
92
|
+
};
|
|
93
|
+
__decorate([
|
|
94
|
+
autobind,
|
|
95
|
+
__metadata("design:type", Function),
|
|
96
|
+
__metadata("design:paramtypes", [String]),
|
|
97
|
+
__metadata("design:returntype", void 0)
|
|
98
|
+
], Expression.prototype, "handleInputTypeChange", null);
|
|
99
|
+
__decorate([
|
|
100
|
+
autobind,
|
|
101
|
+
__metadata("design:type", Function),
|
|
102
|
+
__metadata("design:paramtypes", [Object]),
|
|
103
|
+
__metadata("design:returntype", void 0)
|
|
104
|
+
], Expression.prototype, "handleValueChange", null);
|
|
105
|
+
__decorate([
|
|
106
|
+
autobind,
|
|
107
|
+
__metadata("design:type", Function),
|
|
108
|
+
__metadata("design:paramtypes", [String]),
|
|
109
|
+
__metadata("design:returntype", void 0)
|
|
110
|
+
], Expression.prototype, "handleFieldChange", null);
|
|
111
|
+
__decorate([
|
|
112
|
+
autobind,
|
|
113
|
+
__metadata("design:type", Function),
|
|
114
|
+
__metadata("design:paramtypes", [Object]),
|
|
115
|
+
__metadata("design:returntype", void 0)
|
|
116
|
+
], Expression.prototype, "handleFuncChange", null);
|
|
117
|
+
return Expression;
|
|
118
|
+
}(React__default.Component));
|
|
119
|
+
var Expression$1 = themeable(localeable(Expression));
|
|
120
|
+
|
|
121
|
+
export { Expression, Expression$1 as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { themeable, localeable } from 'amis-rev-core';
|
|
9
|
+
import DropDownSelection from '../DropDownSelection.js';
|
|
10
|
+
import ChainedDropdownSelection from '../ChainedDropdownSelection.js';
|
|
11
|
+
|
|
12
|
+
var option2value = function (item) { return item.name; };
|
|
13
|
+
var ConditionField = /** @class */ (function (_super) {
|
|
14
|
+
__extends(ConditionField, _super);
|
|
15
|
+
function ConditionField() {
|
|
16
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
17
|
+
}
|
|
18
|
+
ConditionField.prototype.render = function () {
|
|
19
|
+
var _a = this.props, onChange = _a.onChange, value = _a.value, cx = _a.classnames, disabled = _a.disabled, translate = _a.translate, searchable = _a.searchable, _b = _a.selectMode, selectMode = _b === void 0 ? 'list' : _b, options = _a.options, loadingConfig = _a.loadingConfig, testIdBuilder = _a.testIdBuilder;
|
|
20
|
+
return selectMode === 'chained' ? (React__default.createElement(ChainedDropdownSelection, { multiple: false, classnames: cx, translate: translate, options: options, value: value, valueField: "name", option2value: option2value, searchable: searchable, disabled: disabled, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('s-chained'), onChange: function (value) {
|
|
21
|
+
onChange(Array.isArray(value) ? value[0] : value);
|
|
22
|
+
} })) : selectMode === 'tree' ? (React__default.createElement(DropDownSelection, { className: 'is-scrollable', classnames: cx, translate: translate, multiple: false, option2value: option2value, searchable: searchable, disabled: disabled, valueField: 'name', mode: 'tree', options: options, value: value, loadingConfig: loadingConfig, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('s-tree'), onChange: function (value) {
|
|
23
|
+
onChange(value);
|
|
24
|
+
} })) : (React__default.createElement(DropDownSelection, { classnames: cx, translate: translate, options: options, value: value, valueField: 'name', option2value: option2value, searchable: searchable, disabled: disabled, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('s-default'), onChange: function (value) {
|
|
25
|
+
return onChange(Array.isArray(value) ? value[0] : value);
|
|
26
|
+
} }));
|
|
27
|
+
};
|
|
28
|
+
return ConditionField;
|
|
29
|
+
}(React__default.Component));
|
|
30
|
+
var ConditionField$1 = themeable(localeable(ConditionField));
|
|
31
|
+
|
|
32
|
+
export { ConditionField, ConditionField$1 as default };
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { findTree, noop, autobind, themeable, localeable } from 'amis-rev-core';
|
|
9
|
+
import { PopOverContainer } from '../PopOverContainer.js';
|
|
10
|
+
import GroupedSelection from '../GroupedSelection.js';
|
|
11
|
+
import ResultBox from '../ResultBox.js';
|
|
12
|
+
import { Icon } from '../icons.js';
|
|
13
|
+
import Expression from './Expression.js';
|
|
14
|
+
|
|
15
|
+
var option2value = function (item) { return item.type; };
|
|
16
|
+
var ConditionFunc = /** @class */ (function (_super) {
|
|
17
|
+
__extends(ConditionFunc, _super);
|
|
18
|
+
function ConditionFunc() {
|
|
19
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
20
|
+
}
|
|
21
|
+
ConditionFunc.prototype.handleFuncChange = function (type) {
|
|
22
|
+
var value = __assign({}, this.props.value);
|
|
23
|
+
value.func = type;
|
|
24
|
+
this.props.onChange(value);
|
|
25
|
+
};
|
|
26
|
+
ConditionFunc.prototype.handleArgChange = function (arg, index) {
|
|
27
|
+
var value = __assign({}, this.props.value);
|
|
28
|
+
value.args = Array.isArray(value.args) ? value.args.concat() : [];
|
|
29
|
+
value.args.splice(index, 1, arg);
|
|
30
|
+
this.props.onChange(value);
|
|
31
|
+
};
|
|
32
|
+
ConditionFunc.prototype.renderFunc = function (func) {
|
|
33
|
+
var _this = this;
|
|
34
|
+
var _a = this.props, cx = _a.classnames, fields = _a.fields, value = _a.value, funcs = _a.funcs, config = _a.config, disabled = _a.disabled, testIdBuilder = _a.testIdBuilder;
|
|
35
|
+
return (React__default.createElement("div", { className: cx('CBFunc-args') },
|
|
36
|
+
React__default.createElement("span", null, "("),
|
|
37
|
+
Array.isArray(func.args) && func.args.length ? (React__default.createElement("div", null, func.args.map(function (item, index) { return (React__default.createElement(Expression, { config: config, key: index, index: index, fields: fields, value: value === null || value === void 0 ? void 0 : value.args[index], valueField: { type: item.type }, onChange: _this.handleArgChange, funcs: funcs, disabled: disabled, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild("exp-".concat(index)) })); }))) : null,
|
|
38
|
+
React__default.createElement("span", null, ")")));
|
|
39
|
+
};
|
|
40
|
+
ConditionFunc.prototype.render = function () {
|
|
41
|
+
var _this = this;
|
|
42
|
+
var _a = this.props, value = _a.value, cx = _a.classnames, fieldClassName = _a.fieldClassName, funcs = _a.funcs, disabled = _a.disabled, testIdBuilder = _a.testIdBuilder, __ = _a.translate;
|
|
43
|
+
var func = value
|
|
44
|
+
? findTree(funcs, function (item) { return item.type === value.func; })
|
|
45
|
+
: null;
|
|
46
|
+
return (React__default.createElement("div", { className: cx('CBFunc') },
|
|
47
|
+
React__default.createElement(PopOverContainer, { popOverRender: function (_a) {
|
|
48
|
+
var onClose = _a.onClose;
|
|
49
|
+
return (React__default.createElement(GroupedSelection, { onClick: onClose, options: funcs, value: func === null || func === void 0 ? void 0 : func.type, option2value: option2value, onChange: _this.handleFuncChange, multiple: false, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('group') }));
|
|
50
|
+
} }, function (_a) {
|
|
51
|
+
var onClick = _a.onClick, ref = _a.ref, isOpened = _a.isOpened;
|
|
52
|
+
return (React__default.createElement("div", { className: cx('CBFunc-select') },
|
|
53
|
+
React__default.createElement(ResultBox, { className: cx('CBGroup-fieldInput', fieldClassName, isOpened ? 'is-active' : ''), ref: ref, allowInput: false, result: func, onResultChange: noop, onResultClick: onClick, placeholder: __('Condition.field_placeholder'), disabled: disabled, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('resbox') },
|
|
54
|
+
React__default.createElement("span", { className: cx('CBGroup-fieldCaret') },
|
|
55
|
+
React__default.createElement(Icon, { icon: "right-arrow-bold", className: "icon" })))));
|
|
56
|
+
}),
|
|
57
|
+
func ? (this.renderFunc(func)) : (React__default.createElement("span", { className: cx('CBFunc-error') }, __('Condition.fun_error')))));
|
|
58
|
+
};
|
|
59
|
+
__decorate([
|
|
60
|
+
autobind,
|
|
61
|
+
__metadata("design:type", Function),
|
|
62
|
+
__metadata("design:paramtypes", [String]),
|
|
63
|
+
__metadata("design:returntype", void 0)
|
|
64
|
+
], ConditionFunc.prototype, "handleFuncChange", null);
|
|
65
|
+
__decorate([
|
|
66
|
+
autobind,
|
|
67
|
+
__metadata("design:type", Function),
|
|
68
|
+
__metadata("design:paramtypes", [Object, Number]),
|
|
69
|
+
__metadata("design:returntype", void 0)
|
|
70
|
+
], ConditionFunc.prototype, "handleArgChange", null);
|
|
71
|
+
return ConditionFunc;
|
|
72
|
+
}(React__default.Component));
|
|
73
|
+
var ConditionFunc$1 = themeable(localeable(ConditionFunc));
|
|
74
|
+
|
|
75
|
+
export { ConditionFunc, ConditionFunc$1 as default };
|
|
@@ -0,0 +1,196 @@
|
|
|
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 { themeable, localeable, guid, someTree, autobind } from 'amis-rev-core';
|
|
9
|
+
import Button from '../Button.js';
|
|
10
|
+
import GroupOrItem from './GroupOrItem.js';
|
|
11
|
+
import EnhancedSelect from '../Select.js';
|
|
12
|
+
import '../icons.js';
|
|
13
|
+
import SvgDownArrowBold from '../../icons/down-arrow-bold.svg.js';
|
|
14
|
+
|
|
15
|
+
var ConditionGroup = /** @class */ (function (_super) {
|
|
16
|
+
__extends(ConditionGroup, _super);
|
|
17
|
+
function ConditionGroup(props) {
|
|
18
|
+
var _this = _super.call(this, props) || this;
|
|
19
|
+
_this.state = {
|
|
20
|
+
isCollapsed: false
|
|
21
|
+
};
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
ConditionGroup.prototype.componentDidUpdate = function (prevProps) {
|
|
25
|
+
// 上层折叠的时候,内层也折叠,主要是为了处理,子节点中,第一项也是Group的折叠场景
|
|
26
|
+
if (prevProps.isCollapsed !== this.props.isCollapsed) {
|
|
27
|
+
this.setState({
|
|
28
|
+
isCollapsed: this.props.isCollapsed || false
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
ConditionGroup.prototype.getValue = function () {
|
|
33
|
+
return __assign({ id: guid(), conjunction: 'and' }, this.props.value);
|
|
34
|
+
};
|
|
35
|
+
ConditionGroup.prototype.handleNotClick = function () {
|
|
36
|
+
var onChange = this.props.onChange;
|
|
37
|
+
var value = this.getValue();
|
|
38
|
+
value.not = !value.not;
|
|
39
|
+
onChange(value);
|
|
40
|
+
};
|
|
41
|
+
ConditionGroup.prototype.handleConjunctionChange = function (val) {
|
|
42
|
+
var onChange = this.props.onChange;
|
|
43
|
+
var value = this.getValue();
|
|
44
|
+
value.conjunction = val.value;
|
|
45
|
+
onChange(value);
|
|
46
|
+
};
|
|
47
|
+
ConditionGroup.prototype.handleAdd = function () {
|
|
48
|
+
var onChange = this.props.onChange;
|
|
49
|
+
var value = this.getValue();
|
|
50
|
+
value.children = Array.isArray(value.children)
|
|
51
|
+
? value.children.concat()
|
|
52
|
+
: [];
|
|
53
|
+
value.children.push({
|
|
54
|
+
id: guid()
|
|
55
|
+
});
|
|
56
|
+
onChange(value);
|
|
57
|
+
};
|
|
58
|
+
ConditionGroup.prototype.handleAddGroup = function () {
|
|
59
|
+
var onChange = this.props.onChange;
|
|
60
|
+
var value = this.getValue();
|
|
61
|
+
value.children = Array.isArray(value.children)
|
|
62
|
+
? value.children.concat()
|
|
63
|
+
: [];
|
|
64
|
+
value.children.push({
|
|
65
|
+
id: guid(),
|
|
66
|
+
conjunction: 'and',
|
|
67
|
+
children: [
|
|
68
|
+
{
|
|
69
|
+
id: guid()
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
onChange(value);
|
|
74
|
+
};
|
|
75
|
+
ConditionGroup.prototype.handleItemChange = function (item, index) {
|
|
76
|
+
var onChange = this.props.onChange;
|
|
77
|
+
var value = this.getValue();
|
|
78
|
+
value.children = Array.isArray(value.children)
|
|
79
|
+
? value.children.concat()
|
|
80
|
+
: [];
|
|
81
|
+
value.children.splice(index, 1, item);
|
|
82
|
+
onChange(value);
|
|
83
|
+
};
|
|
84
|
+
ConditionGroup.prototype.handleItemRemove = function (index) {
|
|
85
|
+
var onChange = this.props.onChange;
|
|
86
|
+
var value = this.getValue();
|
|
87
|
+
value.children = Array.isArray(value.children)
|
|
88
|
+
? value.children.concat()
|
|
89
|
+
: [];
|
|
90
|
+
value.children.splice(index, 1);
|
|
91
|
+
onChange(value);
|
|
92
|
+
};
|
|
93
|
+
ConditionGroup.prototype.toggleCollapse = function () {
|
|
94
|
+
this.setState(function (state) {
|
|
95
|
+
return {
|
|
96
|
+
isCollapsed: !state.isCollapsed
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
ConditionGroup.prototype.render = function () {
|
|
101
|
+
var _this = this;
|
|
102
|
+
var _a, _b, _c, _d;
|
|
103
|
+
var _e = this.props, builderMode = _e.builderMode, cx = _e.classnames, fieldClassName = _e.fieldClassName, value = _e.value, data = _e.data, fields = _e.fields, funcs = _e.funcs, config = _e.config, removeable = _e.removeable, onRemove = _e.onRemove, onDragStart = _e.onDragStart, showNot = _e.showNot, _f = _e.showANDOR, showANDOR = _f === void 0 ? false : _f, searchable = _e.searchable, __ = _e.translate, formula = _e.formula, popOverContainer = _e.popOverContainer, selectMode = _e.selectMode, renderEtrValue = _e.renderEtrValue, draggable = _e.draggable, depth = _e.depth, isAddBtnVisibleOn = _e.isAddBtnVisibleOn, isAddGroupBtnVisibleOn = _e.isAddGroupBtnVisibleOn, showIf = _e.showIf, formulaForIf = _e.formulaForIf, testIdBuilder = _e.testIdBuilder;
|
|
104
|
+
var isCollapsed = this.state.isCollapsed;
|
|
105
|
+
var disabled = (_a = value === null || value === void 0 ? void 0 : value.disabled) !== null && _a !== void 0 ? _a : this.props.disabled;
|
|
106
|
+
var body = Array.isArray(value === null || value === void 0 ? void 0 : value.children) && value.children.length
|
|
107
|
+
? isCollapsed
|
|
108
|
+
? value.children.slice(0, 1)
|
|
109
|
+
: value.children
|
|
110
|
+
: null;
|
|
111
|
+
var param = { depth: depth, breadth: (_b = body === null || body === void 0 ? void 0 : body.length) !== null && _b !== void 0 ? _b : 0 };
|
|
112
|
+
var anyFieldAvailable = someTree(fields, function (field) { return field.disabled !== true; });
|
|
113
|
+
var addConditionVisibleBool = (_c = isAddBtnVisibleOn === null || isAddBtnVisibleOn === void 0 ? void 0 : isAddBtnVisibleOn(param)) !== null && _c !== void 0 ? _c : anyFieldAvailable;
|
|
114
|
+
var addConditionGroupVisibleBool = (_d = isAddGroupBtnVisibleOn === null || isAddGroupBtnVisibleOn === void 0 ? void 0 : isAddGroupBtnVisibleOn(param)) !== null && _d !== void 0 ? _d : anyFieldAvailable;
|
|
115
|
+
return (React__default.createElement("div", { className: cx('CBGroup'), "data-group-id": value === null || value === void 0 ? void 0 : value.id },
|
|
116
|
+
builderMode === 'simple' && showANDOR === false ? null : (React__default.createElement("div", { className: cx('CBGroup-toolbarCondition'), draggable: draggable, onDragStart: onDragStart },
|
|
117
|
+
Array.isArray(value === null || value === void 0 ? void 0 : value.children) && value.children.length > 1 ? (React__default.createElement("div", { className: cx('CBGroup-toolbarCondition-arrow', {
|
|
118
|
+
'is-collapse': isCollapsed
|
|
119
|
+
}), onClick: this.toggleCollapse },
|
|
120
|
+
React__default.createElement(SvgDownArrowBold, null))) : null,
|
|
121
|
+
showNot ? (React__default.createElement(Button, { onClick: this.handleNotClick, className: "m-b-sm z-10", size: "xs", active: value === null || value === void 0 ? void 0 : value.not, disabled: disabled }, __('Condition.not'))) : null,
|
|
122
|
+
React__default.createElement(EnhancedSelect, { options: [
|
|
123
|
+
{
|
|
124
|
+
label: __('Condition.and'),
|
|
125
|
+
value: 'and'
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
label: __('Condition.or'),
|
|
129
|
+
value: 'or'
|
|
130
|
+
}
|
|
131
|
+
], testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild((value === null || value === void 0 ? void 0 : value.conjunction) || 'and'), value: (value === null || value === void 0 ? void 0 : value.conjunction) || 'and', disabled: disabled, onChange: this.handleConjunctionChange, clearable: false }))),
|
|
132
|
+
React__default.createElement("div", { className: cx('CBGroup-body-wrapper') },
|
|
133
|
+
React__default.createElement("div", { className: cx('CBGroup-body') },
|
|
134
|
+
body ? (body.map(function (item, index) {
|
|
135
|
+
var _a;
|
|
136
|
+
return (React__default.createElement(GroupOrItem, { draggable: draggable && value.children.length > 1, onDragStart: onDragStart, config: config, key: item.id, fields: fields, fieldClassName: fieldClassName, value: item, index: index, onChange: _this.handleItemChange, funcs: funcs, onRemove: _this.handleItemRemove, data: data, disabled: (_a = item.disabled) !== null && _a !== void 0 ? _a : disabled, searchable: searchable, builderMode: builderMode, formula: formula, popOverContainer: popOverContainer, renderEtrValue: renderEtrValue, selectMode: selectMode, isCollapsed: isCollapsed, depth: depth, isAddBtnVisibleOn: isAddBtnVisibleOn, isAddGroupBtnVisibleOn: isAddGroupBtnVisibleOn, showIf: showIf, formulaForIf: formulaForIf, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild("group-".concat(index)) }));
|
|
137
|
+
})) : (React__default.createElement("div", { className: cx("CBGroup-placeholder ".concat(builderMode === 'simple' ? 'simple' : '')) }, __('Condition.blank'))),
|
|
138
|
+
isCollapsed ? (React__default.createElement("div", { className: cx('CBGroup-body-collapse') },
|
|
139
|
+
React__default.createElement("span", { onClick: this.toggleCollapse },
|
|
140
|
+
__('Condition.collapse'),
|
|
141
|
+
" ",
|
|
142
|
+
React__default.createElement(SvgDownArrowBold, null)))) : null),
|
|
143
|
+
isCollapsed ? null : (React__default.createElement("div", { className: cx('CBGroup-toolbar'), draggable: draggable, onDragStart: onDragStart },
|
|
144
|
+
React__default.createElement("div", { className: cx("CBGroup-toolbarConditionAdd".concat(builderMode === 'simple' ? '-simple' : '')) },
|
|
145
|
+
React__default.createElement("div", { className: cx('ButtonGroup') },
|
|
146
|
+
addConditionVisibleBool ? (React__default.createElement(Button, { level: "link", onClick: this.handleAdd, size: "xs", disabled: disabled, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('add') }, __('Condition.add_cond'))) : null,
|
|
147
|
+
addConditionGroupVisibleBool && builderMode !== 'simple' ? (React__default.createElement(Button, { onClick: this.handleAddGroup, size: "xs", disabled: disabled, level: "link", testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('add-group') }, __('Condition.add_cond_group'))) : null,
|
|
148
|
+
removeable ? (React__default.createElement(Button, { onClick: onRemove, size: "xs", disabled: disabled, level: "link", testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('add-del') }, __('Condition.delete_cond_group'))) : null)))))));
|
|
149
|
+
};
|
|
150
|
+
__decorate([
|
|
151
|
+
autobind,
|
|
152
|
+
__metadata("design:type", Function),
|
|
153
|
+
__metadata("design:paramtypes", []),
|
|
154
|
+
__metadata("design:returntype", void 0)
|
|
155
|
+
], ConditionGroup.prototype, "handleNotClick", null);
|
|
156
|
+
__decorate([
|
|
157
|
+
autobind,
|
|
158
|
+
__metadata("design:type", Function),
|
|
159
|
+
__metadata("design:paramtypes", [Object]),
|
|
160
|
+
__metadata("design:returntype", void 0)
|
|
161
|
+
], ConditionGroup.prototype, "handleConjunctionChange", null);
|
|
162
|
+
__decorate([
|
|
163
|
+
autobind,
|
|
164
|
+
__metadata("design:type", Function),
|
|
165
|
+
__metadata("design:paramtypes", []),
|
|
166
|
+
__metadata("design:returntype", void 0)
|
|
167
|
+
], ConditionGroup.prototype, "handleAdd", null);
|
|
168
|
+
__decorate([
|
|
169
|
+
autobind,
|
|
170
|
+
__metadata("design:type", Function),
|
|
171
|
+
__metadata("design:paramtypes", []),
|
|
172
|
+
__metadata("design:returntype", void 0)
|
|
173
|
+
], ConditionGroup.prototype, "handleAddGroup", null);
|
|
174
|
+
__decorate([
|
|
175
|
+
autobind,
|
|
176
|
+
__metadata("design:type", Function),
|
|
177
|
+
__metadata("design:paramtypes", [Object, Number]),
|
|
178
|
+
__metadata("design:returntype", void 0)
|
|
179
|
+
], ConditionGroup.prototype, "handleItemChange", null);
|
|
180
|
+
__decorate([
|
|
181
|
+
autobind,
|
|
182
|
+
__metadata("design:type", Function),
|
|
183
|
+
__metadata("design:paramtypes", [Number]),
|
|
184
|
+
__metadata("design:returntype", void 0)
|
|
185
|
+
], ConditionGroup.prototype, "handleItemRemove", null);
|
|
186
|
+
__decorate([
|
|
187
|
+
autobind,
|
|
188
|
+
__metadata("design:type", Function),
|
|
189
|
+
__metadata("design:paramtypes", []),
|
|
190
|
+
__metadata("design:returntype", void 0)
|
|
191
|
+
], ConditionGroup.prototype, "toggleCollapse", null);
|
|
192
|
+
return ConditionGroup;
|
|
193
|
+
}(React__default.Component));
|
|
194
|
+
var ConditionGroup$1 = themeable(localeable(ConditionGroup));
|
|
195
|
+
|
|
196
|
+
export { ConditionGroup, ConditionGroup$1 as default };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends, __spreadArray, __read, __assign, __decorate, __metadata } from 'tslib';
|
|
7
|
+
import { autobind, themeable } from 'amis-rev-core';
|
|
8
|
+
import React__default from 'react';
|
|
9
|
+
import { Icon } from '../icons.js';
|
|
10
|
+
import ConditionGroup from './Group.js';
|
|
11
|
+
import ConditionItem from './Item.js';
|
|
12
|
+
import FormulaPicker from '../formula/Picker.js';
|
|
13
|
+
import Button from '../Button.js';
|
|
14
|
+
import TooltipWrapper from '../TooltipWrapper.js';
|
|
15
|
+
|
|
16
|
+
var CBGroupOrItem = /** @class */ (function (_super) {
|
|
17
|
+
__extends(CBGroupOrItem, _super);
|
|
18
|
+
function CBGroupOrItem() {
|
|
19
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
|
|
20
|
+
_this.state = {
|
|
21
|
+
hover: false
|
|
22
|
+
};
|
|
23
|
+
return _this;
|
|
24
|
+
}
|
|
25
|
+
CBGroupOrItem.prototype.handleItemChange = function (value) {
|
|
26
|
+
this.props.onChange(value, this.props.index);
|
|
27
|
+
};
|
|
28
|
+
CBGroupOrItem.prototype.handleItemRemove = function () {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
(_b = (_a = this.props).onRemove) === null || _b === void 0 ? void 0 : _b.call(_a, this.props.index);
|
|
31
|
+
};
|
|
32
|
+
CBGroupOrItem.prototype.handlerHoverIn = function (e) {
|
|
33
|
+
if (this.props.mobileUI) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
e.stopPropagation();
|
|
37
|
+
this.setState({
|
|
38
|
+
hover: true
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
CBGroupOrItem.prototype.handlerHoverOut = function (e) {
|
|
42
|
+
this.setState({
|
|
43
|
+
hover: false
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
CBGroupOrItem.prototype.handleIfChange = function (condition) {
|
|
47
|
+
var value = __assign(__assign({}, this.props.value), { if: condition });
|
|
48
|
+
this.props.onChange(value, this.props.index);
|
|
49
|
+
};
|
|
50
|
+
CBGroupOrItem.prototype.render = function () {
|
|
51
|
+
var _a;
|
|
52
|
+
var _b = this.props, builderMode = _b.builderMode, cx = _b.classnames, fieldClassName = _b.fieldClassName, value = _b.value, config = _b.config, fields = _b.fields, funcs = _b.funcs, draggable = _b.draggable, data = _b.data, searchable = _b.searchable, onDragStart = _b.onDragStart, formula = _b.formula, popOverContainer = _b.popOverContainer, selectMode = _b.selectMode, renderEtrValue = _b.renderEtrValue, isCollapsed = _b.isCollapsed, depth = _b.depth, isAddBtnVisibleOn = _b.isAddBtnVisibleOn, isAddGroupBtnVisibleOn = _b.isAddGroupBtnVisibleOn, showIf = _b.showIf, formulaForIf = _b.formulaForIf, testIdBuilder = _b.testIdBuilder, mobileUI = _b.mobileUI;
|
|
53
|
+
var disabled = (_a = value === null || value === void 0 ? void 0 : value.disabled) !== null && _a !== void 0 ? _a : this.props.disabled;
|
|
54
|
+
return (React__default.createElement("div", { className: cx("CBGroupOrItem".concat(builderMode === 'simple' ? '-simple' : ''), { 'is-mobile': mobileUI }), "data-id": value === null || value === void 0 ? void 0 : value.id },
|
|
55
|
+
React__default.createElement("div", { className: cx('CBGroupOrItem-body') }, (value === null || value === void 0 ? void 0 : value.conjunction) ? (React__default.createElement("div", { className: cx('CBGroupOrItem-body-group', {
|
|
56
|
+
'is-hover': this.state.hover || mobileUI
|
|
57
|
+
}), onMouseOver: this.handlerHoverIn, onMouseOut: this.handlerHoverOut },
|
|
58
|
+
draggable && !disabled ? (React__default.createElement("a", { draggable: true, onDragStart: onDragStart, className: cx('CBGroupOrItem-dragbar') },
|
|
59
|
+
React__default.createElement(Icon, { icon: "drag-bar", className: "icon" }))) : null,
|
|
60
|
+
React__default.createElement(ConditionGroup, { isCollapsed: isCollapsed, draggable: draggable, disabled: disabled, searchable: searchable, selectMode: selectMode, onDragStart: onDragStart, config: config, fields: fields, formula: formula, value: value, onChange: this.handleItemChange, fieldClassName: fieldClassName, funcs: funcs, removeable: true, onRemove: this.handleItemRemove, data: data, renderEtrValue: renderEtrValue, depth: depth + 1, isAddBtnVisibleOn: isAddBtnVisibleOn, isAddGroupBtnVisibleOn: isAddGroupBtnVisibleOn, showIf: showIf, formulaForIf: formulaForIf, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild("sub-".concat(depth)) }))) : (React__default.createElement("div", { className: cx('CBGroupOrItem-body-item') },
|
|
61
|
+
draggable && !disabled ? (React__default.createElement("a", { draggable: true, onDragStart: onDragStart, className: cx('CBGroupOrItem-dragbar') },
|
|
62
|
+
React__default.createElement(Icon, { icon: "drag-bar", className: "icon" }))) : null,
|
|
63
|
+
React__default.createElement(ConditionItem, { disabled: disabled, searchable: searchable, config: config, fields: fields, value: value, onChange: this.handleItemChange, fieldClassName: fieldClassName, funcs: funcs, data: data, formula: formula, popOverContainer: popOverContainer, renderEtrValue: renderEtrValue, selectMode: selectMode, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild("cItem") }),
|
|
64
|
+
showIf ? (React__default.createElement(FormulaPicker, __assign({}, formulaForIf, { evalMode: true, mixedMode: false, header: "\u8BBE\u7F6E\u6761\u4EF6", value: (value === null || value === void 0 ? void 0 : value.if) || '', onChange: this.handleIfChange }), function (_a) {
|
|
65
|
+
var onClick = _a.onClick;
|
|
66
|
+
return (React__default.createElement(TooltipWrapper, { tooltip: '配置启动条件,当前规则只有在此条件成立时才会生效', tooltipTheme: "dark", container: popOverContainer },
|
|
67
|
+
React__default.createElement("a", { className: cx('CBIf', (value === null || value === void 0 ? void 0 : value.if) ? 'is-active' : ''), onClick: onClick },
|
|
68
|
+
React__default.createElement(Icon, { icon: "if", className: "icon" }))));
|
|
69
|
+
})) : null,
|
|
70
|
+
React__default.createElement(Button, { className: cx('CBDelete'), onClick: this.handleItemRemove, disabled: disabled, level: "link", testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild("delete") },
|
|
71
|
+
React__default.createElement(Icon, { icon: "remove", className: "icon" })))))));
|
|
72
|
+
};
|
|
73
|
+
__decorate([
|
|
74
|
+
autobind,
|
|
75
|
+
__metadata("design:type", Function),
|
|
76
|
+
__metadata("design:paramtypes", [Object]),
|
|
77
|
+
__metadata("design:returntype", void 0)
|
|
78
|
+
], CBGroupOrItem.prototype, "handleItemChange", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
autobind,
|
|
81
|
+
__metadata("design:type", Function),
|
|
82
|
+
__metadata("design:paramtypes", []),
|
|
83
|
+
__metadata("design:returntype", void 0)
|
|
84
|
+
], CBGroupOrItem.prototype, "handleItemRemove", null);
|
|
85
|
+
__decorate([
|
|
86
|
+
autobind,
|
|
87
|
+
__metadata("design:type", Function),
|
|
88
|
+
__metadata("design:paramtypes", [Object]),
|
|
89
|
+
__metadata("design:returntype", void 0)
|
|
90
|
+
], CBGroupOrItem.prototype, "handlerHoverIn", null);
|
|
91
|
+
__decorate([
|
|
92
|
+
autobind,
|
|
93
|
+
__metadata("design:type", Function),
|
|
94
|
+
__metadata("design:paramtypes", [Object]),
|
|
95
|
+
__metadata("design:returntype", void 0)
|
|
96
|
+
], CBGroupOrItem.prototype, "handlerHoverOut", null);
|
|
97
|
+
__decorate([
|
|
98
|
+
autobind,
|
|
99
|
+
__metadata("design:type", Function),
|
|
100
|
+
__metadata("design:paramtypes", [String]),
|
|
101
|
+
__metadata("design:returntype", void 0)
|
|
102
|
+
], CBGroupOrItem.prototype, "handleIfChange", null);
|
|
103
|
+
return CBGroupOrItem;
|
|
104
|
+
}(React__default.Component));
|
|
105
|
+
var GroupOrItem = themeable(CBGroupOrItem);
|
|
106
|
+
|
|
107
|
+
export { CBGroupOrItem, GroupOrItem as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __assign } from 'tslib';
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import { PopOverContainer } from '../PopOverContainer.js';
|
|
9
|
+
import { Icon } from '../icons.js';
|
|
10
|
+
import GroupedSelection from '../GroupedSelection.js';
|
|
11
|
+
import { themeable } from 'amis-rev-core';
|
|
12
|
+
|
|
13
|
+
var option2value = function (item) { return item.value; };
|
|
14
|
+
function InputSwitch(_a) {
|
|
15
|
+
var options = _a.options, value = _a.value, onChange = _a.onChange, cx = _a.classnames, disabled = _a.disabled, popOverContainer = _a.popOverContainer, testIdBuilder = _a.testIdBuilder;
|
|
16
|
+
return (React__default.createElement(PopOverContainer, { popOverContainer: popOverContainer, popOverRender: function (_a) {
|
|
17
|
+
var onClose = _a.onClose;
|
|
18
|
+
return (React__default.createElement(GroupedSelection, { onClick: onClose, option2value: option2value, onChange: onChange, options: options, value: value, multiple: false, disabled: disabled, testIdBuilder: testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('group') }));
|
|
19
|
+
} }, function (_a) {
|
|
20
|
+
var onClick = _a.onClick, isOpened = _a.isOpened, ref = _a.ref;
|
|
21
|
+
return (React__default.createElement("div", __assign({ className: cx('CBInputSwitch', isOpened ? 'is-active' : '') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getTestId()),
|
|
22
|
+
React__default.createElement("a", { onClick: onClick, ref: ref },
|
|
23
|
+
React__default.createElement(Icon, { icon: "ellipsis-v" }))));
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
var InputSwitch$1 = themeable(InputSwitch);
|
|
27
|
+
|
|
28
|
+
export { InputSwitch, InputSwitch$1 as default };
|