plain-design 1.0.0-beta.16 → 1.0.0-beta.161
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/dist/plain-design.commonjs.min.js +2 -18
- package/dist/plain-design.commonjs.min.js.LICENSE.txt +18 -0
- package/dist/plain-design.min.css +69 -49
- package/dist/plain-design.min.js +2 -18
- package/dist/plain-design.min.js.LICENSE.txt +18 -0
- package/dist/report.html +6 -6
- package/package.json +37 -33
- package/src/packages/build.ts +2 -10
- package/src/packages/components/$address/createAddressService.tsx +27 -3
- package/src/packages/components/$ai/index.tsx +360 -0
- package/src/packages/components/$configuration/index.tsx +4 -2
- package/src/packages/components/$file/index.tsx +45 -2
- package/src/packages/components/$imageSelector/index.tsx +56 -0
- package/src/packages/components/$loading/index.tsx +3 -0
- package/src/packages/components/$message/image.service.utils.tsx +3 -3
- package/src/packages/components/$object/createObjectService.tsx +43 -29
- package/src/packages/components/$object/object.conver.ts +3 -3
- package/src/packages/components/$object/object.service.utils.ts +8 -4
- package/src/packages/components/$ov/createOvService.ts +2 -2
- package/src/packages/components/$previewer/ImagePreviewerFixedContainer.tsx +108 -0
- package/src/packages/components/$previewer/image-previewer-fixed-container.scss +18 -0
- package/src/packages/components/$previewer/index.tsx +52 -0
- package/src/packages/components/$search/SearchFooter.tsx +32 -0
- package/src/packages/components/$search/SearchList.tsx +207 -0
- package/src/packages/components/$search/SearchServicePanel.tsx +233 -0
- package/src/packages/components/$search/createSearchService.tsx +43 -0
- package/src/packages/components/$search/index.tsx +6 -0
- package/src/packages/components/$search/search-service.scss +221 -0
- package/src/packages/components/$search/search.utils.tsx +112 -0
- package/src/packages/components/$upload/createUploadService.tsx +1 -1
- package/src/packages/components/$upload/upload.utils.ts +7 -6
- package/src/packages/components/Address/index.tsx +2 -2
- package/src/packages/components/AddressCascade/address-cascade.utils.ts +1 -1
- package/src/packages/components/AddressCascade/createAddressCascade.hooks.ts +1 -1
- package/src/packages/components/AddressCascade/createAddressCascade.multiple.tsx +6 -6
- package/src/packages/components/AddressCascade/createAddressCascade.single.tsx +7 -7
- package/src/packages/components/AddressCascade/index.tsx +3 -1
- package/src/packages/components/AiChatBox/ai-chat-box.scss +74 -0
- package/src/packages/components/AiChatBox/index.tsx +220 -0
- package/src/packages/components/Alert/alert.scss +7 -4
- package/src/packages/components/Alert/index.tsx +5 -5
- package/src/packages/components/Application/index.tsx +7 -4
- package/src/packages/components/Application/service/createApplicationService.tsx +2 -2
- package/src/packages/components/Application/service/createApplicationServiceComponent.tsx +1 -1
- package/src/packages/components/Application/service/createApplicationServiceManager.tsx +7 -4
- package/src/packages/components/Application/service/useApplicationService.tsx +5 -3
- package/src/packages/components/Application/theme/theme.ts +50 -26
- package/src/packages/components/Application/utils/application.utils.ts +5 -10
- package/src/packages/components/Application/utils/createServiceReadyObserver.ts +1 -1
- package/src/packages/components/ArrowStep/index.tsx +1 -1
- package/src/packages/components/ArrowStepGroup/arrow-step.scss +17 -4
- package/src/packages/components/ArrowStepGroup/index.tsx +2 -2
- package/src/packages/components/AutoLoadingObserver/index.tsx +173 -0
- package/src/packages/components/AutoTable/AutoTable.tsx +2 -2
- package/src/packages/components/AutoTable/auto-table.scss +83 -19
- package/src/packages/components/AutoTable/createTableOptionUser.tsx +3 -1
- package/src/packages/components/AutoTable/filter/useTableOption.filter.form.tsx +10 -8
- package/src/packages/components/AutoTable/filter/useTableOption.filter.search.tsx +7 -7
- package/src/packages/components/AutoTable/filter/useTableOption.filter.state.ts +12 -7
- package/src/packages/components/AutoTable/setting/useTableOption.setting.all.fitler.tsx +5 -5
- package/src/packages/components/AutoTable/setting/useTableOption.setting.cache.tsx +19 -19
- package/src/packages/components/AutoTable/setting/useTableOption.setting.config.tsx +70 -28
- package/src/packages/components/AutoTable/setting/useTableOption.setting.export.tsx +25 -50
- package/src/packages/components/AutoTable/setting/useTableOption.setting.import.tsx +4 -4
- package/src/packages/components/AutoTable/setting/useTableOption.setting.senior.filter.tsx +388 -385
- package/src/packages/components/AutoTable/setting/useTableOption.setting.senior.sort.tsx +20 -13
- package/src/packages/components/AutoTable/setting/useTableOption.setting.tsx +109 -109
- package/src/packages/components/AutoTable/setting/useTableOption.setting.utils.ts +2 -2
- package/src/packages/components/AutoTable/use/useTableOption.ai.tsx +643 -0
- package/src/packages/components/AutoTable/use/useTableOption.buttons.tsx +45 -23
- package/src/packages/components/AutoTable/use/useTableOption.cache.ts +3 -3
- package/src/packages/components/AutoTable/use/useTableOption.check.tsx +4 -4
- package/src/packages/components/AutoTable/use/useTableOption.column.popper.tsx +14 -13
- package/src/packages/components/AutoTable/use/useTableOption.confirm.tsx +5 -5
- package/src/packages/components/AutoTable/use/useTableOption.fill.tsx +9 -8
- package/src/packages/components/AutoTable/use/useTableOption.hooks.tsx +15 -5
- package/src/packages/components/AutoTable/use/useTableOption.loading.tsx +12 -6
- package/src/packages/components/AutoTable/use/useTableOption.methods.tsx +26 -21
- package/src/packages/components/AutoTable/use/useTableOption.pagination.tsx +11 -6
- package/src/packages/components/AutoTable/use/useTableOption.parent.tsx +5 -2
- package/src/packages/components/AutoTable/use/useTableOption.permission.tsx +1 -1
- package/src/packages/components/AutoTable/use/useTableOption.sort.ts +13 -12
- package/src/packages/components/AutoTable/use/useTableOption.state.tsx +2 -1
- package/src/packages/components/AutoTable/use/useTableOption.table.tsx +16 -7
- package/src/packages/components/AutoTable/use/useTableOption.tips.tsx +4 -4
- package/src/packages/components/AutoTable/use/useTableOptionKeyboard.tsx +13 -4
- package/src/packages/components/AutoTable/utils/AutoModule.ts +1 -1
- package/src/packages/components/AutoTable/utils/AutoTable.utils.ts +76 -1
- package/src/packages/components/AutoTable/utils/TableOption.space.tsx +14 -6
- package/src/packages/components/AutoTable/utils/TableOption.url.ts +1 -1
- package/src/packages/components/AutoTable/utils/TableOption.utils.tsx +4 -4
- package/src/packages/components/AutoTable/utils/buildPlainDefaultUrlConfig.ts +6 -6
- package/src/packages/components/AutoWidthInput/index.tsx +2 -2
- package/src/packages/components/Badge/badge.scss +5 -1
- package/src/packages/components/Badge/index.tsx +1 -1
- package/src/packages/components/Box/box.scss +6 -0
- package/src/packages/components/Box/index.tsx +31 -0
- package/src/packages/components/Button/button.scss +41 -9
- package/src/packages/components/Button/index.tsx +79 -14
- package/src/packages/components/ButtonGroup/button-group.scss +2 -2
- package/src/packages/components/ButtonGroup/index.tsx +3 -3
- package/src/packages/components/Card/card.scss +1 -1
- package/src/packages/components/Card/index.tsx +2 -2
- package/src/packages/components/Carousel/carousel.scss +391 -0
- package/src/packages/components/Carousel/index.tsx +569 -22
- package/src/packages/components/CarouselItem/index.tsx +77 -0
- package/src/packages/components/Cascade/CascadeKeys.tsx +158 -0
- package/src/packages/components/Cascade/cascade.scss +2 -2
- package/src/packages/components/Cascade/cascade.utils.ts +1 -1
- package/src/packages/components/Cascade/createCascadeHooks.ts +1 -1
- package/src/packages/components/Cascade/createCascadePopper.tsx +5 -4
- package/src/packages/components/Cascade/createCascadeUtils.ts +2 -2
- package/src/packages/components/Cascade/createMultipleCascadeRender.tsx +5 -6
- package/src/packages/components/Cascade/createSingleCascadeRender.tsx +8 -8
- package/src/packages/components/Cascade/index.tsx +3 -3
- package/src/packages/components/CascadeKeys/index.tsx +5 -0
- package/src/packages/components/CascadePanel/cascade-panel.utils.ts +3 -3
- package/src/packages/components/CascadePanel/flat/CascadeFlatPanelNode.tsx +1 -1
- package/src/packages/components/CascadePanel/flat/cascade-flat-panel.scss +22 -34
- package/src/packages/components/CascadePanel/flat/createCascadeFlatRender.tsx +15 -10
- package/src/packages/components/CascadePanel/index.tsx +22 -4
- package/src/packages/components/CascadePanel/list/CascadeListPanelItem.tsx +4 -4
- package/src/packages/components/CascadePanel/list/CascadeListPanelNode.tsx +1 -1
- package/src/packages/components/CascadePanel/list/createCascadeListRender.tsx +6 -2
- package/src/packages/components/Checkbox/checkbox.scss +4 -0
- package/src/packages/components/Checkbox/index.tsx +9 -11
- package/src/packages/components/CheckboxGroup/index.tsx +3 -3
- package/src/packages/components/CheckboxInner/checkbox-inner.scss +2 -1
- package/src/packages/components/CheckboxInner/index.tsx +1 -1
- package/src/packages/components/Collapse/index.tsx +2 -2
- package/src/packages/components/CollapseGroup/index.tsx +1 -1
- package/src/packages/components/CollapseTransition/index.tsx +5 -5
- package/src/packages/components/ColorPicker/ColorPanel.tsx +146 -125
- package/src/packages/components/ColorPicker/color-panel.scss +117 -97
- package/src/packages/components/ColorPicker/color-picker.scss +6 -0
- package/src/packages/components/ColorPicker/index.tsx +144 -131
- package/src/packages/components/ColorPicker/sub/ColorAlphaSlider.tsx +1 -1
- package/src/packages/components/ColorPicker/sub/ColorHueSlider.tsx +1 -1
- package/src/packages/components/ColorPicker/sub/ColorSlider.tsx +5 -5
- package/src/packages/components/ColorPicker/sub/ColorSvPanel.tsx +4 -4
- package/src/packages/components/ColorPicker/useColorPanelEditor.tsx +1 -1
- package/src/packages/components/ColorPicker/useColorPanelHistory.tsx +1 -1
- package/src/packages/components/ColorPicker/utils/color-picker.utils.tsx +1 -1
- package/src/packages/components/ConfirmPopup/confirm-popup.scss +16 -0
- package/src/packages/components/ConfirmPopup/index.tsx +72 -0
- package/src/packages/components/Corner/corner.scss +14 -0
- package/src/packages/components/Corner/index.tsx +80 -0
- package/src/packages/components/DatePicker/createDateRender.multiple.tsx +8 -7
- package/src/packages/components/DatePicker/createDateRender.single.tsx +9 -7
- package/src/packages/components/DatePicker/createRangeDateRender.range.tsx +36 -28
- package/src/packages/components/DatePicker/createRangeDateRender.separate.tsx +14 -6
- package/src/packages/components/DatePicker/date.scss +2 -2
- package/src/packages/components/DatePicker/date.utils.tsx +6 -5
- package/src/packages/components/DatePicker/index.tsx +5 -3
- package/src/packages/components/DatePicker/panel/DatePanel.tsx +1 -1
- package/src/packages/components/DatePicker/panel/DatePanelDate.tsx +9 -9
- package/src/packages/components/DatePicker/panel/DatePanelMonth.tsx +13 -13
- package/src/packages/components/DatePicker/panel/DatePanelQuarter.tsx +1 -1
- package/src/packages/components/DatePicker/panel/DatePanelRange.tsx +1 -1
- package/src/packages/components/DatePicker/panel/DatePanelWeek.tsx +1 -1
- package/src/packages/components/DatePicker/panel/DatePanelYear.tsx +1 -1
- package/src/packages/components/DatePicker/panel/useDatePanel.tsx +2 -2
- package/src/packages/components/DatePicker/panel/useDateWeek.tsx +2 -2
- package/src/packages/components/DatePicker/useRangeDateRender.tsx +9 -8
- package/src/packages/components/Dialog/dialog.scss +7 -4
- package/src/packages/components/Dialog/index.tsx +26 -32
- package/src/packages/components/Dialog/useDialogMovable.tsx +1 -1
- package/src/packages/components/Dialog/utils/dialog.utils.ts +1 -1
- package/src/packages/components/Dropdown/dropdown.public.scss +10 -0
- package/src/packages/components/Dropdown/dropdown.utils.tsx +5 -4
- package/src/packages/components/Dropdown/index.tsx +20 -7
- package/src/packages/components/DropdownGroup/index.tsx +1 -1
- package/src/packages/components/DropdownOption/index.tsx +2 -2
- package/src/packages/components/DropdownSeparator/index.tsx +8 -0
- package/src/packages/components/Empty/index.tsx +2 -2
- package/src/packages/components/FilterFormMultiple/filter-form-multiple.scss +10 -1
- package/src/packages/components/FilterFormMultiple/index.tsx +45 -19
- package/src/packages/components/FilterFormSingle/index.tsx +21 -11
- package/src/packages/components/FilterService/filter/filter.city.tsx +8 -7
- package/src/packages/components/FilterService/filter/filter.date.tsx +4 -4
- package/src/packages/components/FilterService/filter/filter.datetime.tsx +2 -2
- package/src/packages/components/FilterService/filter/filter.district.tsx +8 -7
- package/src/packages/components/FilterService/filter/filter.number.tsx +1 -1
- package/src/packages/components/FilterService/filter/filter.province.tsx +5 -5
- package/src/packages/components/FilterService/filter/filter.select.tsx +6 -5
- package/src/packages/components/FilterService/filter/filter.text.tsx +4 -4
- package/src/packages/components/FilterService/filter/fitler.object.tsx +5 -5
- package/src/packages/components/FilterService/index.tsx +9 -9
- package/src/packages/components/FilterService/utils/filter.service.utils.ts +3 -3
- package/src/packages/components/FilterService/utils/mergeQueryParam.ts +3 -3
- package/src/packages/components/Form/form.scss +89 -2
- package/src/packages/components/Form/index.tsx +11 -2
- package/src/packages/components/Form/layout/useFormLayout.tsx +93 -27
- package/src/packages/components/Form/types/any.tsx +7 -7
- package/src/packages/components/Form/types/array.tsx +8 -8
- package/src/packages/components/Form/types/date.tsx +7 -7
- package/src/packages/components/Form/types/email.tsx +1 -1
- package/src/packages/components/Form/types/idcard.tsx +1 -1
- package/src/packages/components/Form/types/number.tsx +8 -8
- package/src/packages/components/Form/types/phone.tsx +1 -1
- package/src/packages/components/Form/types/qq.tsx +1 -1
- package/src/packages/components/Form/types/string.tsx +8 -8
- package/src/packages/components/Form/validate/createValidation.tsx +8 -4
- package/src/packages/components/Form/validate/useFormItemValidation.tsx +32 -31
- package/src/packages/components/Form/validate/useFormValidation.tsx +23 -18
- package/src/packages/components/Form/validate/validate.utils.tsx +8 -5
- package/src/packages/components/FormItem/FormItemValidateMessage.tsx +16 -0
- package/src/packages/components/FormItem/createFormEditor.tsx +2 -2
- package/src/packages/components/FormItem/index.tsx +38 -18
- package/src/packages/components/Formatter/index.tsx +1 -1
- package/src/packages/components/Grid/GridCol.tsx +5 -4
- package/src/packages/components/Grid/GridRow.tsx +44 -8
- package/src/packages/components/Grid/grid.scss +2 -2
- package/src/packages/components/Icon/icon.external.tsx +107 -0
- package/src/packages/components/Icon/icon.registry.tsx +2 -2
- package/src/packages/components/Icon/index.tsx +13 -7
- package/src/packages/components/IconPicker/DefaultIcons.ts +7 -0
- package/src/packages/components/IconPicker/icon-picker.scss +43 -0
- package/src/packages/components/IconPicker/index.tsx +189 -0
- package/src/packages/components/Illustration/index.tsx +1 -1
- package/src/packages/components/Image/image.scss +14 -5
- package/src/packages/components/Image/index.tsx +30 -21
- package/src/packages/components/ImagePreviewer/ImagePreviewer.tsx +574 -0
- package/src/packages/components/ImagePreviewer/ImagePreviewerButtonBar.tsx +140 -0
- package/src/packages/components/ImagePreviewer/ImagePreviewerCarouselImage.tsx +54 -0
- package/src/packages/components/ImagePreviewer/ImagePreviewerGallery.tsx +202 -0
- package/src/packages/components/ImagePreviewer/PreviewerLoading.tsx +26 -0
- package/src/packages/components/ImagePreviewer/image-previewer.scss +244 -0
- package/src/packages/components/ImagePreviewer/image-previewer.utils.tsx +136 -0
- package/src/packages/components/ImagePreviewer/index.tsx +5 -0
- package/src/packages/components/ImagePreviewer/previewer-loading.scss +52 -0
- package/src/packages/components/ImageSelector/image-selector.scss +70 -0
- package/src/packages/components/ImageSelector/index.tsx +58 -0
- package/src/packages/components/ImageUploader/index.tsx +41 -23
- package/src/packages/components/Input/index.scss +60 -14
- package/src/packages/components/Input/index.tsx +23 -7
- package/src/packages/components/Input/input.utils.ts +4 -3
- package/src/packages/components/Input/useMultipleInput.tsx +27 -101
- package/src/packages/components/Input/useSingleInput.tsx +17 -15
- package/src/packages/components/Input/useSuggestionInput.tsx +9 -9
- package/src/packages/components/Input/useTextareaInput.tsx +29 -26
- package/src/packages/components/Input/uses/useInputEnterHandler.tsx +24 -13
- package/src/packages/components/Input/uses/useInputHooks.tsx +12 -12
- package/src/packages/components/Input/uses/useInputMaxLength.tsx +1 -1
- package/src/packages/components/Input/uses/useInputSuffixIcon.tsx +14 -10
- package/src/packages/components/InputGroup/index.tsx +1 -1
- package/src/packages/components/InputGroup/input-group.scss +9 -0
- package/src/packages/components/InputNumber/NumberResize.tsx +17 -4
- package/src/packages/components/InputNumber/index.tsx +2 -2
- package/src/packages/components/InputNumber/input-number.utils.tsx +8 -6
- package/src/packages/components/InputNumber/number.scss +20 -2
- package/src/packages/components/InputNumber/number.utils.ts +1 -1
- package/src/packages/components/InputNumber/useInputNumber.multiple.tsx +2 -2
- package/src/packages/components/InputNumber/useInputNumber.public.tsx +37 -17
- package/src/packages/components/InputNumber/useInputNumber.single.tsx +2 -2
- package/src/packages/components/Layout/index.tsx +9 -2
- package/src/packages/components/Layout/layout.scss +20 -0
- package/src/packages/components/Layout/layout.utils.ts +1 -1
- package/src/packages/components/LayoutSection/index.tsx +12 -3
- package/src/packages/components/LayoutSection/useLayoutSectionResizer.tsx +2 -2
- package/src/packages/components/List/index.tsx +1 -1
- package/src/packages/components/ListOption/index.tsx +20 -0
- package/src/packages/components/ListPanel/index.tsx +30 -0
- package/src/packages/components/ListPanel/list-panel.scss +20 -0
- package/src/packages/components/Loading/index.tsx +2 -2
- package/src/packages/components/Loading/loading.scss +2 -0
- package/src/packages/components/LoadingMask/index.tsx +3 -3
- package/src/packages/components/NumberRange/index.tsx +2 -2
- package/src/packages/components/Object/createObjectHooks.tsx +1 -1
- package/src/packages/components/Object/createObjectRender.multiple.tsx +11 -11
- package/src/packages/components/Object/createObjectRender.single.tsx +19 -15
- package/src/packages/components/Object/index.tsx +3 -3
- package/src/packages/components/Object/object.scss +15 -2
- package/src/packages/components/Object/object.utils.ts +5 -3
- package/src/packages/components/Ov/index.tsx +1 -1
- package/src/packages/components/Ov/ov.utils.ts +1 -1
- package/src/packages/components/Ov/usePublicOv.tsx +1 -1
- package/src/packages/components/PageCard/index.tsx +51 -0
- package/src/packages/components/PageCard/page-card.scss +124 -0
- package/src/packages/components/PageCardContent/index.tsx +47 -0
- package/src/packages/components/PageCardTitle/index.tsx +51 -0
- package/src/packages/components/PageRenderList/index.tsx +22 -0
- package/src/packages/components/PageThemeUtils/deepmerge.ts +21 -0
- package/src/packages/components/PageThemeUtils/index.tsx +186 -51
- package/src/packages/components/Pagination/index.tsx +10 -10
- package/src/packages/components/Pagination/pagination.scss +4 -3
- package/src/packages/components/Paragraph/index.tsx +46 -0
- package/src/packages/components/Paragraph/paragraph.scss +12 -0
- package/src/packages/components/ParagraphItem/index.tsx +21 -0
- package/src/packages/components/PlcImage/index.tsx +14 -8
- package/src/packages/components/PlcObject/index.tsx +2 -2
- package/src/packages/components/PlcOv/index.tsx +15 -5
- package/src/packages/components/Popup/PopupProvider.tsx +1 -2
- package/src/packages/components/Popup/index.tsx +14 -4
- package/src/packages/components/ProgressBar/index.tsx +1 -1
- package/src/packages/components/ProgressBar/progress-bar.scss +1 -1
- package/src/packages/components/ProgressBar/progress.utils.ts +2 -2
- package/src/packages/components/ProgressCircle/index.tsx +2 -2
- package/src/packages/components/ProgressMini/index.tsx +2 -2
- package/src/packages/components/Radio/index.tsx +4 -4
- package/src/packages/components/RadioGroup/index.tsx +1 -1
- package/src/packages/components/RadioInner/index.tsx +1 -1
- package/src/packages/components/Rate/index.tsx +3 -3
- package/src/packages/components/Reference/ReferenceProvider.tsx +1 -1
- package/src/packages/components/Reference/index.tsx +1 -1
- package/src/packages/components/RollingNumber/index.tsx +66 -0
- package/src/packages/components/Scroll/HorizontalScrollbar.tsx +4 -4
- package/src/packages/components/Scroll/VerticalScrollbar.tsx +4 -4
- package/src/packages/components/Scroll/index.tsx +52 -13
- package/src/packages/components/Scroll/scroll.scss +4 -2
- package/src/packages/components/Scroll/useAutoScroll.ts +1 -1
- package/src/packages/components/Segment/index.tsx +1 -1
- package/src/packages/components/SegmentGroup/index.tsx +1 -1
- package/src/packages/components/Select/SelectPanel.tsx +5 -2
- package/src/packages/components/Select/createMultipleSelectRender.tsx +16 -12
- package/src/packages/components/Select/createPublicSelectRender.tsx +19 -13
- package/src/packages/components/Select/createSelectOptionDecoder.tsx +1 -1
- package/src/packages/components/Select/createSingleSelectRender.tsx +13 -9
- package/src/packages/components/Select/decodeSelectRenderNode.tsx +6 -4
- package/src/packages/components/Select/index.tsx +13 -1
- package/src/packages/components/Select/select.utils.tsx +6 -5
- package/src/packages/components/SelectDisplay/index.tsx +3 -3
- package/src/packages/components/SelectGroup/index.tsx +37 -0
- package/src/packages/components/SelectOption/index.tsx +2 -2
- package/src/packages/components/Skeleton/index.tsx +44 -0
- package/src/packages/components/Skeleton/skeleton.scss +27 -0
- package/src/packages/components/Slider/index.tsx +3 -3
- package/src/packages/components/Slider/slider.scss +1 -1
- package/src/packages/components/Slider/slider.utils.tsx +1 -1
- package/src/packages/components/Slider/useSlider.range.tsx +13 -10
- package/src/packages/components/Slider/useSlider.single.tsx +8 -9
- package/src/packages/components/Slider/useSliderDotDragier.tsx +4 -4
- package/src/packages/components/SortList/index.tsx +191 -0
- package/src/packages/components/SortList/sort-list.scss +11 -0
- package/src/packages/components/Space/index.tsx +36 -0
- package/src/packages/components/Space/space.scss +39 -0
- package/src/packages/components/StackCard/index.tsx +416 -0
- package/src/packages/components/StackCard/stack-card.scss +40 -0
- package/src/packages/components/StackCardItem/index.tsx +24 -0
- package/src/packages/components/Step/index.tsx +1 -1
- package/src/packages/components/StepGroup/index.tsx +1 -1
- package/src/packages/components/StepGroup/step-group.scss +3 -3
- package/src/packages/components/Tab/index.tsx +1 -1
- package/src/packages/components/TabGroup/TabsHeader.tsx +1 -1
- package/src/packages/components/TabGroup/TabsInner.tsx +1 -1
- package/src/packages/components/TabGroup/header/horizontal/TabsHeaderHorizontal.tsx +3 -3
- package/src/packages/components/TabGroup/header/horizontal/TabsHeaderHorizontalCard.tsx +1 -1
- package/src/packages/components/TabGroup/header/horizontal/TabsHeaderHorizontalShadow.tsx +1 -1
- package/src/packages/components/TabGroup/header/horizontal/TabsHeaderHorizontalText.tsx +2 -2
- package/src/packages/components/TabGroup/header/vertical/TabsHeaderVertical.tsx +1 -1
- package/src/packages/components/TabGroup/index.tsx +1 -1
- package/src/packages/components/TabGroup/tabs.scss +23 -0
- package/src/packages/components/TabGroup/tabs.utils.tsx +1 -1
- package/src/packages/components/Table/editor/PlcAddress.tsx +8 -8
- package/src/packages/components/Table/editor/PlcAddressItem.tsx +1 -1
- package/src/packages/components/Table/editor/PlcCheckbox.tsx +1 -1
- package/src/packages/components/Table/editor/PlcColorPicker.tsx +1 -1
- package/src/packages/components/Table/editor/PlcDate.tsx +1 -1
- package/src/packages/components/Table/editor/PlcDate.utils.tsx +2 -2
- package/src/packages/components/Table/editor/PlcDateRange.tsx +1 -1
- package/src/packages/components/Table/editor/PlcInput.tsx +1 -1
- package/src/packages/components/Table/editor/PlcNumber.tsx +1 -1
- package/src/packages/components/Table/editor/PlcRate.tsx +1 -1
- package/src/packages/components/Table/editor/PlcSelect.tsx +2 -1
- package/src/packages/components/Table/editor/PlcTextarea.tsx +1 -1
- package/src/packages/components/Table/editor/PlcTime.tsx +1 -1
- package/src/packages/components/Table/editor/PlcTime.utils.ts +2 -2
- package/src/packages/components/Table/editor/PlcTimeRange.tsx +1 -1
- package/src/packages/components/Table/editor/PlcToggle.tsx +1 -1
- package/src/packages/components/Table/plc/group/PlcGroup.tsx +1 -1
- package/src/packages/components/Table/plc/plc/Plc.tsx +1 -1
- package/src/packages/components/Table/plc/process/copyPlcList.ts +1 -1
- package/src/packages/components/Table/plc/process/processPlcFixed.ts +1 -1
- package/src/packages/components/Table/plc/process/processPlcSort.ts +1 -1
- package/src/packages/components/Table/plc/use/useBasePlc.tsx +3 -3
- package/src/packages/components/Table/plc/use/useBasePlcGroup.tsx +1 -1
- package/src/packages/components/Table/plc/use/usePlc.tsx +1 -1
- package/src/packages/components/Table/plc/use/usePlcPropsState.tsx +2 -2
- package/src/packages/components/Table/plc/use/useTableAutoSpan.tsx +112 -0
- package/src/packages/components/Table/plc/useTablePlc.tsx +7 -4
- package/src/packages/components/Table/plc/utils/plc.render.ts +1 -1
- package/src/packages/components/Table/plc/utils/plc.scope-slots.ts +1 -1
- package/src/packages/components/Table/plc/utils/plc.utils.ts +9 -6
- package/src/packages/components/Table/standard/PlcCheck/PlcCheck.hooks.tsx +3 -3
- package/src/packages/components/Table/standard/PlcCheck/PlcCheck.multiple.tsx +11 -12
- package/src/packages/components/Table/standard/PlcCheck/PlcCheck.single.tsx +4 -5
- package/src/packages/components/Table/standard/PlcCheck/PlcCheck.tsx +2 -2
- package/src/packages/components/Table/standard/PlcCheck/PlcCheck.utils.ts +3 -3
- package/src/packages/components/Table/standard/PlcDraggier/PlcDraggier.tsx +2 -2
- package/src/packages/components/Table/standard/PlcExclusion.tsx +2 -2
- package/src/packages/components/Table/standard/PlcExpand.tsx +22 -24
- package/src/packages/components/Table/standard/PlcIndex.tsx +2 -2
- package/src/packages/components/Table/standard/PlcOperation/OuterOperation.tsx +8 -6
- package/src/packages/components/Table/standard/PlcOperation/PlcOperation.tsx +17 -11
- package/src/packages/components/Table/standard/PlcOperation/PlcOperation.utils.tsx +6 -4
- package/src/packages/components/Table/standard/PlcOperation/outer-operation.scss +5 -3
- package/src/packages/components/Table/standard/PlcOperation/useOperationPermission.ts +1 -1
- package/src/packages/components/Table/standard/PlcTree/PlcTree.autoWidth.tsx +1 -1
- package/src/packages/components/Table/standard/PlcTree/PlcTree.renderNode.tsx +9 -6
- package/src/packages/components/Table/standard/PlcTree/PlcTree.tsx +4 -4
- package/src/packages/components/Table/standard/PlcTree/PlcTree.utils.ts +2 -2
- package/src/packages/components/Table/standard/PlcTree/PlcTreeHeader.tsx +3 -3
- package/src/packages/components/Table/standard/PlcTree/RenderPlcTreeNode.tsx +8 -6
- package/src/packages/components/Table/table/Table.tsx +25 -13
- package/src/packages/components/Table/table/body/cell.tsx +52 -16
- package/src/packages/components/Table/table/body/row.tsx +2 -2
- package/src/packages/components/Table/table/body/useCellValue.tsx +25 -12
- package/src/packages/components/Table/table/head/head-cell.tsx +8 -2
- package/src/packages/components/Table/table/head/useHeadCellResize.ts +4 -4
- package/src/packages/components/Table/table/node/useTableNode.tsx +2 -2
- package/src/packages/components/Table/table/table.scss +24 -16
- package/src/packages/components/Table/table/use/useFixedShadow.ts +2 -2
- package/src/packages/components/Table/table/use/useTableDraggier.col.tsx +6 -6
- package/src/packages/components/Table/table/use/useTableDraggier.row.tsx +26 -14
- package/src/packages/components/Table/table/use/useTableDraggier.tsx +3 -3
- package/src/packages/components/Table/table/use/useTableFormEditor.tsx +49 -39
- package/src/packages/components/Table/table/use/useTableLoading.tsx +2 -2
- package/src/packages/components/Table/table/use/useTableMethods.tsx +2 -2
- package/src/packages/components/Table/table/use/useTableModifyEditor.tsx +19 -13
- package/src/packages/components/Table/table/use/useTableScroll.tsx +1 -1
- package/src/packages/components/Table/table/utils/createTableHooks.ts +11 -7
- package/src/packages/components/Table/table/utils/table.utils.ts +13 -5
- package/src/packages/components/Tag/index.tsx +8 -3
- package/src/packages/components/Tag/tag.scss +10 -1
- package/src/packages/components/ThemeColor/index.tsx +22 -0
- package/src/packages/components/ThemeColor/theme-color.scss +36 -0
- package/src/packages/components/ThemeColorSelector/index.tsx +53 -0
- package/src/packages/components/ThemeDarkSelector/index.tsx +37 -0
- package/src/packages/components/ThemeEditor/index.tsx +199 -0
- package/src/packages/components/ThemeEditor/theme-editor.scss +106 -0
- package/src/packages/components/ThemeLocaleSelector/index.tsx +41 -0
- package/src/packages/components/ThemeShapeSelector/index.tsx +55 -0
- package/src/packages/components/ThemeSizeSelector/index.tsx +50 -0
- package/src/packages/components/TimePicker/createRangeTimeRender.tsx +14 -6
- package/src/packages/components/TimePicker/createSeparateRangeTimeRender.tsx +14 -6
- package/src/packages/components/TimePicker/createSingleTimeRender.tsx +8 -8
- package/src/packages/components/TimePicker/index.tsx +2 -2
- package/src/packages/components/TimePicker/panel/TimeBaseColumn.tsx +4 -4
- package/src/packages/components/TimePicker/panel/TimeBasePanel.tsx +1 -1
- package/src/packages/components/TimePicker/panel/TimePanel.tsx +2 -2
- package/src/packages/components/TimePicker/panel/TimeRangePanel.tsx +1 -1
- package/src/packages/components/TimePicker/panel/time-panel.utils.ts +1 -1
- package/src/packages/components/TimePicker/time.utils.ts +3 -2
- package/src/packages/components/TimePicker/useRangeTimeRender.tsx +10 -9
- package/src/packages/components/TimePicker/useTimeHooks.ts +1 -1
- package/src/packages/components/Toggle/index.tsx +10 -6
- package/src/packages/components/Toggle/toggle.scss +102 -98
- package/src/packages/components/Tooltip/index.tsx +2 -2
- package/src/packages/components/Transition/index.tsx +2 -1
- package/src/packages/components/Tree/RenderTreeNode.tsx +10 -6
- package/src/packages/components/Tree/index.tsx +6 -5
- package/src/packages/components/Tree/tree.scss +8 -1
- package/src/packages/components/TreeCore/TreeCore.type.tsx +3 -1
- package/src/packages/components/TreeCore/createTreeCore.tsx +3 -3
- package/src/packages/components/TreeCore/createTreeDraggier.tsx +9 -9
- package/src/packages/components/TreeCore/createTreeHooks.ts +1 -1
- package/src/packages/components/TreeCore/createTreeMethods.tsx +3 -2
- package/src/packages/components/TreeCore/createTreeNode.tsx +11 -6
- package/src/packages/components/TreeCore/createTreeProps.ts +4 -3
- package/src/packages/components/TreeCore/createTreeUtils.ts +2 -2
- package/src/packages/components/TreeNodeWithMenu/index.tsx +6 -2
- package/src/packages/components/TreeNodeWithMenu/treeNodeWithMenu.utils.ts +1 -1
- package/src/packages/components/Triangle/index.tsx +2 -2
- package/src/packages/components/Upload/index.tsx +18 -18
- package/src/packages/components/VirtualList/createVirtualDraggier.ts +375 -0
- package/src/packages/components/VirtualList/index.tsx +56 -10
- package/src/packages/components/VirtualList/useVirtualList.tsx +241 -117
- package/src/packages/components/VirtualList/virtual-list.scss +41 -18
- package/src/packages/components/VirtualTable/index.tsx +37 -18
- package/src/packages/components/VirtualTable/virtual-table.scss +5 -6
- package/src/packages/components/createAutoScrollManager/index.tsx +41 -0
- package/src/packages/components/createHttp/index.tsx +4 -1
- package/src/packages/components/createPlainAddressService/index.tsx +14 -8
- package/src/packages/components/createRequestInterceptor/index.ts +139 -0
- package/src/packages/components/createScrollDraggier/index.ts +341 -0
- package/src/packages/components/createScrollUtils/index.tsx +1 -1
- package/src/packages/components/createSimpleDate/index.ts +49 -0
- package/src/packages/components/createTransitionHandler/index.ts +46 -0
- package/src/packages/components/createVirtualDraggier/index.ts +5 -0
- package/src/packages/components/createWebDraggier/index.ts +5 -0
- package/src/packages/components/loadFile/index.ts +20 -0
- package/src/packages/components/useAutoScrollUtils/index.tsx +4 -4
- package/src/packages/components/useContextmenuOptions/index.tsx +40 -0
- package/src/packages/components/useDialog/DialogService.tsx +29 -17
- package/src/packages/components/useDialog/dialog.service.utils.tsx +5 -5
- package/src/packages/components/useDialog/index.tsx +4 -4
- package/src/packages/components/useImage/ImageService.tsx +39 -16
- package/src/packages/components/useLoading/LoadingService.tsx +106 -0
- package/src/packages/components/useLoading/index.tsx +31 -0
- package/src/packages/components/useLoading/loading.service.scss +25 -0
- package/src/packages/components/useLoading/loading.service.utils.tsx +13 -0
- package/src/packages/components/useMessage/Message.tsx +4 -2
- package/src/packages/components/useMessage/MessageContainer.tsx +1 -1
- package/src/packages/components/useMessage/MessageManager.tsx +1 -1
- package/src/packages/components/useMessage/index.tsx +1 -1
- package/src/packages/components/useMessage/message.scss +3 -3
- package/src/packages/components/useMessage/message.service.utils.tsx +4 -4
- package/src/packages/components/useNotice/Notice.tsx +4 -2
- package/src/packages/components/useNotice/NoticeContainer.tsx +1 -1
- package/src/packages/components/useNotice/NoticeManager.tsx +1 -1
- package/src/packages/components/useNotice/index.tsx +2 -2
- package/src/packages/components/useNotice/noitice.service.utils.tsx +4 -4
- package/src/packages/components/useNotice/notice.scss +3 -3
- package/src/packages/components/usePageRender/index.tsx +3 -0
- package/src/packages/components/usePageRenderContext/index.tsx +8 -0
- package/src/packages/components/usePopup/PopupItem.tsx +65 -36
- package/src/packages/components/usePopup/popup-item.scss +34 -3
- package/src/packages/components/usePopup/refresh/MaxMinTopLeft.ts +38 -0
- package/src/packages/components/usePopup/refresh/calcPosition.ts +7 -4
- package/src/packages/components/usePopup/refresh/refreshArrow.ts +1 -1
- package/src/packages/components/usePopup/refresh/refreshPopup.ts +3 -1
- package/src/packages/components/usePopup/trigger/useManagerTrigger.clickOutside.tsx +21 -26
- package/src/packages/components/usePopup/trigger/usePopupTrigger.tsx +2 -2
- package/src/packages/components/usePopup/trigger/useReferenceTrigger.tsx +52 -46
- package/src/packages/components/usePopup/usePopup.tsx +24 -8
- package/src/packages/components/usePopup/usePopupManager.tsx +16 -4
- package/src/packages/components/usePopup/utils/createPopupManagerHooks.tsx +1 -1
- package/src/packages/components/usePopup/utils/ids2map.ts +1 -1
- package/src/packages/components/usePopup/utils/popup.utils.ts +10 -6
- package/src/packages/components/usePopupEditor/index.tsx +6 -9
- package/src/packages/components/usePopupEditor/popup-editor.utils.ts +1 -1
- package/src/packages/components/useTableFilter/index.ts +73 -0
- package/src/packages/components/useTooltip/index.tsx +19 -9
- package/src/packages/directives/ClickWave/index.tsx +2 -2
- package/src/packages/directives/ResizeDetector/index.tsx +12 -5
- package/src/packages/entry.tsx +326 -200
- package/src/packages/i18n/i18n.utils.ts +235 -111
- package/src/packages/i18n/index.ts +4 -3
- package/src/packages/i18n/lang/en-us.ts +280 -185
- package/src/packages/i18n/lang/zh-cn.ts +96 -1
- package/src/packages/styles/application/application.public.scss +7 -0
- package/src/packages/styles/global.import.scss +62 -1
- package/src/packages/uses/createInputPopperAttrs.ts +10 -3
- package/src/packages/uses/useCollapseStyles.tsx +56 -0
- package/src/packages/uses/useDragHorizontalScroll.ts +81 -0
- package/src/packages/uses/useEdit.ts +44 -13
- package/src/packages/uses/useFocusHandler.ts +26 -13
- package/src/packages/uses/useFunctionWrapper.ts +3 -1
- package/src/packages/uses/useMultipleModel.tsx +6 -4
- package/src/packages/uses/useRenderReference.tsx +1 -1
- package/src/packages/uses/useStyle.tsx +21 -7
- package/src/packages/utils/ClientZoom.ts +1 -1
- package/src/packages/utils/ComponentUtils.ts +10 -0
- package/src/packages/utils/FixInput.ts +1 -1
- package/src/packages/utils/InnerTransition.ts +2 -2
- package/src/packages/utils/LoadingText.ts +1 -1
- package/src/packages/utils/OpenController.ts +1 -1
- package/src/packages/utils/buildCycleIndexList.ts +31 -0
- package/src/packages/utils/constant.tsx +1 -1
- package/src/packages/utils/createDraggier.ts +256 -0
- package/src/packages/utils/createFlagManager.ts +1 -1
- package/src/packages/utils/createListUtils.ts +38 -0
- package/src/packages/utils/findReactElement.tsx +3 -3
- package/src/packages/utils/getDeviceInfo.ts +45 -45
- package/src/packages/utils/getRowEl.ts +2 -2
- package/src/packages/utils/incrementalMerge.ts +1 -1
- package/src/packages/utils/inheritSlots.ts +30 -0
- package/src/packages/utils/installAllIcons.ts +20 -19
- package/src/packages/utils/installAllLazyIcons.ts +1 -1
- package/src/packages/utils/isObjectCommonMatch.ts +1 -1
- package/src/packages/utils/onParentElementsScroll.tsx +2 -2
- package/src/packages/utils/plainDate.ts +7 -3
- package/src/packages/utils/renderInputModeTextRangeValue.tsx +25 -0
- package/src/packages/utils/useMove.tsx +3 -3
- package/src/packages/utils/watchEffectAutoClear.ts +19 -7
- package/src/packages/components/CarouselGroup/carousel.scss +0 -143
- package/src/packages/components/CarouselGroup/index.tsx +0 -274
- package/src/packages/components/KeyboardService/index.ts +0 -214
- package/src/packages/components/createProvider/index.ts +0 -5
- package/src/packages/utils/createProvider.tsx +0 -35
- package/src/packages/utils/doNothing.ts +0 -3
- package/src/packages/utils/findParentElement.ts +0 -12
- package/src/packages/utils/formatServiceOptions.ts +0 -7
- package/src/packages/utils/getElement.ts +0 -17
- package/src/packages/utils/getElementParents.ts +0 -9
- package/src/packages/utils/getScrollParent.ts +0 -11
- package/src/packages/utils/iterate.ts +0 -53
- package/src/packages/utils/omit.ts +0 -6
- package/src/packages/utils/pick.ts +0 -11
- package/src/packages/utils/runOnce.tsx +0 -14
- package/src/pages/data/address.json +0 -39317
- package/src/pages/data/data-1.json +0 -754
- package/src/pages/data/data-2.json +0 -3006
- package/src/pages/data/data-200.json +0 -5206
- package/src/pages/data/data-2000.json +0 -51954
- package/src/pages/data/data-50.json +0 -2075
- package/src/pages/data/data.json +0 -30002
- package/src/pages/data/demo.json +0 -1702
- package/src/pages/data/mock.database.js +0 -43
- package/src/pages/data/mock.js +0 -141
- package/src/pages/data/tree.data.json +0 -87
- package/src/pages/env/config/local.js +0 -3
- package/src/pages/env/config/prod.js +0 -3
- package/src/pages/env/config/undefined.js +0 -1
- package/src/pages/env/env.d.ts +0 -4
- package/src/pages/env/index.ts +0 -1
- package/src/pages/history/createHistory.ts +0 -94
- package/src/pages/history/history.utils.ts +0 -64
- package/src/pages/index/App.tsx +0 -17
- package/src/pages/index/Demo/DemoLine.tsx +0 -23
- package/src/pages/index/Demo/DemoRow.scss +0 -128
- package/src/pages/index/Demo/DemoRow.tsx +0 -71
- package/src/pages/index/Demo/DemoRow.utils.ts +0 -23
- package/src/pages/index/Demo/DemoRowController.tsx +0 -45
- package/src/pages/index/Demo/index.ts +0 -8
- package/src/pages/index/app.scss +0 -197
- package/src/pages/index/components/AutoTable/AutoHeightAutoRow.tsx +0 -51
- package/src/pages/index/components/AutoTable/AutoHeightFixedRow.tsx +0 -50
- package/src/pages/index/components/AutoTable/AutoTableBasicUsage.tsx +0 -75
- package/src/pages/index/components/AutoTable/AutoTableCascade.tsx +0 -99
- package/src/pages/index/components/AutoTable/AutoTableDefaultSearch.tsx +0 -73
- package/src/pages/index/components/AutoTable/AutoTableFiles.tsx +0 -26
- package/src/pages/index/components/AutoTable/AutoTableFill.tsx +0 -51
- package/src/pages/index/components/AutoTable/AutoTableGroupUsage.tsx +0 -71
- package/src/pages/index/components/AutoTable/AutoTableObjectPicker.tsx +0 -181
- package/src/pages/index/components/AutoTable/AutoTableOvList.tsx +0 -80
- package/src/pages/index/components/AutoTable/AutoTableProductList.tsx +0 -98
- package/src/pages/index/components/AutoTable/AutoTableRowFormatter.tsx +0 -58
- package/src/pages/index/components/AutoTable/FixedHeightAutoRow.tsx +0 -50
- package/src/pages/index/components/AutoTable/FixedHeightFixedRow.tsx +0 -49
- package/src/pages/index/components/bus/DemoAddress.tsx +0 -181
- package/src/pages/index/components/bus/DemoAddressCascade.tsx +0 -132
- package/src/pages/index/components/bus/DemoFilter.tsx +0 -184
- package/src/pages/index/components/columns/DemoPlcAddress.tsx +0 -161
- package/src/pages/index/components/columns/DemoPlcDate.tsx +0 -363
- package/src/pages/index/components/columns/DemoPlcSelect.tsx +0 -505
- package/src/pages/index/components/columns/DemoPlcTime.tsx +0 -293
- package/src/pages/index/components/columns/DemoTableColumns.tsx +0 -88
- package/src/pages/index/components/form/DemoFormBasic.tsx +0 -516
- package/src/pages/index/components/form/DemoFormBlur.tsx +0 -204
- package/src/pages/index/components/form/DemoFormDynamicFields.tsx +0 -54
- package/src/pages/index/components/form/DemoFormEditControl.tsx +0 -164
- package/src/pages/index/components/form/DemoFormElement.tsx +0 -207
- package/src/pages/index/components/form/DemoFormLayout.scss +0 -7
- package/src/pages/index/components/form/DemoFormLayout.tsx +0 -311
- package/src/pages/index/components/form/DemoFormSimplify.tsx +0 -587
- package/src/pages/index/components/form/DemoFormSize.tsx +0 -274
- package/src/pages/index/components/form/DemoFormVertical.tsx +0 -280
- package/src/pages/index/components/normal/DemoAlert.tsx +0 -66
- package/src/pages/index/components/normal/DemoBadge.tsx +0 -53
- package/src/pages/index/components/normal/DemoButton.tsx +0 -300
- package/src/pages/index/components/normal/DemoCard.tsx +0 -176
- package/src/pages/index/components/normal/DemoCarousel.tsx +0 -125
- package/src/pages/index/components/normal/DemoCascade.tsx +0 -880
- package/src/pages/index/components/normal/DemoCheckbox.scss +0 -24
- package/src/pages/index/components/normal/DemoCheckbox.tsx +0 -294
- package/src/pages/index/components/normal/DemoCollapse.tsx +0 -104
- package/src/pages/index/components/normal/DemoColor.scss +0 -20
- package/src/pages/index/components/normal/DemoColor.tsx +0 -82
- package/src/pages/index/components/normal/DemoColorPicker.tsx +0 -163
- package/src/pages/index/components/normal/DemoDate.tsx +0 -443
- package/src/pages/index/components/normal/DemoDialog.tsx +0 -507
- package/src/pages/index/components/normal/DemoDropdown.tsx +0 -463
- package/src/pages/index/components/normal/DemoGrid.scss +0 -26
- package/src/pages/index/components/normal/DemoGrid.tsx +0 -181
- package/src/pages/index/components/normal/DemoIcon.tsx +0 -39
- package/src/pages/index/components/normal/DemoImage.tsx +0 -122
- package/src/pages/index/components/normal/DemoInput.scss +0 -0
- package/src/pages/index/components/normal/DemoInput.tsx +0 -790
- package/src/pages/index/components/normal/DemoKeepAlive.tsx +0 -505
- package/src/pages/index/components/normal/DemoLayout.tsx +0 -144
- package/src/pages/index/components/normal/DemoList.scss +0 -15
- package/src/pages/index/components/normal/DemoList.tsx +0 -82
- package/src/pages/index/components/normal/DemoLoading.tsx +0 -86
- package/src/pages/index/components/normal/DemoNumber.tsx +0 -266
- package/src/pages/index/components/normal/DemoPagination.tsx +0 -164
- package/src/pages/index/components/normal/DemoPopup.tsx +0 -695
- package/src/pages/index/components/normal/DemoProgress.tsx +0 -133
- package/src/pages/index/components/normal/DemoRadio.scss +0 -16
- package/src/pages/index/components/normal/DemoRadio.tsx +0 -188
- package/src/pages/index/components/normal/DemoRate.tsx +0 -77
- package/src/pages/index/components/normal/DemoScroll.scss +0 -22
- package/src/pages/index/components/normal/DemoScroll.tsx +0 -300
- package/src/pages/index/components/normal/DemoSegment.tsx +0 -71
- package/src/pages/index/components/normal/DemoSelect.tsx +0 -819
- package/src/pages/index/components/normal/DemoSlider.tsx +0 -128
- package/src/pages/index/components/normal/DemoStep.scss +0 -18
- package/src/pages/index/components/normal/DemoStep.tsx +0 -291
- package/src/pages/index/components/normal/DemoTab.tsx +0 -338
- package/src/pages/index/components/normal/DemoTag.tsx +0 -100
- package/src/pages/index/components/normal/DemoTime.tsx +0 -403
- package/src/pages/index/components/normal/DemoToggle.tsx +0 -56
- package/src/pages/index/components/normal/DemoTooltip.tsx +0 -120
- package/src/pages/index/components/normal/DemoTree.tsx +0 -1183
- package/src/pages/index/components/normal/DemoUpload.tsx +0 -484
- package/src/pages/index/components/normal/DemoVirtualList.tsx +0 -378
- package/src/pages/index/components/service/DemoDialogService.tsx +0 -248
- package/src/pages/index/components/service/DemoFileService.tsx +0 -110
- package/src/pages/index/components/service/DemoMessageService.tsx +0 -100
- package/src/pages/index/components/service/DemoNoticeService.tsx +0 -99
- package/src/pages/index/components/service/DemoPopupService.tsx +0 -325
- package/src/pages/index/components/table/DemoPlcOperation.tsx +0 -307
- package/src/pages/index/components/table/DemoTableBasic.tsx +0 -220
- package/src/pages/index/components/table/DemoTableCheck.tsx +0 -78
- package/src/pages/index/components/table/DemoTableClassAndStyle.scss +0 -18
- package/src/pages/index/components/table/DemoTableClassAndStyle.tsx +0 -112
- package/src/pages/index/components/table/DemoTableColDraggable.tsx +0 -80
- package/src/pages/index/components/table/DemoTableEdit.tsx +0 -136
- package/src/pages/index/components/table/DemoTableExpand.tsx +0 -181
- package/src/pages/index/components/table/DemoTableFixed.tsx +0 -131
- package/src/pages/index/components/table/DemoTableFormatter.tsx +0 -66
- package/src/pages/index/components/table/DemoTableOverflowTooltip.tsx +0 -67
- package/src/pages/index/components/table/DemoTableRowDraggable.tsx +0 -106
- package/src/pages/index/components/table/DemoTableSlots.tsx +0 -153
- package/src/pages/index/components/table/DemoTableSpan.tsx +0 -167
- package/src/pages/index/components/table/DemoTableTree.tsx +0 -976
- package/src/pages/index/components/table/DemoVirtualTable.tsx +0 -274
- package/src/pages/index/components/test/DemoI18n.tsx +0 -27
- package/src/pages/index/components/test/DemoI18n2.jsx +0 -11
- package/src/pages/index/home/AppContent.tsx +0 -69
- package/src/pages/index/home/AppHead.tsx +0 -105
- package/src/pages/index/home/AppHome.tsx +0 -16
- package/src/pages/index/home/AppMenu.tsx +0 -38
- package/src/pages/index/home/menus.tsx +0 -218
- package/src/pages/index/home/plain-design.png +0 -0
- package/src/pages/index/main.tsx +0 -23
- package/src/pages/index/nav/$nav.ts +0 -41
- package/src/pages/index/pages.d.ts +0 -6
- package/src/pages/libs/iconfont-fontcls/demo.css +0 -539
- package/src/pages/libs/iconfont-fontcls/demo_index.html +0 -303
- package/src/pages/libs/iconfont-fontcls/iconfont.css +0 -35
- package/src/pages/libs/iconfont-fontcls/iconfont.js +0 -1
- package/src/pages/libs/iconfont-fontcls/iconfont.json +0 -44
- package/src/pages/libs/iconfont-fontcls/iconfont.ttf +0 -0
- package/src/pages/libs/iconfont-fontcls/iconfont.woff +0 -0
- package/src/pages/libs/iconfont-fontcls/iconfont.woff2 +0 -0
- package/src/pages/libs/iconfont-symbol/demo.css +0 -539
- package/src/pages/libs/iconfont-symbol/demo_index.html +0 -303
- package/src/pages/libs/iconfont-symbol/iconfont.css +0 -35
- package/src/pages/libs/iconfont-symbol/iconfont.js +0 -1
- package/src/pages/libs/iconfont-symbol/iconfont.json +0 -44
- package/src/pages/libs/iconfont-symbol/iconfont.ttf +0 -0
- package/src/pages/libs/iconfont-symbol/iconfont.woff +0 -0
- package/src/pages/libs/iconfont-symbol/iconfont.woff2 +0 -0
- package/src/pages/libs/install.iconfont-fontcls.tsx +0 -11
- package/src/pages/libs/install.iconfont-symbol.scss +0 -7
- package/src/pages/libs/install.iconfont-symbol.tsx +0 -14
- package/src/pages/module/address.ts +0 -27
- package/src/pages/module/http.ts +0 -24
- package/src/pages/module/index.ts +0 -19
- package/src/pages/module/object.ts +0 -5
- package/src/pages/module/ov.tsx +0 -13
- package/src/pages/module/upload.ts +0 -9
- package/src/pages/module/useTableOption.ts +0 -28
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {computed, designComponent, iHTMLElement, iMouseEvent, onBeforeUnmount, PropType, useClassCache, useRefs, useStyleCache} from "
|
|
1
|
+
import {computed, designComponent, iHTMLElement, iMouseEvent, onBeforeUnmount, PropType, useClassCache, useRefs, useStyleCache} from "@peryl/react-compose";
|
|
2
2
|
import {tPlc} from "../../plc/utils/plc.utils";
|
|
3
3
|
import {iTableNode} from "../utils/table.utils";
|
|
4
4
|
import {eFormValidateTrigger} from "../../../Form/validate/validate.utils";
|
|
@@ -8,8 +8,9 @@ import {Table} from "../Table";
|
|
|
8
8
|
import {iFormValidator} from "../../../Form/validate/createValidation";
|
|
9
9
|
import {useCellValue} from "./useCellValue";
|
|
10
10
|
import {createTooltip} from "../../../useTooltip";
|
|
11
|
-
import {createEffects} from "
|
|
11
|
+
import {createEffects} from "@peryl/utils/createEffects";
|
|
12
12
|
import {usePopup} from "../../../usePopup";
|
|
13
|
+
import {injectTableAutoSpan} from "../../plc/use/useTableAutoSpan";
|
|
13
14
|
|
|
14
15
|
export const PltCell = designComponent({
|
|
15
16
|
name: 'plt-cell',
|
|
@@ -23,6 +24,9 @@ export const PltCell = designComponent({
|
|
|
23
24
|
const { refs, onRef } = useRefs({ el: iHTMLElement });
|
|
24
25
|
|
|
25
26
|
const popup = usePopup();
|
|
27
|
+
|
|
28
|
+
const tableAutoSpan = injectTableAutoSpan();
|
|
29
|
+
|
|
26
30
|
/**
|
|
27
31
|
* 单元格校验
|
|
28
32
|
* @author 韦胜健
|
|
@@ -51,6 +55,11 @@ export const PltCell = designComponent({
|
|
|
51
55
|
props.table.hooks.onDblclickCell.exec({ e, node: props.node, plc: props.plc });
|
|
52
56
|
};
|
|
53
57
|
|
|
58
|
+
const onContextmenu = (e: iMouseEvent) => {
|
|
59
|
+
// if (bodyCell.value().editable) {return;}
|
|
60
|
+
props.table.hooks.onContextmenuCell.exec({ e, node: props.node, plc: props.plc });
|
|
61
|
+
};
|
|
62
|
+
|
|
54
63
|
/**
|
|
55
64
|
* 鼠标进入单元格
|
|
56
65
|
* @author 韦胜健
|
|
@@ -70,7 +79,9 @@ export const PltCell = designComponent({
|
|
|
70
79
|
* @author 韦胜健
|
|
71
80
|
* @date 2022/12/5 20:35
|
|
72
81
|
*/
|
|
73
|
-
const {
|
|
82
|
+
const { effects: cellValueEffects } = createEffects();
|
|
83
|
+
onBeforeUnmount(() => cellValueEffects.clear());
|
|
84
|
+
const { bodyCell } = useCellValue({ optionGetter: () => ({ node: props.node, plc: props.plc }), formEdit: false, effects: cellValueEffects });
|
|
74
85
|
|
|
75
86
|
/**
|
|
76
87
|
* 单元格样式类名
|
|
@@ -127,24 +138,29 @@ export const PltCell = designComponent({
|
|
|
127
138
|
* @author 韦胜健
|
|
128
139
|
* @date 2023.1.20 14:00
|
|
129
140
|
*/
|
|
141
|
+
const emptyOverflowTooltipOption = { reference: null, message: null, };
|
|
130
142
|
const overflowTooltip = createTooltip({
|
|
131
143
|
overflow: true,
|
|
132
144
|
/*当没有message时注销监听鼠标事件*/
|
|
133
145
|
ignoreEmptyMessage: false,
|
|
134
146
|
tooltip: () => {
|
|
135
147
|
const bodyCell = getBodyCell();
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
/*
|
|
149
|
+
* 没有开启overflowTooltip
|
|
150
|
+
* 或者没有初始化getBodyCell
|
|
151
|
+
* 或者没有bodyCell
|
|
152
|
+
* 或者当前处于编辑状态
|
|
153
|
+
*
|
|
154
|
+
* 则不显示overflowTooltip
|
|
155
|
+
*/
|
|
156
|
+
if (!props.plc.props.overflowTooltip || !bodyCell || bodyCell.editable) {
|
|
157
|
+
return emptyOverflowTooltipOption;
|
|
158
|
+
} else {
|
|
159
|
+
return {
|
|
160
|
+
reference: !props.plc.props.overflowTooltip || !bodyCell || bodyCell.editable ? null : refs.el,
|
|
161
|
+
message: bodyCell?.body,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
148
164
|
},
|
|
149
165
|
}, popup);
|
|
150
166
|
effects.push(overflowTooltip.clear);
|
|
@@ -177,14 +193,32 @@ export const PltCell = designComponent({
|
|
|
177
193
|
return { update };
|
|
178
194
|
})();
|
|
179
195
|
|
|
196
|
+
/*每次渲染都记录上一次的span,某次渲染在offsetData中找不到自己的offsetIndex时,就用上一次的span*/
|
|
197
|
+
let prevSpan = { rowspan: 1, colspan: 1 };
|
|
198
|
+
|
|
180
199
|
return {
|
|
181
200
|
render: () => {
|
|
182
201
|
const { node, plc } = props;
|
|
183
202
|
const { body, editable } = bodyCell.value();
|
|
184
|
-
|
|
203
|
+
let span = !!props.table.props.spanMethod ? props.table.props.spanMethod({ node, plc }) : { rowspan: 1, colspan: 1 };
|
|
185
204
|
if (plc.props.editColSpan != null && node.state.edit) {
|
|
186
205
|
span.colspan = typeof plc.props.editColSpan === "function" ? plc.props.editColSpan(node) : plc.props.editColSpan;
|
|
187
206
|
}
|
|
207
|
+
if (!!tableAutoSpan.value && (plc.props.autoRowSpan || plc.props.autoColSpan)) {
|
|
208
|
+
const { spans, data: offsetData } = tableAutoSpan.value;
|
|
209
|
+
/*要用offsetIndex,而不是props.node.state.index,这个是行数据在所有数据中的真实索引,而不是在虚拟列表数据中的索引*/
|
|
210
|
+
/*计算的spans仅含有虚拟数据的合并结果*/
|
|
211
|
+
const offsetIndex = offsetData.indexOf(props.node.data);
|
|
212
|
+
if (offsetIndex > -1) {
|
|
213
|
+
const rowSpan = !plc.props.field ? null : spans[offsetIndex].row?.[plc.props.field];
|
|
214
|
+
if (rowSpan != null) {span.rowspan = rowSpan;}
|
|
215
|
+
const colSpan = !plc.props.field ? null : spans[offsetIndex].col?.[plc.props.field];
|
|
216
|
+
if (colSpan != null) {span.colspan = colSpan;}
|
|
217
|
+
} else {
|
|
218
|
+
span = prevSpan;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
prevSpan = span;
|
|
188
222
|
if (span.rowspan === 0 || span.colspan === 0) {
|
|
189
223
|
/*rowspan为0时,不会正确合并单元格,如果要合并单元格则不渲染这个td*/
|
|
190
224
|
return null;
|
|
@@ -196,6 +230,7 @@ export const PltCell = designComponent({
|
|
|
196
230
|
// console.log('cell', props.plc.props.title);
|
|
197
231
|
return (
|
|
198
232
|
<td
|
|
233
|
+
data-span={String(span.rowspan != 1 || span.colspan != 1)}
|
|
199
234
|
ref={onRef.el}
|
|
200
235
|
rowSpan={span.rowspan}
|
|
201
236
|
colSpan={span.colspan}
|
|
@@ -203,6 +238,7 @@ export const PltCell = designComponent({
|
|
|
203
238
|
style={styles.value}
|
|
204
239
|
onClick={onClick}
|
|
205
240
|
onDoubleClick={onDblclick}
|
|
241
|
+
onContextMenu={onContextmenu}
|
|
206
242
|
onMouseEnter={onEnter}
|
|
207
243
|
onMouseLeave={onLeave}
|
|
208
244
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {PltCell} from "./cell";
|
|
2
|
-
import {designComponent, iMouseEvent, PropType, useClasses} from "
|
|
2
|
+
import {designComponent, iMouseEvent, PropType, useClasses} from "@peryl/react-compose";
|
|
3
3
|
import {Table} from "../Table";
|
|
4
4
|
import {iTableNode} from "../utils/table.utils";
|
|
5
5
|
|
|
@@ -34,7 +34,7 @@ export const PltRow = designComponent({
|
|
|
34
34
|
render: () => {
|
|
35
35
|
return props.table.hooks.onRenderRow.exec({
|
|
36
36
|
content: (
|
|
37
|
-
<tr className={classes.value} style={{ height: `${props.table.numberState.bodyRowHeight}px` }} data-vid={props.vid} {...handler}>
|
|
37
|
+
<tr className={classes.value} style={{ height: `${props.table.numberState.bodyRowHeight}px` }} data-vid={props.vid} data-idx={String(props.node.state.index == null ? "" : props.node.state.index)} {...handler}>
|
|
38
38
|
{(props.table.bodyPlcList.value?.map((plc) => <PltCell key={plc.plcKey} table={props.table} node={props.node} plc={plc}/>))}
|
|
39
39
|
</tr>
|
|
40
40
|
),
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {iTableNode} from "../utils/table.utils";
|
|
2
2
|
import {tPlc} from "../../plc/utils/plc.utils";
|
|
3
|
-
import {
|
|
4
|
-
import {PlainObject} from "
|
|
3
|
+
import {globalComputed, reactive, toRaw} from "@peryl/react-compose";
|
|
4
|
+
import {PlainObject} from "@peryl/utils/event";
|
|
5
5
|
import {LoadingText} from "../../../../utils/LoadingText";
|
|
6
6
|
import {AsyncFormatter} from "../../../AsyncFormatter";
|
|
7
7
|
import {Formatter} from "../../../Formatter";
|
|
8
8
|
import {renderBodyCell} from "../../plc/utils/plc.render";
|
|
9
|
+
import {iEffects} from "@peryl/utils/createEffects";
|
|
10
|
+
import {delay} from "@peryl/utils/delay";
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* 计算cell渲染所需要的内容
|
|
@@ -16,9 +18,11 @@ export function useCellValue(
|
|
|
16
18
|
{
|
|
17
19
|
optionGetter,
|
|
18
20
|
formEdit,
|
|
21
|
+
effects,
|
|
19
22
|
}: {
|
|
20
23
|
optionGetter: () => { node: iTableNode, plc: tPlc },
|
|
21
24
|
formEdit: boolean,
|
|
25
|
+
effects: iEffects,
|
|
22
26
|
}
|
|
23
27
|
) {
|
|
24
28
|
/**
|
|
@@ -26,20 +30,22 @@ export function useCellValue(
|
|
|
26
30
|
* @author 韦胜健
|
|
27
31
|
* @date 2022.12.3 10:50
|
|
28
32
|
*/
|
|
29
|
-
const row =
|
|
33
|
+
const row = globalComputed(() => {
|
|
30
34
|
const { node } = optionGetter();
|
|
31
35
|
return node.state.edit ? node.state.editRow : node.data;
|
|
32
36
|
});
|
|
37
|
+
effects.push(() => row.effect.stop());
|
|
33
38
|
|
|
34
39
|
/**
|
|
35
40
|
* 当前单元格的目标数据
|
|
36
41
|
* @author 韦胜健
|
|
37
42
|
* @date 2022.12.3 10:50
|
|
38
43
|
*/
|
|
39
|
-
const sourceValue =
|
|
44
|
+
const sourceValue = globalComputed(() => {
|
|
40
45
|
const { plc } = optionGetter();
|
|
41
46
|
return !!plc.props.field ? row.value[plc.props.field] : null;
|
|
42
47
|
});
|
|
48
|
+
effects.push(() => sourceValue.effect.stop());
|
|
43
49
|
|
|
44
50
|
/**
|
|
45
51
|
* 异步格式化的状态
|
|
@@ -58,8 +64,9 @@ export function useCellValue(
|
|
|
58
64
|
loading: boolean,
|
|
59
65
|
}
|
|
60
66
|
});
|
|
67
|
+
effects.push(() => delay().then(() => {asyncState.asyncValue = null;}));
|
|
61
68
|
|
|
62
|
-
const targetValue =
|
|
69
|
+
const targetValue = globalComputed(() => {
|
|
63
70
|
const { plc, node } = optionGetter();
|
|
64
71
|
const { formatter, asyncFormatter, formatterOptions } = plc.props;
|
|
65
72
|
const cellRenderScope = { plc: plc, node: node, row: row.value };
|
|
@@ -84,13 +91,17 @@ export function useCellValue(
|
|
|
84
91
|
};
|
|
85
92
|
(async () => {
|
|
86
93
|
try {
|
|
94
|
+
const sv = sourceValue.value;
|
|
95
|
+
const sr = row.value;
|
|
87
96
|
const value = await asyncFormatterFunction(sourceValue.value, { ...cellRenderScope, ...formatterOptions });
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
if (sv === sourceValue.value && sr === row.value) {
|
|
98
|
+
asyncState.asyncValue = {
|
|
99
|
+
sourceValue: sourceValue.value,
|
|
100
|
+
row: row.value,
|
|
101
|
+
targetValue: value,
|
|
102
|
+
loading: false,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
94
105
|
} catch (e) {
|
|
95
106
|
/*异步格式化失败*/
|
|
96
107
|
console.error(e);
|
|
@@ -121,12 +132,14 @@ export function useCellValue(
|
|
|
121
132
|
return sourceValue.value;
|
|
122
133
|
}
|
|
123
134
|
});
|
|
135
|
+
effects.push(() => targetValue.effect.stop());
|
|
124
136
|
|
|
125
|
-
const bodyCell =
|
|
137
|
+
const bodyCell = globalComputed(() => {
|
|
126
138
|
const { node, plc } = optionGetter();
|
|
127
139
|
const bc = renderBodyCell({ node, plc, formEdit, targetValue: targetValue.value });
|
|
128
140
|
return () => bc;
|
|
129
141
|
});
|
|
142
|
+
effects.push(() => bodyCell.effect.stop());
|
|
130
143
|
|
|
131
144
|
return { bodyCell, targetValue };
|
|
132
145
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {useHeadCellResize} from "./useHeadCellResize";
|
|
2
|
-
import {computed, designComponent, iHTMLElement, iMouseEvent, PropType, useClassCache, useRefs, useStyleCache} from "
|
|
3
|
-
import {toArray} from "
|
|
2
|
+
import {computed, designComponent, iHTMLElement, iMouseEvent, PropType, useClassCache, useRefs, useStyleCache} from "@peryl/react-compose";
|
|
3
|
+
import {toArray} from "@peryl/utils/toArray";
|
|
4
4
|
import {Table} from "../Table";
|
|
5
5
|
import {tPlcType} from "../../plc/utils/plc.utils";
|
|
6
6
|
import {PlainScroll} from "../../../Scroll";
|
|
7
7
|
import {Icon} from "../../../Icon";
|
|
8
8
|
import {renderHeadCell} from "../../plc/utils/plc.render";
|
|
9
9
|
import {useTooltip} from "../../../useTooltip";
|
|
10
|
+
import Tooltip from "../../../Tooltip";
|
|
11
|
+
import {getFunctionValue} from '@peryl/utils/getFunctionValue';
|
|
10
12
|
|
|
11
13
|
export const PltHeadCell = designComponent({
|
|
12
14
|
name: 'plt-head-cell',
|
|
@@ -77,6 +79,10 @@ export const PltHeadCell = designComponent({
|
|
|
77
79
|
onMouseLeave={handler.onLeave}
|
|
78
80
|
>
|
|
79
81
|
{content}
|
|
82
|
+
{!!props.tablePlc.props.tip && <Tooltip v-slots={{
|
|
83
|
+
default: () => <Icon icon="pi-info-circle" className="plt-head-cell-tip"/>,
|
|
84
|
+
popper: () => getFunctionValue(props.tablePlc.props.tip)
|
|
85
|
+
}}/>}
|
|
80
86
|
<span className="plt-head-cell-indicator" onMouseDown={resizeHandler.mousedown}/>
|
|
81
87
|
{sort.value != null && (
|
|
82
88
|
<div className={`plt-head-cell-sorter plt-head-cell-sorter-${sort.value ? 'desc' : 'asc'}`}>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {disabledUserSelect} from "
|
|
2
|
-
import {enableUserSelect} from "
|
|
1
|
+
import {disabledUserSelect} from "@peryl/utils/disabledUserSelect";
|
|
2
|
+
import {enableUserSelect} from "@peryl/utils/enableUserSelect";
|
|
3
3
|
import {Table} from "../../index";
|
|
4
4
|
import {tPlcType} from "../../plc/utils/plc.utils";
|
|
5
|
-
import {addClass} from "
|
|
6
|
-
import {getComponentCls, iMouseEvent} from "
|
|
5
|
+
import {addClass} from "@peryl/utils/addClass";
|
|
6
|
+
import {getComponentCls, iMouseEvent} from "@peryl/react-compose";
|
|
7
7
|
import {ClientZoom} from "../../../ClientZoom";
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {createTableNode, iTableNode, iTablePropsType} from "../utils/table.utils";
|
|
2
|
-
import {computed} from "
|
|
3
|
-
import {PlainObject} from "
|
|
2
|
+
import {computed} from "@peryl/react-compose";
|
|
3
|
+
import {PlainObject} from "@peryl/utils/event";
|
|
4
4
|
import {iFormValidator} from "../../../Form/validate/createValidation";
|
|
5
5
|
|
|
6
6
|
export function useTableNode({ props, formValidator, dataRef }: { props: iTablePropsType, formValidator: iFormValidator, dataRef: { value: { data: PlainObject[] | undefined } } }) {
|
|
@@ -2,12 +2,32 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
|
|
4
4
|
@include sizeMixin(table, (font-size)) {
|
|
5
|
+
.plt-cell {
|
|
6
|
+
padding: 0 plv(input-padding-x-#{$name});
|
|
7
|
+
|
|
8
|
+
&.plt-cell-editing {
|
|
9
|
+
&:not(.plt-cell-add-edit-padding) {
|
|
10
|
+
padding-left: 2px;
|
|
11
|
+
@include comp(input) {
|
|
12
|
+
& > div, & > span, & > input, & > textarea {
|
|
13
|
+
&:first-child {
|
|
14
|
+
padding-left: calc(#{plv(input-padding-x-#{$name})} - 3px);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
5
21
|
}
|
|
6
22
|
.virtual-table-head-table {
|
|
7
23
|
td {
|
|
8
|
-
font-weight:
|
|
24
|
+
font-weight: 500;
|
|
9
25
|
letter-spacing: 1px;
|
|
10
26
|
|
|
27
|
+
.plt-head-cell-tip {
|
|
28
|
+
color: plv(text-3);
|
|
29
|
+
}
|
|
30
|
+
|
|
11
31
|
.plt-head-cell-indicator {
|
|
12
32
|
position: absolute;
|
|
13
33
|
top: 0;
|
|
@@ -84,22 +104,10 @@
|
|
|
84
104
|
padding: 0;
|
|
85
105
|
}
|
|
86
106
|
|
|
87
|
-
&.plt-cell-editing {
|
|
88
|
-
&:not(.plt-cell-add-edit-padding) {
|
|
89
|
-
padding-left: 2px;
|
|
90
|
-
@include comp(input) {
|
|
91
|
-
& > div, & > span, & > input, & > textarea {
|
|
92
|
-
&:first-child {
|
|
93
|
-
padding-left: calc(#{plv(input-padding-x)} - 3px);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
107
|
&.plt-cell-link {
|
|
101
108
|
color: plv(primary-6);
|
|
102
109
|
cursor: pointer;
|
|
110
|
+
text-decoration: underline;
|
|
103
111
|
|
|
104
112
|
&:hover {
|
|
105
113
|
text-decoration: underline;
|
|
@@ -109,7 +117,7 @@
|
|
|
109
117
|
@include comp(input) {
|
|
110
118
|
&:not(.input-multiple) {
|
|
111
119
|
.input-box {
|
|
112
|
-
padding-bottom:
|
|
120
|
+
padding-bottom: 3px;
|
|
113
121
|
}
|
|
114
122
|
}
|
|
115
123
|
}
|
|
@@ -216,7 +224,7 @@
|
|
|
216
224
|
.plt-expand-row {
|
|
217
225
|
&, &:hover {
|
|
218
226
|
td {
|
|
219
|
-
padding: 0;
|
|
227
|
+
padding: 0 !important;
|
|
220
228
|
background-color: plv(background-color) !important;
|
|
221
229
|
overflow: unset !important;
|
|
222
230
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {computed, reactive, SimpleFunction} from "
|
|
2
|
-
import {delay} from "
|
|
1
|
+
import {computed, reactive, SimpleFunction} from "@peryl/react-compose";
|
|
2
|
+
import {delay} from "@peryl/utils/delay";
|
|
3
3
|
import {iTableScrollRefer} from "./useTableScroll";
|
|
4
4
|
import {PlainScroll} from "../../../Scroll";
|
|
5
5
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {createEffects} from "
|
|
1
|
+
import {createEffects} from "@peryl/utils/createEffects";
|
|
2
2
|
import {useAutoScroll} from "../../../Scroll/useAutoScroll";
|
|
3
3
|
import {PlainScroll} from "../../../Scroll";
|
|
4
4
|
import {TablePlcFixedType, tPlc, tPlcType} from "../../plc/utils/plc.utils";
|
|
5
|
-
import {disabledUserSelect} from "
|
|
6
|
-
import {enableUserSelect} from "
|
|
5
|
+
import {disabledUserSelect} from "@peryl/utils/disabledUserSelect";
|
|
6
|
+
import {enableUserSelect} from "@peryl/utils/enableUserSelect";
|
|
7
7
|
import {IteratePlcHandleType, iteratePlcList} from "../../plc/utils/iteratePlcList";
|
|
8
8
|
import VirtualTable from "../../../VirtualTable";
|
|
9
9
|
import {customDeepClone} from "../../../../utils/customDeepClone";
|
|
10
|
-
import {addClass} from "
|
|
11
|
-
import {getComponentCls, iMouseEvent, nextIndex, StyleProperties} from "
|
|
10
|
+
import {addClass} from "@peryl/utils/addClass";
|
|
11
|
+
import {getComponentCls, iMouseEvent, nextIndex, StyleProperties} from "@peryl/react-compose";
|
|
12
12
|
import {iTableHooks} from "../utils/createTableHooks";
|
|
13
13
|
import {iElementRect} from "../../../../utils/getRowEl";
|
|
14
|
-
import {createEnum} from "
|
|
14
|
+
import {createEnum} from "@peryl/utils/createEnum";
|
|
15
15
|
import {ClientZoom} from "../../../ClientZoom";
|
|
16
16
|
|
|
17
17
|
export function useTableDraggierCol(
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {getComponentCls, iMouseEvent, reactive} from "
|
|
2
|
-
import {
|
|
3
|
-
import {createEffects} from "plain-utils/utils/createEffects";
|
|
1
|
+
import {getComponentCls, iMouseEvent, reactive} from "@peryl/react-compose";
|
|
2
|
+
import {createEffects} from "@peryl/utils/createEffects";
|
|
4
3
|
import VirtualTable from "../../../VirtualTable";
|
|
5
4
|
import {iTableHooks} from "../utils/createTableHooks";
|
|
6
5
|
import {iTableNode} from "../utils/table.utils";
|
|
7
|
-
import {findParentElement} from "
|
|
8
|
-
import {hasClass} from "
|
|
9
|
-
import {addClass} from "
|
|
10
|
-
import {disabledUserSelect} from "
|
|
11
|
-
import {enableUserSelect} from "
|
|
6
|
+
import {findParentElement} from "@peryl/utils/findParentElement";
|
|
7
|
+
import {hasClass} from "@peryl/utils/hasClass";
|
|
8
|
+
import {addClass} from "@peryl/utils/addClass";
|
|
9
|
+
import {disabledUserSelect} from "@peryl/utils/disabledUserSelect";
|
|
10
|
+
import {enableUserSelect} from "@peryl/utils/enableUserSelect";
|
|
12
11
|
import {ClientZoom} from "../../../ClientZoom";
|
|
12
|
+
import {createAutoScrollManager} from "../../../createAutoScrollManager";
|
|
13
13
|
|
|
14
14
|
export function useTableDraggierRow(
|
|
15
15
|
{
|
|
@@ -29,8 +29,11 @@ export function useTableDraggierRow(
|
|
|
29
29
|
model: { value: any[] | null | undefined }
|
|
30
30
|
}
|
|
31
31
|
) {
|
|
32
|
+
|
|
32
33
|
/*自动滚动*/
|
|
33
|
-
const autoScroll = useAutoScroll({ getScroll: () => refs.virtual?.refs.scroll, vertical: true, })
|
|
34
|
+
/*const autoScroll = useAutoScroll({ getScroll: () => refs.virtual?.refs.scroll, vertical: true, });*/
|
|
35
|
+
|
|
36
|
+
const autoScrollManager = createAutoScrollManager(() => refs.virtual?.refs.scroll);
|
|
34
37
|
|
|
35
38
|
/*拖拽结束之后要清除的副作用*/
|
|
36
39
|
const { effects: draggierEffects } = createEffects();
|
|
@@ -180,18 +183,18 @@ export function useTableDraggierRow(
|
|
|
180
183
|
|
|
181
184
|
/*---------------------------------------初始化auto scroll-------------------------------------------*/
|
|
182
185
|
/*自动滚动*/
|
|
183
|
-
if (refs.virtual?.refs.scroll?.refs.wrapper) {
|
|
186
|
+
/*if (refs.virtual?.refs.scroll?.refs.wrapper) {
|
|
184
187
|
const { scrollHeight, offsetHeight } = refs.virtual.refs.scroll.refs.wrapper;
|
|
185
188
|
if (scrollHeight > offsetHeight) {
|
|
186
189
|
autoScroll.showHover();
|
|
187
190
|
draggierEffects.push(() => {autoScroll.hideHover();});
|
|
188
191
|
}
|
|
189
|
-
}
|
|
192
|
+
}*/
|
|
190
193
|
};
|
|
191
194
|
|
|
192
195
|
const start = (e: iMouseEvent, node: iTableNode) => {
|
|
193
196
|
const { clientY } = !e ? { clientY: prevClientY } : ClientZoom.getClientPosition(e);
|
|
194
|
-
const rowEl = (Array.from(refs.el!.querySelectorAll(`.plt-row`)) as HTMLTableRowElement[]).find(i => i.dataset.
|
|
197
|
+
const rowEl = (Array.from(refs.el!.querySelectorAll(`.plt-row`)) as HTMLTableRowElement[]).find(i => i.dataset.idx == node.state.index.toString())!;
|
|
195
198
|
const rowRect = rowEl.getBoundingClientRect();
|
|
196
199
|
staticState = { startY: clientY, startTop: rowRect.top, node, rowEl, data: null, };
|
|
197
200
|
/*清理状态*/
|
|
@@ -222,16 +225,25 @@ export function useTableDraggierRow(
|
|
|
222
225
|
const durY = clientY - staticState.startY;
|
|
223
226
|
let top = staticState.startTop + durY;
|
|
224
227
|
const minTop = move.staticState!.bodyHostEl.getBoundingClientRect().top + (move.staticState!.headTableEl?.clientHeight || 0);
|
|
228
|
+
const hostRect = move.staticState!.bodyHostEl.getBoundingClientRect();
|
|
229
|
+
const maxTop = hostRect.top + hostRect.height - numberState.bodyRowHeight - (staticState.data!.summaryTable?.clientHeight || 0);
|
|
230
|
+
|
|
225
231
|
if (top < minTop) {
|
|
226
232
|
top = minTop;
|
|
227
233
|
} else {
|
|
228
|
-
const hostRect = move.staticState!.bodyHostEl.getBoundingClientRect();
|
|
229
|
-
const maxTop = hostRect.top + hostRect.height - numberState.bodyRowHeight - (staticState.data!.summaryTable?.clientHeight || 0);
|
|
230
234
|
if (top > maxTop) {
|
|
231
235
|
top = maxTop;
|
|
232
236
|
}
|
|
233
237
|
}
|
|
234
238
|
|
|
239
|
+
if (top == minTop) {
|
|
240
|
+
autoScrollManager.set('top');
|
|
241
|
+
} else if (top == maxTop) {
|
|
242
|
+
autoScrollManager.set('bottom');
|
|
243
|
+
} else {
|
|
244
|
+
autoScrollManager.set(null);
|
|
245
|
+
}
|
|
246
|
+
|
|
235
247
|
staticState.data!.cloneRowEl.style.top = `${top}px`;
|
|
236
248
|
if (!!e) {
|
|
237
249
|
prevClientY = clientY;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {iTableHooks} from "../utils/createTableHooks";
|
|
2
2
|
import {iTableEventType, iTableNode, iTablePropsType} from "../utils/table.utils";
|
|
3
|
-
import {findParentElement} from "
|
|
4
|
-
import {hasClass} from "
|
|
5
|
-
import {designComponent, getComponentCls, iHTMLDivElement, iMouseEvent} from "
|
|
3
|
+
import {findParentElement} from "@peryl/utils/findParentElement";
|
|
4
|
+
import {hasClass} from "@peryl/utils/hasClass";
|
|
5
|
+
import {designComponent, getComponentCls, iHTMLDivElement, iMouseEvent} from "@peryl/react-compose";
|
|
6
6
|
import {Icon} from "../../../Icon";
|
|
7
7
|
import {tPlcType} from "../../plc/utils/plc.utils";
|
|
8
8
|
import {useTableDraggierRow} from "./useTableDraggier.row";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {iTableHooks} from "../utils/createTableHooks";
|
|
2
|
-
import {computed, onBeforeUnmount, reactive, useRefs} from "
|
|
3
|
-
import {createEffects} from "
|
|
2
|
+
import {computed, onBeforeUnmount, reactive, useRefs} from "@peryl/react-compose";
|
|
3
|
+
import {createEffects} from "@peryl/utils/createEffects";
|
|
4
4
|
import {Dialog} from "../../../Dialog";
|
|
5
5
|
import {Form} from "../../../Form";
|
|
6
6
|
import {FormItem} from "../../../FormItem";
|
|
7
7
|
import {iTableNode, iTablePropsType} from "../utils/table.utils";
|
|
8
|
-
import {deepcopy} from "
|
|
8
|
+
import {deepcopy} from "@peryl/utils/deepcopy";
|
|
9
9
|
import {useCellValue} from "../body/useCellValue";
|
|
10
10
|
import {PlcValidatePropsOption, tPlc} from "../../plc/utils/plc.utils";
|
|
11
|
-
import {delay} from "
|
|
11
|
+
import {delay} from "@peryl/utils/delay";
|
|
12
12
|
import {iTableMethods} from "./useTableMethods";
|
|
13
|
-
import {pick} from "
|
|
13
|
+
import {pick} from "@peryl/utils/pick";
|
|
14
14
|
import i18n from "../../../i18n";
|
|
15
15
|
|
|
16
16
|
export function useTableFormEditor(
|
|
@@ -53,10 +53,13 @@ export function useTableFormEditor(
|
|
|
53
53
|
* @author 韦胜健
|
|
54
54
|
* @date 2022/12/5 20:45
|
|
55
55
|
*/
|
|
56
|
+
const { effects: cellBodyArrayEffects } = createEffects();
|
|
57
|
+
effects.push(() => cellBodyArrayEffects.clear());
|
|
56
58
|
const cellBodyArray = computed(() => {
|
|
59
|
+
cellBodyArrayEffects.clear();
|
|
57
60
|
if (!state.optionGetter) {return [];}
|
|
58
61
|
const { node } = state.optionGetter();
|
|
59
|
-
return showPlcArray.value.map(plc => useCellValue({ optionGetter: () => ({ plc, node }), formEdit: true }));
|
|
62
|
+
return showPlcArray.value.map(plc => useCellValue({ optionGetter: () => ({ plc, node }), formEdit: true, effects: cellBodyArrayEffects }));
|
|
60
63
|
});
|
|
61
64
|
|
|
62
65
|
const handler = {
|
|
@@ -104,45 +107,52 @@ export function useTableFormEditor(
|
|
|
104
107
|
return (
|
|
105
108
|
<Dialog
|
|
106
109
|
v-model={state.show}
|
|
107
|
-
title={title || i18n('base.edit.edit').d('编辑')}
|
|
110
|
+
title={title || i18n.$it('base.edit.edit').d('编辑')}
|
|
108
111
|
confirmButton
|
|
109
112
|
cancelButton
|
|
110
|
-
confirmButtonText={i18n('base.edit.save').d('保存')}
|
|
113
|
+
confirmButtonText={i18n.$it('base.edit.save').d('保存')}
|
|
111
114
|
handleConfirm={handler.handleConfirm}
|
|
112
115
|
handleCancel={handler.handleCancel}
|
|
113
116
|
position="right"
|
|
114
117
|
initialize
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
118
|
+
v-slots={{
|
|
119
|
+
default: () => (
|
|
120
|
+
<Form
|
|
121
|
+
rules={rules}
|
|
122
|
+
ref={onRef.form}
|
|
123
|
+
column={1}
|
|
124
|
+
modelValue={node.state.editRow}
|
|
125
|
+
labelAlign="right"
|
|
126
|
+
validateMessagePosition="bottom-left"
|
|
127
|
+
>
|
|
128
|
+
{showPlcArray.value.map((plc, index) => {
|
|
129
|
+
if (plc.props.editColSpan === 0) {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
const { bodyCell } = cellBodyArray.value[index];
|
|
133
|
+
const { editable, body } = bodyCell.value();
|
|
134
|
+
const validateAttrs = pick(plc.props, Object.keys(PlcValidatePropsOption) as (keyof typeof PlcValidatePropsOption)[]);
|
|
135
|
+
return (
|
|
136
|
+
<FormItem
|
|
137
|
+
key={index}
|
|
138
|
+
label={plc.props.formLabel || plc.props.title}
|
|
139
|
+
field={plc.props.field}
|
|
140
|
+
required={plc.props.required}
|
|
141
|
+
rules={plc.props.rules}
|
|
142
|
+
validator={plc.props.validator}
|
|
143
|
+
tip={plc.props.tip}
|
|
144
|
+
disabled={!editable}
|
|
145
|
+
{...validateAttrs}
|
|
146
|
+
>
|
|
147
|
+
{body}
|
|
148
|
+
</FormItem>
|
|
149
|
+
);
|
|
150
|
+
})}
|
|
151
|
+
</Form>
|
|
152
|
+
),
|
|
153
|
+
foot: () => props.formEditorFootRender?.(node.state.editRow)
|
|
154
|
+
}}
|
|
155
|
+
/>
|
|
146
156
|
);
|
|
147
157
|
},
|
|
148
158
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {reactive} from "
|
|
2
|
-
import {createCounter} from "
|
|
1
|
+
import {reactive} from "@peryl/react-compose";
|
|
2
|
+
import {createCounter} from "@peryl/utils/createCounter";
|
|
3
3
|
import {iTableHooks} from "../utils/createTableHooks";
|
|
4
4
|
import {LoadingMask} from "../../../LoadingMask";
|
|
5
5
|
import {iTablePropsType} from "../utils/table.utils";
|