@para-ui/core 5.0.0-beta.11 → 5.0.0-beta.13
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/AGENTS.md +315 -0
- package/AlignBox/component.json +89 -0
- package/Anchor/component.json +130 -0
- package/Argv/component.json +216 -0
- package/AutoBox/component.json +133 -0
- package/AutoButton/component.json +109 -0
- package/AutoTips/component.json +121 -0
- package/Badge/component.json +92 -0
- package/Breadcrumbs/component.json +142 -0
- package/Button/component.json +168 -0
- package/ButtonGroup/component.json +132 -0
- package/Card/component.json +162 -0
- package/Carousel/component.json +142 -0
- package/Cascader/component.json +196 -0
- package/Checkbox/component.json +138 -0
- package/CheckboxGroup/component.json +152 -0
- package/CodeEditor/component.json +189 -0
- package/Collapse/component.json +166 -0
- package/CollapseBox/component.json +84 -0
- package/CollapseLayout/component.json +155 -0
- package/ColorPicker/component.json +142 -0
- package/ComboSelect/component.json +181 -0
- package/Container/component.json +111 -0
- package/ContentBox/component.json +81 -0
- package/CopyText/component.json +118 -0
- package/CycleSelector/component.json +98 -0
- package/DatePicker/component.json +192 -0
- package/Descriptions/component.json +142 -0
- package/Desktop/component.json +171 -0
- package/DragVerify/component.json +114 -0
- package/Drawer/component.json +200 -0
- package/Dropdown/component.json +147 -0
- package/DynamicMultiBox/component.json +278 -0
- package/Empty/component.json +123 -0
- package/FieldForm/component.json +196 -0
- package/Form/component.json +161 -0
- package/FormItem/component.json +171 -0
- package/FunctionModal/component.json +197 -0
- package/Help/component.json +118 -0
- package/HelperText/component.json +126 -0
- package/Image/component.json +165 -0
- package/InputCode/component.json +191 -0
- package/InputLang/component.json +205 -0
- package/InputNumber/component.json +162 -0
- package/Label/component.json +126 -0
- package/Loading/component.json +91 -0
- package/Menu/component.json +180 -0
- package/Message/component.json +246 -0
- package/Modal/component.json +277 -0
- package/MultiBox/component.json +216 -0
- package/Notification/component.json +184 -0
- package/OperateBtn/component.json +134 -0
- package/PageHeader/component.json +112 -0
- package/Pagination/component.json +181 -0
- package/PasswordRules/component.json +105 -0
- package/PopConfirm/component.json +227 -0
- package/PopMenu/component.json +131 -0
- package/Popover/component.json +165 -0
- package/Progress/component.json +161 -0
- package/Prompt/component.json +144 -0
- package/Querying/component.json +96 -0
- package/QuickReply/component.json +129 -0
- package/Radio/component.json +136 -0
- package/RadioGroup/component.json +149 -0
- package/RangeInput/component.json +198 -0
- package/Result/component.json +104 -0
- package/ScrollBar/component.json +115 -0
- package/Search/component.json +177 -0
- package/Select/component.json +244 -0
- package/SelectInput/component.json +184 -0
- package/Selector/component.json +203 -0
- package/SelectorPicker/component.json +179 -0
- package/SingleBox/component.json +151 -0
- package/Slider/component.json +181 -0
- package/SortBox/component.json +108 -0
- package/Status/component.json +104 -0
- package/Stepper/component.json +129 -0
- package/Switch/component.json +207 -0
- package/Table/component.json +547 -0
- package/Tabs/component.json +227 -0
- package/Tag/component.json +221 -0
- package/TextEditor/component.json +186 -0
- package/TextField/component.json +290 -0
- package/TimePicker/component.json +176 -0
- package/Timeline/component.json +110 -0
- package/Title/component.json +156 -0
- package/ToggleButton/component.json +153 -0
- package/Tooltip/component.json +176 -0
- package/Transfer/component.json +157 -0
- package/Tree/component.json +512 -0
- package/Upload/component.json +450 -0
- package/ai-workflows/01-crud-list-multi-drawer.md +278 -0
- package/ai-workflows/02-rbac-operation-buttons.md +290 -0
- package/ai-workflows/03-complex-form-async-cascade.md +350 -0
- package/ai-workflows/04-array-field-form.md +281 -0
- package/ai-workflows/05-popconfirm-async-message-queue.md +333 -0
- package/ai-workflows/06-modal-drawer-form-workflow.md +385 -0
- package/ai-workflows/07-search-filter-table-trio.md +387 -0
- package/ai-workflows/08-table-advanced-features.md +365 -0
- package/ai-workflows/09-batch-operation-export-progress.md +367 -0
- package/ai-workflows/10-cross-component-state-coordination.md +412 -0
- package/es/AlignBox/component.json +89 -0
- package/es/AlignBox/index.css +1 -1
- package/es/AlignBox/index.d.ts +6 -2
- package/es/AlignBox/index.js +1 -1
- package/es/AlignBox/style/index.css +1 -1
- package/es/Anchor/anchorMenu/index.d.ts +2 -1
- package/es/Anchor/anchorMenu/index.js +36 -33
- package/es/Anchor/component.json +130 -0
- package/es/Anchor/index.js +52 -49
- package/es/Anchor/type.d.ts +8 -4
- package/es/Argv/component.json +216 -0
- package/es/Argv/dataGenerator/index.js +1 -1
- package/es/Argv/index.d.ts +5 -6
- package/es/Argv/index.js +1 -1
- package/es/AutoBox/component.json +133 -0
- package/es/AutoBox/index.d.ts +3 -3
- package/es/AutoBox/index.js +1 -1
- package/es/AutoBox/protal.d.ts +2 -2
- package/es/AutoBox/protal.js +33 -30
- package/es/AutoButton/component.json +109 -0
- package/es/AutoButton/index.js +1 -1
- package/es/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/es/AutoTips/autoTipsMultiline/index.js +1 -1
- package/es/AutoTips/component.json +121 -0
- package/es/AutoTips/index.js +1 -1
- package/es/Badge/component.json +92 -0
- package/es/Breadcrumbs/component.json +142 -0
- package/es/Breadcrumbs/index.js +1 -1
- package/es/Button/SplitButton.d.ts +2 -2
- package/es/Button/component.json +168 -0
- package/es/Button/index.js +44 -44
- package/es/ButtonGroup/component.json +132 -0
- package/es/ButtonGroup/index.d.ts +1 -1
- package/es/Card/component.json +162 -0
- package/es/Card/index.d.ts +2 -2
- package/es/Card/index.js +2 -2
- package/es/Carousel/component.json +142 -0
- package/es/Carousel/index.d.ts +1 -1
- package/es/Cascader/Cascader.js +1 -1
- package/es/Cascader/OptionList/Column.js +1 -1
- package/es/Cascader/OptionList/index.js +1 -1
- package/es/Cascader/component.json +196 -0
- package/es/Cascader/hooks/useEntities.js +7 -7
- package/es/Cascader/interface.d.ts +1 -0
- package/es/Cascader/utils/commonUtil.d.ts +1 -1
- package/es/Cascader/utils/commonUtil.js +16 -16
- package/es/Cascader/utils/treeUtil.d.ts +14 -5
- package/es/Cascader/utils/treeUtil.js +1 -1
- package/es/Checkbox/component.json +138 -0
- package/es/CheckboxGroup/component.json +152 -0
- package/es/CheckboxGroup/index.js +1 -1
- package/es/CodeEditor/component.json +189 -0
- package/es/CodeEditor/index.d.ts +11 -10
- package/es/CodeEditor/index.js +19 -19
- package/es/Collapse/component.json +166 -0
- package/es/Collapse/index.d.ts +1 -1
- package/es/Collapse/index.js +23 -22
- package/es/CollapseBox/component.json +84 -0
- package/es/CollapseLayout/component.json +155 -0
- package/es/ColorPicker/component.json +142 -0
- package/es/ComboSelect/component.json +181 -0
- package/es/ComboSelect/index.js +115 -109
- package/es/ComboSelect/interface.d.ts +2 -2
- package/es/ComboSelect/utils.d.ts +3 -3
- package/es/ComboSelect/utils.js +1 -1
- package/es/Container/component.json +111 -0
- package/es/ContentBox/component.json +81 -0
- package/es/CopyText/component.json +118 -0
- package/es/CycleSelector/component.json +98 -0
- package/es/CycleSelector/index.js +14 -13
- package/es/DatePicker/component.json +192 -0
- package/es/DatePicker/generatePicker/generateRangePicker.js +11 -11
- package/es/DatePicker/generatePicker/generateSinglePicker.js +2 -2
- package/es/Descriptions/component.json +142 -0
- package/es/Descriptions/index.d.ts +1 -1
- package/es/Desktop/component.json +171 -0
- package/es/Desktop/index.js +1 -1
- package/es/DragVerify/component.json +114 -0
- package/es/DragVerify/index.js +19 -19
- package/es/Drawer/component.json +200 -0
- package/es/Drawer/index.js +86 -86
- package/es/Drawer/interface.d.ts +1 -1
- package/es/Drawer/util.d.ts +1 -6
- package/es/Drawer/util.js +9 -6
- package/es/Dropdown/component.json +147 -0
- package/es/Dropdown/index.js +1 -1
- package/es/DynamicMultiBox/component.json +278 -0
- package/es/DynamicMultiBox/formItem.d.ts +1 -1
- package/es/DynamicMultiBox/index.js +1 -1
- package/es/DynamicMultiBox/rowForm.d.ts +2 -2
- package/es/Empty/component.json +123 -0
- package/es/Empty/index.css +1 -1
- package/es/Empty/index.d.ts +2 -2
- package/es/Empty/index.js +27 -26
- package/es/Empty/style/index.css +1 -1
- package/es/FieldForm/FieldFormItem/ItemHolder.js +1 -1
- package/es/FieldForm/FieldFormItem/MemoInput.d.ts +2 -2
- package/es/FieldForm/FieldFormItem/StatusProvider.js +1 -1
- package/es/FieldForm/FieldFormItem/index.d.ts +6 -6
- package/es/FieldForm/Form.d.ts +2 -2
- package/es/FieldForm/Form.js +1 -1
- package/es/FieldForm/FormItemInput.js +1 -1
- package/es/FieldForm/FormItemLabel.js +1 -1
- package/es/FieldForm/FormList.d.ts +2 -2
- package/es/FieldForm/component.json +196 -0
- package/es/FieldForm/context.d.ts +5 -1
- package/es/FieldForm/context.js +2 -2
- package/es/FieldForm/hooks/useForm.d.ts +4 -3
- package/es/FieldForm/hooks/useFormInstance.d.ts +1 -1
- package/es/FieldForm/hooks/useFormItemStatus.d.ts +9 -5
- package/es/FieldForm/hooks/useFormItemStatus.js +2 -2
- package/es/FieldForm/hooks/useItemRef.d.ts +1 -1
- package/es/FieldForm/hooks/useItemRef.js +6 -6
- package/es/Form/component.json +161 -0
- package/es/Form/index.d.ts +52 -49
- package/es/Form/index.js +1 -1
- package/es/FormItem/compoments/defaultCompoments/index.d.ts +5 -5
- package/es/FormItem/compoments/defaultCompoments/index.js +12 -11
- package/es/FormItem/compoments/formCheckboxGroup/index.d.ts +2 -2
- package/es/FormItem/compoments/formFile/index.js +8 -8
- package/es/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/es/FormItem/compoments/formSelect/index.d.ts +1 -1
- package/es/FormItem/component.json +171 -0
- package/es/FormItem/index.d.ts +5 -5
- package/es/FormItem/index.js +23 -23
- package/es/FormItem/itemType.js +1 -1
- package/es/FunctionModal/component.json +197 -0
- package/es/FunctionModal/dialog.d.ts +1 -1
- package/es/FunctionModal/modalContext.d.ts +4 -1
- package/es/GlobalContext/confirmLocale.js +1 -1
- package/es/GlobalContext/index.js +1 -1
- package/es/Help/component.json +118 -0
- package/es/HelperText/component.json +126 -0
- package/es/Image/PreviewGroup.js +1 -1
- package/es/Image/component.json +165 -0
- package/es/Image/index.js +1 -1
- package/es/InputCode/component.json +191 -0
- package/es/InputCode/index.d.ts +2 -2
- package/es/InputLang/component.json +205 -0
- package/es/InputLang/index.js +2 -2
- package/es/InputNumber/component.json +162 -0
- package/es/Label/component.json +126 -0
- package/es/Label/index.d.ts +2 -2
- package/es/Loading/component.json +91 -0
- package/es/Menu/component.json +180 -0
- package/es/Menu/verticalMenuList.js +1 -1
- package/es/Message/component.json +246 -0
- package/es/Message/index.d.ts +2 -2
- package/es/Message/index.js +2 -2
- package/es/Modal/Confirm/index.d.ts +1 -1
- package/es/Modal/Confirm/index.js +1 -1
- package/es/Modal/component.json +277 -0
- package/es/Modal/index.d.ts +85 -5
- package/es/Modal/index.js +159 -122
- package/es/Modal/interface.d.ts +1 -0
- package/es/MultiBox/component.json +216 -0
- package/es/MultiBox/index.js +19 -14
- package/es/Notification/component.json +184 -0
- package/es/OperateBtn/component.json +134 -0
- package/es/OperateBtn/index.d.ts +3 -3
- package/es/PageHeader/component.json +112 -0
- package/es/PageHeader/horizontalMeun.js +1 -1
- package/es/PageHeader/horizontalMeunRight.js +1 -1
- package/es/Pagination/component.json +181 -0
- package/es/Pagination/index.js +15 -15
- package/es/ParauiProvider/index.js +1 -1
- package/es/PasswordRules/component.json +105 -0
- package/es/PasswordRules/index.d.ts +4 -4
- package/es/PopConfirm/component.json +227 -0
- package/es/PopConfirm/index.d.ts +1 -1
- package/es/PopConfirm/index.js +1 -1
- package/es/PopMenu/component.json +131 -0
- package/es/PopMenu/hooks.d.ts +1 -1
- package/es/PopMenu/index.js +8 -8
- package/es/Popover/component.json +165 -0
- package/es/Popover/index.js +1 -1
- package/es/Progress/component.json +161 -0
- package/es/Prompt/component.json +144 -0
- package/es/Querying/component.json +96 -0
- package/es/Querying/index.css +1 -1
- package/es/Querying/index.d.ts +2 -2
- package/es/Querying/index.js +20 -19
- package/es/Querying/style/index.css +1 -1
- package/es/QuickReply/QuickReplyCode/index.js +1 -1
- package/es/QuickReply/component.json +129 -0
- package/es/QuickReply/index.d.ts +1 -1
- package/es/Radio/component.json +136 -0
- package/es/RadioGroup/component.json +149 -0
- package/es/RangeInput/component.json +198 -0
- package/es/RangeInput/index.js +20 -20
- package/es/Result/component.json +104 -0
- package/es/ScrollBar/component.json +115 -0
- package/es/Search/component.json +177 -0
- package/es/Search/index.d.ts +1 -1
- package/es/Select/component.json +244 -0
- package/es/Select/index.js +114 -114
- package/es/SelectInput/component.json +184 -0
- package/es/Selector/component.json +203 -0
- package/es/Selector/index.js +56 -50
- package/es/Selector/interface.d.ts +2 -2
- package/es/Selector/selectorData/index.js +1 -1
- package/es/Selector/selectorMain/index.js +3 -3
- package/es/Selector/selectorNode/index.js +1 -1
- package/es/Selector/util.d.ts +3 -3
- package/es/Selector/util.js +6 -12
- package/es/SelectorPicker/component.json +179 -0
- package/es/SelectorPicker/index.d.ts +5 -5
- package/es/SelectorPicker/index.js +15 -15
- package/es/SingleBox/component.json +151 -0
- package/es/SingleBox/index.d.ts +2 -2
- package/es/Slider/component.json +181 -0
- package/es/SortBox/component.json +108 -0
- package/es/Status/component.json +104 -0
- package/es/Stepper/component.json +129 -0
- package/es/Stepper/index.d.ts +2 -2
- package/es/Switch/component.json +207 -0
- package/es/Switch/index.css +1 -1
- package/es/Switch/index.d.ts +3 -2
- package/es/Switch/index.js +60 -59
- package/es/Switch/style/index.css +1 -1
- package/es/Table/component.json +547 -0
- package/es/Table/index.d.ts +2 -2
- package/es/Table/index.js +385 -382
- package/es/Table/interface.d.ts +30 -0
- package/es/Table/tableHead.js +1 -1
- package/es/Table/util.d.ts +1 -1
- package/es/Table/util.js +3 -12
- package/es/Tabs/component.json +227 -0
- package/es/Tag/component.json +221 -0
- package/es/Tag/index.css +1 -1
- package/es/Tag/index.d.ts +1 -1
- package/es/Tag/index.js +20 -20
- package/es/Tag/style/index.css +1 -1
- package/es/TextEditor/component.json +186 -0
- package/es/TextEditor/index.d.ts +5 -5
- package/es/TextEditor/index.js +1 -1
- package/es/TextField/component.json +290 -0
- package/es/TextField/index.d.ts +2 -2
- package/es/TextField/index.js +1 -1
- package/es/TimePicker/component.json +176 -0
- package/es/Timeline/component.json +110 -0
- package/es/Title/component.json +156 -0
- package/es/ToggleButton/component.json +153 -0
- package/es/ToggleButton/index.js +1 -1
- package/es/Tooltip/component.json +176 -0
- package/es/Tooltip/index.js +58 -53
- package/es/Tooltip/interface.d.ts +14 -1
- package/es/Tooltip/utils.js +6 -6
- package/es/Transfer/component.json +157 -0
- package/es/Tree/OperateBar/index.js +1 -1
- package/es/Tree/Tree.js +3 -3
- package/es/Tree/component.json +512 -0
- package/es/Tree/interface.d.ts +1 -1
- package/es/Upload/component.json +450 -0
- package/es/Upload/util.js +1 -1
- package/es/Utils/snack-kit-shims.d.ts +18 -0
- package/es/Utils/snack-kit-shims.js +19 -0
- package/es/Utils/type.d.ts +0 -2
- package/es/_virtual/index.js +5 -3
- package/es/_virtual/index2.js +2 -5
- package/es/index.d.ts +2 -0
- package/es/index.js +1 -1
- package/es/locale/en_US.d.ts +361 -0
- package/es/locale/en_US.js +364 -0
- package/es/locale/index.d.ts +1 -723
- package/es/locale/index2.js +10 -0
- package/es/locale/zh_CN.d.ts +361 -0
- package/es/locale/zh_CN.js +364 -0
- package/es/node_modules/classnames/index.js +1 -1
- package/lib/AlignBox/component.json +89 -0
- package/lib/AlignBox/index.css +1 -1
- package/lib/AlignBox/index.d.ts +6 -2
- package/lib/AlignBox/index.js +1 -1
- package/lib/AlignBox/style/index.css +1 -1
- package/lib/Anchor/anchorMenu/index.d.ts +2 -1
- package/lib/Anchor/anchorMenu/index.js +1 -1
- package/lib/Anchor/component.json +130 -0
- package/lib/Anchor/index.js +1 -1
- package/lib/Anchor/type.d.ts +8 -4
- package/lib/Argv/component.json +216 -0
- package/lib/Argv/dataGenerator/index.js +1 -1
- package/lib/Argv/index.d.ts +5 -6
- package/lib/Argv/index.js +1 -1
- package/lib/AutoBox/component.json +133 -0
- package/lib/AutoBox/index.d.ts +3 -3
- package/lib/AutoBox/index.js +1 -1
- package/lib/AutoBox/protal.d.ts +2 -2
- package/lib/AutoBox/protal.js +1 -1
- package/lib/AutoButton/component.json +109 -0
- package/lib/AutoButton/index.js +1 -1
- package/lib/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/lib/AutoTips/autoTipsMultiline/index.js +1 -1
- package/lib/AutoTips/component.json +121 -0
- package/lib/AutoTips/index.js +1 -1
- package/lib/Badge/component.json +92 -0
- package/lib/Breadcrumbs/component.json +142 -0
- package/lib/Breadcrumbs/index.js +1 -1
- package/lib/Button/SplitButton.d.ts +2 -2
- package/lib/Button/component.json +168 -0
- package/lib/Button/index.js +1 -1
- package/lib/ButtonGroup/component.json +132 -0
- package/lib/ButtonGroup/index.d.ts +1 -1
- package/lib/Card/component.json +162 -0
- package/lib/Card/index.d.ts +2 -2
- package/lib/Card/index.js +1 -1
- package/lib/Carousel/component.json +142 -0
- package/lib/Carousel/index.d.ts +1 -1
- package/lib/Cascader/Cascader.js +1 -1
- package/lib/Cascader/OptionList/Column.js +1 -1
- package/lib/Cascader/OptionList/index.js +1 -1
- package/lib/Cascader/component.json +196 -0
- package/lib/Cascader/hooks/useEntities.js +1 -1
- package/lib/Cascader/interface.d.ts +1 -0
- package/lib/Cascader/utils/commonUtil.d.ts +1 -1
- package/lib/Cascader/utils/commonUtil.js +1 -1
- package/lib/Cascader/utils/treeUtil.d.ts +14 -5
- package/lib/Cascader/utils/treeUtil.js +1 -1
- package/lib/Checkbox/component.json +138 -0
- package/lib/CheckboxGroup/component.json +152 -0
- package/lib/CheckboxGroup/index.js +1 -1
- package/lib/CodeEditor/component.json +189 -0
- package/lib/CodeEditor/index.d.ts +11 -10
- package/lib/CodeEditor/index.js +1 -1
- package/lib/Collapse/component.json +166 -0
- package/lib/Collapse/index.d.ts +1 -1
- package/lib/Collapse/index.js +1 -1
- package/lib/CollapseBox/component.json +84 -0
- package/lib/CollapseLayout/component.json +155 -0
- package/lib/ColorPicker/component.json +142 -0
- package/lib/ComboSelect/component.json +181 -0
- package/lib/ComboSelect/index.js +1 -1
- package/lib/ComboSelect/interface.d.ts +2 -2
- package/lib/ComboSelect/utils.d.ts +3 -3
- package/lib/ComboSelect/utils.js +1 -1
- package/lib/Container/component.json +111 -0
- package/lib/ContentBox/component.json +81 -0
- package/lib/CopyText/component.json +118 -0
- package/lib/CycleSelector/component.json +98 -0
- package/lib/CycleSelector/index.js +1 -1
- package/lib/DatePicker/component.json +192 -0
- package/lib/DatePicker/generatePicker/generateRangePicker.js +1 -1
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +1 -1
- package/lib/Descriptions/component.json +142 -0
- package/lib/Descriptions/index.d.ts +1 -1
- package/lib/Desktop/component.json +171 -0
- package/lib/Desktop/index.js +1 -1
- package/lib/DragVerify/component.json +114 -0
- package/lib/DragVerify/index.js +1 -1
- package/lib/Drawer/component.json +200 -0
- package/lib/Drawer/index.js +1 -1
- package/lib/Drawer/interface.d.ts +1 -1
- package/lib/Drawer/util.d.ts +1 -6
- package/lib/Drawer/util.js +1 -1
- package/lib/Dropdown/component.json +147 -0
- package/lib/Dropdown/index.js +1 -1
- package/lib/DynamicMultiBox/component.json +278 -0
- package/lib/DynamicMultiBox/formItem.d.ts +1 -1
- package/lib/DynamicMultiBox/index.js +1 -1
- package/lib/DynamicMultiBox/rowForm.d.ts +2 -2
- package/lib/Empty/component.json +123 -0
- package/lib/Empty/index.css +1 -1
- package/lib/Empty/index.d.ts +2 -2
- package/lib/Empty/index.js +1 -1
- package/lib/Empty/style/index.css +1 -1
- package/lib/FieldForm/FieldFormItem/ItemHolder.js +1 -1
- package/lib/FieldForm/FieldFormItem/MemoInput.d.ts +2 -2
- package/lib/FieldForm/FieldFormItem/StatusProvider.js +1 -1
- package/lib/FieldForm/FieldFormItem/index.d.ts +6 -6
- package/lib/FieldForm/Form.d.ts +2 -2
- package/lib/FieldForm/Form.js +1 -1
- package/lib/FieldForm/FormItemInput.js +1 -1
- package/lib/FieldForm/FormItemLabel.js +1 -1
- package/lib/FieldForm/FormList.d.ts +2 -2
- package/lib/FieldForm/component.json +196 -0
- package/lib/FieldForm/context.d.ts +5 -1
- package/lib/FieldForm/context.js +1 -1
- package/lib/FieldForm/hooks/useForm.d.ts +4 -3
- package/lib/FieldForm/hooks/useFormInstance.d.ts +1 -1
- package/lib/FieldForm/hooks/useFormItemStatus.d.ts +9 -5
- package/lib/FieldForm/hooks/useFormItemStatus.js +1 -1
- package/lib/FieldForm/hooks/useItemRef.d.ts +1 -1
- package/lib/FieldForm/hooks/useItemRef.js +1 -1
- package/lib/Form/component.json +161 -0
- package/lib/Form/index.d.ts +52 -49
- package/lib/Form/index.js +1 -1
- package/lib/FormItem/compoments/defaultCompoments/index.d.ts +5 -5
- package/lib/FormItem/compoments/defaultCompoments/index.js +1 -1
- package/lib/FormItem/compoments/formCheckboxGroup/index.d.ts +2 -2
- package/lib/FormItem/compoments/formFile/index.js +1 -1
- package/lib/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/lib/FormItem/compoments/formSelect/index.d.ts +1 -1
- package/lib/FormItem/component.json +171 -0
- package/lib/FormItem/index.d.ts +5 -5
- package/lib/FormItem/index.js +1 -1
- package/lib/FormItem/itemType.js +1 -1
- package/lib/FunctionModal/component.json +197 -0
- package/lib/FunctionModal/dialog.d.ts +1 -1
- package/lib/FunctionModal/modalContext.d.ts +4 -1
- package/lib/GlobalContext/confirmLocale.js +1 -1
- package/lib/GlobalContext/index.js +1 -1
- package/lib/Help/component.json +118 -0
- package/lib/HelperText/component.json +126 -0
- package/lib/Image/PreviewGroup.js +1 -1
- package/lib/Image/component.json +165 -0
- package/lib/Image/index.js +1 -1
- package/lib/InputCode/component.json +191 -0
- package/lib/InputCode/index.d.ts +2 -2
- package/lib/InputLang/component.json +205 -0
- package/lib/InputLang/index.js +1 -1
- package/lib/InputNumber/component.json +162 -0
- package/lib/Label/component.json +126 -0
- package/lib/Label/index.d.ts +2 -2
- package/lib/Loading/component.json +91 -0
- package/lib/Menu/component.json +180 -0
- package/lib/Menu/verticalMenuList.js +1 -1
- package/lib/Message/component.json +246 -0
- package/lib/Message/index.d.ts +2 -2
- package/lib/Message/index.js +1 -1
- package/lib/Modal/Confirm/index.d.ts +1 -1
- package/lib/Modal/Confirm/index.js +1 -1
- package/lib/Modal/component.json +277 -0
- package/lib/Modal/index.d.ts +85 -5
- package/lib/Modal/index.js +1 -1
- package/lib/Modal/interface.d.ts +1 -0
- package/lib/MultiBox/component.json +216 -0
- package/lib/MultiBox/index.js +1 -1
- package/lib/Notification/component.json +184 -0
- package/lib/OperateBtn/component.json +134 -0
- package/lib/OperateBtn/index.d.ts +3 -3
- package/lib/PageHeader/component.json +112 -0
- package/lib/PageHeader/horizontalMeun.js +1 -1
- package/lib/PageHeader/horizontalMeunRight.js +1 -1
- package/lib/Pagination/component.json +181 -0
- package/lib/Pagination/index.js +1 -1
- package/lib/ParauiProvider/index.js +1 -1
- package/lib/PasswordRules/component.json +105 -0
- package/lib/PasswordRules/index.d.ts +4 -4
- package/lib/PopConfirm/component.json +227 -0
- package/lib/PopConfirm/index.d.ts +1 -1
- package/lib/PopConfirm/index.js +1 -1
- package/lib/PopMenu/component.json +131 -0
- package/lib/PopMenu/hooks.d.ts +1 -1
- package/lib/PopMenu/index.js +1 -1
- package/lib/Popover/component.json +165 -0
- package/lib/Popover/index.js +1 -1
- package/lib/Progress/component.json +161 -0
- package/lib/Prompt/component.json +144 -0
- package/lib/Querying/component.json +96 -0
- package/lib/Querying/index.css +1 -1
- package/lib/Querying/index.d.ts +2 -2
- package/lib/Querying/index.js +1 -1
- package/lib/Querying/style/index.css +1 -1
- package/lib/QuickReply/QuickReplyCode/index.js +1 -1
- package/lib/QuickReply/component.json +129 -0
- package/lib/QuickReply/index.d.ts +1 -1
- package/lib/Radio/component.json +136 -0
- package/lib/RadioGroup/component.json +149 -0
- package/lib/RangeInput/component.json +198 -0
- package/lib/RangeInput/index.js +1 -1
- package/lib/Result/component.json +104 -0
- package/lib/ScrollBar/component.json +115 -0
- package/lib/Search/component.json +177 -0
- package/lib/Search/index.d.ts +1 -1
- package/lib/Select/component.json +244 -0
- package/lib/Select/index.js +1 -1
- package/lib/SelectInput/component.json +184 -0
- package/lib/Selector/component.json +203 -0
- package/lib/Selector/index.js +1 -1
- package/lib/Selector/interface.d.ts +2 -2
- package/lib/Selector/selectorData/index.js +1 -1
- package/lib/Selector/selectorMain/index.js +1 -1
- package/lib/Selector/selectorNode/index.js +1 -1
- package/lib/Selector/util.d.ts +3 -3
- package/lib/Selector/util.js +1 -1
- package/lib/SelectorPicker/component.json +179 -0
- package/lib/SelectorPicker/index.d.ts +5 -5
- package/lib/SelectorPicker/index.js +1 -1
- package/lib/SingleBox/component.json +151 -0
- package/lib/SingleBox/index.d.ts +2 -2
- package/lib/Slider/component.json +181 -0
- package/lib/SortBox/component.json +108 -0
- package/lib/Status/component.json +104 -0
- package/lib/Stepper/component.json +129 -0
- package/lib/Stepper/index.d.ts +2 -2
- package/lib/Switch/component.json +207 -0
- package/lib/Switch/index.css +1 -1
- package/lib/Switch/index.d.ts +3 -2
- package/lib/Switch/index.js +1 -1
- package/lib/Switch/style/index.css +1 -1
- package/lib/Table/component.json +547 -0
- package/lib/Table/index.d.ts +2 -2
- package/lib/Table/index.js +1 -1
- package/lib/Table/interface.d.ts +30 -0
- package/lib/Table/tableHead.js +1 -1
- package/lib/Table/util.d.ts +1 -1
- package/lib/Table/util.js +1 -1
- package/lib/Tabs/component.json +227 -0
- package/lib/Tag/component.json +221 -0
- package/lib/Tag/index.css +1 -1
- package/lib/Tag/index.d.ts +1 -1
- package/lib/Tag/index.js +1 -1
- package/lib/Tag/style/index.css +1 -1
- package/lib/TextEditor/component.json +186 -0
- package/lib/TextEditor/index.d.ts +5 -5
- package/lib/TextEditor/index.js +1 -1
- package/lib/TextField/component.json +290 -0
- package/lib/TextField/index.d.ts +2 -2
- package/lib/TextField/index.js +1 -1
- package/lib/TimePicker/component.json +176 -0
- package/lib/Timeline/component.json +110 -0
- package/lib/Title/component.json +156 -0
- package/lib/ToggleButton/component.json +153 -0
- package/lib/ToggleButton/index.js +1 -1
- package/lib/Tooltip/component.json +176 -0
- package/lib/Tooltip/index.js +1 -1
- package/lib/Tooltip/interface.d.ts +14 -1
- package/lib/Tooltip/utils.js +1 -1
- package/lib/Transfer/component.json +157 -0
- package/lib/Tree/OperateBar/index.js +2 -2
- package/lib/Tree/Tree.js +1 -1
- package/lib/Tree/component.json +512 -0
- package/lib/Tree/interface.d.ts +1 -1
- package/lib/Upload/component.json +450 -0
- package/lib/Upload/util.js +1 -1
- package/lib/Utils/snack-kit-shims.d.ts +18 -0
- package/lib/Utils/snack-kit-shims.js +2 -0
- package/lib/Utils/type.d.ts +0 -2
- package/lib/_virtual/index.js +1 -1
- package/lib/_virtual/index2.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -1
- package/lib/locale/en_US.d.ts +361 -0
- package/lib/locale/en_US.js +2 -0
- package/lib/locale/index.d.ts +1 -723
- package/lib/locale/index2.js +2 -0
- package/lib/locale/zh_CN.d.ts +361 -0
- package/lib/locale/zh_CN.js +2 -0
- package/lib/node_modules/classnames/index.js +1 -1
- package/package.json +11 -4
- package/es/_virtual/index3.js +0 -5
- package/es/_virtual/index4.js +0 -5
- package/es/node_modules/@para-snack/core/dist/index.js +0 -5231
- package/lib/_virtual/index3.js +0 -2
- package/lib/_virtual/index4.js +0 -2
- package/lib/node_modules/@para-snack/core/dist/index.js +0 -20
- /package/es/{Utils/Hooks → Hooks}/useResizeObserver.d.ts +0 -0
- /package/es/{Utils/Hooks → Hooks}/useResizeObserver.js +0 -0
- /package/lib/{Utils/Hooks → Hooks}/useResizeObserver.d.ts +0 -0
- /package/lib/{Utils/Hooks → Hooks}/useResizeObserver.js +0 -0
package/lib/Desktop/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const s=require("../_virtual/jsx-runtime.js"),k=require("react"),ft=require("../TextField/index.js"),St=require("@paraview/lib"),et=require("../GlobalContext/constant.js"),U=require("../AutoTips/index.js"),Rt=require("../node_modules/@para-ui/icons/Left/index.js"),vt=require("../Button/index.js"),gt=require("react-dom"),qt=require("../Tooltip/index.js"),jt=require("../GlobalContext/useFormatMessage.js"),Dt=require("./lang/index.js");;/* empty css */const bt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJsAAACbCAYAAAB1YemMAAAgAElEQVR4nO2dB5jc1L32f9LMVtu7XveGAWNMgiEYQguEEmwMtjFggimB0Lmk3EAogfRiIEBukksJuUAI5KN3MNhgG0ILLXRi0ww24IYrrrve3RnpfI800syRRtJImrKzxu/zaFfl6Oico3f+7RQpbAXTaKwDRkrbMGAIMBRoAZqtradPa62XttXAcmAJsBj4CFgAfPJr2tJf5tb+0pFtGo2NwJ7AN4AxwG7AKCBR5kd3AO8D7wCvA68Y+7+mLVXm51YNtniyTaOxHtgPGGdte1SAWHlQENYpxfprHrcDLwJPK/BP4LVfsFmvdNkqhS2SbNNo7AMcARwNjAd6VOrZPqSSrnvvW2lXAo8Djxr/f0Z7RyXKXClsMWSzJNhk4GRgIpAs5/OKJFWYtBuA6QrcATx1Me3dXuJ1e7JNo3EX4AfASUBTqfPPEENxHdv77rRe93pfL3QviOw5JeNo3ArcfBEdiyNWoWrQLck2jcakpSJ/BBxYijyrhFSF0mrAQwpcewGdL3hWpIrRrcg2jcZa4BTgp8AOcfLoJqTKng9I+xJwGYhZPyYl6AboFmSbRmMNcLZFsm3C3LMFkcqVVnGX723g5+eSeiLvlipDVZNtGo1G+b4NXGEFXPPQNaQSjnPlIWAeqXzLYaV/XkFc8kPSr+TdVCWoWrJNo/HrwF+AfXGRKogk3sdbDqnUvJTu9OJ24Gc/QFvqk7TLUHVku5SGZlB+D3xPQTjatjpIFZ2AlIdU0rm8vFuBXxmOxDlomk9WFUdVke0yGqYANygwQD7vJE3wCytElHJKNUpEqvgEdEJFvAmceTb62z5JKoqqINvlNPQ2VKaSiZWZqE5SBUqTwPRlJl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UbW68YpVp3qGVBt1+FzARzq8IODh/rCgYpWsInypyeaHtdBTga8pMFrAUMVYXQJarIXJMT9skmm7TgGtImO4GysBGCGJBcI0HfmgX4nnXXZrAP8fU2SSHI+S6FwAAAAASUVORK5CYII=",h={width:190,height:150,gapX:20,gapY:20};let o=[],nt,Et,i=null;const Gt=.3;let Z=!1,m=null,D=null;const Zt=()=>s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:s.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"70",viewBox:"0 0 100 70",children:[s.jsxRuntimeExports.jsx("path",{id:"路径_18399","data-name":"路径 18399",d:"M3.188,0H43.825c1.76,0,3.079,1.075,3.707,3.307L50,12H0V3.311A3.251,3.251,0,0,1,3.188,0Z",fill:"#2e65e6"}),s.jsxRuntimeExports.jsx("path",{id:"路径_18400","data-name":"路径 18400",d:"M0,0H96.887A3,3,0,0,1,100,2.864V55.136A3,3,0,0,1,96.887,58H3.113A3,3,0,0,1,0,55.136Z",transform:"translate(0 12)",fill:"#d5e0fa"})]})}),it=x=>{const M=k.useRef(null),S=k.useRef(null),{sort:b={},tipMaxWidth:w=500}=x,[v,F]=k.useState(0),[z,rt]=k.useState([]),[p,H]=k.useState("_"),[I,W]=k.useState(!1),[N,Y]=k.useState(""),B=b[p]||[],J=jt.default("Drawer",Dt.default),f={createDir:J({id:"createDir"}),save:J({id:"save"}),outDir:J({id:"outDir"})};k.useEffect(()=>{document.addEventListener("resize",()=>{clearTimeout(nt),nt=setTimeout(()=>{F(K())},200)}),window.addEventListener("mousedown",t=>{t.target?.closest(".menu-list")||S.current&&(S.current.style.display="none")})},[]),k.useEffect(()=>{F(K()),rt(x.data)},[x.data]);const K=()=>{const t=M.current;return t?t.getBoundingClientRect().width/(h.width+h.gapX)|0:1},st=t=>{if(Z)return;const e=t.currentTarget.getAttribute("data-key"),n=L(e??void 0);if(!n||n.disable)return!1;if(n.type!=="dir")return x.onClick&&x.onClick(n),!1;m=n,H(String(n.key))},ot=t=>{if(p==="_"||(t.preventDefault(),Z))return;const e=t.currentTarget.getAttribute("data-key");D=L(e??void 0),y(S.current,t.pageX,t.pageY),S.current&&(S.current.style.display="block")},at=()=>{if(p==="_"||!m||!D)return;const t=_(m.key);if(t){if(t.children=t.children.filter(e=>D&&e!==String(D.key)),V(),t.children.length>0){const e=g(D.key);e&&(e.style.display="none");let n=D.index;const r=o.length-1;for(;n<r;n++){const a=o[n+1];G(a,n)}o.pop()}else o.pop(),delete b[m.key],C();S.current&&(S.current.style.display="none")}},C=()=>{m=null,W(!1),H("_")},A=t=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx("div",{className:"item-dir-body",children:s.jsxRuntimeExports.jsx(Zt,{})}),s.jsxRuntimeExports.jsx(U.default,{className:"item-dir-name",placement:"top-start",tipMaxWidth:w,children:t||f.createDir})]}),E=(t,e,n)=>{o[e]=lt(t,e,n),t=o[e];const r={left:`${o[e].point.x}px`,top:`${o[e].point.y}px`,width:h.width,height:h.height};return s.jsxRuntimeExports.jsx(qt.Tooltip,{followCursor:t.disable,disabled:t.disable,...t.disabledTooltip,children:s.jsxRuntimeExports.jsx("div",{className:`desktop-item${t.type==="dir"?" desktop-dir":""}${t.disable?" item-disable":""}`,onContextMenu:ot,onClick:st,style:r,"data-key":t.key,"data-index":e,children:n==="dir"?A(t.displayName||""):s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx("div",{className:"item-body",children:s.jsxRuntimeExports.jsx("img",{src:t.icon||bt,alt:"icon"})}),s.jsxRuntimeExports.jsx(U.default,{className:"item-name",placement:"top-start",tipMaxWidth:w,children:t.displayName||f.createDir})]})},p+t.key+e+v)},p+t.key+e+v)},lt=(t,e,n)=>{const r=d=>d.data!==void 0,a=r(t)?t.data:t,l=r(t)?t.displayName:t.name;return{index:e,data:a,key:t.key,icon:t.icon,disable:t.disable||!1,type:n||"item",displayName:l,point:T(e),children:t.children||[],disabledTooltip:t.disabledTooltip||{}}},T=t=>{const e=h.width+h.gapX,n=h.height+h.gapY,r=t%v,a=t/v|0;return{x:r*e,y:a*n,width:h.width,height:h.height}},Q=()=>{const t={};return x.data.forEach(e=>{(p==="_"||m&&m.children.indexOf(e.key)!==-1)&&(t[e.key]=e)}),t},dt=k.useMemo(()=>{if(v===0)return null;if(o=[],B.length>0){const t=Q();let e=0,n=B.map(a=>{const{key:l,type:d}=a;if(!t[l]&&d!=="dir")return;const c={...t[l]};delete t[l];let u;if(d==="dir"){let j=!0;if(a.children.forEach(R=>{t[R]&&(j=!1,delete t[R])}),j)return null;u=E(a,e,d)}else u=E(c,e);return e++,u});const r=Object.keys(t);if(r.length>0){const a=r.map(l=>{const d=t[l];return E(d,o.length)});n=[...n,...a]}return n}if(p!=="_"&&m){const t=Q();let e=0;return m.children.map(n=>{if(!t[n])return null;const r=E(t[n],e);return e++,r})}return x.data.map((t,e)=>E(t,e))},[z,v,p]),ct=t=>{if(Z)return;const e=t.target.closest(".desktop-item");if(!e)return;const n=e.getAttribute("data-index");if(!n)return;const r=parseInt(n,10);i={...o[r],target:e,start:{x:t.pageX,y:t.pageY}},e.setAttribute("drag-item","true"),window.addEventListener("mousemove",O),window.addEventListener("mouseup",X)},O=t=>{if(!i)return;Math.abs(i.start.x-t.pageX)>3&&(Z=!0);const e=i.point.x+(t.pageX-i.start.x),n=i.point.y+(t.pageY-i.start.y)+(M.current?.scrollTop||0);y(i.target,e,n);const r={x:e,y:n,w:i.point.x+i.point.width,h:i.point.y+i.point.height,width:i.point.width,height:i.point.height},a={x:r.x+r.width/2,y:r.y+r.height/2};for(let l=0,d=o.length;l<d;l++){const c=o[l];if(!c||String(c.key)===String(i.key)||c.parent&&p!==c.parent)continue;const u={x:c.point.x,y:c.point.y,w:c.point.x+c.point.width,h:c.point.y+c.point.height};let j=Gt;if(ut(a,u)){const R=g(c.key);if(!R)continue;q("impact"),R.setAttribute("impact","true"),i.impact={data:c,rect:u},i.impact={data:c,rect:u},(i.data.type==="dir"||p!=="_")&&(j=.5);const $={x:r.x+r.width/2},tt=c.point.width;$.x<u.x+tt*j?(i.position="left",y(R,u.x+50)):$.x>u.w-tt*j?(i.position="right",y(R,u.x-50)):(i.position="centre",y(R,u.x));break}else q("impact")}},ut=(t,e)=>{if(t.x>e.x&&t.y>e.y&&t.x<e.w&&t.y<e.h)return t},X=()=>{if(window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",X),setTimeout(()=>{Z=!1},100),!!i){if(i.impact){const t={...o[i.index]},e=i.impact.data,n=g(e.key);if(e.index-i.index===-1&&i.position==="right"||e.index-i.index===1&&i.position==="left"||i.type==="dir"&&i.position==="centre"){y(i.target,i.point.x,i.point.y),q();return}let r=e.index,a,l=i.index,d=r;r>i.index?(a="R",i.position==="left"&&(d--,y(n,e.point.x,e.point.y),r--)):(a="L",i.position==="right"&&(d++,y(n,e.point.x,e.point.y),r++)),{...o[r]};let c;if(i.position==="centre"){for(d=i.index,l=o.length-1;d<l;d++){const u=o[d+1];G(u,d)}o.pop()}else{if(c={...o[l]},a==="R")for(;l<d;l++){const u=o[l+1];G(u,l)}if(a==="L")for(;l>d;l--){const u=o[l-1];G(u,l)}G(c,d)}i.position==="centre"&&(e.type==="dir"?mt(e,t):pt(e,t,a)),q("end");return}else y(i.target,i.point.x,i.point.y);q()}},pt=(t,e,n)=>{n==="R"&&t.index--;const r=`dir_${t.key}${Math.random()*1e6|0}`;o[t.index]={...t,key:r,point:T(t.index),type:"dir",displayName:f.createDir,children:[String(t.key),String(e.key)]};const a=g(t.key);a?.setAttribute("data-key",r),a?.classList.add("desktop-dir"),gt.render(A(o[t.index].displayName||""),a),g(String(e.key))?.setAttribute("in-dir","true")},mt=(t,e)=>{const n=L(t.key);if(!n||!i)return;n.children.push(String(e.key)),g(i.key)?.setAttribute("in-dir","true")},L=t=>{if(!t)return null;for(let e=0,n=o.length;e<n;e++)if(String(o[e].key)===String(t))return o[e];return null},G=(t,e,n)=>{if(!t)return;n||(n=T(e));const r=g(String(t.key));r&&(y(r,n?.x,n?.y),o[e]={...t},o[e].index=e,o[e].point=n,r?.setAttribute("data-index",String(e)))},q=t=>{switch(t){case"impact":const e=document.querySelector('[impact="true"]');if(!e)return;i&&i.impact&&(y(e,i.impact.rect.x,i.impact.rect.y),delete i.impact),e?.removeAttribute("impact");break;case"end":i=null,document.querySelector('[impact="true"]')?.removeAttribute("impact"),document.querySelector('[drag-item="true"]')?.removeAttribute("drag-item"),clearTimeout(Et),V();break;default:q("impact"),i=null,document.querySelector('[drag-item="true"]')?.removeAttribute("drag-item"),window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",X)}},y=(t,e,n)=>{t&&((e!==void 0||e!==null)&&(t.style.left=`${e}px`),(n!==void 0||n!==null)&&(t.style.top=`${n}px`))},V=()=>{if(!x.onSort)return;const t=[];let e=0;o.forEach(r=>{t[e]={key:r.key,type:r.type},r.displayName!==void 0&&(t[e].displayName=r.displayName),r.children.length>0&&(t[e].children=r.children),r.parent!==void 0&&(t[e].parent=r.parent),e++});const n=St.DeepClone(b);t.length>0&&(n[p]=t),x.onSort&&x.onSort(n)},xt=()=>{W(!0),Y(m?.displayName||f.createDir)},P=()=>{if(!m)return;m.displayName=N||f.createDir,W(!1);const t=_(m.key);t&&(t.displayName=N||f.createDir),V()},_=t=>{const e=b._||[];for(let n=0,r=e.length;n<r;n++){const a=e[n];if(a.key===t)return a}},kt=k.useMemo(()=>p!=="_"&&s.jsxRuntimeExports.jsx("div",{className:"desktop-title",children:s.jsxRuntimeExports.jsxs("div",{className:"desktop-backlist",children:[s.jsxRuntimeExports.jsx("div",{className:"desktop-back-hotarea",onClick:C,children:s.jsxRuntimeExports.jsx(Rt.Left,{size:"medium"})}),s.jsxRuntimeExports.jsx("div",{className:"desktop-title-wrapper",children:I?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ft.TextField,{className:"desktop-title-input",value:N,autoFocus:!0,onChange:t=>Y(t.target.value),onBlur:()=>{P()},onEnter:P}),s.jsxRuntimeExports.jsx(vt.Button,{className:"desktop-title-input-btn",onClick:P,children:f.save})]}):s.jsxRuntimeExports.jsx(U.default,{tipMaxWidth:w,style:{maxWidth:"calc(100% - 78px)"},className:`${et.$prefixCls}-cp`,children:s.jsxRuntimeExports.jsx("span",{onDoubleClick:xt,children:m?.displayName||f.createDir})})})]})}),[p,I,N]),yt=k.useMemo(()=>s.jsxRuntimeExports.jsx("div",{ref:M,className:"desktop-box",onMouseDown:ct,children:dt}),[v,z,p,b]),ht=()=>{let t=`${et.$prefixCls}-desktop`;return x.className&&(t+=` ${x.className}`),t},g=t=>M.current?.querySelector(`.desktop-item[data-key="${t}"]`);return s.jsxRuntimeExports.jsxs("div",{className:ht(),style:x.style,children:[kt,s.jsxRuntimeExports.jsx("div",{className:`${p!=="_"?"pd-lr38":""}`,children:yt}),s.jsxRuntimeExports.jsx("div",{ref:S,className:"menu-list",children:s.jsxRuntimeExports.jsx("div",{className:"menu-item",onClick:at,children:f.outDir})})]})};exports.Desktop=it;exports.default=it;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const s=require("../_virtual/jsx-runtime.js"),k=require("react"),ft=require("../TextField/index.js"),St=require("@snack-kit/lib"),et=require("../GlobalContext/constant.js"),U=require("../AutoTips/index.js"),Rt=require("../node_modules/@para-ui/icons/Left/index.js"),vt=require("../Button/index.js"),gt=require("react-dom"),jt=require("../Tooltip/index.js"),qt=require("../GlobalContext/useFormatMessage.js"),Dt=require("./lang/index.js");;/* empty css */const bt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJsAAACbCAYAAAB1YemMAAAgAElEQVR4nO2dB5jc1L32f9LMVtu7XveGAWNMgiEYQguEEmwMtjFggimB0Lmk3EAogfRiIEBukksJuUAI5KN3MNhgG0ILLXRi0ww24IYrrrve3Rnp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gl5YC0O8OurDjH0LM/6tFB311UbIQul9nmXYZwcNC1j8pZyoqBp1YzzpT75DeuhwxD04ehgKq1Q/tRp0f7Wowkr2Tlj/jer/3LLPuoRodLVkk/EUiQNXI6ZvQvSOMqo3aPaWl4pVqkQVlkJCFsrP2hYChwx1LRPfFehSySZjHNrzA6HvEJR7FRTh55kGjfoI47W60dWSJ04eIfMzVuyeNhR2qAaiUU2STcazKLtsRExfByMKSbKgiTF+0q2YSTJEkDxd5Szo8BKZkbVlDdJGRVWSzcaz8L318Md26FGqUb02GatFFZbSWdBhmQ6nDzF8rypEVZPNwIugpuGqDXBuGmqjeqp+NlzYGfXuc+79KiHkBh1+MhhuoopR9WSz8TLUp+EvrfBdzUW6QqrTL013dxZ0WKfDHwbDFXQDdBuy2XgVkhpcsRm+r1nqNSrpyhl788uvlKTWYaUOvx4EN+a3UPWi25FNxutwVgp+1mk5EkEz6v22anEWCuUhzI8O87qAnwyC5wq3TvWhW5PNxtvwFR2u1OFQHRoLeaZuB6KabTMdVutwvw6/HGR8KqobY4sgm4x3YbKASwTsqUJdUDdWtToLOqzX4RkdfjMQ/hO9FaoTWxzZZMyHsQqcq8I3FegT1J9aCmchKE3QdQG6lglbzDIM/oHwUXE1r05s0WST8Qn0VOGMBExJwC5J6FMDald01GuQ1mG5gJd1uEvAowMqNKasK/GlIZsXVsC+KhydhN1rYIcEDFShUbW68YpVp3qGVBt1+FzARzq8IODh/rCgYpWsInypyeaHtdBTga8pMFrAUMVYXQJarIXJMT9skmm7TgGtImO4GysBGCGJBcI0HfmgX4nnXXZrAP8fU2SSHI+S6FwAAAAASUVORK5CYII=",h={width:190,height:150,gapX:20,gapY:20};let o=[],nt,Et,i=null;const Gt=.3;let Z=!1,m=null,D=null;const Zt=()=>s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:s.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"70",viewBox:"0 0 100 70",children:[s.jsxRuntimeExports.jsx("path",{id:"路径_18399","data-name":"路径 18399",d:"M3.188,0H43.825c1.76,0,3.079,1.075,3.707,3.307L50,12H0V3.311A3.251,3.251,0,0,1,3.188,0Z",fill:"#2e65e6"}),s.jsxRuntimeExports.jsx("path",{id:"路径_18400","data-name":"路径 18400",d:"M0,0H96.887A3,3,0,0,1,100,2.864V55.136A3,3,0,0,1,96.887,58H3.113A3,3,0,0,1,0,55.136Z",transform:"translate(0 12)",fill:"#d5e0fa"})]})}),it=x=>{const M=k.useRef(null),S=k.useRef(null),{sort:b={},tipMaxWidth:w=500}=x,[v,F]=k.useState(0),[z,rt]=k.useState([]),[p,H]=k.useState("_"),[I,W]=k.useState(!1),[N,Y]=k.useState(""),B=b[p]||[],J=qt.default("Drawer",Dt.default),f={createDir:J({id:"createDir"}),save:J({id:"save"}),outDir:J({id:"outDir"})};k.useEffect(()=>{document.addEventListener("resize",()=>{clearTimeout(nt),nt=setTimeout(()=>{F(K())},200)}),window.addEventListener("mousedown",t=>{t.target?.closest(".menu-list")||S.current&&(S.current.style.display="none")})},[]),k.useEffect(()=>{F(K()),rt(x.data)},[x.data]);const K=()=>{const t=M.current;return t?t.getBoundingClientRect().width/(h.width+h.gapX)|0:1},st=t=>{if(Z)return;const e=t.currentTarget.getAttribute("data-key"),n=L(e??void 0);if(!n||n.disable)return!1;if(n.type!=="dir")return x.onClick&&x.onClick(n),!1;m=n,H(String(n.key))},ot=t=>{if(p==="_"||(t.preventDefault(),Z))return;const e=t.currentTarget.getAttribute("data-key");D=L(e??void 0),y(S.current,t.pageX,t.pageY),S.current&&(S.current.style.display="block")},at=()=>{if(p==="_"||!m||!D)return;const t=_(m.key);if(t){if(t.children=t.children.filter(e=>D&&e!==String(D.key)),V(),t.children.length>0){const e=g(D.key);e&&(e.style.display="none");let n=D.index;const r=o.length-1;for(;n<r;n++){const a=o[n+1];G(a,n)}o.pop()}else o.pop(),delete b[m.key],C();S.current&&(S.current.style.display="none")}},C=()=>{m=null,W(!1),H("_")},A=t=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx("div",{className:"item-dir-body",children:s.jsxRuntimeExports.jsx(Zt,{})}),s.jsxRuntimeExports.jsx(U.default,{className:"item-dir-name",placement:"top-start",tipMaxWidth:w,children:t||f.createDir})]}),E=(t,e,n)=>{o[e]=lt(t,e,n),t=o[e];const r={left:`${o[e].point.x}px`,top:`${o[e].point.y}px`,width:h.width,height:h.height};return s.jsxRuntimeExports.jsx(jt.Tooltip,{followCursor:t.disable,disabled:t.disable,...t.disabledTooltip,children:s.jsxRuntimeExports.jsx("div",{className:`desktop-item${t.type==="dir"?" desktop-dir":""}${t.disable?" item-disable":""}`,onContextMenu:ot,onClick:st,style:r,"data-key":t.key,"data-index":e,children:n==="dir"?A(t.displayName||""):s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx("div",{className:"item-body",children:s.jsxRuntimeExports.jsx("img",{src:t.icon||bt,alt:"icon"})}),s.jsxRuntimeExports.jsx(U.default,{className:"item-name",placement:"top-start",tipMaxWidth:w,children:t.displayName||f.createDir})]})},p+t.key+e+v)},p+t.key+e+v)},lt=(t,e,n)=>{const r=d=>d.data!==void 0,a=r(t)?t.data:t,l=r(t)?t.displayName:t.name;return{index:e,data:a,key:t.key,icon:t.icon,disable:t.disable||!1,type:n||"item",displayName:l,point:T(e),children:t.children||[],disabledTooltip:t.disabledTooltip||{}}},T=t=>{const e=h.width+h.gapX,n=h.height+h.gapY,r=t%v,a=t/v|0;return{x:r*e,y:a*n,width:h.width,height:h.height}},Q=()=>{const t={};return x.data.forEach(e=>{(p==="_"||m&&m.children.indexOf(e.key)!==-1)&&(t[e.key]=e)}),t},dt=k.useMemo(()=>{if(v===0)return null;if(o=[],B.length>0){const t=Q();let e=0,n=B.map(a=>{const{key:l,type:d}=a;if(!t[l]&&d!=="dir")return;const c={...t[l]};delete t[l];let u;if(d==="dir"){let q=!0;if(a.children.forEach(R=>{t[R]&&(q=!1,delete t[R])}),q)return null;u=E(a,e,d)}else u=E(c,e);return e++,u});const r=Object.keys(t);if(r.length>0){const a=r.map(l=>{const d=t[l];return E(d,o.length)});n=[...n,...a]}return n}if(p!=="_"&&m){const t=Q();let e=0;return m.children.map(n=>{if(!t[n])return null;const r=E(t[n],e);return e++,r})}return x.data.map((t,e)=>E(t,e))},[z,v,p]),ct=t=>{if(Z)return;const e=t.target.closest(".desktop-item");if(!e)return;const n=e.getAttribute("data-index");if(!n)return;const r=parseInt(n,10);i={...o[r],target:e,start:{x:t.pageX,y:t.pageY}},e.setAttribute("drag-item","true"),window.addEventListener("mousemove",O),window.addEventListener("mouseup",X)},O=t=>{if(!i)return;Math.abs(i.start.x-t.pageX)>3&&(Z=!0);const e=i.point.x+(t.pageX-i.start.x),n=i.point.y+(t.pageY-i.start.y)+(M.current?.scrollTop||0);y(i.target,e,n);const r={x:e,y:n,w:i.point.x+i.point.width,h:i.point.y+i.point.height,width:i.point.width,height:i.point.height},a={x:r.x+r.width/2,y:r.y+r.height/2};for(let l=0,d=o.length;l<d;l++){const c=o[l];if(!c||String(c.key)===String(i.key)||c.parent&&p!==c.parent)continue;const u={x:c.point.x,y:c.point.y,w:c.point.x+c.point.width,h:c.point.y+c.point.height};let q=Gt;if(ut(a,u)){const R=g(c.key);if(!R)continue;j("impact"),R.setAttribute("impact","true"),i.impact={data:c,rect:u},i.impact={data:c,rect:u},(i.data.type==="dir"||p!=="_")&&(q=.5);const $={x:r.x+r.width/2},tt=c.point.width;$.x<u.x+tt*q?(i.position="left",y(R,u.x+50)):$.x>u.w-tt*q?(i.position="right",y(R,u.x-50)):(i.position="centre",y(R,u.x));break}else j("impact")}},ut=(t,e)=>{if(t.x>e.x&&t.y>e.y&&t.x<e.w&&t.y<e.h)return t},X=()=>{if(window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",X),setTimeout(()=>{Z=!1},100),!!i){if(i.impact){const t={...o[i.index]},e=i.impact.data,n=g(e.key);if(e.index-i.index===-1&&i.position==="right"||e.index-i.index===1&&i.position==="left"||i.type==="dir"&&i.position==="centre"){y(i.target,i.point.x,i.point.y),j();return}let r=e.index,a,l=i.index,d=r;r>i.index?(a="R",i.position==="left"&&(d--,y(n,e.point.x,e.point.y),r--)):(a="L",i.position==="right"&&(d++,y(n,e.point.x,e.point.y),r++)),{...o[r]};let c;if(i.position==="centre"){for(d=i.index,l=o.length-1;d<l;d++){const u=o[d+1];G(u,d)}o.pop()}else{if(c={...o[l]},a==="R")for(;l<d;l++){const u=o[l+1];G(u,l)}if(a==="L")for(;l>d;l--){const u=o[l-1];G(u,l)}G(c,d)}i.position==="centre"&&(e.type==="dir"?mt(e,t):pt(e,t,a)),j("end");return}else y(i.target,i.point.x,i.point.y);j()}},pt=(t,e,n)=>{n==="R"&&t.index--;const r=`dir_${t.key}${Math.random()*1e6|0}`;o[t.index]={...t,key:r,point:T(t.index),type:"dir",displayName:f.createDir,children:[String(t.key),String(e.key)]};const a=g(t.key);a?.setAttribute("data-key",r),a?.classList.add("desktop-dir"),gt.render(A(o[t.index].displayName||""),a),g(String(e.key))?.setAttribute("in-dir","true")},mt=(t,e)=>{const n=L(t.key);if(!n||!i)return;n.children.push(String(e.key)),g(i.key)?.setAttribute("in-dir","true")},L=t=>{if(!t)return null;for(let e=0,n=o.length;e<n;e++)if(String(o[e].key)===String(t))return o[e];return null},G=(t,e,n)=>{if(!t)return;n||(n=T(e));const r=g(String(t.key));r&&(y(r,n?.x,n?.y),o[e]={...t},o[e].index=e,o[e].point=n,r?.setAttribute("data-index",String(e)))},j=t=>{switch(t){case"impact":const e=document.querySelector('[impact="true"]');if(!e)return;i&&i.impact&&(y(e,i.impact.rect.x,i.impact.rect.y),delete i.impact),e?.removeAttribute("impact");break;case"end":i=null,document.querySelector('[impact="true"]')?.removeAttribute("impact"),document.querySelector('[drag-item="true"]')?.removeAttribute("drag-item"),clearTimeout(Et),V();break;default:j("impact"),i=null,document.querySelector('[drag-item="true"]')?.removeAttribute("drag-item"),window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",X)}},y=(t,e,n)=>{t&&((e!==void 0||e!==null)&&(t.style.left=`${e}px`),(n!==void 0||n!==null)&&(t.style.top=`${n}px`))},V=()=>{if(!x.onSort)return;const t=[];let e=0;o.forEach(r=>{t[e]={key:r.key,type:r.type},r.displayName!==void 0&&(t[e].displayName=r.displayName),r.children.length>0&&(t[e].children=r.children),r.parent!==void 0&&(t[e].parent=r.parent),e++});const n=St.DeepClone(b);t.length>0&&(n[p]=t),x.onSort&&x.onSort(n)},xt=()=>{W(!0),Y(m?.displayName||f.createDir)},P=()=>{if(!m)return;m.displayName=N||f.createDir,W(!1);const t=_(m.key);t&&(t.displayName=N||f.createDir),V()},_=t=>{const e=b._||[];for(let n=0,r=e.length;n<r;n++){const a=e[n];if(a.key===t)return a}},kt=k.useMemo(()=>p!=="_"&&s.jsxRuntimeExports.jsx("div",{className:"desktop-title",children:s.jsxRuntimeExports.jsxs("div",{className:"desktop-backlist",children:[s.jsxRuntimeExports.jsx("div",{className:"desktop-back-hotarea",onClick:C,children:s.jsxRuntimeExports.jsx(Rt.Left,{size:"medium"})}),s.jsxRuntimeExports.jsx("div",{className:"desktop-title-wrapper",children:I?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ft.TextField,{className:"desktop-title-input",value:N,autoFocus:!0,onChange:t=>Y(t.target.value),onBlur:()=>{P()},onEnter:P}),s.jsxRuntimeExports.jsx(vt.Button,{className:"desktop-title-input-btn",onClick:P,children:f.save})]}):s.jsxRuntimeExports.jsx(U.default,{tipMaxWidth:w,style:{maxWidth:"calc(100% - 78px)"},className:`${et.$prefixCls}-cp`,children:s.jsxRuntimeExports.jsx("span",{onDoubleClick:xt,children:m?.displayName||f.createDir})})})]})}),[p,I,N]),yt=k.useMemo(()=>s.jsxRuntimeExports.jsx("div",{ref:M,className:"desktop-box",onMouseDown:ct,children:dt}),[v,z,p,b]),ht=()=>{let t=`${et.$prefixCls}-desktop`;return x.className&&(t+=` ${x.className}`),t},g=t=>M.current?.querySelector(`.desktop-item[data-key="${t}"]`);return s.jsxRuntimeExports.jsxs("div",{className:ht(),style:x.style,children:[kt,s.jsxRuntimeExports.jsx("div",{className:`${p!=="_"?"pd-lr38":""}`,children:yt}),s.jsxRuntimeExports.jsx("div",{ref:S,className:"menu-list",children:s.jsxRuntimeExports.jsx("div",{className:"menu-item",onClick:at,children:f.outDir})})]})};exports.Desktop=it;exports.default=it;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "DragVerify",
|
|
3
|
+
"category": "Data Entry",
|
|
4
|
+
"description": "拖拽验证,用于人机验证",
|
|
5
|
+
"semantic": {
|
|
6
|
+
"intent": [
|
|
7
|
+
"人机验证",
|
|
8
|
+
"安全校验"
|
|
9
|
+
],
|
|
10
|
+
"useCases": [
|
|
11
|
+
"登录验证",
|
|
12
|
+
"表单提交",
|
|
13
|
+
"敏感操作"
|
|
14
|
+
],
|
|
15
|
+
"riskLevel": "high"
|
|
16
|
+
},
|
|
17
|
+
"variants": {
|
|
18
|
+
"default": {
|
|
19
|
+
"meaning": "默认样式"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"states": [
|
|
23
|
+
"default",
|
|
24
|
+
"success",
|
|
25
|
+
"error"
|
|
26
|
+
],
|
|
27
|
+
"idealProps": {
|
|
28
|
+
"getImgInfo": {
|
|
29
|
+
"type": "function",
|
|
30
|
+
"signature": "() => Promise<DragVerifyImgProps> | DragVerifyImgProps",
|
|
31
|
+
"required": true,
|
|
32
|
+
"description": "获取图片接口;返回 DragVerifyImgProps 接口(src/DragVerify/index.tsx:18 已 export),字段:sourceImage(string? 背景图 URL)、newImage(string? 滑块拼图 URL)、y(number? Y 轴目标位置 px,src 内部用 `imgInfo.y!/imgScale` 定位,**不传会 NaN**)、可挂任意扩展字段(`[k]: string|number|undefined`)。⚠️ 业务侧常错猜字段名 bgUrl/sliderUrl/xPos — 实际是 sourceImage/newImage/y。组件在挂载与 refresh 变化时调用此接口"
|
|
33
|
+
},
|
|
34
|
+
"verify": {
|
|
35
|
+
"type": "function",
|
|
36
|
+
"signature": "(xPos: number, imgInfo: DragVerifyImgProps) => Promise<boolean> | boolean",
|
|
37
|
+
"required": true,
|
|
38
|
+
"description": "提交校验接口;xPos = 用户滑动落点的 x 坐标(已按图片真实尺寸缩放回原图坐标);⚠️ 返回 **true = 通过 / false = 不通过**(src/DragVerify/index.tsx:42-46 注释实证)。组件根据返回值切换 success/error class。**目前无 onSuccess/onError 回调 prop**,父组件感知验证结果的唯一办法是在 verify 内部包装一层拦截返回值(见 codeString.ts verifyWithCallback 示例);后续可能升级,见 discussions/DragVerify-onSuccess-onError-callback-epic.md"
|
|
39
|
+
},
|
|
40
|
+
"refresh": {
|
|
41
|
+
"type": "string | number",
|
|
42
|
+
"description": "刷新触发器;⚠️ 实际类型 string|number(组件 src/DragVerify/index.tsx:39 实证,旧 api.ts 写 any 不准);组件 useEffect 监听该值,值变化即重新调用 getImgInfo 并复位 state。典型用法:外层 useState<number> 自增"
|
|
43
|
+
},
|
|
44
|
+
"width": {
|
|
45
|
+
"type": "number | string",
|
|
46
|
+
"description": "图片框宽度;number 视为 px(如 300 → 300px),string 直接透传(支持 '100%' / '80vw' 等响应式单位,src handStyle 实证);未传则 CSS 默认"
|
|
47
|
+
},
|
|
48
|
+
"height": {
|
|
49
|
+
"type": "number | string",
|
|
50
|
+
"description": "图片框高度;number 视为 px,string 直接透传;未传则 CSS 默认"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"do": [
|
|
54
|
+
"在需要防止机器人的场景使用(登录/注册/敏感操作)",
|
|
55
|
+
"提供刷新和重试机制:父组件维护 useState<number> 计数器,每次刷新时 setRefresh(n+1) 触发组件重新获取图片",
|
|
56
|
+
"通过 verify 包装层感知验证结果(组件无 onSuccess/onError 回调,在 verify 内拦截返回值):verify={async (x, info) => { const ok = await api.check(x, info); if (ok) toast('验证通过'); return ok; }}",
|
|
57
|
+
"若 API 返回字段名不是 sourceImage/newImage/y:在 getImgInfo 内部做字段映射后返回标准 DragVerifyImgProps"
|
|
58
|
+
],
|
|
59
|
+
"dont": [
|
|
60
|
+
"在低风险操作中使用(增加用户摩擦,适用登录/支付/批量操作等场景)",
|
|
61
|
+
"猜测 DragVerifyImgProps 字段名为 bgUrl/sliderUrl/xPos——实际是 sourceImage/newImage/y(见 src/DragVerify/index.tsx:18 interface 实证)",
|
|
62
|
+
"在 verify 内总是 return true——绕过验证,失去安全意义"
|
|
63
|
+
],
|
|
64
|
+
"events": {
|
|
65
|
+
"getImgInfo": {
|
|
66
|
+
"signature": "() => Promise<DragVerifyImgProps> | DragVerifyImgProps",
|
|
67
|
+
"asyncSupported": true,
|
|
68
|
+
"examples": [
|
|
69
|
+
"异步获取:getImgInfo={async () => { const res = await api.getCaptcha(); return { sourceImage: res.bg, newImage: res.slider, y: res.yPos }; }}",
|
|
70
|
+
"组件在挂载时和 refresh prop 变化时自动调用此函数",
|
|
71
|
+
"返回值字段:sourceImage(背景图 URL)、newImage(滑块图 URL)、y(滑块 Y 轴位置 px)"
|
|
72
|
+
],
|
|
73
|
+
"commonMistakes": [
|
|
74
|
+
"直接返回 API 响应对象未映射字段名——API 字段 bgUrl/sliderImg/yOffset 需映射为 sourceImage/newImage/y",
|
|
75
|
+
"y 字段不传导致 NaN——src 内部用 imgInfo.y!/imgScale 定位,缺失 y 会 NaN,滑块位置异常",
|
|
76
|
+
"期望 getImgInfo 在用户刷新时自动调用——刷新需要父组件修改 refresh prop 值"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"verify": {
|
|
80
|
+
"signature": "(xPos: number, imgInfo: DragVerifyImgProps) => Promise<boolean> | boolean",
|
|
81
|
+
"asyncSupported": true,
|
|
82
|
+
"examples": [
|
|
83
|
+
"API 校验:verify={async (x, info) => { const ok = await api.verify({ x, ...info }); return ok; }}",
|
|
84
|
+
"返回 true=通过(组件显示成功状态),返回 false=失败(组件显示错误状态并自动重置)",
|
|
85
|
+
"在 verify 内包装 onSuccess 回调:verify={async (x, info) => { const ok = await check(x); if (ok) onSuccess(); return ok; }}"
|
|
86
|
+
],
|
|
87
|
+
"commonMistakes": [
|
|
88
|
+
"期望通过 verify 回调外的 onSuccess prop 感知成功——组件无 onSuccess/onError prop,需在 verify 内包装",
|
|
89
|
+
"返回非 boolean 类型(如 '1'/'0' 字符串)——truthiness 判断可能意外通过,必须返回 boolean"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"typescriptPitfalls": [
|
|
94
|
+
{
|
|
95
|
+
"issue": "DragVerifyImgProps 字段名是 sourceImage/newImage/y,不是 bgUrl/sliderUrl/xPos",
|
|
96
|
+
"wrong": "getImgInfo={async () => ({ bgUrl: res.bg, sliderUrl: res.slider, yPos: res.y })} // 字段名不匹配,图片不显示",
|
|
97
|
+
"right": "getImgInfo={async () => ({ sourceImage: res.bg, newImage: res.slider, y: res.y })} // 正确字段名"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"issue": "getImgInfo 和 verify 是必填 prop(无问号),不传会 TS 报错",
|
|
101
|
+
"wrong": "<DragVerify /> // 缺少必填 getImgInfo 和 verify",
|
|
102
|
+
"right": "<DragVerify getImgInfo={fetchCaptcha} verify={verifyCaptcha} />"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"issue": "refresh prop 的实际类型是 string|number,不是 any",
|
|
106
|
+
"wrong": "const [refresh, setRefresh] = useState<boolean>(false); // boolean 类型赋给 string|number 会 TS 报错",
|
|
107
|
+
"right": "const [refresh, setRefresh] = useState<number>(0);\n// 刷新时:setRefresh(prev => prev + 1)"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"mapping": {
|
|
111
|
+
"realComponent": "DragVerify",
|
|
112
|
+
"adapter": null
|
|
113
|
+
}
|
|
114
|
+
}
|
package/lib/DragVerify/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const o=require("../_virtual/jsx-runtime.js"),m=require("react"),_=require("clsx"),O=require("../node_modules/@para-ui/icons/DoubleRight/index.js"),z=require("../node_modules/@para-ui/icons/Close/index.js"),G=require("../node_modules/@para-ui/icons/Check/index.js"),J=require("../node_modules/@para-ui/icons/Refresh/index.js"),K=require("../GlobalContext/constant.js"),Q=require("../GlobalContext/useFormatMessage.js"),U=require("./lang/index.js"),Y=require("../Loading/index.js");;/* empty css */const $=I=>{const{className:L,style:N,refresh:k,getImgInfo:j,verify:R,width:a,height:g}=I,v=Q.default("DragVerify",U.default),[D,C]=m.useState(),[M,q]=m.useState(!1),c=m.useRef(null),t=m.useRef({getImgInfo:j,verify:R}),l=`${K.$prefixCls}-drag-verify`;t.current.getImgInfo=j,t.current.verify=R,m.useEffect(()=>(w(),S(),()=>{clearTimeout(t.current.timerError),clearTimeout(t.current.timerSuccess)}),[k,D]);const S=async()=>{t.current.padding=!0,q(!0);const e=await t.current.getImgInfo();t.current.imgInfo=e,H()},T=async(e,s)=>{const r=await t.current.verify(e,t.current.imgInfo);s(r)},H=()=>{if(!c.current)return;const e=document.createElement("img");e.setAttribute("src",t.current.imgInfo?.sourceImage),e.style.display="none";const s=document.createElement("img");t.current.imgMove=s,s.className="slider-img-move",s.style.display="none";const r=c.current.querySelector(".slider-img"),i=c.current.querySelector(".refresh");!r||!i||(i.style.display="none",r.innerHTML="",r.append(e),e.onload=()=>{e.style.display="inline-block",s.setAttribute("src",t.current.imgInfo?.newImage);const p=e.width;if(e.className="slider-img-bg",e.style.display="inline-block",!c.current)return;const f=c.current.querySelector(".slider-img"),x=f?.clientWidth;t.current.imgScale=p/x,f?.append(s),s.onload=()=>{t.current.padding=!1,s.style.display="inline-block",i.style.display="inline-block",s.width=s.width/t.current.imgScale,s.style.top=`${t.current.imgInfo?.y/t.current.imgScale}px`,q(!1)}},W(e,s))},W=(e,s)=>{const r=c.current;if(!r)return;const i=r.querySelector(".slider-move-box"),p=r.querySelector(".slider-move-mask"),f=r.querySelector(".slider-move"),x=r.querySelector(".slider-move-text"),A=f.getBoundingClientRect(),h=i.getBoundingClientRect().width,B=A.width,E=(u,d)=>{let n=u.pageX-d.pageX;n<0&&(n=0),n+h>e.width&&(n=e.width-h),i.style.left=`${n-1}px`,p.style.width=`${n<2?2:n}px`;const y=n/(B-h),V=(e.width-s.width)*y;s.style.left=`${V}px`,x.innerHTML=""},b=()=>{r.classList.remove(`${l}-move`),t.current.padding=!0;const d=parseFloat(s.style.left)*t.current.imgScale;T(d,n=>{if(!n){r.classList.add(`${l}-error`),t.current.timerError=setTimeout(()=>{t.current.padding=!1,w(),x.innerHTML=v({id:"tryAgain"}),S()},1e3);return}r.classList.add(`${l}-success`)})};i.onmousedown=u=>{t.current.padding||(r.classList.add(`${l}-move`),document.onmousemove=d=>{E(d,u)},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,b()})},i.ontouchstart=u=>{if(u.preventDefault(),t.current.padding)return!1;const d=u.touches[0];return r.classList.add(`${l}-move`),document.ontouchmove=n=>{n.preventDefault();const y=n.touches[0];return E(y,d),!1},document.ontouchend=()=>{document.ontouchmove=null,document.ontouchend=null,b()},!1}},w=()=>{const e=c.current;if(!e)return;e.classList.remove(`${l}-success`),e.classList.remove(`${l}-error`);const s=e.querySelector(".slider-move-box"),r=e.querySelector(".slider-move-mask"),i=e.querySelector(".slider-move-text");i.innerHTML=v({id:"swipe"}),s.style.left="-1px",r.style.width="0px",t.current.imgMove&&(t.current.imgMove.style.left="0px")},X=()=>{C(Math.random())},F=()=>{const e={};if(a){let s=a;typeof a=="number"&&(s=`${a}px`),e.width=s}if(g){let s=g;typeof g=="number"&&(s=`${g}px`),e.height=s}return e},P=()=>_(l,L);return o.jsxRuntimeExports.jsxs("div",{className:P(),style:N,ref:c,children:[o.jsxRuntimeExports.jsx(J.Refresh,{onClick:X,className:"refresh"}),o.jsxRuntimeExports.jsx("div",{className:"slider-img",style:F()}),o.jsxRuntimeExports.jsxs("div",{className:"slider-move",children:[o.jsxRuntimeExports.jsx("div",{className:"slider-move-bg"}),o.jsxRuntimeExports.jsx("div",{className:"slider-move-mask",children:o.jsxRuntimeExports.jsxs("div",{className:"slider-move-box",draggable:!1,children:[o.jsxRuntimeExports.jsx(O.DoubleRight,{className:"svg-right"}),o.jsxRuntimeExports.jsx(z.Close,{className:"svg-close"}),o.jsxRuntimeExports.jsx(G.Check,{className:"svg-check"})]})}),o.jsxRuntimeExports.jsx("span",{className:"slider-move-text",children:v({id:"swipe"})})]}),M&&o.jsxRuntimeExports.jsx(Y.Loading,{})]})};exports.DragVerify=$;exports.default=$;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const o=require("../_virtual/jsx-runtime.js"),m=require("react"),_=require("clsx"),O=require("../node_modules/@para-ui/icons/DoubleRight/index.js"),z=require("../node_modules/@para-ui/icons/Close/index.js"),G=require("../node_modules/@para-ui/icons/Check/index.js"),J=require("../node_modules/@para-ui/icons/Refresh/index.js"),K=require("../GlobalContext/constant.js"),Q=require("../GlobalContext/useFormatMessage.js"),U=require("./lang/index.js"),Y=require("../Loading/index.js");;/* empty css */const $=I=>{const{className:L,style:N,refresh:k,getImgInfo:j,verify:R,width:a,height:g}=I,v=Q.default("DragVerify",U.default),[D,C]=m.useState(),[M,q]=m.useState(!1),c=m.useRef(null),t=m.useRef({getImgInfo:j,verify:R}),l=`${K.$prefixCls}-drag-verify`;t.current.getImgInfo=j,t.current.verify=R,m.useEffect(()=>(w(),S(),()=>{clearTimeout(t.current.timerError??void 0),clearTimeout(t.current.timerSuccess??void 0)}),[k,D]);const S=async()=>{t.current.padding=!0,q(!0);const e=await t.current.getImgInfo();t.current.imgInfo=e,H()},T=async(e,s)=>{const r=await t.current.verify(e,t.current.imgInfo);s(r)},H=()=>{if(!c.current)return;const e=document.createElement("img");e.setAttribute("src",t.current.imgInfo?.sourceImage),e.style.display="none";const s=document.createElement("img");t.current.imgMove=s,s.className="slider-img-move",s.style.display="none";const r=c.current.querySelector(".slider-img"),i=c.current.querySelector(".refresh");!r||!i||(i.style.display="none",r.innerHTML="",r.append(e),e.onload=()=>{e.style.display="inline-block",s.setAttribute("src",t.current.imgInfo?.newImage);const p=e.width;if(e.className="slider-img-bg",e.style.display="inline-block",!c.current)return;const f=c.current.querySelector(".slider-img"),x=f?.clientWidth;t.current.imgScale=p/x,f?.append(s),s.onload=()=>{t.current.padding=!1,s.style.display="inline-block",i.style.display="inline-block",s.width=s.width/t.current.imgScale,s.style.top=`${t.current.imgInfo?.y/t.current.imgScale}px`,q(!1)}},W(e,s))},W=(e,s)=>{const r=c.current;if(!r)return;const i=r.querySelector(".slider-move-box"),p=r.querySelector(".slider-move-mask"),f=r.querySelector(".slider-move"),x=r.querySelector(".slider-move-text"),A=f.getBoundingClientRect(),h=i.getBoundingClientRect().width,B=A.width,E=(u,d)=>{let n=u.pageX-d.pageX;n<0&&(n=0),n+h>e.width&&(n=e.width-h),i.style.left=`${n-1}px`,p.style.width=`${n<2?2:n}px`;const y=n/(B-h),V=(e.width-s.width)*y;s.style.left=`${V}px`,x.innerHTML=""},b=()=>{r.classList.remove(`${l}-move`),t.current.padding=!0;const d=parseFloat(s.style.left)*t.current.imgScale;T(d,n=>{if(!n){r.classList.add(`${l}-error`),t.current.timerError=setTimeout(()=>{t.current.padding=!1,w(),x.innerHTML=v({id:"tryAgain"}),S()},1e3);return}r.classList.add(`${l}-success`)})};i.onmousedown=u=>{t.current.padding||(r.classList.add(`${l}-move`),document.onmousemove=d=>{E(d,u)},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,b()})},i.ontouchstart=u=>{if(u.preventDefault(),t.current.padding)return!1;const d=u.touches[0];return r.classList.add(`${l}-move`),document.ontouchmove=n=>{n.preventDefault();const y=n.touches[0];return E(y,d),!1},document.ontouchend=()=>{document.ontouchmove=null,document.ontouchend=null,b()},!1}},w=()=>{const e=c.current;if(!e)return;e.classList.remove(`${l}-success`),e.classList.remove(`${l}-error`);const s=e.querySelector(".slider-move-box"),r=e.querySelector(".slider-move-mask"),i=e.querySelector(".slider-move-text");i.innerHTML=v({id:"swipe"}),s.style.left="-1px",r.style.width="0px",t.current.imgMove&&(t.current.imgMove.style.left="0px")},X=()=>{C(Math.random())},F=()=>{const e={};if(a){let s=a;typeof a=="number"&&(s=`${a}px`),e.width=s}if(g){let s=g;typeof g=="number"&&(s=`${g}px`),e.height=s}return e},P=()=>_(l,L);return o.jsxRuntimeExports.jsxs("div",{className:P(),style:N,ref:c,children:[o.jsxRuntimeExports.jsx(J.Refresh,{onClick:X,className:"refresh"}),o.jsxRuntimeExports.jsx("div",{className:"slider-img",style:F()}),o.jsxRuntimeExports.jsxs("div",{className:"slider-move",children:[o.jsxRuntimeExports.jsx("div",{className:"slider-move-bg"}),o.jsxRuntimeExports.jsx("div",{className:"slider-move-mask",children:o.jsxRuntimeExports.jsxs("div",{className:"slider-move-box",draggable:!1,children:[o.jsxRuntimeExports.jsx(O.DoubleRight,{className:"svg-right"}),o.jsxRuntimeExports.jsx(z.Close,{className:"svg-close"}),o.jsxRuntimeExports.jsx(G.Check,{className:"svg-check"})]})}),o.jsxRuntimeExports.jsx("span",{className:"slider-move-text",children:v({id:"swipe"})})]}),M&&o.jsxRuntimeExports.jsx(Y.Loading,{})]})};exports.DragVerify=$;exports.default=$;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Drawer",
|
|
3
|
+
"category": "Feedback",
|
|
4
|
+
"description": "屏幕边缘滑出的浮层面板",
|
|
5
|
+
"semantic": {
|
|
6
|
+
"intent": [
|
|
7
|
+
"查看详情",
|
|
8
|
+
"辅助操作",
|
|
9
|
+
"复杂配置"
|
|
10
|
+
],
|
|
11
|
+
"useCases": [
|
|
12
|
+
"详情页预览",
|
|
13
|
+
"系统配置侧边栏",
|
|
14
|
+
"多级筛选"
|
|
15
|
+
],
|
|
16
|
+
"riskLevel": "normal"
|
|
17
|
+
},
|
|
18
|
+
"variants": {
|
|
19
|
+
"default": {
|
|
20
|
+
"meaning": "标准抽屉"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"states": [
|
|
24
|
+
"open",
|
|
25
|
+
"loading"
|
|
26
|
+
],
|
|
27
|
+
"idealProps": {
|
|
28
|
+
"open": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"default": false,
|
|
31
|
+
"description": "**受控模式**:传 open + onClose;onClose 不会自动改 open,需父组件 setOpen(false)。仅暴露 open,**没有 visible 别名**——antd 早期 visible 命名已迁移到 open"
|
|
32
|
+
},
|
|
33
|
+
"title": {
|
|
34
|
+
"type": "ReactNode",
|
|
35
|
+
"description": "标题"
|
|
36
|
+
},
|
|
37
|
+
"placement": {
|
|
38
|
+
"type": "enum",
|
|
39
|
+
"values": ["right", "left", "top", "bottom"],
|
|
40
|
+
"default": "right",
|
|
41
|
+
"description": "抽屉滑出方向"
|
|
42
|
+
},
|
|
43
|
+
"size": {
|
|
44
|
+
"type": "enum",
|
|
45
|
+
"values": ["small", "medium", "large", "auto"],
|
|
46
|
+
"default": "large",
|
|
47
|
+
"description": "预设尺寸(small/medium/large 各对应固定 px;auto 不设默认值)。**优先级低于 width/height**:传 width/height 时 size 预设被覆盖(src/Drawer/index.tsx:89 实证)"
|
|
48
|
+
},
|
|
49
|
+
"width": {
|
|
50
|
+
"type": "string | number",
|
|
51
|
+
"description": "自定义宽度(仅 placement='left'|'right' 生效)。number 当 px 处理(如 480 → 480px);string 支持任意 CSS 长度(px/vw/%/em)。**优先级高于 size**:传 width 时忽略 size 预设宽度"
|
|
52
|
+
},
|
|
53
|
+
"height": {
|
|
54
|
+
"type": "string | number",
|
|
55
|
+
"description": "自定义高度(仅 placement='top'|'bottom' 生效)。number 当 px;string 支持任意 CSS 长度(px/vh/%/em)。优先级与 width 同——传 height 时覆盖 size 预设"
|
|
56
|
+
},
|
|
57
|
+
"destroyOnClose": {
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"default": false,
|
|
60
|
+
"description": "关闭时是否销毁内部内容(unmount children 子树,避免表单状态/请求残留)。默认 false 仅隐藏不卸载——表单类 Drawer 通常需显式传 true。src/Drawer/index.tsx:27/48/219 已实现"
|
|
61
|
+
},
|
|
62
|
+
"onClose": {
|
|
63
|
+
"type": "function",
|
|
64
|
+
"signature": "(event: React.MouseEvent | React.KeyboardEvent) => void",
|
|
65
|
+
"description": "关闭回调。当用户点击关闭按钮 / 点击遮罩(maskClosable=true 时)/ 按 ESC 时触发。回调收 event 参数(src/Drawer/index.tsx:102 `onClose?.(e)` 实证),与 src/Drawer/interface.ts:59 对齐"
|
|
66
|
+
},
|
|
67
|
+
"showExtra": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"default": true,
|
|
70
|
+
"description": "是否显示右上角的操作区域(extra 容器);false 则隐藏整个 extra 区域"
|
|
71
|
+
},
|
|
72
|
+
"showMask": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"default": true,
|
|
75
|
+
"description": "是否显示遮罩;false 则全透明且点击下层内容仍可交互"
|
|
76
|
+
},
|
|
77
|
+
"onOk": {
|
|
78
|
+
"type": "function",
|
|
79
|
+
"signature": "() => void",
|
|
80
|
+
"description": "点击底部确定按钮的回调(src/Drawer/interface.ts:85 实证)。**Drawer 不自动关闭**——需业务方在 onOk 内自行 setOpen(false)。未传时默认渲染确定按钮但点击无回调"
|
|
81
|
+
},
|
|
82
|
+
"onCancel": {
|
|
83
|
+
"type": "function",
|
|
84
|
+
"signature": "() => void",
|
|
85
|
+
"description": "点击底部取消按钮的回调(src/Drawer/interface.ts:87 实证)。⚠️ **与 onClose 区分**:onCancel 仅绑定底部取消按钮;onClose 绑定右上角 X / ESC / 遮罩关闭路径。两者可同时使用"
|
|
86
|
+
},
|
|
87
|
+
"afterVisibleChange": {
|
|
88
|
+
"type": "function",
|
|
89
|
+
"signature": "(open: boolean) => void",
|
|
90
|
+
"description": "动画结束后的回调(src/Drawer/interface.ts:55 实证,参数名 open 表示当前是否可见)。**在 transition end 时触发**,适合「动画完成后再执行」的场景(如滚动位置重置、DOM 测量等)。与 onChange 区分:onChange 在 open 状态切换时立即触发,afterVisibleChange 在动画结束后触发"
|
|
91
|
+
},
|
|
92
|
+
"push": {
|
|
93
|
+
"type": "boolean | object",
|
|
94
|
+
"objectShape": {
|
|
95
|
+
"distance": { "type": "string | number", "description": "子 Drawer 推入父 Drawer 的距离,默认 100(px)" }
|
|
96
|
+
},
|
|
97
|
+
"default": "{ distance: 100 }",
|
|
98
|
+
"description": "多层 Drawer 时的推入行为配置(src/Drawer/interface.ts:93 实证)。传 `{ distance: number | string }` 指定偏移量;传 `false` 禁用推入效果(子 Drawer 直接覆盖,父 Drawer 不偏移)。**仅在嵌套 Drawer 场景下生效**"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"do": [
|
|
102
|
+
"在需要保持上下文(不跳转页面)的情况下使用 Drawer 展示详情",
|
|
103
|
+
"提供清晰的标题和关闭按钮",
|
|
104
|
+
"受控模式必须同时处理 onClose 并调用 setOpen(false)——Drawer 不会自动关闭,onClose 仅是通知回调(src/Drawer/index.tsx:102 实证)",
|
|
105
|
+
"表单类内容使用 destroyOnClose={true},确保关闭后状态重置,避免下次打开显示上次残留数据",
|
|
106
|
+
"区分 onClose / onOk / onCancel 三个回调职责:onClose 绑定 X/ESC/遮罩关闭路径,onOk 绑定底部确定按钮,onCancel 绑定底部取消按钮"
|
|
107
|
+
],
|
|
108
|
+
"dont": [
|
|
109
|
+
"在 Drawer 中嵌套过深的 Drawer(多层级建议使用页面跳转)",
|
|
110
|
+
"在 Drawer 中使用全屏 Modal(遮挡感过强)",
|
|
111
|
+
"不要假设 onOk/onCancel 点击后 Drawer 自动关闭——src 实现中两者只调回调,不修改 open 状态,必须业务方自行 setOpen(false)",
|
|
112
|
+
"不要用 visible 替代 open——Drawer 只有 open prop,无 visible 别名(与 antd v4 命名不同)",
|
|
113
|
+
"不要在 placement='top'|'bottom' 时传 width,或在 placement='left'|'right' 时传 height——方向不对时对应的尺寸 prop 无效(src/Drawer/index.tsx:84-91 实证)"
|
|
114
|
+
],
|
|
115
|
+
"events": {
|
|
116
|
+
"onClose": {
|
|
117
|
+
"signature": "(event: React.MouseEvent | React.KeyboardEvent) => void",
|
|
118
|
+
"asyncSupported": false,
|
|
119
|
+
"examples": [
|
|
120
|
+
"点击右上角 X 按钮关闭时触发,event 来自 rc-drawer 内部关闭路径",
|
|
121
|
+
"maskClosable=true 时点击遮罩触发,event.type 一般为 'click'",
|
|
122
|
+
"keyboard=true 时按 ESC 触发,event.type 为 'keydown'"
|
|
123
|
+
],
|
|
124
|
+
"commonMistakes": [
|
|
125
|
+
"假设 onClose 触发后 Drawer 自动关闭 → 必须在 onClose 内调 setOpen(false),否则 Drawer 保持打开",
|
|
126
|
+
"假设回调无参数 → 实际收 event 参数(React.MouseEvent | React.KeyboardEvent),src/Drawer/index.tsx:102 实证",
|
|
127
|
+
"将 onClose 和 onCancel 当作同一回调 → onClose 是 X/ESC/遮罩关闭路径,onCancel 只绑定底部取消按钮",
|
|
128
|
+
"不区分 onClose 与 afterVisibleChange → onClose 在用户触发关闭时立即调用,afterVisibleChange 是动画结束后的回调"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"onOk": {
|
|
132
|
+
"signature": "() => void",
|
|
133
|
+
"asyncSupported": false,
|
|
134
|
+
"examples": [
|
|
135
|
+
"点击底部确定按钮时触发(showExtra=true 且未传自定义 extra 时显示默认确定/取消按钮)",
|
|
136
|
+
"在 onOk 内提交表单数据后调 setOpen(false) 关闭 Drawer",
|
|
137
|
+
"配合 okButtonProps={{ loading: true }} 模拟异步提交中状态"
|
|
138
|
+
],
|
|
139
|
+
"commonMistakes": [
|
|
140
|
+
"假设 onOk 执行后 Drawer 自动关闭 → 必须手动 setOpen(false),src/Drawer/index.tsx:104-106 仅调 onOk?.() 不改 open",
|
|
141
|
+
"假设 onOk 接收 event 参数 → 签名是 () => void,无参数(src/Drawer/interface.ts:85 实证)",
|
|
142
|
+
"在 extra 已自定义的情况下期望 onOk 仍然触发 → 传了 extra prop 时默认确定/取消按钮区域被整体替换"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"onCancel": {
|
|
146
|
+
"signature": "() => void",
|
|
147
|
+
"asyncSupported": false,
|
|
148
|
+
"examples": [
|
|
149
|
+
"点击底部取消按钮时触发",
|
|
150
|
+
"onCancel 内调 setOpen(false) 关闭 Drawer,清空临时状态",
|
|
151
|
+
"配合 cancelButtonProps={{ children: '放弃修改' }} 自定义取消按钮文字"
|
|
152
|
+
],
|
|
153
|
+
"commonMistakes": [
|
|
154
|
+
"把 onCancel 当作关闭监听 → onCancel 只绑定底部取消按钮,X/ESC/遮罩关闭走 onClose",
|
|
155
|
+
"假设 onCancel 接收 event 参数 → 签名是 () => void,无参数(src/Drawer/interface.ts:87 实证)",
|
|
156
|
+
"不调 setOpen(false) → onCancel 不自动关闭 Drawer,需手动 setOpen(false)"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"afterVisibleChange": {
|
|
160
|
+
"signature": "(open: boolean) => void",
|
|
161
|
+
"asyncSupported": false,
|
|
162
|
+
"examples": [
|
|
163
|
+
"动画结束后重置滚动位置(open=false 时清理)",
|
|
164
|
+
"动画结束后触发懒加载请求(open=true 时执行)",
|
|
165
|
+
"DOM 测量场景:等 Drawer 完全展开后再读取 offsetWidth"
|
|
166
|
+
],
|
|
167
|
+
"commonMistakes": [
|
|
168
|
+
"把 afterVisibleChange 当作 onClose 使用 → afterVisibleChange 传入当前 open 状态(true/false),不是关闭事件",
|
|
169
|
+
"在 afterVisibleChange 里调 setOpen(false) 导致循环 → open=false 时 afterVisibleChange 已在关闭动画结束后触发,不要再次关闭",
|
|
170
|
+
"假设 open=true 时 afterVisibleChange 先于内容渲染触发 → afterVisibleChange 是动画结束后触发,此时内容已渲染"
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"typescriptPitfalls": [
|
|
175
|
+
{
|
|
176
|
+
"issue": "DrawerProps 未导出子类型,不要用 any 声明 props",
|
|
177
|
+
"wrong": "const MyDrawer = (props: any) => <Drawer {...props} />;",
|
|
178
|
+
"right": "import { DrawerProps } from '@para-ui/core'; const MyDrawer = (props: DrawerProps) => <Drawer {...props} />;"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"issue": "size 枚举值 'medium' 不是 'mid',与 Modal 的 'md' 不同",
|
|
182
|
+
"wrong": "<Drawer size='mid' /> // 不存在,TS 报类型错",
|
|
183
|
+
"right": "<Drawer size='medium' /> // 合法值:'small' | 'medium' | 'large' | 'auto'"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"issue": "onClose 参数类型是联合类型,不要假设是 MouseEvent",
|
|
187
|
+
"wrong": "onClose={(e: React.MouseEvent) => setOpen(false)} // ESC 触发时 e 是 KeyboardEvent,类型不兼容",
|
|
188
|
+
"right": "onClose={(e: React.MouseEvent | React.KeyboardEvent) => setOpen(false)}"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"issue": "placement 枚举值只有 'left'|'top'|'right'|'bottom',不接受 antd 风格写法",
|
|
192
|
+
"wrong": "<Drawer placement='bottom-start' /> // 非法,Drawer placement 无 dash 写法",
|
|
193
|
+
"right": "<Drawer placement='bottom' /> // 合法值:'left' | 'top' | 'right' | 'bottom'(src/Drawer/interface.ts:13 IPlacement)"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"mapping": {
|
|
197
|
+
"realComponent": "Drawer",
|
|
198
|
+
"adapter": null
|
|
199
|
+
}
|
|
200
|
+
}
|
package/lib/Drawer/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const n=require("../_virtual/jsx-runtime.js"),i=require("react"),ne=require("clsx"),re=require("rc-drawer"),N=require("../Button/index.js"),se=require("../GlobalContext/useFormatMessage.js"),ie=require("./lang/index.js"),c=require("../GlobalContext/constant.js"),oe=require("../AutoTips/index.js"),S=require("../Utils/snack-kit-shims.js"),q=require("./util.js");;/* empty css */const p=r=>{const{className:z,resizable:$,onClose:H,destroyOnClose:D=!1,style:L,title:h,extra:O,showExtra:B=!0,footer:w,children:v,size:u="large",onOk:P,onCancel:T,afterVisibleChange:W,okButtonProps:R,cancelButtonProps:C,push:F={distance:100},..._}=r,y=se.default("Drawer",ie.default),[,A]=i.useState(0),[I,a]=i.useState({}),[X,b]=i.useState(!1),f=i.useRef(!1),x=i.useRef(),j=["left","right"].includes(r.placement??"right"),l=i.useRef(0),d=i.useRef(0),m=i.useRef(),o=i.useRef(0);i.useEffect(()=>()=>{x.current&&(clearTimeout(x.current),x.current=null,window.removeEventListener("mouseup",E),window.removeEventListener("mousemove",g),m.current=void 0)},[]),i.useEffect(()=>{a(Y),r.open||(m.current=void 0)},[r.open,r.placement,r.width,r.height,u]);const Y=()=>{if(!r.open)return{};const t={large:"1000px",medium:"630px",small:"400px"},s={};if(r.placement==="left"||r.placement==="right"){const e=t[u];u!=="auto"&&(s.width=r.width===void 0?e:r.width)}else{const e=u==="large"?736:378;u!=="auto"&&(s.height=r.height===void 0?e:r.height)}return s},K=t=>{H?.(t)},U=()=>{P?.()},V=()=>{T?.()},G=t=>{b(!0),l.current=j?t.clientX:t.clientY;const s=t.target,e=q.closest(s,`.${c.$prefixCls}-drawer-open`)??document.body,k=`.${c.$prefixCls}-drawer-content-wrapper`,M=q.closest(s,k)??e.querySelector(k);d.current=j?e.offsetWidth:e.offsetHeight,o.current=j?M.offsetWidth:M.offsetHeight,m.current=m.current??o.current,document.addEventListener("mousemove",g),document.addEventListener("mouseup",E)},E=()=>{b(!1),document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",E)},g=t=>{const s=m.current??400;switch(r.placement){case"left":{const e=o.current+(t.clientX-l.current);if(e+100>=d.current||e<s)return;a({width:e});break}case"right":{const e=o.current-(t.clientX-l.current);if(e+100>=d.current||e<s)return;a({width:e});break}case"top":{const e=o.current+(t.clientY-l.current);if(e+100>=d.current||e<s)return;a({height:e});break}case"bottom":{const e=o.current-(t.clientY-l.current);if(e+100>=d.current||e<s)return;a({height:e});break}}},J=t=>typeof t=="string"?n.jsxRuntimeExports.jsx("div",{className:"drawer-header-title drawer-header-title-ellipsis",children:n.jsxRuntimeExports.jsx(oe.default,{children:t})}):n.jsxRuntimeExports.jsx("div",{className:"drawer-header-title",children:t}),Q=n.jsxRuntimeExports.jsxs("div",{className:"drawer-body-header",children:[n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:J(h)}),B&&n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:n.jsxRuntimeExports.jsx("div",{className:"drawer-header-extra",children:O||n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(N.Button,{variant:"outlined",size:"medium",onClick:V,...C,children:C?.children||y({id:"cancel"})}),n.jsxRuntimeExports.jsx(N.Button,{variant:"contained",size:"medium",onClick:U,...R,children:R?.children||y({id:"ok"})})]})})})]}),Z=()=>!h&&!w?v:n.jsxRuntimeExports.jsxs("div",{className:"drawer-content-body",children:[h&&Q,n.jsxRuntimeExports.jsx("div",{className:"drawer-body-content",children:v}),w&&n.jsxRuntimeExports.jsx("div",{className:"drawer-body-footer",children:w})]});if(f.current)return f.current=!1,null;const ee={motionName:`${c.$prefixCls}-drawer-mask-motion`,motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:S.isIE()?0:100},te=t=>({motionName:`${c.$prefixCls}-drawer-panel-motion-${t}`,motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:S.isIE()?0:100});return n.jsxRuntimeExports.jsxs(re,{..._,...I,style:L,maskMotion:ee,motion:te,push:F,prefixCls:`${c.$prefixCls}-drawer`,rootClassName:ne(z,X&&`${c.$prefixCls}-drawer-resizing`),onClose:K,afterOpenChange:t=>{t?f.current=!1:D&&(f.current=!0,x.current=setTimeout(()=>{A(Math.random())},300)),W?.(t)},children:[$&&n.jsxRuntimeExports.jsx("div",{className:"drawer-handle",onMouseDown:G,children:n.jsxRuntimeExports.jsx("div",{className:"drawer-handle-icon"})}),Z()]})};p.defaultProps={level:null,handler:!1,showMask:!0,placement:"right"};exports.Drawer=p;exports.default=p;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/Drawer/util.d.ts
CHANGED
package/lib/Drawer/util.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(c,l)=>{if(!c)return null;const t=c,r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;if(!r)return null;let e=c;for(;e&&!r.call(e,l);)e=e.parentElement;return e};exports.closest=s;
|
|
2
2
|
//# sourceMappingURL=util.js.map
|