Repository: CNFeffery/feffery-antd-components Branch: main Commit: ad578849f274 Files: 465 Total size: 2.3 MB Directory structure: gitextract_b61i1n5c/ ├── .eslintignore ├── .eslintrc ├── .github/ │ ├── FUNDING.yml │ └── workflows/ │ └── test.yml ├── .gitignore ├── .npmignore ├── .prettierrc ├── .pylintrc ├── CONTRIBUTING.md ├── DESCRIPTION ├── LICENSE ├── MANIFEST.in ├── NAMESPACE ├── Project.toml ├── README-en_US.md ├── README.md ├── _validate_init.py ├── feffery_antd_components/ │ ├── AntdAccordion.py │ ├── AntdAffix.py │ ├── AntdAlert.py │ ├── AntdAnchor.py │ ├── AntdAvatar.py │ ├── AntdAvatarGroup.py │ ├── AntdBackTop.py │ ├── AntdBadge.py │ ├── AntdBreadcrumb.py │ ├── AntdButton.py │ ├── AntdCalendar.py │ ├── AntdCard.py │ ├── AntdCardGrid.py │ ├── AntdCardMeta.py │ ├── AntdCarousel.py │ ├── AntdCascader.py │ ├── AntdCenter.py │ ├── AntdCheckCard.py │ ├── AntdCheckCardGroup.py │ ├── AntdCheckableTag.py │ ├── AntdCheckbox.py │ ├── AntdCheckboxGroup.py │ ├── AntdCol.py │ ├── AntdCollapse.py │ ├── AntdColorPicker.py │ ├── AntdComment.py │ ├── AntdCompact.py │ ├── AntdConfigProvider.py │ ├── AntdContent.py │ ├── AntdCopyText.py │ ├── AntdCountdown.py │ ├── AntdCountup.py │ ├── AntdCustomSkeleton.py │ ├── AntdDatePicker.py │ ├── AntdDateRangePicker.py │ ├── AntdDescriptionItem.py │ ├── AntdDescriptions.py │ ├── AntdDivider.py │ ├── AntdDraggerUpload.py │ ├── AntdDrawer.py │ ├── AntdDropdown.py │ ├── AntdEmpty.py │ ├── AntdFlex.py │ ├── AntdFloatButton.py │ ├── AntdFloatButtonGroup.py │ ├── AntdFooter.py │ ├── AntdForm.py │ ├── AntdFormItem.py │ ├── AntdFormRender.py │ ├── AntdHappyProvider.py │ ├── AntdHeader.py │ ├── AntdIcon.py │ ├── AntdImage.py │ ├── AntdImageGroup.py │ ├── AntdInput.py │ ├── AntdInputNumber.py │ ├── AntdLayout.py │ ├── AntdMentions.py │ ├── AntdMenu.py │ ├── AntdMessage.py │ ├── AntdModal.py │ ├── AntdNotification.py │ ├── AntdOTP.py │ ├── AntdPageHeader.py │ ├── AntdPagination.py │ ├── AntdParagraph.py │ ├── AntdPictureUpload.py │ ├── AntdPopconfirm.py │ ├── AntdPopover.py │ ├── AntdPopupCard.py │ ├── AntdProgress.py │ ├── AntdQRCode.py │ ├── AntdRadioGroup.py │ ├── AntdRate.py │ ├── AntdResult.py │ ├── AntdRibbon.py │ ├── AntdRow.py │ ├── AntdSegmented.py │ ├── AntdSegmentedColoring.py │ ├── AntdSelect.py │ ├── AntdSider.py │ ├── AntdSkeleton.py │ ├── AntdSkeletonAvatar.py │ ├── AntdSkeletonButton.py │ ├── AntdSkeletonImage.py │ ├── AntdSkeletonInput.py │ ├── AntdSlider.py │ ├── AntdSpace.py │ ├── AntdSpin.py │ ├── AntdSplitter.py │ ├── AntdSpoiler.py │ ├── AntdStatistic.py │ ├── AntdSteps.py │ ├── AntdSwitch.py │ ├── AntdTable.py │ ├── AntdTabs.py │ ├── AntdTag.py │ ├── AntdText.py │ ├── AntdTimePicker.py │ ├── AntdTimeRangePicker.py │ ├── AntdTimeline.py │ ├── AntdTitle.py │ ├── AntdTooltip.py │ ├── AntdTour.py │ ├── AntdTransfer.py │ ├── AntdTree.py │ ├── AntdTreeSelect.py │ ├── AntdUpload.py │ ├── AntdWatermark.py │ ├── Fragment.py │ ├── __init__.py │ ├── _icons.py │ ├── _imports_.py │ └── alias.py ├── legacy_tests/ │ ├── dash3.0tests/ │ │ ├── AntdQRCode组件loading状态重构/ │ │ │ └── test.py │ │ ├── AntdTable函数式改造/ │ │ │ └── test.py │ │ ├── _dashprivate_layout改动测试/ │ │ │ └── test.py │ │ ├── loading_state改动测试/ │ │ │ └── test.py │ │ ├── 函数式组件默认值重构/ │ │ │ └── test.py │ │ ├── 加载动画类组件重构测试/ │ │ │ └── test.py │ │ └── 组件属性基础持久化重构测试/ │ │ └── test.py │ ├── dataDisplay/ │ │ ├── AntdAccordion/ │ │ │ ├── feat_size.py │ │ │ └── feat_styles.py │ │ ├── AntdCard/ │ │ │ └── refactor_delete_props.py │ │ ├── AntdCarousel/ │ │ │ └── feat_auto_play_dot_duration.py │ │ ├── AntdCollapse/ │ │ │ ├── feat_size.py │ │ │ └── feat_styles.py │ │ ├── AntdCountdown/ │ │ │ ├── feat_finish_event.py │ │ │ └── refactor_to_timer.py │ │ ├── AntdCountup/ │ │ │ └── refactor_to_timer.py │ │ ├── AntdDescriptions/ │ │ │ └── feat_span_filled.py │ │ ├── AntdImage/ │ │ │ └── debug_preview_toolbar.py │ │ ├── AntdSegmented/ │ │ │ ├── feat_shape.py │ │ │ ├── feat_simple_options.py │ │ │ └── feat_vertical.py │ │ ├── AntdTable/ │ │ │ ├── feat_button_mode_like_dcc_link.py │ │ │ ├── feat_button_mode_refactor.py │ │ │ ├── feat_button_mode_tooltip.py │ │ │ ├── feat_columns_fixed_bool.py │ │ │ ├── feat_columns_min_width.py │ │ │ ├── feat_columns_sort_order.py │ │ │ ├── feat_editable_disabled_keys.py │ │ │ ├── feat_header_align.py │ │ │ ├── feat_link_mode_like_dcc_link.py │ │ │ ├── feat_loading.py │ │ │ ├── feat_mini_chart_color.py │ │ │ ├── feat_row_class_name.py │ │ │ ├── feat_row_class_name_func.py │ │ │ ├── feat_select_mode_show_search.py │ │ │ ├── feat_sticky_header.py │ │ │ ├── feat_table_scroll.py │ │ │ ├── feat_tag_mode_tooltip.py │ │ │ ├── feat_title_popover_nodes.py │ │ │ ├── fix_context_locale.py │ │ │ ├── fix_field_bool.py │ │ │ ├── fix_max_width_height_ghost_row.py │ │ │ ├── fix_nested_editable.py │ │ │ ├── fix_select_with_editable.py │ │ │ ├── fix_server_side_mode_filter_search.py │ │ │ ├── fix_summary.py │ │ │ ├── fix_summary_multi_level_header.py │ │ │ ├── fix_zero_value_filter.py │ │ │ ├── perf_button_mode_auto_wrap.py │ │ │ ├── perf_editable_column_format_constrait_message.py │ │ │ ├── refactor_mini_progress_mode.py │ │ │ └── rollback_title_popover_info.py │ │ ├── AntdTabs/ │ │ │ ├── feat_item_icon.py │ │ │ ├── feat_placeholder.py │ │ │ └── feat_tab_bar_style.py │ │ ├── AntdTree/ │ │ │ └── feat_async_data_load.py │ │ └── descriptions/ │ │ └── AntdDescriptions/ │ │ └── feat_extra.py │ ├── dataEntry/ │ │ ├── AntdCalendar/ │ │ │ └── feat_custom_cells.py │ │ ├── AntdCascader/ │ │ │ ├── feat_prefix.py │ │ │ ├── feat_suffix_icon.py │ │ │ └── fix_read_only.py │ │ ├── AntdDatePicker/ │ │ │ ├── feat_custom_cells.py │ │ │ ├── feat_picker_value.py │ │ │ ├── feat_prefix.py │ │ │ └── feat_suffix_icon.py │ │ ├── AntdDateRangePicker/ │ │ │ ├── feat_custom_cells.py │ │ │ ├── feat_picker_value.py │ │ │ ├── feat_prefix.py │ │ │ └── feat_suffix_icon.py │ │ ├── AntdForm/ │ │ │ ├── feat_batch_control_tooltips.py │ │ │ ├── feat_optional_batch_control.py │ │ │ └── fix_checkbox.py │ │ ├── AntdRadioGroup/ │ │ │ └── feat_block.py │ │ ├── AntdSelect/ │ │ │ ├── feat_locale_ru.py │ │ │ ├── feat_max_count.py │ │ │ ├── feat_prefix.py │ │ │ ├── feat_show_search.py │ │ │ ├── feat_suffix_icon.py │ │ │ ├── fix_read_only.py │ │ │ └── fix_read_only_with_allow_clear.py │ │ ├── AntdSlider/ │ │ │ └── feat_range_editable.py │ │ ├── AntdTimePicker/ │ │ │ ├── feat_prefix.py │ │ │ └── feat_suffix_icon.py │ │ ├── AntdTimeRangePicker/ │ │ │ ├── feat_prefix.py │ │ │ └── feat_suffix_icon.py │ │ ├── AntdTreeSelect/ │ │ │ ├── feat_async_data_load.py │ │ │ ├── feat_max_count.py │ │ │ ├── feat_prefix.py │ │ │ └── fix_read_only.py │ │ └── AntdUpload/ │ │ ├── feat_pastable.py │ │ └── fix_follow_theme.py │ ├── feat_variant_underlined.py │ ├── feedback/ │ │ ├── AntdAlert/ │ │ │ └── feat_icon.py │ │ ├── AntdMessage/ │ │ │ └── fix_follow_config_provider.py │ │ ├── AntdModal/ │ │ │ ├── feat_force_render.py │ │ │ ├── feat_loading_title.py │ │ │ ├── feat_prevent_close.py │ │ │ └── feat_responsive_width.py │ │ ├── AntdNotification/ │ │ │ ├── feat_component_content.py │ │ │ ├── feat_number_of_stack.py │ │ │ ├── feat_show_progress.py │ │ │ └── fix_follow_config_provider.py │ │ ├── AntdPopupCard/ │ │ │ └── feat_force_render.py │ │ ├── AntdProgress/ │ │ │ ├── feat_percent_position.py │ │ │ ├── perf_size.py │ │ │ ├── perf_steps.py │ │ │ └── perf_stroke_color.py │ │ ├── AntdResult/ │ │ │ └── feat_extra.py │ │ └── AntdSkeleton/ │ │ └── fix_dash3.py │ ├── general/ │ │ ├── AntdButton/ │ │ │ ├── feat_color_and_variant.py │ │ │ └── feat_preset_color.py │ │ ├── AntdFloatButtonGroup/ │ │ │ ├── feat_placement.py │ │ │ └── feat_tooltip.py │ │ └── AntdIcon/ │ │ └── feat_iconfont.py │ ├── layout/ │ │ ├── AntdCenter/ │ │ │ └── feat_use_token.py │ │ ├── AntdDivider/ │ │ │ ├── feat_plain.py │ │ │ └── feat_size.py │ │ └── AntdSplitter/ │ │ ├── feat_AntdSplitter.py │ │ ├── feat_lazy.py │ │ └── refactor.py │ ├── navigation/ │ │ ├── AntdAnchor/ │ │ │ ├── feat_current_anchor.py │ │ │ ├── feat_direction.py │ │ │ └── feat_replace.py │ │ ├── AntdBreadcrumb/ │ │ │ ├── feat_menu_item_event.py │ │ │ └── refactor_items.py │ │ ├── AntdDropdown/ │ │ │ ├── feat_extra.py │ │ │ └── test_cascading_dropdown.py │ │ ├── AntdMenu/ │ │ │ ├── feat_currentItem.py │ │ │ ├── feat_currentItemPath.py │ │ │ ├── feat_currentKeyPath.py │ │ │ ├── feat_custom_icon.py │ │ │ ├── feat_expandIcon.py │ │ │ ├── feat_triggerSubMenuAction.py │ │ │ ├── fix_onlyExpandCurrentSubMenu.py │ │ │ └── fix_with_sider.py │ │ └── AntdPagination/ │ │ └── feat_align.py │ └── other/ │ ├── AntdAffix/ │ │ └── feat_listen_affixed.py │ ├── AntdBackTop/ │ │ └── refactor.py │ ├── AntdConfigProvider/ │ │ └── feat_use_css.py │ ├── AntdCopyText/ │ │ ├── feat_copy_table.py │ │ └── feat_tooltips.py │ ├── AntdHappyProvider/ │ │ └── feat_component.py │ └── Fragment/ │ └── feat_use_token.py ├── package.json ├── pytest.ini ├── requirements.txt ├── ruff.toml ├── setup.py ├── src/ │ └── lib/ │ ├── components/ │ │ ├── dataDisplay/ │ │ │ ├── AntdAccordion.react.js │ │ │ ├── AntdAvatar.react.js │ │ │ ├── AntdAvatarGroup.react.js │ │ │ ├── AntdBadge.react.js │ │ │ ├── AntdCarousel.react.js │ │ │ ├── AntdCheckableTag.react.js │ │ │ ├── AntdCollapse.react.js │ │ │ ├── AntdComment.react.js │ │ │ ├── AntdCountdown.react.js │ │ │ ├── AntdCountup.react.js │ │ │ ├── AntdEmpty.react.js │ │ │ ├── AntdImage.react.js │ │ │ ├── AntdImageGroup.react.js │ │ │ ├── AntdPopover.react.js │ │ │ ├── AntdQRCode.react.js │ │ │ ├── AntdRibbon.react.js │ │ │ ├── AntdSegmented.react.js │ │ │ ├── AntdSpoiler.react.js │ │ │ ├── AntdStatistic.react.js │ │ │ ├── AntdTable.react.js │ │ │ ├── AntdTabs.react.js │ │ │ ├── AntdTag.react.js │ │ │ ├── AntdTimeline.react.js │ │ │ ├── AntdTooltip.react.js │ │ │ ├── AntdTree.react.js │ │ │ ├── card/ │ │ │ │ ├── AntdCard.react.js │ │ │ │ ├── AntdCardGrid.react.js │ │ │ │ └── AntdCardMeta.react.js │ │ │ └── descriptions/ │ │ │ ├── AntdDescriptionItem.react.js │ │ │ └── AntdDescriptions.react.js │ │ ├── dataEntry/ │ │ │ ├── AntdCalendar.react.js │ │ │ ├── AntdCascader.react.js │ │ │ ├── AntdCheckbox.react.js │ │ │ ├── AntdCheckboxGroup.react.js │ │ │ ├── AntdColorPicker.react.js │ │ │ ├── AntdDatePicker.react.js │ │ │ ├── AntdDateRangePicker.react.js │ │ │ ├── AntdInput.react.js │ │ │ ├── AntdInputNumber.react.js │ │ │ ├── AntdMentions.react.js │ │ │ ├── AntdOTP.react.js │ │ │ ├── AntdRadioGroup.react.js │ │ │ ├── AntdRate.react.js │ │ │ ├── AntdSegmentedColoring.react.js │ │ │ ├── AntdSelect.react.js │ │ │ ├── AntdSlider.react.js │ │ │ ├── AntdSwitch.react.js │ │ │ ├── AntdTimePicker.react.js │ │ │ ├── AntdTimeRangePicker.react.js │ │ │ ├── AntdTransfer.react.js │ │ │ ├── AntdTreeSelect.react.js │ │ │ ├── check-card/ │ │ │ │ ├── AntdCheckCard.react.js │ │ │ │ └── AntdCheckCardGroup.react.js │ │ │ ├── form/ │ │ │ │ ├── AntdForm.react.js │ │ │ │ └── AntdFormItem.react.js │ │ │ └── upload/ │ │ │ ├── AntdDraggerUpload.react.js │ │ │ ├── AntdPictureUpload.react.js │ │ │ └── AntdUpload.react.js │ │ ├── feedback/ │ │ │ ├── AntdAlert.react.js │ │ │ ├── AntdDrawer.react.js │ │ │ ├── AntdMessage.react.js │ │ │ ├── AntdModal.react.js │ │ │ ├── AntdNotification.react.js │ │ │ ├── AntdPopconfirm.react.js │ │ │ ├── AntdPopupCard.react.js │ │ │ ├── AntdProgress.react.js │ │ │ ├── AntdResult.react.js │ │ │ ├── AntdSpin.react.js │ │ │ └── skeleton/ │ │ │ ├── AntdCustomSkeleton.react.js │ │ │ ├── AntdSkeleton.react.js │ │ │ ├── AntdSkeletonAvatar.react.js │ │ │ ├── AntdSkeletonButton.react.js │ │ │ ├── AntdSkeletonImage.react.js │ │ │ └── AntdSkeletonInput.react.js │ │ ├── formRender/ │ │ │ └── AntdFormRender.react.js │ │ ├── general/ │ │ │ ├── AntdButton.react.js │ │ │ ├── AntdFloatButton.react.js │ │ │ ├── AntdFloatButtonGroup.react.js │ │ │ ├── AntdIcon.react.js │ │ │ └── typography/ │ │ │ ├── AntdParagraph.react.js │ │ │ ├── AntdText.react.js │ │ │ └── AntdTitle.react.js │ │ ├── icons.react.js │ │ ├── layout/ │ │ │ ├── AntdCenter.react.js │ │ │ ├── AntdCompact.react.js │ │ │ ├── AntdContent.react.js │ │ │ ├── AntdDivider.react.js │ │ │ ├── AntdFlex.react.js │ │ │ ├── AntdFooter.react.js │ │ │ ├── AntdHeader.react.js │ │ │ ├── AntdLayout.react.js │ │ │ ├── AntdSider.react.js │ │ │ ├── AntdSpace.react.js │ │ │ ├── AntdSplitter.react.js │ │ │ └── grid/ │ │ │ ├── AntdCol.react.js │ │ │ └── AntdRow.react.js │ │ ├── locales.react.js │ │ ├── navigation/ │ │ │ ├── AntdAnchor.react.js │ │ │ ├── AntdBreadcrumb.react.js │ │ │ ├── AntdDropdown.react.js │ │ │ ├── AntdMenu.react.js │ │ │ ├── AntdPageHeader.react.js │ │ │ ├── AntdPagination.react.js │ │ │ └── AntdSteps.react.js │ │ ├── other/ │ │ │ ├── AntdAffix.react.js │ │ │ ├── AntdBackTop.react.js │ │ │ ├── AntdConfigProvider.react.js │ │ │ ├── AntdCopyText.react.js │ │ │ ├── AntdHappyProvider.react.js │ │ │ ├── AntdTour.react.js │ │ │ ├── AntdWatermark.react.js │ │ │ └── Fragment.react.js │ │ ├── styles.css │ │ └── utils.js │ ├── contexts/ │ │ ├── FormContext.js │ │ ├── FormItemContext.js │ │ └── PropsContext.js │ ├── fragments/ │ │ ├── AntdTable.react.js │ │ ├── dataDisplay/ │ │ │ ├── AntdAccordion.react.js │ │ │ ├── AntdAvatar.react.js │ │ │ ├── AntdAvatarGroup.react.js │ │ │ ├── AntdBadge.react.js │ │ │ ├── AntdCarousel.react.js │ │ │ ├── AntdCheckableTag.react.js │ │ │ ├── AntdComment.react.js │ │ │ ├── AntdCountdown.react.js │ │ │ ├── AntdCountup.react.js │ │ │ ├── AntdEmpty.react.js │ │ │ ├── AntdImage.react.js │ │ │ ├── AntdImageGroup.react.js │ │ │ ├── AntdPopover.react.js │ │ │ ├── AntdQRCode.react.js │ │ │ ├── AntdRibbon.react.js │ │ │ ├── AntdSegmented.react.js │ │ │ ├── AntdSpoiler.react.js │ │ │ ├── AntdTabs.react.js │ │ │ ├── AntdTag.react.js │ │ │ ├── AntdTimeline.react.js │ │ │ ├── AntdTooltip.react.js │ │ │ ├── AntdTree.react.js │ │ │ ├── card/ │ │ │ │ ├── AntdCard.react.js │ │ │ │ ├── AntdCardGrid.react.js │ │ │ │ └── AntdCardMeta.react.js │ │ │ └── descriptions/ │ │ │ ├── AntdDescriptionItem.react.js │ │ │ └── AntdDescriptions.react.js │ │ ├── dataEntry/ │ │ │ ├── AntdCalendar.react.js │ │ │ ├── AntdCascader.react.js │ │ │ ├── AntdCheckbox.react.js │ │ │ ├── AntdCheckboxGroup.react.js │ │ │ ├── AntdColorPicker.react.js │ │ │ ├── AntdDatePicker.react.js │ │ │ ├── AntdDateRangePicker.react.js │ │ │ ├── AntdInput.react.js │ │ │ ├── AntdInputNumber.react.js │ │ │ ├── AntdMentions.react.js │ │ │ ├── AntdOTP.react.js │ │ │ ├── AntdRadioGroup.react.js │ │ │ ├── AntdRate.react.js │ │ │ ├── AntdSegmentedColoring.react.js │ │ │ ├── AntdSelect.react.js │ │ │ ├── AntdSlider.react.js │ │ │ ├── AntdSwitch.react.js │ │ │ ├── AntdTimePicker.react.js │ │ │ ├── AntdTimeRangePicker.react.js │ │ │ ├── AntdTransfer.react.js │ │ │ ├── AntdTreeSelect.react.js │ │ │ ├── check-card/ │ │ │ │ ├── AntdCheckCard.react.js │ │ │ │ └── AntdCheckCardGroup.react.js │ │ │ └── form/ │ │ │ ├── AntdForm.react.js │ │ │ └── AntdFormItem.react.js │ │ ├── formRender/ │ │ │ └── AntdFormRender.react.js │ │ └── upload/ │ │ ├── AntdDraggerUpload.react.js │ │ ├── AntdPictureUpload.react.js │ │ └── AntdUpload.react.js │ ├── hooks/ │ │ ├── useCss.js │ │ └── useStickyOffset.js │ ├── index.js │ ├── internal_components/ │ │ └── UtilsLink.react.js │ └── store/ │ └── formStore.js ├── tests/ │ ├── __init__.py │ ├── requirements.txt │ ├── test_basic_usage.py │ └── test_locale_french.py ├── usage.py ├── webpack.config.js └── webpack.serve.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .eslintignore ================================================ *.css registerServiceWorker.js ================================================ FILE: .eslintrc ================================================ { "extends": ["eslint:recommended", "prettier"], "parser": "babel-eslint", "parserOptions": { "ecmaVersion": 6, "sourceType": "module", "ecmaFeatures": { "arrowFunctions": true, "blockBindings": true, "classes": true, "defaultParams": true, "destructuring": true, "forOf": true, "generators": true, "modules": true, "templateStrings": true, "jsx": true } }, "env": { "browser": true, "es6": true, "jasmine": true, "jest": true, "node": true }, "globals": { "jest": true }, "plugins": [ "react", "import" ], "rules": { "accessor-pairs": ["error"], "block-scoped-var": ["error"], "consistent-return": ["error"], "curly": ["error", "all"], "default-case": ["error"], "dot-location": ["off"], "dot-notation": ["error"], "eqeqeq": ["error"], "guard-for-in": ["off"], "import/named": ["off"], "import/no-duplicates": ["error"], "import/no-named-as-default": ["error"], "new-cap": ["error"], "no-alert": [1], "no-caller": ["error"], "no-case-declarations": ["error"], "no-console": ["off"], "no-div-regex": ["error"], "no-dupe-keys": ["error"], "no-else-return": ["error"], "no-empty-pattern": ["error"], "no-eq-null": ["error"], "no-eval": ["error"], "no-extend-native": ["error"], "no-extra-bind": ["error"], "no-extra-boolean-cast": ["error"], "no-inline-comments": ["error"], "no-implicit-coercion": ["error"], "no-implied-eval": ["error"], "no-inner-declarations": ["off"], "no-invalid-this": ["error"], "no-iterator": ["error"], "no-labels": ["error"], "no-lone-blocks": ["error"], "no-loop-func": ["error"], "no-multi-str": ["error"], "no-native-reassign": ["error"], "no-new": ["error"], "no-new-func": ["error"], "no-new-wrappers": ["error"], "no-param-reassign": ["error"], "no-process-env": ["warn"], "no-proto": ["error"], "no-redeclare": ["error"], "no-return-assign": ["error"], "no-script-url": ["error"], "no-self-compare": ["error"], "no-sequences": ["error"], "no-shadow": ["off"], "no-throw-literal": ["error"], "no-undefined": ["error"], "no-unused-expressions": ["error"], "no-use-before-define": ["error", "nofunc"], "no-useless-call": ["error"], "no-useless-concat": ["error"], "no-with": ["error"], "prefer-const": ["error"], "radix": ["error"], "react/jsx-no-duplicate-props": ["error"], "react/jsx-no-undef": ["error"], "react/jsx-uses-react": ["error"], "react/jsx-uses-vars": ["error"], "react/no-did-update-set-state": ["error"], "react/no-direct-mutation-state": ["error"], "react/no-is-mounted": ["error"], "react/no-unknown-property": ["error"], "react/prefer-es6-class": ["error", "always"], "react/prop-types": "error", "valid-jsdoc": ["off"], "yoda": ["error"], "spaced-comment": ["error", "always", { "block": { "exceptions": ["*"] } }], "no-unused-vars": ["error", { "args": "after-used", "argsIgnorePattern": "^_", "caughtErrorsIgnorePattern": "^e$" }], "no-magic-numbers": ["error", { "ignoreArrayIndexes": true, "ignore": [-1, 0, 1, 2, 3, 100, 10, 0.5] }], "no-underscore-dangle": ["off"] } } ================================================ FILE: .github/FUNDING.yml ================================================ github: [CNFeffery, insistence] ================================================ FILE: .github/workflows/test.yml ================================================ name: Test on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v5 - name: Set up Node.js uses: actions/setup-node@v5 with: node-version: '16' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | npm install python -m pip install --upgrade pip setuptools wheel pip install -r requirements.txt - name: Build package run: | npm run build python -m build - name: Install browser for testing run: | sudo apt-get update sudo apt-get install -y chromium-browser chromium-chromedriver xvfb - name: Start virtual display run: | export DISPLAY=:99 Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - name: Run tests run: | pip install -e . python -m pytest tests/ -v env: DISPLAY: :99 lint-format: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: Set up Node.js uses: actions/setup-node@v5 with: node-version: '16' - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install dependencies run: | npm install python -m pip install --upgrade pip pip install ruff - name: Run lint check run: | python -m ruff check . --exclude=node_modules,venv,build - name: Run format check run: | npx prettier --check src/**/*.js src/**/*.react.js python -m ruff format . --check --exclude=node_modules,venv,build ================================================ FILE: .gitignore ================================================ /.vscode /.build_cache /assets /build /deps /dist /feffery_antd_components/*.json /feffery_antd_components/*.js /feffery_antd_components/*.map /feffery_antd_components/__pycache__ /feffery_antd_components.egg-info /inst /man /node_modules /R /src/demo /src/jl /src/*.jl .Rbuildignore package-lock.json __pycache__/ ================================================ FILE: .npmignore ================================================ /node_modules /.idea /build /deps /dist /feffery_antd_components.egg-info /inst /man /.git /_* /R /.vscode __pycache__ index.html package-lock.json /.build_cache /jl *.jl .Rbuildignore /assets ================================================ FILE: .prettierrc ================================================ { "tabWidth": 4, "singleQuote": true, "bracketSpacing": true, "trailingComma": "es5" } ================================================ FILE: .pylintrc ================================================ [MASTER] # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code extension-pkg-whitelist= # Add files or directories to the blacklist. They should be base names, not # paths. ignore=CVS # Add files or directories matching the regex patterns to the blacklist. The # regex matches against base names, not paths. ignore-patterns= # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). #init-hook= # Use multiple processes to speed up Pylint. jobs=1 # List of plugins (as comma separated values of python modules names) to load, # usually to register additional checkers. load-plugins= # Pickle collected data for later comparisons. persistent=yes # Specify a configuration file. #rcfile= # When enabled, pylint would attempt to guess common misconfiguration and emit # user-friendly hints instead of false-positive error messages suggestion-mode=yes # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no [MESSAGES CONTROL] # Only show warnings with the listed confidence levels. Leave empty to show # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED confidence= # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifiers separated by comma (,) or put this # option multiple times (only on the command line, not in the configuration # file where it should appear only once).You can also use "--disable=all" to # disable everything first and then reenable specific checks. For example, if # you want to run only the similarities checker, you can use "--disable=all # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" disable=print-statement, parameter-unpacking, unpacking-in-except, old-raise-syntax, backtick, long-suffix, old-ne-operator, old-octal-literal, import-star-module-level, non-ascii-bytes-literal, raw-checker-failed, bad-inline-option, locally-disabled, locally-enabled, file-ignored, suppressed-message, useless-suppression, deprecated-pragma, apply-builtin, basestring-builtin, buffer-builtin, cmp-builtin, coerce-builtin, execfile-builtin, file-builtin, long-builtin, raw_input-builtin, reduce-builtin, standarderror-builtin, unicode-builtin, xrange-builtin, coerce-method, delslice-method, getslice-method, setslice-method, no-absolute-import, old-division, dict-iter-method, dict-view-method, next-method-called, metaclass-assignment, indexing-exception, raising-string, reload-builtin, oct-method, hex-method, nonzero-method, cmp-method, input-builtin, round-builtin, intern-builtin, unichr-builtin, map-builtin-not-iterating, zip-builtin-not-iterating, range-builtin-not-iterating, filter-builtin-not-iterating, using-cmp-argument, eq-without-hash, div-method, idiv-method, rdiv-method, exception-message-attribute, invalid-str-codec, sys-max-int, bad-python3-import, deprecated-string-function, deprecated-str-translate-call, deprecated-itertools-function, deprecated-types-field, next-method-defined, dict-items-not-iterating, dict-keys-not-iterating, dict-values-not-iterating, no-member, missing-docstring, invalid-name, redefined-builtin, wrong-import-order, too-many-arguments, too-many-locals, consider-using-enumerate, len-as-condition, too-many-branches, too-many-statements, blacklisted-name, line-too-long, bare-except, duplicate-code, too-many-function-args, attribute-defined-outside-init, broad-except # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. enable=c-extension-no-member [REPORTS] # Python expression which should return a note less than 10 (10 is the highest # note). You have access to the variables errors warning, statement which # respectively contain the number of errors / warnings messages and the total # number of statements analyzed. This is used by the global evaluation report # (RP0004). evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) # Template used to display messages. This is a python new-style format string # used to format the message information. See doc for all details #msg-template= # Set the output format. Available formats are text, parseable, colorized, json # and msvs (visual studio).You can also give a reporter class, eg # mypackage.mymodule.MyReporterClass. output-format=text # Tells whether to display a full report or only the messages reports=no # Activate the evaluation score. score=yes [REFACTORING] # Maximum number of nested blocks for function / method body max-nested-blocks=5 # Complete name of functions that never returns. When checking for # inconsistent-return-statements if a never returning function is called then # it will be considered as an explicit return statement and no message will be # printed. never-returning-functions=optparse.Values,sys.exit [BASIC] # Naming style matching correct argument names argument-naming-style=snake_case # Regular expression matching correct argument names. Overrides argument- # naming-style #argument-rgx= # Naming style matching correct attribute names attr-naming-style=snake_case # Regular expression matching correct attribute names. Overrides attr-naming- # style #attr-rgx= # Bad variable names which should always be refused, separated by a comma bad-names=foo, bar, baz, toto, tutu, tata # Naming style matching correct class attribute names class-attribute-naming-style=any # Regular expression matching correct class attribute names. Overrides class- # attribute-naming-style #class-attribute-rgx= # Naming style matching correct class names class-naming-style=PascalCase # Regular expression matching correct class names. Overrides class-naming-style #class-rgx= # Naming style matching correct constant names const-naming-style=UPPER_CASE # Regular expression matching correct constant names. Overrides const-naming- # style #const-rgx= # Minimum line length for functions/classes that require docstrings, shorter # ones are exempt. docstring-min-length=-1 # Naming style matching correct function names function-naming-style=snake_case # Regular expression matching correct function names. Overrides function- # naming-style #function-rgx= # Good variable names which should always be accepted, separated by a comma good-names=i, j, k, ex, Run, _ # Include a hint for the correct naming format with invalid-name include-naming-hint=no # Naming style matching correct inline iteration names inlinevar-naming-style=any # Regular expression matching correct inline iteration names. Overrides # inlinevar-naming-style #inlinevar-rgx= # Naming style matching correct method names method-naming-style=snake_case # Regular expression matching correct method names. Overrides method-naming- # style #method-rgx= # Naming style matching correct module names module-naming-style=snake_case # Regular expression matching correct module names. Overrides module-naming- # style #module-rgx= # Colon-delimited sets of names that determine each other's naming style when # the name regexes allow several styles. name-group= # Regular expression which should only match function or class names that do # not require a docstring. no-docstring-rgx=^_ # List of decorators that produce properties, such as abc.abstractproperty. Add # to this list to register other decorators that produce valid properties. property-classes=abc.abstractproperty # Naming style matching correct variable names variable-naming-style=snake_case # Regular expression matching correct variable names. Overrides variable- # naming-style #variable-rgx= [FORMAT] # Expected format of line ending, e.g. empty (any line ending), LF or CRLF. expected-line-ending-format= # Regexp for a line that is allowed to be longer than the limit. ignore-long-lines=^\s*(# )??$ # Number of spaces of indent required inside a hanging or continued line. indent-after-paren=4 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 # tab). indent-string=' ' # Maximum number of characters on a single line. max-line-length=100 # Maximum number of lines in a module max-module-lines=1000 # List of optional constructs for which whitespace checking is disabled. `dict- # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. # `trailing-comma` allows a space between comma and closing bracket: (a, ). # `empty-line` allows space-only lines. no-space-check=trailing-comma, dict-separator # Allow the body of a class to be on the same line as the declaration if body # contains single statement. single-line-class-stmt=no # Allow the body of an if to be on the same line as the test if there is no # else. single-line-if-stmt=no [LOGGING] # Logging modules to check that the string format arguments are in logging # function parameter format logging-modules=logging [MISCELLANEOUS] # List of note tags to take in consideration, separated by a comma. notes=FIXME, XXX, [SIMILARITIES] # Ignore comments when computing similarities. ignore-comments=yes # Ignore docstrings when computing similarities. ignore-docstrings=yes # Ignore imports when computing similarities. ignore-imports=no # Minimum lines number of a similarity. min-similarity-lines=4 [SPELLING] # Limits count of emitted suggestions for spelling mistakes max-spelling-suggestions=4 # Spelling dictionary name. Available dictionaries: none. To make it working # install python-enchant package. spelling-dict= # List of comma separated words that should not be checked. spelling-ignore-words= # A path to a file that contains private dictionary; one word per line. spelling-private-dict-file= # Tells whether to store unknown words to indicated private dictionary in # --spelling-private-dict-file option instead of raising a message. spelling-store-unknown-words=no [TYPECHECK] # List of decorators that produce context managers, such as # contextlib.contextmanager. Add to this list to register other decorators that # produce valid context managers. contextmanager-decorators=contextlib.contextmanager # List of members which are set dynamically and missed by pylint inference # system, and so shouldn't trigger E1101 when accessed. Python regular # expressions are accepted. generated-members= # Tells whether missing members accessed in mixin class should be ignored. A # mixin class is detected if its name ends with "mixin" (case insensitive). ignore-mixin-members=yes # This flag controls whether pylint should warn about no-member and similar # checks whenever an opaque object is returned when inferring. The inference # can return multiple potential results while evaluating a Python object, but # some branches might not be evaluated, which results in partial inference. In # that case, it might be useful to still emit no-member and other checks for # the rest of the inferred objects. ignore-on-opaque-inference=yes # List of class names for which member attributes should not be checked (useful # for classes with dynamically set attributes). This supports the use of # qualified names. ignored-classes=optparse.Values,thread._local,_thread._local # List of module names for which member attributes should not be checked # (useful for modules/projects where namespaces are manipulated during runtime # and thus existing member attributes cannot be deduced by static analysis. It # supports qualified module names, as well as Unix pattern matching. ignored-modules= # Show a hint with possible names when a member name was not found. The aspect # of finding the hint is based on edit distance. missing-member-hint=yes # The minimum edit distance a name should have in order to be considered a # similar match for a missing member name. missing-member-hint-distance=1 # The total number of similar names that should be taken in consideration when # showing a hint for a missing member. missing-member-max-choices=1 [VARIABLES] # List of additional names supposed to be defined in builtins. Remember that # you should avoid to define new builtins when possible. additional-builtins= # Tells whether unused global variables should be treated as a violation. allow-global-unused-variables=yes # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. callbacks=cb_, _cb # A regular expression matching the name of dummy variables (i.e. expectedly # not used). dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ # Argument names that match this expression will be ignored. Default to name # with leading underscore ignored-argument-names=_.*|^ignored_|^unused_ # Tells whether we should check for unused import in __init__ files. init-import=no # List of qualified module names which can have objects that can redefine # builtins. redefining-builtins-modules=six.moves,past.builtins,future.builtins [CLASSES] # List of method names used to declare (i.e. assign) instance attributes. defining-attr-methods=__init__, __new__, setUp # List of member names, which should be excluded from the protected access # warning. exclude-protected=_asdict, _fields, _replace, _source, _make # List of valid names for the first argument in a class method. valid-classmethod-first-arg=cls # List of valid names for the first argument in a metaclass class method. valid-metaclass-classmethod-first-arg=mcs [DESIGN] # Maximum number of arguments for function / method max-args=5 # Maximum number of attributes for a class (see R0902). max-attributes=7 # Maximum number of boolean expressions in a if statement max-bool-expr=5 # Maximum number of branch for function / method body max-branches=12 # Maximum number of locals for function / method body max-locals=15 # Maximum number of parents for a class (see R0901). max-parents=7 # Maximum number of public methods for a class (see R0904). max-public-methods=20 # Maximum number of return / yield for function / method body max-returns=6 # Maximum number of statements in function / method body max-statements=50 # Minimum number of public methods for a class (see R0903). min-public-methods=2 [IMPORTS] # Allow wildcard imports from modules that define __all__. allow-wildcard-with-all=no # Analyse import fallback blocks. This can be used to support both Python 2 and # 3 compatible code, which means that the block might have code that exists # only in one or another interpreter, leading to false positives when analysed. analyse-fallback-blocks=no # Deprecated modules which should not be used, separated by a comma deprecated-modules=optparse,tkinter.tix # Create a graph of external dependencies in the given file (report RP0402 must # not be disabled) ext-import-graph= # Create a graph of every (i.e. internal and external) dependencies in the # given file (report RP0402 must not be disabled) import-graph= # Create a graph of internal dependencies in the given file (report RP0402 must # not be disabled) int-import-graph= # Force import order to recognize a module as part of the standard # compatibility libraries. known-standard-library= # Force import order to recognize a module as part of a third party library. known-third-party=enchant [EXCEPTIONS] # Exceptions that will emit a warning when being caught. Defaults to # "Exception" overgeneral-exceptions=Exception ================================================ FILE: CONTRIBUTING.md ================================================ # CONTRIBUTING This project was generated by the [dash-component-boilerplate](https://github.com/plotly/dash-component-boilerplate) it contains the minimal set of code required to create your own custom Dash component. ================================================ FILE: DESCRIPTION ================================================ Package: fefferyAntdComponents Title: Plotly Dash components based on Ant Design Version: 0.4.6-rc1 Description: Plotly Dash components based on Ant Design Depends: R (>= 3.0.2) Imports: Suggests: License: MIT + file LICENSE URL: http://fac.feffery.tech BugReports: https://github.com/CNFeffery/feffery-antd-components/issues Encoding: UTF-8 LazyData: true KeepSource: true ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2026 CNFeffery Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: MANIFEST.in ================================================ include feffery_antd_components/*.js include feffery_antd_components/*.map include *.json include README.md include LICENSE include package.json ================================================ FILE: NAMESPACE ================================================ # AUTO GENERATED FILE - DO NOT EDIT export(''AntdAccordion) export(''AntdAvatar) export(''AntdAvatarGroup) export(''AntdBadge) export(''AntdCarousel) export(''AntdCheckableTag) export(''AntdCollapse) export(''AntdComment) export(''AntdCountdown) export(''AntdCountup) export(''AntdEmpty) export(''AntdImage) export(''AntdImageGroup) export(''AntdPopover) export(''AntdQRCode) export(''AntdRibbon) export(''AntdSegmented) export(''AntdSpoiler) export(''AntdStatistic) export(''AntdTable) export(''AntdTabs) export(''AntdTag) export(''AntdTimeline) export(''AntdTooltip) export(''AntdTree) export(''AntdCard) export(''AntdCardGrid) export(''AntdCardMeta) export(''AntdDescriptionItem) export(''AntdDescriptions) export(''AntdCalendar) export(''AntdCascader) export(''AntdCheckbox) export(''AntdCheckboxGroup) export(''AntdColorPicker) export(''AntdDatePicker) export(''AntdDateRangePicker) export(''AntdInput) export(''AntdInputNumber) export(''AntdMentions) export(''AntdOTP) export(''AntdRadioGroup) export(''AntdRate) export(''AntdSegmentedColoring) export(''AntdSelect) export(''AntdSlider) export(''AntdSwitch) export(''AntdTimePicker) export(''AntdTimeRangePicker) export(''AntdTransfer) export(''AntdTreeSelect) export(''AntdCheckCard) export(''AntdCheckCardGroup) export(''AntdForm) export(''AntdFormItem) export(''AntdDraggerUpload) export(''AntdPictureUpload) export(''AntdUpload) export(''AntdAlert) export(''AntdDrawer) export(''AntdMessage) export(''AntdModal) export(''AntdNotification) export(''AntdPopconfirm) export(''AntdPopupCard) export(''AntdProgress) export(''AntdResult) export(''AntdSpin) export(''AntdCustomSkeleton) export(''AntdSkeleton) export(''AntdSkeletonAvatar) export(''AntdSkeletonButton) export(''AntdSkeletonImage) export(''AntdSkeletonInput) export(''AntdFormRender) export(''AntdButton) export(''AntdFloatButton) export(''AntdFloatButtonGroup) export(''AntdIcon) export(''AntdParagraph) export(''AntdText) export(''AntdTitle) export(''AntdCenter) export(''AntdCompact) export(''AntdContent) export(''AntdDivider) export(''AntdFlex) export(''AntdFooter) export(''AntdHeader) export(''AntdLayout) export(''AntdSider) export(''AntdSpace) export(''AntdSplitter) export(''AntdCol) export(''AntdRow) export(''AntdAnchor) export(''AntdBreadcrumb) export(''AntdDropdown) export(''AntdMenu) export(''AntdPageHeader) export(''AntdPagination) export(''AntdSteps) export(''AntdAffix) export(''AntdBackTop) export(''AntdConfigProvider) export(''AntdCopyText) export(''AntdHappyProvider) export(''AntdTour) export(''AntdWatermark) export(''Fragment) ================================================ FILE: Project.toml ================================================ name = "FefferyAntdComponents" uuid = "1b08a953-4be3-4667-9a23-674b58f7de79" authors = ["CNFeffery "] version = "0.4.6-rc1" [deps] Dash = "1b08a953-4be3-4667-9a23-3db579824955" [compat] julia = "1.2" Dash = "0.1.3, 1.0" ================================================ FILE: README-en_US.md ================================================

feffery-antd-components

[![GitHub](https://shields.io/badge/license-MIT-informational)](https://github.com/CNFeffery/feffery-antd-components/blob/master/LICENSE) [![PyPI](https://img.shields.io/pypi/v/feffery-antd-components.svg?color=dark-green)](https://pypi.org/project/feffery-antd-components/) [![Downloads](https://static.pepy.tech/badge/feffery-antd-components)](https://pepy.tech/project/feffery-antd-components) [![Downloads](https://static.pepy.tech/badge/feffery-antd-components/month)](https://pepy.tech/project/feffery-antd-components) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/CNFeffery/feffery-antd-components.svg)](http://isitmaintained.com/project/CNFeffery/feffery-antd-components "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/CNFeffery/feffery-antd-components.svg)](http://isitmaintained.com/project/CNFeffery/feffery-antd-components "Percentage of issues still open")
[简体中文](./README.md) | English Subproject of `feffery-components` projects, third-party components library of `Plotly Dash`, based on the [Antd](https://github.com/ant-design/ant-design), brings many common and powerful components into `Dash`🥳, latest stable version: `0.4.5` (2026-02-12) ## Dash Version Compatibility Notes | fac version | Compatible Dash Version | | :--------: | :---------------------: | | >=0.4.0 | >=3.0.0 | | <0.4.0 | <3.0.0 | ## 1 Install ```bash pip install feffery-antd-components -U ``` ## 2 Install the latest preview release version > [!NOTE] > The latest preview release version (2026-03-12): `0.4.6rc1` ```bash pip install feffery-antd-components --pre -U ``` ## 3 Use CDN ```Python # just set serve_locally=False in dash.Dash() app = dash.Dash(serve_locally=False) ``` ## 4 Documentation fac.feffery.tech ## 5 Internationalization Some components in `fac` have built-in copy information, and internationalization settings can be made through the parameter `locale`. The default is `'zh-cn'`, which is Simplified Chinese. You can set it to `'en-us'`, `'de-de'`, or `'ru-ru'` to use different languages, for example: ```Python fac.AntdDatePicker(locale='en-us') ``` ```Python fac.AntdDatePicker(locale='de-de') ``` ## 6 Contributors ================================================ FILE: README.md ================================================

feffery-antd-components

[![GitHub](https://shields.io/badge/license-MIT-informational)](https://github.com/CNFeffery/feffery-antd-components/blob/master/LICENSE) [![PyPI](https://img.shields.io/pypi/v/feffery-antd-components.svg?color=dark-green)](https://pypi.org/project/feffery-antd-components/) [![Downloads](https://static.pepy.tech/badge/feffery-antd-components)](https://pepy.tech/project/feffery-antd-components) [![Downloads](https://static.pepy.tech/badge/feffery-antd-components/month)](https://pepy.tech/project/feffery-antd-components) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/CNFeffery/feffery-antd-components.svg)](http://isitmaintained.com/project/CNFeffery/feffery-antd-components "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/CNFeffery/feffery-antd-components.svg)](http://isitmaintained.com/project/CNFeffery/feffery-antd-components "Percentage of issues still open")
简体中文 | [English](./README-en_US.md) `feffery-components`计划子项目,`Plotly Dash`第三方组件库,基于`Antd`,将超多具有丰富功能的通用网页常用交互组件引入`Dash`的生态中 🥳,最新稳定版本:`0.4.5`(2026-02-12) ## Dash版本兼容性说明 | fac版本 | 适用Dash版本 | | :-----: | :----------: | | >=0.4.0 | >=3.0.0 | | <0.4.0 | <3.0.0 | ## 1 最新版本安装方式 ```bash pip install feffery-antd-components -U ``` ## 2 最新预发布版本安装方式 > [!NOTE] > 最新预发布版本(2026-03-12):`0.4.6rc1` ```bash pip install feffery-antd-components --pre -U ``` ## 3 静态资源 CDN 加速方法 ```Python # 非debug模式下对Dash()传入参数serve_locally=False会强制浏览器端从unpkg cdn加载各个依赖的 # xxx.min.js等静态资源,从而避免占用服务器带宽,适合中小型站点加速访问 app = dash.Dash(serve_locally=False) ``` ## 4 在线文档 文档地址 ## 5 国际化 `fac`中的部分组件具有自带的文案信息,通过参数`locale`可以进行国际化设置,默认为`'zh-cn'`即简体中文,你可以设置为`'en-us'`、`'de-de'`、`'ru-ru'`来使用不同语言,譬如: ```Python fac.AntdDatePicker(locale='en-us') ``` ```Python fac.AntdDatePicker(locale='de-de') ``` ## 6 贡献者 ## 7 更多应用开发教程 > 微信公众号「玩转 Dash」,欢迎扫码关注 👇

> 「玩转 Dash」知识星球,海量教程案例模板资源,专业的答疑咨询服务,欢迎扫码加入 👇

================================================ FILE: _validate_init.py ================================================ """ DO NOT MODIFY This file is used to validate your publish settings. """ from __future__ import print_function import importlib import os import sys components_package = 'feffery_antd_components' components_lib = importlib.import_module(components_package) missing_dist_msg = 'Warning {} was not found in `{}.__init__.{}`!!!' missing_manifest_msg = """ Warning {} was not found in `MANIFEST.in`! It will not be included in the build! """ with open('MANIFEST.in', 'r') as f: manifest = f.read() def check_dist(dist, filename): # Support the dev bundle. if filename.endswith('dev.js'): return True return any( filename in x for d in dist for x in ( [d.get('relative_package_path')] if not isinstance(d.get('relative_package_path'), list) else d.get('relative_package_path') ) ) def check_manifest(filename): return filename in manifest def check_file(dist, filename): if not check_dist(dist, filename): print( missing_dist_msg.format(filename, components_package, '_js_dist'), file=sys.stderr, ) if not check_manifest(filename): print(missing_manifest_msg.format(filename), file=sys.stderr) for cur, _, files in os.walk(components_package): for f in files: if f.endswith('js'): # noinspection PyProtectedMember check_file(components_lib._js_dist, f) elif f.endswith('css'): # noinspection PyProtectedMember check_file(components_lib._css_dist, f) elif not f.endswith('py'): check_manifest(f) ================================================ FILE: feffery_antd_components/AntdAccordion.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdAccordion(Component): """An AntdAccordion component. 手风琴组件AntdAccordion Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - header (dict; optional): 头部元素css样式. - body (dict; optional): 内容元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - header (string; optional): 头部元素css类名. - body (string; optional): 内容元素css类名. - items (list of dicts; optional): 定义手风琴子项. `items` is a list of dicts with keys: - children (a list of or a singular dash component, string or number; optional): 当前子项内部元素. - className (string | dict; optional): 当前子项css类名,支持[动态css](/advanced-classname). - style (dict; optional): 当前子项css样式. - key (string | number; required): 必填,当前子项唯一key值. - collapsible (a value equal to: 'header', 'disabled', 'icon'; optional): 当前子项折叠触发方式,可选项有`'header'`、`'disabled'`、`'icon'`. - title (a list of or a singular dash component, string or number; optional): 当前子项标题元素. - extra (a list of or a singular dash component, string or number; optional): 当前子项右上角额外元素. - showArrow (boolean; optional): 是否展示当前手风琴项的箭头图标 默认值:`True`. - forceRender (boolean; optional): 是否强制渲染内部元素 默认值:`False`. - accordion (boolean; default True): 是否开启手风琴模式 默认值:`True`. - activeKey (string | list of strings | number | list of numbers; optional): 监听或设置当前处于展开状态的手风琴项key值. - defaultActiveKey (string | list of strings | number | list of numbers; optional): 设置初始化处于展开状态的手风琴项key值. - bordered (boolean; default True): 是否渲染边框 默认值:`True`. - size (a value equal to: 'large', 'middle', 'small'; default 'middle'): 组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - collapsible (a value equal to: 'header', 'disabled', 'icon'; optional): 设置所有子项折叠触发方式,可选项有`'header'`、`'disabled'`、`'icon'`. - expandIconPosition (a value equal to: 'left', 'right'; default 'left'): 设置折叠图标位置,可选项有`'left'`、`'right'`. - ghost (boolean; default False): 是否开启透明无边框模式 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['items[].children', 'items[].title', 'items[].extra'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdAccordion' Styles = TypedDict('Styles', {'header': NotRequired[dict], 'body': NotRequired[dict]}) ClassNames = TypedDict('ClassNames', {'header': NotRequired[str], 'body': NotRequired[str]}) Items = TypedDict( 'Items', { 'children': NotRequired[ComponentType], 'className': NotRequired[typing.Union[str, dict]], 'style': NotRequired[dict], 'key': typing.Union[str, NumberType], 'collapsible': NotRequired[Literal['header', 'disabled', 'icon']], 'title': NotRequired[ComponentType], 'extra': NotRequired[ComponentType], 'showArrow': NotRequired[bool], 'forceRender': NotRequired[bool], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, items: typing.Optional[typing.Sequence['Items']] = None, accordion: typing.Optional[bool] = None, activeKey: typing.Optional[ typing.Union[str, typing.Sequence[str], NumberType, typing.Sequence[NumberType]] ] = None, defaultActiveKey: typing.Optional[ typing.Union[str, typing.Sequence[str], NumberType, typing.Sequence[NumberType]] ] = None, bordered: typing.Optional[bool] = None, size: typing.Optional[Literal['large', 'middle', 'small']] = None, collapsible: typing.Optional[Literal['header', 'disabled', 'icon']] = None, expandIconPosition: typing.Optional[Literal['left', 'right']] = None, ghost: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'styles', 'classNames', 'items', 'accordion', 'activeKey', 'defaultActiveKey', 'bordered', 'size', 'collapsible', 'expandIconPosition', 'ghost', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'styles', 'classNames', 'items', 'accordion', 'activeKey', 'defaultActiveKey', 'bordered', 'size', 'collapsible', 'expandIconPosition', 'ghost', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdAccordion, self).__init__(**args) setattr(AntdAccordion, '__init__', _explicitize_args(AntdAccordion.__init__)) ================================================ FILE: feffery_antd_components/AntdAffix.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdAffix(Component): """An AntdAffix component. 固钉组件AntdAffix Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - offsetBottom (number; optional): 触发固钉效果的视窗底部距离像素阈值. - offsetTop (number; default 0): 触发固钉效果的视窗顶部距离像素阈值 默认值:`0`. - target (string; optional): 滚动事件监听的特定目标容器id. - affixed (boolean; optional): 监听当前目标是否已触发固定. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdAffix' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, offsetBottom: typing.Optional[NumberType] = None, offsetTop: typing.Optional[NumberType] = None, target: typing.Optional[str] = None, affixed: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'offsetBottom', 'offsetTop', 'target', 'affixed', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'offsetBottom', 'offsetTop', 'target', 'affixed', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdAffix, self).__init__(children=children, **args) setattr(AntdAffix, '__init__', _explicitize_args(AntdAffix.__init__)) ================================================ FILE: feffery_antd_components/AntdAlert.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdAlert(Component): """An AntdAlert component. 警告提示组件AntdAlert Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - message (a list of or a singular dash component, string or number; optional): 主要提示信息内容. - description (a list of or a singular dash component, string or number; optional): 额外提示信息内容. - type (a value equal to: 'success', 'info', 'warning', 'error'; default 'info'): 提示信息类型,可选项有`'success'`、`'info'`、`'warning'`、`'error'` 默认值:`'info'`. - showIcon (boolean; default False): 是否显示额外图标 默认值:`False`. - icon (a list of or a singular dash component, string or number; optional): 组件型,当`showIcon=True`时,用于自定义图标元素. - closable (boolean; default False): 是否可关闭 默认值:`False`. - messageRenderMode (a value equal to: 'default', 'loop-text', 'marquee'; default 'default'): 渲染模式,可选项有`'default'`、`'loop-text'`、`'marquee'` 默认值:`'default'`. - action (a list of or a singular dash component, string or number; optional): 组件型,定义右上角额外操作区元素. - banner (boolean; default False): 是否用作顶部公告 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['message', 'description', 'icon', 'action'] _base_nodes = ['message', 'description', 'icon', 'action', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdAlert' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, message: typing.Optional[ComponentType] = None, description: typing.Optional[ComponentType] = None, type: typing.Optional[Literal['success', 'info', 'warning', 'error']] = None, showIcon: typing.Optional[bool] = None, icon: typing.Optional[ComponentType] = None, closable: typing.Optional[bool] = None, messageRenderMode: typing.Optional[Literal['default', 'loop-text', 'marquee']] = None, action: typing.Optional[ComponentType] = None, banner: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'message', 'description', 'type', 'showIcon', 'icon', 'closable', 'messageRenderMode', 'action', 'banner', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'message', 'description', 'type', 'showIcon', 'icon', 'closable', 'messageRenderMode', 'action', 'banner', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdAlert, self).__init__(**args) setattr(AntdAlert, '__init__', _explicitize_args(AntdAlert.__init__)) ================================================ FILE: feffery_antd_components/AntdAnchor.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdAnchor(Component): """An AntdAnchor component. 锚点组件AntdAnchor Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - linkDict (optional): 目录层次数据结构. - direction (a value equal to: 'vertical', 'horizontal'; default 'vertical'): 导航方向,可选项有`'vertical'`、`'horizontal'`,其中`'horizontal'`方向下不支持子目录 默认值:`'vertical'`. - align (a value equal to: 'left', 'right'; default 'right'): 锚点位置,可选项有`'left'`、`'right'` 默认值:`'right'`. - containerId (string; optional): 锚点目标容器id. - targetOffset (number; optional): 锚点位移偏移量,默认同参数offsetTop. - affix (boolean; default True): 是否开启固定模式 默认值:`True`. - bounds (number; default 5): 锚点像素边距 默认值:`5`. - offsetTop (number; optional): 设置距离窗口顶部触发锚定效果的指定像素偏移量. - replace (boolean; default False): 设置为`True`后,浏览器后退或前进时,不会跳转到锚点地址 默认值:`False`. - currentAnchor (string; optional): 强制指定当前处于高亮状态的锚点链接. - clickedLink (dict; optional): 监听锚点节点点击事件. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdAnchor' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, linkDict: typing.Optional[typing.Any] = None, direction: typing.Optional[Literal['vertical', 'horizontal']] = None, align: typing.Optional[Literal['left', 'right']] = None, containerId: typing.Optional[str] = None, targetOffset: typing.Optional[NumberType] = None, affix: typing.Optional[bool] = None, bounds: typing.Optional[NumberType] = None, offsetTop: typing.Optional[NumberType] = None, replace: typing.Optional[bool] = None, currentAnchor: typing.Optional[str] = None, clickedLink: typing.Optional[dict] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'linkDict', 'direction', 'align', 'containerId', 'targetOffset', 'affix', 'bounds', 'offsetTop', 'replace', 'currentAnchor', 'clickedLink', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'linkDict', 'direction', 'align', 'containerId', 'targetOffset', 'affix', 'bounds', 'offsetTop', 'replace', 'currentAnchor', 'clickedLink', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdAnchor, self).__init__(**args) setattr(AntdAnchor, '__init__', _explicitize_args(AntdAnchor.__init__)) ================================================ FILE: feffery_antd_components/AntdAvatar.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdAvatar(Component): """An AntdAvatar component. 头像组件AntdAvatar Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - mode (a value equal to: 'text', 'icon', 'image'; default 'icon'): 头像模式,可选项有`'text'`、`'icon'`、`'image'` 默认值:`'icon'`. - gap (number; default 4): `mode='text'`时,设置字符距离左右两侧边界的像素距离 默认值:`4`. - text (string; optional): `mode='text'`时,设置文字内容. - icon (string; optional): `mode='icon'`时,设置图标,同**AntdIcon**的`icon`参数. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; default 'AntdIcon'): `mode='icon'`时,设置图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'`. - alt (string; optional): `mode='image'`时,设置图像无法显示时的占位文字. - src (string; optional): `mode='image'`时,设置图片地址. - srcSet (string; optional): `mode='image'`时,设置图片base64地址. - draggable (boolean | a value equal to: 'true', 'false'; optional): `mode='image'`时,设置图片是否允许拖拽. - crossOrigin (a value equal to: 'anonymous', 'use-credentials', ''; optional): `mode='image'`时,设置图片的CORS属性,可选项有`'anonymous'`、`'use-credentials'`、`''`. - size (dict; optional): 配置头像尺寸,可传入数值型代表像素尺寸(支持响应式),或传入字符型使用预设尺寸规格,可选项有`'large'`、`'small'`、`'default'`. `size` is a number | a value equal to: 'large', 'small', 'default' | dict with keys: - xs (number; optional) - sm (number; optional) - md (number; optional) - lg (number; optional) - xl (number; optional) - xxl (number; optional) - shape (a value equal to: 'circle', 'square'; default 'circle'): 头像形状,可选项有`'circle'`、`'square'` 默认值:`'circle'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdAvatar' Size = TypedDict( 'Size', { 'xs': NotRequired[NumberType], 'sm': NotRequired[NumberType], 'md': NotRequired[NumberType], 'lg': NotRequired[NumberType], 'xl': NotRequired[NumberType], 'xxl': NotRequired[NumberType], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, mode: typing.Optional[Literal['text', 'icon', 'image']] = None, gap: typing.Optional[NumberType] = None, text: typing.Optional[str] = None, icon: typing.Optional[str] = None, iconRenderer: typing.Optional[Literal['AntdIcon', 'fontawesome']] = None, alt: typing.Optional[str] = None, src: typing.Optional[str] = None, srcSet: typing.Optional[str] = None, draggable: typing.Optional[typing.Union[bool, Literal['true', 'false']]] = None, crossOrigin: typing.Optional[Literal['anonymous', 'use-credentials', '']] = None, size: typing.Optional[ typing.Union[NumberType, Literal['large', 'small', 'default'], 'Size'] ] = None, shape: typing.Optional[Literal['circle', 'square']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'mode', 'gap', 'text', 'icon', 'iconRenderer', 'alt', 'src', 'srcSet', 'draggable', 'crossOrigin', 'size', 'shape', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'mode', 'gap', 'text', 'icon', 'iconRenderer', 'alt', 'src', 'srcSet', 'draggable', 'crossOrigin', 'size', 'shape', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdAvatar, self).__init__(**args) setattr(AntdAvatar, '__init__', _explicitize_args(AntdAvatar.__init__)) ================================================ FILE: feffery_antd_components/AntdAvatarGroup.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdAvatarGroup(Component): """An AntdAvatarGroup component. 头像组合组件AntdAvatarGroup Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,传入组内各`AntdAvatar`组件. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - max (dict; optional): 配置最多显示功能相关参数. `max` is a dict with keys: - count (number; optional): 最多显示的头像个数,默认无限制. - style (dict; optional): 头像省略部分css样式. - popover (dict; optional): 展开层相关配置参数. `popover` is a dict with keys: - placement (a value equal to: 'top', 'bottom', 'right'; optional): 超出`maxCount`数量限制之外的头像气泡卡片弹出方位,可选项有`'top'`、`'bottom'`、`'right'` 默认值:`'top'`. - trigger (a value equal to: 'hover', 'click'; optional): 超出`maxCount`数量限制之外的头像气泡卡片弹出触发方式,可选项有`'hover'`、`'click'` 默认值:`'hover'`. - size (dict; default 'default'): 统一设置内部头像尺寸规格,传入数值型表示像素尺寸,传入字符型表示内置规格,可选项有`'large'`、`'small'`、`'default'`,支持响应式断点 默认值:`'default'`. `size` is a number | a value equal to: 'large', 'small', 'default' | dict with keys: - xs (number; optional) - sm (number; optional) - md (number; optional) - lg (number; optional) - xl (number; optional) - xxl (number; optional) - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdAvatarGroup' MaxPopover = TypedDict( 'MaxPopover', { 'placement': NotRequired[Literal['top', 'bottom', 'right']], 'trigger': NotRequired[Literal['hover', 'click']], }, ) Max = TypedDict( 'Max', { 'count': NotRequired[NumberType], 'style': NotRequired[dict], 'popover': NotRequired['MaxPopover'], }, ) Size = TypedDict( 'Size', { 'xs': NotRequired[NumberType], 'sm': NotRequired[NumberType], 'md': NotRequired[NumberType], 'lg': NotRequired[NumberType], 'xl': NotRequired[NumberType], 'xxl': NotRequired[NumberType], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, max: typing.Optional['Max'] = None, size: typing.Optional[ typing.Union[NumberType, Literal['large', 'small', 'default'], 'Size'] ] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'max', 'size', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'max', 'size', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdAvatarGroup, self).__init__(children=children, **args) setattr(AntdAvatarGroup, '__init__', _explicitize_args(AntdAvatarGroup.__init__)) ================================================ FILE: feffery_antd_components/AntdBackTop.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdBackTop(Component): """An AntdBackTop component. 回到顶部组件AntdBackTop Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - duration (number; default 0.45): 回到顶部过程耗时,单位:秒 默认值:`0.45`. - visibilityHeight (number; default 400): 回到顶部按钮显示时对应的页面滚动像素高度阈值 默认值:`400`. - containerId (string; optional): 滚动事件监听的特定目标容器id. - containerSelector (string; optional): 滚动事件监听的特定目标容器js选择代码,优先级低于containerId. - nClicks (number; default 0): 监听回到顶部按钮累计被点击次数 默认值:`0`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdBackTop' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, duration: typing.Optional[NumberType] = None, visibilityHeight: typing.Optional[NumberType] = None, containerId: typing.Optional[str] = None, containerSelector: typing.Optional[str] = None, nClicks: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'duration', 'visibilityHeight', 'containerId', 'containerSelector', 'nClicks', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'duration', 'visibilityHeight', 'containerId', 'containerSelector', 'nClicks', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdBackTop, self).__init__(**args) setattr(AntdBackTop, '__init__', _explicitize_args(AntdBackTop.__init__)) ================================================ FILE: feffery_antd_components/AntdBadge.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdBadge(Component): """An AntdBadge component. 徽标组件AntdBadge Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,定义徽标添加目标元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - root (dict; optional): 控制根元素css样式. - indicator (dict; optional): 控制徽标元素css样式. - classNames (dict; optional): 细分控制子元素css类. `classNames` is a dict with keys: - root (string; optional): 控制根元素css类. - indicator (string; optional): 控制徽标元素css类. - color (string; optional): 徽标颜色. - count (number; optional): 徽标显示的数字. - dot (boolean; default False): 是否用圆点代替数字显示 默认值:`False`. - showZero (boolean; default False): 当`count=0`时,是否强制显示数字 默认值:`False`. - overflowCount (number; default 99): 数字显示上限,超出会以显示`+`后缀 默认值:`99`. - offset (list of numbers; optional): 徽标在水平、竖直方向上的像素偏移,格式为`[水平偏移, 竖直偏移]`. - status (a value equal to: 'success', 'processing', 'default', 'error', 'warning'; optional): 徽标状态,可选项有`'success'`、`'processing'`、`'default'`、`'error'`、`'warning'`. - text (string; optional): 参数`status`有效时,设置徽标文本内容. - title (string; optional): 徽标鼠标悬停显示文字内容. - size (a value equal to: 'default', 'small'; default 'default'): 徽标尺寸规格,可选项有`'default'`、`'small'`. - nClicks (number; default 0): 监听徽标累计被点击次数 默认值:`0`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdBadge' Styles = TypedDict('Styles', {'root': NotRequired[dict], 'indicator': NotRequired[dict]}) ClassNames = TypedDict('ClassNames', {'root': NotRequired[str], 'indicator': NotRequired[str]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, color: typing.Optional[str] = None, count: typing.Optional[NumberType] = None, dot: typing.Optional[bool] = None, showZero: typing.Optional[bool] = None, overflowCount: typing.Optional[NumberType] = None, offset: typing.Optional[typing.Sequence[NumberType]] = None, status: typing.Optional[ Literal['success', 'processing', 'default', 'error', 'warning'] ] = None, text: typing.Optional[str] = None, title: typing.Optional[str] = None, size: typing.Optional[Literal['default', 'small']] = None, nClicks: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'color', 'count', 'dot', 'showZero', 'overflowCount', 'offset', 'status', 'text', 'title', 'size', 'nClicks', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'color', 'count', 'dot', 'showZero', 'overflowCount', 'offset', 'status', 'text', 'title', 'size', 'nClicks', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdBadge, self).__init__(children=children, **args) setattr(AntdBadge, '__init__', _explicitize_args(AntdBadge.__init__)) ================================================ FILE: feffery_antd_components/AntdBreadcrumb.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdBreadcrumb(Component): """An AntdBreadcrumb component. 面包屑组件AntdBreadcrumb Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - items (list of dicts; optional): 面包屑节点数据结构. `items` is a list of dicts with keys: - title (string; optional): 节点标题. - key (string; optional): 节点唯一key值. - href (string; optional): 节点链接地址. - target (string; optional): 节点链接跳转行为. - icon (string; optional): 节点前缀图标名称,与`iconRenderer`方式相关联,`'AntdIcon'`方式下同AntdIcon的icon参数,`'fontawesome'`方式下代表图标的css类名. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; optional): 前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` 默认值:`'AntdIcon'`. - menuItems (list of dicts; optional): 为当前节点设置下拉菜单生成所需的数据结构. `menuItems` is a list of dicts with keys: - title (string; optional): 下拉菜单节点标题. - key (string; optional): 下拉菜单节点唯一key值. - href (string; optional): 下拉菜单节点链接地址. - target (string; optional): 下拉菜单节点链接跳转方式. - disabled (boolean; optional): 是否禁用当前下拉菜单节点. - icon (string; optional): 下拉菜单节点前缀图标名称,与`iconRenderer`方式相关联,`'AntdIcon'`方式下同AntdIcon的icon参数,`'fontawesome'`方式下代表图标的css类名. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; optional): 前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` 默认值:`'AntdIcon'`. - separator (a list of or a singular dash component, string or number; default '/'): 组件型,分隔符 默认值:`'/'`. - clickedItem (dict; optional): 监听面包屑节点点击事件. `clickedItem` is a dict with keys: - itemTitle (string; optional): 对应节点标题. - itemKey (string; optional): 对应节点key值. - menuItemTitle (string; optional): 对应下拉菜单节点标题. - menuItemKey (string; optional): 对应下拉菜单节点key值. - timestamp (number; optional): 点击事件时间戳. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['separator'] _base_nodes = ['separator', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdBreadcrumb' ItemsMenuItems = TypedDict( 'ItemsMenuItems', { 'title': NotRequired[str], 'key': NotRequired[str], 'href': NotRequired[str], 'target': NotRequired[str], 'disabled': NotRequired[bool], 'icon': NotRequired[str], 'iconRenderer': NotRequired[Literal['AntdIcon', 'fontawesome']], }, ) Items = TypedDict( 'Items', { 'title': NotRequired[str], 'key': NotRequired[str], 'href': NotRequired[str], 'target': NotRequired[str], 'icon': NotRequired[str], 'iconRenderer': NotRequired[Literal['AntdIcon', 'fontawesome']], 'menuItems': NotRequired[typing.Sequence['ItemsMenuItems']], }, ) ClickedItem = TypedDict( 'ClickedItem', { 'itemTitle': NotRequired[str], 'itemKey': NotRequired[str], 'menuItemTitle': NotRequired[str], 'menuItemKey': NotRequired[str], 'timestamp': NotRequired[NumberType], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, items: typing.Optional[typing.Sequence['Items']] = None, separator: typing.Optional[ComponentType] = None, clickedItem: typing.Optional['ClickedItem'] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'items', 'separator', 'clickedItem', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'items', 'separator', 'clickedItem', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdBreadcrumb, self).__init__(**args) setattr(AntdBreadcrumb, '__init__', _explicitize_args(AntdBreadcrumb.__init__)) ================================================ FILE: feffery_antd_components/AntdButton.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdButton(Component): """An AntdButton component. 按钮组件AntdButton Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,按钮内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - icon (dict; optional): 按钮图标元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - icon (string; optional): 按钮图标元素css类名. - loadingChildren (a list of or a singular dash component, string or number; optional): 组件型,按钮加载状态下显示的内嵌元素. - type (a value equal to: 'default', 'primary', 'dashed', 'link', 'text'; default 'default'): 按钮类型,可选项有`'default'`、`'primary'`、`'dashed'`、`'link'`、`'text'` 默认值:`'default'`. - href (string; optional): 按钮点击跳转链接地址. - target (string; default '_blank'): 按钮点击跳转链接方式 默认值:`'_blank'`. - autoInsertSpace (boolean; default True): 按钮两个汉字内是否插入空格 默认值:`True`. - block (boolean; default False): 按钮是否渲染为块级元素(宽度撑满父容器) 默认值:`False`. - danger (boolean; default False): 按钮是否呈现危险样式 默认值:`False`. - disabled (boolean; default False): 按钮是否呈现禁用状态 默认值:`False`. - ghost (boolean; default False): 按钮是否呈现透明背景状态 默认值:`False`. - shape (a value equal to: 'default', 'circle', 'round'; default 'default'): 按钮形状,可选项有`'default'`、`'circle'`、`'round'` 默认值:`'default'`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - nClicks (number; default 0): 按钮累计点击次数,用于监听按钮点击行为 默认值:`0`. - clickExecuteJsString (string; optional): 按钮点击时需要附带执行的js程序字符串. - debounceWait (number; default 0): 按钮点击事件监听防抖延时,单位:毫秒 默认值:`0`. - icon (a list of or a singular dash component, string or number; optional): 组件型,按钮内嵌前缀图标元素. - iconPosition (a value equal to: 'start', 'end'; default 'start'): 按钮图标组件的位置,可选项有`'start'`、`'end'` 默认值:`'start'`. - loading (boolean; optional): 按钮是否呈现加载状态 默认值:`False`. - autoSpin (boolean; default False): 当前按钮在每次点击后是否自动进入加载中状态 默认值:`False`. - motionType (a value equal to: 'happy-work'; optional): 按钮额外的特殊交互类型,可选项有`'happy-work'`. - color (a value equal to: 'default', 'primary', 'danger', 'blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold'; optional): 按钮颜色风格,可选项有`'default'`、`'primary'`、`'danger'`,以及可用的一系列内置颜色:`'blue'`、`'purple'`、`'cyan'`、`'green'`、`'magenta'`、`'pink'`、`'red'`、`'orange'`、`'yellow'`、`'volcano'`、`'geekblue'`、`'lime'`、`'gold'`. - variant (a value equal to: 'outlined', 'dashed', 'solid', 'filled', 'text', 'link'; optional): 形态变体类型,可选项有`'outlined'`、`'dashed'`、`'solid'`、`'filled'`、`'text'`、`'link'`. - title (string; optional): 原生按钮title属性. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['loadingChildren', 'icon'] _base_nodes = ['loadingChildren', 'icon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdButton' Styles = TypedDict('Styles', {'icon': NotRequired[dict]}) ClassNames = TypedDict('ClassNames', {'icon': NotRequired[str]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, loadingChildren: typing.Optional[ComponentType] = None, type: typing.Optional[Literal['default', 'primary', 'dashed', 'link', 'text']] = None, href: typing.Optional[str] = None, target: typing.Optional[str] = None, autoInsertSpace: typing.Optional[bool] = None, block: typing.Optional[bool] = None, danger: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, ghost: typing.Optional[bool] = None, shape: typing.Optional[Literal['default', 'circle', 'round']] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, nClicks: typing.Optional[NumberType] = None, clickExecuteJsString: typing.Optional[str] = None, debounceWait: typing.Optional[NumberType] = None, icon: typing.Optional[ComponentType] = None, iconPosition: typing.Optional[Literal['start', 'end']] = None, loading: typing.Optional[bool] = None, autoSpin: typing.Optional[bool] = None, motionType: typing.Optional[Literal['happy-work']] = None, color: typing.Optional[ Literal[ 'default', 'primary', 'danger', 'blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold', ] ] = None, variant: typing.Optional[ Literal['outlined', 'dashed', 'solid', 'filled', 'text', 'link'] ] = None, title: typing.Optional[str] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'loadingChildren', 'type', 'href', 'target', 'autoInsertSpace', 'block', 'danger', 'disabled', 'ghost', 'shape', 'size', 'nClicks', 'clickExecuteJsString', 'debounceWait', 'icon', 'iconPosition', 'loading', 'autoSpin', 'motionType', 'color', 'variant', 'title', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'loadingChildren', 'type', 'href', 'target', 'autoInsertSpace', 'block', 'danger', 'disabled', 'ghost', 'shape', 'size', 'nClicks', 'clickExecuteJsString', 'debounceWait', 'icon', 'iconPosition', 'loading', 'autoSpin', 'motionType', 'color', 'variant', 'title', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdButton, self).__init__(children=children, **args) setattr(AntdButton, '__init__', _explicitize_args(AntdButton.__init__)) ================================================ FILE: feffery_antd_components/AntdCalendar.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCalendar(Component): """An AntdCalendar component. 日历组件AntdCalendar Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - format (string; default 'YYYY-MM-DD'): 日期显示格式,[参考资料](https://day.js.org/docs/en/display/format) 默认值:`'YYYY-MM-DD'`. - size (a value equal to: 'default', 'large'; default 'default'): 日历尺寸规格,可选项有`'default'`、`'large'` 默认值:`'default'`. - value (string; optional): 监听或设置当前选中日期值. - defaultValue (string; optional): 初始化选中日期值. - customCells (list of dicts; optional): 自定义对应月份、日期的单元格显示内容. `customCells` is a list of dicts with keys: - type (a value equal to: 'month', 'date'; required): 必填,当前项对应类型,可选项有`'month'`、`'date'`. - year (number; optional): 当前项匹配的年份值. - month (number; optional): 当前项匹配的月份值. - date (number; optional): 当前项匹配的日期值. - content (a list of or a singular dash component, string or number; optional): 自定义内容. - cellClickEvent (dict; optional): 监听日期单元格点击事件. `cellClickEvent` is a dict with keys: - type (string; optional): 记录面板类型. - timestamp (number; optional): 事件发生时间戳. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['customCells[].content'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdCalendar' CustomCells = TypedDict( 'CustomCells', { 'type': Literal['month', 'date'], 'year': NotRequired[NumberType], 'month': NotRequired[NumberType], 'date': NotRequired[NumberType], 'content': NotRequired[ComponentType], }, ) CellClickEvent = TypedDict( 'CellClickEvent', {'type': NotRequired[str], 'timestamp': NotRequired[NumberType]} ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, format: typing.Optional[str] = None, size: typing.Optional[Literal['default', 'large']] = None, value: typing.Optional[str] = None, defaultValue: typing.Optional[str] = None, customCells: typing.Optional[typing.Sequence['CustomCells']] = None, cellClickEvent: typing.Optional['CellClickEvent'] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'locale', 'format', 'size', 'value', 'defaultValue', 'customCells', 'cellClickEvent', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'locale', 'format', 'size', 'value', 'defaultValue', 'customCells', 'cellClickEvent', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdCalendar, self).__init__(**args) setattr(AntdCalendar, '__init__', _explicitize_args(AntdCalendar.__init__)) ================================================ FILE: feffery_antd_components/AntdCard.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCard(Component): """An AntdCard component. Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - header (dict; optional): 设置卡片头部区域css样式. - title (dict; optional): 设置卡片标题css样式. - extra (dict; optional): 设置卡片右上角的操作区域css样式. - cover (dict; optional): 设置标题封面css样式. - body (dict; optional): 设置卡片内容区域css样式. - actions (dict; optional): 设置卡片底部操作组css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - header (string; optional): 设置卡片头部区域css类名. - title (string; optional): 设置卡片标题css类名. - extra (string; optional): 设置卡片右上角的操作区域css类名. - cover (string; optional): 设置标题封面css类名. - body (string; optional): 设置卡片内容区域css类名. - actions (string; optional): 设置卡片底部操作组css类名. - actions (a list of or a singular dash component, string or number; optional): 组件型,底部操作区元素. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - extraLink (dict; optional): 配置卡片右上角额外链接相关参数. `extraLink` is a dict with keys: - content (string; optional): 链接文字内容. - href (string; optional): 链接地址. - target (string; optional): 链接跳转行为. - className (string; optional): 链接css类名. - style (dict; optional): 链接css样式. - extra (a list of or a singular dash component, string or number; optional): 组件型,卡片右上角额外元素,优先级高于`extraLink`. - coverImg (dict; optional): 配置封面图片相关参数. `coverImg` is a dict with keys: - src (string; optional): 图片资源地址. - alt (string; optional): 图片alt信息. - className (string; optional): 图片css类名. - style (dict; optional): 图片css样式. - variant (a value equal to: 'outlined', 'borderless'; default 'outlined'): 卡片形态变体,可选项有`'outlined'`、`'borderless'` 默认值:`'outlined'`. - hoverable (boolean; default False): 是否在鼠标悬停时显示特殊样式 默认值:`False`. - size (a value equal to: 'default', 'small'; default 'default'): 卡片尺寸规格,可选项有`'default'`、`'small'` 默认值:`'default'`. - nClicks (number; default 0): 监听当前卡片累计点击次数 默认值:`0`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['actions', 'title', 'extra'] _base_nodes = ['actions', 'title', 'extra', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCard' Styles = TypedDict( 'Styles', { 'header': NotRequired[dict], 'title': NotRequired[dict], 'extra': NotRequired[dict], 'cover': NotRequired[dict], 'body': NotRequired[dict], 'actions': NotRequired[dict], }, ) ClassNames = TypedDict( 'ClassNames', { 'header': NotRequired[str], 'title': NotRequired[str], 'extra': NotRequired[str], 'cover': NotRequired[str], 'body': NotRequired[str], 'actions': NotRequired[str], }, ) ExtraLink = TypedDict( 'ExtraLink', { 'content': NotRequired[str], 'href': NotRequired[str], 'target': NotRequired[str], 'className': NotRequired[str], 'style': NotRequired[dict], }, ) CoverImg = TypedDict( 'CoverImg', { 'src': NotRequired[str], 'alt': NotRequired[str], 'className': NotRequired[str], 'style': NotRequired[dict], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, actions: typing.Optional[ComponentType] = None, title: typing.Optional[ComponentType] = None, extraLink: typing.Optional['ExtraLink'] = None, extra: typing.Optional[ComponentType] = None, coverImg: typing.Optional['CoverImg'] = None, variant: typing.Optional[Literal['outlined', 'borderless']] = None, hoverable: typing.Optional[bool] = None, size: typing.Optional[Literal['default', 'small']] = None, nClicks: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'actions', 'title', 'extraLink', 'extra', 'coverImg', 'variant', 'hoverable', 'size', 'nClicks', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'actions', 'title', 'extraLink', 'extra', 'coverImg', 'variant', 'hoverable', 'size', 'nClicks', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCard, self).__init__(children=children, **args) setattr(AntdCard, '__init__', _explicitize_args(AntdCard.__init__)) ================================================ FILE: feffery_antd_components/AntdCardGrid.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCardGrid(Component): """An AntdCardGrid component. 卡片网格组件AntdCardGrid Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - hoverable (boolean; default True): 鼠标悬停时是否显示特殊样式 默认值:`True`. - nClicks (number; default 0): 监听当前卡片网格累计点击次数 默认值:`0`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdCardGrid' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, hoverable: typing.Optional[bool] = None, nClicks: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'hoverable', 'nClicks', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'hoverable', 'nClicks', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCardGrid, self).__init__(children=children, **args) setattr(AntdCardGrid, '__init__', _explicitize_args(AntdCardGrid.__init__)) ================================================ FILE: feffery_antd_components/AntdCardMeta.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCardMeta(Component): """An AntdCardMeta component. 结构化卡片组件AntdCardMeta Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - avatar (a list of or a singular dash component, string or number; optional): 组件型,头像元素. - description (a list of or a singular dash component, string or number; optional): 组件型,描述内容. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['avatar', 'description', 'title'] _base_nodes = ['avatar', 'description', 'title', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCardMeta' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, avatar: typing.Optional[ComponentType] = None, description: typing.Optional[ComponentType] = None, title: typing.Optional[ComponentType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'avatar', 'description', 'title', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'avatar', 'description', 'title', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdCardMeta, self).__init__(**args) setattr(AntdCardMeta, '__init__', _explicitize_args(AntdCardMeta.__init__)) ================================================ FILE: feffery_antd_components/AntdCarousel.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCarousel(Component): """An AntdCarousel component. 走马灯组件AntdCarousel Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,定义走马灯中需要轮播的若干元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - arrows (boolean; default False): 是否显示箭头 默认值:`False`. - autoplay (dict; default False): 是否自动轮播,可传入字典型进行更多配置 默认值:`False`. `autoplay` is a boolean | dict with keys: - dotDuration (boolean; optional): 是否展示指示点进度条. - dotPosition (a value equal to: 'top', 'bottom', 'left', 'right'; default 'bottom'): 面板指示器位置,可选项有`'top'`、`'bottom'`、`'left'`、`'right'` 默认值:`'bottom'`. - easing (string; default 'linear'): 调整动画效果,同css中的`animation-timing-function` 默认值:'linear'. - effect (a value equal to: 'scrollx', 'fade'; default 'scrollx'): 动化效果,可选项有`'scrollx'`、`'fade'` 默认值:'scrollx'. - autoplaySpeed (number; default 3000): 轮播间隔时长,单位:毫秒 默认值:`3000`. - speed (number; default 500): 轮播动画耗时,单位:毫秒 默认值:`500`. - pauseOnHover (boolean; default False): 是否在鼠标悬停时暂停轮播 默认值:`False`. - infinite (boolean; default True): 是否启用无限循环轮播 默认值:`True`. - lazyLoad (boolean; default False): 是否针对走马灯中的子项实施懒加载效果 默认值:`False`. - slidesToShow (number; default 1): 同时展示的子项数量 默认值:`1`. - slidesToScroll (number; default 1): 一次轮播划过的子项数量 默认值:`1`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdCarousel' Autoplay = TypedDict('Autoplay', {'dotDuration': NotRequired[bool]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, arrows: typing.Optional[bool] = None, autoplay: typing.Optional[typing.Union[bool, 'Autoplay']] = None, dotPosition: typing.Optional[Literal['top', 'bottom', 'left', 'right']] = None, easing: typing.Optional[str] = None, effect: typing.Optional[Literal['scrollx', 'fade']] = None, autoplaySpeed: typing.Optional[NumberType] = None, speed: typing.Optional[NumberType] = None, pauseOnHover: typing.Optional[bool] = None, infinite: typing.Optional[bool] = None, lazyLoad: typing.Optional[bool] = None, slidesToShow: typing.Optional[NumberType] = None, slidesToScroll: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'arrows', 'autoplay', 'dotPosition', 'easing', 'effect', 'autoplaySpeed', 'speed', 'pauseOnHover', 'infinite', 'lazyLoad', 'slidesToShow', 'slidesToScroll', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'arrows', 'autoplay', 'dotPosition', 'easing', 'effect', 'autoplaySpeed', 'speed', 'pauseOnHover', 'infinite', 'lazyLoad', 'slidesToShow', 'slidesToScroll', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCarousel, self).__init__(children=children, **args) setattr(AntdCarousel, '__init__', _explicitize_args(AntdCarousel.__init__)) ================================================ FILE: feffery_antd_components/AntdCascader.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCascader(Component): """An AntdCascader component. 级联选择组件AntdCascader Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - popupClassName (string; optional): 展开菜单css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - optionsMode (a value equal to: 'tree', 'flat'; default 'tree'): 对应`options`格式的渲染模式,可选项有`'tree'`(树形模式)、`'flat'`(扁平模式) 默认值:`'tree'`. - options (list; required): 定义构造级联选择所需的数据结构,与`optionsMode`一致. - optionsNodeKeyToLabel (dict with strings as keys and values of type a list of or a singular dash component, string or number; optional): 针对级联结构中的指定节点,定义作为标题的组件型内容,优先级高于`options`中对应的`label`值. - optionFilterProp (a value equal to: 'value', 'label'; default 'label'): 选项关键词搜索时的目标字段,可选项有`'value'`、`'label'` 默认值:`'label'`. - panelMode (boolean; default False): 是否开启内嵌面板模式 默认值:`False`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - changeOnSelect (boolean; default False): 是否当级联选择中的任意节点被选择时均进行选中值更新 默认值:`False`. - size (a value equal to: 'small', 'middle', 'large'; optional): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - placeholder (string; optional): 输入框占位文字内容. - placement (a value equal to: 'bottomLeft', 'bottomRight', 'topLeft', 'topRight'; default 'bottomLeft'): 选择菜单展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` 默认值:`'bottomLeft'`. - value (list of string | numbers | list of list of string | numberss; optional): 监听或设置已选值. - defaultValue (list of string | numbers | list of list of string | numberss; optional): 初始化已选值. - multiple (boolean; default False): 是否开启多选模式 默认值:`False`. - maxTagCount (number | a value equal to: 'responsive'; optional): 当`multiple=True`时,已选值展示的最大数量. - expandTrigger (a value equal to: 'click', 'hover'; default 'click'): 选择菜单展开触发方式,可选项有`'click'`、`'hover'` 默认值:`'click'`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - allowClear (boolean; default True): 是否允许一键清空已选值 默认值:`True`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - showCheckedStrategy (a value equal to: 'show-parent', 'show-child'; optional): 已选项回填策略,可选项有`'show-parent'`、`'show-child'`. - prefix (a list of or a singular dash component, string or number; optional): 组件型,前缀内嵌内容. - suffixIcon (a list of or a singular dash component, string or number; optional): 自定义选择框后缀图标内容. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['optionsNodeKeyToLabel{}', 'prefix', 'suffixIcon'] _base_nodes = ['prefix', 'suffixIcon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCascader' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, popupClassName: typing.Optional[str] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, optionsMode: typing.Optional[Literal['tree', 'flat']] = None, options: typing.Optional[typing.Union[typing.Any, typing.Sequence[typing.Any]]] = None, optionsNodeKeyToLabel: typing.Optional[ typing.Dict[typing.Union[str, float, int], ComponentType] ] = None, optionFilterProp: typing.Optional[Literal['value', 'label']] = None, panelMode: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, changeOnSelect: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[str] = None, placement: typing.Optional[ Literal['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] ] = None, value: typing.Optional[ typing.Union[ typing.Sequence[typing.Union[str, NumberType]], typing.Sequence[typing.Sequence[typing.Union[str, NumberType]]], ] ] = None, defaultValue: typing.Optional[ typing.Union[ typing.Sequence[typing.Union[str, NumberType]], typing.Sequence[typing.Sequence[typing.Union[str, NumberType]]], ] ] = None, multiple: typing.Optional[bool] = None, maxTagCount: typing.Optional[typing.Union[NumberType, Literal['responsive']]] = None, expandTrigger: typing.Optional[Literal['click', 'hover']] = None, status: typing.Optional[Literal['error', 'warning']] = None, allowClear: typing.Optional[bool] = None, autoFocus: typing.Optional[bool] = None, showCheckedStrategy: typing.Optional[Literal['show-parent', 'show-child']] = None, prefix: typing.Optional[ComponentType] = None, suffixIcon: typing.Optional[ComponentType] = None, readOnly: typing.Optional[bool] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'optionsMode', 'options', 'optionsNodeKeyToLabel', 'optionFilterProp', 'panelMode', 'disabled', 'changeOnSelect', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'multiple', 'maxTagCount', 'expandTrigger', 'status', 'allowClear', 'autoFocus', 'showCheckedStrategy', 'prefix', 'suffixIcon', 'readOnly', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'optionsMode', 'options', 'optionsNodeKeyToLabel', 'optionFilterProp', 'panelMode', 'disabled', 'changeOnSelect', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'multiple', 'maxTagCount', 'expandTrigger', 'status', 'allowClear', 'autoFocus', 'showCheckedStrategy', 'prefix', 'suffixIcon', 'readOnly', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} for k in ['options']: if k not in args: raise TypeError('Required argument `' + k + '` was not specified.') super(AntdCascader, self).__init__(**args) setattr(AntdCascader, '__init__', _explicitize_args(AntdCascader.__init__)) ================================================ FILE: feffery_antd_components/AntdCenter.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCenter(Component): """An AntdCenter component. 居中组件AntdCenter Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - inline (boolean; default False): 是否渲染为行内元素 默认值:`False`. - inheritStyleToken (boolean; default False): 是否在背景色、字体颜色、字体大小等样式上联动`AntdConfigProvider`相关设置 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdCenter' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, inline: typing.Optional[bool] = None, inheritStyleToken: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'inline', 'inheritStyleToken', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'inline', 'inheritStyleToken', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCenter, self).__init__(children=children, **args) setattr(AntdCenter, '__init__', _explicitize_args(AntdCenter.__init__)) ================================================ FILE: feffery_antd_components/AntdCheckCard.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCheckCard(Component): """An AntdCheckCard component. 选择卡片组件AntdCheckCard Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - checked (boolean; optional): 监听或设置是否被选中. - defaultChecked (boolean; optional): 初始化是否被选中. - bordered (boolean; default True): 是否显示边框 默认值:`True`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - size (a value equal to: 'small', 'default', 'large'; default 'default'): 当前组件尺寸规格,可选项有`'small'`、`'default'`、`'large'` 默认值:`'default'`. - value (number | string; optional): 当前选择卡片值. - readOnly (boolean; default False): 是否渲染为只读状态 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'checked's; optional): 开启属性持久化功能的若干属性名,可选项有`'checked'` 默认值:`['checked']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdCheckCard' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, checked: typing.Optional[bool] = None, defaultChecked: typing.Optional[bool] = None, bordered: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'default', 'large']] = None, value: typing.Optional[typing.Union[NumberType, str]] = None, readOnly: typing.Optional[bool] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['checked']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'name', 'enableBatchControl', 'checked', 'defaultChecked', 'bordered', 'disabled', 'size', 'value', 'readOnly', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'name', 'enableBatchControl', 'checked', 'defaultChecked', 'bordered', 'disabled', 'size', 'value', 'readOnly', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCheckCard, self).__init__(children=children, **args) setattr(AntdCheckCard, '__init__', _explicitize_args(AntdCheckCard.__init__)) ================================================ FILE: feffery_antd_components/AntdCheckCardGroup.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCheckCardGroup(Component): """An AntdCheckCardGroup component. 组合选择卡片组件AntdCheckCardGroup Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌若干`AntdCheckCard`相关组件. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - multiple (boolean; default False): 是否开启多选 默认值:`False`. - allowNoValue (boolean; default True): 是否允许当前组合选择卡片中仅剩的选项被取消选中 默认值:`True`. - bordered (boolean; default True): 是否显示边框 默认值:`True`. - value (number | string | list of number | strings; optional): 监听或设置已选中卡片值. - defaultValue (number | string | list of number | strings; optional): 初始化已选中卡片值. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - size (a value equal to: 'small', 'default', 'large'; default 'default'): 当前组件尺寸规格,可选项有`'small'`、`'default'`、`'large'` 默认值:`'default'`. - readOnly (boolean; default False): 是否渲染为只读状态 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdCheckCardGroup' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, multiple: typing.Optional[bool] = None, allowNoValue: typing.Optional[bool] = None, bordered: typing.Optional[bool] = None, value: typing.Optional[ typing.Union[ typing.Union[NumberType, str], typing.Sequence[typing.Union[NumberType, str]] ] ] = None, defaultValue: typing.Optional[ typing.Union[ typing.Union[NumberType, str], typing.Sequence[typing.Union[NumberType, str]] ] ] = None, disabled: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'default', 'large']] = None, readOnly: typing.Optional[bool] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'name', 'enableBatchControl', 'multiple', 'allowNoValue', 'bordered', 'value', 'defaultValue', 'disabled', 'size', 'readOnly', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'name', 'enableBatchControl', 'multiple', 'allowNoValue', 'bordered', 'value', 'defaultValue', 'disabled', 'size', 'readOnly', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCheckCardGroup, self).__init__(children=children, **args) setattr(AntdCheckCardGroup, '__init__', _explicitize_args(AntdCheckCardGroup.__init__)) ================================================ FILE: feffery_antd_components/AntdCheckableTag.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCheckableTag(Component): """An AntdCheckableTag component. 可选择标签AntdCheckableTag Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - content (a list of or a singular dash component, string or number; optional): 组件型,标签内容. - checkedContent (a list of or a singular dash component, string or number; optional): 组件型,选择状态下的标签内容. - unCheckedContent (a list of or a singular dash component, string or number; optional): 组件型,未选择状态下的标签内容. - checked (boolean; default False): 监听或设置当前标签的选择状态 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['content', 'checkedContent', 'unCheckedContent'] _base_nodes = ['content', 'checkedContent', 'unCheckedContent', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCheckableTag' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, content: typing.Optional[ComponentType] = None, checkedContent: typing.Optional[ComponentType] = None, unCheckedContent: typing.Optional[ComponentType] = None, checked: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'content', 'checkedContent', 'unCheckedContent', 'checked', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'content', 'checkedContent', 'unCheckedContent', 'checked', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdCheckableTag, self).__init__(**args) setattr(AntdCheckableTag, '__init__', _explicitize_args(AntdCheckableTag.__init__)) ================================================ FILE: feffery_antd_components/AntdCheckbox.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCheckbox(Component): """An AntdCheckbox component. 选择框组件AntdCheckbox Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - label (a list of or a singular dash component, string or number; optional): 组件型,标签内容. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - checked (boolean; default False): 监听或设置当前选择框是否选中 默认值:`False`. - indeterminate (boolean; default False): 是否强制渲染为半选中状态,仅影响样式,与选中状态无关 默认值:`False`. - readOnly (boolean; default False): 是否渲染为只读状态 默认值:`False`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'checked's; optional): 开启属性持久化功能的若干属性名,可选项有`'checked'` 默认值:`['checked']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['label'] _base_nodes = ['label', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCheckbox' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, label: typing.Optional[ComponentType] = None, autoFocus: typing.Optional[bool] = None, checked: typing.Optional[bool] = None, indeterminate: typing.Optional[bool] = None, readOnly: typing.Optional[bool] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['checked']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'disabled', 'label', 'autoFocus', 'checked', 'indeterminate', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'disabled', 'label', 'autoFocus', 'checked', 'indeterminate', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdCheckbox, self).__init__(**args) setattr(AntdCheckbox, '__init__', _explicitize_args(AntdCheckbox.__init__)) ================================================ FILE: feffery_antd_components/AntdCheckboxGroup.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCheckboxGroup(Component): """An AntdCheckboxGroup component. 组合选择框组件AntdCheckboxGroup Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - options (list of dicts; optional): 定义构造组合选择框所需的数据结构. `options` is a list of string | number | dict with keys: - label (a list of or a singular dash component, string or number; optional): 组件型,当前选择框标签内容. - value (string | number; optional): 当前选择框对应值. - disabled (boolean; optional): 是否禁用当前选择框 默认值:`False`.s - value (list of string | numbers; optional): 监听或设置已选值. - readOnly (boolean; default False): 是否渲染为只读状态 默认值:`False`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['options[].label'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdCheckboxGroup' Options = TypedDict( 'Options', { 'label': NotRequired[ComponentType], 'value': NotRequired[typing.Union[str, NumberType]], 'disabled': NotRequired[bool], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, options: typing.Optional[typing.Sequence[typing.Union[str, NumberType, 'Options']]] = None, value: typing.Optional[typing.Sequence[typing.Union[str, NumberType]]] = None, readOnly: typing.Optional[bool] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'disabled', 'options', 'value', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'disabled', 'options', 'value', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdCheckboxGroup, self).__init__(**args) setattr(AntdCheckboxGroup, '__init__', _explicitize_args(AntdCheckboxGroup.__init__)) ================================================ FILE: feffery_antd_components/AntdCol.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCol(Component): """An AntdCol component. 列组件AntdCol Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - span (number; optional): 列所占宽度份数. - offset (number; default 0): 列左侧间隔宽度份数 默认值:`0`. - order (number; default 0): 列顺序 默认值:`0`. - pull (number; default 0): 列向左移动宽度份数 默认值:`0`. - push (number; default 0): 列向右移动宽度份数 默认值:`0`. - flex (string | number; optional): 同css中的flex. - xs (dict; optional): 配置列在页面宽度小于567px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数. `xs` is a number | dict with keys: - span (number; optional): 同span参数. - offset (number; optional): 同offset参数. - order (number; optional): 同order参数. - pull (number; optional): 同pull参数. - push (number; optional): 同push参数. - sm (dict; optional): 配置列在页面宽度大于等于567px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数. `sm` is a number | dict with keys: - span (number; optional): 同span参数. - offset (number; optional): 同offset参数. - order (number; optional): 同order参数. - pull (number; optional): 同pull参数. - push (number; optional): 同push参数. - md (dict; optional): 配置列在页面宽度大于等于768px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数. `md` is a number | dict with keys: - span (number; optional): 同span参数. - offset (number; optional): 同offset参数. - order (number; optional): 同order参数. - pull (number; optional): 同pull参数. - push (number; optional): 同push参数. - lg (dict; optional): 配置列在页面宽度大于等于992px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数. `lg` is a number | dict with keys: - span (number; optional): 同span参数. - offset (number; optional): 同offset参数. - order (number; optional): 同order参数. - pull (number; optional): 同pull参数. - push (number; optional): 同push参数. - xl (dict; optional): 配置列在页面宽度大于等于1200px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数. `xl` is a number | dict with keys: - span (number; optional): 同span参数. - offset (number; optional): 同offset参数. - order (number; optional): 同order参数. - pull (number; optional): 同pull参数. - push (number; optional): 同push参数. - xxl (dict; optional): 配置列在页面宽度大于等于1600px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数. `xxl` is a number | dict with keys: - span (number; optional): 同span参数. - offset (number; optional): 同offset参数. - order (number; optional): 同order参数. - pull (number; optional): 同pull参数. - push (number; optional): 同push参数. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdCol' Xs = TypedDict( 'Xs', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'order': NotRequired[NumberType], 'pull': NotRequired[NumberType], 'push': NotRequired[NumberType], }, ) Sm = TypedDict( 'Sm', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'order': NotRequired[NumberType], 'pull': NotRequired[NumberType], 'push': NotRequired[NumberType], }, ) Md = TypedDict( 'Md', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'order': NotRequired[NumberType], 'pull': NotRequired[NumberType], 'push': NotRequired[NumberType], }, ) Lg = TypedDict( 'Lg', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'order': NotRequired[NumberType], 'pull': NotRequired[NumberType], 'push': NotRequired[NumberType], }, ) Xl = TypedDict( 'Xl', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'order': NotRequired[NumberType], 'pull': NotRequired[NumberType], 'push': NotRequired[NumberType], }, ) Xxl = TypedDict( 'Xxl', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'order': NotRequired[NumberType], 'pull': NotRequired[NumberType], 'push': NotRequired[NumberType], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, span: typing.Optional[NumberType] = None, offset: typing.Optional[NumberType] = None, order: typing.Optional[NumberType] = None, pull: typing.Optional[NumberType] = None, push: typing.Optional[NumberType] = None, flex: typing.Optional[typing.Union[str, NumberType]] = None, xs: typing.Optional[typing.Union[NumberType, 'Xs']] = None, sm: typing.Optional[typing.Union[NumberType, 'Sm']] = None, md: typing.Optional[typing.Union[NumberType, 'Md']] = None, lg: typing.Optional[typing.Union[NumberType, 'Lg']] = None, xl: typing.Optional[typing.Union[NumberType, 'Xl']] = None, xxl: typing.Optional[typing.Union[NumberType, 'Xxl']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'span', 'offset', 'order', 'pull', 'push', 'flex', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'span', 'offset', 'order', 'pull', 'push', 'flex', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCol, self).__init__(children=children, **args) setattr(AntdCol, '__init__', _explicitize_args(AntdCol.__init__)) ================================================ FILE: feffery_antd_components/AntdCollapse.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCollapse(Component): """An AntdCollapse component. 折叠面板组件AntdCollapse Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - header (dict; optional): 头部元素css样式. - body (dict; optional): 内容元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - header (string; optional): 头部元素css类名. - body (string; optional): 内容元素css类名. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - isOpen (boolean; default True): 是否展开 默认值:`True`. - size (a value equal to: 'large', 'middle', 'small'; default 'middle'): 组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否渲染边框 默认值:`True`. - showArrow (boolean; default True): 是否渲染箭头 默认值:`True`. - ghost (boolean; default False): 是否开启透明背景模式 默认值:`False`. - collapsible (a value equal to: 'header', 'disabled', 'icon'; optional): 折叠交互触发行为,可选项有`'header'`(仅标题区域)、`'disabled'`(禁用折叠)、`'icon'`(仅图标区域). - forceRender (boolean; default False): 初始化未展开时,是否强制渲染内部元素 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'isOpen's; optional): 开启属性持久化功能的若干属性名,可选项有`'isOpen'` 默认值:`['isOpen']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['title'] _base_nodes = ['title', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCollapse' Styles = TypedDict('Styles', {'header': NotRequired[dict], 'body': NotRequired[dict]}) ClassNames = TypedDict('ClassNames', {'header': NotRequired[str], 'body': NotRequired[str]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, title: typing.Optional[ComponentType] = None, isOpen: typing.Optional[bool] = None, size: typing.Optional[Literal['large', 'middle', 'small']] = None, bordered: typing.Optional[bool] = None, showArrow: typing.Optional[bool] = None, ghost: typing.Optional[bool] = None, collapsible: typing.Optional[Literal['header', 'disabled', 'icon']] = None, forceRender: typing.Optional[bool] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['isOpen']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'title', 'isOpen', 'size', 'bordered', 'showArrow', 'ghost', 'collapsible', 'forceRender', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'title', 'isOpen', 'size', 'bordered', 'showArrow', 'ghost', 'collapsible', 'forceRender', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCollapse, self).__init__(children=children, **args) setattr(AntdCollapse, '__init__', _explicitize_args(AntdCollapse.__init__)) ================================================ FILE: feffery_antd_components/AntdColorPicker.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdColorPicker(Component): """An AntdColorPicker component. 颜色选择器组件AntdColorPicker Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - allowClear (boolean; default False): 是否允许清除已选颜色 默认值:`False`. - arrow (dict; optional): 配置颜色选择面板额外箭头 默认值:`True`. `arrow` is a boolean | dict with keys: - pointAtCenter (boolean; optional): 箭头是否指向面板中心 默认值:`False`. - defaultValue (string; optional): 初始化已输入值. - value (string; optional): 监听或设置选中颜色值 默认值:`'#1677FF'`. - format (a value equal to: 'rgb', 'hex', 'hsb'; default 'hex'): 监听或设置颜色格式,可选项有`'rgb'`、`'hex'`、`'hsb'` 默认值:`'hex'`. - mode (a value equal to: 'single', 'gradient' | list of a value equal to: 'single', 'gradient's; default 'single'): 选择器模式,用于配置单色与渐变,可选项有`'single'`、`'gradient'`,支持单选项或多选项组合 默认值:`single`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - disabledAlpha (boolean; default True): 是否禁用透明度选择 默认值:`True`. - open (boolean; optional): 监听或设置颜色选择面板展开状态. - presets (list of dicts; optional): 配置预设颜色选择项. `presets` is a list of dicts with keys: - label (a list of or a singular dash component, string or number; optional): 组件型,当前预设项标签内容. - colors (list of strings; optional): 当前预设项所包含的颜色值数组. - defaultOpen (boolean; optional): 当前预设项默认是否展开 默认值:`True`. - placement (a value equal to: 'top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'; default 'bottomLeft'): 颜色选择面板展开方向,可选项有`'top'`、`'topLeft'`、`'topRight'`、`'bottom'`、`'bottomLeft'`、`'bottomRight'` 默认值:`'bottomRight'`. - showText (boolean; default False): 是否显示颜色值文本 默认值:`False`. - size (a value equal to: 'large', 'middle', 'small'; default 'middle'): 设置触发控件尺寸规格,可选项有`'large'`、`'middle'`、`'small'` 默认值:`'middle'`. - trigger (a value equal to: 'hover', 'click'; default 'click'): 颜色选择面板触发方式,可选项有`'hover'`、`'click'` 默认值:`'click'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['presets[].label'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdColorPicker' Arrow = TypedDict('Arrow', {'pointAtCenter': NotRequired[bool]}) Presets = TypedDict( 'Presets', { 'label': NotRequired[ComponentType], 'colors': NotRequired[typing.Sequence[str]], 'defaultOpen': NotRequired[bool], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, allowClear: typing.Optional[bool] = None, arrow: typing.Optional[typing.Union[bool, 'Arrow']] = None, defaultValue: typing.Optional[str] = None, value: typing.Optional[str] = None, format: typing.Optional[Literal['rgb', 'hex', 'hsb']] = None, mode: typing.Optional[ typing.Union[ Literal['single', 'gradient'], typing.Sequence[Literal['single', 'gradient']] ] ] = None, disabled: typing.Optional[bool] = None, disabledAlpha: typing.Optional[bool] = None, open: typing.Optional[bool] = None, presets: typing.Optional[typing.Sequence['Presets']] = None, placement: typing.Optional[ Literal['top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'] ] = None, showText: typing.Optional[bool] = None, size: typing.Optional[Literal['large', 'middle', 'small']] = None, trigger: typing.Optional[Literal['hover', 'click']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'locale', 'name', 'enableBatchControl', 'allowClear', 'arrow', 'defaultValue', 'value', 'format', 'mode', 'disabled', 'disabledAlpha', 'open', 'presets', 'placement', 'showText', 'size', 'trigger', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'locale', 'name', 'enableBatchControl', 'allowClear', 'arrow', 'defaultValue', 'value', 'format', 'mode', 'disabled', 'disabledAlpha', 'open', 'presets', 'placement', 'showText', 'size', 'trigger', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdColorPicker, self).__init__(**args) setattr(AntdColorPicker, '__init__', _explicitize_args(AntdColorPicker.__init__)) ================================================ FILE: feffery_antd_components/AntdComment.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdComment(Component): """An AntdComment component. 评论组件AntdComment Keyword arguments: - id (string; optional): 组件唯一id. - children (a list of or a singular dash component, string or number; optional): 传入内部嵌套的评论组件. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - commentId (string; optional): 评论唯一id,可用于数据库匹配等场景. - authorName (string; optional): 评论发布用户名. - authorNameHref (string; optional): 评论发布用户名附带链接地址. - publishTime (dict; required): 必填,配置发布日期时间相关参数. `publishTime` is a dict with keys: - value (string; required): 必填,日期时间字符串. - format (string; optional): 与日期时间字符串匹配的格式. - fromNow (boolean; default False): 是否以相对时间格式呈现发布日期时间. - showLikeDislike (boolean; default True): 是否显示“支持/反对”按钮 默认值:`True`. - showReply (boolean; default True): 是否显示“添加回复”按钮 默认值:`True`. - showDelete (boolean; default False): 是否显示“删除”按钮 默认值:`False`. - replyClicks (number; default 0): 监听“添加回复”按钮累计点击次数 默认值:`0`. - deleteClicks (number; default 0): 监听“删除”按钮累计点击次数 默认值:`0`. - commentContent (a list of or a singular dash component, string or number; optional): 组件型,评论正文内容. - likesCount (number; default 0): 监听或设置“支持”次数. - dislikesCount (number; default 0): 监听或设置“反对”次数. - action (a value equal to: 'liked', 'disliked', 'default'; optional): 监听或设置当前评论“支持/反对”状态,可选项有`'liked'`、`'disliked'`、`'default'` 默认值:`'default'`. - defaultAction (a value equal to: 'liked', 'disliked', 'default'; optional): 设置当前评论初始化时的“支持/反对”状态,可选项有`'liked'`、`'disliked'`、`'default'`. - avatarProps (dict; optional): 配置评论用户头像,同`AntdAvatar`. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading.""" _children_props: typing.List[str] = ['commentContent'] _base_nodes = ['commentContent', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdComment' PublishTime = TypedDict('PublishTime', {'value': str, 'format': NotRequired[str]}) LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, commentId: typing.Optional[str] = None, authorName: typing.Optional[str] = None, authorNameHref: typing.Optional[str] = None, publishTime: typing.Optional['PublishTime'] = None, fromNow: typing.Optional[bool] = None, showLikeDislike: typing.Optional[bool] = None, showReply: typing.Optional[bool] = None, showDelete: typing.Optional[bool] = None, replyClicks: typing.Optional[NumberType] = None, deleteClicks: typing.Optional[NumberType] = None, commentContent: typing.Optional[ComponentType] = None, likesCount: typing.Optional[NumberType] = None, dislikesCount: typing.Optional[NumberType] = None, action: typing.Optional[Literal['liked', 'disliked', 'default']] = None, defaultAction: typing.Optional[Literal['liked', 'disliked', 'default']] = None, avatarProps: typing.Optional[dict] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, loading_state: typing.Optional['LoadingState'] = None, **kwargs, ): self._prop_names = [ 'id', 'children', 'key', 'style', 'className', 'locale', 'commentId', 'authorName', 'authorNameHref', 'publishTime', 'fromNow', 'showLikeDislike', 'showReply', 'showDelete', 'replyClicks', 'deleteClicks', 'commentContent', 'likesCount', 'dislikesCount', 'action', 'defaultAction', 'avatarProps', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'children', 'key', 'style', 'className', 'locale', 'commentId', 'authorName', 'authorNameHref', 'publishTime', 'fromNow', 'showLikeDislike', 'showReply', 'showDelete', 'replyClicks', 'deleteClicks', 'commentContent', 'likesCount', 'dislikesCount', 'action', 'defaultAction', 'avatarProps', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} for k in ['publishTime']: if k not in args: raise TypeError('Required argument `' + k + '` was not specified.') super(AntdComment, self).__init__(children=children, **args) setattr(AntdComment, '__init__', _explicitize_args(AntdComment.__init__)) ================================================ FILE: feffery_antd_components/AntdCompact.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCompact(Component): """An AntdCompact component. 紧凑排列组件AntdCompact Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - direction (a value equal to: 'vertical', 'horizontal'; default 'horizontal'): 排列方向,可选项有`'vertical'`、`'horizontal'` 默认值:`'horizontal'`. - block (boolean; default False): 是否渲染为块级元素(宽度撑满父容器) 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdCompact' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, direction: typing.Optional[Literal['vertical', 'horizontal']] = None, block: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'direction', 'block', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'direction', 'block', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCompact, self).__init__(children=children, **args) setattr(AntdCompact, '__init__', _explicitize_args(AntdCompact.__init__)) ================================================ FILE: feffery_antd_components/AntdConfigProvider.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdConfigProvider(Component): """An AntdConfigProvider component. 参数配置组件AntdConfigProvider Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - algorithm (a value equal to: 'default', 'dark', 'compact' | list of a value equal to: 'default', 'dark', 'compact's; default 'default'): 为内部组件设置快捷主题算法,支持多种主题组合,可选项有`'default'`、`'dark'`、`'compact'` 默认值:`'default'`. - cssVar (dict; optional): 是否开启`CSS`变量模式,具体参考:https://ant-design.antgroup.com/docs/react/css-variables 默认值:`False`. `cssVar` is a boolean | dict with keys: - prefix (string; optional) - key (string; optional) - useOldTheme (a value equal to: 'default', 'dark'; optional): 是否强制使用`0.3.x`版本之前的主题样式,可选项有`'default'`、`'dark'`. - primaryColor (string; optional): 主题色. - componentDisabled (boolean; optional): 是否针后代元素中的所有组件强制设置禁用状态. - componentSize (a value equal to: 'small', 'middle', 'large'; optional): 强制设置后代元素的尺寸规格,可选项有`'small'`、`'middle'`、`'large'`,其中`'default'`兼容`'middle'`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; optional): 强制设置后代元素的语言,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语). - wavesDisabled (boolean; default False): 是否禁用内部组件水波纹动效 默认值:`False`. - token (dict; optional): 配置`design token`相关参数. `token` is a dict with keys: - motion (boolean; optional): 是否开启动画效果 默认值:`True`. - componentsToken (dict; optional): 配置针对具体组件的`design token`相关参数. `componentsToken` is a dict with strings as keys and values of type dict with keys: - algorithm (boolean; optional): 是否开启派生样式自动推导运算 默认值:`False`. - compatibilityMode (boolean; default False): 是否开启针对`88`及以下版本`Chromium`内核浏览器的向下兼容模式 默认值:`False`. - enableLayer (boolean; default False): 是否启用layer样式降权 默认值:`False`.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdConfigProvider' CssVar = TypedDict('CssVar', {'prefix': NotRequired[str], 'key': NotRequired[str]}) Token = TypedDict('Token', {'motion': NotRequired[bool]}) ComponentsToken = TypedDict('ComponentsToken', {'algorithm': NotRequired[bool]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, algorithm: typing.Optional[ typing.Union[ Literal['default', 'dark', 'compact'], typing.Sequence[Literal['default', 'dark', 'compact']], ] ] = None, cssVar: typing.Optional[typing.Union[bool, 'CssVar']] = None, useOldTheme: typing.Optional[Literal['default', 'dark']] = None, primaryColor: typing.Optional[str] = None, componentDisabled: typing.Optional[bool] = None, componentSize: typing.Optional[Literal['small', 'middle', 'large']] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, wavesDisabled: typing.Optional[bool] = None, token: typing.Optional['Token'] = None, componentsToken: typing.Optional[ typing.Dict[typing.Union[str, float, int], 'ComponentsToken'] ] = None, compatibilityMode: typing.Optional[bool] = None, enableLayer: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'algorithm', 'cssVar', 'useOldTheme', 'primaryColor', 'componentDisabled', 'componentSize', 'locale', 'wavesDisabled', 'token', 'componentsToken', 'compatibilityMode', 'enableLayer', ] self._valid_wildcard_attributes = [] self.available_properties = [ 'id', 'key', 'children', 'algorithm', 'cssVar', 'useOldTheme', 'primaryColor', 'componentDisabled', 'componentSize', 'locale', 'wavesDisabled', 'token', 'componentsToken', 'compatibilityMode', 'enableLayer', ] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdConfigProvider, self).__init__(children=children, **args) setattr(AntdConfigProvider, '__init__', _explicitize_args(AntdConfigProvider.__init__)) ================================================ FILE: feffery_antd_components/AntdContent.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdContent(Component): """An AntdContent component. 内容区组件AntdContent Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdContent' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, **kwargs, ): self._prop_names = ['id', 'key', 'children', 'style', 'className', 'data-*', 'aria-*'] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdContent, self).__init__(children=children, **args) setattr(AntdContent, '__init__', _explicitize_args(AntdContent.__init__)) ================================================ FILE: feffery_antd_components/AntdCopyText.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCopyText(Component): """An AntdCopyText component. 文字复制组件AntdCopyText Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - text (string; default ''): 复制目标内容. - format (a value equal to: 'text/plain', 'text/html'; default 'text/plain'): 剪切板内容的类型,可选项有`'text/plain'`、`text/html` 默认值:`'text/plain'`. - tooltips (list of a list of or a singular dash component, string or numbers | boolean; optional): 设置复制前后的文字提示内容,格式为`[复制前内容, 复制后内容]`,设置为`False`时关闭文字提示. - beforeIcon (a list of or a singular dash component, string or number; optional): 组件型,未复制状态图标. - afterIcon (a list of or a singular dash component, string or number; optional): 组件型,完成复制状态图标. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['tooltips', 'beforeIcon', 'afterIcon'] _base_nodes = ['tooltips', 'beforeIcon', 'afterIcon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCopyText' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, text: typing.Optional[str] = None, format: typing.Optional[Literal['text/plain', 'text/html']] = None, tooltips: typing.Optional[typing.Union[typing.Sequence[ComponentType], bool]] = None, beforeIcon: typing.Optional[ComponentType] = None, afterIcon: typing.Optional[ComponentType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'locale', 'text', 'format', 'tooltips', 'beforeIcon', 'afterIcon', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'locale', 'text', 'format', 'tooltips', 'beforeIcon', 'afterIcon', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdCopyText, self).__init__(**args) setattr(AntdCopyText, '__init__', _explicitize_args(AntdCopyText.__init__)) ================================================ FILE: feffery_antd_components/AntdCountdown.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCountdown(Component): """An AntdCountdown component. 倒计时组件AntdCountdown Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - format (string; optional): 日期时间显示格式,[参考资料](https://day.js.org/docs/en/display/format),如`HH:mm:ss`代表`时:分:秒`. - value (string; optional): 目标截止日期时间字符串,与`valueFormat`对应. - valueFormat (string; default 'YYYY-MM-DD hh:mm:ss'): 针对`value`设置对应的日期时间解析格式,[参考资料](https://day.js.org/docs/en/display/format) 默认值:`'YYYY-MM-DD hh:mm:ss'`. - prefix (a list of or a singular dash component, string or number; optional): 组件型,数值前缀内容. - suffix (a list of or a singular dash component, string or number; optional): 组件型,数值后缀内容. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - titleTooltip (string; optional): 为标题内容添加额外鼠标悬停提示信息. - valueStyle (dict; optional): 数值内容css样式. - finishEvent (dict; optional): 监听倒计时结束事件. `finishEvent` is a dict with keys: - timestamp (number; optional): 事件时间戳. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['prefix', 'suffix', 'title'] _base_nodes = ['prefix', 'suffix', 'title', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCountdown' FinishEvent = TypedDict('FinishEvent', {'timestamp': NotRequired[NumberType]}) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, format: typing.Optional[str] = None, value: typing.Optional[str] = None, valueFormat: typing.Optional[str] = None, prefix: typing.Optional[ComponentType] = None, suffix: typing.Optional[ComponentType] = None, title: typing.Optional[ComponentType] = None, titleTooltip: typing.Optional[str] = None, valueStyle: typing.Optional[dict] = None, finishEvent: typing.Optional['FinishEvent'] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'format', 'value', 'valueFormat', 'prefix', 'suffix', 'title', 'titleTooltip', 'valueStyle', 'finishEvent', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'format', 'value', 'valueFormat', 'prefix', 'suffix', 'title', 'titleTooltip', 'valueStyle', 'finishEvent', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdCountdown, self).__init__(**args) setattr(AntdCountdown, '__init__', _explicitize_args(AntdCountdown.__init__)) ================================================ FILE: feffery_antd_components/AntdCountup.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCountup(Component): """An AntdCountup component. 正计时组件AntdCountup Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - format (string; optional): 日期时间显示格式,[参考资料](https://day.js.org/docs/en/display/format),如`HH:mm:ss`代表`时:分:秒`. - value (string; optional): 目标截止日期时间字符串,与`valueFormat`对应. - valueFormat (string; default 'YYYY-MM-DD hh:mm:ss'): 针对`value`设置对应的日期时间解析格式,[参考资料](https://day.js.org/docs/en/display/format) 默认值:`'YYYY-MM-DD hh:mm:ss'`. - prefix (a list of or a singular dash component, string or number; optional): 组件型,数值前缀内容. - suffix (a list of or a singular dash component, string or number; optional): 组件型,数值后缀内容. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - titleTooltip (string; optional): 为标题内容添加额外鼠标悬停提示信息. - valueStyle (dict; optional): 数值内容css样式. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['prefix', 'suffix', 'title'] _base_nodes = ['prefix', 'suffix', 'title', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCountup' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, format: typing.Optional[str] = None, value: typing.Optional[str] = None, valueFormat: typing.Optional[str] = None, prefix: typing.Optional[ComponentType] = None, suffix: typing.Optional[ComponentType] = None, title: typing.Optional[ComponentType] = None, titleTooltip: typing.Optional[str] = None, valueStyle: typing.Optional[dict] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'format', 'value', 'valueFormat', 'prefix', 'suffix', 'title', 'titleTooltip', 'valueStyle', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'format', 'value', 'valueFormat', 'prefix', 'suffix', 'title', 'titleTooltip', 'valueStyle', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdCountup, self).__init__(**args) setattr(AntdCountup, '__init__', _explicitize_args(AntdCountup.__init__)) ================================================ FILE: feffery_antd_components/AntdCustomSkeleton.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdCustomSkeleton(Component): """An AntdCustomSkeleton component. 自定义骨架屏组件AntdCustomSkeleton Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - skeletonContent (a list of or a singular dash component, string or number; optional): 组件型,加载状态下显示的内容. - loading (boolean; default False): 是否处于加载中状态. - delay (number; optional): 加载动画渲染延时,单位:毫秒 默认值:`0`. - debug (boolean; default False): 是否开启debug模式,开启后,每次动画加载都会在开发者工具的控制台打印相关`prop`信息 默认值:`False`. - listenPropsMode (a value equal to: 'default', 'exclude', 'include'; default 'default'): 监听模式,可选项有`'default'`、`'exclude'`、`'include'` 默认值:`'default'`. - excludeProps (list of strings; optional): `listenPropsMode='exclude'`时,设置需要排除监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]`. - includeProps (list of strings; optional): `listenPropsMode='include'`时,设置需要包含监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]`. - manual (boolean; default False): 是否开启手动控制模式,开启后是否处于加载状态将由`loading`参数控制,与内部元素参与的回调状态无关 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['skeletonContent'] _base_nodes = ['skeletonContent', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdCustomSkeleton' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, skeletonContent: typing.Optional[ComponentType] = None, loading: typing.Optional[bool] = None, delay: typing.Optional[NumberType] = None, debug: typing.Optional[bool] = None, listenPropsMode: typing.Optional[Literal['default', 'exclude', 'include']] = None, excludeProps: typing.Optional[typing.Sequence[str]] = None, includeProps: typing.Optional[typing.Sequence[str]] = None, manual: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'skeletonContent', 'loading', 'delay', 'debug', 'listenPropsMode', 'excludeProps', 'includeProps', 'manual', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'skeletonContent', 'loading', 'delay', 'debug', 'listenPropsMode', 'excludeProps', 'includeProps', 'manual', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdCustomSkeleton, self).__init__(children=children, **args) setattr(AntdCustomSkeleton, '__init__', _explicitize_args(AntdCustomSkeleton.__init__)) ================================================ FILE: feffery_antd_components/AntdDatePicker.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdDatePicker(Component): """An AntdDatePicker component. 日期选择组件AntdDatePicker Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - popupClassName (string; optional): 展开菜单css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - format (string; optional): 日期时间显示格式,[参考资料](https://day.js.org/docs/en/display/format) 默认值:`'YYYY-MM-DD'`. - picker (a value equal to: 'date', 'week', 'month', 'quarter', 'year'; default 'date'): 日期选择粒度,可选项有`'date'`、`'week'`、`'month'`、`'quarter'`、`'year'` 默认值:`'date'`. - firstDayOfWeek (number; optional): 自定义每周起始日下标. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - showTime (dict; default False): 配置时间选择面板相关参数 默认值:`False`. `showTime` is a boolean | dict with keys: - defaultValue (string; optional): 时间选择面板初始化选中时间字符串. - format (string; optional): 与`defaultValue`对应的时间格式,[参考资料](https://day.js.org/docs/en/display/format) 默认值:`'HH:mm:ss'`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - placeholder (string; optional): 输入框占位文字内容. - placement (a value equal to: 'bottomLeft', 'bottomRight', 'topLeft', 'topRight'; default 'bottomLeft'): 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` 默认值:`'bottomLeft'`. - value (string; optional): 监听或设置已选值,与`format`格式对应. - defaultValue (string; optional): 初始化已选值,与`format`格式对应. - pickerValue (string; optional): 监听或设置面板展开对应日期,与`format`格式对应. - disabledDatesStrategy (list of dicts; optional): 配置日期禁用项策略数组,满足策略中至少一项规则的日期将会被禁止选中. `disabledDatesStrategy` is a list of dicts with keys: - mode (a value equal to: 'eq', 'ne', 'le', 'lt', 'ge', 'gt', 'in', 'not-in', 'in-enumerate-dates', 'not-in-enumerate-dates'; optional): 当前策略类型,可选项有`'eq'`(等于)、`'ne'`(不等于)、`'le'`(小于等于)、`'lt'`(小于)、`'ge'`(大于等于) 、`'gt'`(大于)、`'in'`(属于)、`'not-in'`(不属于)、`'in-enumerate-dates'`(属于日期字符串枚举数组),`'not-in-enumerate-dates'`(不属于日期字符串枚举数组). - target (a value equal to: 'day', 'month', 'quarter', 'year', 'dayOfYear', 'dayOfWeek', 'specific-date'; optional): 当前策略约束目标,可选项有`'dayOfYear'`(按年份天数)、`'dayOfWeek'`(按周天数)、`'day'`(按日) 、`'month'`(按月份)、`'quarter'`(按季度)、`'year'`(按年份)、`'specific-date'`(具体日期) ,其中在`'specific-date'`目标下,`value`值将严格按照`'YYYY-MM-DD'`格式进行解析. - value (number | string | list of numbers | list of strings; optional): 与策略类型、策略约束目标相对应的实际约束值. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - allowClear (boolean; default True): 是否允许一键清空已选值 默认值:`True`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - extraFooter (a list of or a singular dash component, string or number; optional): 组件型,底部额外区域内容. - showToday (boolean; default True): 是否显示“今天”快捷选择按钮 默认值:`True`. - presets (list of dicts; optional): 配置预设项列表. `presets` is a list of dicts with keys: - label (a list of or a singular dash component, string or number; optional): 组件型,当前预设项标题. - value (string; optional): 当前预设项对应值,与`format`格式对应. - clickedPreset (dict; optional): 配合`presets`参数,监听最近一次预设项点击事件相关信息. `clickedPreset` is a dict with keys: - value (string | number; optional): 对应预设项值. - timestamp (number; optional): 事件对应时间戳信息. - needConfirm (boolean; default False): 是否需要点击按钮确认选值,传入`False`时失去焦点即代表选择 默认值:`False`. - customCells (list of dicts; optional): 自定义对应日期的单元格样式. `customCells` is a list of dicts with keys: - year (number; optional): 当前项匹配的年份值. - month (number; optional): 当前项匹配的月份值. - date (number; optional): 当前项匹配的日期值. - style (dict; optional): 自定义css样式. - className (string; optional): 自定义css类名. - prefix (a list of or a singular dash component, string or number; optional): 组件型,前缀内嵌内容. - suffixIcon (a list of or a singular dash component, string or number; optional): 自定义选择框后缀图标内容. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['extraFooter', 'presets[].label', 'prefix', 'suffixIcon'] _base_nodes = ['extraFooter', 'prefix', 'suffixIcon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdDatePicker' ShowTime = TypedDict('ShowTime', {'defaultValue': NotRequired[str], 'format': NotRequired[str]}) DisabledDatesStrategy = TypedDict( 'DisabledDatesStrategy', { 'mode': NotRequired[ Literal[ 'eq', 'ne', 'le', 'lt', 'ge', 'gt', 'in', 'not-in', 'in-enumerate-dates', 'not-in-enumerate-dates', ] ], 'target': NotRequired[ Literal[ 'day', 'month', 'quarter', 'year', 'dayOfYear', 'dayOfWeek', 'specific-date' ] ], 'value': NotRequired[ typing.Union[NumberType, str, typing.Sequence[NumberType], typing.Sequence[str]] ], }, ) Presets = TypedDict('Presets', {'label': NotRequired[ComponentType], 'value': NotRequired[str]}) ClickedPreset = TypedDict( 'ClickedPreset', {'value': NotRequired[typing.Union[str, NumberType]], 'timestamp': NotRequired[NumberType]}, ) CustomCells = TypedDict( 'CustomCells', { 'year': NotRequired[NumberType], 'month': NotRequired[NumberType], 'date': NotRequired[NumberType], 'style': NotRequired[dict], 'className': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, popupClassName: typing.Optional[str] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, format: typing.Optional[str] = None, picker: typing.Optional[Literal['date', 'week', 'month', 'quarter', 'year']] = None, firstDayOfWeek: typing.Optional[NumberType] = None, disabled: typing.Optional[bool] = None, showTime: typing.Optional[typing.Union[bool, 'ShowTime']] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[str] = None, placement: typing.Optional[ Literal['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] ] = None, value: typing.Optional[str] = None, defaultValue: typing.Optional[str] = None, pickerValue: typing.Optional[str] = None, disabledDatesStrategy: typing.Optional[typing.Sequence['DisabledDatesStrategy']] = None, status: typing.Optional[Literal['error', 'warning']] = None, allowClear: typing.Optional[bool] = None, autoFocus: typing.Optional[bool] = None, readOnly: typing.Optional[bool] = None, extraFooter: typing.Optional[ComponentType] = None, showToday: typing.Optional[bool] = None, presets: typing.Optional[typing.Sequence['Presets']] = None, clickedPreset: typing.Optional['ClickedPreset'] = None, needConfirm: typing.Optional[bool] = None, customCells: typing.Optional[typing.Sequence['CustomCells']] = None, prefix: typing.Optional[ComponentType] = None, suffixIcon: typing.Optional[ComponentType] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'format', 'picker', 'firstDayOfWeek', 'disabled', 'showTime', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'pickerValue', 'disabledDatesStrategy', 'status', 'allowClear', 'autoFocus', 'readOnly', 'extraFooter', 'showToday', 'presets', 'clickedPreset', 'needConfirm', 'customCells', 'prefix', 'suffixIcon', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'format', 'picker', 'firstDayOfWeek', 'disabled', 'showTime', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'pickerValue', 'disabledDatesStrategy', 'status', 'allowClear', 'autoFocus', 'readOnly', 'extraFooter', 'showToday', 'presets', 'clickedPreset', 'needConfirm', 'customCells', 'prefix', 'suffixIcon', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdDatePicker, self).__init__(**args) setattr(AntdDatePicker, '__init__', _explicitize_args(AntdDatePicker.__init__)) ================================================ FILE: feffery_antd_components/AntdDateRangePicker.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdDateRangePicker(Component): """An AntdDateRangePicker component. 日期范围选择组件AntdDateRangePicker Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - popupClassName (string; optional): 展开菜单css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - format (string; optional): 日期时间显示格式,[参考资料](https://day.js.org/docs/en/display/format) 默认值:`'YYYY-MM-DD'`. - picker (a value equal to: 'date', 'week', 'month', 'quarter', 'year'; default 'date'): 日期选择粒度,可选项有`'date'`、`'week'`、`'month'`、`'quarter'`、`'year'` 默认值:`'date'`. - firstDayOfWeek (number; optional): 自定义每周起始日下标. - disabled (list of booleans; default [False, False]): 是否禁用当前组件 默认值:`False`. - showTime (dict; default False): 配置时间选择面板相关参数 默认值:`False`. `showTime` is a boolean | dict with keys: - defaultValue (list of strings; optional): 时间选择面板初始化选中时间字符串. - format (string; optional): 与`defaultValue`对应的时间格式,[参考资料](https://day.js.org/docs/en/display/format) 默认值:`'HH:mm:ss'`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - placeholder (list of strings; optional): 输入框占位文字内容. - placement (a value equal to: 'bottomLeft', 'bottomRight', 'topLeft', 'topRight'; default 'bottomLeft'): 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` 默认值:`'bottomLeft'`. - value (list of strings; optional): 监听或设置已选值,与`format`格式对应. - defaultValue (list of strings; optional): 初始化已选值,与`format`格式对应. - pickerValue (string | list of strings; optional): 监听或设置面板展开对应日期,与`format`格式对应. - disabledDatesStrategy (list of dicts; optional): 配置日期禁用项策略数组,满足策略中至少一项规则的日期将会被禁止选中. `disabledDatesStrategy` is a list of dicts with keys: - mode (a value equal to: 'eq', 'ne', 'le', 'lt', 'ge', 'gt', 'in', 'not-in', 'in-enumerate-dates', 'not-in-enumerate-dates'; optional): 当前策略类型,可选项有`'eq'`(等于)、`'ne'`(不等于)、`'le'`(小于等于)、`'lt'`(小于)、`'ge'`(大于等于) 、`'gt'`(大于)、`'in'`(属于)、`'not-in'`(不属于)、`'in-enumerate-dates'`(属于日期字符串枚举数组),`'not-in-enumerate-dates'`(不属于日期字符串枚举数组). - target (a value equal to: 'day', 'month', 'quarter', 'year', 'dayOfYear', 'dayOfWeek', 'specific-date'; optional): 当前策略约束目标,可选项有`'dayOfYear'`(按年份天数)、`'dayOfWeek'`(按周天数)、`'day'`(按日) 、`'month'`(按月份)、`'quarter'`(按季度)、`'year'`(按年份)、`'specific-date'`(具体日期) ,其中在`'specific-date'`目标下,`value`值将严格按照`'YYYY-MM-DD'`格式进行解析. - value (number | string | list of numbers | list of strings; optional): 与策略类型、策略约束目标相对应的实际约束值. - open (boolean; optional): 监听或设置当前日期范围选择面板是否展开. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - allowClear (boolean; default True): 是否允许一键清空已选值 默认值:`True`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - extraFooter (a list of or a singular dash component, string or number; optional): 组件型,底部额外区域内容. - presets (list of dicts; optional): 配置预设项列表. `presets` is a list of dicts with keys: - label (a list of or a singular dash component, string or number; optional): 组件型,当前预设项标题. - value (list of strings; optional): 当前预设项对应值,与`format`格式对应. - clickedPreset (dict; optional): 配合`presets`参数,监听最近一次预设项点击事件相关信息. `clickedPreset` is a dict with keys: - value (string | number; optional): 对应预设项值. - timestamp (number; optional): 事件对应时间戳信息. - needConfirm (boolean; default False): 是否需要点击按钮确认选值,传入`False`时失去焦点即代表选择 默认值:`False`. - customCells (list of dicts; optional): 自定义对应日期的单元格样式. `customCells` is a list of dicts with keys: - year (number; optional): 当前项匹配的年份值. - month (number; optional): 当前项匹配的月份值. - date (number; optional): 当前项匹配的日期值. - style (dict; optional): 自定义css样式. - className (string; optional): 自定义css类名. - prefix (a list of or a singular dash component, string or number; optional): 组件型,前缀内嵌内容. - suffixIcon (a list of or a singular dash component, string or number; optional): 自定义选择框后缀图标内容. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['extraFooter', 'presets[].label', 'prefix', 'suffixIcon'] _base_nodes = ['extraFooter', 'prefix', 'suffixIcon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdDateRangePicker' ShowTime = TypedDict( 'ShowTime', {'defaultValue': NotRequired[typing.Sequence[str]], 'format': NotRequired[str]} ) DisabledDatesStrategy = TypedDict( 'DisabledDatesStrategy', { 'mode': NotRequired[ Literal[ 'eq', 'ne', 'le', 'lt', 'ge', 'gt', 'in', 'not-in', 'in-enumerate-dates', 'not-in-enumerate-dates', ] ], 'target': NotRequired[ Literal[ 'day', 'month', 'quarter', 'year', 'dayOfYear', 'dayOfWeek', 'specific-date' ] ], 'value': NotRequired[ typing.Union[NumberType, str, typing.Sequence[NumberType], typing.Sequence[str]] ], }, ) Presets = TypedDict( 'Presets', {'label': NotRequired[ComponentType], 'value': NotRequired[typing.Sequence[str]]} ) ClickedPreset = TypedDict( 'ClickedPreset', {'value': NotRequired[typing.Union[str, NumberType]], 'timestamp': NotRequired[NumberType]}, ) CustomCells = TypedDict( 'CustomCells', { 'year': NotRequired[NumberType], 'month': NotRequired[NumberType], 'date': NotRequired[NumberType], 'style': NotRequired[dict], 'className': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, popupClassName: typing.Optional[str] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, format: typing.Optional[str] = None, picker: typing.Optional[Literal['date', 'week', 'month', 'quarter', 'year']] = None, firstDayOfWeek: typing.Optional[NumberType] = None, disabled: typing.Optional[typing.Sequence[bool]] = None, showTime: typing.Optional[typing.Union[bool, 'ShowTime']] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[typing.Sequence[str]] = None, placement: typing.Optional[ Literal['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] ] = None, value: typing.Optional[typing.Sequence[str]] = None, defaultValue: typing.Optional[typing.Sequence[str]] = None, pickerValue: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, disabledDatesStrategy: typing.Optional[typing.Sequence['DisabledDatesStrategy']] = None, open: typing.Optional[bool] = None, status: typing.Optional[Literal['error', 'warning']] = None, allowClear: typing.Optional[bool] = None, autoFocus: typing.Optional[bool] = None, readOnly: typing.Optional[bool] = None, extraFooter: typing.Optional[ComponentType] = None, presets: typing.Optional[typing.Sequence['Presets']] = None, clickedPreset: typing.Optional['ClickedPreset'] = None, needConfirm: typing.Optional[bool] = None, customCells: typing.Optional[typing.Sequence['CustomCells']] = None, prefix: typing.Optional[ComponentType] = None, suffixIcon: typing.Optional[ComponentType] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'format', 'picker', 'firstDayOfWeek', 'disabled', 'showTime', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'pickerValue', 'disabledDatesStrategy', 'open', 'status', 'allowClear', 'autoFocus', 'readOnly', 'extraFooter', 'presets', 'clickedPreset', 'needConfirm', 'customCells', 'prefix', 'suffixIcon', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'format', 'picker', 'firstDayOfWeek', 'disabled', 'showTime', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'pickerValue', 'disabledDatesStrategy', 'open', 'status', 'allowClear', 'autoFocus', 'readOnly', 'extraFooter', 'presets', 'clickedPreset', 'needConfirm', 'customCells', 'prefix', 'suffixIcon', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdDateRangePicker, self).__init__(**args) setattr(AntdDateRangePicker, '__init__', _explicitize_args(AntdDateRangePicker.__init__)) ================================================ FILE: feffery_antd_components/AntdDescriptionItem.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdDescriptionItem(Component): """An AntdDescriptionItem component. 描述列表子项组件AntdDescriptionItem Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - label (dict; optional): 标签元素css样式. - content (dict; optional): 内容元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - label (string; optional): 标签元素css类名. - content (string; optional): 内容元素css类名. - label (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - span (number; default 1): 所占宽度份数 默认值:`1`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['label'] _base_nodes = ['label', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdDescriptionItem' Styles = TypedDict('Styles', {'label': NotRequired[dict], 'content': NotRequired[dict]}) ClassNames = TypedDict('ClassNames', {'label': NotRequired[str], 'content': NotRequired[str]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, label: typing.Optional[ComponentType] = None, span: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'label', 'span', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'label', 'span', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdDescriptionItem, self).__init__(children=children, **args) setattr(AntdDescriptionItem, '__init__', _explicitize_args(AntdDescriptionItem.__init__)) ================================================ FILE: feffery_antd_components/AntdDescriptions.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdDescriptions(Component): """An AntdDescriptions component. 描述列表组件AntdDescriptions Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,传入内部各描述列表子项. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - root (dict; optional): 根元素css样式. - header (dict; optional): 头部元素css样式. - title (dict; optional): 标题元素css样式. - extra (dict; optional): 额外内容css样式. - label (dict; optional): 标签元素css样式. - content (dict; optional): 内容元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - root (string; optional): 根元素css类名. - header (string; optional): 头部元素css类名. - title (string; optional): 标题元素css类名. - extra (string; optional): 额外内容css类名. - label (string; optional): 标签元素css类名. - content (string; optional): 内容元素css类名. - items (list of dicts; optional): 配置描述列表子项,优先级高于`children`. `items` is a list of dicts with keys: - label (a list of or a singular dash component, string or number; optional): 组件型,子项标题内容. - span (number | a value equal to: 'filled'; optional): 子项所占宽度份数,当设置为`'filled'`时会自适应占满当前行剩余可用空间 默认值:`1`. - children (a list of or a singular dash component, string or number; optional): 组件型,子项内容. - style (dict; optional): 子项css样式. - className (string; optional): 子项css类名. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - column (dict; default 3): 每行显示的字段项数量,支持响应式 默认值:`3`. `column` is a number | dict with keys: - xxl (number; optional) - xl (number; optional) - lg (number; optional) - md (number; optional) - sm (number; optional) - xs (number; optional) - bordered (boolean; default False): 是否显示边框 默认值:`False`. - size (a value equal to: 'small', 'default', 'large'; default 'default'): 整体尺寸规格,可选项有`'small'`、`'default'`、`'large'` 默认值:`'default'`. - layout (a value equal to: 'horizontal', 'vertical'; default 'horizontal'): 布局方式,可选项有`'horizontal'`、`'vertical'` 默认值:`'horizontal'`. - extra (a list of or a singular dash component, string or number; optional): 组件型,设置操作区域,显示在右上方. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['items[].label', 'items[].children', 'title', 'extra'] _base_nodes = ['title', 'extra', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdDescriptions' Styles = TypedDict( 'Styles', { 'root': NotRequired[dict], 'header': NotRequired[dict], 'title': NotRequired[dict], 'extra': NotRequired[dict], 'label': NotRequired[dict], 'content': NotRequired[dict], }, ) ClassNames = TypedDict( 'ClassNames', { 'root': NotRequired[str], 'header': NotRequired[str], 'title': NotRequired[str], 'extra': NotRequired[str], 'label': NotRequired[str], 'content': NotRequired[str], }, ) Items = TypedDict( 'Items', { 'label': NotRequired[ComponentType], 'span': NotRequired[typing.Union[NumberType, Literal['filled']]], 'children': NotRequired[ComponentType], 'style': NotRequired[dict], 'className': NotRequired[str], }, ) Column = TypedDict( 'Column', { 'xxl': NotRequired[NumberType], 'xl': NotRequired[NumberType], 'lg': NotRequired[NumberType], 'md': NotRequired[NumberType], 'sm': NotRequired[NumberType], 'xs': NotRequired[NumberType], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, items: typing.Optional[typing.Sequence['Items']] = None, title: typing.Optional[ComponentType] = None, column: typing.Optional[typing.Union[NumberType, 'Column']] = None, bordered: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'default', 'large']] = None, layout: typing.Optional[Literal['horizontal', 'vertical']] = None, extra: typing.Optional[ComponentType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'items', 'title', 'column', 'bordered', 'size', 'layout', 'extra', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'items', 'title', 'column', 'bordered', 'size', 'layout', 'extra', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdDescriptions, self).__init__(children=children, **args) setattr(AntdDescriptions, '__init__', _explicitize_args(AntdDescriptions.__init__)) ================================================ FILE: feffery_antd_components/AntdDivider.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdDivider(Component): """An AntdDivider component. 分割线组件AntdDivider Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,分割线内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - innerTextOrientation (a value equal to: 'left', 'center', 'right'; default 'center'): 内嵌元素对齐方式,可选项有`'left'`、`'center'`、`'right'` 默认值:`'center'`. - isDashed (boolean; default False): 是否渲染为虚线形式 默认值:`False`. - direction (a value equal to: 'horizontal', 'vertical'; default 'horizontal'): 分割线方向,可选项有`'horizontal'`、`'vertical'` 默认值:`'horizontal'`. - fontSize (string | number; optional): 内嵌元素字体大小. - lineColor (string; optional): 分割线颜色. - fontStyle (string; optional): 内嵌元素字体风格. - fontWeight (string; optional): 内嵌元素字重. - fontFamily (string; optional): 内嵌元素字体. - fontColor (string; optional): 内嵌元素字体颜色. - variant (a value equal to: 'dashed', 'dotted', 'solid'; default 'solid'): 分割线变体,可选项有`'dashed'`(虚线)、`'dotted'`(点线)、`'solid'`(实线) 默认值:`'solid'`. - plain (boolean; default True): 文字内容是否呈现为常规正文形式 默认值:`True`. - size (a value equal to: 'small', 'middle', 'large'; optional): 间距大小,仅当``direction='horizontal'``时有效,可选项有`'small'`、`'middle'`、`'large'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdDivider' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, className: typing.Optional[typing.Union[str, dict]] = None, style: typing.Optional[typing.Any] = None, innerTextOrientation: typing.Optional[Literal['left', 'center', 'right']] = None, isDashed: typing.Optional[bool] = None, direction: typing.Optional[Literal['horizontal', 'vertical']] = None, fontSize: typing.Optional[typing.Union[str, NumberType]] = None, lineColor: typing.Optional[str] = None, fontStyle: typing.Optional[str] = None, fontWeight: typing.Optional[str] = None, fontFamily: typing.Optional[str] = None, fontColor: typing.Optional[str] = None, variant: typing.Optional[Literal['dashed', 'dotted', 'solid']] = None, plain: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'className', 'style', 'innerTextOrientation', 'isDashed', 'direction', 'fontSize', 'lineColor', 'fontStyle', 'fontWeight', 'fontFamily', 'fontColor', 'variant', 'plain', 'size', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'className', 'style', 'innerTextOrientation', 'isDashed', 'direction', 'fontSize', 'lineColor', 'fontStyle', 'fontWeight', 'fontFamily', 'fontColor', 'variant', 'plain', 'size', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdDivider, self).__init__(children=children, **args) setattr(AntdDivider, '__init__', _explicitize_args(AntdDivider.__init__)) ================================================ FILE: feffery_antd_components/AntdDraggerUpload.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdDraggerUpload(Component): """An AntdDraggerUpload component. 文件拖拽上传组件AntdDraggerUpload Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - draggerClassName (string | dict; optional): 拖拽区域css类名,支持[动态css](/advanced-classname). - draggerStyle (dict; optional): 拖拽区域css样式. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - apiUrl (string; optional): 文件上传服务接口地址. - apiUrlExtraParams (dict; optional): 文件上传服务接口额外参数. - headers (dict; optional): 文件上传服务接口额外headers参数. - withCredentials (boolean; default False): 是否在请求上传服务接口时自动携带cookies等凭据信息 默认值:`False`. - withOriginFileObj (boolean; default False): `listUploadTaskRecord`监听结果中是否额外记录浏览器原生`originFileObj`相关信息 默认值:`False`. - downloadUrl (string; optional): 对应已上传文件的`GET`类型下载服务接口地址,自带参数`taskId`、`filename`. - downloadUrlExtraParams (dict; optional): 配合`downloadUrl`参数,设置文件下载服务接口额外参数. - downloadUrlFromBackend (boolean; default False): 是否将文件上传接口返回信息中的`url`属性作为下载链接地址 默认值:`False`. - icon (a list of or a singular dash component, string or number; optional): 组件型,自定义上传图标. - text (a list of or a singular dash component, string or number; optional): 组件型,上传区域主要文字说明内容. - hint (a list of or a singular dash component, string or number; optional): 组件型,上传区域次要文字说明内容. - fileListMaxLength (number; optional): 限制已上传文件列表长度上限. - fileTypes (list of strings; optional): 允许上传的文件后缀名列表,默认不限制. - uploadId (string; optional): 自定义当前组件发起文件上传请求时携带的`uploadId`参数,可用于辅助后端创建文件上传所在文件夹. - fileMaxSize (number; default 500): 文件上传尺寸上限,单位:兆. - multiple (boolean; default False): 是否开启多文件上传模式 默认值:`False`. - directory (boolean; default False): 是否开启文件夹上传模式 默认值:`False`. - failedTooltipInfo (string; optional): 文件上传失败消息提示文字内容 默认值:`'上传失败'`. - showUploadList (boolean; default True): 是否显示已上传文件列表 默认值:`True`. - confirmBeforeDelete (boolean; default False): 是否为已上传文件删除操作添加二次确认模态框 默认值:`False`. - showPercent (boolean; default False): 是否显示上传进度条 默认值:`False`. - progressProps (dict; optional): 配置上传进度条相关参数. `progressProps` is a dict with keys: - strokeColor (dict; optional): 进度条颜色. `strokeColor` is a string Or dict with keys: - from (string; optional): 渐变色开始颜色. - to (string; optional): 渐变色结束颜色. - strokeWidth (number; optional): 进度条像素宽度. - format (dict; optional): 进度文字格式. `format` is a dict with keys: - prefix (string; optional): 进度文字前缀内容. - suffix (string; optional): 进度文字后缀内容 默认值:`'%'`. - showSuccessMessage (boolean; default True): 是否在每个文件上传成功后,分别弹出消息提示 默认值:`True`. - showErrorMessage (boolean; default True): 是否在每个文件上传失败后,分别弹出消息提示 默认值:`True`. - pastable (boolean; default False): 是否开启粘贴上传,即本地复制文件后,在页面任意位置粘贴即可完成上传 默认值:`False`. - lastUploadTaskRecord (dict; optional): 监听最近一次文件上传任务相关信息. `lastUploadTaskRecord` is a dict with keys: - fileName (string; optional): 文件名称. - fileSize (number; optional): 文件大小. - completeTimestamp (number; optional): 上传完成时间戳. - taskStatus (string; optional): 上传任务状态,`'success'`表示成功,`'failed'`表示失败. - taskId (string; optional): 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息. - url (string; optional): 当前文件的下载链接. - uploadResponse (boolean | number | string | dict | list; optional): 上传任务的接口响应信息. | list of dicts with keys: - fileName (string; optional): 文件名称. - fileSize (number; optional): 文件大小. - completeTimestamp (number; optional): 上传完成时间戳. - taskStatus (string; optional): 上传任务状态,`'success'`表示成功,`'failed'`表示失败. - taskId (string; optional): 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息. - url (string; optional): 当前文件的下载链接. - uploadResponse (boolean | number | string | dict | list; optional): 上传任务的接口响应信息. - listUploadTaskRecord (list of dicts; optional): 监听当前已上传文件列表中上传任务相关信息. `listUploadTaskRecord` is a list of dicts with keys: - fileName (string; optional): 文件名称. - fileSize (number; optional): 文件大小. - completeTimestamp (number; optional): 上传完成时间戳. - taskStatus (string; optional): 上传任务状态,`'success'`表示成功,`'failed'`表示失败. - taskId (string; optional): 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息. - uid (string; optional): 当前文件上传唯一识别id,前端自动生成. - url (string; optional): 当前文件下载链接. - uploadResponse (boolean | number | string | dict | list; optional): 上传任务的接口响应信息. - originFileObj (boolean | number | string | dict | list; optional): 当`withOriginFileObj=True`时,监听当前文件上传任务对应的`originFileObj`主要信息. - defaultFileList (list of dicts; optional): 初始化文件列表展示信息. `defaultFileList` is a list of dicts with keys: - name (string; optional): 当前文件名称. - status (a value equal to: 'done', 'error', 'removed'; optional): 当前文件展示状态,可选项有`'done'`、`'error'`、`'removed'`. - uid (boolean | number | string | dict | list; optional): 当前文件唯一识别id. - url (string; optional): 当前文件下载链接. - taskId (string; optional): 若传入有效值,将作为当前组件的`uploadId`参数. - fileSize (number; optional): 当前文件大小. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['icon', 'text', 'hint'] _base_nodes = ['icon', 'text', 'hint', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdDraggerUpload' ProgressPropsStrokeColor = TypedDict( 'ProgressPropsStrokeColor', {'from': NotRequired[str], 'to': NotRequired[str]} ) ProgressPropsFormat = TypedDict( 'ProgressPropsFormat', {'prefix': NotRequired[str], 'suffix': NotRequired[str]} ) ProgressProps = TypedDict( 'ProgressProps', { 'strokeColor': NotRequired[typing.Union[str, 'ProgressPropsStrokeColor']], 'strokeWidth': NotRequired[NumberType], 'format': NotRequired['ProgressPropsFormat'], }, ) LastUploadTaskRecord = TypedDict( 'LastUploadTaskRecord', { 'fileName': NotRequired[str], 'fileSize': NotRequired[NumberType], 'completeTimestamp': NotRequired[NumberType], 'taskStatus': NotRequired[str], 'taskId': NotRequired[str], 'url': NotRequired[str], 'uploadResponse': NotRequired[typing.Any], }, ) ListUploadTaskRecord = TypedDict( 'ListUploadTaskRecord', { 'fileName': NotRequired[str], 'fileSize': NotRequired[NumberType], 'completeTimestamp': NotRequired[NumberType], 'taskStatus': NotRequired[str], 'taskId': NotRequired[str], 'uid': NotRequired[str], 'url': NotRequired[str], 'uploadResponse': NotRequired[typing.Any], 'originFileObj': NotRequired[typing.Any], }, ) DefaultFileList = TypedDict( 'DefaultFileList', { 'name': NotRequired[str], 'status': NotRequired[Literal['done', 'error', 'removed']], 'uid': NotRequired[typing.Any], 'url': NotRequired[str], 'taskId': NotRequired[str], 'fileSize': NotRequired[NumberType], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, draggerClassName: typing.Optional[typing.Union[str, dict]] = None, draggerStyle: typing.Optional[dict] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, apiUrl: typing.Optional[str] = None, apiUrlExtraParams: typing.Optional[dict] = None, headers: typing.Optional[dict] = None, withCredentials: typing.Optional[bool] = None, withOriginFileObj: typing.Optional[bool] = None, downloadUrl: typing.Optional[str] = None, downloadUrlExtraParams: typing.Optional[dict] = None, downloadUrlFromBackend: typing.Optional[bool] = None, icon: typing.Optional[ComponentType] = None, text: typing.Optional[ComponentType] = None, hint: typing.Optional[ComponentType] = None, fileListMaxLength: typing.Optional[NumberType] = None, fileTypes: typing.Optional[typing.Sequence[str]] = None, uploadId: typing.Optional[str] = None, fileMaxSize: typing.Optional[NumberType] = None, multiple: typing.Optional[bool] = None, directory: typing.Optional[bool] = None, failedTooltipInfo: typing.Optional[str] = None, showUploadList: typing.Optional[bool] = None, confirmBeforeDelete: typing.Optional[bool] = None, showPercent: typing.Optional[bool] = None, progressProps: typing.Optional['ProgressProps'] = None, showSuccessMessage: typing.Optional[bool] = None, showErrorMessage: typing.Optional[bool] = None, pastable: typing.Optional[bool] = None, lastUploadTaskRecord: typing.Optional[ typing.Union['LastUploadTaskRecord', typing.Sequence['LastUploadTaskRecord']] ] = None, listUploadTaskRecord: typing.Optional[typing.Sequence['ListUploadTaskRecord']] = None, defaultFileList: typing.Optional[typing.Sequence['DefaultFileList']] = None, disabled: typing.Optional[bool] = None, status: typing.Optional[Literal['error', 'warning']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'draggerClassName', 'draggerStyle', 'locale', 'apiUrl', 'apiUrlExtraParams', 'headers', 'withCredentials', 'withOriginFileObj', 'downloadUrl', 'downloadUrlExtraParams', 'downloadUrlFromBackend', 'icon', 'text', 'hint', 'fileListMaxLength', 'fileTypes', 'uploadId', 'fileMaxSize', 'multiple', 'directory', 'failedTooltipInfo', 'showUploadList', 'confirmBeforeDelete', 'showPercent', 'progressProps', 'showSuccessMessage', 'showErrorMessage', 'pastable', 'lastUploadTaskRecord', 'listUploadTaskRecord', 'defaultFileList', 'disabled', 'status', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'draggerClassName', 'draggerStyle', 'locale', 'apiUrl', 'apiUrlExtraParams', 'headers', 'withCredentials', 'withOriginFileObj', 'downloadUrl', 'downloadUrlExtraParams', 'downloadUrlFromBackend', 'icon', 'text', 'hint', 'fileListMaxLength', 'fileTypes', 'uploadId', 'fileMaxSize', 'multiple', 'directory', 'failedTooltipInfo', 'showUploadList', 'confirmBeforeDelete', 'showPercent', 'progressProps', 'showSuccessMessage', 'showErrorMessage', 'pastable', 'lastUploadTaskRecord', 'listUploadTaskRecord', 'defaultFileList', 'disabled', 'status', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdDraggerUpload, self).__init__(**args) setattr(AntdDraggerUpload, '__init__', _explicitize_args(AntdDraggerUpload.__init__)) ================================================ FILE: feffery_antd_components/AntdDrawer.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdDrawer(Component): """An AntdDrawer component. 抽屉组件AntdDrawer Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - classNames (dict; optional): 配置各子元素的css类名. `classNames` is a dict with keys: - header (string; optional): 头部元素css类名. - body (string; optional): 内容元素css类名. - footer (string; optional): 底部元素css类名. - mask (string; optional): 遮罩层元素css类名. - content (string; optional): 抽屉容器元素css类名. - styles (dict; optional): 配置各子元素的css样式. `styles` is a dict with keys: - header (dict; optional): 头部元素css样式. - body (dict; optional): 内容元素css样式. - footer (dict; optional): 底部元素css样式. - mask (dict; optional): 遮罩层元素css样式. - content (dict; optional): 抽屉容器元素css样式. - rootStyle (dict; optional): 抽屉根节点css样式(包含遮罩层),特殊的,当设置了`containerId`或`containerSelector`时,该参数会自动设置`position`为`absolute`. - visible (boolean; default False): 监听或设置抽屉是否可见 默认值:`False`. - title (a list of or a singular dash component, string or number; optional): 组件型,抽屉标题内容. - placement (a value equal to: 'left', 'right', 'top', 'bottom'; default 'right'): 抽屉弹出位置,可选项有`'left'`、`'right'`、`'top'`、`'bottom'` 默认值:`'right'`. - closable (boolean; default True): 是否显示关闭按钮 默认值:`True`. - forceRender (boolean; default False): 是否对抽屉内的子元素进行预渲染 默认值:`False`. - destroyOnClose (boolean; default False): 是否在关闭时销毁抽屉内的子元素 默认值:`False`. - width (number | string; default 256): 抽屉像素宽度,`placement`为`'left'`、`'right'`时有效 默认值:`256`. - height (number | string; default 256): 抽屉像素高度,`placement`为`'top'`、`'bottom'`时有效 默认值:`256`. - mask (boolean; default True): 是否显示遮罩层 默认值:`True`. - maskClosable (boolean; default True): 是否允许点击遮罩区域关闭抽屉 默认值:`True`. - zIndex (number; default 1000): 抽屉整体`z-index` 默认值:`1000`. - loading (boolean; default False): 是否渲染为加载中状态 默认值:`False`. - extra (a list of or a singular dash component, string or number; optional): 组件型,额外操作区元素. - footer (a list of or a singular dash component, string or number; optional): 组件型,底部元素. - containerId (string; optional): 用于设置`position`为`relative`的局部容器id. - containerSelector (string; optional): 当目标容器定位较为复杂时,可传入获取元素对应的js代码字符串,优先级低于`containerId`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['title', 'extra', 'footer'] _base_nodes = ['title', 'extra', 'footer', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdDrawer' ClassNames = TypedDict( 'ClassNames', { 'header': NotRequired[str], 'body': NotRequired[str], 'footer': NotRequired[str], 'mask': NotRequired[str], 'content': NotRequired[str], }, ) Styles = TypedDict( 'Styles', { 'header': NotRequired[dict], 'body': NotRequired[dict], 'footer': NotRequired[dict], 'mask': NotRequired[dict], 'content': NotRequired[dict], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, classNames: typing.Optional['ClassNames'] = None, styles: typing.Optional['Styles'] = None, rootStyle: typing.Optional[dict] = None, visible: typing.Optional[bool] = None, title: typing.Optional[ComponentType] = None, placement: typing.Optional[Literal['left', 'right', 'top', 'bottom']] = None, closable: typing.Optional[bool] = None, forceRender: typing.Optional[bool] = None, destroyOnClose: typing.Optional[bool] = None, width: typing.Optional[typing.Union[NumberType, str]] = None, height: typing.Optional[typing.Union[NumberType, str]] = None, mask: typing.Optional[bool] = None, maskClosable: typing.Optional[bool] = None, zIndex: typing.Optional[NumberType] = None, loading: typing.Optional[bool] = None, extra: typing.Optional[ComponentType] = None, footer: typing.Optional[ComponentType] = None, containerId: typing.Optional[str] = None, containerSelector: typing.Optional[str] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'classNames', 'styles', 'rootStyle', 'visible', 'title', 'placement', 'closable', 'forceRender', 'destroyOnClose', 'width', 'height', 'mask', 'maskClosable', 'zIndex', 'loading', 'extra', 'footer', 'containerId', 'containerSelector', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'classNames', 'styles', 'rootStyle', 'visible', 'title', 'placement', 'closable', 'forceRender', 'destroyOnClose', 'width', 'height', 'mask', 'maskClosable', 'zIndex', 'loading', 'extra', 'footer', 'containerId', 'containerSelector', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdDrawer, self).__init__(children=children, **args) setattr(AntdDrawer, '__init__', _explicitize_args(AntdDrawer.__init__)) ================================================ FILE: feffery_antd_components/AntdDropdown.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdDropdown(Component): """An AntdDropdown component. 下拉菜单组件AntdDropdown Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,下拉菜单触发锚定元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - wrapperStyle (dict; optional): 锚定元素父容器css样式. - wrapperClassName (string | dict; optional): 锚定元素父容器css类名. - title (string; optional): 下拉菜单触发元素标题内容,children参数未设置时有效. - buttonMode (boolean; default False): 下拉菜单触发元素是否渲染为按钮形式,children参数未设置时有效 默认值:`False`. - buttonProps (dict; optional): 针对下拉菜单触发元素的按钮形式进行进一步配置. `buttonProps` is a dict with keys: - icon (a list of or a singular dash component, string or number; optional): 组件型,按钮图标元素. - size (a value equal to: 'small', 'middle', 'large'; optional): 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - type (a value equal to: 'default', 'primary', 'ghost', 'dashed', 'link', 'text'; optional): 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` 默认值:`'default'`. - danger (boolean; optional): 按钮是否呈现危险样式 默认值:`False`. - style (dict; optional): 按钮css样式. - className (string; optional): 按钮css类名. - freePosition (boolean; default False): 是否开启自由位置模式 默认值:`False`. - freePositionStyle (dict; optional): 自由位置模式开启后,控制挂载位置对应css样式. - freePositionClassName (string; optional): 自由位置模式开启后,控制挂载位置对应css类名. - clickedKey (string; optional): 监听被点击的下拉菜单选项key值. - nClicks (number; default 0): 监听下拉菜单选项累计被点击次数 默认值:`0`. - menuItems (list of dicts; optional): 下拉菜单数据结构. `menuItems` is a list of dicts with keys: - title (a list of or a singular dash component, string or number; optional): 组件型,节点标题. - extra (a list of or a singular dash component, string or number; optional): 组件型,额外内容. - href (string; optional): 节点链接地址. - target (string; optional): 节点链接跳转行为. - disabled (boolean; optional): 是否禁用节点 默认值:`False`. - icon (string; optional): 节点前缀图标名称,与`iconRenderer`方式相关联,`'AntdIcon'`方式下同AntdIcon的icon参数,`'fontawesome'`方式下代表图标的css类名. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; optional): 前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` 默认值:`'AntdIcon'`. - key (string; optional): 节点唯一key值. - isDivider (boolean; optional): 节点是否渲染为分割线. - children (list; optional): 子菜单项,用于构建级联菜单. - selectable (boolean; default False): 菜单项是否可选择 默认值:`False`. - multiple (boolean; default False): 菜单项是否可多选 默认值:`False`. - selectedKeys (list of strings; optional): 设置或监听当前已选中菜单项key值. - nonSelectableKeys (list of strings; optional): 设置不可选中项key值数组 默认值:`[]`. - arrow (boolean; default False): 下拉菜单是否渲染指示箭头 默认值:`False`. - disabled (boolean; default False): 是否禁用组件功能 默认值:`False`. - overlayClassName (string | dict; optional): 下拉菜单容器css类名,支持[动态css](/advanced-classname). - overlayStyle (dict; optional): 下拉菜单容器css样式. - placement (a value equal to: 'bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight'; optional): 下拉菜单弹出方位,可选项有`'bottomLeft'`、`'bottomCenter'`、`'bottomRight'`、`'topLeft'`、`'topCenter'`、`'topRight'`. - trigger (a value equal to: 'click', 'hover'; default 'hover'): 下拉菜单显示触发方式,可选项有`'click'`、`'hover'` 默认值:`'hover'`. - autoAdjustOverflow (boolean; default True): 下拉菜单是否在被遮挡时自动调整位置 默认值:`True`. - visible (boolean; default False): 监听或设置下拉菜单是否展开 默认值:`False`. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 下拉菜单展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入批属性监听的属性名 默认值:`[]`. - batchPropsValues (dict; optional): 批量监听与当前batchPropsNames对应的属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [ 'buttonProps.icon', 'menuItems[].title', 'menuItems[].extra', ] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdDropdown' ButtonProps = TypedDict( 'ButtonProps', { 'icon': NotRequired[ComponentType], 'size': NotRequired[Literal['small', 'middle', 'large']], 'type': NotRequired[Literal['default', 'primary', 'ghost', 'dashed', 'link', 'text']], 'danger': NotRequired[bool], 'style': NotRequired[dict], 'className': NotRequired[str], }, ) MenuItems = TypedDict( 'MenuItems', { 'title': NotRequired[ComponentType], 'extra': NotRequired[ComponentType], 'href': NotRequired[str], 'target': NotRequired[str], 'disabled': NotRequired[bool], 'icon': NotRequired[str], 'iconRenderer': NotRequired[Literal['AntdIcon', 'fontawesome']], 'key': NotRequired[str], 'isDivider': NotRequired[bool], 'children': NotRequired[typing.Sequence], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, wrapperStyle: typing.Optional[dict] = None, wrapperClassName: typing.Optional[typing.Union[str, dict]] = None, title: typing.Optional[str] = None, buttonMode: typing.Optional[bool] = None, buttonProps: typing.Optional['ButtonProps'] = None, freePosition: typing.Optional[bool] = None, freePositionStyle: typing.Optional[dict] = None, freePositionClassName: typing.Optional[str] = None, clickedKey: typing.Optional[str] = None, nClicks: typing.Optional[NumberType] = None, menuItems: typing.Optional[typing.Sequence['MenuItems']] = None, selectable: typing.Optional[bool] = None, multiple: typing.Optional[bool] = None, selectedKeys: typing.Optional[typing.Sequence[str]] = None, nonSelectableKeys: typing.Optional[typing.Sequence[str]] = None, arrow: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, overlayClassName: typing.Optional[typing.Union[str, dict]] = None, overlayStyle: typing.Optional[dict] = None, placement: typing.Optional[ Literal['bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight'] ] = None, trigger: typing.Optional[Literal['click', 'hover']] = None, autoAdjustOverflow: typing.Optional[bool] = None, visible: typing.Optional[bool] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'wrapperStyle', 'wrapperClassName', 'title', 'buttonMode', 'buttonProps', 'freePosition', 'freePositionStyle', 'freePositionClassName', 'clickedKey', 'nClicks', 'menuItems', 'selectable', 'multiple', 'selectedKeys', 'nonSelectableKeys', 'arrow', 'disabled', 'overlayClassName', 'overlayStyle', 'placement', 'trigger', 'autoAdjustOverflow', 'visible', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'wrapperStyle', 'wrapperClassName', 'title', 'buttonMode', 'buttonProps', 'freePosition', 'freePositionStyle', 'freePositionClassName', 'clickedKey', 'nClicks', 'menuItems', 'selectable', 'multiple', 'selectedKeys', 'nonSelectableKeys', 'arrow', 'disabled', 'overlayClassName', 'overlayStyle', 'placement', 'trigger', 'autoAdjustOverflow', 'visible', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdDropdown, self).__init__(children=children, **args) setattr(AntdDropdown, '__init__', _explicitize_args(AntdDropdown.__init__)) ================================================ FILE: feffery_antd_components/AntdEmpty.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdEmpty(Component): """An AntdEmpty component. 空状态组件AntdEmpty Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - root (dict; optional): 根元素css样式. - image (dict; optional): 图标元素css样式. - description (dict; optional): 描述元素css样式. - footer (dict; optional): 底部元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - root (string; optional): 根元素css类名. - image (string; optional): 图标元素css类名. - description (string; optional): 描述元素css类名. - footer (string; optional): 底部元素css类名. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - description (a list of or a singular dash component, string or number | boolean; optional): 描述信息内容. - image (string | a value equal to: 'default', 'simple'; default 'default'): 状态图片地址,也可以使用内置图片,可选项有`'default'`、`'simple'` 默认值:`'default'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['description'] _base_nodes = ['description', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdEmpty' Styles = TypedDict( 'Styles', { 'root': NotRequired[dict], 'image': NotRequired[dict], 'description': NotRequired[dict], 'footer': NotRequired[dict], }, ) ClassNames = TypedDict( 'ClassNames', { 'root': NotRequired[str], 'image': NotRequired[str], 'description': NotRequired[str], 'footer': NotRequired[str], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, description: typing.Optional[typing.Union[ComponentType, bool]] = None, image: typing.Optional[typing.Union[str, Literal['default', 'simple']]] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'styles', 'classNames', 'className', 'locale', 'description', 'image', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'styles', 'classNames', 'className', 'locale', 'description', 'image', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdEmpty, self).__init__(children=children, **args) setattr(AntdEmpty, '__init__', _explicitize_args(AntdEmpty.__init__)) ================================================ FILE: feffery_antd_components/AntdFlex.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdFlex(Component): """An AntdFlex component. 弹性布局组件AntdFlex Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - vertical (boolean; default False): 是否使用垂直主轴 默认值:`False`. - wrap (string | boolean; default 'nowrap'): 子元素换行显示行为,同css中的flex-wrap,也可直接传入布尔型设置是否自动换行 默认值:`'nowrap'`. - justify (string; default 'normal'): 子元素在主轴方向上的对齐方式,同css中的justify-content 默认值:`'normal'`. - align (string; default 'normal'): 子元素在交叉轴方向上的对齐方式,同css中的align-items 默认值:`'normal'`. - flex (string; default 'normal'): 同css中的flex 默认值:`'normal'`. - gap (string | number | a value equal to: 'small', 'middle', 'large'; optional): 子元素之间的间隙,可选项有`'small'`、`'middle'`、`'large'`,也可传入字符型css宽度,或数值型像素宽度. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdFlex' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, vertical: typing.Optional[bool] = None, wrap: typing.Optional[typing.Union[str, bool]] = None, justify: typing.Optional[str] = None, align: typing.Optional[str] = None, flex: typing.Optional[str] = None, gap: typing.Optional[ typing.Union[str, NumberType, Literal['small', 'middle', 'large']] ] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'vertical', 'wrap', 'justify', 'align', 'flex', 'gap', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'vertical', 'wrap', 'justify', 'align', 'flex', 'gap', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdFlex, self).__init__(children=children, **args) setattr(AntdFlex, '__init__', _explicitize_args(AntdFlex.__init__)) ================================================ FILE: feffery_antd_components/AntdFloatButton.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdFloatButton(Component): """An AntdFloatButton component. 悬浮按钮组件AntdFloatButton Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - icon (a list of or a singular dash component, string or number; optional): 组件型,按钮内嵌前缀图标元素. - description (a list of or a singular dash component, string or number; optional): 组件型,按钮内嵌元素,仅`shape='square'`时可用. - tooltip (dict; optional): 组件型,按钮额外气泡卡片内容. `tooltip` is a a list of or a singular dash component, string or number | dict with keys: - title (a list of or a singular dash component, string or number; optional): 气泡卡片内容. - color (string; optional): 气泡卡片背景色. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom'; optional): 气泡卡片展开方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'`. - type (a value equal to: 'default', 'primary'; default 'default'): 按钮类型,可选项有`'default'`、`'primary'` 默认值:`'default'`. - shape (a value equal to: 'circle', 'square'; default 'circle'): 按钮形状,可选项有`'circle'`、`'square'` 默认值:`'circle'`. - href (string; optional): 按钮点击跳转链接地址. - target (string; default '_blank'): 按钮点击跳转链接方式 默认值:`'_blank'`. - nClicks (number; default 0): 按钮累计点击次数,用于监听按钮点击行为 默认值:`0`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['icon', 'description', 'tooltip', 'tooltip.title'] _base_nodes = ['icon', 'description', 'tooltip', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdFloatButton' Tooltip = TypedDict( 'Tooltip', { 'title': NotRequired[ComponentType], 'color': NotRequired[str], 'placement': NotRequired[ Literal[ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ] ], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, icon: typing.Optional[ComponentType] = None, description: typing.Optional[ComponentType] = None, tooltip: typing.Optional[typing.Union[ComponentType, 'Tooltip']] = None, type: typing.Optional[Literal['default', 'primary']] = None, shape: typing.Optional[Literal['circle', 'square']] = None, href: typing.Optional[str] = None, target: typing.Optional[str] = None, nClicks: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'icon', 'description', 'tooltip', 'type', 'shape', 'href', 'target', 'nClicks', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'icon', 'description', 'tooltip', 'type', 'shape', 'href', 'target', 'nClicks', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdFloatButton, self).__init__(**args) setattr(AntdFloatButton, '__init__', _explicitize_args(AntdFloatButton.__init__)) ================================================ FILE: feffery_antd_components/AntdFloatButtonGroup.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdFloatButtonGroup(Component): """An AntdFloatButtonGroup component. 悬浮按钮组组件AntdFloatButtonGroup Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 当前悬浮按钮组内悬浮按钮. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - icon (a list of or a singular dash component, string or number; optional): 图标元素. - description (a list of or a singular dash component, string or number; optional): 描述内容. - tooltip (dict; optional): 气泡卡片内容. `tooltip` is a a list of or a singular dash component, string or number | dict with keys: - title (a list of or a singular dash component, string or number; optional): 气泡卡片内容. - color (string; optional): 气泡卡片背景色. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom'; optional): 气泡卡片展开方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'`. - type (a value equal to: 'default', 'primary'; default 'default'): 按钮类型,可选项有`'default'`、`'primary'` 默认值:`'default'`. - shape (a value equal to: 'circle', 'square'; default 'circle'): 内部各悬浮按钮形状,可选项有`'circle'`、`'square'` 默认值:`'circle'`. - trigger (a value equal to: 'click', 'hover'; optional): 菜单展开模式触发方式,可选项有`'click'`、`'hover'`. - placement (a value equal to: 'top', 'right', 'bottom', 'left'; optional): 菜单展开方向,可选项有`'top'`、`'right'`、`'bottom'`、`'left'`. - open (boolean; optional): 设置或监听当前悬浮按钮组展开状态. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['icon', 'description', 'tooltip', 'tooltip.title'] _base_nodes = ['icon', 'description', 'tooltip', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdFloatButtonGroup' Tooltip = TypedDict( 'Tooltip', { 'title': NotRequired[ComponentType], 'color': NotRequired[str], 'placement': NotRequired[ Literal[ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ] ], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, icon: typing.Optional[ComponentType] = None, description: typing.Optional[ComponentType] = None, tooltip: typing.Optional[typing.Union[ComponentType, 'Tooltip']] = None, type: typing.Optional[Literal['default', 'primary']] = None, shape: typing.Optional[Literal['circle', 'square']] = None, trigger: typing.Optional[Literal['click', 'hover']] = None, placement: typing.Optional[Literal['top', 'right', 'bottom', 'left']] = None, open: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'icon', 'description', 'tooltip', 'type', 'shape', 'trigger', 'placement', 'open', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'icon', 'description', 'tooltip', 'type', 'shape', 'trigger', 'placement', 'open', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdFloatButtonGroup, self).__init__(children=children, **args) setattr(AntdFloatButtonGroup, '__init__', _explicitize_args(AntdFloatButtonGroup.__init__)) ================================================ FILE: feffery_antd_components/AntdFooter.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdFooter(Component): """An AntdFooter component. 页尾组件AntdFooter Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdFooter' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, **kwargs, ): self._prop_names = ['id', 'key', 'children', 'style', 'className', 'data-*', 'aria-*'] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdFooter, self).__init__(children=children, **args) setattr(AntdFooter, '__init__', _explicitize_args(AntdFooter.__init__)) ================================================ FILE: feffery_antd_components/AntdForm.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdForm(Component): """An AntdForm component. 表单组件AntdForm Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌相关`AntdFormItem`组件或常用表单输入类组件. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - layout (a value equal to: 'horizontal', 'vertical', 'inline'; default 'horizontal'): 表单布局模式,可选项有`'horizontal'`、`'vertical'`、`'inline'` 默认值:`'horizontal'`. - labelCol (dict; optional): 配置表单项标签部分相关参数. `labelCol` is a dict with keys: - span (number; optional): 标签部分所占宽度份数(总份数24). - offset (number; optional): 标签部分向右偏移宽度份数. - flex (string | number; optional): 同css中的flex属性,用于更灵活的控制标签部分所占宽度. - wrapperCol (dict; optional): 配置表单项控件部分相关参数. `wrapperCol` is a dict with keys: - span (number; optional): 控件部分所占宽度份数(总份数24). - offset (number; optional): 控件部分向右偏移宽度份数. - flex (string | number; optional): 同css中的flex属性,用于更灵活的控制控件部分所占宽度. - colon (boolean; default True): 当`layput='horizontal'`时,控制是否在表单项标签部分末尾添加冒号. - labelAlign (a value equal to: 'left', 'right'; default 'right'): 表单项标签部分文本对齐方式,可选项有`'left'`、`'right'` 默认值:`'right'`. - labelWrap (boolean; default False): 针对超长表单项标签是否允许换行 默认值:`False`. - enableBatchControl (boolean; default False): 是否启用表单批量控制功能,开启后会导致部分性能的损耗 默认值:`False`. - values (dict; optional): 当`enableBatchControl=True`时,可用于监听或设置搜集内部表单输入类组件的输入值变化情况,开启后内部表单输入类组件自身的`defaultValue`、`value`参数将会失效. - validateStatuses (dict with strings as keys and values of type a value equal to: 'success', 'warning', 'error', 'validating'; optional): 当`enableBatchControl=True`时,可用于统一设置内部各`AntdFormItem`组件的`validateStatus`值,键为对应`AntdFormItem`组件的`label`值,优先级低于各`AntdFormItem`组件的`validateStatus`值. - helps (dict with strings as keys and values of type a list of or a singular dash component, string or number; optional): 当`enableBatchControl=True`时,可用于统一设置内部各`AntdFormItem`组件的`help`值,键为对应`AntdFormItem`组件的`label`值,优先级低于各`AntdFormItem`组件的`help`值. - tooltips (dict with strings as keys and values of type a list of or a singular dash component, string or number; optional): 当`enableBatchControl=True`时,可用于统一设置内部各`AntdFormItem`组件的`tooltip`值,键为对应`AntdFormItem`组件的`label`值,优先级低于各`AntdFormItem`组件的`tooltip`值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['helps{}', 'tooltips{}'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdForm' LabelCol = TypedDict( 'LabelCol', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'flex': NotRequired[typing.Union[str, NumberType]], }, ) WrapperCol = TypedDict( 'WrapperCol', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'flex': NotRequired[typing.Union[str, NumberType]], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, layout: typing.Optional[Literal['horizontal', 'vertical', 'inline']] = None, labelCol: typing.Optional['LabelCol'] = None, wrapperCol: typing.Optional['WrapperCol'] = None, colon: typing.Optional[bool] = None, labelAlign: typing.Optional[Literal['left', 'right']] = None, labelWrap: typing.Optional[bool] = None, enableBatchControl: typing.Optional[bool] = None, values: typing.Optional[dict] = None, validateStatuses: typing.Optional[ typing.Dict[ typing.Union[str, float, int], Literal['success', 'warning', 'error', 'validating'] ] ] = None, helps: typing.Optional[typing.Dict[typing.Union[str, float, int], ComponentType]] = None, tooltips: typing.Optional[typing.Dict[typing.Union[str, float, int], ComponentType]] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'layout', 'labelCol', 'wrapperCol', 'colon', 'labelAlign', 'labelWrap', 'enableBatchControl', 'values', 'validateStatuses', 'helps', 'tooltips', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'layout', 'labelCol', 'wrapperCol', 'colon', 'labelAlign', 'labelWrap', 'enableBatchControl', 'values', 'validateStatuses', 'helps', 'tooltips', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdForm, self).__init__(children=children, **args) setattr(AntdForm, '__init__', _explicitize_args(AntdForm.__init__)) ================================================ FILE: feffery_antd_components/AntdFormItem.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdFormItem(Component): """An AntdFormItem component. 表单项组件AntdFormItem Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌相关常用表单输入类组件. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - required (boolean; default False): 是否显示表示必填项的额外“*”标识 默认值:`False`. - labelCol (dict; optional): 配置表单项标签部分相关参数,优先级高于所属`AntdForm`中的`labelCol`参数. `labelCol` is a dict with keys: - span (number; optional): 标签部分所占宽度份数(总份数24). - offset (number; optional): 标签部分向右偏移宽度份数. - flex (string | number; optional): 同css中的flex属性,用于更灵活的控制标签部分所占宽度. - wrapperCol (dict; optional): 配置表单项控件部分相关参数,优先级高于所属`AntdForm`中的`labelCol`参数. `wrapperCol` is a dict with keys: - span (number; optional): 控件部分所占宽度份数(总份数24). - offset (number; optional): 控件部分向右偏移宽度份数. - flex (string | number; optional): 同css中的flex属性,用于更灵活的控制控件部分所占宽度. - colon (boolean; optional): 当`layout='horizontal'`时,控制是否在表单项标签部分末尾添加冒号,优先级高于所属`AntdForm`中的`colon`参数. - label (a list of or a singular dash component, string or number; optional): 组件型,当前表单项标签内容. - labelAlign (a value equal to: 'left', 'right'; optional): 表单项标签部分文本对齐方式,可选项有`'left'`、`'right'`,优先级高于所属`AntdForm`中的`labelAlign`参数 默认值:`'right'`. - tooltip (a list of or a singular dash component, string or number; optional): 组件型,当前表单项标签内容后的额外文字提示信息. - extra (a list of or a singular dash component, string or number; optional): 组件型,当前表单项额外提示信息. - validateStatus (a value equal to: 'success', 'warning', 'error', 'validating'; optional): 控制校验状态,可选项有`'success'`、`'warning'`、`'error'`、`'validating'`. - hasFeedback (boolean; default False): 与`validateStatus`设定的状态对应,用于控制是否显示额外的状态图标 默认值:`False`. - help (a list of or a singular dash component, string or number; optional): 组件型,与`validateStatus`状态一致的额外说明内容. - hidden (boolean; default False): 是否隐藏当前字段 默认值:`False`. - layout (a value equal to: 'horizontal', 'vertical'; optional): 表单项布局模式,可选项有`'horizontal'`、`'vertical'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['label', 'tooltip', 'extra', 'help'] _base_nodes = ['label', 'tooltip', 'extra', 'help', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdFormItem' LabelCol = TypedDict( 'LabelCol', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'flex': NotRequired[typing.Union[str, NumberType]], }, ) WrapperCol = TypedDict( 'WrapperCol', { 'span': NotRequired[NumberType], 'offset': NotRequired[NumberType], 'flex': NotRequired[typing.Union[str, NumberType]], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, required: typing.Optional[bool] = None, labelCol: typing.Optional['LabelCol'] = None, wrapperCol: typing.Optional['WrapperCol'] = None, colon: typing.Optional[bool] = None, label: typing.Optional[ComponentType] = None, labelAlign: typing.Optional[Literal['left', 'right']] = None, tooltip: typing.Optional[ComponentType] = None, extra: typing.Optional[ComponentType] = None, validateStatus: typing.Optional[ Literal['success', 'warning', 'error', 'validating'] ] = None, hasFeedback: typing.Optional[bool] = None, help: typing.Optional[ComponentType] = None, hidden: typing.Optional[bool] = None, layout: typing.Optional[Literal['horizontal', 'vertical']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'required', 'labelCol', 'wrapperCol', 'colon', 'label', 'labelAlign', 'tooltip', 'extra', 'validateStatus', 'hasFeedback', 'help', 'hidden', 'layout', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'required', 'labelCol', 'wrapperCol', 'colon', 'label', 'labelAlign', 'tooltip', 'extra', 'validateStatus', 'hasFeedback', 'help', 'hidden', 'layout', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdFormItem, self).__init__(children=children, **args) setattr(AntdFormItem, '__init__', _explicitize_args(AntdFormItem.__init__)) ================================================ FILE: feffery_antd_components/AntdFormRender.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdFormRender(Component): """An AntdFormRender component. Keyword arguments: - id (string; optional): 组件id. - className (string | dict; optional): css类名. - key (string; optional): 辅助刷新用唯一标识key值. - schema (dict; required): 必填,设置表单的schema. `schema` is a dict with keys: - type (a value equal to: 'object'; optional): 固定配置为type: 'object'. - displayType (a value equal to: 'column', 'row', 'inline'; optional): 设置表单表单项label布局方式,可选的有'column'、'row'与'inline',默认为'column'. - column (number; optional): 设置表单布局,一行应该有几列,默认为3. - labelWidth (number; optional): 设置表单项标签的宽度. - maxWidth (number; optional): 设置表单项控件的最大宽度. - labelCol (number; optional): 设置表单标签占位格数. - fieldCol (number; optional): 设置表单控件占位格数. - properties (dict; optional): 设置表单控件. `properties` is a dict with strings as keys and values of type dict with keys: - type (a value equal to: 'string', 'number', 'boolean', 'array', 'range', 'html', 'block'; optional): 设置表单字段的类型,可选的有'string'、'number'、'boolean'、'array'、'range'、'html'、'block'. - title (string; optional): 设置表单字段的标签. - labelWidth (number Or string; optional): 设置表单项标签的宽度. - maxWidth (number Or string; optional): 设置表单项控件的最大宽度. - labelCol (number | string; optional): 设置表单标签占位格数. - fieldCol (number | string; optional): 设置表单控件占位格数. - cellSpan (number | string; optional): 设置表单项跨列展示,目前需配合lableWidth来使用,否则无法与其他表单项在样式上对齐,通过配置单个表单项的labelCol、fieldCol勉强能改善. - span (number | string; optional): 设置表单项列宽度,表单布局会被切割成 24 等份,可以通过设置 span 来自定义表单项所占的宽度. - widget (a value equal to: 'input', 'inputNumber', 'select', 'multiSelect', 'radio', 'checkboxes', 'textArea', 'checkbox', 'switch', 'rate', 'slider', 'datePicker', 'dateRange', 'timePicker', 'timeRange', 'cascader', 'treeSelect', 'color', 'imageInput', 'urlInput', 'html'; optional): 设置指定渲染的控件名称. - placeholder (string | list of strings; optional): 设置输入内容提示. - description (string; optional): 设置副标题描述. - tooltip (dict; optional): 设置气泡提示,支持html格式,可传入一个antd的tooltip配置对象支持更多配置. `tooltip` is a string | dict with keys: - title (boolean | number | string | dict | list; optional): 设置显示的文字内容. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'; optional): 设置气泡框的位置,可选的有'top'、'left'、'right'、'bottom'、'topLeft' 、'topRight'、'bottomLeft'、'bottomRight'、'leftTop'、'leftBottom' 、'rightTop'、'rightBottom',默认为'top'. - color (string; optional): 设置背景颜色. - mouseEnterDelay (number; optional): 设置鼠标移入后延时多少才显示 Tooltip,单位:秒,默认为0.1. - mouseLeaveDelay (number; optional): 设置鼠标移出后延时多少才隐藏 Tooltip,单位:秒,默认为0.1. - overlayClassName (string | dict; optional): 设置卡片css类. - overlayStyle (dict; optional): 设置卡片样式. - overlayInnerStyle (dict; optional): 设置卡片内容区域的样式. - trigger (a value equal to: 'hover', 'focus', 'click' | list of a value equal to: 'hover', 'focus', 'click's; optional): 设置触发行为,可选的有'hover'、'focus'、'click',或是以上多个组成的数组,默认为'hover'. - zIndex (number; optional): 设置悬浮层zIndex. - arrow (a value equal to: 'show', 'hide', 'center'; optional): 设置修改箭头的显示状态以及修改箭头是否指向目标元素中心,默认为'show'. - fresh (boolean; optional): 用于设置是否始终保持更新内容,默认为False。默认情况下,Tooltip 在关闭时会缓存内容,设置该属性后会始终保持更新。. - open (boolean; optional): 用于监听或控制当前tooltip的显隐,默认为False. - autoAdjustOverflow (boolean; optional): 用于设置气泡被遮挡时自动调整位置,默认为True. - defaultOpen (boolean; optional): 设置默认是否显隐,默认为False. - destroyTooltipOnHide (boolean; optional): 设置关闭后是否销毁Tooltip,默认为False. - extra (string; optional): 设置更多的说明信息,支持html格式,会紧贴在元素下面一行展示. - required (boolean | string; optional): 设置是否必填,默认为False. - min (number | string; optional): 设置string类型为字符串最小长度;number类型时为最小值;array 类型时为数组最小长度. - max (number | string; optional): 设置string类型为字符串最大长度;number类型时为最大值;array 类型时为数组最大长度. - format (a value equal to: 'image', 'textarea', 'color', 'email', 'url', 'dateTime', 'date', 'time', 'upload'; optional): 在已设置的type下,如何处理这个type. - rules (list of dicts; optional): 设置表单元素的校验规则. `rules` is a list of dicts with keys: - defaultField (dict; optional): 仅在 type 为 array 类型时有效,用于指定数组元素的校验规则. - enum (boolean | number | string | dict | list; optional): 是否匹配枚举中的值(需要将 type 设置为 enum). - fields (boolean | number | string | dict | list; optional): 仅在 type 为 array 或 object 类型时有效,用于指定子元素的校验规则. - len (number; optional): string 类型时为字符串长度;number 类型时为确定数字; array 类型时为数组长度. - max (number; optional): 必须设置 type:string 类型为字符串最大长度;number 类型时为最大值;array 类型时为数组最大长度. - message (string; optional): 错误信息,不设置时会通过模板自动生成. - min (number; optional): 必须设置 type:string 类型为字符串最小长度;number 类型时为最小值;array 类型时为数组最小长度. - pattern (string; optional): 正则表达式匹配. - required (boolean; optional): 是否为必选字段. - type (a value equal to: 'string', 'number', 'boolean', 'method', 'regexp', 'integer', 'float', 'array', 'object', 'enum', 'date', 'url', 'hex', 'email', 'any'; optional): 类型,常见有 string |number |boolean |url | email等. - validateTrigger (a value equal to: 'onChange', 'onBlur', 'onFocus'; optional): 设置触发验证时机,可选值有onChange、onBlur、onFocus,默认为onChange. - validator (string; optional): 设置自定义校验,值需要是字符串格式的js函数. - warningOnly (boolean; optional): 仅警告,不阻塞表单提交. - whitespace (boolean; optional): 如果字段仅包含空格则校验不通过,只在 type: 'string' 时生效. - hidden (boolean | string; optional): 设置是否隐藏,默认为False. - disabled (boolean | string; optional): 设置是否禁用,默认为False. - readOnly (boolean | string; optional): 设置是否为可读模式,默认为False. - readOnlyWidget (string; optional): 指定只读渲染组件名称. - dependencies (list of strings; optional): 设置表单依赖元素,当依赖的元素更新时,会触发本元素的重新渲染,用于复杂的表单联动. - className (string; optional): 设置自定义控件class名称. - reserveLabel (boolean | string; optional): 当title未设置时,通过配置reserveLabel: True可以保留labelWidth占位,使得输入控件和其他控件上下对齐. - props (dict; optional): 设置额外属性,如果使用的是antd组件,对应的就是antd组件的其他属性. | dict with keys: - type (a value equal to: 'object'; optional): 固定配置为type: 'object'. - title (string; optional): 设置标题. - widget (a value equal to: 'collapse', 'card', 'lineTitle', 'subInline'; optional): 设置希望使用的嵌套组件名称,可选的有'collapse'、'card'、'lineTitle'、'subInline',默认为'card'. - properties (dict; optional): 设置表单元素集合. - column (number | string; optional): 设置表单布局,一行应该有几列,默认为3. - description (string; optional): 设置副标题描述. - tooltip (dict; optional): 设置气泡提示,支持html格式,可传入一个antd的tooltip配置对象支持更多配置. `tooltip` is a string | dict with keys: - title (boolean | number | string | dict | list; optional): 设置显示的文字内容. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'; optional): 设置气泡框的位置,可选的有'top'、'left'、'right'、'bottom'、'topLeft' 、'topRight'、'bottomLeft'、'bottomRight'、'leftTop'、'leftBottom' 、'rightTop'、'rightBottom',默认为'top'. - color (string; optional): 设置背景颜色. - mouseEnterDelay (number; optional): 设置鼠标移入后延时多少才显示 Tooltip,单位:秒,默认为0.1. - mouseLeaveDelay (number; optional): 设置鼠标移出后延时多少才隐藏 Tooltip,单位:秒,默认为0.1. - overlayClassName (string | dict; optional): 设置卡片css类. - overlayStyle (dict; optional): 设置卡片样式. - overlayInnerStyle (dict; optional): 设置卡片内容区域的样式. - trigger (a value equal to: 'hover', 'focus', 'click' | list of a value equal to: 'hover', 'focus', 'click's; optional): 设置触发行为,可选的有'hover'、'focus'、'click',或是以上多个组成的数组,默认为'hover'. - zIndex (number; optional): 设置悬浮层zIndex. - arrow (a value equal to: 'show', 'hide', 'center'; optional): 设置修改箭头的显示状态以及修改箭头是否指向目标元素中心,默认为'show'. - fresh (boolean; optional): 用于设置是否始终保持更新内容,默认为False。默认情况下,Tooltip 在关闭时会缓存内容,设置该属性后会始终保持更新。. - open (boolean; optional): 用于监听或控制当前tooltip的显隐,默认为False. - autoAdjustOverflow (boolean; optional): 用于设置气泡被遮挡时自动调整位置,默认为True. - defaultOpen (boolean; optional): 设置默认是否显隐,默认为False. - destroyTooltipOnHide (boolean; optional): 设置关闭后是否销毁Tooltip,默认为False. - props (dict; optional): 设置额外属性,透传到对应的嵌套组件中. | dict with keys: - type (a value equal to: 'array'; optional): 固定配置为type: 'array'. - title (string; optional): 设置标题. - widget (a value equal to: 'cardList', 'simpleList', 'tableList', 'drawerList', 'virtualList'; optional): 设置希望使用的列表组件名称,可选的有'cardList'、'simpleList'、'tableList'、'drawerList'、'virtualList',默认为'cardList'. - max (number | string; optional): 设置列表的最大长度. - min (number | string; optional): 设置列表的最小长度. - props (dict; optional): 设置列表控件. `props` is a dict with keys: - addBtnProps (dict; optional): 设置添加按钮属性,参考 Antd Button Props(). - delConfirmProps (dict; optional): 设置删除确认弹窗属性,参考 Antd PopConfirm Props. - actionColumnProps (dict; optional): 设置tableList | drawerList | virtualList 中操作列的属性,参考 Antd Table ColumnType。 其中 title 使用 colHeaderText 代替。. - hideAdd (boolean; optional): 设置是否隐藏添加按钮. - hideCopy (boolean; optional): 设置是否隐藏复制按钮. - hideMove (boolean; optional): 设置是否隐藏移动按钮. - hideDelete (boolean; optional): 设置是否隐藏删除按钮. - items (dict; optional): 动态项配置,可以是一个嵌套控件. - displayType (a value equal to: 'column', 'row', 'inline'; default 'column'): 设置表单布局模式,表单元素与 label 同行 or 分两行展示, inline 则整个展示自然顺排, 可选的有'column'、'row'与'inline',默认为'column'. - labelAlign (a value equal to: 'left', 'right'; default 'right'): 设置label标签的文本对齐方式,可选的有'left'和'right',默认为'right'. - lableWidth (number; optional): 设置表单标签固定宽度. - maxWidth (number; optional): 设置表单项控件的最大宽度. - labelCol (number; optional): 设置表单标签占位格数. - fieldCol (number; optional): 设置表单控件占位格数. - colon (boolean; default True): 设置是否是否显示label后面的冒号,默认为True. - globalConfig (dict; optional): 设置表单全局配置. `globalConfig` is a dict with keys: - mustacheDisabled (boolean; optional): 设置是否禁用表达式. - listOperate (dict; optional): 设置列表表单配置. `listOperate` is a dict with keys: - btnType (a value equal to: 'icon', 'text'; optional): 设置列表表单操作按钮样式. - hideMove (boolean; optional): 设置是否隐藏移动按钮. - watch (dict with strings as keys and values of type string; optional): 监听表单的数据变化,属性值需要是字符串格式的js函数. - removeHiddenData (boolean; default True): 设置提交数据的时候是否去掉已经被隐藏的元素的数据,默认为True. - readOnly (boolean; default False): 设否开启只读模式,一般用于预览展示,全文text展示,默认为False. - column (number; default 1): 设置一行展示多少列. - disabled (boolean; default False): 设置是否禁用全部表单项,默认为False. - scrollToFirstError (boolean; default False): 设置提交失败是否自动滚动到第一个错误字段,默认为False. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-CN'): 设置展示语言,目前只支持中文、英文, 可选的有'zh-CN'与'en-US',默认为'zh-CN'. - footer (dict; optional): 设置底部操作区域. `footer` is a boolean | dict with keys: - submit (dict; optional): 设置提交按钮. `submit` is a dict with keys: - text (string; optional): 设置按钮文字. - hide (boolean; optional): 设置是否显示. - btnProps (dict; optional): 设置其他按钮属性,参考 Antd Button Props(). - reset (dict; optional): 设置重置按钮. `reset` is a dict with keys: - text (string; optional): 设置按钮文字. - hide (boolean; optional): 设置是否显示. - btnProps (dict; optional): 设置其他按钮属性,参考 Antd Button Props(). | a list of or a singular dash component, string or number - configProvider (dict; optional): 同antd的configProvider. - validateMessages (dict; optional): 设置默认的校验提示信息. `validateMessages` is a dict with keys: - default (string; optional) - required (string; optional) - whitespace (string; optional) - date (dict; optional) `date` is a dict with keys: - format (string; optional) - parse (string; optional) - invalid (string; optional) - types (dict; optional) `types` is a dict with keys: - string (string; optional) - method (string; optional) - array (string; optional) - object (string; optional) - number (string; optional) - date (string; optional) - boolean (string; optional) - integer (string; optional) - float (string; optional) - regexp (string; optional) - email (string; optional) - url (string; optional) - hex (string; optional) - string (dict; optional) `string` is a dict with keys: - len (string; optional) - min (string; optional) - max (string; optional) - range (string; optional) - number (dict; optional) `number` is a dict with keys: - len (string; optional) - min (string; optional) - max (string; optional) - range (string; optional) - array (dict; optional) `array` is a dict with keys: - len (string; optional) - min (string; optional) - max (string; optional) - range (string; optional) - pattern (dict; optional) `pattern` is a dict with keys: - mismatch (string; optional) - values (dict; optional): 设置与监听表单数据. - validateStatuses (boolean; optional): 监听表单校验结果. - submitForm (boolean; optional): 控制参数,用于提交表单时手动搜集表单的校验结果,回调设置为True后会自动变为False. - submitFormClicks (number; default 0): 辅助监听表单提交参数. - resetForm (boolean; optional): 控制参数,用于重置表单项校验状态(不能重置表单项包裹的组件的值,需要通过回调重置表单项包裹的组件的值),回调设置为True后会自动变为False. - resetFormClicks (number; default 0): 辅助监听表单重置参数. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading.""" _children_props: typing.List[str] = ['footer'] _base_nodes = ['footer', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdFormRender' SchemaPropertiesTooltip = TypedDict( 'SchemaPropertiesTooltip', { 'title': NotRequired[typing.Any], 'placement': NotRequired[ Literal[ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ] ], 'color': NotRequired[str], 'mouseEnterDelay': NotRequired[NumberType], 'mouseLeaveDelay': NotRequired[NumberType], 'overlayClassName': NotRequired[typing.Union[str, dict]], 'overlayStyle': NotRequired[dict], 'overlayInnerStyle': NotRequired[dict], 'trigger': NotRequired[ typing.Union[ Literal['hover', 'focus', 'click'], typing.Sequence[Literal['hover', 'focus', 'click']], ] ], 'zIndex': NotRequired[NumberType], 'arrow': NotRequired[Literal['show', 'hide', 'center']], 'fresh': NotRequired[bool], 'open': NotRequired[bool], 'autoAdjustOverflow': NotRequired[bool], 'defaultOpen': NotRequired[bool], 'destroyTooltipOnHide': NotRequired[bool], }, ) SchemaPropertiesRules = TypedDict( 'SchemaPropertiesRules', { 'defaultField': NotRequired[dict], 'enum': NotRequired[typing.Any], 'fields': NotRequired[typing.Any], 'len': NotRequired[NumberType], 'max': NotRequired[NumberType], 'message': NotRequired[str], 'min': NotRequired[NumberType], 'pattern': NotRequired[typing.Union[str, typing.Any]], 'required': NotRequired[bool], 'type': NotRequired[ Literal[ 'string', 'number', 'boolean', 'method', 'regexp', 'integer', 'float', 'array', 'object', 'enum', 'date', 'url', 'hex', 'email', 'any', ] ], 'validateTrigger': NotRequired[Literal['onChange', 'onBlur', 'onFocus']], 'validator': NotRequired[str], 'warningOnly': NotRequired[bool], 'whitespace': NotRequired[bool], }, ) SchemaProperties = TypedDict( 'SchemaProperties', { 'type': NotRequired[Literal['array']], 'title': NotRequired[str], 'widget': NotRequired[ Literal['cardList', 'simpleList', 'tableList', 'drawerList', 'virtualList'] ], 'max': NotRequired[typing.Union[NumberType, str]], 'min': NotRequired[typing.Union[NumberType, str]], 'props': NotRequired['SchemaPropertiesProps'], 'items': NotRequired[dict], }, ) SchemaPropertiesProps = TypedDict( 'SchemaPropertiesProps', { 'addBtnProps': NotRequired[dict], 'delConfirmProps': NotRequired[dict], 'actionColumnProps': NotRequired[dict], 'hideAdd': NotRequired[bool], 'hideCopy': NotRequired[bool], 'hideMove': NotRequired[bool], 'hideDelete': NotRequired[bool], }, ) Schema = TypedDict( 'Schema', { 'type': NotRequired[Literal['object']], 'displayType': NotRequired[Literal['column', 'row', 'inline']], 'column': NotRequired[NumberType], 'labelWidth': NotRequired[NumberType], 'maxWidth': NotRequired[NumberType], 'labelCol': NotRequired[NumberType], 'fieldCol': NotRequired[NumberType], 'properties': NotRequired[ typing.Dict[typing.Union[str, float, int], typing.Union['SchemaProperties']] ], }, ) GlobalConfigListOperate = TypedDict( 'GlobalConfigListOperate', {'btnType': NotRequired[Literal['icon', 'text']], 'hideMove': NotRequired[bool]}, ) GlobalConfig = TypedDict( 'GlobalConfig', { 'mustacheDisabled': NotRequired[bool], 'listOperate': NotRequired['GlobalConfigListOperate'], }, ) FooterSubmit = TypedDict( 'FooterSubmit', {'text': NotRequired[str], 'hide': NotRequired[bool], 'btnProps': NotRequired[dict]}, ) FooterReset = TypedDict( 'FooterReset', {'text': NotRequired[str], 'hide': NotRequired[bool], 'btnProps': NotRequired[dict]}, ) Footer = TypedDict( 'Footer', {'submit': NotRequired['FooterSubmit'], 'reset': NotRequired['FooterReset']} ) ValidateMessagesDate = TypedDict( 'ValidateMessagesDate', {'format': NotRequired[str], 'parse': NotRequired[str], 'invalid': NotRequired[str]}, ) ValidateMessagesTypes = TypedDict( 'ValidateMessagesTypes', { 'string': NotRequired[str], 'method': NotRequired[str], 'array': NotRequired[str], 'object': NotRequired[str], 'number': NotRequired[str], 'date': NotRequired[str], 'boolean': NotRequired[str], 'integer': NotRequired[str], 'float': NotRequired[str], 'regexp': NotRequired[str], 'email': NotRequired[str], 'url': NotRequired[str], 'hex': NotRequired[str], }, ) ValidateMessagesString = TypedDict( 'ValidateMessagesString', { 'len': NotRequired[str], 'min': NotRequired[str], 'max': NotRequired[str], 'range': NotRequired[str], }, ) ValidateMessagesNumber = TypedDict( 'ValidateMessagesNumber', { 'len': NotRequired[str], 'min': NotRequired[str], 'max': NotRequired[str], 'range': NotRequired[str], }, ) ValidateMessagesArray = TypedDict( 'ValidateMessagesArray', { 'len': NotRequired[str], 'min': NotRequired[str], 'max': NotRequired[str], 'range': NotRequired[str], }, ) ValidateMessagesPattern = TypedDict('ValidateMessagesPattern', {'mismatch': NotRequired[str]}) ValidateMessages = TypedDict( 'ValidateMessages', { 'default': NotRequired[str], 'required': NotRequired[str], 'whitespace': NotRequired[str], 'date': NotRequired['ValidateMessagesDate'], 'types': NotRequired['ValidateMessagesTypes'], 'string': NotRequired['ValidateMessagesString'], 'number': NotRequired['ValidateMessagesNumber'], 'array': NotRequired['ValidateMessagesArray'], 'pattern': NotRequired['ValidateMessagesPattern'], }, ) LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, className: typing.Optional[typing.Union[str, dict]] = None, style: typing.Optional[typing.Any] = None, key: typing.Optional[str] = None, schema: typing.Optional['Schema'] = None, displayType: typing.Optional[Literal['column', 'row', 'inline']] = None, labelAlign: typing.Optional[Literal['left', 'right']] = None, lableWidth: typing.Optional[NumberType] = None, maxWidth: typing.Optional[NumberType] = None, labelCol: typing.Optional[NumberType] = None, fieldCol: typing.Optional[NumberType] = None, colon: typing.Optional[bool] = None, globalConfig: typing.Optional['GlobalConfig'] = None, watch: typing.Optional[typing.Dict[typing.Union[str, float, int], str]] = None, removeHiddenData: typing.Optional[bool] = None, readOnly: typing.Optional[bool] = None, column: typing.Optional[NumberType] = None, disabled: typing.Optional[bool] = None, scrollToFirstError: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, footer: typing.Optional[typing.Union[bool, 'Footer', ComponentType]] = None, configProvider: typing.Optional[dict] = None, validateMessages: typing.Optional['ValidateMessages'] = None, values: typing.Optional[dict] = None, validateStatuses: typing.Optional[bool] = None, submitForm: typing.Optional[bool] = None, submitFormClicks: typing.Optional[NumberType] = None, resetForm: typing.Optional[bool] = None, resetFormClicks: typing.Optional[NumberType] = None, loading_state: typing.Optional['LoadingState'] = None, **kwargs, ): self._prop_names = [ 'id', 'className', 'style', 'key', 'schema', 'displayType', 'labelAlign', 'lableWidth', 'maxWidth', 'labelCol', 'fieldCol', 'colon', 'globalConfig', 'watch', 'removeHiddenData', 'readOnly', 'column', 'disabled', 'scrollToFirstError', 'locale', 'footer', 'configProvider', 'validateMessages', 'values', 'validateStatuses', 'submitForm', 'submitFormClicks', 'resetForm', 'resetFormClicks', 'loading_state', ] self._valid_wildcard_attributes = [] self.available_properties = [ 'id', 'className', 'style', 'key', 'schema', 'displayType', 'labelAlign', 'lableWidth', 'maxWidth', 'labelCol', 'fieldCol', 'colon', 'globalConfig', 'watch', 'removeHiddenData', 'readOnly', 'column', 'disabled', 'scrollToFirstError', 'locale', 'footer', 'configProvider', 'validateMessages', 'values', 'validateStatuses', 'submitForm', 'submitFormClicks', 'resetForm', 'resetFormClicks', 'loading_state', ] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} for k in ['schema']: if k not in args: raise TypeError('Required argument `' + k + '` was not specified.') super(AntdFormRender, self).__init__(**args) setattr(AntdFormRender, '__init__', _explicitize_args(AntdFormRender.__init__)) ================================================ FILE: feffery_antd_components/AntdHappyProvider.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdHappyProvider(Component): """An AntdHappyProvider component. 快乐工作特效组件AntdHappyProvider Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - disabled (boolean; default False): 是否禁用当前特效 默认值:`False`.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdHappyProvider' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, disabled: typing.Optional[bool] = None, **kwargs, ): self._prop_names = ['id', 'key', 'children', 'disabled'] self._valid_wildcard_attributes = [] self.available_properties = ['id', 'key', 'children', 'disabled'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdHappyProvider, self).__init__(children=children, **args) setattr(AntdHappyProvider, '__init__', _explicitize_args(AntdHappyProvider.__init__)) ================================================ FILE: feffery_antd_components/AntdHeader.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdHeader(Component): """An AntdHeader component. 页首组件AntdHeader Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdHeader' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, **kwargs, ): self._prop_names = ['id', 'key', 'children', 'style', 'className', 'data-*', 'aria-*'] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdHeader, self).__init__(children=children, **args) setattr(AntdHeader, '__init__', _explicitize_args(AntdHeader.__init__)) ================================================ FILE: feffery_antd_components/AntdIcon.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdIcon(Component): """An AntdIcon component. 图标组件AntdIcon Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - mode (a value equal to: 'default', 'iconfont'; default 'default'): 图标调用模式,可选项有`'default'`(内置图标)、`'iconfont'`(阿里巴巴矢量图标) 默认值:`'default'`. - icon (string; optional): 当`mode='default'`时,设置内置图标名称,当`mode='iconfont'`时,设置自定义源图标名称. - scriptUrl (string | list of strings; optional): 当`mode='iconfont'`时,设置单个或多个阿里巴巴矢量图标源(在iconfont.cn上制作). - nClicks (number; default 0): 图标累计点击次数,用于监听图标点击行为 默认值:`0`. - debounceWait (number; default 0): 图标点击事件监听防抖延时,单位:毫秒 默认值:`0`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdIcon' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, mode: typing.Optional[Literal['default', 'iconfont']] = None, icon: typing.Optional[str] = None, scriptUrl: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, nClicks: typing.Optional[NumberType] = None, debounceWait: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'mode', 'icon', 'scriptUrl', 'nClicks', 'debounceWait', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'mode', 'icon', 'scriptUrl', 'nClicks', 'debounceWait', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdIcon, self).__init__(**args) setattr(AntdIcon, '__init__', _explicitize_args(AntdIcon.__init__)) ================================================ FILE: feffery_antd_components/AntdImage.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdImage(Component): """An AntdImage component. 图片组件AntdImage Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - alt (string; optional): 图片alt信息. - width (number | string; optional): 图片宽度. - height (number | string; optional): 图片高度. - src (string | list of strings; optional): 配置图片资源地址,当传入数组时为多图片模式. - fallback (string; optional): 图片加载失败占位图资源地址. - multiImageMode (a value equal to: 'fold', 'unfold'; default 'fold'): 多图片模式展示方式,可选项有`'fold'`、`'unfold'` 默认值:`'fold'`. - previewVisible (boolean; optional): 监听或控制当前图片预览层是否处于打开状态. - previewCurrent (number; optional): 监听或控制当前图片预览对应切换到的图片下标. - preview (dict; default True): 配置图片预览相关功能,传入`False`时会禁用预览功能 默认值:`True`. `preview` is a boolean | dict with keys: - src (string; optional): 自定义预览图链接地址. - movable (boolean; optional): 预览模式下是否可移动图片. - mask (a list of or a singular dash component, string or number; optional): 组件型,用于自定义缩略图遮罩元素. - maskClassName (string; optional): 缩略图遮罩元素css类名. - rootClassName (string; optional): 缩略图根节点css类名. - scaleStep (number; optional): `1+scaleStep`值为每一步缩放的倍数 默认值:`0.5`. - minScale (number; optional): 最小缩放倍数 默认值:`1`. - maxScale (number; optional): 最大缩放倍数 默认值:`50`. - toolbarExtra (a list of or a singular dash component, string or number; optional): 针对预览模式下的工具栏,末尾扩充自定义工具图标元素. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['preview.mask', 'toolbarExtra'] _base_nodes = ['toolbarExtra', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdImage' Preview = TypedDict( 'Preview', { 'src': NotRequired[str], 'movable': NotRequired[bool], 'mask': NotRequired[ComponentType], 'maskClassName': NotRequired[str], 'rootClassName': NotRequired[str], 'scaleStep': NotRequired[NumberType], 'minScale': NotRequired[NumberType], 'maxScale': NotRequired[NumberType], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, alt: typing.Optional[str] = None, width: typing.Optional[typing.Union[NumberType, str]] = None, height: typing.Optional[typing.Union[NumberType, str]] = None, src: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, fallback: typing.Optional[str] = None, multiImageMode: typing.Optional[Literal['fold', 'unfold']] = None, previewVisible: typing.Optional[bool] = None, previewCurrent: typing.Optional[NumberType] = None, preview: typing.Optional[typing.Union[bool, 'Preview']] = None, toolbarExtra: typing.Optional[ComponentType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'locale', 'alt', 'width', 'height', 'src', 'fallback', 'multiImageMode', 'previewVisible', 'previewCurrent', 'preview', 'toolbarExtra', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'locale', 'alt', 'width', 'height', 'src', 'fallback', 'multiImageMode', 'previewVisible', 'previewCurrent', 'preview', 'toolbarExtra', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdImage, self).__init__(**args) setattr(AntdImage, '__init__', _explicitize_args(AntdImage.__init__)) ================================================ FILE: feffery_antd_components/AntdImageGroup.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdImageGroup(Component): """An AntdImageGroup component. 图片组合组件AntdImageGroup Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,定义组内需要嵌套的`AntdImage`组件. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - items (list of strings; optional): 控制图片组合内部实际展示的图片资源地址数组,顺序依次展示. - fallback (string; optional): 图片加载失败占位图资源地址. - preview (dict; default True): 配置图片预览相关功能,传入`False`时会禁用预览功能 默认值:`True`. `preview` is a boolean | dict with keys: - src (string; optional): 自定义预览图链接地址. - movable (boolean; optional): 预览模式下是否可移动图片. - mask (a list of or a singular dash component, string or number; optional): 组件型,用于自定义缩略图遮罩元素. - maskClassName (string; optional): 缩略图遮罩元素css类名. - rootClassName (string; optional): 缩略图根节点css类名. - scaleStep (number; optional): `1+scaleStep`值为每一步缩放的倍数 默认值:`0.5`. - minScale (number; optional): 最小缩放倍数 默认值:`1`. - maxScale (number; optional): 最大缩放倍数 默认值:`50`. - visible (boolean; optional): 监听或设置当前图片组是否处于全屏预览状态. - current (number; optional): 监听或控制当前图片预览对应切换到的图片下标. - disableCurrent (boolean; default True): 是否关闭基于`current`的当前图片下标受控功能 默认值:`True`. - toolbarExtra (a list of or a singular dash component, string or number; optional): 针对预览模式下的工具栏,末尾扩充自定义工具图标元素. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['preview.mask', 'toolbarExtra'] _base_nodes = ['toolbarExtra', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdImageGroup' Preview = TypedDict( 'Preview', { 'src': NotRequired[str], 'movable': NotRequired[bool], 'mask': NotRequired[ComponentType], 'maskClassName': NotRequired[str], 'rootClassName': NotRequired[str], 'scaleStep': NotRequired[NumberType], 'minScale': NotRequired[NumberType], 'maxScale': NotRequired[NumberType], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, items: typing.Optional[typing.Sequence[str]] = None, fallback: typing.Optional[str] = None, preview: typing.Optional[typing.Union[bool, 'Preview']] = None, visible: typing.Optional[bool] = None, current: typing.Optional[NumberType] = None, disableCurrent: typing.Optional[bool] = None, toolbarExtra: typing.Optional[ComponentType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'locale', 'items', 'fallback', 'preview', 'visible', 'current', 'disableCurrent', 'toolbarExtra', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'locale', 'items', 'fallback', 'preview', 'visible', 'current', 'disableCurrent', 'toolbarExtra', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdImageGroup, self).__init__(children=children, **args) setattr(AntdImageGroup, '__init__', _explicitize_args(AntdImageGroup.__init__)) ================================================ FILE: feffery_antd_components/AntdInput.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdInput(Component): """An AntdInput component. 输入框组件AntdInput Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - input (dict; optional): 控制文本框元素css样式. - prefix (dict; optional): 控制前缀容器css样式. - suffix (dict; optional): 控制后缀容器css样式. - count (dict; optional): 控制文字计数元素css样式. - textarea (dict; optional): 控制文本域元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - input (string; optional): 控制文本框元素css类名. - prefix (string; optional): 控制前缀容器css类名. - suffix (string; optional): 控制后缀容器css类名. - count (string; optional): 控制文字计数元素css类名. - textarea (string; optional): 控制文本域元素css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - mode (a value equal to: 'default', 'search', 'text-area', 'password'; default 'default'): 输入框模式,可选项有`'default'`、`'search'`、`'text-area'`、`'password'` 默认值:`'default'`. - autoComplete (a value equal to: 'off', 'on'; default 'on'): 是否开启浏览器自带的自动补全功能,可选项有`'off'`、`'on'` 默认值:`'on'`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - placeholder (string; optional): 输入框占位文字内容. - value (string; optional): 监听或设置已输入值. - defaultValue (string; optional): 初始化已输入值. - passwordUseMd5 (boolean; default False): 针对`'password'`模式,是否启用md5加密功能 默认值:`False`. - md5Value (string; optional): 当`passwordUseMd5=True`时,监听已输入值md5编码结果. - debounceValue (string; optional): 监听防抖版本的已输入值. - debounceWait (number; default 0): 防抖延时时长,单位:毫秒 默认值:`0`. - addonBefore (a list of or a singular dash component, string or number; optional): 组件型,前置标签内容. - addonAfter (a list of or a singular dash component, string or number; optional): 组件型,后置标签内容. - prefix (a list of or a singular dash component, string or number; optional): 组件型,前缀内嵌内容. - suffix (a list of or a singular dash component, string or number; optional): 组件型,后缀内嵌内容. - maxLength (number; optional): 限制输入框最大可输入字符数量. - showCount (boolean; default False): 是否显示已输入字符计数 默认值:`False`. - countFormat (string; optional): 正则表达式,用于配合字符计数相关功能,自定义计数规则. - autoSize (dict; default False): 针对`'text-area'`模式,配置输入框高度自适应相关功能 默认值:`False`. `autoSize` is a boolean | dict with keys: - minRows (number; optional): 输入框最小行数. - maxRows (number; optional): 输入框最大行数. - nSubmit (number; default 0): 监听输入框聚焦状态下,键盘enter键累计点按次数 默认值:`0`. - nClicksSearch (number; default 0): 针对`'search'`模式,监听搜索按钮累计点击次数 默认值:`0`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - allowClear (boolean; default False): 是否允许一键清空已输入值 默认值:`False`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - focusing (boolean; optional): 监听输入框是否聚焦. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - emptyAsNone (boolean; default False): 当输入框已输入值为空时,是否强制更新`value`为空值,从而统一空字符串与空值混合的情况 默认值:`False`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value', 'md5Value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'`、`'md5Value'` 默认值:`['value', 'md5Value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['addonBefore', 'addonAfter', 'prefix', 'suffix'] _base_nodes = ['addonBefore', 'addonAfter', 'prefix', 'suffix', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdInput' Styles = TypedDict( 'Styles', { 'input': NotRequired[dict], 'prefix': NotRequired[dict], 'suffix': NotRequired[dict], 'count': NotRequired[dict], 'textarea': NotRequired[dict], }, ) ClassNames = TypedDict( 'ClassNames', { 'input': NotRequired[str], 'prefix': NotRequired[str], 'suffix': NotRequired[str], 'count': NotRequired[str], 'textarea': NotRequired[str], }, ) AutoSize = TypedDict( 'AutoSize', {'minRows': NotRequired[NumberType], 'maxRows': NotRequired[NumberType]} ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, mode: typing.Optional[Literal['default', 'search', 'text-area', 'password']] = None, autoComplete: typing.Optional[Literal['off', 'on']] = None, disabled: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[str] = None, value: typing.Optional[str] = None, defaultValue: typing.Optional[str] = None, passwordUseMd5: typing.Optional[bool] = None, md5Value: typing.Optional[str] = None, debounceValue: typing.Optional[str] = None, debounceWait: typing.Optional[NumberType] = None, addonBefore: typing.Optional[ComponentType] = None, addonAfter: typing.Optional[ComponentType] = None, prefix: typing.Optional[ComponentType] = None, suffix: typing.Optional[ComponentType] = None, maxLength: typing.Optional[NumberType] = None, showCount: typing.Optional[bool] = None, countFormat: typing.Optional[str] = None, autoSize: typing.Optional[typing.Union[bool, 'AutoSize']] = None, nSubmit: typing.Optional[NumberType] = None, nClicksSearch: typing.Optional[NumberType] = None, status: typing.Optional[Literal['error', 'warning']] = None, allowClear: typing.Optional[bool] = None, autoFocus: typing.Optional[bool] = None, focusing: typing.Optional[bool] = None, readOnly: typing.Optional[bool] = None, emptyAsNone: typing.Optional[bool] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value', 'md5Value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'styles', 'classNames', 'name', 'enableBatchControl', 'mode', 'autoComplete', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'value', 'defaultValue', 'passwordUseMd5', 'md5Value', 'debounceValue', 'debounceWait', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'maxLength', 'showCount', 'countFormat', 'autoSize', 'nSubmit', 'nClicksSearch', 'status', 'allowClear', 'autoFocus', 'focusing', 'readOnly', 'emptyAsNone', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'styles', 'classNames', 'name', 'enableBatchControl', 'mode', 'autoComplete', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'value', 'defaultValue', 'passwordUseMd5', 'md5Value', 'debounceValue', 'debounceWait', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'maxLength', 'showCount', 'countFormat', 'autoSize', 'nSubmit', 'nClicksSearch', 'status', 'allowClear', 'autoFocus', 'focusing', 'readOnly', 'emptyAsNone', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdInput, self).__init__(**args) setattr(AntdInput, '__init__', _explicitize_args(AntdInput.__init__)) ================================================ FILE: feffery_antd_components/AntdInputNumber.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdInputNumber(Component): """An AntdInputNumber component. 数值输入框组件AntdInputNumber Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - addonBefore (a list of or a singular dash component, string or number; optional): 组件型,前置标签内容. - addonAfter (a list of or a singular dash component, string or number; optional): 组件型,后置标签内容. - prefix (a list of or a singular dash component, string or number; optional): 组件型,前缀内嵌内容. - suffix (a list of or a singular dash component, string or number; optional): 组件型,后缀内嵌内容. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - controls (boolean; default True): 是否显示增减数值按钮 默认值:`True`. - keyboard (boolean; default True): 是否允许通过键盘上下方向键控制数值 默认值:`True`. - min (number | string; optional): 允许输入的数值下限,默认无限制. - max (number | string; optional): 允许输入的数值上限,默认无限制. - step (number | string; optional): 数值增减步长. - precision (number; optional): 数值精度. - stringMode (boolean; default False): 是否开启字符串模式,用于在接受超高精度数值输入时不丢失精度,开启后,参数`min`、`max`、`step`、`value`、`defaultValue`均需要设置为字符型 默认值:`False`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - placeholder (string; optional): 输入框占位文字内容. - value (number | string; optional): 监听或设置已输入值. - defaultValue (number | string; optional): 初始化已输入值. - debounceValue (number | string; optional): 监听防抖版本的已输入值. - debounceWait (number; default 0): 防抖延时时长,单位:毫秒 默认值:`0`. - nSubmit (number; default 0): 监听输入框聚焦状态下,键盘enter键累计点按次数 默认值:`0`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; default ['value']): 开启属性持久化功能的若干属性名,可选项有`'md5Value'` 默认值:`['md5Value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['addonBefore', 'addonAfter', 'prefix', 'suffix'] _base_nodes = ['addonBefore', 'addonAfter', 'prefix', 'suffix', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdInputNumber' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, addonBefore: typing.Optional[ComponentType] = None, addonAfter: typing.Optional[ComponentType] = None, prefix: typing.Optional[ComponentType] = None, suffix: typing.Optional[ComponentType] = None, autoFocus: typing.Optional[bool] = None, controls: typing.Optional[bool] = None, keyboard: typing.Optional[bool] = None, min: typing.Optional[typing.Union[NumberType, str]] = None, max: typing.Optional[typing.Union[NumberType, str]] = None, step: typing.Optional[typing.Union[NumberType, str]] = None, precision: typing.Optional[NumberType] = None, stringMode: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[str] = None, value: typing.Optional[typing.Union[NumberType, str]] = None, defaultValue: typing.Optional[typing.Union[NumberType, str]] = None, debounceValue: typing.Optional[typing.Union[NumberType, str]] = None, debounceWait: typing.Optional[NumberType] = None, nSubmit: typing.Optional[NumberType] = None, status: typing.Optional[Literal['error', 'warning']] = None, readOnly: typing.Optional[bool] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'autoFocus', 'controls', 'keyboard', 'min', 'max', 'step', 'precision', 'stringMode', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'value', 'defaultValue', 'debounceValue', 'debounceWait', 'nSubmit', 'status', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'autoFocus', 'controls', 'keyboard', 'min', 'max', 'step', 'precision', 'stringMode', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'value', 'defaultValue', 'debounceValue', 'debounceWait', 'nSubmit', 'status', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdInputNumber, self).__init__(**args) setattr(AntdInputNumber, '__init__', _explicitize_args(AntdInputNumber.__init__)) ================================================ FILE: feffery_antd_components/AntdLayout.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdLayout(Component): """An AntdLayout component. 布局容器组件AntdLayout Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdLayout' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, **kwargs, ): self._prop_names = ['id', 'key', 'children', 'style', 'className', 'data-*', 'aria-*'] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdLayout, self).__init__(children=children, **args) setattr(AntdLayout, '__init__', _explicitize_args(AntdLayout.__init__)) ================================================ FILE: feffery_antd_components/AntdMentions.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdMentions(Component): """An AntdMentions component. 提及组件AntdMentions Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - popupClassName (string; optional): 展开菜单css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - autoSize (dict; default False): 配置输入框高度自适应相关功能 默认值:`False`. `autoSize` is a boolean | dict with keys: - minRows (number; optional): 输入框最小行数. - maxRows (number; optional): 输入框最大行数. - prefix (string; default '@'): 触发选择菜单展开的关键字 默认值:`'@'`. - value (string; optional): 监听或设置已输入值. - defaultValue (string; optional): 初始化已输入值. - options (list of dicts; required): 必填,配置选择菜单子项. `options` is a list of dicts with keys: - label (a list of or a singular dash component, string or number; optional): 组件型,当前选项标签内容. - value (string; optional): 当前选项值. - selectedOptions (list of strings; optional): 监听输入内容中对应的已选子项值. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - placement (a value equal to: 'top', 'bottom'; default 'bottom'): 选择菜单弹出方向,可选项有`'top'`、`'bottom'` 默认值:`'bottom'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - placeholder (string; optional): 输入框占位文字内容. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - popupContainer (a value equal to: 'parent', 'body'; optional): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['options[].label'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdMentions' AutoSize = TypedDict( 'AutoSize', {'minRows': NotRequired[NumberType], 'maxRows': NotRequired[NumberType]} ) Options = TypedDict('Options', {'label': NotRequired[ComponentType], 'value': NotRequired[str]}) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, popupClassName: typing.Optional[str] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, autoSize: typing.Optional[typing.Union[bool, 'AutoSize']] = None, prefix: typing.Optional[str] = None, value: typing.Optional[str] = None, defaultValue: typing.Optional[str] = None, options: typing.Optional[typing.Sequence['Options']] = None, selectedOptions: typing.Optional[typing.Sequence[str]] = None, disabled: typing.Optional[bool] = None, placement: typing.Optional[Literal['top', 'bottom']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[str] = None, status: typing.Optional[Literal['error', 'warning']] = None, autoFocus: typing.Optional[bool] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'autoSize', 'prefix', 'value', 'defaultValue', 'options', 'selectedOptions', 'disabled', 'placement', 'bordered', 'variant', 'placeholder', 'status', 'autoFocus', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'autoSize', 'prefix', 'value', 'defaultValue', 'options', 'selectedOptions', 'disabled', 'placement', 'bordered', 'variant', 'placeholder', 'status', 'autoFocus', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} for k in ['options']: if k not in args: raise TypeError('Required argument `' + k + '` was not specified.') super(AntdMentions, self).__init__(**args) setattr(AntdMentions, '__init__', _explicitize_args(AntdMentions.__init__)) ================================================ FILE: feffery_antd_components/AntdMenu.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdMenu(Component): """An AntdMenu component. 导航菜单组件AntdMenu Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - expandIcon (dict; optional): 自定义展开图标,建议仅在`mode='inline'`时使用字典类型. `expandIcon` is a a list of or a singular dash component, string or number | dict with keys: - expand (a list of or a singular dash component, string or number; optional): 展开图标. - collapse (a list of or a singular dash component, string or number; optional): 收起图标. - menuItems (list; optional): 导航菜单数据结构. - menuItemKeyToTitle (dict with strings as keys and values of type a list of or a singular dash component, string or number; optional): 为指定节点定义组件型菜单项标题,优先级高于menuItems中对应节点的title属性. - menuItemKeyToIcon (dict with strings as keys and values of type a list of or a singular dash component, string or number; optional): 为指定节点定义组件型菜单项图标元素,优先级高于menuItems中对应节点的icon属性. - mode (a value equal to: 'vertical', 'horizontal', 'inline'; default 'vertical'): 显示模式,可选项有`'vertical'`、`'horizontal'`、`'inline'` 默认值:`'vertical'`. - theme (a value equal to: 'light', 'dark'; default 'light'): 主题,可选项有`'light'`、`'dark'` 默认值:`'light'`. - currentKey (string; optional): 监听或设置当前已选中菜单项key值. - currentItem (dict; optional): 监听当前已选中菜单项信息. - currentKeyPath (list; optional): 监听当前已选中菜单项key值路径信息. - currentItemPath (list; optional): 监听当前已选中菜单项路径信息. - openKeys (list of strings; optional): 监听或设置当前已展开子菜单项key值. - onlyExpandCurrentSubMenu (boolean; default False): 是否只展开当前选中项的父级菜单 默认值:`False`. - defaultOpenKeys (list of strings; optional): 默认展开的菜单项key值. - defaultSelectedKey (string; optional) - renderCollapsedButton (boolean; default False): 是否渲染菜单折叠状态控制按钮 默认值:`False`. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 菜单展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - inlineCollapsed (boolean; optional): 当前菜单是否折叠,仅inline模式下有效 默认值:`False`. - inlineIndent (number; default 24): inline模式下,子菜单相对上一级的像素缩进宽度 默认值:`24`. - triggerSubMenuAction (a value equal to: 'hover', 'click'; default 'hover'): `SubMenu`展开/关闭的触发行为,可选项有`'hover'`、`'click'`,`mode='inline'`下无效 默认值:`'hover'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否为当前组件开启持久化功能. - persisted_props (list of a value equal to: 'currentKey', 'openKeys's; optional): 当前组件启用持久化的属性值数组,可选项有`'currentKey'`、`'openKeys'` 默认值:`['currentKey', 'openKeys']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 当前组件的属性持久化存储类型 默认值:`'local'`.""" _children_props: typing.List[str] = [ 'expandIcon', 'expandIcon.expand', 'expandIcon.collapse', 'menuItemKeyToTitle{}', 'menuItemKeyToIcon{}', ] _base_nodes = ['expandIcon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdMenu' ExpandIcon = TypedDict( 'ExpandIcon', {'expand': NotRequired[ComponentType], 'collapse': NotRequired[ComponentType]} ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, expandIcon: typing.Optional[typing.Union[ComponentType, 'ExpandIcon']] = None, menuItems: typing.Optional[typing.Sequence] = None, menuItemKeyToTitle: typing.Optional[ typing.Dict[typing.Union[str, float, int], ComponentType] ] = None, menuItemKeyToIcon: typing.Optional[ typing.Dict[typing.Union[str, float, int], ComponentType] ] = None, mode: typing.Optional[Literal['vertical', 'horizontal', 'inline']] = None, theme: typing.Optional[Literal['light', 'dark']] = None, currentKey: typing.Optional[str] = None, currentItem: typing.Optional[dict] = None, currentKeyPath: typing.Optional[typing.Sequence] = None, currentItemPath: typing.Optional[typing.Sequence] = None, openKeys: typing.Optional[typing.Sequence[str]] = None, onlyExpandCurrentSubMenu: typing.Optional[bool] = None, defaultOpenKeys: typing.Optional[typing.Sequence[str]] = None, defaultSelectedKey: typing.Optional[str] = None, renderCollapsedButton: typing.Optional[bool] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, inlineCollapsed: typing.Optional[bool] = None, inlineIndent: typing.Optional[NumberType] = None, triggerSubMenuAction: typing.Optional[Literal['hover', 'click']] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['currentKey', 'openKeys']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'expandIcon', 'menuItems', 'menuItemKeyToTitle', 'menuItemKeyToIcon', 'mode', 'theme', 'currentKey', 'currentItem', 'currentKeyPath', 'currentItemPath', 'openKeys', 'onlyExpandCurrentSubMenu', 'defaultOpenKeys', 'defaultSelectedKey', 'renderCollapsedButton', 'popupContainer', 'inlineCollapsed', 'inlineIndent', 'triggerSubMenuAction', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'expandIcon', 'menuItems', 'menuItemKeyToTitle', 'menuItemKeyToIcon', 'mode', 'theme', 'currentKey', 'currentItem', 'currentKeyPath', 'currentItemPath', 'openKeys', 'onlyExpandCurrentSubMenu', 'defaultOpenKeys', 'defaultSelectedKey', 'renderCollapsedButton', 'popupContainer', 'inlineCollapsed', 'inlineIndent', 'triggerSubMenuAction', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdMenu, self).__init__(**args) setattr(AntdMenu, '__init__', _explicitize_args(AntdMenu.__init__)) ================================================ FILE: feffery_antd_components/AntdMessage.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdMessage(Component): """An AntdMessage component. 全局提示组件AntdMessage Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string; optional): 当前组件css类名. - content (string; optional): 提示信息内容. - type (a value equal to: 'default', 'success', 'error', 'info', 'warning'; default 'default'): 提示信息类型,可选项有`'default'`、`'success'`、`'error'`、`'info'`、`'warning'` 默认值:'default'. - duration (number; default 3): 提示信息自动消失对应的延时,单位:秒,设置为`0`时不会自动消失 默认值:`3`. - top (number; default 8): 提示信息距离顶端的像素距离 默认值:`8`. - maxCount (number; optional): 最多允许同时出现的提示信息数量. - icon (string; optional): 自定义前缀图标,同`AntdIcon`的`icon`参数. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; default 'AntdIcon'): 自定义前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'`.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdMessage' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[str] = None, content: typing.Optional[str] = None, type: typing.Optional[Literal['default', 'success', 'error', 'info', 'warning']] = None, duration: typing.Optional[NumberType] = None, top: typing.Optional[NumberType] = None, maxCount: typing.Optional[NumberType] = None, icon: typing.Optional[str] = None, iconRenderer: typing.Optional[Literal['AntdIcon', 'fontawesome']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'content', 'type', 'duration', 'top', 'maxCount', 'icon', 'iconRenderer', ] self._valid_wildcard_attributes = [] self.available_properties = [ 'id', 'key', 'style', 'className', 'content', 'type', 'duration', 'top', 'maxCount', 'icon', 'iconRenderer', ] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdMessage, self).__init__(**args) setattr(AntdMessage, '__init__', _explicitize_args(AntdMessage.__init__)) ================================================ FILE: feffery_antd_components/AntdModal.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdModal(Component): """An AntdModal component. 对话框组件AntdModal Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - mask (dict; optional): 遮罩层元素css样式. - content (dict; optional): 容器元素css样式. - wrapper (dict; optional): 包裹层元素css样式. - header (dict; optional): 头部元素css样式. - body (dict; optional): 内容元素css样式. - footer (dict; optional): 底部元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - mask (string; optional): 遮罩层元素css类名. - content (string; optional): 容器元素css类名. - wrapper (string; optional): 包裹层元素css类名. - header (string; optional): 头部元素css类名. - body (string; optional): 内容元素css类名. - footer (string; optional): 底部元素css类名. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - visible (boolean; default False): 监听或设置对话框是否可见 默认值:`False`. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - loadingTitle (a list of or a singular dash component, string or number; optional): 组件型,loading状态下的标题内容. - renderFooter (boolean; default False): 是否渲染底部操作按钮 默认值:`False`. - okText (a list of or a singular dash component, string or number; optional): 组件型,确认按钮内容. - okButtonProps (dict; optional): 配置确认按钮相关参数. `okButtonProps` is a dict with keys: - size (a value equal to: 'small', 'middle', 'large'; optional): 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - type (a value equal to: 'primary', 'ghost', 'dashed', 'link', 'text', 'default'; optional): 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` 默认值:`'default'`. - danger (boolean; optional): 按钮是否呈现危险样式 默认值:`False`. - disabled (boolean; optional): 按钮是否呈现禁用状态 默认值:`False`. - shape (a value equal to: 'circle', 'round'; optional): 按钮形状,可选项有`'default'`、`'circle'`、`'round'` 默认值:`'default'`. - style (dict; optional): 按钮css样式. - className (string; optional): 按钮css类名. - cancelText (a list of or a singular dash component, string or number; optional): 组件型,取消按钮内容. - cancelButtonProps (dict; optional): 配置取消按钮相关参数. `cancelButtonProps` is a dict with keys: - size (a value equal to: 'small', 'middle', 'large'; optional): 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - type (a value equal to: 'primary', 'ghost', 'dashed', 'link', 'text', 'default'; optional): 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` 默认值:`'default'`. - danger (boolean; optional): 按钮是否呈现危险样式 默认值:`False`. - disabled (boolean; optional): 按钮是否呈现禁用状态 默认值:`False`. - shape (a value equal to: 'circle', 'round'; optional): 按钮形状,可选项有`'default'`、`'circle'`、`'round'` 默认值:`'default'`. - style (dict; optional): 按钮css样式. - className (string; optional): 按钮css类名. - width (dict; default 520): 对话框像素宽度 默认值:`520`. `width` is a number | string | dict with keys: - xs (number | string; optional): 对应页面宽度<576px的响应式断点. - sm (number | string; optional): 对应页面宽度≥576px的响应式断点. - md (number | string; optional): 对应页面宽度≥768px的响应式断点. - lg (number | string; optional): 对应页面宽度≥992px的响应式断点. - xl (number | string; optional): 对应页面宽度≥1200px的响应式断点. - xxl (number | string; optional): 对应页面宽度≥1600px的响应式断点. - centered (boolean; default False): 是否垂直居中显示对话框 默认值:`False`. - keyboard (boolean; default True): 是否支持键盘esc关闭对话框 默认值:`True`. - closable (boolean; default True): 是否显示右上角的关闭按钮 默认值:`True`. - mask (boolean; default True): 是否显示背景遮罩 默认值:`True`. - maskClosable (boolean; default True): 是否允许点击遮罩层关闭对话框 默认值:`True`. - okClickClose (boolean; default True): 是否点击确认按钮触发对话框关闭 默认值:`True`. - preventClose (boolean; default False): 是否阻止通过点击关闭图标、点击遮罩层区域、点击取消、按下ESC等方式自动触发的对话框关闭行为 默认值:`False`. - zIndex (number; default 1000): 模态框z-index 默认值:`1000`. - okCounts (number; default 0): 监听确认按钮累计点击次数 默认值:`0`. - cancelCounts (number; default 0): 监听取消按钮累计点击次数 默认值:`0`. - closeCounts (number; default 0): 监听关闭按钮累计点击次数 默认值:`0`. - confirmAutoSpin (boolean; default False): 是否在每次确认按钮点击之后,自动更新`confirmLoading=True` 默认值:`False`. - loadingOkText (a list of or a singular dash component, string or number; optional): 组件型,`confirmLoading=True`时,确认按钮的内容. - confirmLoading (boolean; default False): 底部确认按钮是否处于加载中状态 默认值:`False`. - transitionType (a value equal to: 'none', 'fade', 'zoom', 'zoom-big', 'zoom-big-fast', 'slide-up', 'slide-down', 'slide-left', 'slide-right', 'move-up', 'move-down', 'move-left', 'move-right'; default 'zoom'): 模态框显隐动画类型,可选项有`'none'`、`'fade'`、`'zoom'`、`'zoom-big'`、`'zoom-big-fast'`、`'slide-up'`、`'slide-down'`、`'slide-left'`、`'slide-right'`、`'move-up'`、`'move-down'`、`'move-left'`、`'move-right'` 默认值:`'zoom'`. - forceRender (boolean; default False): 是否在初始化模态框未显示时,强制渲染模态框内部元素 默认值:`False`. - destroyOnClose (boolean; default True): 是否在模态框关闭后自动销毁内部元素 默认值:`True`. - loading (boolean; default False): 是否整体渲染为加载中状态 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [ 'title', 'loadingTitle', 'okText', 'cancelText', 'loadingOkText', ] _base_nodes = ['title', 'loadingTitle', 'okText', 'cancelText', 'loadingOkText', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdModal' Styles = TypedDict( 'Styles', { 'mask': NotRequired[dict], 'content': NotRequired[dict], 'wrapper': NotRequired[dict], 'header': NotRequired[dict], 'body': NotRequired[dict], 'footer': NotRequired[dict], }, ) ClassNames = TypedDict( 'ClassNames', { 'mask': NotRequired[str], 'content': NotRequired[str], 'wrapper': NotRequired[str], 'header': NotRequired[str], 'body': NotRequired[str], 'footer': NotRequired[str], }, ) OkButtonProps = TypedDict( 'OkButtonProps', { 'size': NotRequired[Literal['small', 'middle', 'large']], 'type': NotRequired[Literal['primary', 'ghost', 'dashed', 'link', 'text', 'default']], 'danger': NotRequired[bool], 'disabled': NotRequired[bool], 'shape': NotRequired[Literal['circle', 'round']], 'style': NotRequired[dict], 'className': NotRequired[str], }, ) CancelButtonProps = TypedDict( 'CancelButtonProps', { 'size': NotRequired[Literal['small', 'middle', 'large']], 'type': NotRequired[Literal['primary', 'ghost', 'dashed', 'link', 'text', 'default']], 'danger': NotRequired[bool], 'disabled': NotRequired[bool], 'shape': NotRequired[Literal['circle', 'round']], 'style': NotRequired[dict], 'className': NotRequired[str], }, ) Width = TypedDict( 'Width', { 'xs': NotRequired[typing.Union[NumberType, str]], 'sm': NotRequired[typing.Union[NumberType, str]], 'md': NotRequired[typing.Union[NumberType, str]], 'lg': NotRequired[typing.Union[NumberType, str]], 'xl': NotRequired[typing.Union[NumberType, str]], 'xxl': NotRequired[typing.Union[NumberType, str]], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, visible: typing.Optional[bool] = None, title: typing.Optional[ComponentType] = None, loadingTitle: typing.Optional[ComponentType] = None, renderFooter: typing.Optional[bool] = None, okText: typing.Optional[ComponentType] = None, okButtonProps: typing.Optional['OkButtonProps'] = None, cancelText: typing.Optional[ComponentType] = None, cancelButtonProps: typing.Optional['CancelButtonProps'] = None, width: typing.Optional[typing.Union[NumberType, str, 'Width']] = None, centered: typing.Optional[bool] = None, keyboard: typing.Optional[bool] = None, closable: typing.Optional[bool] = None, mask: typing.Optional[bool] = None, maskClosable: typing.Optional[bool] = None, okClickClose: typing.Optional[bool] = None, preventClose: typing.Optional[bool] = None, zIndex: typing.Optional[NumberType] = None, okCounts: typing.Optional[NumberType] = None, cancelCounts: typing.Optional[NumberType] = None, closeCounts: typing.Optional[NumberType] = None, confirmAutoSpin: typing.Optional[bool] = None, loadingOkText: typing.Optional[ComponentType] = None, confirmLoading: typing.Optional[bool] = None, transitionType: typing.Optional[ Literal[ 'none', 'fade', 'zoom', 'zoom-big', 'zoom-big-fast', 'slide-up', 'slide-down', 'slide-left', 'slide-right', 'move-up', 'move-down', 'move-left', 'move-right', ] ] = None, forceRender: typing.Optional[bool] = None, destroyOnClose: typing.Optional[bool] = None, loading: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'locale', 'visible', 'title', 'loadingTitle', 'renderFooter', 'okText', 'okButtonProps', 'cancelText', 'cancelButtonProps', 'width', 'centered', 'keyboard', 'closable', 'mask', 'maskClosable', 'okClickClose', 'preventClose', 'zIndex', 'okCounts', 'cancelCounts', 'closeCounts', 'confirmAutoSpin', 'loadingOkText', 'confirmLoading', 'transitionType', 'forceRender', 'destroyOnClose', 'loading', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'locale', 'visible', 'title', 'loadingTitle', 'renderFooter', 'okText', 'okButtonProps', 'cancelText', 'cancelButtonProps', 'width', 'centered', 'keyboard', 'closable', 'mask', 'maskClosable', 'okClickClose', 'preventClose', 'zIndex', 'okCounts', 'cancelCounts', 'closeCounts', 'confirmAutoSpin', 'loadingOkText', 'confirmLoading', 'transitionType', 'forceRender', 'destroyOnClose', 'loading', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdModal, self).__init__(children=children, **args) setattr(AntdModal, '__init__', _explicitize_args(AntdModal.__init__)) ================================================ FILE: feffery_antd_components/AntdNotification.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdNotification(Component): """An AntdNotification component. 通知提醒框组件AntdNotification Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - message (a list of or a singular dash component, string or number; optional): 通知提醒主要信息. - description (a list of or a singular dash component, string or number; optional): 通知提醒描述信息. - type (a value equal to: 'default', 'success', 'error', 'info', 'warning'; default 'default'): 通知提醒类型,可选项有`'default'`、`'success'`、`'error'`、`'info'`、`'warning'` 默认值:`'default'`. - placement (a value equal to: 'top', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'; default 'topRight'): 通知提醒框在屏幕中的弹出位置,可选项有`'top'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'` 默认值:`'topRight'`. - top (number; default 24): 当通知从顶部弹出时,设置距离顶部的像素距离 默认值:`24`. - bottom (number; default 24): 当通知从底部弹出时,设置距离底部的像素距离 默认值:`24`. - duration (number; default 4.5): 通知从显示到自动消失的时长,单位:秒,当传入`None`时会一直显示 默认值:`4.5`. - showProgress (boolean; default False): 是否显示自动关闭进度条 默认值:`False`. - pauseOnHover (boolean; default True): `showProgress=True`时,是否在鼠标移入时暂停进度条倒计时 默认值:`True`. - closable (boolean; default True): 是否显示关闭按钮 默认值:`True`. - closeButton (dict; optional): 配置右下方关闭按钮相关参数,默认不显示关闭按钮. `closeButton` is a dict with keys: - content (string; optional): 按钮内容. - style (dict; optional): 按钮css样式. - className (string; optional): 按钮css类名. - type (a value equal to: 'default', 'primary', 'ghost', 'dashed', 'link', 'text'; optional): 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` 默认值:`'default'`. - danger (boolean; optional): 按钮是否呈现危险状态 默认值:`False`. - stack (dict; default False): 是否开启多通知自动折叠堆叠功能 默认值:`False`. `stack` is a boolean | dict with keys: - threshold (number; optional)""" _children_props: typing.List[str] = ['message', 'description'] _base_nodes = ['message', 'description', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdNotification' CloseButton = TypedDict( 'CloseButton', { 'content': NotRequired[str], 'style': NotRequired[dict], 'className': NotRequired[str], 'type': NotRequired[Literal['default', 'primary', 'ghost', 'dashed', 'link', 'text']], 'danger': NotRequired[bool], }, ) Stack = TypedDict('Stack', {'threshold': NotRequired[NumberType]}) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, message: typing.Optional[ComponentType] = None, description: typing.Optional[ComponentType] = None, type: typing.Optional[Literal['default', 'success', 'error', 'info', 'warning']] = None, placement: typing.Optional[ Literal['top', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'] ] = None, top: typing.Optional[NumberType] = None, bottom: typing.Optional[NumberType] = None, duration: typing.Optional[NumberType] = None, showProgress: typing.Optional[bool] = None, pauseOnHover: typing.Optional[bool] = None, closable: typing.Optional[bool] = None, closeButton: typing.Optional['CloseButton'] = None, stack: typing.Optional[typing.Union[bool, 'Stack']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'message', 'description', 'type', 'placement', 'top', 'bottom', 'duration', 'showProgress', 'pauseOnHover', 'closable', 'closeButton', 'stack', ] self._valid_wildcard_attributes = [] self.available_properties = [ 'id', 'key', 'style', 'className', 'message', 'description', 'type', 'placement', 'top', 'bottom', 'duration', 'showProgress', 'pauseOnHover', 'closable', 'closeButton', 'stack', ] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdNotification, self).__init__(**args) setattr(AntdNotification, '__init__', _explicitize_args(AntdNotification.__init__)) ================================================ FILE: feffery_antd_components/AntdOTP.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdOTP(Component): """An AntdOTP component. 一次性密码框组件AntdOTP Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - value (string; optional): 监听或设置已选值. - defaultValue (string; optional): 初始化已选值. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - length (number; default 6): 单体输入框数量 默认值:`6`. - mask (boolean | string; default False): 自定义遮罩字符 默认值:`False`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; default 'outlined'): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdOTP' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, value: typing.Optional[str] = None, defaultValue: typing.Optional[str] = None, disabled: typing.Optional[bool] = None, length: typing.Optional[NumberType] = None, mask: typing.Optional[typing.Union[bool, str]] = None, status: typing.Optional[Literal['error', 'warning']] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'value', 'defaultValue', 'disabled', 'length', 'mask', 'status', 'size', 'variant', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'value', 'defaultValue', 'disabled', 'length', 'mask', 'status', 'size', 'variant', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdOTP, self).__init__(**args) setattr(AntdOTP, '__init__', _explicitize_args(AntdOTP.__init__)) ================================================ FILE: feffery_antd_components/AntdPageHeader.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdPageHeader(Component): """An AntdPageHeader component. 页头组件AntdPageHeader Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - title (a list of or a singular dash component, string or number; optional): 组件型,页头标题内容. - subTitle (a list of or a singular dash component, string or number; optional): 组件型,页头副标题内容. - showBackIcon (boolean; default True): 是否渲染返回按钮 默认值:`True`. - historyBackDisabled (boolean; default False): 是否禁用点击返回按钮回退上一地址的功能 默认值:`False`. - backClicks (number; default 0): 返回按钮累计点击次数,用于监听返回按钮点击行为 默认值:`0`. - ghost (boolean; default False): 是否开启透明背景模式 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['title', 'subTitle'] _base_nodes = ['title', 'subTitle', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdPageHeader' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, title: typing.Optional[ComponentType] = None, subTitle: typing.Optional[ComponentType] = None, showBackIcon: typing.Optional[bool] = None, historyBackDisabled: typing.Optional[bool] = None, backClicks: typing.Optional[NumberType] = None, ghost: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'title', 'subTitle', 'showBackIcon', 'historyBackDisabled', 'backClicks', 'ghost', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'title', 'subTitle', 'showBackIcon', 'historyBackDisabled', 'backClicks', 'ghost', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdPageHeader, self).__init__(children=children, **args) setattr(AntdPageHeader, '__init__', _explicitize_args(AntdPageHeader.__init__)) ================================================ FILE: feffery_antd_components/AntdPagination.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdPagination(Component): """An AntdPagination component. 分页组件AntdPagination Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - align (a value equal to: 'start', 'center', 'end'; default 'start'): 组件尺寸规格,可选项有`'start'`、`'center'`、`'end'` 默认值:`'start'`. - defaultCurrent (number; default 1): 初始化时的当前页码 默认值:`1`. - defaultPageSize (number; default 10): 初始化时的每页条数 默认值:`10`. - current (number; optional): 监听或设置当前页码. - disabled (boolean; default False): 是否禁用当前组件功能 默认值:`False`. - hideOnSinglePage (boolean; default False): 仅有一页时是否隐藏分页器 默认值:`False`. - pageSize (number; optional): 监听或设置每页条数. - pageSizeOptions (list of numbers; optional): 每页条数切换可选项. - showSizeChanger (boolean; default False): 是否渲染每页条数切换器 默认值:`False`. - showQuickJumper (boolean; default False): 是否渲染快捷跳页控件 默认值:`False`. - showTotalPrefix (string; optional): 总记录数描述前缀内容. - showTotalSuffix (string; optional): 总记录数描述后缀内容. - simple (boolean; default False): 是否启用简洁模式 默认值:`False`. - size (a value equal to: 'default', 'small'; default 'default'): 组件尺寸规格,可选项有`'default'`、`'small'` 默认值:`'default'`. - total (number; optional): 总记录数. - showTotal (boolean; default True): 是否渲染总记录数描述内容 默认值:`True`. - showLessItems (boolean; default False): 是否显示较少的跳页按钮 默认值:`False`. - batchPropsNames (list of strings; optional): 需要纳入批属性监听的属性名 默认值:`[]`. - batchPropsValues (dict; optional): 批量监听与当前batchPropsNames对应的属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否为当前组件开启持久化功能. - persisted_props (list of a value equal to: 'current', 'pageSize's; optional): 当前组件启用持久化的属性值数组,可选项有`'current'`、`'pageSize'` 默认值:`['current', 'pageSize']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 当前组件的属性持久化存储类型 默认值:`'local'`.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdPagination' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, align: typing.Optional[Literal['start', 'center', 'end']] = None, defaultCurrent: typing.Optional[NumberType] = None, defaultPageSize: typing.Optional[NumberType] = None, current: typing.Optional[NumberType] = None, disabled: typing.Optional[bool] = None, hideOnSinglePage: typing.Optional[bool] = None, pageSize: typing.Optional[NumberType] = None, pageSizeOptions: typing.Optional[typing.Sequence[NumberType]] = None, showSizeChanger: typing.Optional[bool] = None, showQuickJumper: typing.Optional[bool] = None, showTotalPrefix: typing.Optional[str] = None, showTotalSuffix: typing.Optional[str] = None, simple: typing.Optional[bool] = None, size: typing.Optional[Literal['default', 'small']] = None, total: typing.Optional[NumberType] = None, showTotal: typing.Optional[bool] = None, showLessItems: typing.Optional[bool] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['current', 'pageSize']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'locale', 'align', 'defaultCurrent', 'defaultPageSize', 'current', 'disabled', 'hideOnSinglePage', 'pageSize', 'pageSizeOptions', 'showSizeChanger', 'showQuickJumper', 'showTotalPrefix', 'showTotalSuffix', 'simple', 'size', 'total', 'showTotal', 'showLessItems', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'locale', 'align', 'defaultCurrent', 'defaultPageSize', 'current', 'disabled', 'hideOnSinglePage', 'pageSize', 'pageSizeOptions', 'showSizeChanger', 'showQuickJumper', 'showTotalPrefix', 'showTotalSuffix', 'simple', 'size', 'total', 'showTotal', 'showLessItems', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdPagination, self).__init__(**args) setattr(AntdPagination, '__init__', _explicitize_args(AntdPagination.__init__)) ================================================ FILE: feffery_antd_components/AntdParagraph.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdParagraph(Component): """An AntdParagraph component. 段落组件AntdParagraph Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - code (boolean; optional): 是否渲染为代码形式. - copyable (boolean; optional): 是否开启快捷复制功能. - strikethrough (boolean; optional): 是否渲染为删除线形式. - disabled (boolean; optional): 是否渲染为禁用形式. - mark (boolean; optional): 是否渲染为高亮形式. - strong (boolean; optional): 是否渲染为加粗形式. - italic (boolean; optional): 是否渲染为斜体形式. - underline (boolean; optional): 是否渲染为下划线形式. - type (a value equal to: 'secondary', 'success', 'warning', 'danger'; optional): 设置内容特殊状态形式,可选项有`'secondary'`、`'success'`、`'warning'`、`'danger'`. - ellipsis (dict; default False): 配置内容省略相关功能,设置为`False`则不开启 默认值:`False`. `ellipsis` is a boolean | dict with keys: - expandable (boolean | a value equal to: 'collapsible'; optional): 是否可展开. - rows (number; optional): 最大显示行数. - suffix (string; optional): 自定义内容省略后缀. - symbol (a list of or a singular dash component, string or number; optional): 组件型,自定义内容展开控件. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['ellipsis.symbol'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdParagraph' Ellipsis = TypedDict( 'Ellipsis', { 'expandable': NotRequired[typing.Union[bool, Literal['collapsible']]], 'rows': NotRequired[NumberType], 'suffix': NotRequired[str], 'symbol': NotRequired[ComponentType], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, code: typing.Optional[bool] = None, copyable: typing.Optional[bool] = None, strikethrough: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, mark: typing.Optional[bool] = None, strong: typing.Optional[bool] = None, italic: typing.Optional[bool] = None, underline: typing.Optional[bool] = None, type: typing.Optional[Literal['secondary', 'success', 'warning', 'danger']] = None, ellipsis: typing.Optional[typing.Union[bool, 'Ellipsis']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'locale', 'code', 'copyable', 'strikethrough', 'disabled', 'mark', 'strong', 'italic', 'underline', 'type', 'ellipsis', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'locale', 'code', 'copyable', 'strikethrough', 'disabled', 'mark', 'strong', 'italic', 'underline', 'type', 'ellipsis', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdParagraph, self).__init__(children=children, **args) setattr(AntdParagraph, '__init__', _explicitize_args(AntdParagraph.__init__)) ================================================ FILE: feffery_antd_components/AntdPictureUpload.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdPictureUpload(Component): """An AntdPictureUpload component. 图片上传组件AntdPictureUpload Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - apiUrl (string; optional): 文件上传服务接口地址. - apiUrlExtraParams (dict; optional): 文件上传服务接口额外参数. - headers (dict; optional): 文件上传服务接口额外headers参数. - withCredentials (boolean; default False): 是否在请求上传服务接口时自动携带cookies等凭据信息 默认值:`False`. - downloadUrl (string; optional): 对应已上传文件的`GET`类型下载服务接口地址,自带参数`taskId`、`filename`. - downloadUrlExtraParams (dict; optional): 配合`downloadUrl`参数,设置文件下载服务接口额外参数. - downloadUrlFromBackend (boolean; default False): 是否将文件上传接口返回信息中的`url`属性作为下载链接地址 默认值:`False`. - editable (boolean; default False): 是否为图片上传过程添加裁切、旋转等预处理功能 默认值:`False`. - editConfig (dict; optional): 当`editable=True`时,配置图片编辑相关功能. `editConfig` is a dict with keys: - aspect (number; optional): 裁切区域宽高比 默认值:`1`. - shape (a value equal to: 'rect', 'round'; optional): 裁切区域形状,可选项有`'rect'`、`'round'` 默认值:`'rect'`. - grid (boolean; optional): 是否显示裁切区域辅助网格线 默认值:`False`. - quality (number; optional): 图片质量,取值应在0到1之间 默认值:`0.4`. - zoom (boolean; optional): 是否启用图片缩放功能 默认值:`True`. - rotate (boolean; optional): 是否启用图片旋转功能 默认值:`False`. - minZoom (number; optional): 开启缩放功能时,设置最小缩放倍数 默认值:`1`. - maxZoom (number; optional): 开启缩放功能时,设置最大缩放倍数 默认值:`3`. - modalTitle (a list of or a singular dash component, string or number; optional): 组件型,图片编辑模态框的标题 默认值:`'编辑图片'`. - modalWidth (number; optional): 图片编辑模态框像素宽度 默认值:`520`. - modalOk (a list of or a singular dash component, string or number; optional): 组件型,图片编辑模态框确认按钮内容 默认值:`'确定'`. - modalCancel (a list of or a singular dash component, string or number; optional): 组件型,图片编辑模态框取消按钮内容 默认值:`'取消'`. - fileListMaxLength (number; optional): 限制已上传文件列表长度上限. - fileTypes (list of strings; default [ 'tiff', 'bmp', 'gif', 'png', 'jpeg', 'jpg', 'webp', 'ico', 'tif',]): 允许上传的文件后缀名列表 默认值:`['tiff', 'bmp', 'gif', 'png', 'jpeg', 'jpg', 'webp', 'ico', 'tif']`. - buttonContent (a list of or a singular dash component, string or number; optional): 组件型,上传按钮内容. - uploadId (string; optional): 自定义当前组件发起文件上传请求时携带的`uploadId`参数,可用于辅助后端创建文件上传所在文件夹. - fileMaxSize (number; default 10): 文件上传尺寸上限,单位:兆. - failedTooltipInfo (string; optional): 文件上传失败消息提示文字内容 默认值:`'上传失败'`. - showRemoveIcon (boolean; default True): 已上传图片是否显示删除按钮 默认值:`True`. - showPreviewIcon (boolean; default True): 已上传图片是否显示预览按钮 默认值:`True`. - confirmBeforeDelete (boolean; default False): 是否为已上传文件删除操作添加二次确认模态框 默认值:`False`. - showPercent (boolean; default False): 是否显示上传进度条 默认值:`False`. - progressProps (dict; optional): 配置上传进度条相关参数. `progressProps` is a dict with keys: - strokeColor (dict; optional): 进度条颜色. `strokeColor` is a string Or dict with keys: - from (string; optional): 渐变色开始颜色. - to (string; optional): 渐变色结束颜色. - strokeWidth (number; optional): 进度条像素宽度. - format (dict; optional): 进度文字格式. `format` is a dict with keys: - prefix (string; optional): 进度文字前缀内容. - suffix (string; optional): 进度文字后缀内容 默认值:`'%'`. - showSuccessMessage (boolean; default True): 是否在每个文件上传成功后,分别弹出消息提示 默认值:`True`. - showErrorMessage (boolean; default True): 是否在每个文件上传失败后,分别弹出消息提示 默认值:`True`. - pastable (boolean; default False): 是否开启粘贴上传,即本地复制文件后,在页面任意位置粘贴即可完成上传 默认值:`False`. - lastUploadTaskRecord (dict; optional): 监听最近一次文件上传任务相关信息. `lastUploadTaskRecord` is a dict with keys: - fileName (string; optional): 文件名称. - fileSize (number; optional): 文件大小. - completeTimestamp (number; optional): 上传完成时间戳. - taskStatus (string; optional): 上传任务状态,`'success'`表示成功,`'failed'`表示失败. - taskId (string; optional): 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息. - url (string; optional): 当前文件的下载链接. - uploadResponse (boolean | number | string | dict | list; optional): 上传任务的接口响应信息. | list of dicts with keys: - fileName (string; optional): 文件名称. - fileSize (number; optional): 文件大小. - completeTimestamp (number; optional): 上传完成时间戳. - taskStatus (string; optional): 上传任务状态,`'success'`表示成功,`'failed'`表示失败. - taskId (string; optional): 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息. - url (string; optional): 当前文件的下载链接. - uploadResponse (boolean | number | string | dict | list; optional): 上传任务的接口响应信息. - listUploadTaskRecord (list of dicts; optional): 监听当前已上传文件列表中上传任务相关信息. `listUploadTaskRecord` is a list of dicts with keys: - fileName (string; optional): 文件名称. - fileSize (number; optional): 文件大小. - completeTimestamp (number; optional): 上传完成时间戳. - taskStatus (string; optional): 上传任务状态,`'success'`表示成功,`'failed'`表示失败. - taskId (string; optional): 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息. - uid (string; optional): 当前文件上传唯一识别id,前端自动生成. - url (string; optional): 当前文件下载链接. - uploadResponse (boolean | number | string | dict | list; optional): 上传任务的接口响应信息. - defaultFileList (list of dicts; optional): 初始化文件列表展示信息. `defaultFileList` is a list of dicts with keys: - name (string; optional): 当前文件名称. - status (a value equal to: 'done', 'error', 'removed'; optional): 当前文件展示状态,可选项有`'done'`、`'error'`、`'removed'`. - uid (boolean | number | string | dict | list; optional): 当前文件唯一识别id. - url (string; optional): 当前文件下载链接. - taskId (string; optional): 若传入有效值,将作为当前组件的`uploadId`参数. - fileSize (number; optional): 当前文件大小. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [ 'editConfig.modalTitle', 'editConfig.modalOk', 'editConfig.modalCancel', 'buttonContent', ] _base_nodes = ['buttonContent', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdPictureUpload' EditConfig = TypedDict( 'EditConfig', { 'aspect': NotRequired[NumberType], 'shape': NotRequired[Literal['rect', 'round']], 'grid': NotRequired[bool], 'quality': NotRequired[NumberType], 'zoom': NotRequired[bool], 'rotate': NotRequired[bool], 'minZoom': NotRequired[NumberType], 'maxZoom': NotRequired[NumberType], 'modalTitle': NotRequired[ComponentType], 'modalWidth': NotRequired[NumberType], 'modalOk': NotRequired[ComponentType], 'modalCancel': NotRequired[ComponentType], }, ) ProgressPropsStrokeColor = TypedDict( 'ProgressPropsStrokeColor', {'from': NotRequired[str], 'to': NotRequired[str]} ) ProgressPropsFormat = TypedDict( 'ProgressPropsFormat', {'prefix': NotRequired[str], 'suffix': NotRequired[str]} ) ProgressProps = TypedDict( 'ProgressProps', { 'strokeColor': NotRequired[typing.Union[str, 'ProgressPropsStrokeColor']], 'strokeWidth': NotRequired[NumberType], 'format': NotRequired['ProgressPropsFormat'], }, ) LastUploadTaskRecord = TypedDict( 'LastUploadTaskRecord', { 'fileName': NotRequired[str], 'fileSize': NotRequired[NumberType], 'completeTimestamp': NotRequired[NumberType], 'taskStatus': NotRequired[str], 'taskId': NotRequired[str], 'url': NotRequired[str], 'uploadResponse': NotRequired[typing.Any], }, ) ListUploadTaskRecord = TypedDict( 'ListUploadTaskRecord', { 'fileName': NotRequired[str], 'fileSize': NotRequired[NumberType], 'completeTimestamp': NotRequired[NumberType], 'taskStatus': NotRequired[str], 'taskId': NotRequired[str], 'uid': NotRequired[str], 'url': NotRequired[str], 'uploadResponse': NotRequired[typing.Any], }, ) DefaultFileList = TypedDict( 'DefaultFileList', { 'name': NotRequired[str], 'status': NotRequired[Literal['done', 'error', 'removed']], 'uid': NotRequired[typing.Any], 'url': NotRequired[str], 'taskId': NotRequired[str], 'fileSize': NotRequired[NumberType], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, apiUrl: typing.Optional[str] = None, apiUrlExtraParams: typing.Optional[dict] = None, headers: typing.Optional[dict] = None, withCredentials: typing.Optional[bool] = None, downloadUrl: typing.Optional[str] = None, downloadUrlExtraParams: typing.Optional[dict] = None, downloadUrlFromBackend: typing.Optional[bool] = None, editable: typing.Optional[bool] = None, editConfig: typing.Optional['EditConfig'] = None, fileListMaxLength: typing.Optional[NumberType] = None, fileTypes: typing.Optional[typing.Sequence[str]] = None, buttonContent: typing.Optional[ComponentType] = None, uploadId: typing.Optional[str] = None, fileMaxSize: typing.Optional[NumberType] = None, failedTooltipInfo: typing.Optional[str] = None, showRemoveIcon: typing.Optional[bool] = None, showPreviewIcon: typing.Optional[bool] = None, confirmBeforeDelete: typing.Optional[bool] = None, showPercent: typing.Optional[bool] = None, progressProps: typing.Optional['ProgressProps'] = None, showSuccessMessage: typing.Optional[bool] = None, showErrorMessage: typing.Optional[bool] = None, pastable: typing.Optional[bool] = None, lastUploadTaskRecord: typing.Optional[ typing.Union['LastUploadTaskRecord', typing.Sequence['LastUploadTaskRecord']] ] = None, listUploadTaskRecord: typing.Optional[typing.Sequence['ListUploadTaskRecord']] = None, defaultFileList: typing.Optional[typing.Sequence['DefaultFileList']] = None, disabled: typing.Optional[bool] = None, status: typing.Optional[Literal['error', 'warning']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'locale', 'apiUrl', 'apiUrlExtraParams', 'headers', 'withCredentials', 'downloadUrl', 'downloadUrlExtraParams', 'downloadUrlFromBackend', 'editable', 'editConfig', 'fileListMaxLength', 'fileTypes', 'buttonContent', 'uploadId', 'fileMaxSize', 'failedTooltipInfo', 'showRemoveIcon', 'showPreviewIcon', 'confirmBeforeDelete', 'showPercent', 'progressProps', 'showSuccessMessage', 'showErrorMessage', 'pastable', 'lastUploadTaskRecord', 'listUploadTaskRecord', 'defaultFileList', 'disabled', 'status', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'locale', 'apiUrl', 'apiUrlExtraParams', 'headers', 'withCredentials', 'downloadUrl', 'downloadUrlExtraParams', 'downloadUrlFromBackend', 'editable', 'editConfig', 'fileListMaxLength', 'fileTypes', 'buttonContent', 'uploadId', 'fileMaxSize', 'failedTooltipInfo', 'showRemoveIcon', 'showPreviewIcon', 'confirmBeforeDelete', 'showPercent', 'progressProps', 'showSuccessMessage', 'showErrorMessage', 'pastable', 'lastUploadTaskRecord', 'listUploadTaskRecord', 'defaultFileList', 'disabled', 'status', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdPictureUpload, self).__init__(**args) setattr(AntdPictureUpload, '__init__', _explicitize_args(AntdPictureUpload.__init__)) ================================================ FILE: feffery_antd_components/AntdPopconfirm.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdPopconfirm(Component): """An AntdPopconfirm component. 气泡确认框组件AntdPopconfirm Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,气泡确认框挂载元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - root (dict; optional): 根元素(包含箭头、内容元素)css样式. - body (dict; optional): 内容元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - root (string; optional): 根元素(包含箭头、内容元素)css类名. - body (string; optional): 内容元素css类名. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - icon (a list of or a singular dash component, string or number; optional): 组件型,提示图标. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - description (a list of or a singular dash component, string or number; optional): 组件型,描述内容. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom'; default 'top'): 气泡确认框弹出位置,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` 默认值:`'top'`. - mouseEnterDelay (number; default 0.1): 从鼠标移入挂载元素,到气泡确认框显示的延时,单位:秒 默认值:`0.1`. - mouseLeaveDelay (number; default 0.1): 从鼠标移出挂载元素,到气泡确认框消失的延时,单位:秒 默认值:`0.1`. - okText (a list of or a singular dash component, string or number; optional): 组件型,确认按钮内容. - okButtonProps (dict; optional): 配置确认按钮相关参数. `okButtonProps` is a dict with keys: - size (a value equal to: 'small', 'middle', 'large'; optional): 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - type (a value equal to: 'primary', 'ghost', 'dashed', 'link', 'text', 'default'; optional): 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` 默认值:`'default'`. - danger (boolean; optional): 按钮是否呈现危险样式 默认值:`False`. - disabled (boolean; optional): 按钮是否呈现禁用状态 默认值:`False`. - shape (a value equal to: 'circle', 'round'; optional): 按钮形状,可选项有`'default'`、`'circle'`、`'round'` 默认值:`'default'`. - style (dict; optional): 按钮css样式. - className (string; optional): 按钮css类名. - cancelText (a list of or a singular dash component, string or number; optional): 组件型,取消按钮内容. - cancelButtonProps (dict; optional): 配置取消按钮相关参数. `cancelButtonProps` is a dict with keys: - size (a value equal to: 'small', 'middle', 'large'; optional): 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - type (a value equal to: 'primary', 'ghost', 'dashed', 'link', 'text', 'default'; optional): 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` 默认值:`'default'`. - danger (boolean; optional): 按钮是否呈现危险样式 默认值:`False`. - disabled (boolean; optional): 按钮是否呈现禁用状态 默认值:`False`. - shape (a value equal to: 'circle', 'round'; optional): 按钮形状,可选项有`'default'`、`'circle'`、`'round'` 默认值:`'default'`. - style (dict; optional): 按钮css样式. - className (string; optional): 按钮css类名. - showCancel (boolean; default True): 是否显示取消按钮 默认值:`True`. - confirmCounts (number; default 0): 监听确认按钮累计点击次数 默认值:`0`. - cancelCounts (number; default 0): 监听取消按钮累计点击次数 默认值:`0`. - trigger (a value equal to: 'hover', 'focus', 'click' | list of a value equal to: 'hover', 'focus', 'click's; default 'click'): 气泡确认框触发行为,可选项有`'hover'`、`'focus'`、`'click'`,可多选组合 默认值:`'click'`. - zIndex (number; optional): 气泡确认框z-index. - arrow (a value equal to: 'show', 'hide', 'center'; default 'show'): 指示箭头显示形式,可选项有`'show'`、`'hide'`、`'center'` 默认值:`'show'`. - fresh (boolean; default False): 是否保持内容更新 默认值:`False`. - open (boolean; default False): 监听或设置气泡确认框的显示状态 默认值:`False`. - permanent (boolean; default False): 是否保持气泡确认框显示/隐藏 默认值:`False`. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 悬浮层渲染挂载父节点策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading.""" _children_props: typing.List[str] = ['icon', 'title', 'description', 'okText', 'cancelText'] _base_nodes = ['icon', 'title', 'description', 'okText', 'cancelText', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdPopconfirm' Styles = TypedDict('Styles', {'root': NotRequired[dict], 'body': NotRequired[dict]}) ClassNames = TypedDict('ClassNames', {'root': NotRequired[str], 'body': NotRequired[str]}) OkButtonProps = TypedDict( 'OkButtonProps', { 'size': NotRequired[Literal['small', 'middle', 'large']], 'type': NotRequired[Literal['primary', 'ghost', 'dashed', 'link', 'text', 'default']], 'danger': NotRequired[bool], 'disabled': NotRequired[bool], 'shape': NotRequired[Literal['circle', 'round']], 'style': NotRequired[dict], 'className': NotRequired[str], }, ) CancelButtonProps = TypedDict( 'CancelButtonProps', { 'size': NotRequired[Literal['small', 'middle', 'large']], 'type': NotRequired[Literal['primary', 'ghost', 'dashed', 'link', 'text', 'default']], 'danger': NotRequired[bool], 'disabled': NotRequired[bool], 'shape': NotRequired[Literal['circle', 'round']], 'style': NotRequired[dict], 'className': NotRequired[str], }, ) LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, icon: typing.Optional[ComponentType] = None, title: typing.Optional[ComponentType] = None, description: typing.Optional[ComponentType] = None, disabled: typing.Optional[bool] = None, placement: typing.Optional[ Literal[ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ] ] = None, mouseEnterDelay: typing.Optional[NumberType] = None, mouseLeaveDelay: typing.Optional[NumberType] = None, okText: typing.Optional[ComponentType] = None, okButtonProps: typing.Optional['OkButtonProps'] = None, cancelText: typing.Optional[ComponentType] = None, cancelButtonProps: typing.Optional['CancelButtonProps'] = None, showCancel: typing.Optional[bool] = None, confirmCounts: typing.Optional[NumberType] = None, cancelCounts: typing.Optional[NumberType] = None, trigger: typing.Optional[ typing.Union[ Literal['hover', 'focus', 'click'], typing.Sequence[Literal['hover', 'focus', 'click']], ] ] = None, zIndex: typing.Optional[NumberType] = None, arrow: typing.Optional[Literal['show', 'hide', 'center']] = None, fresh: typing.Optional[bool] = None, open: typing.Optional[bool] = None, permanent: typing.Optional[bool] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, loading_state: typing.Optional['LoadingState'] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'locale', 'icon', 'title', 'description', 'disabled', 'placement', 'mouseEnterDelay', 'mouseLeaveDelay', 'okText', 'okButtonProps', 'cancelText', 'cancelButtonProps', 'showCancel', 'confirmCounts', 'cancelCounts', 'trigger', 'zIndex', 'arrow', 'fresh', 'open', 'permanent', 'popupContainer', 'data-*', 'aria-*', 'loading_state', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'locale', 'icon', 'title', 'description', 'disabled', 'placement', 'mouseEnterDelay', 'mouseLeaveDelay', 'okText', 'okButtonProps', 'cancelText', 'cancelButtonProps', 'showCancel', 'confirmCounts', 'cancelCounts', 'trigger', 'zIndex', 'arrow', 'fresh', 'open', 'permanent', 'popupContainer', 'data-*', 'aria-*', 'loading_state', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdPopconfirm, self).__init__(children=children, **args) setattr(AntdPopconfirm, '__init__', _explicitize_args(AntdPopconfirm.__init__)) ================================================ FILE: feffery_antd_components/AntdPopover.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdPopover(Component): """An AntdPopover component. 气泡卡片组件Popover Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,气泡卡片触发目标元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - root (dict; optional): 根元素(包含箭头、内容元素)css样式. - body (dict; optional): 内容元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - root (string; optional): 根元素(包含箭头、内容元素)css类名. - body (string; optional): 内容元素css类名. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - content (a list of or a singular dash component, string or number; optional): 组件型,内容区元素. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom'; default 'top'): 气泡卡片展开方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` 默认值:`top'`. - color (string; optional): 背景颜色. - mouseEnterDelay (number; default 0.1): 鼠标移入到气泡卡片弹出延时,单位:秒 默认值:`0.1`. - mouseLeaveDelay (number; default 0.1): 鼠标移出到气泡卡片消失延时,单位:秒 默认值:`0.1`. - trigger (a value equal to: 'hover', 'focus', 'click' | list of a value equal to: 'hover', 'focus', 'click's; default 'hover'): 触发方式,可选项有`'hover'`、`'focus'`、`'click'`,可多选 默认值:`'hover'`. - zIndex (number; optional): 气泡卡片z-index. - arrow (a value equal to: 'show', 'hide', 'center'; default 'show'): 控制气泡卡片附带箭头显示形式,可选项有`'show'`、`'hide'`、`'center'` 默认值:`'show'`. - fresh (boolean; default False): 是否始终保持更新内容 默认值:`False`. - open (boolean; default False): 监听或设置当前气泡卡片的展开状态 默认值:`False`. - permanent (boolean; default False): 是否保持气泡卡片处于`open`对应状态不变 默认值:`False`. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 气泡卡片展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['title', 'content'] _base_nodes = ['title', 'content', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdPopover' Styles = TypedDict('Styles', {'root': NotRequired[dict], 'body': NotRequired[dict]}) ClassNames = TypedDict('ClassNames', {'root': NotRequired[str], 'body': NotRequired[str]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, title: typing.Optional[ComponentType] = None, content: typing.Optional[ComponentType] = None, placement: typing.Optional[ Literal[ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ] ] = None, color: typing.Optional[str] = None, mouseEnterDelay: typing.Optional[NumberType] = None, mouseLeaveDelay: typing.Optional[NumberType] = None, trigger: typing.Optional[ typing.Union[ Literal['hover', 'focus', 'click'], typing.Sequence[Literal['hover', 'focus', 'click']], ] ] = None, zIndex: typing.Optional[NumberType] = None, arrow: typing.Optional[Literal['show', 'hide', 'center']] = None, fresh: typing.Optional[bool] = None, open: typing.Optional[bool] = None, permanent: typing.Optional[bool] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'title', 'content', 'placement', 'color', 'mouseEnterDelay', 'mouseLeaveDelay', 'trigger', 'zIndex', 'arrow', 'fresh', 'open', 'permanent', 'popupContainer', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'title', 'content', 'placement', 'color', 'mouseEnterDelay', 'mouseLeaveDelay', 'trigger', 'zIndex', 'arrow', 'fresh', 'open', 'permanent', 'popupContainer', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdPopover, self).__init__(children=children, **args) setattr(AntdPopover, '__init__', _explicitize_args(AntdPopover.__init__)) ================================================ FILE: feffery_antd_components/AntdPopupCard.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdPopupCard(Component): """An AntdPopupCard component. 弹出式卡片组件AntdPopupCard Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - mask (dict; optional): 遮罩层元素css样式. - content (dict; optional): 容器元素css样式. - wrapper (dict; optional): 包裹层元素css样式. - header (dict; optional): 头部元素css样式. - body (dict; optional): 内容元素css样式. - footer (dict; optional): 底部元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - mask (string; optional): 遮罩层元素css类名. - content (string; optional): 容器元素css类名. - wrapper (string; optional): 包裹层元素css类名. - header (string; optional): 头部元素css类名. - body (string; optional): 内容元素css类名. - footer (string; optional): 底部元素css类名. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - visible (boolean; default True): 设置或监听当前弹出式卡片是否显示 默认值:`True`. - width (number | string; optional): 弹出式卡片像素宽度. - transitionType (a value equal to: 'none', 'fade', 'zoom', 'zoom-big', 'zoom-big-fast', 'slide-up', 'slide-down', 'slide-left', 'slide-right', 'move-up', 'move-down', 'move-left', 'move-right'; default 'fade'): 卡片显隐动画类型,可选项有`'none'`、`'fade'`、`'zoom'`、`'zoom-big'`、`'zoom-big-fast'`、`'slide-up'`、`'slide-down'`、`'slide-left'`、`'slide-right'`、`'move-up'`、`'move-down'`、`'move-left'`、`'move-right'` 默认值:`'zoom'`. - forceRender (boolean; default False): 是否在初始化卡片未显示时,强制渲染卡片内部元素 默认值:`False`. - destroyOnClose (boolean; default True): 是否在卡片关闭后自动销毁内部元素 默认值:`True`. - closable (boolean; default True): 是否显示右上角的关闭按钮 默认值:`True`. - closeIconType (a value equal to: 'default', 'outlined', 'two-tone'; default 'default'): 关闭按钮类型,可选项有`'default'`、`'outlined'`、`'two-tone'` 默认值:`'default'`. - draggable (boolean; default False): 是否可拖拽 默认值:`False`. - dragClassName (string | dict; optional): 顶部可拖拽区域css类名. - zIndex (number; default 1000): 弹出式卡片z-index 默认值:`1000`. - loading (boolean; default False): 是否整体渲染为加载中状态 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['title'] _base_nodes = ['title', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdPopupCard' Styles = TypedDict( 'Styles', { 'mask': NotRequired[dict], 'content': NotRequired[dict], 'wrapper': NotRequired[dict], 'header': NotRequired[dict], 'body': NotRequired[dict], 'footer': NotRequired[dict], }, ) ClassNames = TypedDict( 'ClassNames', { 'mask': NotRequired[str], 'content': NotRequired[str], 'wrapper': NotRequired[str], 'header': NotRequired[str], 'body': NotRequired[str], 'footer': NotRequired[str], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, title: typing.Optional[ComponentType] = None, visible: typing.Optional[bool] = None, width: typing.Optional[typing.Union[NumberType, str]] = None, transitionType: typing.Optional[ Literal[ 'none', 'fade', 'zoom', 'zoom-big', 'zoom-big-fast', 'slide-up', 'slide-down', 'slide-left', 'slide-right', 'move-up', 'move-down', 'move-left', 'move-right', ] ] = None, forceRender: typing.Optional[bool] = None, destroyOnClose: typing.Optional[bool] = None, closable: typing.Optional[bool] = None, closeIconType: typing.Optional[Literal['default', 'outlined', 'two-tone']] = None, draggable: typing.Optional[bool] = None, dragClassName: typing.Optional[typing.Union[str, dict]] = None, zIndex: typing.Optional[NumberType] = None, loading: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'title', 'visible', 'width', 'transitionType', 'forceRender', 'destroyOnClose', 'closable', 'closeIconType', 'draggable', 'dragClassName', 'zIndex', 'loading', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'title', 'visible', 'width', 'transitionType', 'forceRender', 'destroyOnClose', 'closable', 'closeIconType', 'draggable', 'dragClassName', 'zIndex', 'loading', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdPopupCard, self).__init__(children=children, **args) setattr(AntdPopupCard, '__init__', _explicitize_args(AntdPopupCard.__init__)) ================================================ FILE: feffery_antd_components/AntdProgress.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdProgress(Component): """An AntdProgress component. 进度条组件AntdProgress Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - type (a value equal to: 'line', 'circle', 'dashboard'; default 'line'): 进度条类型,可选项有`'line'`、`'circle'`、`'dashboard'` 默认值:`'line'`. - size (dict; default 'default'): 进度条尺寸规格,可选项有`'small'`、`'default'`、`'large'`,传入数值型表示像素尺寸,传入字典型可分别控制宽度和高度 默认值:`'default'`. `size` is a number | list of number | strings | a value equal to: 'small', 'default' | dict with keys: - width (number; optional): 像素宽度. - height (number; optional): 像素高度. - percent (number; default 0): 进度条进度,取值应在`0`到`100`之间,当`100`时默认会渲染为完成状态 默认值:`0`. - success (dict; optional): 配置进度条完成状态相关参数. `success` is a dict with keys: - percent (number; optional): 达到完成状态对应的进度,取值应在`0`到`100`之间 默认值:`100`. - strokeColor (dict; optional): 完成状态进度条颜色,支持渐变色. `strokeColor` is a string Or dict with keys: - from (string; optional): 渐变色开端颜色. - to (string; optional): 渐变色末端颜色. - format (dict; optional): 配置进度提示相关参数. `format` is a dict with keys: - prefix (string; optional): 进度提示前缀文字 默认值:`''`. - suffix (string; optional): 进度提示后缀文字 默认值:`'%'`. - content (a list of or a singular dash component, string or number; optional): 组件型,强制设置显示内容. - status (a value equal to: 'success', 'exception', 'normal', 'active'; optional): 进度条状态,可选项有`'success'`、`'exception'`、`'normal'`、`'active'`,其中`'active'`仅在`type='line'`时生效 默认值:`'normal'`. - showInfo (boolean; default True): 是否显示进度数值或状态图标 默认值:`True`. - percentPosition (dict; optional): 适用于`'line'`型进度条,配置进度条附带进度数值信息显示位置. `percentPosition` is a dict with keys: - align (a value equal to: 'start', 'center', 'end'; optional): 对齐方式,可选项有`'start'`、`'center'`、`'end'`. - type (a value equal to: 'inner', 'outer'; optional): 内外位置,可选项有`'inner'`、`'outer'`. - strokeColor (dict; optional): 配置进度条颜色,支持渐变色. `strokeColor` is a string | list of strings | dict with keys: - from (string; optional): 渐变色开端颜色. - to (string; optional): 渐变色末端颜色. | dict with strings as keys and values of type string - strokeLinecap (a value equal to: 'round', 'butt', 'square'; optional): 进度条线型,可选项有`'round'`、`'butt'`、`'square'` 默认值:`'round'`. - strokeWidth (number; optional): 进度条线的宽度,单位是进度条画布宽度的百分比. - trailColor (string; optional): 未完成分段部分的颜色,默认无颜色. - gapDegree (number; optional): 进度条缺口角度,取值应在`0`到`295`之间,仅`type='dashboard'`时可用 默认值:`75`. - gapPosition (a value equal to: 'top', 'bottom', 'left', 'right'; default 'bottom'): 仪表盘缺口方向,可选项有`'top'`、`'bottom'`、`'left'`、`'right'`,仅`type='dashboard'`时可用 默认值:`'bottom'`. - steps (dict; optional): 配置进度条分段数量,针对`'circle'`、`'dashboard'`型进度条支持传入字典型进行更详细的配置. `steps` is a number | dict with keys: - count (number; optional): 分段数量. - gap (number; optional): 分段间隔像素大小. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['format.content'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdProgress' Size = TypedDict('Size', {'width': NotRequired[NumberType], 'height': NotRequired[NumberType]}) SuccessStrokeColor = TypedDict( 'SuccessStrokeColor', {'from': NotRequired[str], 'to': NotRequired[str]} ) Success = TypedDict( 'Success', { 'percent': NotRequired[NumberType], 'strokeColor': NotRequired[typing.Union[str, 'SuccessStrokeColor']], }, ) Format = TypedDict( 'Format', { 'prefix': NotRequired[str], 'suffix': NotRequired[str], 'content': NotRequired[ComponentType], }, ) PercentPosition = TypedDict( 'PercentPosition', { 'align': NotRequired[Literal['start', 'center', 'end']], 'type': NotRequired[Literal['inner', 'outer']], }, ) StrokeColor = TypedDict('StrokeColor', {'from': NotRequired[str], 'to': NotRequired[str]}) Steps = TypedDict('Steps', {'count': NotRequired[NumberType], 'gap': NotRequired[NumberType]}) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, type: typing.Optional[Literal['line', 'circle', 'dashboard']] = None, size: typing.Optional[ typing.Union[ NumberType, typing.Sequence[typing.Union[NumberType, str]], Literal['small', 'default'], 'Size', ] ] = None, percent: typing.Optional[NumberType] = None, success: typing.Optional['Success'] = None, format: typing.Optional['Format'] = None, status: typing.Optional[Literal['success', 'exception', 'normal', 'active']] = None, showInfo: typing.Optional[bool] = None, percentPosition: typing.Optional['PercentPosition'] = None, strokeColor: typing.Optional[ typing.Union[ str, typing.Sequence[str], 'StrokeColor', typing.Dict[typing.Union[str, float, int], str], ] ] = None, strokeLinecap: typing.Optional[Literal['round', 'butt', 'square']] = None, strokeWidth: typing.Optional[NumberType] = None, trailColor: typing.Optional[str] = None, gapDegree: typing.Optional[NumberType] = None, gapPosition: typing.Optional[Literal['top', 'bottom', 'left', 'right']] = None, steps: typing.Optional[typing.Union[NumberType, 'Steps']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'type', 'size', 'percent', 'success', 'format', 'status', 'showInfo', 'percentPosition', 'strokeColor', 'strokeLinecap', 'strokeWidth', 'trailColor', 'gapDegree', 'gapPosition', 'steps', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'type', 'size', 'percent', 'success', 'format', 'status', 'showInfo', 'percentPosition', 'strokeColor', 'strokeLinecap', 'strokeWidth', 'trailColor', 'gapDegree', 'gapPosition', 'steps', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdProgress, self).__init__(**args) setattr(AntdProgress, '__init__', _explicitize_args(AntdProgress.__init__)) ================================================ FILE: feffery_antd_components/AntdQRCode.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdQRCode(Component): """An AntdQRCode component. 二维码组件AntdQRCode Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - value (string; optional): 二维码解析结果. - type (a value equal to: 'canvas', 'svg'; default 'canvas'): 渲染方式,可选项有`'canvas'`、`'svg'` 默认值:`'canvas'`. - icon (string; optional): 二维码内嵌图片地址. - size (number; default 160): 二维码像素边长 默认值:`160`. - iconSize (dict; default 40): 二维码内嵌图片像素边长 默认值:`40`. `iconSize` is a number | dict with keys: - width (number; optional) - height (number; optional) - color (string; default '#000'): 二维码颜色 默认值:`'#000'`. - bgColor (string; default 'transparent'): 二维码背景颜色 默认值:`'transparent'`. - bordered (boolean; default True): 二维码是否渲染边框 默认值:`True`. - errorLevel (a value equal to: 'L', 'M', 'Q', 'H'; default 'M'): 二维码纠错级别,可选项有`'L'`、`'M'`、`'Q'`、`'H'` 默认值:`'M'`. - status (a value equal to: 'active', 'expired', 'loading', 'scanned'; default 'active'): 二维码状态,可选项有`'active'`、`'expired'`、`'loading'`、`'scanned'` 默认值:`'active'`. - expires (number; optional): 当前二维码过期时间,单位:秒,到期后二维码状态将会被强制更新为`'expired'`. - autoSpin (boolean; default False): 是否在`value`处于回调更新中时,自动切换为`loading`状态 默认值:`False`. - refreshClicks (number; default 0): 监听当前\"点击刷新\"按钮累计点击次数,仅在`status`为`'expired'`时有效 默认值:`0`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdQRCode' IconSize = TypedDict( 'IconSize', {'width': NotRequired[NumberType], 'height': NotRequired[NumberType]} ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, value: typing.Optional[str] = None, type: typing.Optional[Literal['canvas', 'svg']] = None, icon: typing.Optional[str] = None, size: typing.Optional[NumberType] = None, iconSize: typing.Optional[typing.Union[NumberType, 'IconSize']] = None, color: typing.Optional[str] = None, bgColor: typing.Optional[str] = None, bordered: typing.Optional[bool] = None, errorLevel: typing.Optional[Literal['L', 'M', 'Q', 'H']] = None, status: typing.Optional[Literal['active', 'expired', 'loading', 'scanned']] = None, expires: typing.Optional[NumberType] = None, autoSpin: typing.Optional[bool] = None, refreshClicks: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'locale', 'value', 'type', 'icon', 'size', 'iconSize', 'color', 'bgColor', 'bordered', 'errorLevel', 'status', 'expires', 'autoSpin', 'refreshClicks', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'locale', 'value', 'type', 'icon', 'size', 'iconSize', 'color', 'bgColor', 'bordered', 'errorLevel', 'status', 'expires', 'autoSpin', 'refreshClicks', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdQRCode, self).__init__(**args) setattr(AntdQRCode, '__init__', _explicitize_args(AntdQRCode.__init__)) ================================================ FILE: feffery_antd_components/AntdRadioGroup.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdRadioGroup(Component): """An AntdRadioGroup component. 单选框组件AntdRadioGroup Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - direction (a value equal to: 'horizontal', 'vertical'; default 'horizontal'): 单选框排列方向,可选项有`'horizontal'`、`'vertical'` 默认值:`'horizontal'`. - options (list of dicts; optional): 配置选项. `options` is a list of string | number | dict with keys: - label (a list of or a singular dash component, string or number; optional): 组件型,当前选项标签内容. - value (string | number; optional): 当前选项值. - disabled (boolean; optional): 是否禁用当前选项 默认值:`False`.s - block (boolean; default False): 是否撑满父容器 默认值:`False`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当`optionType='button'`时,控制各选项按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - value (string | number; optional): 监听或设置已选值,与`format`格式对应. - defaultValue (string | number; optional): 初始化已选值,与`format`格式对应. - optionType (a value equal to: 'default', 'button'; default 'default'): 选项形式,可选项有`'default'`、`'button'` 默认值:`'default'`. - buttonStyle (a value equal to: 'outline', 'solid'; default 'outline'): 当`optionType='button'`时,设置按钮风格,可选项有`'outline'`、`'solid'` 默认值:`'outline'`. - readOnly (boolean; default False): 是否渲染为只读状态 默认值:`False`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['options[].label'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdRadioGroup' Options = TypedDict( 'Options', { 'label': NotRequired[ComponentType], 'value': NotRequired[typing.Union[str, NumberType]], 'disabled': NotRequired[bool], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, direction: typing.Optional[Literal['horizontal', 'vertical']] = None, options: typing.Optional[typing.Sequence[typing.Union[str, NumberType, 'Options']]] = None, block: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, value: typing.Optional[typing.Union[str, NumberType]] = None, defaultValue: typing.Optional[typing.Union[str, NumberType]] = None, optionType: typing.Optional[Literal['default', 'button']] = None, buttonStyle: typing.Optional[Literal['outline', 'solid']] = None, readOnly: typing.Optional[bool] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'direction', 'options', 'block', 'disabled', 'size', 'value', 'defaultValue', 'optionType', 'buttonStyle', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'direction', 'options', 'block', 'disabled', 'size', 'value', 'defaultValue', 'optionType', 'buttonStyle', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdRadioGroup, self).__init__(**args) setattr(AntdRadioGroup, '__init__', _explicitize_args(AntdRadioGroup.__init__)) ================================================ FILE: feffery_antd_components/AntdRate.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdRate(Component): """An AntdRate component. 评分组件AntdRate Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - allowClear (boolean; default True): 是否允许通过再次点击清除已选分值 默认值:`True`. - allowHalf (boolean; default False): 是否允许半星选择 默认值:`False`. - count (number; default 5): 总分值 默认值:`5`. - tooltips (list of strings; optional): 为各分值设置提示文字信息. - disabled (boolean; default False): 是否渲染为只读评分形式 默认值:`False`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - value (number; optional): 监听或设置已选值. - defaultValue (number; default 0): 初始化已选值 默认值:`0`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; default ['value']): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdRate' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, allowClear: typing.Optional[bool] = None, allowHalf: typing.Optional[bool] = None, count: typing.Optional[NumberType] = None, tooltips: typing.Optional[typing.Sequence[str]] = None, disabled: typing.Optional[bool] = None, autoFocus: typing.Optional[bool] = None, value: typing.Optional[NumberType] = None, defaultValue: typing.Optional[NumberType] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'allowClear', 'allowHalf', 'count', 'tooltips', 'disabled', 'autoFocus', 'value', 'defaultValue', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'allowClear', 'allowHalf', 'count', 'tooltips', 'disabled', 'autoFocus', 'value', 'defaultValue', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdRate, self).__init__(**args) setattr(AntdRate, '__init__', _explicitize_args(AntdRate.__init__)) ================================================ FILE: feffery_antd_components/AntdResult.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdResult(Component): """An AntdResult component. 结果组件AntdResult Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - extra (a list of or a singular dash component, string or number; optional): 组件型,操作区域. - status (a value equal to: 'success', 'error', 'info', 'warning', '404', '403', '500', 'loading'; default 'info'): 状态,可选项有`'success'`、`'error'`、`'info'`、`'warning'`、`'404'`、`'403'`、`'500'` 默认值:`'info'`. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - subTitle (a list of or a singular dash component, string or number; optional): 组件型,副标题内容. - icon (a list of or a singular dash component, string or number; optional): 组件型,图标内容. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['extra', 'title', 'subTitle', 'icon'] _base_nodes = ['extra', 'title', 'subTitle', 'icon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdResult' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, extra: typing.Optional[ComponentType] = None, status: typing.Optional[ Literal['success', 'error', 'info', 'warning', '404', '403', '500', 'loading'] ] = None, title: typing.Optional[ComponentType] = None, subTitle: typing.Optional[ComponentType] = None, icon: typing.Optional[ComponentType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'extra', 'status', 'title', 'subTitle', 'icon', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'extra', 'status', 'title', 'subTitle', 'icon', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdResult, self).__init__(**args) setattr(AntdResult, '__init__', _explicitize_args(AntdResult.__init__)) ================================================ FILE: feffery_antd_components/AntdRibbon.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdRibbon(Component): """An AntdRibbon component. 缎带组件AntdRibbon Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,添加徽标的目标元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - color (string; optional): 缎带颜色. - placement (a value equal to: 'start', 'end'; default 'end'): 缎带显示位置,可选项有`'start'`、`'end'` 默认值:`'end'`. - text (a list of or a singular dash component, string or number; optional): 组件型,缎带内容. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['text'] _base_nodes = ['text', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdRibbon' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, color: typing.Optional[str] = None, placement: typing.Optional[Literal['start', 'end']] = None, text: typing.Optional[ComponentType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'color', 'placement', 'text', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'color', 'placement', 'text', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdRibbon, self).__init__(children=children, **args) setattr(AntdRibbon, '__init__', _explicitize_args(AntdRibbon.__init__)) ================================================ FILE: feffery_antd_components/AntdRow.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdRow(Component): """An AntdRow component. 行组件AntdRow Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - align (a value equal to: 'top', 'middle', 'bottom'; default 'top'): 竖直方向对齐方式,可选项有`'top'`、`'middle'`、`'bottom'` 默认值:`'top'`. - gutter (dict; default 0): 网格间隔,传入数值型时为水平像素间隔,传入数组时分别设置水平、垂直像素间隔,传入字典时可为响应式各断点设置水平像素间隔. `gutter` is a number | list of numbers | dict with keys: - xs (number; optional): 页面宽度小于567px时的水平像素间隔. - sm (number; optional): 页面宽度大于等于567px时的水平像素间隔. - md (number; optional): 页面宽度大于等于768px时的水平像素间隔. - lg (number; optional): 页面宽度大于等于992px时的水平像素间隔. - xl (number; optional): 页面宽度大于等于1200px时的水平像素间隔. - xxl (number; optional): 页面宽度大于等于1600px时的水平像素间隔. - justify (a value equal to: 'start', 'end', 'center', 'space-around', 'space-between'; default 'start'): 水平排列方式,可选项有`'start'`、`'end'`、`'center'`、`'space-around'`、`'space-between'` 默认值:`'start'`. - wrap (boolean; default True): 是否允许自动换行 默认值:`True`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdRow' Gutter = TypedDict( 'Gutter', { 'xs': NotRequired[NumberType], 'sm': NotRequired[NumberType], 'md': NotRequired[NumberType], 'lg': NotRequired[NumberType], 'xl': NotRequired[NumberType], 'xxl': NotRequired[NumberType], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, align: typing.Optional[Literal['top', 'middle', 'bottom']] = None, gutter: typing.Optional[ typing.Union[NumberType, typing.Sequence[NumberType], 'Gutter'] ] = None, justify: typing.Optional[ Literal['start', 'end', 'center', 'space-around', 'space-between'] ] = None, wrap: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'align', 'gutter', 'justify', 'wrap', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'align', 'gutter', 'justify', 'wrap', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdRow, self).__init__(children=children, **args) setattr(AntdRow, '__init__', _explicitize_args(AntdRow.__init__)) ================================================ FILE: feffery_antd_components/AntdSegmented.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSegmented(Component): """An AntdSegmented component. 分段控制器组件AntdSegmented Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - options (list of dicts; optional): 配置选项相关参数. `options` is a list of string | number | dict with keys: - label (a list of or a singular dash component, string or number; optional): 组件型,选项标题内容. - value (string | number; required): 必填,选项值. - disabled (boolean; optional): 是否禁用当前选项 默认值:`False`. - icon (string; optional): 选项前缀图标,`iconRenderer='AntdIcon'`时同`AntdIcon`,`iconRenderer='fontawesome'`时表示css类名. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; optional): 选项前缀图标类型,可选项有`'AntdIcon'`、`'fontawesome'` 默认值:`'AntdIcon'`.s - value (string | number; optional): 监听或设置当前选中值. - defaultValue (string | number; optional): 设置初始化选中值. - block (boolean; default False): 是否撑满父容器 默认值:`False`. - shape (a value equal to: 'default', 'round'; default 'default'): 形状,可选项有`'default'`、`'round'` 默认值:`'default'`. - vertical (boolean; default False): 是否垂直展示 默认值:`False`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - size (a value equal to: 'large', 'middle', 'small'; default 'middle'): 组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['options[].label'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSegmented' Options = TypedDict( 'Options', { 'label': NotRequired[ComponentType], 'value': typing.Union[str, NumberType], 'disabled': NotRequired[bool], 'icon': NotRequired[str], 'iconRenderer': NotRequired[Literal['AntdIcon', 'fontawesome']], }, ) LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, options: typing.Optional[typing.Sequence[typing.Union[str, NumberType, 'Options']]] = None, value: typing.Optional[typing.Union[str, NumberType]] = None, defaultValue: typing.Optional[typing.Union[str, NumberType]] = None, block: typing.Optional[bool] = None, shape: typing.Optional[Literal['default', 'round']] = None, vertical: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, size: typing.Optional[Literal['large', 'middle', 'small']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, loading_state: typing.Optional['LoadingState'] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'options', 'value', 'defaultValue', 'block', 'shape', 'vertical', 'disabled', 'size', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'options', 'value', 'defaultValue', 'block', 'shape', 'vertical', 'disabled', 'size', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdSegmented, self).__init__(**args) setattr(AntdSegmented, '__init__', _explicitize_args(AntdSegmented.__init__)) ================================================ FILE: feffery_antd_components/AntdSegmentedColoring.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSegmentedColoring(Component): """An AntdSegmentedColoring component. 分段着色组件AntdSegmentedColoring Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - breakpoints (list of numbers; required): 必填,监听或设置分段断点数组. - colors (list of strings; required): 必填,为各分段设置颜色,数组长度应为`breakpoints`长度减1. - controls (boolean; default True): 是否为各分段数值输入框添加增减按钮 默认值:`True`. - keyboard (boolean; default True): 是否可通过键盘上下方向键增减各分段数值输入框数值 默认值:`True`. - min (number; optional): 各分段数值输入框允许输入数值下限,默认无限制. - max (number; optional): 各分段数值输入框允许输入数值上限,默认无限制. - step (number; default 0.01): 各分段数值输入框数值调整步长 默认值:`0.01`. - precision (number; default 2): 各分段数值输入框数值精度 默认值:`2`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - placeholder (string; optional): 各分段数值输入框占位文字内容. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - pureLegend (boolean; default False): 是否开启纯图例模式 默认值:`False`. - inputNumberStyle (dict; optional): 各分段数值输入框统一css样式. - colorBlockStyle (dict; optional): 色块css样式. - colorBlockPosition (a value equal to: 'left', 'right'; default 'right'): 色块显示方位,可选项有`'left'`、`'right'` 默认值:`'right'`. - colorBlockClickEvent (dict; optional): 监听分段色块点击事件. `colorBlockClickEvent` is a dict with keys: - color (string; optional): 被点击色块的颜色值. - range (list of numbers; optional): 被点击色块对应范围值. - timestamp (number; optional): 事件对应时间戳. - pureLegendLabelStyle (dict; optional): 当`pureLegend=True`时,设置各分段数值统一css样式. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSegmentedColoring' ColorBlockClickEvent = TypedDict( 'ColorBlockClickEvent', { 'color': NotRequired[str], 'range': NotRequired[typing.Sequence[NumberType]], 'timestamp': NotRequired[NumberType], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, breakpoints: typing.Optional[typing.Sequence[NumberType]] = None, colors: typing.Optional[typing.Sequence[str]] = None, controls: typing.Optional[bool] = None, keyboard: typing.Optional[bool] = None, min: typing.Optional[NumberType] = None, max: typing.Optional[NumberType] = None, step: typing.Optional[NumberType] = None, precision: typing.Optional[NumberType] = None, disabled: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[str] = None, readOnly: typing.Optional[bool] = None, pureLegend: typing.Optional[bool] = None, inputNumberStyle: typing.Optional[dict] = None, colorBlockStyle: typing.Optional[dict] = None, colorBlockPosition: typing.Optional[Literal['left', 'right']] = None, colorBlockClickEvent: typing.Optional['ColorBlockClickEvent'] = None, pureLegendLabelStyle: typing.Optional[dict] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'breakpoints', 'colors', 'controls', 'keyboard', 'min', 'max', 'step', 'precision', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'readOnly', 'pureLegend', 'inputNumberStyle', 'colorBlockStyle', 'colorBlockPosition', 'colorBlockClickEvent', 'pureLegendLabelStyle', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'breakpoints', 'colors', 'controls', 'keyboard', 'min', 'max', 'step', 'precision', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'readOnly', 'pureLegend', 'inputNumberStyle', 'colorBlockStyle', 'colorBlockPosition', 'colorBlockClickEvent', 'pureLegendLabelStyle', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} for k in ['breakpoints', 'colors']: if k not in args: raise TypeError('Required argument `' + k + '` was not specified.') super(AntdSegmentedColoring, self).__init__(**args) setattr(AntdSegmentedColoring, '__init__', _explicitize_args(AntdSegmentedColoring.__init__)) ================================================ FILE: feffery_antd_components/AntdSelect.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSelect(Component): """An AntdSelect component. 下拉选择组件AntdSelect Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果F. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - popupClassName (string; optional): 展开菜单css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - options (list of dicts; optional): 配置下拉选项. `options` is a list of string | number | dict with keys: - label (a list of or a singular dash component, string or number; required): 组件型,当前选项标签内容. - value (string Or number; required): 当前选项值. - disabled (boolean; optional): 是否禁用当前选项 默认值:`False`. - colors (list of strings; optional): 针对色带特殊渲染模式,设置生成渐变色带所需的色彩值数组. | dict with keys: - group (a list of or a singular dash component, string or number; optional): 组件型,当前分组标签内容. - options (list of dicts; optional): 配置当前分组内选项. `options` is a list of dicts with keys: - label (a list of or a singular dash component, string or number; required): 组件型,当前选项标签内容. - value (string | number; required): 当前选项值. - disabled (boolean; optional): 是否禁用当前选项 默认值:`False`. - colors (list of strings; optional): 针对色带特殊渲染模式,设置生成渐变色带所需的色彩值数组.s - listHeight (number; default 256): 下拉菜单最大像素高度. - colorsMode (a value equal to: 'sequential', 'diverging'; default 'sequential'): 色带特殊渲染模式下,设置渲染形式,可选项有`'sequential'`、`'diverging'`. - colorsNameWidth (number; default 40): 色带特殊渲染模式下,设置各选项名称部分像素宽度 默认值:`40`. - mode (a value equal to: 'multiple', 'tags'; optional): 选择模式,可选项有`'multiple'`(多选)、`'tags'`(自由新增). - disabled (boolean; optional): 是否禁用当前组件 默认值:`False`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - placeholder (string; optional): 输入框占位文字内容. - placement (a value equal to: 'bottomLeft', 'bottomRight', 'topLeft', 'topRight'; default 'bottomLeft'): 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` 默认值:`'bottomLeft'`. - value (string | number | list of string | numbers; optional): 监听或设置已选值. - defaultValue (string | number | list of string | numbers; optional): 初始化已选值. - maxTagCount (number | a value equal to: 'responsive'; default 5): 当`multiple=True`时,已选值展示的最大数量 默认值:`5`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - optionFilterProp (a value equal to: 'value', 'label'; default 'value'): 基于搜索框中输入内容进行搜索的目标字段,可选项有`'value'`、`'label'` 默认值:`'value'`. - searchValue (string; optional): 监听搜索框已输入内容. - optionFilterMode (a value equal to: 'case-insensitive', 'case-sensitive', 'regex', 'remote-match'; default 'case-insensitive'): 搜索匹配模式,可选项有`'case-insensitive'`(大小写不敏感)、`'case-sensitive'`(大小写敏感)、`'regex'`(正则表达式)、`'remote-match'`(远程匹配模式) 默认值:`'case-insensitive'`. - debounceSearchValue (string; optional): 以防抖延时的方式监听搜索框已输入内容. - debounceWait (number; default 0): 防抖延时时长,单位:毫秒 默认值:`0`. - autoSpin (boolean; default False): 是否在当前组件相关属性处理回调更新中状态时,以加载中状态进行渲染 默认值:`False`. - autoClearSearchValue (boolean; default True): 当`mode`为`'multiple'`或`'tags'`时,设置是否在选中项后自动清空搜索框中的内容 默认值:`True`. - emptyContent (a list of or a singular dash component, string or number; optional): 组件型,自定义空数据状态提示内容. - loadingEmptyContent (a list of or a singular dash component, string or number; optional): 组件型,自定义加载中状态下的空数据状态提示内容. - dropdownBefore (a list of or a singular dash component, string or number; optional): 组件型,选择菜单前缀内容. - dropdownAfter (a list of or a singular dash component, string or number; optional): 组件型,选择菜单后缀内容. - prefix (a list of or a singular dash component, string or number; optional): 组件型,前缀内嵌内容. - suffixIcon (a list of or a singular dash component, string or number; optional): 自定义选择框后缀图标内容. - allowClear (boolean; default True): 是否允许一键清空已选值 默认值:`True`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - popupMatchSelectWidth (boolean; default True): 选择菜单是否与选择框同宽,设置为`False`时将关闭虚拟滚动功能 默认值:`True`. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - maxCount (number; optional): `'multiple'`及 `'tags'`模式下有效,限制已选项数量上限. - showSearch (boolean; optional): 是否开启输入框可搜索功能. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = [ 'options[].label', 'options[].group', 'options[].options[].label', 'emptyContent', 'loadingEmptyContent', 'dropdownBefore', 'dropdownAfter', 'prefix', 'suffixIcon', ] _base_nodes = [ 'emptyContent', 'loadingEmptyContent', 'dropdownBefore', 'dropdownAfter', 'prefix', 'suffixIcon', 'children', ] _namespace = 'feffery_antd_components' _type = 'AntdSelect' Options = TypedDict( 'Options', { 'group': NotRequired[ComponentType], 'options': NotRequired[typing.Sequence['OptionsOptions']], }, ) OptionsOptions = TypedDict( 'OptionsOptions', { 'label': ComponentType, 'value': typing.Union[str, NumberType], 'disabled': NotRequired[bool], 'colors': NotRequired[typing.Sequence[str]], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, popupClassName: typing.Optional[str] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, options: typing.Optional[typing.Sequence[typing.Union[str, NumberType, 'Options']]] = None, listHeight: typing.Optional[NumberType] = None, colorsMode: typing.Optional[Literal['sequential', 'diverging']] = None, colorsNameWidth: typing.Optional[NumberType] = None, mode: typing.Optional[Literal['multiple', 'tags']] = None, disabled: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[str] = None, placement: typing.Optional[ Literal['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] ] = None, value: typing.Optional[ typing.Union[ typing.Union[str, NumberType], typing.Sequence[typing.Union[str, NumberType]] ] ] = None, defaultValue: typing.Optional[ typing.Union[ typing.Union[str, NumberType], typing.Sequence[typing.Union[str, NumberType]] ] ] = None, maxTagCount: typing.Optional[typing.Union[NumberType, Literal['responsive']]] = None, status: typing.Optional[Literal['error', 'warning']] = None, optionFilterProp: typing.Optional[Literal['value', 'label']] = None, searchValue: typing.Optional[str] = None, optionFilterMode: typing.Optional[ Literal['case-insensitive', 'case-sensitive', 'regex', 'remote-match'] ] = None, debounceSearchValue: typing.Optional[str] = None, debounceWait: typing.Optional[NumberType] = None, autoSpin: typing.Optional[bool] = None, autoClearSearchValue: typing.Optional[bool] = None, emptyContent: typing.Optional[ComponentType] = None, loadingEmptyContent: typing.Optional[ComponentType] = None, dropdownBefore: typing.Optional[ComponentType] = None, dropdownAfter: typing.Optional[ComponentType] = None, prefix: typing.Optional[ComponentType] = None, suffixIcon: typing.Optional[ComponentType] = None, allowClear: typing.Optional[bool] = None, autoFocus: typing.Optional[bool] = None, popupMatchSelectWidth: typing.Optional[bool] = None, readOnly: typing.Optional[bool] = None, maxCount: typing.Optional[NumberType] = None, showSearch: typing.Optional[bool] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'options', 'listHeight', 'colorsMode', 'colorsNameWidth', 'mode', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'maxTagCount', 'status', 'optionFilterProp', 'searchValue', 'optionFilterMode', 'debounceSearchValue', 'debounceWait', 'autoSpin', 'autoClearSearchValue', 'emptyContent', 'loadingEmptyContent', 'dropdownBefore', 'dropdownAfter', 'prefix', 'suffixIcon', 'allowClear', 'autoFocus', 'popupMatchSelectWidth', 'readOnly', 'maxCount', 'showSearch', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'options', 'listHeight', 'colorsMode', 'colorsNameWidth', 'mode', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'maxTagCount', 'status', 'optionFilterProp', 'searchValue', 'optionFilterMode', 'debounceSearchValue', 'debounceWait', 'autoSpin', 'autoClearSearchValue', 'emptyContent', 'loadingEmptyContent', 'dropdownBefore', 'dropdownAfter', 'prefix', 'suffixIcon', 'allowClear', 'autoFocus', 'popupMatchSelectWidth', 'readOnly', 'maxCount', 'showSearch', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdSelect, self).__init__(**args) setattr(AntdSelect, '__init__', _explicitize_args(AntdSelect.__init__)) ================================================ FILE: feffery_antd_components/AntdSider.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSider(Component): """An AntdSider component. 侧边栏组件AntdSider Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - collapsed (boolean; optional): 当前是否收起. - collapsedWidth (number; default 80): 收起后呈现的像素宽度,设置为0时会额外渲染特殊触发组件 默认值:`80`. - collapsible (boolean; default False): 是否可收起 默认值:`False`. - reverseArrow (boolean; default False): 是否翻转收起箭头的方向,通常在Sider位于右侧时使用 默认值:`False`. - theme (a value equal to: 'light', 'dark'; default 'dark'): 主题,可选项有`'light'`、`'dark'` 默认值:`'dark'`. - width (number | string; default 200): 侧边栏像素宽度 默认值:`200`. - trigger (a list of or a singular dash component, string or number; optional): 设置为`None`时不渲染自带的特殊触发组件. - breakpoint (a value equal to: 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'; optional): 侧边栏自动收起对应的响应式断点. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['trigger'] _base_nodes = ['trigger', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdSider' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, collapsed: typing.Optional[bool] = None, collapsedWidth: typing.Optional[NumberType] = None, collapsible: typing.Optional[bool] = None, reverseArrow: typing.Optional[bool] = None, theme: typing.Optional[Literal['light', 'dark']] = None, width: typing.Optional[typing.Union[NumberType, str]] = None, trigger: typing.Optional[ComponentType] = None, breakpoint: typing.Optional[Literal['xs', 'sm', 'md', 'lg', 'xl', 'xxl']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'collapsed', 'collapsedWidth', 'collapsible', 'reverseArrow', 'theme', 'width', 'trigger', 'breakpoint', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'collapsed', 'collapsedWidth', 'collapsible', 'reverseArrow', 'theme', 'width', 'trigger', 'breakpoint', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdSider, self).__init__(children=children, **args) setattr(AntdSider, '__init__', _explicitize_args(AntdSider.__init__)) ================================================ FILE: feffery_antd_components/AntdSkeleton.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSkeleton(Component): """An AntdSkeleton component. 骨架屏组件AntdSkeleton Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - loading (boolean; default False): 是否处于加载中状态. - active (boolean; default False): 是否显示动画 默认值:`False`. - delay (number; default 0): 加载动画渲染延时,单位:毫秒 默认值:`0`. - avatar (dict; default False): 配置头像占位图相关参数,设置为`False`时不显示 默认值:`True`. `avatar` is a boolean | dict with keys: - active (boolean; optional): 头像占位图是否显示动画 默认值:`False`. - shape (a value equal to: 'circle', 'square'; optional): 头像占位图形状,可选项有`'circle'`、`'square'`. - size (number | a value equal to: 'large', 'small', 'default'; optional): 头像占位图尺寸,传入数值型表示像素尺寸,也可传入预设的尺寸规格,可选项有`'large'`、`'small'`、`'default'` 默认值:`'default'`. - paragraph (dict; default True): 配置段落占位图相关参数,设置为`False`时不显示 默认值:`True`. `paragraph` is a boolean | dict with keys: - rows (number; optional): 段落占位图行数. - width (number | string | list of number | strings; optional): 段落占位图宽度,当传入*int*或*string*型时,用于设置段落占位图最后一行的宽度,当传入*list*型时,用于逐行设置宽度. - title (dict; default True): 是否显示标题占位图 默认值:`True`. `title` is a boolean | dict with keys: - width (number | string; optional): 标题占位图宽度. - round (boolean; default False): 段落、标题占位图是否渲染圆角 默认值:`False`. - debug (boolean; default False): 是否开启debug模式,开启后,每次动画加载都会在开发者工具的控制台打印相关`prop`信息 默认值:`False`. - listenPropsMode (a value equal to: 'default', 'exclude', 'include'; default 'default'): 监听模式,可选项有`'default'`、`'exclude'`、`'include'` 默认值:`'default'`. - excludeProps (list of strings; optional): `listenPropsMode='exclude'`时,设置需要排除监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]`. - includeProps (list of strings; optional): `listenPropsMode='include'`时,设置需要包含监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]`. - manual (boolean; default False): 是否开启手动控制模式,开启后是否处于加载状态将由`loading`参数控制,与内部元素参与的回调状态无关 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSkeleton' Avatar = TypedDict( 'Avatar', { 'active': NotRequired[bool], 'shape': NotRequired[Literal['circle', 'square']], 'size': NotRequired[typing.Union[NumberType, Literal['large', 'small', 'default']]], }, ) Paragraph = TypedDict( 'Paragraph', { 'rows': NotRequired[NumberType], 'width': NotRequired[ typing.Union[NumberType, str, typing.Sequence[typing.Union[NumberType, str]]] ], }, ) Title = TypedDict('Title', {'width': NotRequired[typing.Union[NumberType, str]]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, loading: typing.Optional[bool] = None, active: typing.Optional[bool] = None, delay: typing.Optional[NumberType] = None, avatar: typing.Optional[typing.Union[bool, 'Avatar']] = None, paragraph: typing.Optional[typing.Union[bool, 'Paragraph']] = None, title: typing.Optional[typing.Union[bool, 'Title']] = None, round: typing.Optional[bool] = None, debug: typing.Optional[bool] = None, listenPropsMode: typing.Optional[Literal['default', 'exclude', 'include']] = None, excludeProps: typing.Optional[typing.Sequence[str]] = None, includeProps: typing.Optional[typing.Sequence[str]] = None, manual: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'loading', 'active', 'delay', 'avatar', 'paragraph', 'title', 'round', 'debug', 'listenPropsMode', 'excludeProps', 'includeProps', 'manual', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'loading', 'active', 'delay', 'avatar', 'paragraph', 'title', 'round', 'debug', 'listenPropsMode', 'excludeProps', 'includeProps', 'manual', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdSkeleton, self).__init__(children=children, **args) setattr(AntdSkeleton, '__init__', _explicitize_args(AntdSkeleton.__init__)) ================================================ FILE: feffery_antd_components/AntdSkeletonAvatar.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSkeletonAvatar(Component): """An AntdSkeletonAvatar component. 骨骼屏头像占位图组件AntdSkeletonAvatar Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - active (boolean; default False): 是否显示动画 默认值:`False`. - shape (a value equal to: 'circle', 'square'; default 'circle'): 头像占位图形状,可选项有`'circle'`、`'square'` 默认值:`'circle'`. - size (number | a value equal to: 'large', 'small', 'default'; default 'default'): 头像占位图尺寸,传入数值型表示像素尺寸,也可传入预设的尺寸规格,可选项有`'large'`、`'small'`、`'default'` 默认值:`'default'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSkeletonAvatar' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, active: typing.Optional[bool] = None, shape: typing.Optional[Literal['circle', 'square']] = None, size: typing.Optional[ typing.Union[NumberType, Literal['large', 'small', 'default']] ] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'active', 'shape', 'size', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'active', 'shape', 'size', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdSkeletonAvatar, self).__init__(**args) setattr(AntdSkeletonAvatar, '__init__', _explicitize_args(AntdSkeletonAvatar.__init__)) ================================================ FILE: feffery_antd_components/AntdSkeletonButton.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSkeletonButton(Component): """An AntdSkeletonButton component. 骨骼屏按钮占位图组件AntdSkeletonButton Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - active (boolean; default False): 是否显示动画 默认值:`False`. - block (boolean; default False): 是否撑满父容器 默认值:`False`. - shape (a value equal to: 'circle', 'round', 'default'; default 'default'): 按钮占位图形状,可选项有`'circle'`、`'round'`、`'default'` 默认值:`'default'`. - size (a value equal to: 'large', 'small', 'default'; default 'default'): 按钮占位图尺寸,可选项有`'large'`、`'small'`、`'default'` 默认值:`'default'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSkeletonButton' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, active: typing.Optional[bool] = None, block: typing.Optional[bool] = None, shape: typing.Optional[Literal['circle', 'round', 'default']] = None, size: typing.Optional[Literal['large', 'small', 'default']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'active', 'block', 'shape', 'size', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'active', 'block', 'shape', 'size', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdSkeletonButton, self).__init__(**args) setattr(AntdSkeletonButton, '__init__', _explicitize_args(AntdSkeletonButton.__init__)) ================================================ FILE: feffery_antd_components/AntdSkeletonImage.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSkeletonImage(Component): """An AntdSkeletonImage component. 骨骼屏图片占位图组件AntdSkeletonImage Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSkeletonImage' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, **kwargs, ): self._prop_names = ['id', 'key', 'style', 'className', 'data-*', 'aria-*'] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = ['id', 'key', 'style', 'className', 'data-*', 'aria-*'] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdSkeletonImage, self).__init__(**args) setattr(AntdSkeletonImage, '__init__', _explicitize_args(AntdSkeletonImage.__init__)) ================================================ FILE: feffery_antd_components/AntdSkeletonInput.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSkeletonInput(Component): """An AntdSkeletonInput component. 骨骼屏输入框占位图组件AntdSkeletonInput Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - active (boolean; default False): 是否显示动画 默认值:`False`. - size (a value equal to: 'large', 'small', 'default'; default 'default'): 输入框占位图尺寸,可选项有`'large'`、`'small'`、`'default'` 默认值:`'default'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSkeletonInput' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, active: typing.Optional[bool] = None, size: typing.Optional[Literal['large', 'small', 'default']] = None, **kwargs, ): self._prop_names = ['id', 'key', 'style', 'className', 'active', 'size', 'data-*', 'aria-*'] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'active', 'size', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdSkeletonInput, self).__init__(**args) setattr(AntdSkeletonInput, '__init__', _explicitize_args(AntdSkeletonInput.__init__)) ================================================ FILE: feffery_antd_components/AntdSlider.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSlider(Component): """An AntdSlider component. 滑动输入条组件AntdSlider Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - root (dict; optional): 根元素css样式. - track (dict; optional): 范围选择下,点和点之间单个选取条css样式. - tracks (dict; optional): 范围选择下,整个范围选取条css样式. - rail (dict; optional): 背景条css样式. - handle (dict; optional): 抓取点元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - root (string; optional): 根元素css类名. - track (string; optional): 范围选择下,点和点之间单个选取条css类名. - tracks (string; optional): 范围选择下,整个范围选取条css类名. - rail (string; optional): 背景条css类名. - handle (string; optional): 抓取点元素css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - vertical (boolean; default False): 是否以垂直模式显示 默认值:`False`. - range (dict; default False): 是否以范围模式显示. `range` is a boolean | dict with keys: - editable (boolean; optional): 是否开启节点动态增减功能 默认值:`False`. - minCount (number; optional): 开启节点动态增减功能后,允许的最小节点数量 默认值:`0`. - maxCount (number; optional): 开启节点动态增减功能后,允许的最大节点数量. - min (number; default 0): 必填,可滑动范围下限. - max (number; default 100): 必填,可滑动范围上限. - step (number; default 1): 滑动步长. - marks (dict with strings as keys and values of type a list of or a singular dash component, string or number; optional): 为部分数值设置刻度信息. - tooltipVisible (boolean; optional): 滑动数值文字提示显示策略,`True`表示持续显示,`False`表示始终不显示. - tooltipPrefix (string; default ''): 滑动数值文字提示前缀信息. - tooltipSuffix (string; default ''): 滑动数值文字提示后缀信息. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - value (number | list of numbers; optional): 监听或设置已选值. - defaultValue (number | list of numbers; optional): 初始化已选值. - autoFocus (boolean; default False): 是否允许一键清空已选值 默认值:`True`. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - readOnly (boolean; default False): 是否渲染为只读状态 默认值:`False`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['marks{}'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSlider' Styles = TypedDict( 'Styles', { 'root': NotRequired[dict], 'track': NotRequired[dict], 'tracks': NotRequired[dict], 'rail': NotRequired[dict], 'handle': NotRequired[dict], }, ) ClassNames = TypedDict( 'ClassNames', { 'root': NotRequired[str], 'track': NotRequired[str], 'tracks': NotRequired[str], 'rail': NotRequired[str], 'handle': NotRequired[str], }, ) Range = TypedDict( 'Range', { 'editable': NotRequired[bool], 'minCount': NotRequired[NumberType], 'maxCount': NotRequired[NumberType], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, vertical: typing.Optional[bool] = None, range: typing.Optional[typing.Union[bool, 'Range']] = None, min: typing.Optional[NumberType] = None, max: typing.Optional[NumberType] = None, step: typing.Optional[NumberType] = None, marks: typing.Optional[typing.Dict[typing.Union[str, float, int], ComponentType]] = None, tooltipVisible: typing.Optional[bool] = None, tooltipPrefix: typing.Optional[str] = None, tooltipSuffix: typing.Optional[str] = None, disabled: typing.Optional[bool] = None, value: typing.Optional[typing.Union[NumberType, typing.Sequence[NumberType]]] = None, defaultValue: typing.Optional[typing.Union[NumberType, typing.Sequence[NumberType]]] = None, autoFocus: typing.Optional[bool] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, readOnly: typing.Optional[bool] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'styles', 'classNames', 'name', 'enableBatchControl', 'vertical', 'range', 'min', 'max', 'step', 'marks', 'tooltipVisible', 'tooltipPrefix', 'tooltipSuffix', 'disabled', 'value', 'defaultValue', 'autoFocus', 'popupContainer', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'styles', 'classNames', 'name', 'enableBatchControl', 'vertical', 'range', 'min', 'max', 'step', 'marks', 'tooltipVisible', 'tooltipPrefix', 'tooltipSuffix', 'disabled', 'value', 'defaultValue', 'autoFocus', 'popupContainer', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdSlider, self).__init__(**args) setattr(AntdSlider, '__init__', _explicitize_args(AntdSlider.__init__)) ================================================ FILE: feffery_antd_components/AntdSpace.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSpace(Component): """An AntdSpace component. 排列组件AntdSpace Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - item (dict; optional): 控制子项容器元素css样式. - classNames (dict; optional): 细分控制子元素css类. `classNames` is a dict with keys: - item (string; optional): 控制子项容器元素css类. - align (a value equal to: 'start', 'end', 'center', 'baseline'; optional): 对齐方式,可选项有`'start'`、`'end'`、`'center'`、`'baseline'`. - direction (a value equal to: 'vertical', 'horizontal'; default 'horizontal'): 排列方向,可选项有`'vertical'`、`'horizontal'` 默认值:`'horizontal'`. - size (a value equal to: 'small', 'middle', 'large' | number; default 'small'): 子元素间隔大小,可选项有`'small'`、`'middle'`、`'large'`,或直接设置数值型代表像素间隔 默认值:`'small'`. - addSplitLine (boolean; default False): 是否添加分隔线 默认值:`False`. - customSplit (a list of or a singular dash component, string or number; optional): 自定义分隔线元素. - wrap (boolean; default False): 子元素是否自动换行,仅`direction='horizontal'`时有效 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['customSplit'] _base_nodes = ['customSplit', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdSpace' Styles = TypedDict('Styles', {'item': NotRequired[dict]}) ClassNames = TypedDict('ClassNames', {'item': NotRequired[str]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, align: typing.Optional[Literal['start', 'end', 'center', 'baseline']] = None, direction: typing.Optional[Literal['vertical', 'horizontal']] = None, size: typing.Optional[typing.Union[Literal['small', 'middle', 'large'], NumberType]] = None, addSplitLine: typing.Optional[bool] = None, customSplit: typing.Optional[ComponentType] = None, wrap: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'align', 'direction', 'size', 'addSplitLine', 'customSplit', 'wrap', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'align', 'direction', 'size', 'addSplitLine', 'customSplit', 'wrap', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdSpace, self).__init__(children=children, **args) setattr(AntdSpace, '__init__', _explicitize_args(AntdSpace.__init__)) ================================================ FILE: feffery_antd_components/AntdSpin.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSpin(Component): """An AntdSpin component. 加载动画组件AntdSpin Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - wrapperClassName (string | dict; optional): 外层容器css类名. - spinning (boolean; default False): 是否处于加载中状态. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 默认加载状态图标的尺寸,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - delay (number; optional): 加载动画渲染延时,单位:毫秒 默认值:`0`. - text (string; optional): 加载动画提示文字. - fullscreen (boolean; default False): 是否开启全屏模式 默认值:`False`. - debug (boolean; default False): 是否开启debug模式,开启后,每次动画加载都会在开发者工具的控制台打印相关`prop`信息 默认值:`False`. - listenPropsMode (a value equal to: 'default', 'exclude', 'include'; default 'default'): 监听模式,可选项有`'default'`、`'exclude'`、`'include'` 默认值:`'default'`. - excludeProps (list of strings; optional): `listenPropsMode='exclude'`时,设置需要排除监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]`. - includeProps (list of strings; optional): `listenPropsMode='include'`时,设置需要包含监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]`. - indicator (a list of or a singular dash component, string or number; optional): 组件型,自定义加载状态图标. - manual (boolean; default False): 是否开启手动控制模式,开启后是否处于加载状态将由`spinning`参数控制,与内部元素参与的回调状态无关 默认值:`False`. - percent (number | a value equal to: 'auto'; optional): 控制加载中状态下的环状进度渲染形式,传入0到100之间数值型时表示实际进度,传入`'auto'`时会预估一个永远不会停止的进度. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['indicator'] _base_nodes = ['indicator', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdSpin' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, wrapperClassName: typing.Optional[typing.Union[str, dict]] = None, spinning: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, delay: typing.Optional[NumberType] = None, text: typing.Optional[str] = None, fullscreen: typing.Optional[bool] = None, debug: typing.Optional[bool] = None, listenPropsMode: typing.Optional[Literal['default', 'exclude', 'include']] = None, excludeProps: typing.Optional[typing.Sequence[str]] = None, includeProps: typing.Optional[typing.Sequence[str]] = None, indicator: typing.Optional[ComponentType] = None, manual: typing.Optional[bool] = None, percent: typing.Optional[typing.Union[NumberType, Literal['auto']]] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'wrapperClassName', 'spinning', 'size', 'delay', 'text', 'fullscreen', 'debug', 'listenPropsMode', 'excludeProps', 'includeProps', 'indicator', 'manual', 'percent', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'wrapperClassName', 'spinning', 'size', 'delay', 'text', 'fullscreen', 'debug', 'listenPropsMode', 'excludeProps', 'includeProps', 'indicator', 'manual', 'percent', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdSpin, self).__init__(children=children, **args) setattr(AntdSpin, '__init__', _explicitize_args(AntdSpin.__init__)) ================================================ FILE: feffery_antd_components/AntdSplitter.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSplitter(Component): """An AntdSplitter component. 分隔面板组件AntdSplitter Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - layout (a value equal to: 'horizontal', 'vertical'; default 'horizontal'): 布局方向,可选项有`'horizontal'`、`'vertical'` 默认值:`'horizontal'`. - items (list of dicts; required): 配置分隔面板子项. `items` is a list of dicts with keys: - key (string; optional): 当前子项唯一识别`key`. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - style (dict; optional): 当前子项`css`样式. - className (string; optional): 当前子项`css`类名. - defaultSize (number Or string; optional): 初始面板尺寸,支持数字`px`或者文字`'百分比%'`类型. - size (number | string; optional): 面板尺寸,支持数字`px`或者文字`'百分比%'`类型. - min (number | string; optional): 最小尺寸,支持数字`px`或者文字`'百分比%'`类型. - max (number | string; optional): 最大尺寸,支持数字`px`或者文字`'百分比%'`类型. - collapsible (dict; optional): 是否可折叠 默认值:`False`. `collapsible` is a boolean | dict with keys: - start (boolean; optional) - end (boolean; optional) - resizable (boolean; optional): 是否开启拖拽伸缩 默认值:`True`. - lazy (boolean; default False): 是否开启延迟渲染模式,开启后面板将在拖拽调整完成后才进行更新渲染 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['items[].children'] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSplitter' ItemsCollapsible = TypedDict( 'ItemsCollapsible', {'start': NotRequired[bool], 'end': NotRequired[bool]} ) Items = TypedDict( 'Items', { 'key': NotRequired[str], 'children': NotRequired[ComponentType], 'style': NotRequired[dict], 'className': NotRequired[str], 'defaultSize': NotRequired[typing.Union[NumberType, str]], 'size': NotRequired[typing.Union[NumberType, str]], 'min': NotRequired[typing.Union[NumberType, str]], 'max': NotRequired[typing.Union[NumberType, str]], 'collapsible': NotRequired[typing.Union[bool, 'ItemsCollapsible']], 'resizable': NotRequired[bool], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, layout: typing.Optional[Literal['horizontal', 'vertical']] = None, items: typing.Optional[typing.Sequence['Items']] = None, lazy: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'layout', 'items', 'lazy', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'layout', 'items', 'lazy', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} for k in ['items']: if k not in args: raise TypeError('Required argument `' + k + '` was not specified.') super(AntdSplitter, self).__init__(**args) setattr(AntdSplitter, '__init__', _explicitize_args(AntdSplitter.__init__)) ================================================ FILE: feffery_antd_components/AntdSpoiler.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSpoiler(Component): """An AntdSpoiler component. 展开收起组件AntdSpoiler Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - contentClassName (string | dict; optional): 内容区css类名,支持[动态css](/advanced-classname). - contentStyle (dict; optional): 内容区css样式. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - hideLabel (a list of or a singular dash component, string or number; optional): 组件型,展开状态下,收起按钮的文案内容. - showLabel (a list of or a singular dash component, string or number; optional): 组件型,收起状态下,展开按钮的文案内容. - labelPosition (a value equal to: 'left', 'right'; default 'left'): 展开/收起按钮的位置,可选项有`'left'`、`'right'` 默认值:`'left'`. - open (boolean; default False): 监听或设置是否处于展开状态 默认值:`False`. - maxHeight (number; default 50): 收起状态下,内容区域最大像素高度 默认值:`50`. - transitionDuration (number; default 0.1): 展开/收起过渡动画耗时,单位:秒 默认值:`0.1`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['hideLabel', 'showLabel'] _base_nodes = ['hideLabel', 'showLabel', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdSpoiler' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, contentClassName: typing.Optional[typing.Union[str, dict]] = None, contentStyle: typing.Optional[dict] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, hideLabel: typing.Optional[ComponentType] = None, showLabel: typing.Optional[ComponentType] = None, labelPosition: typing.Optional[Literal['left', 'right']] = None, open: typing.Optional[bool] = None, maxHeight: typing.Optional[NumberType] = None, transitionDuration: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'contentClassName', 'contentStyle', 'locale', 'hideLabel', 'showLabel', 'labelPosition', 'open', 'maxHeight', 'transitionDuration', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'contentClassName', 'contentStyle', 'locale', 'hideLabel', 'showLabel', 'labelPosition', 'open', 'maxHeight', 'transitionDuration', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdSpoiler, self).__init__(children=children, **args) setattr(AntdSpoiler, '__init__', _explicitize_args(AntdSpoiler.__init__)) ================================================ FILE: feffery_antd_components/AntdStatistic.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdStatistic(Component): """An AntdStatistic component. 统计数值组件AntdStatistic Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - value (number | string | a list of or a singular dash component, string or number; optional): 支持组件型,要展示的数值. - showGroupSeparator (boolean; default True): 是否为数值型`value`添加千分位符 默认值:`True`. - precision (number; optional): 针对数值型`value`,设置数值精度. - prefix (a list of or a singular dash component, string or number; optional): 组件型,数值前缀内容. - suffix (a list of or a singular dash component, string or number; optional): 组件型,数值后缀内容. - title (a list of or a singular dash component, string or number; optional): 组件型,标题内容. - titleTooltip (string; optional): 为标题内容添加额外鼠标悬停提示信息. - valueStyle (dict; optional): 数值内容css样式. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading.""" _children_props: typing.List[str] = ['value', 'prefix', 'suffix', 'title'] _base_nodes = ['value', 'prefix', 'suffix', 'title', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdStatistic' LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, value: typing.Optional[typing.Union[NumberType, str, ComponentType]] = None, showGroupSeparator: typing.Optional[bool] = None, precision: typing.Optional[NumberType] = None, prefix: typing.Optional[ComponentType] = None, suffix: typing.Optional[ComponentType] = None, title: typing.Optional[ComponentType] = None, titleTooltip: typing.Optional[str] = None, valueStyle: typing.Optional[dict] = None, loading_state: typing.Optional['LoadingState'] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'value', 'showGroupSeparator', 'precision', 'prefix', 'suffix', 'title', 'titleTooltip', 'valueStyle', 'data-*', 'aria-*', 'loading_state', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'value', 'showGroupSeparator', 'precision', 'prefix', 'suffix', 'title', 'titleTooltip', 'valueStyle', 'data-*', 'aria-*', 'loading_state', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdStatistic, self).__init__(**args) setattr(AntdStatistic, '__init__', _explicitize_args(AntdStatistic.__init__)) ================================================ FILE: feffery_antd_components/AntdSteps.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSteps(Component): """An AntdSteps component. 步骤条组件AntdSteps Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - steps (list of dicts; required): 必填,步骤内容定义数据结构. `steps` is a list of dicts with keys: - title (a list of or a singular dash component, string or number; required): 步骤标题. - subTitle (a list of or a singular dash component, string or number; optional): 步骤子标题. - description (a list of or a singular dash component, string or number; optional): 步骤描述内容. - icon (a list of or a singular dash component, string or number; optional): 步骤自定义图标. - disabled (boolean; optional): 是否禁用当前步骤. - status (a value equal to: 'wait', 'process', 'finish', 'error'; optional): 强制设置当前步骤状态,同参数status. - current (number; default 0): 当前所处的步骤序号 默认值:`0`. - direction (a value equal to: 'horizontal', 'vertical'; default 'horizontal'): 步骤条显示方向,可选项有`'horizontal'`、`'vertical'` 默认值:`'horizontal'`. - labelPlacement (a value equal to: 'horizontal', 'vertical'; optional): 标签内容显示方位,可选项有`'horizontal'`、`'vertical'`. - progressDot (boolean; default False): 是否渲染为点状步骤条 默认值:`False`. - size (a value equal to: 'default', 'small'; default 'default'): 步骤条尺寸规格,可选项有`'default'`、`'small'` 默认值:`'default'`. - status (a value equal to: 'wait', 'process', 'finish', 'error'; default 'process'): 步骤条状态,可选项有`'wait'`、`'process'`、`'finish'`、`'error'` 默认值:`'process'`. - type (a value equal to: 'default', 'navigation', 'inline'; default 'default'): 步骤条类型,可选项有`'default'`、`'navigation'`、`'inline'` 默认值:`'default'`. - allowClick (boolean; default False): 是否可点击切换步骤 默认值:`False`. - responsive (boolean; default True): 是否在页面宽度小于532px时自动强制垂直显示 默认值:`True`. - percent (number; optional): 当前步骤进度,取值应在0到100之间,适用于常规步骤条. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [ 'steps[].title', 'steps[].subTitle', 'steps[].description', 'steps[].icon', ] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdSteps' Steps = TypedDict( 'Steps', { 'title': ComponentType, 'subTitle': NotRequired[ComponentType], 'description': NotRequired[ComponentType], 'icon': NotRequired[ComponentType], 'disabled': NotRequired[bool], 'status': NotRequired[Literal['wait', 'process', 'finish', 'error']], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, steps: typing.Optional[typing.Sequence['Steps']] = None, current: typing.Optional[NumberType] = None, direction: typing.Optional[Literal['horizontal', 'vertical']] = None, labelPlacement: typing.Optional[Literal['horizontal', 'vertical']] = None, progressDot: typing.Optional[bool] = None, size: typing.Optional[Literal['default', 'small']] = None, status: typing.Optional[Literal['wait', 'process', 'finish', 'error']] = None, type: typing.Optional[Literal['default', 'navigation', 'inline']] = None, allowClick: typing.Optional[bool] = None, responsive: typing.Optional[bool] = None, percent: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'steps', 'current', 'direction', 'labelPlacement', 'progressDot', 'size', 'status', 'type', 'allowClick', 'responsive', 'percent', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'steps', 'current', 'direction', 'labelPlacement', 'progressDot', 'size', 'status', 'type', 'allowClick', 'responsive', 'percent', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} for k in ['steps']: if k not in args: raise TypeError('Required argument `' + k + '` was not specified.') super(AntdSteps, self).__init__(**args) setattr(AntdSteps, '__init__', _explicitize_args(AntdSteps.__init__)) ================================================ FILE: feffery_antd_components/AntdSwitch.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdSwitch(Component): """An AntdSwitch component. 开关组件AntdSwitch Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - checked (boolean; optional): 监听或设置当前开关是否打开. - checkedChildren (a list of or a singular dash component, string or number; optional): 组件型,打开状态下内嵌内容. - unCheckedChildren (a list of or a singular dash component, string or number; optional): 组件型,关闭状态下内嵌内容. - size (a value equal to: 'default', 'small'; default 'default'): 当前组件尺寸规格,可选项有`'small'`、`'middle'` 默认值:`'default'`. - loading (boolean; default False): 是否渲染加载中状态 默认值:`False`. - readOnly (boolean; default False): 是否渲染为只读状态 默认值:`False`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'checked's; optional): 开启属性持久化功能的若干属性名,可选项有`'checked'` 默认值:`['checked']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['checkedChildren', 'unCheckedChildren'] _base_nodes = ['checkedChildren', 'unCheckedChildren', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdSwitch' LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, autoFocus: typing.Optional[bool] = None, checked: typing.Optional[bool] = None, checkedChildren: typing.Optional[ComponentType] = None, unCheckedChildren: typing.Optional[ComponentType] = None, size: typing.Optional[Literal['default', 'small']] = None, loading: typing.Optional[bool] = None, readOnly: typing.Optional[bool] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, loading_state: typing.Optional['LoadingState'] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['checked']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'disabled', 'autoFocus', 'checked', 'checkedChildren', 'unCheckedChildren', 'size', 'loading', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'disabled', 'autoFocus', 'checked', 'checkedChildren', 'unCheckedChildren', 'size', 'loading', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdSwitch, self).__init__(**args) setattr(AntdSwitch, '__init__', _explicitize_args(AntdSwitch.__init__)) ================================================ FILE: feffery_antd_components/AntdTable.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTable(Component): """An AntdTable component. 表格组件AntdTable Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string; optional): 当前组件css类名. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - containerId (string; optional): 当表格渲染在具有滚动条的局部容器中时,指定该容器id,可避免出现部分表格内部展开层随滚动条滚动显示异常的问题. - columns (list of dicts; optional): 配置字段定义相关参数. `columns` is a list of dicts with keys: - title (a list of or a singular dash component, string or number; required): 必填,当前字段标题. - dataIndex (string; required): 必填,当前字段唯一识别id. - group (string | list of strings; optional): 当前字段所属分组信息,用于渲染多级表头. - renderOptions (dict; optional): 配置字段[再渲染模式](/AntdTable-rerender)相关参数. `renderOptions` is a dict with keys: - renderType (a value equal to: 'link', 'ellipsis', 'copyable', 'ellipsis-copyable', 'tags', 'status-badge', 'image', 'custom-format', 'corner-mark', 'row-merge', 'dropdown', 'dropdown-links', 'image-avatar', 'mini-line', 'mini-bar', 'mini-progress', 'mini-ring-progress', 'mini-area', 'button', 'checkbox', 'switch', 'select'; optional): 再渲染类型,可选项有`'link'`、`'ellipsis'`、`'copyable'`、`'ellipsis-copyable'`、`'tags'`、`'status-badge'`、`'image'` 、`'custom-format'`、`'corner-mark'`、`'row-merge'`、`'dropdown'`、`'dropdown-links'`、`'image-avatar'` 、`'mini-line'`、`'mini-bar'`、`'mini-progress'`、`'mini-ring-progress'`、`'mini-area'` 、`'button'`、`'checkbox'`、`'switch'`、`'select'`. - renderLinkText (string; optional): 当`renderType='link'`时,统一设置渲染链接文本内容. - likeDccLink (boolean; optional): 当`renderType`为`'link'`、`'button'`时,统一设置链接跳转行为是否采用`dcc.Link`模式 默认值:`False`. - renderButtonSplit (boolean; optional): 当`renderType='button'`时,控制多个按钮之间是否添加分割线. - renderButtonPopConfirmProps (dict; optional): 当`renderType='button'`时,配置气泡确认框相关参数. `renderButtonPopConfirmProps` is a dict with keys: - title (string; optional): 气泡确认框标题. - okText (string; optional): 气泡确认框确认按钮文案. - cancelText (string; optional): 气泡确认框取消按钮文案. - miniChartColor (string; optional): 当`renderType`为`'mini-line'`、`'mini-area'`、`'mini-bar'`时,设置图表颜色. - tooltipCustomContent (string; optional): 当`renderType`为`'mini-line'`、`'mini-area'`、`'mini-bar'`时,设置用于渲染信息卡片的`javascript`函数字符串. - progressOneHundredPercentColor (string; optional): 当`renderType`为`'mini-progress'`、`'mini-ring-progress'`时,设置进度完成状态下的填充色. - progressShowPercent (boolean; optional): 当`renderType`为`'mini-progress'`时,设置进度条是否附带进度数值信息 默认值:`False`. - progressPercentPrecision (number; optional): 当`renderType`为`'mini-progress'`时,设置进度条附带进度数值信息的小数位数,默认保持原始数值的精度. - progressPercentPosition (dict; optional): 当`renderType`为`'mini-progress'`时,设置进度条附带进度数值信息显示的位置. `progressPercentPosition` is a dict with keys: - align (a value equal to: 'start', 'center', 'end'; optional): 对齐方式,可选项有`'start'`、`'center'`、`'end'`. - type (a value equal to: 'inner', 'outer'; optional): 内外位置,可选项有`'inner'`、`'outer'`. - progressStrokeLinecap (a value equal to: 'square', 'round'; optional): 当`renderType`为`'mini-progress'`时,设置进度条形状类型,可选项有`'square'`、`'round'` 默认值:`'square'`. - progressSize (number; optional): 当`renderType`为`'mini-progress'`时,设置进度条像素尺寸. - progressColor (dict; optional): 当`renderType`为`'mini-progress'`时,设置进度条主体部分颜色,支持通过字段`'from'`、`'to'`配置渐变色. `progressColor` is a string Or dict with keys: - from (string; optional): 渐变色起始颜色. - to (string; optional): 渐变色结束颜色. - ringProgressFontSize (number; optional): 当`renderType='mini-ring-progress'`时,设置进度数值像素大小. - dropdownProps (dict; optional): 当`renderType`为`'dropdown'`、`'dropdown-links'`时,配置下拉菜单相关参数. `dropdownProps` is a dict with keys: - title (string; optional): 下拉菜单锚点标题内容. - arrow (boolean; optional): 下拉菜单是否显示指示箭头 默认值:`False`. - disabled (boolean; optional): 是否整体禁用下拉菜单功能,优先级低于各记录值内部参数. - overlayClassName (string; optional): 下拉菜单容器css类名. - overlayStyle (dict; optional): 下拉菜单容器css样式. - placement (a value equal to: 'bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight'; optional): 下拉菜单展开方向,可选项有`'bottomLeft'`、`'bottomCenter'`、`'bottomRight'`、`'topLeft'`、`'topCenter'`、`'topRight'`. - fixed (a value equal to: 'left', 'right' | boolean; optional): 当前字段冻结方向,可选项有`'left'`、`'right'`,设置为`True`时等价于`'left'`. - editable (boolean; optional): 当前字段是否可编辑 默认值:`False`. - editOptions (dict; optional): 配置可编辑模式下输入框相关参数. `editOptions` is a dict with keys: - mode (a value equal to: 'default', 'text-area'; optional): 编辑框模式,可选项有`'default'`、`'text-area'` 默认值:`'default'`. - autoSize (dict; optional): 当`mode='textarea'`时,配置文本框自适应高度相关功能,同`AntdInput` 默认值:`False`. `autoSize` is a boolean Or dict with keys: - minRows (number; optional) - maxRows (number; optional) - maxLength (number; optional): 限制当前字段可编辑模式下,输入框内最多可输入的字符数量,默认无限制. - placeholder (string; optional): 输入框无输入值时的占位提示信息. - disabledKeys (list of strings; optional): 当前字段下需进行输入框禁用的行记录`key`值列表. - align (a value equal to: 'left', 'center', 'right'; optional): 当前字段对齐方式,可选项有`'left'`、`'center'`、`'right'` 默认值:`'center'`. - headerAlign (a value equal to: 'left', 'center', 'right'; optional): 当前表头对齐方式,默认跟随当前字段对齐方式,可选项有`'left'`、`'center'`、`'right'` 默认值:`'center'`. - width (number | string; optional): 当前字段宽度. - minWidth (number | string; optional): 控制当前字段最小宽度,仅当`tableLayout=\"auto\"`时有效. - hidden (boolean; optional): 是否隐藏当前字段 默认值:`False`. - className (string; optional): 当前字段css类名. - defaultSortOrder (a value equal to: 'ascend', 'descend'; optional): 当前字段初始化时的默认排序状态,可选项有`'ascend'`、`'descend'`. - filterResetToDefaultFilteredValue (boolean; optional): 若当前字段通过参数`defaultFilteredValues`设置了初始化默认选中的筛选值,用于设置是否在用户点击重置按钮后恢复默认选中筛选项 默认值:`False`. - showHeader (boolean; default True): 是否显示表头 默认值:`True`. - rowHoverable (boolean; default True): 表格行是否开启鼠标悬停样式效果 默认值:`True`. - tableLayout (a value equal to: 'auto', 'fixed'; optional): 当`columns`中各字段未设置`width`时,用于控制整体字段宽度分配方式,可选项有`'auto'`、`'fixed'`. - data (list of dicts; optional): 定义表格数据源,与`columns`对应. `data` is a list of dicts with strings as keys and values of type list of boolean | number | string | dict | lists | a list of or a singular dash component, string or number | string | number | boolean | dict with keys: - content (string; optional): 适用于`'link'`模式,链接显示的文字内容,优先级高于字段配置信息中的`renderLinkText`参数. - href (string; optional): 适用于`'link'`模式,链接地址. - target (string; optional): 适用于`'link'`模式,链接跳转行为 默认值:`'_blank'`. - disabled (boolean; optional): 适用于`'link'`模式,是否禁用当前链接 默认值:`False`. Or list of numbers | dict with keys: - color (string; optional): 适用于`'tags'`模式,标签颜色. - tag (string | number; optional): 适用于`'tags'`模式,标签内容. - tooltip (dict; optional): 适用于`'tags'`模式,为当前标签添加额外的文字提示功能. `tooltip` is a dict with keys: - title (string; optional): 文字提示内容. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'; optional): 文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` 默认值:`'top'`. | list of dicts with keys: - color (string; optional): 适用于`'tags'`模式,当前标签颜色. - tag (string | number; optional): 适用于`'tags'`模式,当前标签内容. - tooltip (dict; optional): 适用于`'tags'`模式,为当前标签添加额外的文字提示功能. `tooltip` is a dict with keys: - title (string; optional): 文字提示内容. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'; optional): 文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` 默认值:`'top'`. | dict with keys: - disabled (boolean; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - type (a value equal to: 'primary', 'ghost', 'dashed', 'link', 'text', 'default'; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - color (a value equal to: 'default', 'primary', 'danger', 'blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold'; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - variant (a value equal to: 'outlined', 'dashed', 'solid', 'filled', 'text', 'link'; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - danger (boolean; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - style (dict; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - content (string; optional): 适用于`'button'`模式,按钮内容. - href (string; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - target (string; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - popConfirmProps (dict; optional): 适用于`'button'`模式,用于为当前按钮配置气泡确认框相关参数,优先级更高. `popConfirmProps` is a dict with keys: - title (string; optional): 气泡确认框标题. - okText (string; optional): 气泡确认框确认按钮文案. - cancelText (string; optional): 气泡确认框取消按钮文案. - icon (string; optional): 适用于`'button'`模式,按钮前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; optional): 适用于`'button'`模式,按钮前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'`. - tooltip (dict; optional): 适用于`'button'`模式,为当前按钮添加额外的文字提示功能. `tooltip` is a dict with keys: - title (string; optional): 文字提示内容. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'; optional): 文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` 默认值:`'top'`. - custom (boolean | number | string | dict | list; optional): 适用于`'button'`模式,额外补充信息. | list of dicts with keys: - disabled (boolean; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - type (a value equal to: 'primary', 'ghost', 'dashed', 'link', 'text', 'default'; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - danger (boolean; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - style (dict; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - content (string; optional): 适用于`'button'`模式,按钮内容. - href (string; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - target (string; optional): 适用于`'button'`模式,同`AntdButton`中的同名参数. - icon (string; optional): 适用于`'button'`模式,当前按钮前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; optional): 适用于`'button'`模式,当前按钮前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'`. - custom (boolean | number | string | dict | list; optional): 适用于`'button'`模式,额外补充信息. | dict with keys: - status (a value equal to: 'success', 'processing', 'default', 'error', 'warning'; optional): 适用于`'status-badge'`模式,状态徽标状态,可选项有`'success'`、`'processing'`、`'default'`、`'error'`、`'warning'`. - text (string | number; optional): 适用于`'status-badge'`模式,状态徽标标签内容. | dict with keys: - src (string; optional): 适用于`'image'`模式,图片资源地址. - height (string | number; optional): 适用于`'image'`模式,图片高度. - preview (boolean; optional): 适用于`'image'`模式,图片是否可交互预览 默认值:`True`. | dict with keys: - placement (a value equal to: 'top-left', 'top-right', 'bottom-left', 'bottom-right'; optional): 适用于`'corner-mark'`模式,角标显示方位,可选项有`'top-left'`、`'top-right'`、`'bottom-left'`、`'bottom-right'`. - color (string; optional): 适用于`'corner-mark'`模式,角标颜色 默认值:`'#1890ff'`. - content (number | string; optional): 适用于`'corner-mark'`模式,单元格数值内容. - offsetX (number; optional): 适用于`'corner-mark'`模式,角标水平方向像素偏移量. - offsetY (number; optional): 适用于`'corner-mark'`模式,角标竖直方向像素偏移量. - hide (boolean; optional): 适用于`'corner-mark'`模式,是否隐藏当前角标 默认值:`False`. | dict with keys: - checked (boolean; optional): 适用于`'checkbox'`模式,当前勾选框状态. - disabled (boolean; optional): 适用于`'checkbox'`模式,是否禁用当前勾选框. - label (string; optional): 适用于`'checkbox'`模式,当前勾选框标签内容. - custom (boolean | number | string | dict | list; optional): 适用于`'checkbox'`模式,额外补充信息. | dict with keys: - checked (boolean; optional): 适用于`'switch'`模式,当前开关状态. - disabled (boolean; optional): 适用于`'switch'`模式,是否禁用当前开关. - checkedChildren (string; optional): 适用于`'switch'`模式,“开”状态标签内容. - unCheckedChildren (string; optional): 适用于`'switch'`模式,“关”状态标签内容. - custom (boolean | number | string | dict | list; optional): 适用于`'switch'`模式,额外补充信息. | dict with keys: - content (number | string; optional): 适用于`'row-merge'`模式,单元格数值内容. - rowSpan (number; optional): 适用于`'row-merge'`模式,从当前单元格开始,向后合并的其他单元格数量. | list of dicts with keys: - title (string; optional): 适用于`'dropdown'`模式,当前下拉菜单项锚点内容. - disabled (boolean; optional): 适用于`'dropdown'`模式,是否禁用当前下拉菜单项. - icon (string; optional): 适用于`'dropdown'`模式,当前按钮前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; optional): 适用于`'dropdown'`模式,当前按钮前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'`. - custom (boolean | number | string | dict | list; optional): 适用于`'dropdown'`模式,额外补充信息. - isDivider (boolean; optional): 适用于`'dropdown'`模式,当前项是否渲染为分割线 默认值:`False`. | list of dicts with keys: - title (string; optional): 适用于`'dropdown-links'`模式,当前下拉菜单项锚点内容. - href (string; optional): 适用于`'dropdown-links'`模式,当前下拉菜单项链接地址. - disabled (boolean; optional): 适用于`'dropdown-links'`模式,是否禁用当前下拉菜单项. - icon (string; optional): 适用于`'dropdown-links'`模式,当前按钮前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; optional): 适用于`'dropdown-links'`模式,当前按钮前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'`. - isDivider (boolean; optional): 适用于`'dropdown-links'`模式,当前项是否渲染为分割线 默认值:`False`. | dict with keys: - src (string; optional): 适用于`'image-avatar'`模式,头像图片资源链接. - size (dict; optional): 适用于`'image-avatar'`模式,头像尺寸规格,传入数值型时表示像素大小,传入字符型时可使用内置尺寸规格,可选项有`'small'`、`'default'`、`'large'`,支持响应式 默认值:`'default'`. `size` is a number | a value equal to: 'large', 'small', 'default' | dict with keys: - xs (number; optional) - sm (number; optional) - md (number; optional) - lg (number; optional) - xl (number; optional) - xxl (number; optional) - shape (a value equal to: 'circle', 'square'; optional): 适用于`'image-avatar'`模式,头像形状,可选项有`'circle'`、`'square'` 默认值:`'circle'`. | dict with keys: - className (string; optional): 适用于`'select'`模式,下拉选择css类名. - style (dict; optional): 适用于`'select'`模式,下拉选择css样式,其中`width`默认为`'100%'`. - options (list of dicts; optional): 适用于`'select'`模式,定义下拉选择选项. `options` is a list of dicts with keys: - label (string; optional): 当前选项标题. - value (string | number; optional): 当前选项值. - listHeight (number; optional): 适用于`'select'`模式,下拉选择菜单像素高度 默认值:`256`. - mode (a value equal to: 'multiple', 'tags'; optional): 适用于`'select'`模式,选择模式,可选项有`'multiple'`、`'tags'`,默认为单选模式. - disabled (boolean; optional): 适用于`'select'`模式,是否禁用当前下拉选择. - size (a value equal to: 'small', 'middle', 'large'; optional): 适用于`'select'`模式,下拉选择尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; optional): 适用于`'select'`模式,是否渲染边框 默认值:`True`. - placeholder (string; optional): 适用于`'select'`模式,选择框占位内容. - placement (a value equal to: 'bottomLeft', 'bottomRight', 'topLeft', 'topRight'; optional): 适用于`'select'`模式,下拉菜单展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` 默认值:`'bottomLeft'`. - value (string | number | list of string | numbers; optional): 适用于`'select'`模式,下拉选择已选中值. - maxTagCount (number | a value equal to: 'responsive'; optional): 适用于`'select'`模式,最多显示的已选中选项数量,超出部分将会自动省略 默认值:`5`. - optionFilterProp (a value equal to: 'value', 'label'; optional): 适用于`'select'`模式,选择框内搜索对应的目标字段,可选项有`'value'`、`'label'` 默认值:`'value'`. - allowClear (boolean; optional): 适用于`'select'`模式,是否允许快捷清空已选项 默认值:`True`. - showSearch (boolean; optional): 适用于`'select'`模式,是否开启输入框可搜索功能. | dict - bordered (boolean; default False): 是否渲染框线 默认值:`False`. - maxHeight (number | string; optional): 表格最大像素高度,当实际表格高度超出限制时,会自动渲染竖直滚动条. - maxWidth (number | string | boolean; optional): 表格最大宽度,当实际表格宽度超出限制时,会自动渲染水平滚动条. - scrollToFirstRowOnChange (boolean; default True): 当分页、排序、筛选操作触发表格变化后,是否滚动到表格顶部 默认值:`True`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 表格单元格尺寸规格,可选项有`'small'`、`'middle'`、`'large'`. - rowSelectionType (a value equal to: 'checkbox', 'radio'; optional): 行选择模式,可选项有`'checkbox'`(多选)、`'radio'`(单选),默认不开启行选择功能. - selectedRowKeys (list of string | numbers; optional): 监听已选行对应`key`值. - selectedRows (list; optional): 监听已选行记录. - rowSelectionWidth (string | number; default 32): 行选择控件所在列宽度 默认值:`32`. - rowSelectionCheckStrictly (boolean; optional): 针对嵌套行,各行与其所嵌套的内部行之间的行选择行为是否互相独立 默认值:`True`. - rowSelectionIgnoreRowKeys (list of string | numbers; optional): 指定不可被选中的行对应`key`值. - selectedRowsSyncWithData (boolean; default False): 当表格数据源`data`更新时,是否根据当前有效的`selectedRowKeys`参数对`selectedRows`中的数据进行同步更新 默认值:`False`. - sticky (dict; default False): 配置粘性表头相关功能 默认值:`False`. `sticky` is a boolean | dict with keys: - belowSelector (string | list of strings; optional): 粘性表头附着目标元素对应的选择器规则字符串,设置后,粘性表头激活后将附着在目标元素下方. - offsetHeader (number; optional): 粘性表头竖直方向上的像素偏移量. - offsetScroll (number; optional): 粘性表头底部横向滚动条竖直方向上的像素偏移量. - enableHoverListen (boolean; default False): 是否启用行鼠标移入/移出事件监听,开启后可能会影响到部分其他功能,请根据实际情况进行使用 默认值:`False`. - recentlyMouseEnterColumnDataIndex (string; optional): 当`enableHoverListen=True`时,监听最近一次鼠标移入的字段对应`dataIndex`信息. - recentlyMouseEnterRowKey (string | number; optional): 当`enableHoverListen=True`时,监听最近一次鼠标移入的行对应`key`信息. - recentlyMouseEnterRow (dict; optional): 当`enableHoverListen=True`时,监听最近一次鼠标移入的行数据信息. - titlePopoverInfo (dict; optional): 配置各字段标题额外气泡说明卡片信息相关参数. `titlePopoverInfo` is a dict with strings as keys and values of type dict with keys: - title (string; optional): 气泡卡片标题,支持字符串或组件型. - content (string; optional): 气泡卡片内容,支持字符串或组件型. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom'; optional): 气泡卡片弹出方位,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` 默认值:`'bottom'`. - overlayStyle (dict; optional): 气泡卡片展开层css样式. - columnsFormatConstraint (dict; optional): 针对开启了可编辑模式的字段,配置基于正则表达式的输入内容格式校验约束规则. `columnsFormatConstraint` is a dict with strings as keys and values of type dict with keys: - rule (string; optional): 正则表达式,用于校验输入内容是否符合格式要求. - content (string; optional): 用户输入内容校验失败时的提示说明信息. - sortOptions (dict; optional): 配置表格字段排序相关功能. `sortOptions` is a dict with keys: - sortDataIndexes (list of strings; optional): 参与排序的若干字段`dataIndex`数组,多字段组合排序时,数组顺序即为组合排序优先级顺序,由高到低. - multiple (boolean | a value equal to: 'auto'; optional): 是否启用多字段组合排序,当设置为`'auto'`时表示自动组合排序,此时组合排序的字段优先级顺序与用户依次点击排序字段的顺序对应 默认值:`False``. - forceCompareModes (dict with strings as keys and values of type a value equal to: 'number', 'custom'; optional): 为各字段指定排序比较模式,可选项有`'number'`(强制数值型排序)、`'custom'`(自定义排序). - customOrders (dict with strings as keys and values of type list; optional): 当`forceCompareModes`为`'custom'`时,用于为相应字段设置自定义排序对应的元素顺序. - showSorterTooltip (boolean; default True): 针对可排序字段是否在鼠标移入表头后展示额外信息提示 默认值:`True`. - showSorterTooltipTarget (a value equal to: 'full-header', 'sorter-icon'; default 'full-header'): 控制可排序字段表头额外信息提示的鼠标移入触发目标,可选项有`'full-header'`、`'sorter-icon'` 默认值:`'full-header'`. - filterOptions (dict; optional): 配置表格字段筛选相关功能. `filterOptions` is a dict with strings as keys and values of type dict with keys: - filterMode (a value equal to: 'checkbox', 'keyword', 'tree'; optional): 筛选模式,可选项有`'checkbox'`、`'keyword'`、`'tree'`,其中`'tree'`模式需要依赖相应的`'filterCustomTreeItems'`参数进行自定义树形菜单结构的构造 默认值:`'checkbox'`. - filterCustomItems (list | boolean | number | string | dict | list; optional): `filterMode`为`'checkbox'`时,用于自定义筛选菜单项. - filterCustomTreeItems (list of dicts; optional): `filterMode`为`'tree'`时,用于构造自定义树形菜单结构. - filterMultiple (boolean; optional): `filterMode`为`'checkbox'`时,是否开启多选模式 默认值:`True`. - filterSearch (boolean; optional): `filterMode`为`'checkbox'`时,是否开启搜索框 默认值:`False`. - defaultFilteredValues (dict with strings as keys and values of type list; optional): 字段筛选相关字段默认选中的筛选值. - pagination (dict; optional): 配置表格翻页相关功能,设置为`False`时将关闭分页相关功能. `pagination` is a dict with keys: - position (a value equal to: 'topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight'; optional): 分页组件渲染方位,可选项有`'topLeft'`、`'topCenter'`、`'topRight'`、`'bottomLeft'`、`'bottomCenter'`、`'bottomRight'` 默认值:`'bottomRight'`. - pageSize (number; optional): 监听或设置每页允许显示的最大行记录数量. - current (number; optional): 监听或设置当前页码. - showSizeChanger (boolean; optional): 是否显示`pageSize`切换控件,当表格总记录数量大于50时默认为`True`. - pageSizeOptions (list of numbers; optional): `pageSize`切换控件的可选项. - showTitle (boolean; optional): 各页码在鼠标移入时,是否显示浏览器原生提示信息 默认值:`True`. - showQuickJumper (boolean; optional): 是否渲染快捷跳页控件 默认值:`False`. - showTotalPrefix (string; optional): 总记录描述文案前缀文字. - showTotalSuffix (string; optional): 总记录描述文案后缀文字. - hideOnSinglePage (boolean; optional): 是否在数据行数量不足一页时,自动隐藏分页相关控件 默认值:`False`. - simple (boolean; optional): 是否开启简洁模式 默认值:`False`. - disabled (boolean; optional): 是否禁用分页相关控件 默认值:`False`. - size (a value equal to: 'default', 'small'; optional): 分页控件尺寸规格,可选项有`'small'`、`'default'` 默认值:`'default'`. - total (number; optional): 手动设置总记录数量,通常配合[服务端数据加载模式](/AntdTable-server-side-mode)使用. - showLessItems (boolean; optional): 是否优先展示较少的跳页项 默认值:`False`. | boolean - currentData (list; optional): 监听经过编辑修改操作后,最新状态下的表格数据源. - recentlyChangedRow (dict; optional): 监听最近一次编辑修改操作,对应的被修改行记录数据. - recentlyChangedColumn (string; optional): 监听最近一次编辑修改操作,对应的被修改字段`dataIndex`信息. - sorter (dict; optional): 监听排序操作相关行为参数. `sorter` is a dict with keys: - columns (list of strings; optional): 监听排序涉及的字段`dataIndex`信息. - orders (list of a value equal to: 'ascend', 'descend's; optional): 监听排序涉及的字段对应排序方式,其中`'ascend'`表示升序,`'descend'`表示降序. - filter (dict; optional): 监听筛选操作相关行为参数. - mode (a value equal to: 'client-side', 'server-side'; default 'client-side'): 表格数据加载控制方式,可选项有`'client-side'`(客户端加载)、`'server-side'`(服务端),其中服务端模式适用于大量数据展示需求,具体请参考[服务端数据加载模式](/AntdTable-server-side-mode) 默认值:`'client-side'`. - summaryRowContents (list of dicts; optional): 配置总结栏内容,按数组顺序渲染. `summaryRowContents` is a list of dicts with keys: - content (a list of or a singular dash component, string or number; optional): 组件型,当前总结栏单元格内容. - colSpan (number; optional): 当前总结栏单元格横跨占据的字段数量 默认值:`1`. - align (a value equal to: 'left', 'center', 'right'; optional): 当前总结栏列对齐方式,可选项有`'left'`、`'center'`、`'right'`. - summaryRowBlankColumns (number; default 0): 总结栏每行用于占位的列数,适用于同时使用行选择等功能的场景 默认值:`0`. - summaryRowFixed (boolean | a value equal to: 'top', 'bottom'; default False): 总结栏是否启用固定布局功能,也可设置为`'top'`、`'bottom'`控制总结栏固定在顶部或底部 默认值:`False`. - conditionalStyleFuncs (dict with strings as keys and values of type string; optional): 配置各字段条件格式化渲染对应的`javascript`函数字符串. - expandedRowKeyToContent (list of dicts; optional): 配置各数据行的行展开内容,键为数据行`key`值,值为对应行的展开内容. `expandedRowKeyToContent` is a list of dicts with keys: - key (string | number; required) - content (a list of or a singular dash component, string or number; optional) - expandedRowWidth (string | number; optional): 行展开控件所在列宽度. - expandRowByClick (boolean; default False): 是否允许通过直接点击行的方式展开对应行 默认值:`False`. - defaultExpandedRowKeys (list of strings; optional): 初始化处于展开状态的行对应`key`值. - expandedRowKeys (list of strings; optional): 监听或设置处于展开状态的行对应`key`值. - enableCellClickListenColumns (list of strings; optional): 是否启用单元格单击、双击、右键相关事件的监听,开启后可能会影响到部分其他功能,请根据实际情况进行使用 默认值:`False`. - recentlyCellClickColumn (string; optional): 当`enableCellClickListenColumns=True`时,监听最近一次单元格单击事件对应的字段`dataIndex`. - recentlyCellClickRecord (dict; optional): 当`enableCellClickListenColumns=True`时,监听最近一次单元格单击事件对应的行记录信息. - nClicksCell (number; default 0): 当`enableCellClickListenColumns=True`时,监听表格单元格单击事件累计发生次数 默认值:`0`. - cellClickEvent (dict; optional): 当`enableCellClickListenColumns=True`时,监听最近一次表格单元格单击事件详细参数. `cellClickEvent` is a dict with keys: - pageX (number; optional): 以页面整体左上角为原点,记录x坐标. - pageY (number; optional): 以页面整体左上角为原点,记录y坐标. - clientX (number; optional): 以浏览器窗口左上角为原点,记录x坐标. - clientY (number; optional): 以浏览器窗口左上角为原点,记录y坐标. - screenX (number; optional): 以屏幕左上角为原点,记录x坐标. - screenY (number; optional): 以屏幕左上角为原点,记录y坐标. - timestamp (number; optional): 事件对应的时间戳. - recentlyCellDoubleClickColumn (string; optional): 当`enableCellClickListenColumns=True`时,监听最近一次单元格双击事件对应的字段`dataIndex`. - recentlyCellDoubleClickRecord (dict; optional): 当`enableCellClickListenColumns=True`时,监听最近一次单元格双击事件对应的行记录信息. - nDoubleClicksCell (number; default 0): 当`enableCellClickListenColumns=True`时,监听表格单元格双击事件累计发生次数 默认值:`0`. - cellDoubleClickEvent (dict; optional): 当`enableCellClickListenColumns=True`时,监听最近一次表格单元格双击事件详细参数. `cellDoubleClickEvent` is a dict with keys: - pageX (number; optional): 以页面整体左上角为原点,记录x坐标. - pageY (number; optional): 以页面整体左上角为原点,记录y坐标. - clientX (number; optional): 以浏览器窗口左上角为原点,记录x坐标. - clientY (number; optional): 以浏览器窗口左上角为原点,记录y坐标. - screenX (number; optional): 以屏幕左上角为原点,记录x坐标. - screenY (number; optional): 以屏幕左上角为原点,记录y坐标. - timestamp (number; optional): 事件对应的时间戳. - recentlyContextMenuClickColumn (string; optional): 当`enableCellClickListenColumns=True`时,监听最近一次单元格右键事件对应的字段`dataIndex`. - recentlyContextMenuClickRecord (dict; optional): 当`enableCellClickListenColumns=True`时,监听最近一次单元格右键事件对应的行记录信息. - nContextMenuClicksCell (number; default 0): 当`enableCellClickListenColumns=True`时,监听表格单元格右键事件累计发生次数 默认值:`0`. - cellContextMenuClickEvent (dict; optional): 当`enableCellClickListenColumns=True`时,监听最近一次表格单元格右键事件详细参数. `cellContextMenuClickEvent` is a dict with keys: - pageX (number; optional): 以页面整体左上角为原点,记录x坐标. - pageY (number; optional): 以页面整体左上角为原点,记录y坐标. - clientX (number; optional): 以浏览器窗口左上角为原点,记录x坐标. - clientY (number; optional): 以浏览器窗口左上角为原点,记录y坐标. - screenX (number; optional): 以屏幕左上角为原点,记录x坐标. - screenY (number; optional): 以屏幕左上角为原点,记录y坐标. - timestamp (number; optional): 事件对应的时间戳. - emptyContent (a list of or a singular dash component, string or number; optional): 组件型,自定义空数据状态下,表格内的显示内容. - cellUpdateOptimize (boolean; default False): 是否严格启用单元格内容渲染优化,开启后,会基于单元格数据对单元格内容进行渲染优化,减少渲染次数 默认值:`False`. - miniChartHeight (number; default 30): 针对再渲染模式中的各迷你图模式,统一设置相关单元格像素高度 默认值:`30`. - miniChartAnimation (boolean; default False): 针对再渲染模式中的各迷你图模式,是否启用出场动画 默认值:`False`. - recentlyButtonClickedRow (dict; optional): 针对再渲染模式中的`'button'`模式,监听最近一次按钮点击对应的行记录信息. - nClicksButton (number; default 0): 针对再渲染模式中的`'button'`模式,监听表格中按钮点击累计次数 默认值:`0`. - clickedContent (string; optional): 针对再渲染模式中的`'button'`模式,监听最近一次按钮点击对应的按钮文字内容. - clickedCustom (boolean | number | string | dict | list; optional): 针对再渲染模式中的`'button'`模式,监听最近一次按钮点击对应的按钮数据项对应`'custom'`字段内容. - recentlyButtonClickedDataIndex (string; optional): 针对再渲染模式中的`'button'`模式,监听最近一次按钮点击对应的字段`dataIndex`. - customFormatFuncs (dict with strings as keys and values of type string; optional): 针对再渲染模式中的`'custom-format'`模式,键为对应字段`dataIndex`信息,值为对应的预处理`javascript`函数字符串. - recentlyCheckedRow (dict; optional): 针对再渲染模式中的`'checkbox'`模式,监听最近发生勾选事件的记录行. - recentlyCheckedLabel (string; optional): 针对再渲染模式中的`'checkbox'`模式,监听最近发生勾选事件的勾选框标签内容. - recentlyCheckedDataIndex (string; optional): 针对再渲染模式中的`'checkbox'`模式,监听最近发生勾选事件的字段`dataIndex`信息. - recentlyCheckedStatus (boolean; optional): 针对再渲染模式中的`'checkbox'`模式,监听最近发生勾选事件对应的勾选状态. - recentlySwitchRow (dict; optional): 针对再渲染模式中的`'switch'`模式,监听最近发生开关切换事件的记录行. - recentlySwitchDataIndex (string; optional): 针对再渲染模式中的`'switch'`模式,监听最近发生开关切换事件对应的开关状态. - recentlySwitchStatus (boolean; optional): 针对再渲染模式中的`'switch'`模式,监听最近发生开关切换事件对应的开关状态. - nClicksDropdownItem (number; default 0): 针对再渲染模式中的`'dropdown'`模式,监听表格中各下拉菜单项累计点击次数. - recentlyClickedDropdownItemTitle (string; optional): 针对再渲染模式中的`'dropdown'`模式,监听最近一次被点击的下拉菜单项`title`值. - recentlyDropdownItemClickedDataIndex (string; optional): 针对再渲染模式中的`'dropdown'`模式,监听最近一次被点击的下拉菜单项对应的字段dataIndex. - recentlyDropdownItemClickedRow (dict; optional): 针对再渲染模式中的`'dropdown'`模式,监听最近一次被点击的下拉菜单项对应的行记录. - recentlySelectRow (dict; optional): 针对再渲染模式中的`'select'`模式,监听最近发生下拉选项值更新的记录行. - recentlySelectDataIndex (string; optional): 针对再渲染模式中的`'select'`模式,监听最近发生下拉选项值更新对应的字段`dataIndex`. - recentlySelectValue (number | string | list of number | strings; optional): 针对再渲染模式中的`'select'`模式,监听最近发生下拉选项值更新对应的选项值. - hiddenRowKeys (list of strings; optional): 需要进行隐藏的行记录`key`值数组 默认值:`[]`. - dataDeepCompare (boolean; optional): 是否在表格底层进行重绘时,通过深度比较数据源`data`变化情况,来进行表格重绘优化,适用于中小数据量表格 默认值:`False`. - virtual (boolean; default False): 是否开启虚拟滚动模式 默认值:`False`. - title (a list of or a singular dash component, string or number; optional): 组件型,表格整体标题内容. - footer (a list of or a singular dash component, string or number; optional): 组件型,表格整体页脚内容. - loading (boolean; default False): 是否启用表格自带加载中状态 默认值:`False`. - rowClassName (dict; optional): 表格行css类名,支持通过`func`字段定义`javascript`函数动态计算. `rowClassName` is a string | dict with keys: - func (string; optional): 字符串形式的`javascript`函数. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [ 'columns[].title', 'data[]{}', 'summaryRowContents[].content', 'expandedRowKeyToContent[].content', 'emptyContent', 'title', 'footer', ] _base_nodes = ['emptyContent', 'title', 'footer', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdTable' ColumnsRenderOptionsRenderButtonPopConfirmProps = TypedDict( 'ColumnsRenderOptionsRenderButtonPopConfirmProps', {'title': NotRequired[str], 'okText': NotRequired[str], 'cancelText': NotRequired[str]}, ) ColumnsRenderOptionsProgressPercentPosition = TypedDict( 'ColumnsRenderOptionsProgressPercentPosition', { 'align': NotRequired[Literal['start', 'center', 'end']], 'type': NotRequired[Literal['inner', 'outer']], }, ) ColumnsRenderOptionsProgressColor = TypedDict( 'ColumnsRenderOptionsProgressColor', {'from': NotRequired[str], 'to': NotRequired[str]} ) ColumnsRenderOptionsDropdownProps = TypedDict( 'ColumnsRenderOptionsDropdownProps', { 'title': NotRequired[str], 'arrow': NotRequired[bool], 'disabled': NotRequired[bool], 'overlayClassName': NotRequired[str], 'overlayStyle': NotRequired[dict], 'placement': NotRequired[ Literal[ 'bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight' ] ], }, ) ColumnsRenderOptions = TypedDict( 'ColumnsRenderOptions', { 'renderType': NotRequired[ Literal[ 'link', 'ellipsis', 'copyable', 'ellipsis-copyable', 'tags', 'status-badge', 'image', 'custom-format', 'corner-mark', 'row-merge', 'dropdown', 'dropdown-links', 'image-avatar', 'mini-line', 'mini-bar', 'mini-progress', 'mini-ring-progress', 'mini-area', 'button', 'checkbox', 'switch', 'select', ] ], 'renderLinkText': NotRequired[str], 'likeDccLink': NotRequired[bool], 'renderButtonSplit': NotRequired[bool], 'renderButtonPopConfirmProps': NotRequired[ 'ColumnsRenderOptionsRenderButtonPopConfirmProps' ], 'miniChartColor': NotRequired[str], 'tooltipCustomContent': NotRequired[str], 'progressOneHundredPercentColor': NotRequired[str], 'progressShowPercent': NotRequired[bool], 'progressPercentPrecision': NotRequired[NumberType], 'progressPercentPosition': NotRequired['ColumnsRenderOptionsProgressPercentPosition'], 'progressStrokeLinecap': NotRequired[Literal['square', 'round']], 'progressSize': NotRequired[NumberType], 'progressColor': NotRequired[typing.Union[str, 'ColumnsRenderOptionsProgressColor']], 'ringProgressFontSize': NotRequired[NumberType], 'dropdownProps': NotRequired['ColumnsRenderOptionsDropdownProps'], }, ) ColumnsEditOptionsAutoSize = TypedDict( 'ColumnsEditOptionsAutoSize', {'minRows': NotRequired[NumberType], 'maxRows': NotRequired[NumberType]}, ) ColumnsEditOptions = TypedDict( 'ColumnsEditOptions', { 'mode': NotRequired[Literal['default', 'text-area']], 'autoSize': NotRequired[typing.Union[bool, 'ColumnsEditOptionsAutoSize']], 'maxLength': NotRequired[NumberType], 'placeholder': NotRequired[str], 'disabledKeys': NotRequired[typing.Sequence[str]], }, ) Columns = TypedDict( 'Columns', { 'title': typing.Union[typing.Any, ComponentType], 'dataIndex': str, 'group': NotRequired[typing.Union[str, typing.Sequence[str]]], 'renderOptions': NotRequired['ColumnsRenderOptions'], 'fixed': NotRequired[typing.Union[Literal['left', 'right'], bool]], 'editable': NotRequired[bool], 'editOptions': NotRequired['ColumnsEditOptions'], 'align': NotRequired[Literal['left', 'center', 'right']], 'headerAlign': NotRequired[Literal['left', 'center', 'right']], 'width': NotRequired[typing.Union[NumberType, str]], 'minWidth': NotRequired[typing.Union[NumberType, str]], 'hidden': NotRequired[bool], 'className': NotRequired[str], 'defaultSortOrder': NotRequired[Literal['ascend', 'descend']], 'filterResetToDefaultFilteredValue': NotRequired[bool], }, ) Data = TypedDict( 'Data', { 'className': NotRequired[str], 'style': NotRequired[dict], 'options': NotRequired[typing.Sequence['DataOptions']], 'listHeight': NotRequired[NumberType], 'mode': NotRequired[Literal['multiple', 'tags']], 'disabled': NotRequired[bool], 'size': NotRequired[Literal['small', 'middle', 'large']], 'bordered': NotRequired[bool], 'placeholder': NotRequired[str], 'placement': NotRequired[Literal['bottomLeft', 'bottomRight', 'topLeft', 'topRight']], 'value': NotRequired[ typing.Union[ typing.Union[str, NumberType], typing.Sequence[typing.Union[str, NumberType]] ] ], 'maxTagCount': NotRequired[typing.Union[NumberType, Literal['responsive']]], 'optionFilterProp': NotRequired[Literal['value', 'label']], 'allowClear': NotRequired[bool], 'showSearch': NotRequired[bool], }, ) DataTooltip = TypedDict( 'DataTooltip', { 'title': NotRequired[str], 'placement': NotRequired[ Literal[ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ] ], }, ) DataPopConfirmProps = TypedDict( 'DataPopConfirmProps', {'title': NotRequired[str], 'okText': NotRequired[str], 'cancelText': NotRequired[str]}, ) DataSize = TypedDict( 'DataSize', { 'xs': NotRequired[NumberType], 'sm': NotRequired[NumberType], 'md': NotRequired[NumberType], 'lg': NotRequired[NumberType], 'xl': NotRequired[NumberType], 'xxl': NotRequired[NumberType], }, ) DataOptions = TypedDict( 'DataOptions', {'label': NotRequired[str], 'value': NotRequired[typing.Union[str, NumberType]]}, ) Sticky = TypedDict( 'Sticky', { 'belowSelector': NotRequired[typing.Union[str, typing.Sequence[str]]], 'offsetHeader': NotRequired[NumberType], 'offsetScroll': NotRequired[NumberType], }, ) TitlePopoverInfo = TypedDict( 'TitlePopoverInfo', { 'title': NotRequired[str], 'content': NotRequired[str], 'placement': NotRequired[ Literal[ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ] ], 'overlayStyle': NotRequired[dict], }, ) ColumnsFormatConstraint = TypedDict( 'ColumnsFormatConstraint', {'rule': NotRequired[str], 'content': NotRequired[str]} ) SortOptions = TypedDict( 'SortOptions', { 'sortDataIndexes': NotRequired[typing.Sequence[str]], 'multiple': NotRequired[typing.Union[bool, Literal['auto']]], 'forceCompareModes': NotRequired[ typing.Dict[typing.Union[str, float, int], Literal['number', 'custom']] ], 'customOrders': NotRequired[ typing.Dict[typing.Union[str, float, int], typing.Sequence] ], }, ) FilterOptions = TypedDict( 'FilterOptions', { 'filterMode': NotRequired[Literal['checkbox', 'keyword', 'tree']], 'filterCustomItems': NotRequired[typing.Union[typing.Sequence[typing.Any], typing.Any]], 'filterCustomTreeItems': NotRequired[typing.Sequence[dict]], 'filterMultiple': NotRequired[bool], 'filterSearch': NotRequired[bool], }, ) Pagination = TypedDict( 'Pagination', { 'position': NotRequired[ Literal[ 'topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight' ] ], 'pageSize': NotRequired[NumberType], 'current': NotRequired[NumberType], 'showSizeChanger': NotRequired[bool], 'pageSizeOptions': NotRequired[typing.Sequence[NumberType]], 'showTitle': NotRequired[bool], 'showQuickJumper': NotRequired[bool], 'showTotalPrefix': NotRequired[str], 'showTotalSuffix': NotRequired[str], 'hideOnSinglePage': NotRequired[bool], 'simple': NotRequired[bool], 'disabled': NotRequired[bool], 'size': NotRequired[Literal['default', 'small']], 'total': NotRequired[NumberType], 'showLessItems': NotRequired[bool], }, ) Sorter = TypedDict( 'Sorter', { 'columns': NotRequired[typing.Sequence[str]], 'orders': NotRequired[typing.Sequence[Literal['ascend', 'descend']]], }, ) SummaryRowContents = TypedDict( 'SummaryRowContents', { 'content': NotRequired[ComponentType], 'colSpan': NotRequired[NumberType], 'align': NotRequired[Literal['left', 'center', 'right']], }, ) ExpandedRowKeyToContent = TypedDict( 'ExpandedRowKeyToContent', {'key': typing.Union[str, NumberType], 'content': NotRequired[ComponentType]}, ) CellClickEvent = TypedDict( 'CellClickEvent', { 'pageX': NotRequired[NumberType], 'pageY': NotRequired[NumberType], 'clientX': NotRequired[NumberType], 'clientY': NotRequired[NumberType], 'screenX': NotRequired[NumberType], 'screenY': NotRequired[NumberType], 'timestamp': NotRequired[NumberType], }, ) CellDoubleClickEvent = TypedDict( 'CellDoubleClickEvent', { 'pageX': NotRequired[NumberType], 'pageY': NotRequired[NumberType], 'clientX': NotRequired[NumberType], 'clientY': NotRequired[NumberType], 'screenX': NotRequired[NumberType], 'screenY': NotRequired[NumberType], 'timestamp': NotRequired[NumberType], }, ) CellContextMenuClickEvent = TypedDict( 'CellContextMenuClickEvent', { 'pageX': NotRequired[NumberType], 'pageY': NotRequired[NumberType], 'clientX': NotRequired[NumberType], 'clientY': NotRequired[NumberType], 'screenX': NotRequired[NumberType], 'screenY': NotRequired[NumberType], 'timestamp': NotRequired[NumberType], }, ) RowClassName = TypedDict('RowClassName', {'func': NotRequired[str]}) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[str] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, containerId: typing.Optional[str] = None, columns: typing.Optional[typing.Sequence['Columns']] = None, showHeader: typing.Optional[bool] = None, rowHoverable: typing.Optional[bool] = None, tableLayout: typing.Optional[Literal['auto', 'fixed']] = None, data: typing.Optional[ typing.Sequence[ typing.Dict[ typing.Union[str, float, int], typing.Union[ typing.Sequence[typing.Any], ComponentType, str, NumberType, bool, 'Data', typing.Sequence[NumberType], typing.Union['Data', typing.Sequence['Data']], typing.Sequence['Data'], dict, ], ] ] ] = None, bordered: typing.Optional[bool] = None, maxHeight: typing.Optional[typing.Union[NumberType, str]] = None, maxWidth: typing.Optional[typing.Union[NumberType, str, bool]] = None, scrollToFirstRowOnChange: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, rowSelectionType: typing.Optional[Literal['checkbox', 'radio']] = None, selectedRowKeys: typing.Optional[typing.Sequence[typing.Union[str, NumberType]]] = None, selectedRows: typing.Optional[typing.Sequence] = None, rowSelectionWidth: typing.Optional[typing.Union[str, NumberType]] = None, rowSelectionCheckStrictly: typing.Optional[bool] = None, rowSelectionIgnoreRowKeys: typing.Optional[ typing.Sequence[typing.Union[str, NumberType]] ] = None, selectedRowsSyncWithData: typing.Optional[bool] = None, sticky: typing.Optional[typing.Union[bool, 'Sticky']] = None, enableHoverListen: typing.Optional[bool] = None, recentlyMouseEnterColumnDataIndex: typing.Optional[str] = None, recentlyMouseEnterRowKey: typing.Optional[typing.Union[str, NumberType]] = None, recentlyMouseEnterRow: typing.Optional[dict] = None, titlePopoverInfo: typing.Optional[ typing.Dict[typing.Union[str, float, int], 'TitlePopoverInfo'] ] = None, columnsFormatConstraint: typing.Optional[ typing.Dict[typing.Union[str, float, int], 'ColumnsFormatConstraint'] ] = None, sortOptions: typing.Optional['SortOptions'] = None, showSorterTooltip: typing.Optional[bool] = None, showSorterTooltipTarget: typing.Optional[Literal['full-header', 'sorter-icon']] = None, filterOptions: typing.Optional[ typing.Dict[typing.Union[str, float, int], 'FilterOptions'] ] = None, defaultFilteredValues: typing.Optional[ typing.Dict[typing.Union[str, float, int], typing.Sequence] ] = None, pagination: typing.Optional[typing.Union['Pagination', bool]] = None, currentData: typing.Optional[typing.Sequence] = None, recentlyChangedRow: typing.Optional[dict] = None, recentlyChangedColumn: typing.Optional[str] = None, sorter: typing.Optional['Sorter'] = None, filter: typing.Optional[dict] = None, mode: typing.Optional[Literal['client-side', 'server-side']] = None, summaryRowContents: typing.Optional[typing.Sequence['SummaryRowContents']] = None, summaryRowBlankColumns: typing.Optional[NumberType] = None, summaryRowFixed: typing.Optional[typing.Union[bool, Literal['top', 'bottom']]] = None, conditionalStyleFuncs: typing.Optional[ typing.Dict[typing.Union[str, float, int], str] ] = None, expandedRowKeyToContent: typing.Optional[typing.Sequence['ExpandedRowKeyToContent']] = None, expandedRowWidth: typing.Optional[typing.Union[str, NumberType]] = None, expandRowByClick: typing.Optional[bool] = None, defaultExpandedRowKeys: typing.Optional[typing.Sequence[str]] = None, expandedRowKeys: typing.Optional[typing.Sequence[str]] = None, enableCellClickListenColumns: typing.Optional[typing.Sequence[str]] = None, recentlyCellClickColumn: typing.Optional[str] = None, recentlyCellClickRecord: typing.Optional[dict] = None, nClicksCell: typing.Optional[NumberType] = None, cellClickEvent: typing.Optional['CellClickEvent'] = None, recentlyCellDoubleClickColumn: typing.Optional[str] = None, recentlyCellDoubleClickRecord: typing.Optional[dict] = None, nDoubleClicksCell: typing.Optional[NumberType] = None, cellDoubleClickEvent: typing.Optional['CellDoubleClickEvent'] = None, recentlyContextMenuClickColumn: typing.Optional[str] = None, recentlyContextMenuClickRecord: typing.Optional[dict] = None, nContextMenuClicksCell: typing.Optional[NumberType] = None, cellContextMenuClickEvent: typing.Optional['CellContextMenuClickEvent'] = None, emptyContent: typing.Optional[ComponentType] = None, cellUpdateOptimize: typing.Optional[bool] = None, miniChartHeight: typing.Optional[NumberType] = None, miniChartAnimation: typing.Optional[bool] = None, recentlyButtonClickedRow: typing.Optional[dict] = None, nClicksButton: typing.Optional[NumberType] = None, clickedContent: typing.Optional[str] = None, clickedCustom: typing.Optional[typing.Any] = None, recentlyButtonClickedDataIndex: typing.Optional[str] = None, customFormatFuncs: typing.Optional[typing.Dict[typing.Union[str, float, int], str]] = None, recentlyCheckedRow: typing.Optional[dict] = None, recentlyCheckedLabel: typing.Optional[str] = None, recentlyCheckedDataIndex: typing.Optional[str] = None, recentlyCheckedStatus: typing.Optional[bool] = None, recentlySwitchRow: typing.Optional[dict] = None, recentlySwitchDataIndex: typing.Optional[str] = None, recentlySwitchStatus: typing.Optional[bool] = None, nClicksDropdownItem: typing.Optional[NumberType] = None, recentlyClickedDropdownItemTitle: typing.Optional[str] = None, recentlyDropdownItemClickedDataIndex: typing.Optional[str] = None, recentlyDropdownItemClickedRow: typing.Optional[dict] = None, recentlySelectRow: typing.Optional[dict] = None, recentlySelectDataIndex: typing.Optional[str] = None, recentlySelectValue: typing.Optional[ typing.Union[ typing.Union[NumberType, str], typing.Sequence[typing.Union[NumberType, str]] ] ] = None, hiddenRowKeys: typing.Optional[typing.Sequence[str]] = None, dataDeepCompare: typing.Optional[bool] = None, virtual: typing.Optional[bool] = None, title: typing.Optional[ComponentType] = None, footer: typing.Optional[ComponentType] = None, loading: typing.Optional[bool] = None, rowClassName: typing.Optional[typing.Union[str, 'RowClassName']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'locale', 'containerId', 'columns', 'showHeader', 'rowHoverable', 'tableLayout', 'data', 'bordered', 'maxHeight', 'maxWidth', 'scrollToFirstRowOnChange', 'size', 'rowSelectionType', 'selectedRowKeys', 'selectedRows', 'rowSelectionWidth', 'rowSelectionCheckStrictly', 'rowSelectionIgnoreRowKeys', 'selectedRowsSyncWithData', 'sticky', 'enableHoverListen', 'recentlyMouseEnterColumnDataIndex', 'recentlyMouseEnterRowKey', 'recentlyMouseEnterRow', 'titlePopoverInfo', 'columnsFormatConstraint', 'sortOptions', 'showSorterTooltip', 'showSorterTooltipTarget', 'filterOptions', 'defaultFilteredValues', 'pagination', 'currentData', 'recentlyChangedRow', 'recentlyChangedColumn', 'sorter', 'filter', 'mode', 'summaryRowContents', 'summaryRowBlankColumns', 'summaryRowFixed', 'conditionalStyleFuncs', 'expandedRowKeyToContent', 'expandedRowWidth', 'expandRowByClick', 'defaultExpandedRowKeys', 'expandedRowKeys', 'enableCellClickListenColumns', 'recentlyCellClickColumn', 'recentlyCellClickRecord', 'nClicksCell', 'cellClickEvent', 'recentlyCellDoubleClickColumn', 'recentlyCellDoubleClickRecord', 'nDoubleClicksCell', 'cellDoubleClickEvent', 'recentlyContextMenuClickColumn', 'recentlyContextMenuClickRecord', 'nContextMenuClicksCell', 'cellContextMenuClickEvent', 'emptyContent', 'cellUpdateOptimize', 'miniChartHeight', 'miniChartAnimation', 'recentlyButtonClickedRow', 'nClicksButton', 'clickedContent', 'clickedCustom', 'recentlyButtonClickedDataIndex', 'customFormatFuncs', 'recentlyCheckedRow', 'recentlyCheckedLabel', 'recentlyCheckedDataIndex', 'recentlyCheckedStatus', 'recentlySwitchRow', 'recentlySwitchDataIndex', 'recentlySwitchStatus', 'nClicksDropdownItem', 'recentlyClickedDropdownItemTitle', 'recentlyDropdownItemClickedDataIndex', 'recentlyDropdownItemClickedRow', 'recentlySelectRow', 'recentlySelectDataIndex', 'recentlySelectValue', 'hiddenRowKeys', 'dataDeepCompare', 'virtual', 'title', 'footer', 'loading', 'rowClassName', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'locale', 'containerId', 'columns', 'showHeader', 'rowHoverable', 'tableLayout', 'data', 'bordered', 'maxHeight', 'maxWidth', 'scrollToFirstRowOnChange', 'size', 'rowSelectionType', 'selectedRowKeys', 'selectedRows', 'rowSelectionWidth', 'rowSelectionCheckStrictly', 'rowSelectionIgnoreRowKeys', 'selectedRowsSyncWithData', 'sticky', 'enableHoverListen', 'recentlyMouseEnterColumnDataIndex', 'recentlyMouseEnterRowKey', 'recentlyMouseEnterRow', 'titlePopoverInfo', 'columnsFormatConstraint', 'sortOptions', 'showSorterTooltip', 'showSorterTooltipTarget', 'filterOptions', 'defaultFilteredValues', 'pagination', 'currentData', 'recentlyChangedRow', 'recentlyChangedColumn', 'sorter', 'filter', 'mode', 'summaryRowContents', 'summaryRowBlankColumns', 'summaryRowFixed', 'conditionalStyleFuncs', 'expandedRowKeyToContent', 'expandedRowWidth', 'expandRowByClick', 'defaultExpandedRowKeys', 'expandedRowKeys', 'enableCellClickListenColumns', 'recentlyCellClickColumn', 'recentlyCellClickRecord', 'nClicksCell', 'cellClickEvent', 'recentlyCellDoubleClickColumn', 'recentlyCellDoubleClickRecord', 'nDoubleClicksCell', 'cellDoubleClickEvent', 'recentlyContextMenuClickColumn', 'recentlyContextMenuClickRecord', 'nContextMenuClicksCell', 'cellContextMenuClickEvent', 'emptyContent', 'cellUpdateOptimize', 'miniChartHeight', 'miniChartAnimation', 'recentlyButtonClickedRow', 'nClicksButton', 'clickedContent', 'clickedCustom', 'recentlyButtonClickedDataIndex', 'customFormatFuncs', 'recentlyCheckedRow', 'recentlyCheckedLabel', 'recentlyCheckedDataIndex', 'recentlyCheckedStatus', 'recentlySwitchRow', 'recentlySwitchDataIndex', 'recentlySwitchStatus', 'nClicksDropdownItem', 'recentlyClickedDropdownItemTitle', 'recentlyDropdownItemClickedDataIndex', 'recentlyDropdownItemClickedRow', 'recentlySelectRow', 'recentlySelectDataIndex', 'recentlySelectValue', 'hiddenRowKeys', 'dataDeepCompare', 'virtual', 'title', 'footer', 'loading', 'rowClassName', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdTable, self).__init__(**args) setattr(AntdTable, '__init__', _explicitize_args(AntdTable.__init__)) ================================================ FILE: feffery_antd_components/AntdTabs.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTabs(Component): """An AntdTabs component. 标签页组件AntdTabs Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - type (a value equal to: 'line', 'card', 'editable-card'; default 'line'): 标签页类型,可选项有`'line'`、`'card'`、`'editable-card'` 默认值:`'line'`. - items (list of dicts; optional): 定义标签项. `items` is a list of dicts with keys: - label (a list of or a singular dash component, string or number; optional): 组件型,标签页标题. - key (string; optional): 标签页唯一识别id. - children (a list of or a singular dash component, string or number; optional): 组件型,标签页内部元素. - icon (a list of or a singular dash component, string or number; optional): 组件型,标签页图标元素. - closeIcon (boolean | a list of or a singular dash component, string or number; optional): `'editable-card'`型标签页可用,用于自定义关闭按钮,设置为`None`或`False`时会隐藏默认的关闭按钮. - destroyInactiveTabPane (boolean; optional): 是否在当前标签页隐藏时,自动销毁当前标签页内部元素 默认值:`False`. - disabled (boolean; optional): 是否禁用当前标签页 默认值:`False`. - forceRender (boolean; optional): 初始化是否强制渲染当前标签页内部元素 默认值:`False`. - closable (boolean; optional): `'editable-card'`型标签页可用,控制当前标签页是否可被关闭 默认值:`True`. - contextMenu (list of dicts; optional): 为当前标签页标题配置右键菜单相关参数. `contextMenu` is a list of dicts with keys: - key (string; optional): 当前右键菜单项唯一标识id. - label (string; optional): 当前右键菜单项标题. - icon (string; optional): 当前右键菜单项前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名. - iconRenderer (a value equal to: 'AntdIcon', 'fontawesome'; optional): 当前右键菜单项前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'`. - itemKeys (list of strings; optional): 监听当前各标签页`key`值,顺序与`items`一致. - activeKey (string; optional): 监听或设置当前激活的标签页对应`key`值. - defaultActiveKey (string; optional): 初始化激活的标签页对应`key`值. - disabledTabKeys (list of strings; optional): 呈现禁用状态的标签页`key`值数组,优先级高于`items`中各标签页的`disabled`设定. - tabPosition (a value equal to: 'top', 'left', 'right', 'bottom'; default 'top'): 标签页切换控件显示方位,可选项有`'top'`、`'left'`、`'right'`、`'bottom'` 默认值:`'top'`. - size (a value equal to: 'small', 'default', 'large'; default 'default'): 当前组件尺寸规格,可选项有`'small'`、`'default'`、`'large'` 默认值:'default'. - centered (boolean; default False): 是否居中显示标签页切换控件 默认值:`False`. - indicator (dict; optional): 配置指示条长度及对齐方式. `indicator` is a dict with keys: - size (number; optional): 指示条像素宽度,当传入负数时,表示在完整宽度基础上应减去的像素宽度,默认与标签卡片同宽. - align (a value equal to: 'start', 'center', 'end'; optional): 指示条对齐方式,可选项有`'start'`、`'center'`、`'end'`. - tabBarGutter (number; optional): 标签卡片之间的像素间距. - tabBarStyle (dict; optional): 标签卡片css样式. - inkBarAnimated (boolean; default True): 标签卡片切换是否添加动画效果 默认值:`True`. - tabPaneAnimated (boolean; default False): 标签内容切换是否添加动画效果 默认值:`False`. - latestDeletePane (string; optional): 监听最近一次删除操作对应的标签页`key`值. - tabCloseCounts (number; default 0): 标签页关闭按钮累计点击次数 默认值:`0`. - tabBarLeftExtraContent (a list of or a singular dash component, string or number; optional): 组件型,第一方位额外元素. - tabBarRightExtraContent (a list of or a singular dash component, string or number; optional): 组件型,第二方位额外元素. - tabCount (number; optional): 监听标签页数量. - destroyInactiveTabPane (boolean; default False): 统一设置是否自动销毁取消激活状态的标签页内部元素. - clickedContextMenu (dict; optional): 监听标签页标题右键菜单项相关点击事件. `clickedContextMenu` is a dict with keys: - tabKey (string; optional): 被点击的右键菜单项对应标签页`key`值. - menuKey (string; optional): 被点击的右键菜单项对应`key`值. - timestamp (number; optional): 事件对应时间戳信息. - placeholder (a list of or a singular dash component, string or number; optional): 当`items`为空或长度为`0`时,替代进行占位显示的内容. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'activeKey's; optional): 开启属性持久化功能的若干属性名,可选项有`'activeKey'` 默认值:`['activeKey']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = [ 'items[].label', 'items[].children', 'items[].icon', 'items[].closeIcon', 'tabBarLeftExtraContent', 'tabBarRightExtraContent', 'placeholder', ] _base_nodes = ['tabBarLeftExtraContent', 'tabBarRightExtraContent', 'placeholder', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdTabs' ItemsContextMenu = TypedDict( 'ItemsContextMenu', { 'key': NotRequired[str], 'label': NotRequired[str], 'icon': NotRequired[str], 'iconRenderer': NotRequired[Literal['AntdIcon', 'fontawesome']], }, ) Items = TypedDict( 'Items', { 'label': NotRequired[ComponentType], 'key': NotRequired[str], 'children': NotRequired[ComponentType], 'icon': NotRequired[ComponentType], 'closeIcon': NotRequired[typing.Union[bool, ComponentType]], 'destroyInactiveTabPane': NotRequired[bool], 'disabled': NotRequired[bool], 'forceRender': NotRequired[bool], 'closable': NotRequired[bool], 'contextMenu': NotRequired[typing.Sequence['ItemsContextMenu']], }, ) Indicator = TypedDict( 'Indicator', {'size': NotRequired[NumberType], 'align': NotRequired[Literal['start', 'center', 'end']]}, ) ClickedContextMenu = TypedDict( 'ClickedContextMenu', { 'tabKey': NotRequired[str], 'menuKey': NotRequired[str], 'timestamp': NotRequired[NumberType], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, type: typing.Optional[Literal['line', 'card', 'editable-card']] = None, items: typing.Optional[typing.Sequence['Items']] = None, itemKeys: typing.Optional[typing.Sequence[str]] = None, activeKey: typing.Optional[str] = None, defaultActiveKey: typing.Optional[str] = None, disabledTabKeys: typing.Optional[typing.Sequence[str]] = None, tabPosition: typing.Optional[Literal['top', 'left', 'right', 'bottom']] = None, size: typing.Optional[Literal['small', 'default', 'large']] = None, centered: typing.Optional[bool] = None, indicator: typing.Optional['Indicator'] = None, tabBarGutter: typing.Optional[NumberType] = None, tabBarStyle: typing.Optional[dict] = None, inkBarAnimated: typing.Optional[bool] = None, tabPaneAnimated: typing.Optional[bool] = None, latestDeletePane: typing.Optional[str] = None, tabCloseCounts: typing.Optional[NumberType] = None, tabBarLeftExtraContent: typing.Optional[ComponentType] = None, tabBarRightExtraContent: typing.Optional[ComponentType] = None, tabCount: typing.Optional[NumberType] = None, destroyInactiveTabPane: typing.Optional[bool] = None, clickedContextMenu: typing.Optional['ClickedContextMenu'] = None, placeholder: typing.Optional[ComponentType] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['activeKey']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'type', 'items', 'itemKeys', 'activeKey', 'defaultActiveKey', 'disabledTabKeys', 'tabPosition', 'size', 'centered', 'indicator', 'tabBarGutter', 'tabBarStyle', 'inkBarAnimated', 'tabPaneAnimated', 'latestDeletePane', 'tabCloseCounts', 'tabBarLeftExtraContent', 'tabBarRightExtraContent', 'tabCount', 'destroyInactiveTabPane', 'clickedContextMenu', 'placeholder', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'type', 'items', 'itemKeys', 'activeKey', 'defaultActiveKey', 'disabledTabKeys', 'tabPosition', 'size', 'centered', 'indicator', 'tabBarGutter', 'tabBarStyle', 'inkBarAnimated', 'tabPaneAnimated', 'latestDeletePane', 'tabCloseCounts', 'tabBarLeftExtraContent', 'tabBarRightExtraContent', 'tabCount', 'destroyInactiveTabPane', 'clickedContextMenu', 'placeholder', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdTabs, self).__init__(**args) setattr(AntdTabs, '__init__', _explicitize_args(AntdTabs.__init__)) ================================================ FILE: feffery_antd_components/AntdTag.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTag(Component): """An AntdTag component. 标签组件AntdTag Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - content (a list of or a singular dash component, string or number; optional): 组件型,标签内容. - icon (a list of or a singular dash component, string or number; optional): 组件型,标签前缀图标. - color (string; optional): 标签颜色,可使用内置的若干种颜色主题,也可使用任何合法的css颜色值. - href (string; optional): 标签点击跳转链接地址. - target (string; default '_blank'): 标签链接跳转行为. - bordered (boolean; default True): 是否渲染边框 默认值:`True`. - closeIcon (boolean; default False): 是否渲染关闭按钮 默认值:`False`. - closeCounts (number; default 0): `closeIcon=True`时,监听关闭按钮累计点击次数 默认值:`0`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = ['content', 'icon'] _base_nodes = ['content', 'icon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdTag' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, content: typing.Optional[ComponentType] = None, icon: typing.Optional[ComponentType] = None, color: typing.Optional[str] = None, href: typing.Optional[str] = None, target: typing.Optional[str] = None, bordered: typing.Optional[bool] = None, closeIcon: typing.Optional[bool] = None, closeCounts: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'content', 'icon', 'color', 'href', 'target', 'bordered', 'closeIcon', 'closeCounts', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'content', 'icon', 'color', 'href', 'target', 'bordered', 'closeIcon', 'closeCounts', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdTag, self).__init__(**args) setattr(AntdTag, '__init__', _explicitize_args(AntdTag.__init__)) ================================================ FILE: feffery_antd_components/AntdText.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdText(Component): """An AntdText component. 文字组件AntdText Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - code (boolean; optional): 是否渲染为代码形式. - copyable (boolean; optional): 是否开启快捷复制功能. - strikethrough (boolean; optional): 是否渲染为删除线形式. - disabled (boolean; optional): 是否渲染为禁用形式. - mark (boolean; optional): 是否渲染为高亮形式. - strong (boolean; optional): 是否渲染为加粗形式. - italic (boolean; optional): 是否渲染为斜体形式. - underline (boolean; optional): 是否渲染为下划线形式. - keyboard (boolean; optional): 是否渲染为键盘形式. - type (a value equal to: 'secondary', 'success', 'warning', 'danger'; optional): 设置内容特殊状态形式,可选项有`'secondary'`、`'success'`、`'warning'`、`'danger'`. - ellipsis (dict; default False): 配置内容省略相关功能,设置为`False`则不开启 默认值:`False`. `ellipsis` is a boolean | dict with keys: - suffix (string; optional): 自定义内容省略后缀. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdText' Ellipsis = TypedDict('Ellipsis', {'suffix': NotRequired[str]}) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, code: typing.Optional[bool] = None, copyable: typing.Optional[bool] = None, strikethrough: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, mark: typing.Optional[bool] = None, strong: typing.Optional[bool] = None, italic: typing.Optional[bool] = None, underline: typing.Optional[bool] = None, keyboard: typing.Optional[bool] = None, type: typing.Optional[Literal['secondary', 'success', 'warning', 'danger']] = None, ellipsis: typing.Optional[typing.Union[bool, 'Ellipsis']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'locale', 'code', 'copyable', 'strikethrough', 'disabled', 'mark', 'strong', 'italic', 'underline', 'keyboard', 'type', 'ellipsis', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'locale', 'code', 'copyable', 'strikethrough', 'disabled', 'mark', 'strong', 'italic', 'underline', 'keyboard', 'type', 'ellipsis', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdText, self).__init__(children=children, **args) setattr(AntdText, '__init__', _explicitize_args(AntdText.__init__)) ================================================ FILE: feffery_antd_components/AntdTimePicker.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTimePicker(Component): """An AntdTimePicker component. 时间选择组件AntdTimePicker Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - popupClassName (string; optional): 展开菜单css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - format (string; default 'HH:mm:ss'): 时间显示格式,[参考资料](https://day.js.org/docs/en/display/format) 默认值:`'HH:mm:ss'`. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - hourStep (number; default 1): 小时选项间隔 默认值:`1`. - minuteStep (number; default 1): 分钟选项间隔 默认值:`1`. - secondStep (number; default 1): 秒选项间隔 默认值:`1`. - use12Hours (boolean; default False): 是否使用12小时制,当设置为`True`时,`format`参数默认值变更为`'h:mm:ss a'` 默认值:`False`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - placeholder (string; optional): 输入框占位文字内容. - placement (a value equal to: 'bottomLeft', 'bottomRight', 'topLeft', 'topRight'; default 'bottomLeft'): 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` 默认值:`'bottomLeft'`. - value (string; optional): 监听或设置已选值,与`format`格式对应. - defaultValue (string; optional): 初始化已选值,与`format`格式对应. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - allowClear (boolean; default True): 是否允许一键清空已选值 默认值:`True`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - extraFooter (a list of or a singular dash component, string or number; optional): 组件型,底部额外区域内容. - showNow (boolean; default True): 是否显示“此刻”快捷选择按钮 默认值:`True`. - prefix (a list of or a singular dash component, string or number; optional): 组件型,前缀内嵌内容. - suffixIcon (a list of or a singular dash component, string or number; optional): 自定义选择框后缀图标内容. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - needConfirm (boolean; default False): 是否需要确认按钮,为`False`时失去焦点即代表选择 默认值:`False`. - loading_state (dict; optional): Object that holds the loading state object coming from dash-renderer. `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['extraFooter', 'prefix', 'suffixIcon'] _base_nodes = ['extraFooter', 'prefix', 'suffixIcon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdTimePicker' LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, popupClassName: typing.Optional[str] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, format: typing.Optional[str] = None, disabled: typing.Optional[bool] = None, hourStep: typing.Optional[NumberType] = None, minuteStep: typing.Optional[NumberType] = None, secondStep: typing.Optional[NumberType] = None, use12Hours: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[str] = None, placement: typing.Optional[ Literal['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] ] = None, value: typing.Optional[str] = None, defaultValue: typing.Optional[str] = None, status: typing.Optional[Literal['error', 'warning']] = None, allowClear: typing.Optional[bool] = None, autoFocus: typing.Optional[bool] = None, readOnly: typing.Optional[bool] = None, extraFooter: typing.Optional[ComponentType] = None, showNow: typing.Optional[bool] = None, prefix: typing.Optional[ComponentType] = None, suffixIcon: typing.Optional[ComponentType] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, needConfirm: typing.Optional[bool] = None, loading_state: typing.Optional['LoadingState'] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'format', 'disabled', 'hourStep', 'minuteStep', 'secondStep', 'use12Hours', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'status', 'allowClear', 'autoFocus', 'readOnly', 'extraFooter', 'showNow', 'prefix', 'suffixIcon', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'needConfirm', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'format', 'disabled', 'hourStep', 'minuteStep', 'secondStep', 'use12Hours', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'value', 'defaultValue', 'status', 'allowClear', 'autoFocus', 'readOnly', 'extraFooter', 'showNow', 'prefix', 'suffixIcon', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'needConfirm', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdTimePicker, self).__init__(**args) setattr(AntdTimePicker, '__init__', _explicitize_args(AntdTimePicker.__init__)) ================================================ FILE: feffery_antd_components/AntdTimeRangePicker.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTimeRangePicker(Component): """An AntdTimeRangePicker component. 时间范围选择组件AntdTimeRangePicker Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - popupClassName (string; optional): 展开菜单css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - format (string; default 'HH:mm:ss'): 时间显示格式,[参考资料](https://day.js.org/docs/en/display/format) 默认值:`'HH:mm:ss'`. - hourStep (number; default 1): 小时选项间隔 默认值:`1`. - minuteStep (number; default 1): 分钟选项间隔 默认值:`1`. - secondStep (number; default 1): 秒选项间隔 默认值:`1`. - use12Hours (boolean; default False): 是否使用12小时制,当设置为`True`时,`format`参数默认值变更为`'h:mm:ss a'` 默认值:`False`. - allowClear (boolean; default True): 是否允许一键清空已选值 默认值:`True`. - autoFocus (boolean; default False): 是否自动获取焦点 默认值:`False`. - placeholder (list of strings; optional): 输入框占位文字内容. - placement (a value equal to: 'bottomLeft', 'bottomRight', 'topLeft', 'topRight'; default 'bottomLeft'): 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` 默认值:`'bottomLeft'`. - disabled (list of booleans; default [False, False]): 是否禁用当前组件 默认值:`False`. - value (list of strings; optional): 监听或设置已选值,与`format`格式对应. - defaultValue (list of strings; optional): 初始化已选值,与`format`格式对应. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - open (boolean; optional): 监听或设置当前选择面板是否展开. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - extraFooter (a list of or a singular dash component, string or number; optional): 组件型,底部额外区域内容. - prefix (a list of or a singular dash component, string or number; optional): 组件型,前缀内嵌内容. - suffixIcon (a list of or a singular dash component, string or number; optional): 自定义选择框后缀图标内容. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - needConfirm (boolean; default False): 是否需要确认按钮,为`False`时失去焦点即代表选择 默认值:`False`. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = ['extraFooter', 'prefix', 'suffixIcon'] _base_nodes = ['extraFooter', 'prefix', 'suffixIcon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdTimeRangePicker' def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, popupClassName: typing.Optional[str] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, format: typing.Optional[str] = None, hourStep: typing.Optional[NumberType] = None, minuteStep: typing.Optional[NumberType] = None, secondStep: typing.Optional[NumberType] = None, use12Hours: typing.Optional[bool] = None, allowClear: typing.Optional[bool] = None, autoFocus: typing.Optional[bool] = None, placeholder: typing.Optional[typing.Sequence[str]] = None, placement: typing.Optional[ Literal['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] ] = None, disabled: typing.Optional[typing.Sequence[bool]] = None, value: typing.Optional[typing.Sequence[str]] = None, defaultValue: typing.Optional[typing.Sequence[str]] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, open: typing.Optional[bool] = None, status: typing.Optional[Literal['error', 'warning']] = None, readOnly: typing.Optional[bool] = None, extraFooter: typing.Optional[ComponentType] = None, prefix: typing.Optional[ComponentType] = None, suffixIcon: typing.Optional[ComponentType] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, needConfirm: typing.Optional[bool] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'format', 'hourStep', 'minuteStep', 'secondStep', 'use12Hours', 'allowClear', 'autoFocus', 'placeholder', 'placement', 'disabled', 'value', 'defaultValue', 'bordered', 'variant', 'size', 'open', 'status', 'readOnly', 'extraFooter', 'prefix', 'suffixIcon', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'needConfirm', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'format', 'hourStep', 'minuteStep', 'secondStep', 'use12Hours', 'allowClear', 'autoFocus', 'placeholder', 'placement', 'disabled', 'value', 'defaultValue', 'bordered', 'variant', 'size', 'open', 'status', 'readOnly', 'extraFooter', 'prefix', 'suffixIcon', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'needConfirm', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdTimeRangePicker, self).__init__(**args) setattr(AntdTimeRangePicker, '__init__', _explicitize_args(AntdTimeRangePicker.__init__)) ================================================ FILE: feffery_antd_components/AntdTimeline.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTimeline(Component): """An AntdTimeline component. 时间轴组件AntdTimeline Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - items (list of dicts; required): 必填,定义时间轴节点. `items` is a list of dicts with keys: - content (a list of or a singular dash component, string or number; optional): 组件型,当前节点正文内容. - color (string; optional): 当前节点颜色,可用于表达节点状态,常用方案有`'blue'`(进行中或默认状态)、`'green'`(已完成状态)、`'red'`(警告或错误状态)、`'grey'`(未完成或失效状态). - icon (a list of or a singular dash component, string or number; optional): 组件型,自定义作为图标的元素. - label (a list of or a singular dash component, string or number; optional): 组件型,当前节点标签内容. - position (a value equal to: 'left', 'right'; optional): 当前节点位置,可选项有`'left'`、`'right'`. - mode (a value equal to: 'left', 'alternate', 'right'; default 'left'): 时间轴与内容的相对位置,可选项有`'left'`、`'alternate'`、`'right'`. - pending (a list of or a singular dash component, string or number; optional): 组件型,设置时间轴末尾额外幽灵节点标题内容,默认不添加. - pendingDot (a list of or a singular dash component, string or number; optional): 组件型,自定义幽灵节点图标. - reverse (boolean; default False): 是否逆序排列时间轴 默认值:`False`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [ 'items[].content', 'items[].icon', 'items[].label', 'pending', 'pendingDot', ] _base_nodes = ['pending', 'pendingDot', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdTimeline' Items = TypedDict( 'Items', { 'content': NotRequired[ComponentType], 'color': NotRequired[str], 'icon': NotRequired[ComponentType], 'label': NotRequired[ComponentType], 'position': NotRequired[Literal['left', 'right']], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, items: typing.Optional[typing.Sequence['Items']] = None, mode: typing.Optional[Literal['left', 'alternate', 'right']] = None, pending: typing.Optional[ComponentType] = None, pendingDot: typing.Optional[ComponentType] = None, reverse: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'items', 'mode', 'pending', 'pendingDot', 'reverse', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'items', 'mode', 'pending', 'pendingDot', 'reverse', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} for k in ['items']: if k not in args: raise TypeError('Required argument `' + k + '` was not specified.') super(AntdTimeline, self).__init__(**args) setattr(AntdTimeline, '__init__', _explicitize_args(AntdTimeline.__init__)) ================================================ FILE: feffery_antd_components/AntdTitle.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTitle(Component): """An AntdTitle component. 标题组件AntdTitle Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - level (number; default 1): 标题级别,可选项有`1`、`2`、`3`、`4`、`5` 默认值:`1`. - code (boolean; optional): 是否渲染为代码形式. - copyable (boolean; optional): 是否开启快捷复制功能. - strikethrough (boolean; optional): 是否渲染为删除线形式. - disabled (boolean; optional): 是否渲染为禁用形式. - mark (boolean; optional): 是否渲染为高亮形式. - strong (boolean; optional): 是否渲染为加粗形式. - italic (boolean; optional): 是否渲染为斜体形式. - underline (boolean; optional): 是否渲染为下划线形式. - keyboard (boolean; optional): 是否渲染为键盘形式. - type (a value equal to: 'secondary', 'success', 'warning', 'danger'; optional): 设置内容特殊状态形式,可选项有`'secondary'`、`'success'`、`'warning'`、`'danger'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdTitle' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, level: typing.Optional[NumberType] = None, code: typing.Optional[bool] = None, copyable: typing.Optional[bool] = None, strikethrough: typing.Optional[bool] = None, disabled: typing.Optional[bool] = None, mark: typing.Optional[bool] = None, strong: typing.Optional[bool] = None, italic: typing.Optional[bool] = None, underline: typing.Optional[bool] = None, keyboard: typing.Optional[bool] = None, type: typing.Optional[Literal['secondary', 'success', 'warning', 'danger']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'locale', 'level', 'code', 'copyable', 'strikethrough', 'disabled', 'mark', 'strong', 'italic', 'underline', 'keyboard', 'type', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'locale', 'level', 'code', 'copyable', 'strikethrough', 'disabled', 'mark', 'strong', 'italic', 'underline', 'keyboard', 'type', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdTitle, self).__init__(children=children, **args) setattr(AntdTitle, '__init__', _explicitize_args(AntdTitle.__init__)) ================================================ FILE: feffery_antd_components/AntdTooltip.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTooltip(Component): """An AntdTooltip component. 文字提示组件AntdTooltip Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,文字提示挂载目标. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - styles (dict; optional): 细分控制子元素css样式. `styles` is a dict with keys: - root (dict; optional): 根元素(包含箭头、内容元素)css样式. - body (dict; optional): 内容元素css样式. - classNames (dict; optional): 细分控制子元素css类名. `classNames` is a dict with keys: - root (string; optional): 根元素(包含箭头、内容元素)css类名. - body (string; optional): 内容元素css类名. - title (a list of or a singular dash component, string or number; optional): 组件型,文字提示内容. - placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'; default 'top'): 文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` 默认值:`'top'`. - color (string; optional): 背景颜色. - mouseEnterDelay (number; default 0.1): 鼠标移入到文字提示弹出延时,单位:秒 默认值:`0.1`. - mouseLeaveDelay (number; default 0.1): 鼠标移出到文字提示消失延时,单位:秒 默认值:`0.1`. - trigger (a value equal to: 'hover', 'focus', 'click' | list of a value equal to: 'hover', 'focus', 'click's; default 'hover'): 触发方式,可选项有`'hover'`、`'focus'`、`'click'`,可多选 默认值:`'hover'`. - zIndex (number; optional): 文字提示卡片z-index. - arrow (a value equal to: 'show', 'hide', 'center'; default 'show'): 文字提示卡片附带箭头显示形式,可选项有`'show'`、`'hide'`、`'center'` 默认值:`'show'`. - fresh (boolean; default False): 是否始终保持更新内容 默认值:`False`. - open (boolean; default False): 监听或设置当前文字提示卡片的展开状态 默认值:`False`. - permanent (boolean; default False): 是否保持文字提示卡片处于`open`对应状态不变 默认值:`False`. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 文字提示卡片展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading.""" _children_props: typing.List[str] = ['title'] _base_nodes = ['title', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdTooltip' Styles = TypedDict('Styles', {'root': NotRequired[dict], 'body': NotRequired[dict]}) ClassNames = TypedDict('ClassNames', {'root': NotRequired[str], 'body': NotRequired[str]}) LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, styles: typing.Optional['Styles'] = None, classNames: typing.Optional['ClassNames'] = None, title: typing.Optional[ComponentType] = None, placement: typing.Optional[ Literal[ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight' ] ] = None, color: typing.Optional[str] = None, mouseEnterDelay: typing.Optional[NumberType] = None, mouseLeaveDelay: typing.Optional[NumberType] = None, trigger: typing.Optional[ typing.Union[ Literal['hover', 'focus', 'click'], typing.Sequence[Literal['hover', 'focus', 'click']], ] ] = None, zIndex: typing.Optional[NumberType] = None, arrow: typing.Optional[Literal['show', 'hide', 'center']] = None, fresh: typing.Optional[bool] = None, open: typing.Optional[bool] = None, permanent: typing.Optional[bool] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, loading_state: typing.Optional['LoadingState'] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'title', 'placement', 'color', 'mouseEnterDelay', 'mouseLeaveDelay', 'trigger', 'zIndex', 'arrow', 'fresh', 'open', 'permanent', 'popupContainer', 'data-*', 'aria-*', 'loading_state', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'title', 'placement', 'color', 'mouseEnterDelay', 'mouseLeaveDelay', 'trigger', 'zIndex', 'arrow', 'fresh', 'open', 'permanent', 'popupContainer', 'data-*', 'aria-*', 'loading_state', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdTooltip, self).__init__(children=children, **args) setattr(AntdTooltip, '__init__', _explicitize_args(AntdTooltip.__init__)) ================================================ FILE: feffery_antd_components/AntdTour.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTour(Component): """An AntdTour component. 漫游式引导组件AntdTour Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - steps (list of dicts; optional): 配置引导步骤. `steps` is a list of dicts with keys: - targetId (string; optional): 当前步骤目标元素id,优先级高于`targetSelector`. - targetSelector (string; optional): 定位当前步骤目标元素的javascript代码字符串. - arrow (dict; optional): 配置当前步骤箭头 默认值:`True`. `arrow` is a boolean Or dict with keys: - pointAtCenter (boolean; optional): 箭头是否指向目标中心. - cover (a list of or a singular dash component, string or number; optional): 组件型,当前步骤弹框的封面内容. - title (a list of or a singular dash component, string or number; optional): 组件型,当前步骤弹框的标题内容. - description (a list of or a singular dash component, string or number; optional): 组件型,当前步骤弹框的描述内容. - placement (a value equal to: 'center', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'; optional): 当前引导步骤弹框相对目标元素的位置,可选项有`'center'`、`'left'`、`'leftTop'`、`'leftBottom'`、`'right'`、`'rightTop'`、`'rightBottom'`、`'top'`、`'topLeft'`、`'topRight'`、`'bottom'`、`'bottomLeft'`、`'bottomRight'`. - mask (dict; optional): 配置当前步骤蒙版层 默认值:`True`. `mask` is a boolean | dict with keys: - style (dict; optional): 当前步骤蒙版层css样式. - color (string; optional): 当前步骤蒙版层颜色. - type (a value equal to: 'default', 'primary'; optional): 当前步骤弹框类型,可选项有`'default'`、`'primary'` 默认值:`'default'`. - nextButtonProps (dict; optional): 配置当前步骤下一步按钮. `nextButtonProps` is a dict with keys: - children (a list of or a singular dash component, string or number; optional): 组件型,按钮内嵌元素. - prevButtonProps (dict; optional): 配置当前步骤上一步按钮. `prevButtonProps` is a dict with keys: - children (a list of or a singular dash component, string or number; optional): 组件型,按钮内嵌元素. - arrow (dict; default True): 统一配置引导步骤弹框箭头 默认值:`True`. `arrow` is a boolean | dict with keys: - pointAtCenter (boolean; optional): 箭头是否指向目标中心. - placement (a value equal to: 'center', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'; default 'bottom'): 统一配置引导步骤弹框相对于目标元素的展开方向,可选项有`'center'`、`'left'`、`'leftTop'`、`'leftBottom'`、`'right'`、`'rightTop'`、`'rightBottom'`、`'top'`、`'topLeft'`、`'topRight'`、`'bottom'`、`'bottomLeft'`、`'bottomRight'` 默认值:`'bottom'`. - mask (dict; default True): 统一配置引导弹框蒙版 默认值:`True`. `mask` is a boolean | dict with keys: - style (dict; optional): 蒙版层css样式. - color (string; optional): 蒙版层颜色. - type (a value equal to: 'default', 'primary'; default 'default'): 统一设置引导步骤弹框类型,可选项有`'default'`、`'primary'` 默认值:`'default'`. - open (boolean; default False): 监听或设置当前漫游式引导的打开状态 默认值:`False`. - current (number; optional): 监听或设置当前漫游式引导所在步骤序号. - zIndex (number; default 1001): 当前漫游式引导z-index 默认值:`1001`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [ 'steps[].cover', 'steps[].title', 'steps[].description', 'steps[].nextButtonProps.children', 'steps[].prevButtonProps.children', ] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdTour' StepsArrow = TypedDict('StepsArrow', {'pointAtCenter': NotRequired[bool]}) StepsMask = TypedDict('StepsMask', {'style': NotRequired[dict], 'color': NotRequired[str]}) StepsNextButtonProps = TypedDict( 'StepsNextButtonProps', {'children': NotRequired[ComponentType]} ) StepsPrevButtonProps = TypedDict( 'StepsPrevButtonProps', {'children': NotRequired[ComponentType]} ) Steps = TypedDict( 'Steps', { 'targetId': NotRequired[str], 'targetSelector': NotRequired[str], 'arrow': NotRequired[typing.Union[bool, 'StepsArrow']], 'cover': NotRequired[ComponentType], 'title': NotRequired[ComponentType], 'description': NotRequired[ComponentType], 'placement': NotRequired[ Literal[ 'center', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight', ] ], 'mask': NotRequired[typing.Union[bool, 'StepsMask']], 'type': NotRequired[Literal['default', 'primary']], 'nextButtonProps': NotRequired['StepsNextButtonProps'], 'prevButtonProps': NotRequired['StepsPrevButtonProps'], }, ) Arrow = TypedDict('Arrow', {'pointAtCenter': NotRequired[bool]}) Mask = TypedDict('Mask', {'style': NotRequired[dict], 'color': NotRequired[str]}) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, steps: typing.Optional[typing.Sequence['Steps']] = None, arrow: typing.Optional[typing.Union[bool, 'Arrow']] = None, placement: typing.Optional[ Literal[ 'center', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight', ] ] = None, mask: typing.Optional[typing.Union[bool, 'Mask']] = None, type: typing.Optional[Literal['default', 'primary']] = None, open: typing.Optional[bool] = None, current: typing.Optional[NumberType] = None, zIndex: typing.Optional[NumberType] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'locale', 'steps', 'arrow', 'placement', 'mask', 'type', 'open', 'current', 'zIndex', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'locale', 'steps', 'arrow', 'placement', 'mask', 'type', 'open', 'current', 'zIndex', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdTour, self).__init__(**args) setattr(AntdTour, '__init__', _explicitize_args(AntdTour.__init__)) ================================================ FILE: feffery_antd_components/AntdTransfer.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTransfer(Component): """An AntdTransfer component. 穿梭框组件AntdTransfer Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - dataSource (list of dicts; optional): 配置选项. `dataSource` is a list of dicts with keys: - key (string | number; optional): 当前选项唯一识别id. - title (a list of or a singular dash component, string or number; optional): 组件型,当前选项标题内容. - disabled (boolean; optional): 是否禁用当前选项 默认值:`False`. - selectionsIcon (a list of or a singular dash component, string or number; optional): 组件型,自定义下拉菜单图标. - height (string | number; optional): 穿梭框整体高度. - pagination (dict; default False): 选项分页展示配置 默认值:`False`. `pagination` is a boolean | dict with keys: - pageSize (number; optional): 每页最大选项数. - oneWay (boolean; default False): 是否启用单向模式 默认值:`False`. - operations (list of a list of or a singular dash component, string or numbers; default ['', '']): 左右移动操作按钮内容 默认值:`'['', '']'`. - showSearch (boolean; default False): 是否显示搜索框 默认值:`False`. - optionFilterMode (a value equal to: 'case-insensitive', 'case-sensitive', 'regex'; default 'case-insensitive'): 搜索匹配模式,可选项有`'case-insensitive'`(大小写不敏感)、`'case-sensitive'`(大小写敏感)、`'regex'`(正则表达式) 默认值:`'case-insensitive'`. - showSelectAll (boolean; default True): 是否显示全选勾选框 默认值:`True`. - titles (list of a list of or a singular dash component, string or numbers; optional): 左右标题内容. - targetKeys (list of number | strings; optional): 监听或设置右侧区域已选项`key`值. - moveDirection (a value equal to: 'left', 'right'; optional): 监听最近一次选项移动对应方向,可选项有`'left'`、`'right'`. - moveKeys (list of number | strings; optional): 监听最近一次选项移动涉及的选项`key`值. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - readOnly (boolean; default False): 是否渲染为只读状态 默认值:`False`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'targetKeys's; optional): 开启属性持久化功能的若干属性名,可选项有`'targetKeys'` 默认值:`['targetKeys']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = [ 'dataSource[].title', 'selectionsIcon', 'operations', 'titles', ] _base_nodes = ['selectionsIcon', 'operations', 'titles', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdTransfer' DataSource = TypedDict( 'DataSource', { 'key': NotRequired[typing.Union[str, NumberType]], 'title': NotRequired[ComponentType], 'disabled': NotRequired[bool], }, ) Pagination = TypedDict('Pagination', {'pageSize': NotRequired[NumberType]}) LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, dataSource: typing.Optional[typing.Sequence['DataSource']] = None, selectionsIcon: typing.Optional[ComponentType] = None, height: typing.Optional[typing.Union[str, NumberType]] = None, pagination: typing.Optional[typing.Union[bool, 'Pagination']] = None, oneWay: typing.Optional[bool] = None, operations: typing.Optional[typing.Sequence[ComponentType]] = None, showSearch: typing.Optional[bool] = None, optionFilterMode: typing.Optional[ Literal['case-insensitive', 'case-sensitive', 'regex'] ] = None, showSelectAll: typing.Optional[bool] = None, titles: typing.Optional[typing.Sequence[ComponentType]] = None, targetKeys: typing.Optional[typing.Sequence[typing.Union[NumberType, str]]] = None, moveDirection: typing.Optional[Literal['left', 'right']] = None, moveKeys: typing.Optional[typing.Sequence[typing.Union[NumberType, str]]] = None, disabled: typing.Optional[bool] = None, status: typing.Optional[Literal['error', 'warning']] = None, readOnly: typing.Optional[bool] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, loading_state: typing.Optional['LoadingState'] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['targetKeys']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'locale', 'dataSource', 'selectionsIcon', 'height', 'pagination', 'oneWay', 'operations', 'showSearch', 'optionFilterMode', 'showSelectAll', 'titles', 'targetKeys', 'moveDirection', 'moveKeys', 'disabled', 'status', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'locale', 'dataSource', 'selectionsIcon', 'height', 'pagination', 'oneWay', 'operations', 'showSearch', 'optionFilterMode', 'showSelectAll', 'titles', 'targetKeys', 'moveDirection', 'moveKeys', 'disabled', 'status', 'readOnly', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdTransfer, self).__init__(**args) setattr(AntdTransfer, '__init__', _explicitize_args(AntdTransfer.__init__)) ================================================ FILE: feffery_antd_components/AntdTree.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTree(Component): """An AntdTree component. 树形控件组件AntdTree Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - treeDataMode (a value equal to: 'tree', 'flat'; default 'tree'): 对应`treeData`格式的渲染模式,可选项有`'tree'`(树形模式)、`'flat'`(扁平模式) 默认值:`'tree'`. - treeData (list; optional): 定义构造树所需的数据结构,与`treeDataMode`一致. - treeNodeKeyToTitle (dict with strings as keys and values of type a list of or a singular dash component, string or number; optional): 针对树结构中的指定节点,定义作为标题的组件型内容,优先级高于`treeData`中对应的`title`值. - showIcon (boolean; default False): 是否渲染节点额外图标 默认值:`False`. - selectable (boolean; default True): 节点是否可点击选择 默认值:`True`. - multiple (boolean; default False): 节点是否允许多选 默认值:`False`. - checkable (boolean; default False): 节点是否可勾选 默认值:`False`. - defaultExpandAll (boolean; default False): 初始化是否展开全部节点 默认值:`False`. - expandedKeys (list of strings; optional): 监听或设置已展开节点`key`值数组. - defaultExpandedKeys (list of strings; optional): 初始化已展开节点`key`值数组. - defaultExpandParent (boolean; default False): 初始化是否展开处于展开状态节点的父节点 默认值:`True`. - selectedKeys (list of strings; optional): 监听或设置已选择节点`key`值数组. - defaultSelectedKeys (list of strings; optional): 初始化已选择节点`key`值数组. - checkedKeys (list of strings; optional): 监听或设置已勾选节点`key`值数组. - defaultCheckedKeys (list of strings; optional): 初始化已勾选节点`key`值数组. - halfCheckedKeys (list of strings; optional): 监听或设置处于半勾选状态下的节点`key`值数组. - checkStrictly (boolean; default False): 节点与其后代节点之间的选择行为是否彼此独立 默认值:`False`. - showLine (dict; default { showLeafIcon: False }): 是否显示连接线. `showLine` is a boolean | dict with keys: - showLeafIcon (boolean; optional): 叶节点是否渲染前缀图标. - switcherIcon (a list of or a singular dash component, string or number; optional): 组件型,自定义树节点的展开/折叠图标. - height (number; optional): 虚拟滚动模式下的组件最大像素高度,未设置时则不启用虚拟滚动功能. - draggable (boolean; default False): 节点是否可拖拽 默认值:`False`. - showDragIcon (boolean; default True): 开启节点拖拽功能后,是否为节点渲染拖拽图标 默认值:`True`. - dragInSameLevel (boolean; default False): 当`draggable=True`时,是否仅允许同级拖拽 默认值:`False`. - dragDisabledKeys (list of strings; optional): 禁止进行拖拽调整的节点`key`值数组 默认值:`[]`. - dropDisabledKeys (list of strings; optional): 禁止进行拖拽放置的节点`key`值数组 默认值:`[]`. - draggedNodeKey (string; optional): 监听最近一次被拖拽节点`key`值信息. - clickedContextMenu (dict; optional): 监听节点右键菜单项点击事件. `clickedContextMenu` is a dict with keys: - nodeKey (string; optional): 事件对应节点`key`值. - menuKey (string; optional): 事件对应右键菜单项`key`值. - timestamp (number; optional): 事件对应时间戳信息. - enableNodeFavorites (boolean; default False): 是否启用节点收藏功能 默认值:`False`. - favoritedKeys (list of strings; optional): 监听或设置已收藏节点`key`值数组. - scrollTarget (dict; optional): 执行滚动到指定节点的动作,每次执行完毕后会重置为空值. `scrollTarget` is a dict with keys: - key (string; required): 滚动目标节点`key`值. - align (a value equal to: 'top', 'bottom', 'auto'; optional): 滚动目标节点对齐位置,可选项有`'top'`、`'bottom'`、`'auto'` 默认值:`'auto'`. - offset (number; optional): 滚动后的像素偏移量. - searchKeyword (string | list of strings; optional): 快捷树搜索功能对应的单个关键词,或由多个关键词构成的数组. - caseSensitive (boolean; default True): 针对`searchKeyword`,是否大小写敏感 默认值:`True`. - highlightStyle (dict; default { fontWeight: 'bold', backgroundColor: 'transparent', padding: 0, color: '#ff5500',}): 快捷树搜索关键词匹配部分的高亮样式. - nodeCheckedSuffix (a list of or a singular dash component, string or number; optional): 组件型,节点勾选状态下的后缀元素. - nodeUncheckedSuffix (a list of or a singular dash component, string or number; optional): 组件型,节点非勾选状态下的后缀元素. - nodeCheckedStyle (dict; optional): 节点勾选状态下的css样式. - nodeUncheckedStyle (dict; optional): 节点非勾选状态下的css样式. - enableAsyncLoad (boolean; default False): 是否开启子节点异步加载功能,开启后无`children`属性,且未设置`isLeaf`为`True`的节点将可展开并触发`loadingNode`事件更新 默认值:`False`. - loadingNode (dict; optional): 监听触发异步数据加载的节点展开事件信息. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'selectedKeys', 'checkedKeys', 'expandedKeys', 'halfCheckedKeys's; optional): 开启属性持久化功能的若干属性名,可选项有`'selectedKeys'`、`'checkedKeys'`、`'expandedKeys'`、`'halfCheckedKeys'` 默认值:`['selectedKeys', 'checkedKeys', 'expandedKeys', 'halfCheckedKeys']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = [ 'treeNodeKeyToTitle{}', 'switcherIcon', 'nodeCheckedSuffix', 'nodeUncheckedSuffix', ] _base_nodes = ['switcherIcon', 'nodeCheckedSuffix', 'nodeUncheckedSuffix', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdTree' ShowLine = TypedDict('ShowLine', {'showLeafIcon': NotRequired[bool]}) ClickedContextMenu = TypedDict( 'ClickedContextMenu', { 'nodeKey': NotRequired[str], 'menuKey': NotRequired[str], 'timestamp': NotRequired[NumberType], }, ) ScrollTarget = TypedDict( 'ScrollTarget', { 'key': str, 'align': NotRequired[Literal['top', 'bottom', 'auto']], 'offset': NotRequired[NumberType], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, treeDataMode: typing.Optional[Literal['tree', 'flat']] = None, treeData: typing.Optional[typing.Union[typing.Any, typing.Sequence[typing.Any]]] = None, treeNodeKeyToTitle: typing.Optional[ typing.Dict[typing.Union[str, float, int], ComponentType] ] = None, showIcon: typing.Optional[bool] = None, selectable: typing.Optional[bool] = None, multiple: typing.Optional[bool] = None, checkable: typing.Optional[bool] = None, defaultExpandAll: typing.Optional[bool] = None, expandedKeys: typing.Optional[typing.Sequence[str]] = None, defaultExpandedKeys: typing.Optional[typing.Sequence[str]] = None, defaultExpandParent: typing.Optional[bool] = None, selectedKeys: typing.Optional[typing.Sequence[str]] = None, defaultSelectedKeys: typing.Optional[typing.Sequence[str]] = None, checkedKeys: typing.Optional[typing.Sequence[str]] = None, defaultCheckedKeys: typing.Optional[typing.Sequence[str]] = None, halfCheckedKeys: typing.Optional[typing.Sequence[str]] = None, checkStrictly: typing.Optional[bool] = None, showLine: typing.Optional[typing.Union[bool, 'ShowLine']] = None, switcherIcon: typing.Optional[ComponentType] = None, height: typing.Optional[NumberType] = None, draggable: typing.Optional[bool] = None, showDragIcon: typing.Optional[bool] = None, dragInSameLevel: typing.Optional[bool] = None, dragDisabledKeys: typing.Optional[typing.Sequence[str]] = None, dropDisabledKeys: typing.Optional[typing.Sequence[str]] = None, draggedNodeKey: typing.Optional[str] = None, clickedContextMenu: typing.Optional['ClickedContextMenu'] = None, enableNodeFavorites: typing.Optional[bool] = None, favoritedKeys: typing.Optional[typing.Sequence[str]] = None, scrollTarget: typing.Optional['ScrollTarget'] = None, searchKeyword: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, caseSensitive: typing.Optional[bool] = None, highlightStyle: typing.Optional[dict] = None, nodeCheckedSuffix: typing.Optional[ComponentType] = None, nodeUncheckedSuffix: typing.Optional[ComponentType] = None, nodeCheckedStyle: typing.Optional[dict] = None, nodeUncheckedStyle: typing.Optional[dict] = None, enableAsyncLoad: typing.Optional[bool] = None, loadingNode: typing.Optional[dict] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[ typing.Sequence[ Literal['selectedKeys', 'checkedKeys', 'expandedKeys', 'halfCheckedKeys'] ] ] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'treeDataMode', 'treeData', 'treeNodeKeyToTitle', 'showIcon', 'selectable', 'multiple', 'checkable', 'defaultExpandAll', 'expandedKeys', 'defaultExpandedKeys', 'defaultExpandParent', 'selectedKeys', 'defaultSelectedKeys', 'checkedKeys', 'defaultCheckedKeys', 'halfCheckedKeys', 'checkStrictly', 'showLine', 'switcherIcon', 'height', 'draggable', 'showDragIcon', 'dragInSameLevel', 'dragDisabledKeys', 'dropDisabledKeys', 'draggedNodeKey', 'clickedContextMenu', 'enableNodeFavorites', 'favoritedKeys', 'scrollTarget', 'searchKeyword', 'caseSensitive', 'highlightStyle', 'nodeCheckedSuffix', 'nodeUncheckedSuffix', 'nodeCheckedStyle', 'nodeUncheckedStyle', 'enableAsyncLoad', 'loadingNode', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'treeDataMode', 'treeData', 'treeNodeKeyToTitle', 'showIcon', 'selectable', 'multiple', 'checkable', 'defaultExpandAll', 'expandedKeys', 'defaultExpandedKeys', 'defaultExpandParent', 'selectedKeys', 'defaultSelectedKeys', 'checkedKeys', 'defaultCheckedKeys', 'halfCheckedKeys', 'checkStrictly', 'showLine', 'switcherIcon', 'height', 'draggable', 'showDragIcon', 'dragInSameLevel', 'dragDisabledKeys', 'dropDisabledKeys', 'draggedNodeKey', 'clickedContextMenu', 'enableNodeFavorites', 'favoritedKeys', 'scrollTarget', 'searchKeyword', 'caseSensitive', 'highlightStyle', 'nodeCheckedSuffix', 'nodeUncheckedSuffix', 'nodeCheckedStyle', 'nodeUncheckedStyle', 'enableAsyncLoad', 'loadingNode', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdTree, self).__init__(**args) setattr(AntdTree, '__init__', _explicitize_args(AntdTree.__init__)) ================================================ FILE: feffery_antd_components/AntdTreeSelect.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdTreeSelect(Component): """An AntdTreeSelect component. 树选择组件AntdTreeSelect Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - popupClassName (string; optional): 展开菜单css类名. - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - treeDataMode (a value equal to: 'tree', 'flat'; default 'tree'): 对应`treeData`格式的渲染模式,可选项有`'tree'`(树形模式)、`'flat'`(扁平模式) 默认值:`'tree'`. - treeData (list; required): 定义构造树所需的数据结构,与`treeDataMode`一致. - treeNodeKeyToTitle (dict with strings as keys and values of type a list of or a singular dash component, string or number; optional): 针对树结构中的指定节点,定义作为标题的组件型内容,优先级高于`treeData`中对应的`title`值. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - size (a value equal to: 'small', 'middle', 'large'; default 'middle'): 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` 默认值:`'middle'`. - bordered (boolean; default True): 是否显示边框,设置为`True`时等价于`variant='outlined'` 默认值:`True`. - variant (a value equal to: 'outlined', 'borderless', 'filled', 'underlined'; optional): 设置形态变体类型,可选的有'outlined'、'borderless'、'filled'、`'underlined'`,其中'outlined'等价于bordered=True,优先级高于bordered. - placeholder (string; optional): 输入框占位文字内容. - placement (a value equal to: 'bottomLeft', 'bottomRight', 'topLeft', 'topRight'; default 'bottomLeft'): 选择菜单展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` 默认值:`'bottomLeft'`. - treeLine (boolean; default False): 是否显示连接线 默认值:`False`. - value (string | number | list of string | numbers; optional): 监听或设置已选值. - defaultValue (string | number | list of string | numbers; optional): 初始化已选值. - maxCount (number; optional): 当`multiple=True`时,可选中的最大数量 如果`showCheckedStrategy='show-all'`且`treeCheckStrictly=False`,或者`showCheckedStrategy='show-parent'`,则`maxCount`无效. - maxTagCount (number | a value equal to: 'responsive'; optional): 当`multiple=True`时,已选值tag展示的最大数量. - maxTagPlaceholder (a list of or a singular dash component, string or number; optional): 当`multiple=True`时,隐藏已选值tag时显示的内容. - maxTagTextLength (number; optional): 当`multiple=True`时,最大显示的已选值tag文本长度. - listHeight (number; default 256): 选择菜单最大像素高度 默认值:`256`. - multiple (boolean; default False): 是否开启多选模式 默认值:`False`. - suffixIcon (a list of or a singular dash component, string or number; optional): 组件型,自定义的选择框后缀图标. - switcherIcon (a list of or a singular dash component, string or number; optional): 组件型,自定义树节点的展开/折叠图标. - treeCheckable (boolean; default False): 树节点是否可勾选 默认值:`False`. - treeCheckStrictly (boolean; default False): 节点与其后代节点之间的选择行为是否彼此独立 默认值:`False`. - treeDefaultExpandAll (boolean; default False): 初始化是否展开全部节点 默认值:`False`. - treeDefaultExpandedKeys (list of strings; optional): 初始化已展开节点`key`值数组. - treeExpandedKeys (list of strings; optional): 监听或设置已展开节点`key`值数组. - virtual (boolean; default True): 是否开启虚拟滚动 默认值:`True`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - allowClear (boolean; default True): 是否允许一键清空已选值 默认值:`True`. - treeNodeFilterProp (a value equal to: 'title', 'value'; default 'value'): 基于搜索框中输入内容进行搜索的目标字段,可选项有`'value'`、`'title'` 默认值:`'value'`. - treeNodeFilterMode (a value equal to: 'case-insensitive', 'case-sensitive', 'regex'; default 'case-insensitive'): 搜索匹配模式,可选项有`'case-insensitive'`(大小写不敏感)、`'case-sensitive'`(大小写敏感)、`'regex'`(正则表达式) 默认值:`'case-insensitive'`. - autoClearSearchValue (boolean; default True): 当`multiple=True`时,设置是否在选中项后自动清空搜索框中的内容 默认值:`True`. - showCheckedStrategy (a value equal to: 'show-all', 'show-parent', 'show-child'; default 'show-all'): 已选项回填搜索框策略,可选项有`'show-all'`、`'show-parent'`、`'show-child'` 默认值:`'show-all'`. - dropdownBefore (a list of or a singular dash component, string or number; optional): 组件型,选择菜单前缀内容. - dropdownAfter (a list of or a singular dash component, string or number; optional): 组件型,选择菜单后缀内容. - prefix (a list of or a singular dash component, string or number; optional): 组件型,前缀内嵌内容. - readOnly (boolean; optional): 是否渲染为只读状态 默认值:`False`. - enableAsyncLoad (boolean; default False): 是否开启子节点异步加载功能,开启后无`children`属性,且未设置`isLeaf`为`True`的节点将可展开并触发`loadingNode`事件更新 默认值:`False`. - loadingNode (dict; optional): 监听触发异步数据加载的节点展开事件信息. - popupContainer (a value equal to: 'parent', 'body'; default 'body'): 相关展开层锚定策略,可选项有`'parent'`、`'body'` 默认值:`'body'`. - batchPropsNames (list of strings; optional): 需要纳入[批量属性监听](/batch-props-values)的若干属性名. - batchPropsValues (dict; optional): 监听`batchPropsNames`中指定的若干属性值. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading. - persistence (boolean | string | number; optional): 是否开启[属性持久化](/prop-persistence). - persisted_props (list of a value equal to: 'value's; optional): 开启属性持久化功能的若干属性名,可选项有`'value'` 默认值:`['value']`. - persistence_type (a value equal to: 'local', 'session', 'memory'; optional): 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) 默认值:`'local'`.""" _children_props: typing.List[str] = [ 'treeNodeKeyToTitle{}', 'maxTagPlaceholder', 'suffixIcon', 'switcherIcon', 'dropdownBefore', 'dropdownAfter', 'prefix', ] _base_nodes = [ 'maxTagPlaceholder', 'suffixIcon', 'switcherIcon', 'dropdownBefore', 'dropdownAfter', 'prefix', 'children', ] _namespace = 'feffery_antd_components' _type = 'AntdTreeSelect' LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, popupClassName: typing.Optional[str] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, treeDataMode: typing.Optional[Literal['tree', 'flat']] = None, treeData: typing.Optional[typing.Union[typing.Any, typing.Sequence[typing.Any]]] = None, treeNodeKeyToTitle: typing.Optional[ typing.Dict[typing.Union[str, float, int], ComponentType] ] = None, disabled: typing.Optional[bool] = None, size: typing.Optional[Literal['small', 'middle', 'large']] = None, bordered: typing.Optional[bool] = None, variant: typing.Optional[Literal['outlined', 'borderless', 'filled', 'underlined']] = None, placeholder: typing.Optional[str] = None, placement: typing.Optional[ Literal['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] ] = None, treeLine: typing.Optional[bool] = None, value: typing.Optional[ typing.Union[str, NumberType, typing.Sequence[typing.Union[str, NumberType]]] ] = None, defaultValue: typing.Optional[ typing.Union[str, NumberType, typing.Sequence[typing.Union[str, NumberType]]] ] = None, maxCount: typing.Optional[NumberType] = None, maxTagCount: typing.Optional[typing.Union[NumberType, Literal['responsive']]] = None, maxTagPlaceholder: typing.Optional[ComponentType] = None, maxTagTextLength: typing.Optional[NumberType] = None, listHeight: typing.Optional[NumberType] = None, multiple: typing.Optional[bool] = None, suffixIcon: typing.Optional[ComponentType] = None, switcherIcon: typing.Optional[ComponentType] = None, treeCheckable: typing.Optional[bool] = None, treeCheckStrictly: typing.Optional[bool] = None, treeDefaultExpandAll: typing.Optional[bool] = None, treeDefaultExpandedKeys: typing.Optional[typing.Sequence[str]] = None, treeExpandedKeys: typing.Optional[typing.Sequence[str]] = None, virtual: typing.Optional[bool] = None, status: typing.Optional[Literal['error', 'warning']] = None, allowClear: typing.Optional[bool] = None, treeNodeFilterProp: typing.Optional[Literal['title', 'value']] = None, treeNodeFilterMode: typing.Optional[ Literal['case-insensitive', 'case-sensitive', 'regex'] ] = None, autoClearSearchValue: typing.Optional[bool] = None, showCheckedStrategy: typing.Optional[ Literal['show-all', 'show-parent', 'show-child'] ] = None, dropdownBefore: typing.Optional[ComponentType] = None, dropdownAfter: typing.Optional[ComponentType] = None, prefix: typing.Optional[ComponentType] = None, readOnly: typing.Optional[bool] = None, enableAsyncLoad: typing.Optional[bool] = None, loadingNode: typing.Optional[dict] = None, popupContainer: typing.Optional[Literal['parent', 'body']] = None, batchPropsNames: typing.Optional[typing.Sequence[str]] = None, batchPropsValues: typing.Optional[dict] = None, loading_state: typing.Optional['LoadingState'] = None, persistence: typing.Optional[typing.Union[bool, str, NumberType]] = None, persisted_props: typing.Optional[typing.Sequence[Literal['value']]] = None, persistence_type: typing.Optional[Literal['local', 'session', 'memory']] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'treeDataMode', 'treeData', 'treeNodeKeyToTitle', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'treeLine', 'value', 'defaultValue', 'maxCount', 'maxTagCount', 'maxTagPlaceholder', 'maxTagTextLength', 'listHeight', 'multiple', 'suffixIcon', 'switcherIcon', 'treeCheckable', 'treeCheckStrictly', 'treeDefaultExpandAll', 'treeDefaultExpandedKeys', 'treeExpandedKeys', 'virtual', 'status', 'allowClear', 'treeNodeFilterProp', 'treeNodeFilterMode', 'autoClearSearchValue', 'showCheckedStrategy', 'dropdownBefore', 'dropdownAfter', 'prefix', 'readOnly', 'enableAsyncLoad', 'loadingNode', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'popupClassName', 'name', 'enableBatchControl', 'locale', 'treeDataMode', 'treeData', 'treeNodeKeyToTitle', 'disabled', 'size', 'bordered', 'variant', 'placeholder', 'placement', 'treeLine', 'value', 'defaultValue', 'maxCount', 'maxTagCount', 'maxTagPlaceholder', 'maxTagTextLength', 'listHeight', 'multiple', 'suffixIcon', 'switcherIcon', 'treeCheckable', 'treeCheckStrictly', 'treeDefaultExpandAll', 'treeDefaultExpandedKeys', 'treeExpandedKeys', 'virtual', 'status', 'allowClear', 'treeNodeFilterProp', 'treeNodeFilterMode', 'autoClearSearchValue', 'showCheckedStrategy', 'dropdownBefore', 'dropdownAfter', 'prefix', 'readOnly', 'enableAsyncLoad', 'loadingNode', 'popupContainer', 'batchPropsNames', 'batchPropsValues', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} for k in ['treeData']: if k not in args: raise TypeError('Required argument `' + k + '` was not specified.') super(AntdTreeSelect, self).__init__(**args) setattr(AntdTreeSelect, '__init__', _explicitize_args(AntdTreeSelect.__init__)) ================================================ FILE: feffery_antd_components/AntdUpload.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdUpload(Component): """An AntdUpload component. 文件上传组件AntdUpload Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - className (string | dict; optional): 当前组件css类名,支持[动态css](/advanced-classname). - name (string; optional): 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值. - enableBatchControl (boolean; default True): 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 默认值:`True`. - locale (a value equal to: 'zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr'; default 'zh-cn'): 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) 默认值:`'zh-cn'`. - apiUrl (string; optional): 文件上传服务接口地址. - apiUrlExtraParams (dict; optional): 文件上传服务接口额外参数. - headers (dict; optional): 文件上传服务接口额外headers参数. - withCredentials (boolean; default False): 是否在请求上传服务接口时自动携带cookies等凭据信息 默认值:`False`. - withOriginFileObj (boolean; default False): `listUploadTaskRecord`监听结果中是否额外记录浏览器原生`originFileObj`相关信息 默认值:`False`. - downloadUrl (string; optional): 对应已上传文件的`GET`类型下载服务接口地址,自带参数`taskId`、`filename`. - downloadUrlExtraParams (dict; optional): 配合`downloadUrl`参数,设置文件下载服务接口额外参数. - downloadUrlFromBackend (boolean; default False): 是否将文件上传接口返回信息中的`url`属性作为下载链接地址 默认值:`False`. - fileListMaxLength (number; optional): 限制已上传文件列表长度上限. - fileTypes (list of strings; optional): 允许上传的文件后缀名列表,默认不限制. - buttonContent (a list of or a singular dash component, string or number; optional): 组件型,自定义上传按钮内容. - buttonIcon (a list of or a singular dash component, string or number; optional): 组件型,自定义上传按钮图标. - buttonProps (dict; optional): 配置上传按钮相关参数. `buttonProps` is a dict with keys: - size (a value equal to: 'default', 'small', 'large'; optional): 按钮尺寸规格,可选项有`'default'`、`'small'`、`'large'` 默认值:`'default'`. - type (a value equal to: 'primary', 'ghost', 'dashed', 'link', 'text', 'default'; optional): 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` 默认值:`'default'`. - danger (boolean; optional): 按钮是否渲染危险状态 默认值:`False`. - block (boolean; optional): 按钮是否撑满父元素 默认值:`False`. - style (dict; optional): 按钮css样式. - className (string; optional): 按钮css类名. - uploadId (string; optional): 自定义当前组件发起文件上传请求时携带的`uploadId`参数,可用于辅助后端创建文件上传所在文件夹. - fileMaxSize (number; default 500): 文件上传尺寸上限,单位:兆. - multiple (boolean; default False): 是否开启多文件上传模式 默认值:`False`. - directory (boolean; default False): 是否开启文件夹上传模式 默认值:`False`. - failedTooltipInfo (string; optional): 文件上传失败消息提示文字内容 默认值:`'上传失败'`. - showUploadList (boolean; default True): 是否显示已上传文件列表 默认值:`True`. - confirmBeforeDelete (boolean; default False): 是否为已上传文件删除操作添加二次确认模态框 默认值:`False`. - showPercent (boolean; default False): 是否显示上传进度条 默认值:`False`. - progressProps (dict; optional): 配置上传进度条相关参数. `progressProps` is a dict with keys: - strokeColor (dict; optional): 进度条颜色. `strokeColor` is a string Or dict with keys: - from (string; optional): 渐变色开始颜色. - to (string; optional): 渐变色结束颜色. - strokeWidth (number; optional): 进度条像素宽度. - format (dict; optional): 进度文字格式. `format` is a dict with keys: - prefix (string; optional): 进度文字前缀内容. - suffix (string; optional): 进度文字后缀内容 默认值:`'%'`. - showSuccessMessage (boolean; default True): 是否在每个文件上传成功后,分别弹出消息提示 默认值:`True`. - showErrorMessage (boolean; default True): 是否在每个文件上传失败后,分别弹出消息提示 默认值:`True`. - pastable (boolean; default False): 是否开启粘贴上传,即本地复制文件后,在页面任意位置粘贴即可完成上传 默认值:`False`. - lastUploadTaskRecord (dict; optional): 监听最近一次文件上传任务相关信息. `lastUploadTaskRecord` is a dict with keys: - fileName (string; optional): 文件名称. - fileSize (number; optional): 文件大小. - completeTimestamp (number; optional): 上传完成时间戳. - taskStatus (string; optional): 上传任务状态,`'success'`表示成功,`'failed'`表示失败. - taskId (string; optional): 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息. - url (string; optional): 当前文件的下载链接. - uploadResponse (boolean | number | string | dict | list; optional): 上传任务的接口响应信息. | list of dicts with keys: - fileName (string; optional): 文件名称. - fileSize (number; optional): 文件大小. - completeTimestamp (number; optional): 上传完成时间戳. - taskStatus (string; optional): 上传任务状态,`'success'`表示成功,`'failed'`表示失败. - taskId (string; optional): 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息. - url (string; optional): 当前文件的下载链接. - uploadResponse (boolean | number | string | dict | list; optional): 上传任务的接口响应信息. - listUploadTaskRecord (list of dicts; optional): 监听当前已上传文件列表中上传任务相关信息. `listUploadTaskRecord` is a list of dicts with keys: - fileName (string; optional): 文件名称. - fileSize (number; optional): 文件大小. - completeTimestamp (number; optional): 上传完成时间戳. - taskStatus (string; optional): 上传任务状态,`'success'`表示成功,`'failed'`表示失败. - taskId (string; optional): 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息. - uid (string; optional): 当前文件上传唯一识别id,前端自动生成. - url (string; optional): 当前文件下载链接. - uploadResponse (boolean | number | string | dict | list; optional): 上传任务的接口响应信息. - originFileObj (boolean | number | string | dict | list; optional): 当`withOriginFileObj=True`时,监听当前文件上传任务对应的`originFileObj`主要信息. - defaultFileList (list of dicts; optional): 初始化文件列表展示信息. `defaultFileList` is a list of dicts with keys: - name (string; optional): 当前文件名称. - status (a value equal to: 'done', 'error', 'removed'; optional): 当前文件展示状态,可选项有`'done'`、`'error'`、`'removed'`. - uid (boolean | number | string | dict | list; optional): 当前文件唯一识别id. - url (string; optional): 当前文件下载链接. - taskId (string; optional): 若传入有效值,将作为当前组件的`uploadId`参数. - fileSize (number; optional): 当前文件大小. - disabled (boolean; default False): 是否禁用当前组件 默认值:`False`. - status (a value equal to: 'error', 'warning'; optional): 控制校验状态,可选项有`'error'`、`'warning'`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配. - loading_state (dict; optional) `loading_state` is a dict with keys: - is_loading (boolean; optional): Determines if the component is loading or not. - prop_name (string; optional): Holds which property is loading. - component_name (string; optional): Holds the name of the component that is loading.""" _children_props: typing.List[str] = ['buttonContent', 'buttonIcon'] _base_nodes = ['buttonContent', 'buttonIcon', 'children'] _namespace = 'feffery_antd_components' _type = 'AntdUpload' ButtonProps = TypedDict( 'ButtonProps', { 'size': NotRequired[Literal['default', 'small', 'large']], 'type': NotRequired[Literal['primary', 'ghost', 'dashed', 'link', 'text', 'default']], 'danger': NotRequired[bool], 'block': NotRequired[bool], 'style': NotRequired[dict], 'className': NotRequired[str], }, ) ProgressPropsStrokeColor = TypedDict( 'ProgressPropsStrokeColor', {'from': NotRequired[str], 'to': NotRequired[str]} ) ProgressPropsFormat = TypedDict( 'ProgressPropsFormat', {'prefix': NotRequired[str], 'suffix': NotRequired[str]} ) ProgressProps = TypedDict( 'ProgressProps', { 'strokeColor': NotRequired[typing.Union[str, 'ProgressPropsStrokeColor']], 'strokeWidth': NotRequired[NumberType], 'format': NotRequired['ProgressPropsFormat'], }, ) LastUploadTaskRecord = TypedDict( 'LastUploadTaskRecord', { 'fileName': NotRequired[str], 'fileSize': NotRequired[NumberType], 'completeTimestamp': NotRequired[NumberType], 'taskStatus': NotRequired[str], 'taskId': NotRequired[str], 'url': NotRequired[str], 'uploadResponse': NotRequired[typing.Any], }, ) ListUploadTaskRecord = TypedDict( 'ListUploadTaskRecord', { 'fileName': NotRequired[str], 'fileSize': NotRequired[NumberType], 'completeTimestamp': NotRequired[NumberType], 'taskStatus': NotRequired[str], 'taskId': NotRequired[str], 'uid': NotRequired[str], 'url': NotRequired[str], 'uploadResponse': NotRequired[typing.Any], 'originFileObj': NotRequired[typing.Any], }, ) DefaultFileList = TypedDict( 'DefaultFileList', { 'name': NotRequired[str], 'status': NotRequired[Literal['done', 'error', 'removed']], 'uid': NotRequired[typing.Any], 'url': NotRequired[str], 'taskId': NotRequired[str], 'fileSize': NotRequired[NumberType], }, ) LoadingState = TypedDict( 'LoadingState', { 'is_loading': NotRequired[bool], 'prop_name': NotRequired[str], 'component_name': NotRequired[str], }, ) def __init__( self, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[typing.Union[str, dict]] = None, name: typing.Optional[str] = None, enableBatchControl: typing.Optional[bool] = None, locale: typing.Optional[Literal['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']] = None, apiUrl: typing.Optional[str] = None, apiUrlExtraParams: typing.Optional[dict] = None, headers: typing.Optional[dict] = None, withCredentials: typing.Optional[bool] = None, withOriginFileObj: typing.Optional[bool] = None, downloadUrl: typing.Optional[str] = None, downloadUrlExtraParams: typing.Optional[dict] = None, downloadUrlFromBackend: typing.Optional[bool] = None, fileListMaxLength: typing.Optional[NumberType] = None, fileTypes: typing.Optional[typing.Sequence[str]] = None, buttonContent: typing.Optional[ComponentType] = None, buttonIcon: typing.Optional[ComponentType] = None, buttonProps: typing.Optional['ButtonProps'] = None, uploadId: typing.Optional[str] = None, fileMaxSize: typing.Optional[NumberType] = None, multiple: typing.Optional[bool] = None, directory: typing.Optional[bool] = None, failedTooltipInfo: typing.Optional[str] = None, showUploadList: typing.Optional[bool] = None, confirmBeforeDelete: typing.Optional[bool] = None, showPercent: typing.Optional[bool] = None, progressProps: typing.Optional['ProgressProps'] = None, showSuccessMessage: typing.Optional[bool] = None, showErrorMessage: typing.Optional[bool] = None, pastable: typing.Optional[bool] = None, lastUploadTaskRecord: typing.Optional[ typing.Union['LastUploadTaskRecord', typing.Sequence['LastUploadTaskRecord']] ] = None, listUploadTaskRecord: typing.Optional[typing.Sequence['ListUploadTaskRecord']] = None, defaultFileList: typing.Optional[typing.Sequence['DefaultFileList']] = None, disabled: typing.Optional[bool] = None, status: typing.Optional[Literal['error', 'warning']] = None, loading_state: typing.Optional['LoadingState'] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'locale', 'apiUrl', 'apiUrlExtraParams', 'headers', 'withCredentials', 'withOriginFileObj', 'downloadUrl', 'downloadUrlExtraParams', 'downloadUrlFromBackend', 'fileListMaxLength', 'fileTypes', 'buttonContent', 'buttonIcon', 'buttonProps', 'uploadId', 'fileMaxSize', 'multiple', 'directory', 'failedTooltipInfo', 'showUploadList', 'confirmBeforeDelete', 'showPercent', 'progressProps', 'showSuccessMessage', 'showErrorMessage', 'pastable', 'lastUploadTaskRecord', 'listUploadTaskRecord', 'defaultFileList', 'disabled', 'status', 'data-*', 'aria-*', 'loading_state', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'style', 'className', 'name', 'enableBatchControl', 'locale', 'apiUrl', 'apiUrlExtraParams', 'headers', 'withCredentials', 'withOriginFileObj', 'downloadUrl', 'downloadUrlExtraParams', 'downloadUrlFromBackend', 'fileListMaxLength', 'fileTypes', 'buttonContent', 'buttonIcon', 'buttonProps', 'uploadId', 'fileMaxSize', 'multiple', 'directory', 'failedTooltipInfo', 'showUploadList', 'confirmBeforeDelete', 'showPercent', 'progressProps', 'showSuccessMessage', 'showErrorMessage', 'pastable', 'lastUploadTaskRecord', 'listUploadTaskRecord', 'defaultFileList', 'disabled', 'status', 'data-*', 'aria-*', 'loading_state', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args} super(AntdUpload, self).__init__(**args) setattr(AntdUpload, '__init__', _explicitize_args(AntdUpload.__init__)) ================================================ FILE: feffery_antd_components/AntdWatermark.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class AntdWatermark(Component): """An AntdWatermark component. 水印组件AntdWatermark Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - className (string; optional): 当前组件css类名. - markClassName (string; optional): 水印层css类名. - markStyle (dict; optional): 水印层css样式. - content (string | list of strings; optional): 配置水印内容,传入数组时渲染多行水印. - rotate (number; default -22): 水印旋转角度 默认值:`-22`. - zIndex (number; optional): 水印z-index. - fontColor (string; optional): 文字水印颜色. - fontSize (number; default 16): 文字水印字体大小 默认值:`16`. - gapX (number; default 212): 水印之间的水平像素间距 默认值:`212`. - gapY (number; default 222): 水印之间的垂直像素间距 默认值:`222`. - image (string; optional): 图片水印地址. - width (number; optional): 图片水印像素宽度. - height (number; optional): 图片水印像素高度. - inherit (boolean; default True): 是否将水印传导给`AntdModal`、`AntdDrawer`等弹出类组件 默认值:`True`. - data-* (string; optional): `data-*`格式属性通配. - aria-* (string; optional): `aria-*`格式属性通配.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'AntdWatermark' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, style: typing.Optional[typing.Any] = None, className: typing.Optional[str] = None, markClassName: typing.Optional[str] = None, markStyle: typing.Optional[dict] = None, content: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, rotate: typing.Optional[NumberType] = None, zIndex: typing.Optional[NumberType] = None, fontColor: typing.Optional[str] = None, fontSize: typing.Optional[NumberType] = None, gapX: typing.Optional[NumberType] = None, gapY: typing.Optional[NumberType] = None, image: typing.Optional[str] = None, width: typing.Optional[NumberType] = None, height: typing.Optional[NumberType] = None, inherit: typing.Optional[bool] = None, **kwargs, ): self._prop_names = [ 'id', 'key', 'children', 'style', 'className', 'markClassName', 'markStyle', 'content', 'rotate', 'zIndex', 'fontColor', 'fontSize', 'gapX', 'gapY', 'image', 'width', 'height', 'inherit', 'data-*', 'aria-*', ] self._valid_wildcard_attributes = ['data-', 'aria-'] self.available_properties = [ 'id', 'key', 'children', 'style', 'className', 'markClassName', 'markStyle', 'content', 'rotate', 'zIndex', 'fontColor', 'fontSize', 'gapX', 'gapY', 'image', 'width', 'height', 'inherit', 'data-*', 'aria-*', ] self.available_wildcard_properties = ['data-', 'aria-'] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(AntdWatermark, self).__init__(children=children, **args) setattr(AntdWatermark, '__init__', _explicitize_args(AntdWatermark.__init__)) ================================================ FILE: feffery_antd_components/Fragment.py ================================================ # AUTO GENERATED FILE - DO NOT EDIT import typing # noqa: F401 from dash.development.base_component import Component, _explicitize_args from typing_extensions import Literal, NotRequired, TypedDict # noqa: F401 ComponentSingleType = typing.Union[str, int, float, Component, None] ComponentType = typing.Union[ ComponentSingleType, typing.Sequence[ComponentSingleType], ] NumberType = typing.Union[typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex] class Fragment(Component): """A Fragment component. 空节点组件Fragment Keyword arguments: - id (string; optional): 组件唯一id. - key (string; optional): 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果. - children (a list of or a singular dash component, string or number; optional): 组件型,内嵌元素. - token (dict; optional): 监听当前组件所在作用范围对应的样式`token`参数,需配合上层`AntdConfigProvider`组件使用.""" _children_props: typing.List[str] = [] _base_nodes = ['children'] _namespace = 'feffery_antd_components' _type = 'Fragment' def __init__( self, children: typing.Optional[ComponentType] = None, id: typing.Optional[typing.Union[str, dict]] = None, key: typing.Optional[str] = None, token: typing.Optional[dict] = None, **kwargs, ): self._prop_names = ['id', 'key', 'children', 'token'] self._valid_wildcard_attributes = [] self.available_properties = ['id', 'key', 'children', 'token'] self.available_wildcard_properties = [] _explicit_args = kwargs.pop('_explicit_args') _locals = locals() _locals.update(kwargs) # For wildcard attrs and excess named props args = {k: _locals[k] for k in _explicit_args if k != 'children'} super(Fragment, self).__init__(children=children, **args) setattr(Fragment, '__init__', _explicitize_args(Fragment.__init__)) ================================================ FILE: feffery_antd_components/__init__.py ================================================ from __future__ import print_function as _ import json import os as _os import sys as _sys import dash as _dash # noinspection PyUnresolvedReferences from ._imports_ import * # noqa: F403 from ._imports_ import __all__ if not hasattr(_dash, '__plotly_dash') and not hasattr(_dash, 'development'): print( 'Dash was not successfully imported. ' "Make sure you don't have a file " 'named \n"dash.py" in your current directory.', file=_sys.stderr, ) _sys.exit(1) _basepath = _os.path.dirname(__file__) _filepath = _os.path.abspath(_os.path.join(_basepath, 'package-info.json')) with open(_filepath) as f: package = json.load(f) package_name = package['name'].replace(' ', '_').replace('-', '_') __version__ = package['version'] _current_path = _os.path.dirname(_os.path.abspath(__file__)) _this_module = _sys.modules[__name__] async_resources = [ 'antd_table', 'upload', 'data_entry', 'data_display', ] _js_dist = [ { 'relative_package_path': 'feffery_antd_components.min.js', 'external_url': 'https://unpkg.com/{0}@{2}/{1}/{1}.min.js'.format( package_name, __name__, __version__ ), 'namespace': package_name, }, { 'relative_package_path': 'feffery_antd_components.min.js.map', 'external_url': 'https://unpkg.com/{0}@{2}/{1}/{1}.min.js.map'.format( package_name, __name__, __version__ ), 'namespace': package_name, 'dynamic': True, }, ] _js_dist.extend( [ { 'relative_package_path': 'async-{}.js'.format(async_resource), 'external_url': ('https://unpkg.com/{0}@{2}/{1}/async-{3}.js').format( package_name, __name__, __version__, async_resource ), 'namespace': package_name, 'async': True, } for async_resource in async_resources ] ) _js_dist.extend( [ { 'relative_package_path': 'async-{}.js.map'.format(async_resource), 'external_url': ('https://unpkg.com/{0}@{2}/{1}/async-{3}.js.map').format( package_name, __name__, __version__, async_resource ), 'namespace': package_name, 'dynamic': True, } for async_resource in async_resources ] ) _css_dist = [] for _component in __all__: setattr(locals()[_component], '_js_dist', _js_dist) setattr(locals()[_component], '_css_dist', _css_dist) ================================================ FILE: feffery_antd_components/_icons.py ================================================ all_icons = [ 'antd-carry-out', 'antd-car', 'antd-bulb', 'antd-build', 'antd-bug', 'antd-bar-code', 'antd-branches', 'antd-aim', 'antd-issues-close', 'antd-ellipsis', 'antd-user', 'antd-unlock', 'antd-repair', 'antd-team', 'antd-sync', 'antd-setting', 'antd-send', 'antd-schedule', 'antd-save', 'antd-rocket', 'antd-reload', 'antd-read', 'antd-qrcode', 'antd-power-off', 'antd-number', 'antd-notification', 'antd-menu', 'antd-mail', 'antd-lock', 'antd-loading', 'antd-key', 'antd-hourglass', 'antd-global', 'antd-function', 'antd-import', 'antd-export', 'antd-dashboard', 'antd-control', 'antd-console-sql', 'antd-compass', 'antd-comment', 'antd-code', 'antd-cluster', 'antd-clear', 'antd-camera', 'antd-book', 'antd-catalog', 'antd-api', 'antd-alert', 'antd-account-book', 'antd-alipay', 'antd-alipay-circle', 'antd-weibo', 'antd-github', 'antd-android', 'antd-apple', 'antd-wechat', 'antd-wechat-work', 'antd-openai', 'antd-bilibili', 'antd-tiktok', 'antd-javascript', 'antd-python', 'antd-docker', 'antd-fall', 'antd-rise', 'antd-stock', 'antd-home', 'antd-fund', 'antd-area-chart', 'antd-radar-chart', 'antd-bar-chart', 'antd-pie-chart', 'antd-box-plot', 'antd-dot-chart', 'antd-line-chart', 'antd-field-binary', 'antd-field-number', 'antd-field-string', 'antd-field-time', 'antd-file-add', 'antd-file-done', 'antd-file', 'antd-file-image', 'antd-file-markdown', 'antd-file-pdf', 'antd-file-protect', 'antd-file-sync', 'antd-file-text', 'antd-file-word', 'antd-file-zip', 'antd-filter', 'antd-fire', 'antd-woman', 'antd-arrow-up', 'antd-arrow-down', 'antd-arrow-left', 'antd-arrow-right', 'antd-flag', 'antd-user-add', 'antd-folder-add', 'antd-man', 'antd-tag', 'antd-folder', 'antd-user-delete', 'antd-trophy', 'antd-shopping-cart', 'antd-folder-open', 'antd-fork', 'antd-select', 'antd-tags', 'antd-thunderbolt', 'antd-sound', 'antd-fund-projection-screen', 'antd-funnel-plot', 'antd-gift', 'antd-robot', 'antd-pushpin', 'antd-printer', 'antd-phone', 'antd-picture', 'antd-idcard', 'antd-partition', 'antd-monitor', 'antd-more', 'antd-apartment', 'antd-money-collect', 'antd-experiment', 'antd-link', 'antd-mobile', 'antd-coffee', 'antd-layout', 'antd-eye', 'antd-eye-invisible', 'antd-exception', 'antd-dollar', 'antd-euro', 'antd-download', 'antd-environment', 'antd-deployment-unit', 'antd-crown', 'antd-desktop', 'antd-like', 'antd-dislike', 'antd-disconnect', 'antd-app-store', 'antd-app-store-add', 'antd-bell', 'antd-calculator', 'antd-calendar', 'antd-database', 'antd-history', 'antd-search', 'antd-file-search', 'antd-cloud', 'antd-cloud-upload', 'antd-cloud-download', 'antd-cloud-server', 'antd-cloud-sync', 'antd-swap', 'antd-rollback', 'antd-login', 'antd-logout', 'antd-menu-fold', 'antd-menu-unfold', 'antd-full-screen', 'antd-full-screen-exit', 'antd-question-circle', 'antd-plus-circle', 'antd-minus-circle', 'antd-info-circle', 'antd-exclamation-circle', 'antd-close-circle', 'antd-check-circle', 'antd-clock-circle', 'antd-stop', 'antd-edit', 'antd-delete', 'antd-highlight', 'antd-redo', 'antd-undo', 'antd-zoom-in', 'antd-zoom-out', 'antd-sort-ascending', 'antd-sort-descending', 'antd-table', 'antd-question', 'antd-plus', 'antd-minus', 'antd-close', 'antd-check', 'antd-sketch', 'antd-bank', 'antd-block', 'antd-insurance', 'antd-smile', 'antd-skin', 'antd-star', 'antd-right-circle-two-tone', 'antd-left-circle-two-tone', 'antd-up-circle-two-tone', 'antd-down-circle-two-tone', 'antd-up-square-two-tone', 'antd-down-square-two-tone', 'antd-left-square-two-tone', 'antd-right-square-two-tone', 'antd-question-circle-two-tone', 'antd-plus-circle-two-tone', 'antd-minus-circle-two-tone', 'antd-plus-square-two-tone', 'antd-minus-square-two-tone', 'antd-info-circle-two-tone', 'antd-exclamation-circle-two-tone', 'antd-close-circle-two-tone', 'antd-close-square-two-tone', 'antd-check-circle-two-tone', 'antd-check-square-two-tone', 'antd-edit-two-tone', 'antd-delete-two-tone', 'antd-highlight-two-tone', 'antd-pie-chart-two-tone', 'antd-box-chart-two-tone', 'antd-fund-two-tone', 'antd-sliders-two-tone', 'antd-api-two-tone', 'antd-cloud-two-tone', 'antd-hourglass-two-tone', 'antd-notification-two-tone', 'antd-tool-two-tone', 'antd-down', 'antd-up', 'antd-left', 'antd-right', 'antd-caret-up', 'antd-caret-down', 'antd-caret-left', 'antd-caret-right', 'antd-up-circle', 'antd-down-circle', 'antd-left-circle', 'antd-right-circle', 'antd-enter', 'antd-retweet', 'antd-warning', 'antd-form', 'antd-copy', 'antd-scissor', 'antd-snippets', 'antd-diff', 'antd-ordered-list', 'antd-unordered-list', 'antd-sliders', 'antd-audit', 'antd-border', 'antd-contacts', 'antd-container', 'antd-delivered-procedure', 'antd-pause', 'antd-step-backward', 'antd-step-forward', 'antd-fast-forward', 'antd-fast-backward', 'antd-sun', 'antd-mooon', 'md-star-half', 'md-star-border', 'md-star', 'md-people', 'md-plus-one', 'md-notifications', 'md-pin-drop', 'md-layers-clear', 'md-layers', 'md-edit-location', 'md-tune', 'md-transform', 'md-timer-off', 'md-timer', 'md-file-upload', 'md-file-download', 'md-create-new-folder', 'md-cloud-upload', 'md-cloud-queue', 'md-cloud-download', 'md-cloud-done', 'md-insert-chart', 'md-functions', 'md-format-quote', 'md-attach-file', 'md-storage', 'md-save', 'md-remove-circle-outline', 'md-remove-circle', 'md-remove', 'md-low-priority', 'md-link', 'md-gesture', 'md-forward', 'md-flag', 'md-drafts', 'md-create', 'md-content-paste', 'md-content-cut', 'md-content-copy', 'md-clear', 'md-block', 'md-backspace', 'md-add-box', 'md-add', 'md-add-circle-outline', 'md-add-circle', 'md-location-on', 'md-mail-outline', 'md-email', 'md-not-interested', 'md-library-books', 'md-library-add', 'md-equalizer', 'md-add-alert', 'md-visibility-off', 'md-visibility', 'md-verified-user', 'md-update', 'md-trending-up', 'md-trending-flat', 'md-trending-down', 'md-translate', 'md-toc', 'md-timeline', 'md-thumb-up', 'md-thumb-down', 'md-swap-vert', 'md-swap-horiz', 'md-supervisor-account', 'md-subject', 'md-settings', 'md-search', 'md-schedule', 'md-restore', 'md-query-builder', 'md-power-settings-new', 'md-opacity', 'md-note-add', 'md-lock-outline', 'md-lock-open', 'md-list', 'md-lightbulb-outline', 'md-launch', 'md-label-outline', 'md-label', 'md-input', 'md-info-outline', 'md-info', 'md-hourglass', 'md-home', 'md-history', 'md-highlight-off', 'md-help-outline', 'md-help', 'md-get-app', 'md-translate', 'md-fingerprint', 'md-findIn-page', 'md-favorite-border', 'md-favorite', 'md-extension', 'md-explore', 'md-exit-to-app', 'md-event', 'md-description', 'md-delete-forever', 'md-delete', 'md-dashboard', 'md-code', 'md-build', 'md-bug-report', 'md-assignment', 'md-assessment', 'md-alarm-on', 'md-alarm-off', 'md-alarm-add', 'md-alarm', 'md-account-circle', 'fc-vlc', 'fc-view-details', 'fc-upload', 'fc-tree-structure', 'fc-timeline', 'fc-template', 'fc-survey', 'fc-signature', 'fc-share', 'fc-services', 'fc-rules', 'fc-questions', 'fc-process', 'fc-plus', 'fc-overtime', 'fc-organization', 'fc-numerical-sorting21', 'fc-numerical-sorting12', 'fc-multiple-inputs', 'fc-mind-map', 'fc-menu', 'fc-list', 'fc-like', 'fc-like-placeholder', 'fc-info', 'fc-import', 'fc-image-file', 'fc-idea', 'fc-home', 'fc-high-priority', 'fc-low-priority', 'fc-genealogy', 'fc-full-trash', 'fc-document-search', 'fc-file', 'fc-faq', 'fc-export', 'fc-empty-trash', 'fc-download', 'fc-document', 'fc-deployment', 'fc-delete-database', 'fc-conference-call', 'fc-database', 'fc-data-protection', 'fc-data-encryption', 'fc-data-configuration', 'fc-data-backup', 'fc-checkmark', 'fc-cancel', 'fc-briefcase', 'fc-binoculars', 'fc-automatic', 'fc-alphabetical-sorting-za', 'fc-alphabetical-sorting-az', 'fc-add-database', 'fc-accept-database', 'fc-about', 'fc-radar-chart', 'fc-scatter-chart', 'fc-pie-chart', 'fc-line-chart', 'fc-flow-chart', 'fc-doughnut-chart', 'fc-bar-chart', 'fc-area-chart', 'fc-line-bar-chart', 'fc-workflow', 'fc-todo-list', 'fc-synchronize', 'fc-repair', 'fc-statistics', 'fc-settings', 'fc-search', 'fc-serial-tasks', 'fc-safe', 'fc-negative-dynamic', 'fc-positive-dynamic', 'fc-planner', 'fc-parallel-tasks', 'fc-org-unit', 'fc-opened-folder', 'fc-ok', 'fc-inspection', 'fc-globe', 'fc-folder', 'fc-electronics', 'fc-data-sheet', 'fc-command-line', 'fc-calendar', 'fc-calculator', 'fc-bullish', 'fc-bearish', 'fc-bookmark', 'fc-approval', 'fc-advertising', 'di-linux', 'di-python', 'di-chrome', 'di-database', 'di-firefox', 'di-markdown', 'di-postgresql', 'di-terminal', 'di-windows', 'bi-table', 'bi-analyse', 'bi-layer', 'bi-layer-minus', 'bi-layer-plus', 'bs-list-task', 'bs-list-check', 'bs-link', 'bs-link-45-deg', 'bs-envelope-open', 'bs-envelope', 'bs-alarm', 'im-earth', 'im-sphere', 'gi-mesh-network', 'pi-circle', 'pi-polygon', 'pi-map-pin', 'pi-line-segment', 'pi-line-segments', 'pi-trash-simple', 'pi-trash', 'pi-ruler', 'pi-selection', 'pi-selection-slash', 'pi-square-split-horizontal', 'pi-square-split-vertical', 'pi-stack-simple', 'pi-stack', 'pi-navigation-arrow', 'pi-map-trifold', 'pi-info', 'pi-lock-key-open', 'pi-lock-key', 'pi-gear', 'pi-airplane', 'pi-anchor-simple', 'pi-arrow-arc-left', 'pi-arrow-arc-right', 'pi-arrow-clockwise', 'pi-arrow-counter-clockwise', 'pi-barricade', 'pi-binoculars', 'pi-bounding-box', 'pi-broom', 'pi-buildings', 'pi-calculator', 'pi-camera', 'pi-circuitry', 'pi-clipboard', 'pi-compass', 'pi-copy', 'pi-cpu', 'pi-crosshair', 'pi-cube-focus', 'pi-cube', 'pi-cursor', 'pi-database', 'pi-eye-slash', 'pi-eye', 'pi-faders', 'pi-floppy-disk', 'pi-dots-three-vertical', 'pi-dots-three', 'pi-math-operations', 'pi-plus', 'pi-minus', 'pi-path', 'si-gitee', ] ================================================ FILE: feffery_antd_components/_imports_.py ================================================ from .AntdAccordion import AntdAccordion from .AntdAffix import AntdAffix from .AntdAlert import AntdAlert from .AntdAnchor import AntdAnchor from .AntdAvatar import AntdAvatar from .AntdAvatarGroup import AntdAvatarGroup from .AntdBackTop import AntdBackTop from .AntdBadge import AntdBadge from .AntdBreadcrumb import AntdBreadcrumb from .AntdButton import AntdButton from .AntdCalendar import AntdCalendar from .AntdCard import AntdCard from .AntdCardGrid import AntdCardGrid from .AntdCardMeta import AntdCardMeta from .AntdCarousel import AntdCarousel from .AntdCascader import AntdCascader from .AntdCenter import AntdCenter from .AntdCheckableTag import AntdCheckableTag from .AntdCheckbox import AntdCheckbox from .AntdCheckboxGroup import AntdCheckboxGroup from .AntdCheckCard import AntdCheckCard from .AntdCheckCardGroup import AntdCheckCardGroup from .AntdCol import AntdCol from .AntdCollapse import AntdCollapse from .AntdColorPicker import AntdColorPicker from .AntdComment import AntdComment from .AntdCompact import AntdCompact from .AntdConfigProvider import AntdConfigProvider from .AntdContent import AntdContent from .AntdCopyText import AntdCopyText from .AntdCountdown import AntdCountdown from .AntdCountup import AntdCountup from .AntdCustomSkeleton import AntdCustomSkeleton from .AntdDatePicker import AntdDatePicker from .AntdDateRangePicker import AntdDateRangePicker from .AntdDescriptionItem import AntdDescriptionItem from .AntdDescriptions import AntdDescriptions from .AntdDivider import AntdDivider from .AntdDraggerUpload import AntdDraggerUpload from .AntdDrawer import AntdDrawer from .AntdDropdown import AntdDropdown from .AntdEmpty import AntdEmpty from .AntdFlex import AntdFlex from .AntdFloatButton import AntdFloatButton from .AntdFloatButtonGroup import AntdFloatButtonGroup from .AntdFooter import AntdFooter from .AntdForm import AntdForm from .AntdFormItem import AntdFormItem from .AntdFormRender import AntdFormRender from .AntdHappyProvider import AntdHappyProvider from .AntdHeader import AntdHeader from .AntdIcon import AntdIcon from .AntdImage import AntdImage from .AntdImageGroup import AntdImageGroup from .AntdInput import AntdInput from .AntdInputNumber import AntdInputNumber from .AntdLayout import AntdLayout from .AntdMentions import AntdMentions from .AntdMenu import AntdMenu from .AntdMessage import AntdMessage from .AntdModal import AntdModal from .AntdNotification import AntdNotification from .AntdOTP import AntdOTP from .AntdPageHeader import AntdPageHeader from .AntdPagination import AntdPagination from .AntdParagraph import AntdParagraph from .AntdPictureUpload import AntdPictureUpload from .AntdPopconfirm import AntdPopconfirm from .AntdPopover import AntdPopover from .AntdPopupCard import AntdPopupCard from .AntdProgress import AntdProgress from .AntdQRCode import AntdQRCode from .AntdRadioGroup import AntdRadioGroup from .AntdRate import AntdRate from .AntdResult import AntdResult from .AntdRibbon import AntdRibbon from .AntdRow import AntdRow from .AntdSegmented import AntdSegmented from .AntdSegmentedColoring import AntdSegmentedColoring from .AntdSelect import AntdSelect from .AntdSider import AntdSider from .AntdSkeleton import AntdSkeleton from .AntdSkeletonAvatar import AntdSkeletonAvatar from .AntdSkeletonButton import AntdSkeletonButton from .AntdSkeletonImage import AntdSkeletonImage from .AntdSkeletonInput import AntdSkeletonInput from .AntdSlider import AntdSlider from .AntdSpace import AntdSpace from .AntdSpin import AntdSpin from .AntdSplitter import AntdSplitter from .AntdSpoiler import AntdSpoiler from .AntdStatistic import AntdStatistic from .AntdSteps import AntdSteps from .AntdSwitch import AntdSwitch from .AntdTable import AntdTable from .AntdTabs import AntdTabs from .AntdTag import AntdTag from .AntdText import AntdText from .AntdTimeline import AntdTimeline from .AntdTimePicker import AntdTimePicker from .AntdTimeRangePicker import AntdTimeRangePicker from .AntdTitle import AntdTitle from .AntdTooltip import AntdTooltip from .AntdTour import AntdTour from .AntdTransfer import AntdTransfer from .AntdTree import AntdTree from .AntdTreeSelect import AntdTreeSelect from .AntdUpload import AntdUpload from .AntdWatermark import AntdWatermark from .Fragment import Fragment __all__ = [ 'AntdAccordion', 'AntdAvatar', 'AntdAvatarGroup', 'AntdBadge', 'AntdCarousel', 'AntdCheckableTag', 'AntdCollapse', 'AntdComment', 'AntdCountdown', 'AntdCountup', 'AntdEmpty', 'AntdImage', 'AntdImageGroup', 'AntdPopover', 'AntdQRCode', 'AntdRibbon', 'AntdSegmented', 'AntdSpoiler', 'AntdStatistic', 'AntdTable', 'AntdTabs', 'AntdTag', 'AntdTimeline', 'AntdTooltip', 'AntdTree', 'AntdCard', 'AntdCardGrid', 'AntdCardMeta', 'AntdDescriptionItem', 'AntdDescriptions', 'AntdCalendar', 'AntdCascader', 'AntdCheckbox', 'AntdCheckboxGroup', 'AntdColorPicker', 'AntdDatePicker', 'AntdDateRangePicker', 'AntdInput', 'AntdInputNumber', 'AntdMentions', 'AntdOTP', 'AntdRadioGroup', 'AntdRate', 'AntdSegmentedColoring', 'AntdSelect', 'AntdSlider', 'AntdSwitch', 'AntdTimePicker', 'AntdTimeRangePicker', 'AntdTransfer', 'AntdTreeSelect', 'AntdCheckCard', 'AntdCheckCardGroup', 'AntdForm', 'AntdFormItem', 'AntdDraggerUpload', 'AntdPictureUpload', 'AntdUpload', 'AntdAlert', 'AntdDrawer', 'AntdMessage', 'AntdModal', 'AntdNotification', 'AntdPopconfirm', 'AntdPopupCard', 'AntdProgress', 'AntdResult', 'AntdSpin', 'AntdCustomSkeleton', 'AntdSkeleton', 'AntdSkeletonAvatar', 'AntdSkeletonButton', 'AntdSkeletonImage', 'AntdSkeletonInput', 'AntdFormRender', 'AntdButton', 'AntdFloatButton', 'AntdFloatButtonGroup', 'AntdIcon', 'AntdParagraph', 'AntdText', 'AntdTitle', 'AntdCenter', 'AntdCompact', 'AntdContent', 'AntdDivider', 'AntdFlex', 'AntdFooter', 'AntdHeader', 'AntdLayout', 'AntdSider', 'AntdSpace', 'AntdSplitter', 'AntdCol', 'AntdRow', 'AntdAnchor', 'AntdBreadcrumb', 'AntdDropdown', 'AntdMenu', 'AntdPageHeader', 'AntdPagination', 'AntdSteps', 'AntdAffix', 'AntdBackTop', 'AntdConfigProvider', 'AntdCopyText', 'AntdHappyProvider', 'AntdTour', 'AntdWatermark', 'Fragment', ] ================================================ FILE: feffery_antd_components/alias.py ================================================ from .AntdAccordion import AntdAccordion as Accordion from .AntdAffix import AntdAffix as Affix from .AntdAlert import AntdAlert as Alert from .AntdAnchor import AntdAnchor as Anchor from .AntdAvatar import AntdAvatar as Avatar from .AntdAvatarGroup import AntdAvatarGroup as AvatarGroup from .AntdBackTop import AntdBackTop as BackTop from .AntdBadge import AntdBadge as Badge from .AntdBreadcrumb import AntdBreadcrumb as Breadcrumb from .AntdButton import AntdButton as Button from .AntdCalendar import AntdCalendar as Calendar from .AntdCard import AntdCard as Card from .AntdCardGrid import AntdCardGrid as CardGrid from .AntdCardMeta import AntdCardMeta as CardMeta from .AntdCarousel import AntdCarousel as Carousel from .AntdCascader import AntdCascader as Cascader from .AntdCenter import AntdCenter as Center from .AntdCheckableTag import AntdCheckableTag as CheckableTag from .AntdCheckbox import AntdCheckbox as Checkbox from .AntdCheckboxGroup import AntdCheckboxGroup as CheckboxGroup from .AntdCheckCard import AntdCheckCard as CheckCard from .AntdCheckCardGroup import AntdCheckCardGroup as CheckCardGroup from .AntdCol import AntdCol as Col from .AntdCollapse import AntdCollapse as Collapse from .AntdColorPicker import AntdColorPicker as ColorPicker from .AntdComment import AntdComment as Comment from .AntdCompact import AntdCompact as Compact from .AntdConfigProvider import AntdConfigProvider as ConfigProvider from .AntdContent import AntdContent as Content from .AntdCopyText import AntdCopyText as CopyText from .AntdCountdown import AntdCountdown as Countdown from .AntdCountup import AntdCountup as Countup from .AntdCustomSkeleton import AntdCustomSkeleton as CustomSkeleton from .AntdDatePicker import AntdDatePicker as DatePicker from .AntdDateRangePicker import AntdDateRangePicker as DateRangePicker from .AntdDescriptionItem import AntdDescriptionItem as DescriptionItem from .AntdDescriptions import AntdDescriptions as Descriptions from .AntdDivider import AntdDivider as Divider from .AntdDraggerUpload import AntdDraggerUpload as DraggerUpload from .AntdDrawer import AntdDrawer as Drawer from .AntdDropdown import AntdDropdown as Dropdown from .AntdEmpty import AntdEmpty as Empty from .AntdFlex import AntdFlex as Flex from .AntdFloatButton import AntdFloatButton as FloatButton from .AntdFloatButtonGroup import AntdFloatButtonGroup as FloatButtonGroup from .AntdFooter import AntdFooter as Footer from .AntdForm import AntdForm as Form from .AntdFormItem import AntdFormItem as FormItem from .AntdFormRender import AntdFormRender as FormRender from .AntdHappyProvider import AntdHappyProvider as HappyProvider from .AntdHeader import AntdHeader as Header from .AntdIcon import AntdIcon as Icon from .AntdImage import AntdImage as Image from .AntdImageGroup import AntdImageGroup as ImageGroup from .AntdInput import AntdInput as Input from .AntdInputNumber import AntdInputNumber as InputNumber from .AntdLayout import AntdLayout as Layout from .AntdMentions import AntdMentions as Mentions from .AntdMenu import AntdMenu as Menu from .AntdMessage import AntdMessage as Message from .AntdModal import AntdModal as Modal from .AntdNotification import AntdNotification as Notification from .AntdOTP import AntdOTP as OTP from .AntdPageHeader import AntdPageHeader as PageHeader from .AntdPagination import AntdPagination as Pagination from .AntdParagraph import AntdParagraph as Paragraph from .AntdPictureUpload import AntdPictureUpload as PictureUpload from .AntdPopconfirm import AntdPopconfirm as Popconfirm from .AntdPopover import AntdPopover as Popover from .AntdPopupCard import AntdPopupCard as PopupCard from .AntdProgress import AntdProgress as Progress from .AntdQRCode import AntdQRCode as QRCode from .AntdRadioGroup import AntdRadioGroup as RadioGroup from .AntdRate import AntdRate as Rate from .AntdResult import AntdResult as Result from .AntdRibbon import AntdRibbon as Ribbon from .AntdRow import AntdRow as Row from .AntdSegmented import AntdSegmented as Segmented from .AntdSegmentedColoring import AntdSegmentedColoring as SegmentedColoring from .AntdSelect import AntdSelect as Select from .AntdSider import AntdSider as Sider from .AntdSkeleton import AntdSkeleton as Skeleton from .AntdSkeletonAvatar import AntdSkeletonAvatar as SkeletonAvatar from .AntdSkeletonButton import AntdSkeletonButton as SkeletonButton from .AntdSkeletonImage import AntdSkeletonImage as SkeletonImage from .AntdSkeletonInput import AntdSkeletonInput as SkeletonInput from .AntdSlider import AntdSlider as Slider from .AntdSpace import AntdSpace as Space from .AntdSpin import AntdSpin as Spin from .AntdSplitter import AntdSplitter as Splitter from .AntdSpoiler import AntdSpoiler as Spoiler from .AntdStatistic import AntdStatistic as Statistic from .AntdSteps import AntdSteps as Steps from .AntdSwitch import AntdSwitch as Switch from .AntdTable import AntdTable as Table from .AntdTabs import AntdTabs as Tabs from .AntdTag import AntdTag as Tag from .AntdText import AntdText as Text from .AntdTimeline import AntdTimeline as Timeline from .AntdTimePicker import AntdTimePicker as TimePicker from .AntdTimeRangePicker import AntdTimeRangePicker as TimeRangePicker from .AntdTitle import AntdTitle as Title from .AntdTooltip import AntdTooltip as Tooltip from .AntdTour import AntdTour as Tour from .AntdTransfer import AntdTransfer as Transfer from .AntdTree import AntdTree as Tree from .AntdTreeSelect import AntdTreeSelect as TreeSelect from .AntdUpload import AntdUpload as Upload from .AntdWatermark import AntdWatermark as Watermark from .Fragment import Fragment __all__ = [ 'Accordion', 'Avatar', 'AvatarGroup', 'Badge', 'Carousel', 'CheckableTag', 'Collapse', 'Comment', 'Countdown', 'Countup', 'Empty', 'Image', 'ImageGroup', 'Popover', 'QRCode', 'Ribbon', 'Segmented', 'Spoiler', 'Statistic', 'Table', 'Tabs', 'Tag', 'Timeline', 'Tooltip', 'Tree', 'Card', 'CardGrid', 'CardMeta', 'DescriptionItem', 'Descriptions', 'Calendar', 'Cascader', 'Checkbox', 'CheckboxGroup', 'ColorPicker', 'DatePicker', 'DateRangePicker', 'Input', 'InputNumber', 'Mentions', 'OTP', 'RadioGroup', 'Rate', 'SegmentedColoring', 'Select', 'Slider', 'Switch', 'TimePicker', 'TimeRangePicker', 'Transfer', 'TreeSelect', 'CheckCard', 'CheckCardGroup', 'Form', 'FormItem', 'DraggerUpload', 'PictureUpload', 'Upload', 'Alert', 'Drawer', 'Message', 'Modal', 'Notification', 'Popconfirm', 'PopupCard', 'Progress', 'Result', 'Spin', 'CustomSkeleton', 'Skeleton', 'SkeletonAvatar', 'SkeletonButton', 'SkeletonImage', 'SkeletonInput', 'FormRender', 'Button', 'FloatButton', 'FloatButtonGroup', 'Icon', 'Paragraph', 'Text', 'Title', 'Center', 'Compact', 'Content', 'Divider', 'Flex', 'Footer', 'Header', 'Layout', 'Sider', 'Space', 'Splitter', 'Col', 'Row', 'Anchor', 'Breadcrumb', 'Dropdown', 'Menu', 'PageHeader', 'Pagination', 'Steps', 'Affix', 'BackTop', 'ConfigProvider', 'CopyText', 'HappyProvider', 'Tour', 'Watermark', 'Fragment', ] ================================================ FILE: legacy_tests/dash3.0tests/AntdQRCode组件loading状态重构/test.py ================================================ if True: import sys sys.path.append('../../../') import time import dash from dash import html from dash.dependencies import Input, Output, State import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdSpace( [ fac.AntdQRCode( id='auto-spin-qrcode-demo', value='https://fac.feffery.tech/', autoSpin=True, ), fac.AntdButton( '重新生成', id='auto-spin-qrcode-demo-button', type='primary', ), ], direction='vertical', align='center', ) ) @app.callback( Output('auto-spin-qrcode-demo', 'value'), Input('auto-spin-qrcode-demo-button', 'nClicks'), State('auto-spin-qrcode-demo', 'value'), prevent_initial_call=True, ) def auto_spin_qrcode_demo_input_callback(nClicks, value): if nClicks: time.sleep(1) if value == 'https://fac.feffery.tech/': return 'https://ant.design/' elif value == 'https://ant.design/': return 'https://fac.feffery.tech/' return dash.no_update if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dash3.0tests/AntdTable函数式改造/test.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': 'int型示例', 'dataIndex': 'int型示例', }, { 'title': 'float型示例', 'dataIndex': 'float型示例', }, { 'title': 'str型示例', 'dataIndex': 'str型示例', }, { 'title': '日期时间示例', 'dataIndex': '日期时间示例', }, ], data=[ { 'int型示例': 123, 'float型示例': 1.23, 'str型示例': '示例字符', '日期时间示例': datetime.now(), } ] * 20, ), fac.AntdTable( columns=[ { 'title': '搜索型筛选', 'dataIndex': '搜索型筛选', } ], data=[{'搜索型筛选': s} for s in list('abced')], filterOptions={'搜索型筛选': {'filterMode': 'keyword'}}, style={'width': 200}, ), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dash3.0tests/_dashprivate_layout改动测试/test.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ html.Div(fac.__version__), fac.AntdDescriptions( [ fac.AntdDescriptionItem('费弗里', label='姓名'), fac.AntdDescriptionItem( html.A( 'https://github.com/CNFeffery', href='https://github.com/CNFeffery', ), label='个人Github地址', ), fac.AntdDescriptionItem( html.A( 'https://www.cnblogs.com/feffery/', href='https://www.cnblogs.com/feffery/', ), label='个人博客地址', ), fac.AntdDescriptionItem( html.A( 'http://fac.feffery.tech/', href='http://fac.feffery.tech/', ), label='fac框架官网', ), ], title='描述列表示例', labelStyle={'fontWeight': 'bold'}, ), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dash3.0tests/loading_state改动测试/test.py ================================================ if True: import sys sys.path.append('../../../') import time import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdButton( '测试', id='button-demo', type='primary', ) ], style=style(padding=50), ) @app.callback( Output('button-demo', 'children'), Input('button-demo', 'nClicks'), prevent_initial_call=True, ) def demo_callback(nClicks): time.sleep(3) return f'nClicks: {nClicks}' if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dash3.0tests/函数式组件默认值重构/test.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdButton( '测试', id='button-demo', type='primary', **{'data-test': 'test'}, ), fac.AntdTag( content='测试', href='/test', **{'data-test': 'test'}, ), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dash3.0tests/加载动画类组件重构测试/test.py ================================================ if True: import sys sys.path.append('../../../') import time import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( html.Div( [ '测试', fac.AntdCustomSkeleton( [ html.Div( html.Div( fac.AntdButton( '测试', id='button-demo', type='primary', ) ) ), html.Div(id='inner-output-test'), ], skeletonContent='加载中...', ), html.Div(id='outer-output-test'), ], style=style(padding=50), ) ) @app.callback( [ Output('button-demo', 'children'), Output('button-demo', 'type'), Output('inner-output-test', 'children'), Output('outer-output-test', 'children'), ], Input('button-demo', 'nClicks'), prevent_initial_call=True, ) def demo_callback(nClicks): time.sleep(3) return [ f'nClicks: {nClicks}', dash.no_update, f'inner: {nClicks}', f'outer: {nClicks}', ] if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dash3.0tests/组件属性基础持久化重构测试/test.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdCollapse( '测试内容', id='persistence-test', title='测试', persistence=True, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdAccordion/feat_size.py ================================================ if True: import sys sys.path.append('../../../') import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdCenter( fac.AntdSpace( [ fac.AntdAccordion( items=[ { 'title': f'手风琴项示例{i}', 'key': i, 'children': fac.AntdText(f'手风琴项示例{i}'), } for i in range(1, 6) ], size=size, ) for size in ['small', 'middle', 'large'] ], direction='vertical', style=style(width='100%'), ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdAccordion/feat_styles.py ================================================ if True: import sys sys.path.append('../../../') import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdCenter( fac.AntdAccordion( items=[ { 'title': f'手风琴项示例{i}', 'key': i, 'children': fac.AntdText(f'手风琴项示例{i}'), } for i in range(1, 6) ], styles={ 'header': { 'background': '#40a9ff', 'color': '#fff', }, 'body': {'background': '#597ef7'}, }, ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdCard/refactor_delete_props.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdDivider( 'AntdCardGrid基础使用', innerTextOrientation='left', ), fac.AntdCard( [fac.AntdCardGrid(f'内容{i}') for i in range(1, 16)], title='AntdCardGrid基础使用', ), fac.AntdDivider( '调整浏览器窗口尺寸以观察换行效果', innerTextOrientation='left', ), fac.AntdCard( [fac.AntdCardGrid(f'内容{i}', style={'width': 95}) for i in range(1, 16)], title='固定AntdCardGrid宽度以支持自动换行', ), fac.AntdDivider( '紧凑的网格内容区', innerTextOrientation='left', ), fac.AntdCard( [fac.AntdCardGrid(f'内容{i}') for i in range(1, 16)], title='调整各类样式以实现紧凑的网格内容区', variant='borderless', style={'borderRadius': '8px 8px 0 0'}, styles={ 'header': {'border': '1px solid #f0f0f0'}, 'body': { 'padding': '0px 1px 0px 0px', 'border': 0, }, }, ), fac.AntdDivider( '关闭悬停阴影效果', innerTextOrientation='left', ), fac.AntdCard( [fac.AntdCardGrid(f'内容{i}', hoverable=False) for i in range(1, 16)], title='关闭悬停阴影效果', ), ], direction='vertical', ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdCarousel/feat_auto_play_dot_duration.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdCarousel( [ fac.AntdCenter( i, style={ 'color': 'white', 'fontSize': 36, 'height': 160, 'backgroundColor': '#364d79', }, ) for i in range(1, 6) ], autoplay={'dotDuration': True}, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdCollapse/feat_size.py ================================================ if True: import sys sys.path.append('../../../') import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdCenter( fac.AntdSpace( [ fac.AntdCollapse( fac.AntdParagraph('内容示例' * 20), isOpen=False, title='折叠面板示例', size=size, style={'width': 300}, ) for size in ['small', 'middle', 'large'] ], direction='vertical', style=style(width='100%'), ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdCollapse/feat_styles.py ================================================ if True: import sys sys.path.append('../../../') import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdCenter( fac.AntdCollapse( fac.AntdParagraph('内容示例' * 20), isOpen=False, title='折叠面板示例', style={'width': 300}, styles={ 'header': { 'background': '#40a9ff', 'color': '#fff', }, 'body': {'background': '#597ef7'}, }, ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdCountdown/feat_finish_event.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime, timedelta import dash from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = lambda: fac.AntdCenter( [ fac.AntdCountdown( id='countdown-demo', value=(datetime.now() + timedelta(seconds=6)).strftime('%Y-%m-%d %H:%M:%S:%f'), format='HH:mm:ss:SSS', ), fac.Fragment(id='message'), ], style=style(padding=50), ) @app.callback( Output('message', 'children'), Input('countdown-demo', 'finishEvent'), prevent_initial_call=True, ) def show_finish_event(finishEvent): return fac.AntdNotification( message='倒计时结束:' + str(finishEvent['timestamp']), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdCountdown/refactor_to_timer.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime, timedelta import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) deadline = datetime.now() + timedelta(seconds=2 * 24 * 60 * 60 + 30) app.layout = lambda: fac.AntdCenter( [ fac.AntdRow( [ fac.AntdCol( fac.AntdCountdown( title='Countdown', value=deadline.strftime('%Y-%m-%d %H:%M:%S:%f'), ), span=12, ), fac.AntdCol( fac.AntdCountdown( title='Million Seconds', value=deadline.strftime('%Y-%m-%d %H:%M:%S:%f'), format='HH:mm:ss:SSS', ), span=12, ), fac.AntdCol( fac.AntdCountdown( title='Day Level', value=deadline.strftime('%Y-%m-%d %H:%M:%S:%f'), format='D 天 H 时 m 分 s 秒', ), span=24, ), ], gutter=16, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdCountup/refactor_to_timer.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime, timedelta import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) start_datetime = datetime.now() - timedelta(seconds=2 * 24 * 60 * 60 + 30) app.layout = lambda: fac.AntdCenter( [ fac.AntdRow( [ fac.AntdCol( fac.AntdCountup( title='Countdown', value=start_datetime.strftime('%Y-%m-%d %H:%M:%S:%f'), ), span=12, ), fac.AntdCol( fac.AntdCountup( title='Million Seconds', value=start_datetime.strftime('%Y-%m-%d %H:%M:%S:%f'), format='HH:mm:ss:SSS', ), span=12, ), fac.AntdCol( fac.AntdCountup( title='Day Level', value=start_datetime.strftime('%Y-%m-%d %H:%M:%S:%f'), format='D 天 H 时 m 分 s 秒', ), span=24, ), ], gutter=16, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdDescriptions/feat_span_filled.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdDescriptions( items=[ { 'label': 'item1', 'children': 'default span', }, { 'label': 'item2', 'children': 'span="filled"', 'span': 'filled', }, { 'label': 'item3', 'children': 'span="filled"', 'span': 'filled', }, { 'label': 'item4', 'children': 'default span', }, ], bordered=True, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdImage/debug_preview_toolbar.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdImage( src='https://fac.feffery.tech/assets/imgs/components/AntdImage/%E7%A4%BA%E4%BE%8B%E5%9B%BE%E7%89%871.jpg', height=400, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdSegmented/feat_shape.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdSpace( [ fac.AntdSegmented( options=[ { 'value': 'sun', 'icon': 'antd-sun', }, { 'value': 'moon', 'icon': 'antd-moon', }, ], value='sun', shape='round', size=size, ) for size in ['small', 'middle', 'large'] ], direction='vertical', style={'width': '100%'}, ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdSegmented/feat_simple_options.py ================================================ if True: import sys sys.path.append('../../../') import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdCenter( fac.AntdSpace( [ fac.AntdSegmented( options=[ 'antd-carry-out', 'antd-branches', 'antd-team', 'antd-send', 'antd-setting', ], defaultValue='antd-carry-out', ), fac.AntdSegmented( options=[ {'label': i, 'value': i} for i in [ 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Yearly', ] ], defaultValue='Daily', ), ] ), style=style(height='100vh'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdSegmented/feat_vertical.py ================================================ if True: import sys sys.path.append('../../../') import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdCenter( fac.AntdSegmented( options=[ {'value': i, 'icon': icon} for i, icon in enumerate( [ 'antd-carry-out', 'antd-branches', 'antd-team', 'antd-send', 'antd-setting', ] ) ], defaultValue=0, vertical=True, ), style=style(height='100vh'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_button_mode_like_dcc_link.py ================================================ if True: import sys sys.path.append('../../../') import json import dash from dash import html from dash.dependencies import Input, Output, State import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSwitch(), fac.AntdTable( id='table-rerender-button-demo', columns=[ { 'title': 'button示例1', 'dataIndex': 'button示例1', 'renderOptions': { 'renderType': 'button', 'likeDccLink': True, }, }, { 'title': 'button示例2', 'dataIndex': 'button示例2', 'renderOptions': {'renderType': 'button'}, }, { 'title': 'button示例3', 'dataIndex': 'button示例3', 'renderOptions': { 'renderType': 'button', 'renderButtonPopConfirmProps': { 'title': '确认执行?', 'okText': '确认', 'cancelText': '取消', }, }, }, ], data=[ { 'button示例1': { 'content': f'按钮1-{i}', 'type': 'link', 'href': f'/item{i}', 'custom': 'balabalabalabala', }, 'button示例2': [ { 'content': f'按钮2-{i}-{j}', 'type': 'primary', 'custom': 'balabalabalabala', } for j in range(1, 3) ], 'button示例3': [ { 'content': f'按钮3-{i}-{j}', 'type': 'dashed', 'danger': True, 'custom': 'balabalabalabala', } for j in range(1, 3) ], } for i in range(1, 4) ], bordered=True, ), html.Pre(id='table-rerender-button-demo-output'), ], style={'padding': 100}, ) @app.callback( Output('table-rerender-button-demo-output', 'children'), Input('table-rerender-button-demo', 'nClicksButton'), [ State('table-rerender-button-demo', 'clickedContent'), State('table-rerender-button-demo', 'clickedCustom'), State( 'table-rerender-button-demo', 'recentlyButtonClickedDataIndex', ), State( 'table-rerender-button-demo', 'recentlyButtonClickedRow', ), ], prevent_initial_call=True, ) def table_rerender_button_demo( nClicksButton, clickedContent, clickedCustom, recentlyButtonClickedDataIndex, recentlyButtonClickedRow, ): return json.dumps( dict( nClicksButton=nClicksButton, clickedContent=clickedContent, clickedCustom=clickedCustom, recentlyButtonClickedDataIndex=recentlyButtonClickedDataIndex, recentlyButtonClickedRow=recentlyButtonClickedRow, ), indent=4, ensure_ascii=False, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_button_mode_refactor.py ================================================ if True: import sys sys.path.append('../../../') import json import dash from dash import html from dash.dependencies import Input, Output, State import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( id='table-rerender-button-demo', columns=[ { 'title': 'button示例1', 'dataIndex': 'button示例1', 'renderOptions': {'renderType': 'button'}, }, { 'title': 'button示例2', 'dataIndex': 'button示例2', 'renderOptions': {'renderType': 'button'}, }, { 'title': 'button示例3', 'dataIndex': 'button示例3', 'renderOptions': { 'renderType': 'button', 'renderButtonPopConfirmProps': { 'title': '确认执行?', 'okText': '确认', 'cancelText': '取消', }, }, }, { 'title': 'button示例4', 'dataIndex': 'button示例4', 'renderOptions': {'renderType': 'button'}, }, ], data=[ { 'button示例1': { 'content': f'按钮1-{i}', 'type': 'link', 'custom': 'balabalabalabala', }, 'button示例2': [ { 'content': f'按钮2-{i}-{j}', 'type': 'primary', 'custom': 'balabalabalabala', } for j in range(1, 3) ], 'button示例3': [ { 'content': f'按钮3-{i}-{j}', 'type': 'dashed', 'danger': True, 'custom': 'balabalabalabala', } for j in range(1, 3) ], 'button示例4': [ { 'content': '有确认框', 'type': 'link', 'danger': True, 'popConfirmProps': {'title': '确认继续?'}, }, { 'content': '无确认框', 'type': 'link', }, ], } for i in range(1, 4) ], bordered=True, ), html.Pre(id='table-rerender-button-demo-output'), ], style={'padding': 100}, ) @app.callback( Output('table-rerender-button-demo-output', 'children'), Input('table-rerender-button-demo', 'nClicksButton'), [ State('table-rerender-button-demo', 'clickedContent'), State('table-rerender-button-demo', 'clickedCustom'), State( 'table-rerender-button-demo', 'recentlyButtonClickedDataIndex', ), State( 'table-rerender-button-demo', 'recentlyButtonClickedRow', ), ], prevent_initial_call=True, ) def table_rerender_button_demo( nClicksButton, clickedContent, clickedCustom, recentlyButtonClickedDataIndex, recentlyButtonClickedRow, ): return json.dumps( dict( nClicksButton=nClicksButton, clickedContent=clickedContent, clickedCustom=clickedCustom, recentlyButtonClickedDataIndex=recentlyButtonClickedDataIndex, recentlyButtonClickedRow=recentlyButtonClickedRow, ), indent=4, ensure_ascii=False, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_button_mode_tooltip.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': 'button示例', 'dataIndex': 'button示例', 'renderOptions': {'renderType': 'button'}, }, ], data=[ { 'button示例': { 'icon': 'antd-setting', 'tooltip': {'title': '示例按钮'}, }, }, { 'button示例': { 'icon': 'antd-setting', 'tooltip': { 'title': '示例按钮', 'placement': 'bottom', }, }, }, ], bordered=True, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_columns_fixed_bool.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ html.Div( fac.AntdTable( columns=[ { 'title': f'字段{i}', 'dataIndex': f'字段{i}', 'fixed': i <= 2, } for i in range(1, 6) ], data=[{f'字段{i}': '示例内容' for i in range(1, 6)}] * 3, maxWidth=900, ), style={'maxWidth': 700, 'margin': '0 auto'}, ) ], style=style(position='relative', height='100vh'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_columns_min_width.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ {'title': 'int型示例', 'dataIndex': 'int型示例', 'minWidth': '500px'}, { 'title': 'float型示例', 'dataIndex': 'float型示例', }, { 'title': 'str型示例', 'dataIndex': 'str型示例', }, { 'title': '日期时间示例', 'dataIndex': '日期时间示例', }, ], data=[ { 'int型示例': 123, 'float型示例': 1.23, 'str型示例': '示例字符', '日期时间示例': datetime.now(), } ] * 3, tableLayout='auto', ) ], style=style(position='relative', height='100vh'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_columns_sort_order.py ================================================ if True: import sys sys.path.append('../../../') import json import random import dash from dash import html from dash.dependencies import Input, Output, State from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdTable( id='table1', columns=[ { 'title': 'int型示例', 'dataIndex': 'int型示例', 'width': '25%', }, { 'title': 'float型示例', 'dataIndex': 'float型示例', 'width': '25%', }, { 'title': 'str型示例', 'dataIndex': 'str型示例', 'width': '25%', 'defaultSortOrder': 'ascend', }, { 'title': '日期时间示例', 'dataIndex': '日期时间示例', 'width': '25%', }, ], data=[ { 'int型示例': i, 'float型示例': round(i * 0.1, 1), 'str型示例': f'示例字符{i}', '日期时间示例': f'2099-01-0{i}', } for i in [4, 2, 1, 5, 3] ], sortOptions={ 'sortDataIndexes': [ 'int型示例', 'float型示例', 'str型示例', '日期时间示例', ] }, ), fac.AntdTable( id='table2', columns=[ { 'title': f'字段{i}', 'dataIndex': f'字段{i}', 'width': '20%', 'defaultSortOrder': 'ascend' if i % 2 == 0 else 'descend', } for i in range(1, 6) ], data=[ {f'字段{j}': random.randint(1, 4) for j in range(1, 6)} for i in range(10) ], bordered=True, sortOptions={ 'sortDataIndexes': [ '字段1', '字段2', '字段4', '字段5', ], 'multiple': True, }, ), fac.AntdButton( '获取columns', id='get-columns', type='primary', ), html.Pre(id='show-columns'), ], direction='vertical', style=style(width='100%'), ) ], style={'padding': 100}, ) @app.callback( Output('show-columns', 'children'), Input('get-columns', 'nClicks'), [ State('table1', 'columns'), State('table2', 'columns'), ], prevent_initial_call=True, ) def show_columns(nClicks, table1_columns, table2_columns): return json.dumps( { 'table1_columns': table1_columns, 'table2_columns': table2_columns, }, indent=4, ensure_ascii=False, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_editable_disabled_keys.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': 'int型示例', 'dataIndex': 'int型示例', 'editable': True, 'width': '20%', }, { 'title': 'float型示例', 'dataIndex': 'float型示例', 'editable': True, 'width': '20%', }, { 'title': 'str型示例', 'dataIndex': 'str型示例', 'editable': True, 'width': '20%', }, { 'title': '日期时间示例', 'dataIndex': '日期时间示例', 'editable': True, 'width': '20%', }, { 'title': 'placeholder示例', 'dataIndex': 'placeholder示例', 'editable': True, 'width': '20%', 'editOptions': { 'placeholder': '请输入内容', 'disabledKeys': ['row-1', 'row-5'], }, }, ], data=[ { 'key': f'row-{i}', 'int型示例': 123, 'float型示例': 1.23, 'str型示例': '示例字符', '日期时间示例': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), } for i in range(10) ], bordered=True, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_header_align.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': align, 'dataIndex': align, 'align': align, 'headerAlign': 'right', } for align in ['left', 'center', 'right'] ], data=[{align: 999 for align in ['left', 'center', 'right']}] * 3, bordered=True, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_link_mode_like_dcc_link.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSwitch(), fac.AntdTable( columns=[ { 'title': 'link示例', 'dataIndex': 'link示例', 'renderOptions': { 'renderType': 'link', 'likeDccLink': True, }, }, ], data=[ { 'link示例': { 'content': f'{content}仓库', 'href': '/' + content, }, } for content in [ 'fac', 'fuc', 'fact', 'fmc', 'flc', ] ], bordered=True, style={'width': 400}, ), ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_loading.py ================================================ if True: import sys sys.path.append('../../../') import random import time import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdButton( '刷新数据', id='update-data', type='primary', loadingChildren='刷新中', ), fac.AntdTable( id='table', columns=[ { 'dataIndex': f'字段{i}', 'title': f'字段{i}', } for i in range(10) ], data=[ {f'字段{i}': random.randint(1, 100) for i in range(10)} for _ in range(10) ], bordered=True, ), ], direction='vertical', style=style(width='100%'), ), ], style={'padding': 100}, ) @app.callback( Output('table', 'data'), Input('update-data', 'nClicks'), running=[ [Output('update-data', 'loading'), True, False], [Output('table', 'loading'), True, False], ], prevent_initial_call=True, ) def update_data(nClicks): time.sleep(1) return [{f'字段{i}': random.randint(1, 100) for i in range(10)} for _ in range(10)] if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_mini_chart_color.py ================================================ if True: import sys sys.path.append('../../../') import dash import numpy as np from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdSpace( [ fac.AntdTable( columns=[ { 'title': 'mini-line示例1', 'dataIndex': 'mini-line示例1', 'renderOptions': { 'renderType': 'mini-line', 'miniChartColor': 'red', }, 'width': '50%', }, { 'title': 'mini-line示例2', 'dataIndex': 'mini-line示例2', 'renderOptions': { 'renderType': 'mini-line', 'miniChartColor': 'red', 'tooltipCustomContent': """(x, data) => `数值:${data[0]?.data?.y.toFixed(3)}`""", }, 'width': '50%', }, ], data=[ { 'mini-line示例1': [np.random.rand() for i in range(25)], 'mini-line示例2': [np.random.rand() for i in range(25)], } ] * 3, bordered=True, style={'width': 300}, ), fac.AntdTable( columns=[ { 'title': 'mini-bar示例1', 'dataIndex': 'mini-bar示例1', 'renderOptions': { 'renderType': 'mini-bar', 'miniChartColor': 'red', }, 'width': '50%', }, { 'title': 'mini-bar示例2', 'dataIndex': 'mini-bar示例2', 'renderOptions': { 'renderType': 'mini-bar', 'miniChartColor': 'red', 'tooltipCustomContent': """(x, data) => `数值:${data[0]?.data?.y.toFixed(3)}`""", }, 'width': '50%', }, ], data=[ { 'mini-bar示例1': [np.random.rand() for i in range(25)], 'mini-bar示例2': [np.random.rand() for i in range(25)], } ] * 3, bordered=True, style={'width': 300}, ), fac.AntdTable( columns=[ { 'title': 'mini-area示例1', 'dataIndex': 'mini-area示例1', 'renderOptions': { 'renderType': 'mini-area', 'miniChartColor': 'red', }, 'width': '50%', }, { 'title': 'mini-area示例2', 'dataIndex': 'mini-area示例2', 'renderOptions': { 'renderType': 'mini-area', 'miniChartColor': 'red', 'tooltipCustomContent': """(x, data) => `数值:${data[0]?.data?.y.toFixed(3)}`""", }, 'width': '50%', }, ], data=[ { 'mini-area示例1': [np.random.rand() for i in range(25)], 'mini-area示例2': [np.random.rand() for i in range(25)], } ] * 3, bordered=True, style={'width': 300}, ), ], direction='vertical', style=style(width='100%'), ), style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_row_class_name.py ================================================ if True: import sys sys.path.append('../../../') import random import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( id='table', columns=[ { 'dataIndex': f'字段{i}', 'title': f'字段{i}', } for i in range(10) ], data=[{f'字段{i}': random.randint(1, 100) for i in range(10)} for _ in range(10)], bordered=True, rowClassName='test-row-class-name', ), ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_row_class_name_func.py ================================================ if True: import sys sys.path.append('../../../') import random import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( id='table', columns=[ { 'dataIndex': f'字段{i}', 'title': f'字段{i}', } for i in range(10) ], data=[{f'字段{i}': random.randint(1, 100) for i in range(10)} for _ in range(10)], bordered=True, rowClassName={'func': '(record, index) => `row-${index}`'}, ), ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_select_mode_show_search.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': 'select示例1', 'dataIndex': 'select示例1', 'renderOptions': {'renderType': 'select'}, 'width': 'calc(100% / 3)', }, { 'title': 'select示例2', 'dataIndex': 'select示例2', 'renderOptions': {'renderType': 'select'}, 'width': 'calc(100% / 3)', }, ], data=[ { 'select示例1': { 'options': [ { 'label': f'选项{j}', 'value': f'选项{j}', } for j in range(5) ], 'allowClear': True, 'placeholder': '请选择', }, 'select示例2': { 'options': [ { 'label': f'选项{j}', 'value': f'选项{j}', } for j in range(5) ], 'mode': 'multiple', 'allowClear': True, 'placeholder': '请选择', 'showSearch': False, }, } for i in range(1, 4) ], bordered=True, tableLayout='fixed', ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_sticky_header.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ # ---- sticky top section whose height can change (collapse) ---- html.Div( fac.AntdAccordion( items=[ { 'title': f'手风琴项示例{i}', 'key': i, 'children': fac.AntdText(f'手风琴项示例{i}'), } for i in range(1, 6) ] ), # this outer wrapper is what the hook observes className='filters-shell', style={ 'position': 'sticky', 'top': 0, 'zIndex': 20, 'background': 'white', 'borderBottom': '1px solid #f0f0f0', }, ), html.Br(), fac.AntdTable( columns=[{'title': f'Field {i}', 'dataIndex': f'Field {i}'} for i in range(5)], data=[{**{f'Field {j}': i for j in range(5)}, 'key': f'row-{i}'} for i in range(60)], bordered=True, size='middle', className='sticky-table', sticky={'belowSelector': '.filters-shell'}, pagination={'pageSize': 100, 'position': 'bottomCenter'}, expandedRowKeyToContent=[ { 'key': f'row-{i}', 'content': fac.AntdTable( columns=[ {'title': f'Nested {i}', 'dataIndex': f'Field {i}'} for i in range(5) ], data=[ {**{f'Field {j}': i for j in range(5)}, 'key': f'row-{i}'} for i in range(60) ], bordered=True, size='middle', sticky={ 'belowSelector': [ '.filters-shell', '.sticky-table .ant-table-header.ant-table-sticky-holder', ], }, pagination={'pageSize': 100, 'position': 'bottomCenter'}, ), } for i in range(60) ], ), ], style={'padding': 24, 'maxWidth': 1000, 'margin': '0 auto'}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_table_scroll.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': 'int型示例', 'dataIndex': 'int型示例', }, { 'title': 'float型示例', 'dataIndex': 'float型示例', }, { 'title': 'str型示例', 'dataIndex': 'str型示例', }, { 'title': '日期时间示例', 'dataIndex': '日期时间示例', }, ], data=[ { 'int型示例': 123, 'float型示例': 1.23, 'str型示例': '示例字符', '日期时间示例': datetime.now(), '布尔类型示例': True, } ] * 100, maxHeight=300, scrollToFirstRowOnChange=False, bordered=True, maxWidth='max-content', ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_tag_mode_tooltip.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': 'Single Tag', 'dataIndex': 'single-tag', 'renderOptions': {'renderType': 'tags'}, }, { 'title': 'Multiple Tags', 'dataIndex': 'multiple-tags', 'renderOptions': {'renderType': 'tags'}, }, ], data=[ { 'single-tag': { 'tag': 'Active', 'color': 'green', 'tooltip': {'title': 'Currently active status'}, }, 'multiple-tags': [ { 'tag': 'Important', 'color': 'red', 'tooltip': { 'title': 'High priority item', 'placement': 'top', }, }, { 'tag': 'Verified', 'color': 'blue', 'tooltip': { 'title': 'Verified by admin', 'placement': 'bottom', }, }, ], }, { 'single-tag': { 'tag': 'Pending', 'color': 'orange', 'tooltip': { 'title': 'Waiting for processing', 'placement': 'right', }, }, 'multiple-tags': [ { 'tag': 'New', 'color': 'cyan', }, { 'tag': 'Urgent', 'color': 'red', 'tooltip': { 'title': 'Urgent task', 'placement': 'left', }, }, ], }, ], bordered=True, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/feat_title_popover_nodes.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': fac.AntdSpace( [ 'Name', fac.AntdPopover( fac.AntdIcon(icon='antd-question-circle'), title='Hover for Name Info', content='Full names of team members', ), ], size='small', ), 'dataIndex': 'name', }, {'title': 'Role', 'dataIndex': 'role'}, { 'title': fac.AntdSpace( [ 'Status', fac.AntdPopover( fac.AntdIcon(icon='antd-question-circle'), title=fac.AntdText('Status Legend'), content=fac.AntdDescriptions( column=1, bordered=True, items=[ { 'label': 'Active', 'children': 'Currently available', }, { 'label': 'On Leave', 'children': 'Temporarily out', }, ], size='small', style={'maxWidth': 600}, ), ), ], size='small', ), 'dataIndex': 'status', }, ], data=[ { 'name': 'Alice', 'role': 'Designer', 'status': 'Active', 'key': '1', }, { 'name': 'Bob', 'role': 'Engineer', 'status': 'On Leave', 'key': '2', }, { 'name': 'Carol', 'role': 'PM', 'status': 'Active', 'key': '3', }, ], bordered=True, ) ], style={'padding': 50}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/fix_context_locale.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdConfigProvider( fac.AntdTable( columns=[ { 'title': '搜索型筛选', 'dataIndex': '搜索型筛选', } ], data=[{'搜索型筛选': s} for s in list('abced')], filterOptions={'搜索型筛选': {'filterMode': 'keyword'}}, style={'width': 200}, ), locale='en-us', ) ], style={'padding': 50}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/fix_field_bool.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': 'int型示例', 'dataIndex': 'int型示例', }, { 'title': 'float型示例', 'dataIndex': 'float型示例', }, { 'title': 'str型示例', 'dataIndex': 'str型示例', }, { 'title': '日期时间示例', 'dataIndex': '日期时间示例', }, ], data=[ { 'int型示例': 123, 'float型示例': 1.23, 'str型示例': '示例字符', '日期时间示例': datetime.now(), '布尔类型示例': True, } ] * 3, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/fix_max_width_height_ghost_row.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ html.Div( fac.AntdTable( columns=[ { 'title': f'字段{i}', 'dataIndex': f'字段{i}', } for i in range(1, 6) ], data=[{f'字段{i}': '示例内容' for i in range(1, 6)}] * 3, maxWidth=900, title='maxWidth=900', ), style={'maxWidth': 700, 'margin': '0 auto'}, ), fac.AntdTable( columns=[ { 'title': f'字段{i}', 'dataIndex': f'字段{i}', } for i in range(1, 6) ], data=[{f'字段{i}': '示例内容' * 4 for i in range(1, 6)}] * 3, maxWidth='max-content', title='maxWidth="max-content"', ), ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/fix_nested_editable.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) normal_table = fac.AntdTable( columns=[ { 'title': 'int型示例', 'dataIndex': 'int型示例', 'editable': True, 'width': '20%', }, { 'title': 'float型示例', 'dataIndex': 'float型示例', 'editable': True, 'width': '20%', }, { 'title': 'str型示例', 'dataIndex': 'str型示例', 'editable': True, 'width': '20%', }, { 'title': '日期时间示例', 'dataIndex': '日期时间示例', 'editable': True, 'width': '20%', }, { 'title': 'placeholder示例', 'dataIndex': 'placeholder示例', 'editable': True, 'width': '20%', 'editOptions': {'placeholder': '请输入内容'}, }, ], data=[ { 'int型示例': 123, 'float型示例': 1.23, 'str型示例': '示例字符', '日期时间示例': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), } ] * 3, bordered=True, ) nested_table = fac.AntdTable( id='table-click-event-demo', columns=[ { 'title': f'Column {i}', 'dataIndex': f'column-{i}', 'width': 'calc(100% / 3)', 'editable': True, } for i in range(1, 4) ], data=[ { 'key': f'row-{i}', 'column-1': '第一层', 'column-2': '第一层', 'column-3': '第一层', 'children': [ { 'key': f'row-{i}{j}', 'column-1': '第二层', 'column-2': '第二层', 'column-3': '第二层', 'children': [ { 'key': f'row-{i}{j}{k}', 'column-1': '第二层', 'column-2': '第二层', 'column-3': '第二层', } for k in range(3) ], } for j in range(3) ], } for i in range(3) ], bordered=True, ) app.layout = html.Div( [ fac.AntdSpace( [normal_table, nested_table], direction='vertical', style=style(width='100%'), ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/fix_select_with_editable.py ================================================ if True: import sys sys.path.append('../../../') from datetime import datetime import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': 'select示例1', 'dataIndex': 'select示例1', 'renderOptions': {'renderType': 'select'}, }, { 'title': 'placeholder示例', 'dataIndex': 'placeholder示例', 'editable': True, 'width': '20%', 'editOptions': {'placeholder': '请输入内容'}, }, { 'title': 'int型示例', 'dataIndex': 'int型示例', 'editable': True, }, { 'title': 'float型示例', 'dataIndex': 'float型示例', 'editable': True, }, { 'title': 'str型示例', 'dataIndex': 'str型示例', 'editable': True, }, { 'title': '日期时间示例', 'dataIndex': '日期时间示例', 'editable': True, }, ], data=[ { 'select示例1': { 'options': [ { 'label': f'选项{j}', 'value': f'选项{j}', } for j in range(5) ], 'allowClear': True, 'placeholder': '请选择', }, 'int型示例': 123, 'float型示例': 1.23, 'str型示例': '示例字符', '日期时间示例': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), } ] * 3, bordered=True, tableLayout='fixed', ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/fix_server_side_mode_filter_search.py ================================================ if True: import sys sys.path.append('../../../') import time import dash import numpy as np import pandas as pd from dash import html from dash.dependencies import Input, Output, State import feffery_antd_components as fac # 生成演示用数据框 demo_df = ( pd.DataFrame( { 'id': list(range(1, 100001)), '字段1': np.random.choice( [f'{s}{n}' for s in list('abcdefghij') for n in range(1, 10001)], 100000, replace=False, ), '字段2': np.random.choice( [f'类型{t}' for t in range(1, 11) for n in range(10000)], 100000, replace=False, ), } ) # 打乱顺序 .sample(frac=1, replace=False) ) app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpin( fac.AntdTable( id='table-server-side-mode-pagination+filter-demo-pandas', columns=[ { 'title': column, 'dataIndex': column, 'width': 'calc(100% / {})'.format(demo_df.shape[0]), } for column in demo_df.columns ], bordered=True, # 关键参数 mode='server-side', pagination={ 'total': demo_df.shape[0], 'current': 1, 'pageSize': 5, 'showSizeChanger': True, 'pageSizeOptions': [5, 10], 'position': 'topCenter', 'showQuickJumper': True, }, filterOptions={ '字段1': {'filterMode': 'keyword'}, '字段2': { 'filterCustomItems': demo_df['字段2'].unique(), 'filterMultiple': True, 'filterSearch': True, }, }, ), text='数据加载中', size='small', ) ], style={'padding': 100}, ) @app.callback( [ Output( 'table-server-side-mode-pagination+filter-demo-pandas', 'data', ), Output( 'table-server-side-mode-pagination+filter-demo-pandas', 'pagination', ), ], [ Input( 'table-server-side-mode-pagination+filter-demo-pandas', 'pagination', ), Input( 'table-server-side-mode-pagination+filter-demo-pandas', 'filter', ), ], State( 'table-server-side-mode-pagination+filter-demo-pandas', 'filterOptions', ), ) def table_server_side_mode_pagination_filter_demo_pandas(pagination, filter_, filterOptions): if pagination: time.sleep(0.5) # 渲染加载动画更好看 ^_^ # 若存在至少一项有效的筛选操作 if filter_ and any([value for value in filter_.values()]): # 根据当前分页的current参数、pageSize参数,筛选后从demo_df中抽取对应数据帧 valid_filters = [(key, value) for key, value in filter_.items() if value] filter_conditions = ( f'`{valid_filters[0][0]}` == {valid_filters[0][1]}' if filterOptions[valid_filters[0][0]].get('filterMode') != 'keyword' else f'`{valid_filters[0][0]}`.str.contains("{valid_filters[0][1][0]}")' ) for valid_filter in valid_filters[1:]: filter_conditions += ' and ' filter_conditions += ( f'`{valid_filter[0]}` == {valid_filter[1]}' if filterOptions[valid_filter[0]].get('filterMode') != 'keyword' else f'`{valid_filter[0]}`.str.contains("{valid_filter[1][0]}")' ) # 计算经过筛选后的符合条件记录值数量 match_records_count = demo_df.query(filter_conditions).shape[0] data_frame = demo_df.query(filter_conditions).iloc[ (pagination['current'] - 1) * pagination['pageSize'] : pagination['current'] * pagination['pageSize'], :, ] return [ data_frame.to_dict('records'), { **pagination, 'total': match_records_count, }, ] # 根据当前分页的current参数、pageSize参数,从demo_df中抽取对应数据帧 data_frame = demo_df.iloc[ (pagination['current'] - 1) * pagination['pageSize'] : pagination['current'] * pagination['pageSize'], :, ] return [ data_frame.to_dict('records'), {**pagination, 'total': demo_df.shape[0]}, ] return dash.no_update if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/fix_summary.py ================================================ if True: import sys sys.path.append('../../../') import dash import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = dash.html.Div( [ fac.AntdTable( data=[ { 'parent_id': 0, 'subject_id': 5, 'subjectName': '1费用', '2024-01': 129070.69, '2024-02': 6920.25, '2024-03': 8692.08, '2024-04': 11505.06, '2024-05': 6020.31, '合计': 162208.39, '占比': '37.86%', 'children': [ { 'parent_id': 5, 'subject_id': 43, 'subjectName': '2付款', '2024-01': 126307.66, '2024-02': 3664.12, '2024-03': 1941.0, '2024-04': 7465.98, '2024-05': 3820.8, '合计': 143199.56, '占比': '33.42%', }, { 'parent_id': 5, 'subject_id': 84, 'subjectName': '3旅费', '2024-01': 0.0, '2024-02': 0.0, '2024-03': 5878.31, '2024-04': 3834.84, '2024-05': 0.0, '合计': 9713.15, '占比': '2.27%', }, { 'parent_id': 5, 'subject_id': 38, 'subjectName': '4金', '2024-01': 2763.03, '2024-02': 3256.13, '2024-03': 872.77, '2024-04': 204.24, '2024-05': 2199.51, '合计': 9295.68, '占比': '2.17%', }, ], }, { 'parent_id': 0, 'subject_id': 96, 'subjectName': '1酬', '2024-01': 43387.05, '2024-02': 3757.05, '2024-03': 4919.05, '2024-04': 33102.51, '2024-05': 9132.51, '合计': 94298.17, '占比': '22.01%', 'children': [ { 'parent_id': 96, 'subject_id': 75, 'subjectName': '2资', '2024-01': 29000.0, '2024-02': 0.0, '2024-03': 0.0, '2024-04': 24000.0, '2024-05': 0.0, '合计': 53000.0, '占比': '12.37%', }, { 'parent_id': 96, 'subject_id': 37, 'subjectName': '3资', '2024-01': 10600.0, '2024-02': 0.0, '2024-03': 1162.0, '2024-04': 5300.0, '2024-05': 5300.0, '合计': 22362.0, '占比': '5.22%', }, { 'parent_id': 96, 'subject_id': 71, 'subjectName': '2保', '2024-01': 3757.05, '2024-02': 3757.05, '2024-03': 3757.05, '2024-04': 3802.51, '2024-05': 3802.51, '合计': 18876.17, '占比': '4.41%', }, { 'parent_id': 96, 'subject_id': 63, 'subjectName': '4费', '2024-01': 30.0, '2024-02': 0.0, '2024-03': 0.0, '2024-04': 0.0, '2024-05': 30.0, '合计': 60.0, '占比': '0.01%', }, ], }, { 'parent_id': 0, 'subject_id': 4, 'subjectName': '1费用', '2024-01': 17608.0, '2024-02': 17640.0, '2024-03': 17528.0, '2024-04': 17608.0, '2024-05': 17629.0, '合计': 88013.0, '占比': '20.54%', 'children': [ { 'parent_id': 4, 'subject_id': 78, 'subjectName': '2金', '2024-01': 17608.0, '2024-02': 17640.0, '2024-03': 17528.0, '2024-04': 17608.0, '2024-05': 17629.0, '合计': 88013.0, '占比': '20.54%', } ], }, { 'parent_id': 0, 'subject_id': 6, 'subjectName': '3用', '2024-01': 45773.61, '2024-02': 145.0, '2024-03': 22357.04, '2024-04': 42.05, '2024-05': 3397.9, '合计': 71715.6, '占比': '16.74%', 'children': [ { 'parent_id': 6, 'subject_id': 85, 'subjectName': '4出', '2024-01': 44600.0, '2024-02': 0.0, '2024-03': 21600.0, '2024-04': 0.0, '2024-05': 0.0, '合计': 66200.0, '占比': '15.45%', }, { 'parent_id': 6, 'subject_id': 61, 'subjectName': '2费', '2024-01': 1173.61, '2024-02': 145.0, '2024-03': 757.04, '2024-04': 42.05, '2024-05': 3397.9, '合计': 5515.6, '占比': '1.29%', }, ], }, { 'parent_id': 0, 'subject_id': 8, 'subjectName': '2用', '2024-01': 3779.09, '2024-02': 212.61, '2024-03': 1703.25, '2024-04': 2190.72, '2024-05': 2584.13, '合计': 10469.8, '占比': '2.44%', 'children': [ { 'parent_id': 8, 'subject_id': 58, 'subjectName': '3用', '2024-01': 3523.09, '2024-02': 173.61, '2024-03': 1289.18, '2024-04': 2000.84, '2024-05': 2501.13, '合计': 9487.85, '占比': '2.21%', }, { 'parent_id': 8, 'subject_id': 80, 'subjectName': '4车费', '2024-01': 60.0, '2024-02': 0.0, '2024-03': 300.0, '2024-04': 80.0, '2024-05': 0.0, '合计': 440.0, '占比': '0.10%', }, { 'parent_id': 8, 'subject_id': 57, 'subjectName': '5用', '2024-01': 151.0, '2024-02': 39.0, '2024-03': 84.07, '2024-04': 9.88, '2024-05': 39.0, '合计': 322.95, '占比': '0.08%', }, { 'parent_id': 8, 'subject_id': 73, 'subjectName': '1费', '2024-01': 45.0, '2024-02': 0.0, '2024-03': 30.0, '2024-04': 100.0, '2024-05': 44.0, '合计': 219.0, '占比': '0.05%', }, ], }, { 'parent_id': 0, 'subject_id': 7, 'subjectName': '1用', '2024-01': 80.0, '2024-02': 0.0, '2024-03': 543.25, '2024-04': 410.0, '2024-05': 402.49, '合计': 1435.74, '占比': '0.34%', 'children': [ { 'parent_id': 7, 'subject_id': 81, 'subjectName': '23', '2024-01': 0.0, '2024-02': 0.0, '2024-03': 543.25, '2024-04': 410.0, '2024-05': 400.0, '合计': 1353.25, '占比': '0.32%', }, { 'parent_id': 7, 'subject_id': 70, 'subjectName': '1费', '2024-01': 80.0, '2024-02': 0.0, '2024-03': 0.0, '2024-04': 0.0, '2024-05': 2.49, '合计': 82.49, '占比': '0.02%', }, ], }, { 'parent_id': 0, 'subject_id': 3, 'subjectName': '4用', '2024-01': 187.81, '2024-02': 0.0, '2024-03': 12.0, '2024-04': 19.88, '2024-05': 85.18, '合计': 304.87, '占比': '0.07%', 'children': [ { 'parent_id': 3, 'subject_id': 52, 'subjectName': '2入', '2024-01': 186.38, '2024-02': 0.0, '2024-03': 0.0, '2024-04': 0.0, '2024-05': 0.0, '合计': 186.38, '占比': '0.04%', }, { 'parent_id': 3, 'subject_id': 74, 'subjectName': '5费', '2024-01': 1.43, '2024-02': 0.0, '2024-03': 12.0, '2024-04': 19.88, '2024-05': 85.18, '合计': 118.49, '占比': '0.03%', }, ], }, ], columns=[ { 'title': '科目名称', 'dataIndex': 'subjectName', 'width': 150, 'fixed': 'left', }, { 'title': '占比', 'dataIndex': '占比', 'width': 80, 'fixed': 'left', }, { 'title': '合计', 'dataIndex': '合计', 'width': 100, 'fixed': 'left', }, { 'title': '2024-01', 'dataIndex': '2024-01', 'width': 100, }, { 'title': '2024-02', 'dataIndex': '2024-02', 'width': 100, }, { 'title': '2024-03', 'dataIndex': '2024-03', 'width': 100, }, { 'title': '2024-04', 'dataIndex': '2024-04', 'width': 100, }, { 'title': '2024-05', 'dataIndex': '2024-05', 'width': 100, }, ], **{ 'summaryRowContents': [ # 第一行 { 'content': fac.AntdText(''), 'align': 'center', }, { 'content': fac.AntdText(''), 'align': 'center', }, { 'content': fac.AntdText(''), 'align': 'center', }, { 'content': fac.AntdText( children='239886.25', strong=True, ), 'align': 'center', }, { 'content': fac.AntdText(children='28674.91', strong=True), 'align': 'center', }, { 'content': fac.AntdText(children='55754.67', strong=True), 'align': 'center', }, { 'content': fac.AntdText(children='64878.22', strong=True), 'align': 'center', }, { 'content': fac.AntdText(children='39251.52', strong=True), 'align': 'center', }, { 'content': fac.AntdText(''), 'align': 'center', }, { 'content': fac.AntdText(''), 'align': 'center', }, { 'content': fac.AntdText(''), 'align': 'center', }, { 'content': 324315.83, 'align': 'center', 'colSpan': 3, }, { 'content': 104129.74, 'align': 'center', 'colSpan': 2, }, { 'content': fac.AntdText(''), 'align': 'center', }, { 'content': fac.AntdText(''), 'align': 'center', }, { 'content': fac.AntdText(''), 'align': 'center', }, { 'content': 428445.57, 'align': 'center', 'colSpan': 5, }, { 'content': '支出合计: 428,445.57', 'align': 'center', 'colSpan': 8, }, ], 'summaryRowBlankColumns': 1, 'summaryRowFixed': 'bottom', 'pagination': {'pageSize': 60}, 'rowSelectionType': 'radio', }, ) ] ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/fix_summary_multi_level_header.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': '字段1', 'dataIndex': '字段1', }, { 'title': '字段2', 'dataIndex': '字段2', }, { 'title': '字段3', 'dataIndex': '字段3', 'group': '组1', }, { 'title': '字段4', 'dataIndex': '字段4', 'group': '组1', }, { 'title': '字段5', 'dataIndex': '字段5', }, { 'title': '字段6', 'dataIndex': '字段6', }, ], data=[{f'字段{i}': f'示例内容{i}' for i in range(1, 7)}] * 5, bordered=True, summaryRowContents=[ {'content': '第1列总结', 'align': 'center'}, { 'content': '第2到3列总结', 'colSpan': 2, 'align': 'center', }, {'content': '第4列总结', 'align': 'center'}, { 'content': '第5到6列总结', 'colSpan': 2, 'align': 'center', }, {'content': 'xxx', 'align': 'center'}, { 'content': 'xxx', 'colSpan': 2, 'align': 'center', }, {'content': 'xxx', 'align': 'center'}, { 'content': 'xxx', 'colSpan': 2, 'align': 'center', }, ], rowSelectionType='radio', summaryRowBlankColumns=1, ), ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/fix_zero_value_filter.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': 'value', 'dataIndex': 'value', }, ], data=[{'value': x} for x in range(10)], filterOptions={ 'value': { 'filterCustomItems': [x for x in range(10)], }, }, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/perf_button_mode_auto_wrap.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'dataIndex': '按钮示例', 'title': '按钮示例', 'renderOptions': {'renderType': 'button'}, } ], data=[{'按钮示例': [{'content': f'按钮{i}'} for i in range(50)]}], bordered=True, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/perf_editable_column_format_constrait_message.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( id='table', locale='en-us', columns=[ { 'dataIndex': f'field{i}', 'title': f'field{i}', 'editable': True, } for i in range(1, 4) ], data=[{f'field{i}': '' for i in range(1, 4)}], bordered=True, tableLayout='fixed', columnsFormatConstraint={ 'field1': {'rule': '^[0-9]+$'}, 'field2': { 'rule': '^[0-9]+$', 'content': 'Input "[VALUE]" does not match digits-only format.', }, 'field3': { 'rule': '^[0-9]+$', 'content': 'Input must be digits-only.', }, }, title=fac.AntdSegmented( id='table-locale', options=[ 'en-us', 'zh-cn', 'de-de', 'ru-ru', ], value='en-us', ), ) ], style={'padding': 100}, ) @app.callback( Output('table', 'locale'), Input('table-locale', 'value'), prevent_initial_call=True, ) def update_table_locale(locale): return locale if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/refactor_mini_progress_mode.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__, compress=True) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdTable( columns=[ { 'title': 'mini-progress示例1', 'dataIndex': 'mini-progress示例1', 'renderOptions': {'renderType': 'mini-progress'}, }, { 'title': 'mini-progress示例2', 'dataIndex': 'mini-progress示例2', 'renderOptions': { 'renderType': 'mini-progress', 'progressOneHundredPercentColor': '#f08c00', }, }, { 'title': 'mini-progress示例3', 'dataIndex': 'mini-progress示例3', 'renderOptions': { 'renderType': 'mini-progress', 'progressShowPercent': True, 'progressStrokeLinecap': 'round', }, }, { 'title': 'mini-progress示例4', 'dataIndex': 'mini-progress示例4', 'renderOptions': { 'renderType': 'mini-progress', 'progressSize': 16, }, }, { 'title': 'mini-progress示例5', 'dataIndex': 'mini-progress示例5', 'renderOptions': { 'renderType': 'mini-progress', 'progressColor': { 'from': '#3c8ce7', 'to': '#00eaff', }, }, }, { 'title': 'mini-progress示例6', 'dataIndex': 'mini-progress示例6', 'renderOptions': { 'renderType': 'mini-progress', 'progressShowPercent': True, 'progressStrokeLinecap': 'round', 'progressPercentPrecision': 2, }, }, ], data=[ { 'mini-progress示例1': x, 'mini-progress示例2': x, 'mini-progress示例3': x, 'mini-progress示例4': x, 'mini-progress示例5': x, 'mini-progress示例6': x + 0.00123456, } for x in [0, 0.66, 1] ], bordered=True, miniChartHeight=50, tableLayout='fixed', ), fac.AntdTable( columns=[ { 'title': f'{align} - {_type}', 'dataIndex': f'{align} - {_type}', 'renderOptions': { 'renderType': 'mini-progress', 'progressPercentPosition': { 'align': align, 'type': _type, }, 'progressShowPercent': True, }, } for align in [ 'start', 'center', 'end', ] for _type in ['inner', 'outer'] ], data=[ { f'{align} - {_type}': x for align in [ 'start', 'center', 'end', ] for _type in ['inner', 'outer'] } for x in [0, 0.66, 1] ], bordered=True, miniChartHeight=50, tableLayout='fixed', ), ], direction='vertical', style={'width': '100%'}, ) ], style={'padding': 50}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTable/rollback_title_popover_info.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( columns=[ { 'title': f'字段{i}', 'dataIndex': f'字段{i}', } for i in range(1, 6) ], data=[ { **{f'字段{i}': '示例内容' for i in range(1, 6)}, 'key': f'row-{row + 1}', } for row in range(3) ], titlePopoverInfo={ f'字段{i}': { 'title': f'字段{i}说明', 'content': f'这是字段{i}的说明巴拉巴拉巴拉', 'placement': 'top', } for i in range(1, 6) }, ), ], style={'padding': 50}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTabs/feat_item_icon.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTabs( items=[ { 'key': f'标签页{i}', 'label': f'标签页{i}', 'icon': fac.AntdIcon(icon='antd-function'), 'children': fac.AntdCenter( f'这是标签页{i}的内容示例', style={ 'fontSize': 18, 'background': f'rgba(28, 126, 214, calc(1 - 0.2 * {i}))', 'height': 200, }, ), } for i in range(1, 6) ] ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTabs/feat_placeholder.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output, State from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTabs( id='tabs-add-delete-demo', type='editable-card', items=[ { 'label': f'标签页{i}', 'key': str(i), 'children': fac.AntdCenter( f'标签页{i}', style={ 'height': 200, 'fontSize': 28, }, ), 'closable': True, } for i in range(1, 6) ], tabBarRightExtraContent=fac.AntdIcon( id='tabs-add-delete-demo-add', icon='antd-plus-circle-two-tone', style={'fontSize': 20, 'cursor': 'pointer'}, ), placeholder=fac.AntdEmpty( description='当前无有效标签页', ), ), fac.Fragment(id='tabs-add-delete-demo-tab-count'), ], style=style(padding=50), ) @app.callback( [ Output('tabs-add-delete-demo', 'items'), Output('tabs-add-delete-demo', 'activeKey'), ], [ Input('tabs-add-delete-demo-add', 'nClicks'), Input('tabs-add-delete-demo', 'latestDeletePane'), ], [ State('tabs-add-delete-demo', 'items'), State('tabs-add-delete-demo', 'activeKey'), ], ) def tabs_add_delete_demo(nClicks, latestDeletePane, origin_items, activeKey): if dash.ctx.triggered_id == 'tabs-add-delete-demo-add': if origin_items: # 提取已有items中的最大key值 origin_max_key = max([int(item['key']) for item in origin_items]) else: origin_max_key = 0 return [ [ *origin_items, { 'label': f'标签页{origin_max_key + 1}', 'key': str(origin_max_key + 1), 'children': fac.AntdCenter( f'标签页{origin_max_key + 1}', style={ 'height': 200, 'fontSize': 28, }, ), }, ], str(origin_max_key + 1), ] elif dash.ctx.triggered_id == 'tabs-add-delete-demo': return [ [item for item in origin_items if item['key'] != latestDeletePane], '1' if latestDeletePane == activeKey else dash.no_update, ] return dash.no_update @app.callback( Output('tabs-add-delete-demo-tab-count', 'children'), Input('tabs-add-delete-demo', 'tabCount'), State('tabs-add-delete-demo', 'tabCloseCounts'), prevent_initial_call=True, ) def tabs_add_delete_demo_tab_count(tabCount, tabCloseCounts): return fac.AntdMessage( content=f'标签页自由增删示例 tabCount: {tabCount},标签页关闭次数:{tabCloseCounts}', type='info', ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTabs/feat_tab_bar_style.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTabs( items=[ { 'key': f'标签页{i}', 'label': f'标签页{i}', 'icon': fac.AntdIcon(icon='antd-function'), 'children': fac.AntdCenter( f'这是标签页{i}的内容示例', style={ 'fontSize': 18, 'background': f'rgba(28, 126, 214, calc(1 - 0.2 * {i}))', 'height': 200, }, ), } for i in range(1, 6) ], tabBarStyle=style(background='#d9d9d9'), ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/AntdTree/feat_async_data_load.py ================================================ if True: import sys sys.path.append('../../../') import time import dash from dash import html from dash.dependencies import Input, Output, State from feffery_dash_utils.tree_utils import TreeManager import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTree( id='tree-demo', treeData=[ { 'key': '节点1', 'title': '节点1', }, { 'key': '节点2', 'title': '节点2', 'children': [ { 'key': '节点2-1', 'title': '节点2-1', 'isLeaf': True, }, ], }, { 'key': '节点3', 'title': '节点3', 'isLeaf': True, }, ], enableAsyncLoad=True, ) ], style={'padding': 100}, ) @app.callback( Output('tree-demo', 'treeData'), Input('tree-demo', 'loadingNode'), State('tree-demo', 'treeData'), prevent_initial_call=True, ) def tree_demo(loadingNode, treeData): time.sleep(0.5) return TreeManager.update_tree_node( treeData, node_key=loadingNode['key'], new_node={ 'children': [ { 'key': loadingNode['key'] + '-1', 'title': loadingNode['key'] + '-1', } ] }, mode='overlay', ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataDisplay/descriptions/AntdDescriptions/feat_extra.py ================================================ if True: import sys sys.path.append('../../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdDescriptions( [ fac.AntdDescriptionItem('费弗里', label='姓名'), fac.AntdDescriptionItem( html.A( 'https://github.com/CNFeffery', href='https://github.com/CNFeffery', ), label='个人Github地址', ), fac.AntdDescriptionItem( html.A( 'https://www.cnblogs.com/feffery/', href='https://www.cnblogs.com/feffery/', ), label='个人博客地址', ), fac.AntdDescriptionItem( html.A( 'http://fac.feffery.tech/', href='http://fac.feffery.tech/', ), label='fac框架官网', ), ], title='描述列表示例', labelStyle={'fontWeight': 'bold'}, extra=fac.AntdButton('编辑', type='primary'), ), fac.AntdDescriptions( items=[ { 'label': fac.AntdText('姓名'), 'children': '费弗里', }, { 'label': fac.AntdText('个人Github地址'), 'children': html.A( 'https://github.com/CNFeffery', href='https://github.com/CNFeffery', ), }, { 'label': fac.AntdText('个人博客地址'), 'children': html.A( 'https://www.cnblogs.com/feffery/', href='https://www.cnblogs.com/feffery/', ), }, { 'label': fac.AntdText('fac框架官网'), 'children': html.A( 'http://fac.feffery.tech/', href='http://fac.feffery.tech/', ), }, ], title='描述列表示例', labelStyle={'fontWeight': 'bold'}, bordered=True, extra=fac.AntdButton('编辑', type='primary'), ), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdCalendar/feat_custom_cells.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdCalendar( size='large', customCells=[ { 'type': 'date', 'month': 8, 'date': 1, 'content': fac.AntdTag(content='建军节', color='red'), }, { 'type': 'date', 'date': 15, 'content': fac.AntdTag(content='月中', color='blue'), }, { 'type': 'month', 'month': 7, 'content': fac.AntdTag(content='暑假', color='red'), }, { 'type': 'month', 'month': 8, 'content': fac.AntdTag(content='暑假', color='red'), }, ], ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdCascader/feat_prefix.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdCascader( placeholder='请选择', prefix=fac.AntdIcon(icon='antd-user'), options=[ { 'value': '节点1', 'label': '节点1', 'children': [ { 'value': '节点1-1', 'label': '节点1-1', }, { 'value': '节点1-2', 'label': '节点1-2', 'children': [ { 'value': '节点1-2-1', 'label': '节点1-2-1', }, { 'value': '节点1-2-2', 'label': '节点1-2-2', }, ], }, ], }, { 'value': '节点2', 'label': '节点2', 'children': [ { 'value': '节点2-1', 'label': '节点2-1', }, { 'value': '节点2-2', 'label': '节点2-2', }, ], }, ], ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdCascader/feat_suffix_icon.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdCascader( placeholder='请选择', suffixIcon=fac.AntdIcon(icon='antd-user'), options=[ { 'value': '节点1', 'label': '节点1', 'children': [ { 'value': '节点1-1', 'label': '节点1-1', }, { 'value': '节点1-2', 'label': '节点1-2', 'children': [ { 'value': '节点1-2-1', 'label': '节点1-2-1', }, { 'value': '节点1-2-2', 'label': '节点1-2-2', }, ], }, ], }, { 'value': '节点2', 'label': '节点2', 'children': [ { 'value': '节点2-1', 'label': '节点2-1', }, { 'value': '节点2-2', 'label': '节点2-2', }, ], }, ], ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdCascader/fix_read_only.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdCascader( placeholder='请选择', options=[ { 'value': '节点1', 'label': '节点1', 'children': [ { 'value': '节点1-1', 'label': '节点1-1', }, { 'value': '节点1-2', 'label': '节点1-2', 'children': [ { 'value': '节点1-2-1', 'label': '节点1-2-1', }, { 'value': '节点1-2-2', 'label': '节点1-2-2', }, ], }, ], }, { 'value': '节点2', 'label': '节点2', 'children': [ { 'value': '节点2-1', 'label': '节点2-1', }, { 'value': '节点2-2', 'label': '节点2-2', }, ], }, ], readOnly=True, value=[ ['节点1', '节点1-1'], ['节点2', '节点2-1'], ], multiple=True, style=style(width=300), ) ], direction='vertical', ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdDatePicker/feat_custom_cells.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdText('日期:精确匹配'), fac.AntdDatePicker( style={'width': 200}, customCells=[ { 'year': 2024, 'month': 9, 'date': 4, 'style': { 'border': '1px solid #389e0d', 'borderRadius': '50%', }, } ], ), fac.AntdText('日期:年份通配'), fac.AntdDatePicker( style={'width': 200}, customCells=[ { 'month': 9, 'date': 4, 'style': { 'border': '1px solid #389e0d', 'borderRadius': '50%', }, } ], ), fac.AntdText('日期:月份通配'), fac.AntdDatePicker( style={'width': 200}, customCells=[ { 'year': 2024, 'date': 4, 'style': { 'border': '1px solid #389e0d', 'borderRadius': '50%', }, } ], ), fac.AntdText('日期:年份+月份通配'), fac.AntdDatePicker( style={'width': 200}, customCells=[ { 'date': 4, 'style': { 'border': '1px solid #389e0d', 'borderRadius': '50%', }, } ], ), ], direction='vertical', ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdDatePicker/feat_picker_value.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdDatePicker( id='date-picker-demo', style={'width': 200}, ), fac.AntdText(id='picker-value'), ], direction='vertical', ) ], style={'padding': 100}, ) @app.callback( Output('picker-value', 'children'), Input('date-picker-demo', 'pickerValue'), ) def show_picker_value(pickerValue): return pickerValue if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdDatePicker/feat_prefix.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdDatePicker(prefix=fac.AntdIcon(icon='antd-user'))], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdDatePicker/feat_suffix_icon.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdDatePicker(suffixIcon=fac.AntdIcon(icon='antd-user'))], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdDateRangePicker/feat_custom_cells.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdText('日期:精确匹配'), fac.AntdDateRangePicker( style={'width': 200}, customCells=[ { 'year': 2024, 'month': 9, 'date': 4, 'style': { 'border': '1px solid #389e0d', 'borderRadius': '50%', }, } ], ), fac.AntdText('日期:年份通配'), fac.AntdDateRangePicker( style={'width': 200}, customCells=[ { 'month': 9, 'date': 4, 'style': { 'border': '1px solid #389e0d', 'borderRadius': '50%', }, } ], ), fac.AntdText('日期:月份通配'), fac.AntdDateRangePicker( style={'width': 200}, customCells=[ { 'year': 2024, 'date': 4, 'style': { 'border': '1px solid #389e0d', 'borderRadius': '50%', }, } ], ), fac.AntdText('日期:年份+月份通配'), fac.AntdDateRangePicker( style={'width': 200}, customCells=[ { 'date': 4, 'style': { 'border': '1px solid #389e0d', 'borderRadius': '50%', }, } ], ), ], direction='vertical', ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdDateRangePicker/feat_picker_value.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdDateRangePicker( id='date-range-picker-demo', style={'width': 250}, ), fac.AntdText(id='picker-value'), ], direction='vertical', ) ], style={'padding': 100}, ) @app.callback( Output('picker-value', 'children'), Input('date-range-picker-demo', 'pickerValue'), ) def show_picker_value(pickerValue): return str(pickerValue) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdDateRangePicker/feat_prefix.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdDateRangePicker(prefix=fac.AntdIcon(icon='antd-user'))], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdDateRangePicker/feat_suffix_icon.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdDateRangePicker(suffixIcon=fac.AntdIcon(icon='antd-user'))], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdForm/feat_batch_control_tooltips.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdForm( [ fac.AntdFormItem( fac.AntdInput(name=f'表单项{i}'), label=f'表单项{i}', ) for i in range(1, 6) ], id='batch-tooltip-form-demo', enableBatchControl=True, layout='vertical', tooltips={f'表单项{i}': f'这是表单项{i}的提示信息' for i in range(1, 6)}, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdForm/feat_optional_batch_control.py ================================================ if True: import sys sys.path.append('../../../') import json import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdForm( [ fac.AntdFormItem( fac.AntdInput( name=f'表单项{i}', enableBatchControl=i % 2 == 0, ), label=f'表单项{i}', ) for i in range(1, 6) ], id='callback-listen-value-form-demo', enableBatchControl=True, layout='vertical', values={ f'表单项{i}': f'这是表单项{i}的设定值' for i in range(1, 6) if i % 2 == 0 }, ), html.Pre(id='callback-listen-value-form-demo-output'), ], direction='vertical', style={'width': '100%'}, ) ], style=style(padding=50), ) @app.callback( Output('callback-listen-value-form-demo-output', 'children'), Input('callback-listen-value-form-demo', 'values'), ) def callback_listen_value_demo(values): return json.dumps(values, ensure_ascii=False, indent=4) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdForm/fix_checkbox.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdForm( [ fac.AntdFormItem( fac.AntdInput( id='login-user-name', placeholder='请输入用户名', size='large', prefix=fac.AntdIcon( icon='antd-user', className='global-help-text', ), autoComplete='off', ), label='用户名', ), fac.AntdFormItem( fac.AntdInput( id='login-password', placeholder='请输入密码', size='large', mode='password', prefix=fac.AntdIcon( icon='antd-lock', className='global-help-text', ), ), label='密码', ), fac.AntdCheckbox(id='login-remember-me', label='记住我'), fac.AntdButton( '登录', id='login-button', loadingChildren='校验中', type='primary', block=True, size='large', style=style(marginTop=18), ), ], id='login-form', enableBatchControl=True, layout='vertical', style=style(width=350), ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdRadioGroup/feat_block.py ================================================ if True: import sys sys.path.append('../../../') import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdCenter( fac.AntdSpace( [ fac.AntdRadioGroup( options=['Apple', 'Pear', 'Orange'], block=True, value='Apple', ), fac.AntdRadioGroup( options=['Apple', 'Pear', 'Orange'], block=True, optionType='button', value='Apple', ), fac.AntdRadioGroup( options=['Apple', 'Pear', 'Orange'], block=True, optionType='button', buttonStyle='solid', value='Apple', ), ], direction='vertical', style=style(width='100%'), ), style=style(height='100vh'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdSelect/feat_locale_ru.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSelect( options=[], locale='ru-ru', style=style(width=200), ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdSelect/feat_max_count.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSelect( prefix='至多选择3个', options=[{'label': f'选项{i}', 'value': f'选项{i}'} for i in range(1, 26)], maxCount=3, mode='multiple', style={'width': 350}, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdSelect/feat_prefix.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSelect( options=[{'label': f'选项{i}', 'value': f'选项{i}'} for i in range(1, 6)], prefix=fac.AntdIcon(icon='antd-user'), style={'width': 350}, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdSelect/feat_show_search.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdSelect( options=list('abc'), style=style(width=200), ), fac.AntdSelect( options=list('abc'), showSearch=False, style=style(width=200), ), ] ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdSelect/feat_suffix_icon.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdSelect( options=[ { 'label': f'选项{i}', 'value': f'选项{i}', } for i in range(1, 6) ], style={'width': 350}, ), fac.AntdSelect( options=[ { 'label': f'选项{i}', 'value': f'选项{i}', } for i in range(1, 6) ], suffixIcon=fac.AntdIcon(icon='antd-user'), style={'width': 350}, ), ], direction='vertical', ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdSelect/fix_read_only.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdSelect( readOnly=True, options=[f'选项{i}' for i in range(1, 6)], value='选项1', style={'width': '100%'}, ), fac.AntdSelect( readOnly=True, mode='multiple', options=[f'选项{i}' for i in range(1, 6)], value=[f'选项{i}' for i in range(1, 3)], style={'width': '100%'}, ), fac.AntdSelect( readOnly=True, mode='tags', options=[f'选项{i}' for i in range(1, 6)], value=['选项1', '自由新增选项'], style={'width': '100%'}, ), ], direction='vertical', style={'width': 350}, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdSelect/fix_read_only_with_allow_clear.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSelect( style={'width': '100%'}, options=[{'label': f'选项{i}', 'value': i} for i in range(5)], value=1, allowClear=False, readOnly=False, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdSlider/feat_range_editable.py ================================================ if True: import sys sys.path.append('../../../') import json import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdSlider( id='demo-slider', min=0, max=100, defaultValue=[20, 30, 40, 50], range={ 'editable': True, 'minCount': 3, 'maxCount': 8, }, ), html.Pre(id='output'), ], direction='vertical', style=style(width='100%'), ) ], style=style(padding=50), ) @app.callback( Output('output', 'children'), Input('demo-slider', 'value'), prevent_initial_call=True, ) def show_value(value): return json.dumps(value, ensure_ascii=False, indent=4) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdTimePicker/feat_prefix.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdTimePicker(prefix=fac.AntdIcon(icon='antd-user'))], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdTimePicker/feat_suffix_icon.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdTimePicker(suffixIcon=fac.AntdIcon(icon='antd-user'))], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdTimeRangePicker/feat_prefix.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdTimeRangePicker(prefix=fac.AntdIcon(icon='antd-user'))], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdTimeRangePicker/feat_suffix_icon.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdTimeRangePicker(suffixIcon=fac.AntdIcon(icon='antd-user'))], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdTreeSelect/feat_async_data_load.py ================================================ if True: import sys sys.path.append('../../../') import time import dash from dash import html from dash.dependencies import Input, Output, State from feffery_dash_utils.tree_utils import TreeManager import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTreeSelect( id='tree-select-demo', treeData=[ { 'key': '节点1', 'title': '节点1', 'value': '节点1', }, { 'key': '节点2', 'title': '节点2', 'value': '节点2', }, { 'key': '节点3', 'title': '节点3', 'value': '节点3', 'isLeaf': True, }, ], enableAsyncLoad=True, style={'width': 300}, ) ], style={'padding': 100}, ) @app.callback( Output('tree-select-demo', 'treeData'), Input('tree-select-demo', 'loadingNode'), State('tree-select-demo', 'treeData'), prevent_initial_call=True, ) def tree_select_demo(loadingNode, treeData): time.sleep(0.5) return TreeManager.update_tree_node( treeData, node_key=loadingNode['key'], new_node={ 'children': [ { 'key': loadingNode['key'] + '-1', 'title': loadingNode['key'] + '-1', 'value': loadingNode['key'] + '-1', } ] }, mode='overlay', ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdTreeSelect/feat_max_count.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTreeSelect( id='test-max-count-demo', treeData=[ { 'key': '节点1', 'value': '1', 'title': '节点1', 'children': [ { 'key': f'节点1-{i}', 'value': f'1-{i}', 'title': f'节点1-{i}', } for i in range(1, 3) ], }, { 'key': '节点2', 'value': '2', 'title': '节点2', 'children': [ { 'key': f'节点2-{i}', 'value': f'2-{i}', 'title': f'节点2-{i}', } for i in range(1, 5) ], }, ], placeholder='请选择', multiple=True, treeCheckable=True, showCheckedStrategy='show-child', maxCount=3, style={'width': 256}, ) ], style={'padding': 100}, ) @app.callback( Output('test-max-count-demo', 'suffixIcon'), Input('test-max-count-demo', 'value'), ) def test_max_count_demo(value): length = 0 if value: length = len(value) return [html.Span(f'{length} / 3'), fac.AntdIcon(icon='antd-down')] if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdTreeSelect/feat_prefix.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTreeSelect( treeData=[ { 'key': '节点1', 'value': '1', 'title': '节点1', 'children': [ { 'key': f'节点1-{i}', 'value': f'1-{i}', 'title': f'节点1-{i}', } for i in range(1, 5) ], }, { 'key': '节点2', 'value': '2', 'title': '节点2', }, ], placeholder='请选择', prefix=fac.AntdIcon(icon='antd-user'), style={'width': 256}, ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdTreeSelect/fix_read_only.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdTreeSelect( treeData=[ { 'key': '节点1', 'value': '1', 'title': '节点1', 'children': [ { 'key': f'节点1-{i}', 'value': f'1-{i}', 'title': f'节点1-{i}', } for i in range(1, 5) ], }, { 'key': '节点2', 'value': '2', 'title': '节点2', }, ], placeholder='请选择', defaultValue=['节点2', '节点1-2'], readOnly=True, multiple=True, style={'width': 256}, ) ], direction='vertical', ) ], style={'padding': 100}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdUpload/feat_pastable.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdUpload(buttonContent='upload test', pastable=True)], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/dataEntry/AntdUpload/fix_follow_theme.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdConfigProvider( [ fac.AntdUpload( buttonContent='upload test', confirmBeforeDelete=True, ) ], algorithm='dark', ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feat_variant_underlined.py ================================================ if True: import sys sys.path.append('../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdInput( placeholder='AntdInput underlined测试', variant='underlined', ), fac.AntdCascader( placeholder='AntdCascader underlined测试', variant='underlined', options=[], style=style(width='100%'), ), fac.AntdDatePicker( placeholder='AntdDatePicker underlined测试', variant='underlined', style=style(width='100%'), ), fac.AntdDateRangePicker( placeholder=[ 'AntdDateRangePicker underlined测试', '', ], variant='underlined', style=style(width='100%'), ), fac.AntdInputNumber( placeholder='AntdInputNumber underlined测试', variant='underlined', style=style(width='100%'), ), fac.AntdMentions( placeholder='AntdMentions underlined测试', variant='underlined', options=[], ), fac.AntdOTP(variant='underlined', value='123456'), fac.AntdSegmentedColoring( min=-10, max=10, breakpoints=[0, 1, 2, 3, 4, 5], colors=[ '#deecf9', '#71afe5', '#2b88d8', '#0078d4', '#106ebe', ], variant='underlined', size='small', ), fac.AntdSelect( placeholder='AntdSelect underlined测试', variant='underlined', options=[], style=style(width='100%'), ), fac.AntdTimePicker( placeholder='AntdTimePicker underlined测试', variant='underlined', style=style(width='100%'), ), fac.AntdTimeRangePicker( placeholder=[ 'AntdTimeRangePicker underlined测试', '', ], variant='underlined', style=style(width='100%'), ), fac.AntdTreeSelect( placeholder='AntdTreeSelect underlined测试', variant='underlined', treeData=[], style=style(width='100%'), ), ], direction='vertical', style=style(width='100%'), ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdAlert/feat_icon.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdSpace( [ fac.AntdAlert( message='test alert', type='info', showIcon=True, icon='😀', ), fac.AntdAlert( message='test alert', type='info', showIcon=True, icon=fac.AntdIcon(icon='fc-like'), ), ], direction='vertical', style=style(width='100%'), ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdMessage/fix_follow_config_provider.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdConfigProvider( [ fac.AntdButton( 'new message', id='new-message', type='primary', ), fac.Fragment(id='message-target'), ], algorithm='dark', ), style=style(padding=50), ) @app.callback( Output('message-target', 'children'), Input('new-message', 'nClicks'), prevent_initial_call=True, ) def new_message(nClicks): return fac.AntdMessage( content=f'nClicks: {nClicks}', type='info', top=256, maxCount=3, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdModal/feat_force_render.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdModal( fac.AntdInput(id='modal-demo1-input', defaultValue='demo1'), id='modal-demo1', ), fac.AntdModal( fac.AntdInput(id='modal-demo2-input', defaultValue='demo2'), id='modal-demo2', forceRender=True, ), fac.AntdSpace( [ fac.AntdText(id='demo1-output'), fac.AntdText(id='demo2-output'), ], direction='vertical', ), ], style=style(padding=50), ) @app.callback( Output('demo1-output', 'children'), Input('modal-demo1-input', 'value'), ) def demo1_output(value): return value @app.callback( Output('demo2-output', 'children'), Input('modal-demo2-input', 'value'), ) def demo2_output(value): return value if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdModal/feat_loading_title.py ================================================ import sys import time sys.path.append('../../../') import dash from dash import Input, Output, callback, html, no_update from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdButton( 'Fetch latest report', id='btn-open', type='primary', ), ] ), fac.AntdDivider(), fac.AntdParagraph( [ 'Click the button above to open the modal. While fresh data is ', 'loading you should see the temporary ', fac.AntdText('loadingTitle', strong=True), ' being displayed.', ] ), fac.AntdModal( id='modal', visible=False, title='Report ready', loadingTitle='Preparing report...', loading=False, destroyOnClose=True, ), ], style=style(padding=50), ) @callback( Output('modal', 'visible'), Output('modal', 'loading', allow_duplicate=True), Output('modal', 'children', allow_duplicate=True), Input('btn-open', 'nClicks'), prevent_initial_call=True, ) def open_modal(n_clicks): # show the modal immediately; mark it as loading and clear old body content return True, True, [] @callback( Output('modal', 'children'), Output('modal', 'loading'), Input('modal', 'visible'), prevent_initial_call=True, ) def populate_modal(visible): if not visible: return no_update, no_update time.sleep(2) # simulate an expensive calculation or network request return ( fac.AntdSpace( [ fac.AntdResult( status='success', title='Daily report assembled', subTitle='This content replaces the loading skeleton once ready.', ), fac.AntdParagraph('Close the modal and click the button again to repeat the demo.'), ], direction='vertical', ), False, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdModal/feat_prevent_close.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.Fragment( [ fac.AntdModal( id='modal', title='示例模态框', preventClose=True, visible=True, ), fac.AntdModal( id='modal-close-confirm', title='关闭二次确认模态框', renderFooter=True, ), ] ), ], style=style(padding=50), ) @app.callback( Output('modal-close-confirm', 'visible'), Input('modal', 'cancelCounts'), prevent_initial_call=True, ) def show_modal_close_confirm(cancelCounts): return True @app.callback( Output('modal', 'visible'), Input('modal-close-confirm', 'okCounts'), prevent_initial_call=True, ) def confirm_close_modal(okCounts): return False if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdModal/feat_responsive_width.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdModal( title='test modal', visible=True, width={ 'xs': '100vw', 'sm': '100vw', 'md': '100vw', 'lg': 500, 'xl': 500, 'xxl': 500, }, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdNotification/feat_component_content.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdButton( 'Open notification with custom nodes', id='open-rich-notification', type='primary', ), fac.Fragment(id='rich-notification-holder'), ], style=style(padding=50, display='flex', gap=16), ) @app.callback( Output('rich-notification-holder', 'children'), Input('open-rich-notification', 'nClicks'), prevent_initial_call=True, ) def display_rich_notification(n_clicks): return fac.AntdNotification( message=fac.AntdSpace( [ fac.AntdIcon(icon='antd-smile'), fac.AntdText('Dash components as notification message'), ], size='small', ), description=html.Div( [ fac.AntdText( 'Description can now be composed using standard Dash nodes.', strong=True, ), fac.AntdParagraph( [ 'This includes mixing ', fac.AntdText('fac', code=True), ' and ', fac.AntdText('html', code=True), ' components.', ], style={'marginBottom': 0}, ), ], style={'display': 'grid', 'gap': 6}, ), stack=True, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdNotification/feat_number_of_stack.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdButton( 'Show New Notification', id='new-notification', type='primary', ), fac.Fragment(id='notification-target'), ], style=style(padding=50), ) @app.callback( Output('notification-target', 'children'), Input('new-notification', 'nClicks'), prevent_initial_call=True, ) def new_notification(nClicks): return fac.AntdNotification( message='Stack 2', description='This is a stacked notification example. it stacks when more than 2 notifications are present.', stack={'threshold': 2}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdNotification/feat_show_progress.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdButton( '新的通知', id='new-notification', type='primary', ), fac.Fragment(id='notification-target'), ], style=style(padding=50), ) @app.callback( Output('notification-target', 'children'), Input('new-notification', 'nClicks'), prevent_initial_call=True, ) def new_notification(nClicks): return fac.AntdNotification( message='通知标题', description='通知描述', stack=True, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdNotification/fix_follow_config_provider.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdConfigProvider( [ fac.AntdButton( 'new notification', id='new-notification', type='primary', ), fac.Fragment(id='notification-target'), ], algorithm='dark', ), style=style(padding=50), ) @app.callback( Output('notification-target', 'children'), Input('new-notification', 'nClicks'), prevent_initial_call=True, ) def new_notification(nClicks): return fac.AntdNotification( message='通知标题', description='通知描述', type='info', stack=True, showProgress=True, pauseOnHover=True, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdPopupCard/feat_force_render.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdPopupCard( fac.AntdInput( id='popup-card-demo1-input', defaultValue='demo1', ), id='popup-card-demo1', visible=False, ), fac.AntdPopupCard( fac.AntdInput( id='popup-card-demo2-input', defaultValue='demo2', ), id='popup-card-demo2', visible=False, forceRender=True, ), fac.AntdSpace( [ fac.AntdText(id='demo1-output'), fac.AntdText(id='demo2-output'), ], direction='vertical', ), ], style=style(padding=50), ) @app.callback( Output('demo1-output', 'children'), Input('popup-card-demo1-input', 'value'), ) def demo1_output(value): return value @app.callback( Output('demo2-output', 'children'), Input('popup-card-demo2-input', 'value'), ) def demo2_output(value): return value if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdProgress/feat_percent_position.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdSpace( [ fac.AntdSpace( [ f'percent={percent} {align} {type}', fac.AntdProgress( percent=percent, percentPosition={ 'align': align, 'type': type, }, size=[500, 20], ), ] ) for percent in [0, 33, 100] for align in ['start', 'center', 'end'] for type in ['inner', 'outer'] ], direction='vertical', style=style(width='100%'), ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdProgress/perf_size.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdSpace( [ fac.AntdProgress(percent=66, size=['100%', 18]), fac.AntdProgress(percent=66, size=['50%', 18]), fac.AntdProgress(percent=66, size=['33%', 18]), ], direction='vertical', style=style(width='100%'), ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdProgress/perf_steps.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdSpace( [ fac.AntdProgress( percent=66, type='circle', steps={'count': 31, 'gap': 4}, trailColor='rgba(0, 0, 0, 0.06)', strokeWidth=20, ), fac.AntdProgress( percent=66, type='dashboard', steps={'count': 31, 'gap': 4}, trailColor='rgba(0, 0, 0, 0.06)', strokeWidth=20, ), ], direction='vertical', style=style(width='100%'), ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdProgress/perf_stroke_color.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdSpace( [ fac.AntdProgress( percent=60, steps=5, strokeColor=[ '#389e0d', '#389e0d', '#f5222d', ], ), fac.AntdProgress( percent=95, strokeColor={ '0%': '#87d068', '50%': '#ffe58f', '100%': '#ffccc7', }, ), fac.AntdProgress( percent=95, type='circle', strokeColor={ '0%': '#87d068', '50%': '#ffe58f', '100%': '#ffccc7', }, ), fac.AntdProgress( percent=95, type='dashboard', strokeColor={ '0%': '#87d068', '50%': '#ffe58f', '100%': '#ffccc7', }, ), ], direction='vertical', style=style(width='100%'), ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdResult/feat_extra.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdResult( title='404', subTitle='Sorry, the page you visited does not exist.', extra=fac.AntdButton('Back Home', type='primary'), ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/feedback/AntdSkeleton/fix_dash3.py ================================================ if True: import sys sys.path.append('../../../') import time import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdButton( '触发示例', id='skeleton-basic-demo-trigger', style={'marginBottom': 10}, ), fac.AntdSkeleton(fac.AntdParagraph(id='skeleton-basic-demo-output')), ], style=style(padding=50), ) @app.callback( Output('skeleton-basic-demo-output', 'children'), Input('skeleton-basic-demo-trigger', 'nClicks'), prevent_initial_call=True, ) def skeleton_basic_demo(nClicks): time.sleep(2) return f'nClicks: {nClicks}' if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/general/AntdButton/feat_color_and_variant.py ================================================ if True: import sys sys.path.append('../../../') import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdCenter( fac.AntdSpace( [ fac.AntdSpace( [ fac.AntdButton( variant, color=color, variant=variant, size='small', ) for variant in [ 'outlined', 'dashed', 'solid', 'filled', 'text', 'link', ] ] ) for color in ['default', 'primary', 'danger'] ], direction='vertical', ), style=style(height='100vh'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/general/AntdButton/feat_preset_color.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( fac.AntdSpace( [ fac.AntdButton( color, color=color, size='small', variant='solid', ) for color in [ 'default', 'primary', 'danger', 'blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold', ] ], direction='vertical', ), style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/general/AntdFloatButtonGroup/feat_placement.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdFloatButtonGroup( [ fac.AntdFloatButton(icon=fac.AntdIcon(icon='antd-question')), fac.AntdFloatButton(icon=fac.AntdIcon(icon='antd-setting')), ], icon=fac.AntdIcon(icon='antd-up'), trigger='click', placement='top', style=style(bottom='calc(50% + 50px)', right='50%'), ), fac.AntdFloatButtonGroup( [ fac.AntdFloatButton(icon=fac.AntdIcon(icon='antd-question')), fac.AntdFloatButton(icon=fac.AntdIcon(icon='antd-setting')), ], icon=fac.AntdIcon(icon='antd-right'), trigger='click', placement='right', style=style(bottom='50%', right='calc(50% - 50px)'), ), fac.AntdFloatButtonGroup( [ fac.AntdFloatButton(icon=fac.AntdIcon(icon='antd-question')), fac.AntdFloatButton(icon=fac.AntdIcon(icon='antd-setting')), ], icon=fac.AntdIcon(icon='antd-down'), trigger='click', placement='bottom', style=style(bottom='calc(50% - 50px)', right='50%'), ), fac.AntdFloatButtonGroup( [ fac.AntdFloatButton(icon=fac.AntdIcon(icon='antd-question')), fac.AntdFloatButton(icon=fac.AntdIcon(icon='antd-setting')), ], icon=fac.AntdIcon(icon='antd-left'), trigger='click', placement='left', style=style(bottom='50%', right='calc(50% + 50px)'), ), ], style=style(position='relative', height='100vh'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/general/AntdFloatButtonGroup/feat_tooltip.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdFloatButtonGroup( [ fac.AntdFloatButton(tooltip='气泡卡片信息示例'), fac.AntdFloatButton( tooltip={ 'title': '气泡卡片信息示例', 'color': 'blue', 'placement': 'left', } ), ], style=style(right=100), ) ], style=style(position='relative', height='100vh'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/general/AntdIcon/feat_iconfont.py ================================================ if True: import sys sys.path.append('../../../') import dash from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdSpace( [ fac.AntdIcon(icon='antd-bug'), fac.AntdIcon( mode='iconfont', scriptUrl='//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js', icon='icon-facebook', style=style(color='#1877F2'), ), *[ fac.AntdIcon( mode='iconfont', scriptUrl=[ '//at.alicdn.com/t/font_1788044_0dwu4guekcwr.js', '//at.alicdn.com/t/font_1788592_a5xf2bdic3u.js', ], icon=icon, ) for icon in [ 'icon-javascript', 'icon-java', 'icon-shoppingcart', 'icon-python', ] ], ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/layout/AntdCenter/feat_use_token.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdConfigProvider( fac.AntdCenter( fac.AntdSpace( [ fac.AntdSwitch( id='switch-theme', checked=True, checkedChildren='dark', unCheckedChildren='default', ), '测试', ], direction='vertical', align='center', ), style=style(height='100vh'), ), id='config-provider', algorithm='dark', token={'fontSize': 18}, ) app.clientside_callback( '(checked) => checked ? "dark" : "default"', Output('config-provider', 'algorithm'), Input('switch-theme', 'checked'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/layout/AntdDivider/feat_plain.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdDivider('plain=True'), fac.AntdDivider('plain=False', plain=False), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/layout/AntdDivider/feat_size.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTabs( items=[ { 'label': size, 'key': size, 'children': [ 'test content', fac.AntdDivider(size=size), 'test content', fac.AntdDivider(size=size), 'test content', ], } for size in ['small', 'middle', 'large'] ], centered=True, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/layout/AntdSplitter/feat_AntdSplitter.py ================================================ if True: import sys sys.path.append('../../../') import json from dash import Dash, html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) def desc(text): return fac.AntdFlex( fac.AntdTitle( text, type='secondary', level=5, style=style(whiteSpace='nowrap'), ), justify='center', align='center', style=style(height='100%'), ) app.layout = html.Div( [ fac.AntdDivider('基本用法'), fac.AntdSpace( [ fac.AntdSplitter( id='splitter-1', items=[ { 'children': desc('First'), 'defaultSize': '40%', 'min': '20%', 'max': '70%', }, {'children': desc('Second')}, ], style=style( height=200, boxShadow='0 0 10px rgba(0, 0, 0, 0.1)', ), ), fac.AntdSplitter( id='splitter-2', items=[ { 'key': 'splitter1', 'children': desc('First'), 'size': '50%', }, { 'key': 'splitter2', 'children': desc('Second'), 'size': '50%', }, ], style=style( height=200, boxShadow='0 0 10px rgba(0, 0, 0, 0.1)', ), ), ], direction='vertical', style=style(width='100%'), ), fac.AntdDivider('垂直方向'), fac.AntdSplitter( id='splitter-3', layout='vertical', items=[ { 'key': 'splitter1', 'children': desc('First'), }, { 'key': 'splitter2', 'children': desc('Second'), }, ], style=style( height=300, boxShadow='0 0 10px rgba(0, 0, 0, 0.1)', ), ), fac.AntdDivider('可折叠'), fac.AntdSpace( [ fac.AntdSplitter( id='splitter-4', items=[ { 'key': 'splitter1', 'children': desc('First'), 'collapsible': True, 'min': '20%', }, { 'key': 'splitter2', 'children': desc('Second'), 'collapsible': True, }, ], style=style( height=200, boxShadow='0 0 10px rgba(0, 0, 0, 0.1)', ), ), fac.AntdSplitter( id='splitter-5', layout='vertical', items=[ { 'key': 'splitter1', 'children': desc('First'), 'collapsible': True, 'min': '20%', }, { 'key': 'splitter2', 'children': desc('Second'), 'collapsible': True, }, ], style=style( height=300, boxShadow='0 0 10px rgba(0, 0, 0, 0.1)', ), ), ], direction='vertical', style=style(width='100%'), ), fac.AntdDivider('多面板'), fac.AntdSplitter( id='splitter-6', items=[ { 'key': 'splitter1', 'children': desc('Panel 1'), 'collapsible': True, }, { 'key': 'splitter2', 'children': desc('Panel 2'), 'collapsible': {'start': True}, }, { 'key': 'splitter3', 'children': desc('Panel 3'), }, ], style=style( height=200, boxShadow='0 0 10px rgba(0, 0, 0, 0.1)', ), ), fac.AntdDivider('复杂组合'), fac.AntdSplitter( id='splitter-7', items=[ { 'key': 'splitter1', 'children': desc('Left'), 'collapsible': True, }, { 'key': 'splitter2', 'children': fac.AntdSplitter( layout='vertical', items=[ { 'key': 'splitter3', 'children': desc('Top'), }, { 'key': 'splitter4', 'children': desc('Bottom'), }, ], ), }, ], style=style( height=200, boxShadow='0 0 10px rgba(0, 0, 0, 0.1)', ), ), html.Pre(id='splitter-2-output'), ] ) @app.callback( Output('splitter-2-output', 'children'), Input('splitter-2', 'currentSizes'), ) def update_output(currentSizes): return json.dumps(currentSizes, indent=4, ensure_ascii=False) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/layout/AntdSplitter/feat_lazy.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( f'item{i}', style={'height': '100%'}, ) } for i in range(1, 3) ], lazy=True, style={ 'height': 200, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( f'item{i}', style={'height': '100%'}, ) } for i in range(1, 4) ], lazy=True, style={ 'height': 200, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), ], direction='vertical', style={'width': '100%'}, ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/layout/AntdSplitter/refactor.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ '基础使用:', fac.AntdSpace( [ fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( f'item{i}', style={'height': '100%'}, ) } for i in range(1, 3) ], style={ 'height': 200, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( f'item{i}', style={'height': '100%'}, ) } for i in range(1, 4) ], style={ 'height': 200, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), ], direction='vertical', style={'width': '100%'}, ), '垂直布局:', fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( f'item{i}', style={'height': '100%'}, ) } for i in range(1, 3) ], layout='vertical', style={ 'height': 300, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), '默认尺寸:', fac.AntdSpace( [ fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( '30%', style={'height': '100%'}, ), 'defaultSize': '30%', }, { 'children': fac.AntdCenter( '70%', style={'height': '100%'}, ), 'defaultSize': '70%', }, ], style={ 'height': 200, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( '30%', style={'height': '100%'}, ), 'defaultSize': '30%', }, { 'children': fac.AntdCenter( '70%', style={'height': '100%'}, ), 'defaultSize': '70%', }, ], layout='vertical', style={ 'height': 300, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), ], direction='vertical', style={'width': '100%'}, ), '限制尺寸调整范围:', fac.AntdSpace( [ fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( 'min: 50 max: 90%', style={'height': '100%'}, ), 'defaultSize': '30%', 'min': 50, 'max': '90%', }, { 'children': fac.AntdCenter( '70%', style={'height': '100%'}, ), 'defaultSize': '70%', }, ], style={ 'height': 200, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( 'min: 50 max: 90%', style={'height': '100%'}, ), 'defaultSize': '30%', 'min': 50, 'max': '90%', }, { 'children': fac.AntdCenter( '70%', style={'height': '100%'}, ), 'defaultSize': '70%', }, ], layout='vertical', style={ 'height': 300, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), ], direction='vertical', style={'width': '100%'}, ), '可折叠:', fac.AntdSpace( [ fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( f'item{i}', style={'height': '100%'}, ), 'collapsible': True, } for i in range(1, 3) ], style={ 'height': 200, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( f'item{i}', style={'height': '100%'}, ), 'collapsible': True, } for i in range(1, 3) ], layout='vertical', style={ 'height': 300, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ), ], direction='vertical', style={'width': '100%'}, ), '嵌套组合:', fac.AntdSpace( [ fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( 'item1', style={'height': '100%'}, ), 'defaultSize': '30%', }, { 'children': fac.AntdSplitter( items=[ { 'children': fac.AntdCenter( 'item2', style={'height': '100%'}, ), 'defaultSize': '30%', }, { 'children': fac.AntdCenter( 'item3', style={'height': '100%'}, ), 'defaultSize': '70%', }, ], layout='vertical', style={'height': '100%'}, ), 'defaultSize': '70%', }, ], style={ 'height': 200, 'boxShadow': '0 0 10px rgba(0, 0, 0, 0.1)', }, ) ], direction='vertical', style={'width': '100%'}, ), ], direction='vertical', style=style(width='100%'), ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdAnchor/feat_current_anchor.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdAnchor( currentAnchor='#章节3', linkDict=[ { 'key': f'章节{i}', 'title': f'章节{i}', 'href': f'#章节{i}', } for i in range(1, 6) ], align='left', ), *[ html.Div( fac.AntdDivider( f'章节{i}', id=f'章节{i}', innerTextOrientation='right', ), style=style(paddingBottom=800), ) for i in range(1, 6) ], html.Div(style={'height': 300}), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdAnchor/feat_direction.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdAnchor( direction='horizontal', linkDict=[ { 'key': f'章节{i}', 'title': f'章节{i}', 'href': f'#章节{i}', } for i in range(1, 6) ], align='left', ), *[ html.Div( fac.AntdDivider( f'章节{i}', id=f'章节{i}', innerTextOrientation='right', ), style=style(paddingBottom=800), ) for i in range(1, 6) ], html.Div(style={'height': 300}), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdAnchor/feat_replace.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdAnchor( replace=True, linkDict=[ { 'key': f'章节{i}', 'title': f'章节{i}', 'href': f'#章节{i}', } for i in range(1, 6) ], align='left', ), *[ html.Div( fac.AntdDivider( f'章节{i}', id=f'章节{i}', innerTextOrientation='right', ), style=style(paddingBottom=800), ) for i in range(1, 6) ], html.Div(style={'height': 300}), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdBreadcrumb/feat_menu_item_event.py ================================================ if True: import sys sys.path.append('../../../') import json from dash import Dash, html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdBreadcrumb( id='breadcrumnb-demo', items=[ {'title': '首页', 'key': '首页'}, { 'title': '下属页面1', 'key': '下属页面1', 'menuItems': [ { 'key': f'子节点{i}', 'title': f'子节点{i}', 'icon': 'antd-smile', } for i in range(1, 4) ], }, { 'title': '下属页面1-1', 'key': '下属页面1-1', }, ], ), html.Pre(id='breadcrumnb-demo-output'), ], size=50, direction='vertical', style=style(width='100%'), ) ], style=style(padding=50), ) @app.callback( Output('breadcrumnb-demo-output', 'children'), Input('breadcrumnb-demo', 'clickedItem'), prevent_initial_call=True, ) def breadcrumb_callback_demo(clickedItem): return json.dumps( dict(clickedItem=clickedItem), indent=4, ensure_ascii=False, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdBreadcrumb/refactor_items.py ================================================ if True: import sys sys.path.append('../../../') import json from dash import Dash, html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdBreadcrumb( items=[ {'title': '首页'}, {'title': '下属页面1'}, {'title': '下属页面1-1'}, ] ), fac.AntdBreadcrumb( items=[ { 'title': 'awesome-feffery-dash仓库主页', 'href': 'https://github.com/CNFeffery/awesome-feffery-dash', 'target': '_blank', }, { 'title': 'feffery-antd-components文档首页', 'href': '/', 'target': '_blank', }, { 'title': 'AntdBreadcrumb文档页', 'href': '/AntdBreadcrumb', 'target': '_blank', }, ] ), fac.AntdBreadcrumb( items=[ { 'title': 'awesome-feffery-dash仓库主页', 'href': 'https://github.com/CNFeffery/awesome-feffery-dash', 'target': '_blank', 'icon': 'antd-github', }, { 'title': 'feffery-antd-components文档首页', 'href': '/', 'target': '_blank', 'icon': 'antd-home', }, { 'title': 'AntdBreadcrumb文档页', 'href': '/AntdBreadcrumb', 'target': '_blank', 'icon': 'fc-approval', }, ] ), fac.AntdBreadcrumb( items=[ { 'title': 'awesome-feffery-dash仓库主页', 'href': 'https://github.com/CNFeffery/awesome-feffery-dash', 'target': '_blank', 'menuItems': [ { 'title': 'feffery-utils-components', 'href': 'https://github.com/CNFeffery/feffery-utils-components', 'target': '_blank', }, { 'title': 'feffery-antd-charts', 'href': 'https://github.com/CNFeffery/feffery-antd-charts', 'target': '_blank', }, { 'title': 'feffery-markdown-components', 'href': 'https://github.com/CNFeffery/feffery-markdown-components', 'target': '_blank', }, ], }, { 'title': 'feffery-antd-components文档首页', 'href': '/', 'target': '_blank', }, { 'title': 'AntdBreadcrumb文档页', 'href': '/AntdBreadcrumb', 'target': '_blank', }, ] ), fac.AntdBreadcrumb( id='breadcrumnb-demo', items=[ {'title': '首页', 'key': '首页'}, { 'title': '下属页面1', 'key': '下属页面1', }, { 'title': '下属页面1-1', 'key': '下属页面1-1', }, ], ), html.Pre(id='breadcrumnb-demo-output'), ], size=50, direction='vertical', style=style(width='100%'), ) ], style=style(padding=50), ) @app.callback( Output('breadcrumnb-demo-output', 'children'), Input('breadcrumnb-demo', 'clickedItem'), prevent_initial_call=True, ) def breadcrumb_callback_demo(clickedItem): return json.dumps( dict(clickedItem=clickedItem), indent=4, ensure_ascii=False, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdDropdown/feat_extra.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdDropdown( title='触发点', menuItems=[ {'title': '选项1', 'extra': '测试'}, {'title': '选项2', 'extra': '测试'}, {'isDivider': True}, {'title': '选项3-1', 'extra': '测试'}, {'title': '选项3-2', 'extra': '测试'}, ], ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdDropdown/test_cascading_dropdown.py ================================================ if True: import sys sys.path.append('./') import dash from dash import html from dash.dependencies import Input, Output import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ html.H2('Cascading Dropdown Menu Demo'), html.Div( [ fac.AntdDropdown( id='cascading-dropdown-demo', title='Click to see cascading menu', trigger='click', buttonMode=True, buttonProps={'type': 'primary'}, menuItems=[ { 'title': 'Navigation', 'key': 'nav', 'icon': 'HomeOutlined', 'children': [ { 'title': 'Dashboard', 'key': 'nav-dashboard', }, { 'title': 'Settings', 'key': 'nav-settings', 'children': [ { 'title': 'Profile', 'key': 'nav-settings-profile', }, { 'title': 'Account', 'key': 'nav-settings-account', }, { 'title': 'Privacy', 'key': 'nav-settings-privacy', }, ], }, ], }, { 'title': 'Actions', 'key': 'actions', 'icon': 'ThunderboltOutlined', 'children': [ { 'title': 'Create', 'key': 'actions-create', 'children': [ { 'title': 'New Project', 'key': 'actions-create-project', }, { 'title': 'New File', 'key': 'actions-create-file', }, ], }, { 'title': 'Delete', 'key': 'actions-delete', }, ], }, {'isDivider': True}, { 'title': 'Help', 'key': 'help', 'icon': 'QuestionCircleOutlined', }, ], ), html.Div(id='dropdown-output', style={'marginTop': '20px', 'fontSize': '16px'}), ], style={'padding': '20px'}, ), ] ) @app.callback( Output('dropdown-output', 'children'), Input('cascading-dropdown-demo', 'clickedKey'), prevent_initial_call=True, ) def display_clicked_item(clickedKey): if clickedKey: return f'You clicked: {clickedKey}' return '' if __name__ == '__main__': app.run(debug=True, port=8050) ================================================ FILE: legacy_tests/navigation/AntdMenu/feat_currentItem.py ================================================ if True: import sys sys.path.append('../../../') import json from dash import Dash, html from dash.dependencies import Input, Output, State from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdMenu( id='menu-demo', currentKey='1-1-1', menuItems=[ { 'component': 'SubMenu', 'props': { 'key': f'{sub_menu}', 'title': f'子菜单{sub_menu}', }, 'children': [ { 'component': 'ItemGroup', 'props': { 'key': f'{sub_menu}-{item_group}', 'title': f'菜单项分组{sub_menu}-{item_group}', }, 'children': [ { 'component': 'Item', 'props': { 'key': f'{sub_menu}-{item_group}-{item}', 'title': f'菜单项{sub_menu}-{item_group}-{item}', }, 'extra': f'extra-{sub_menu}-{item_group}-{item}', } for item in range(1, 3) ], } for item_group in range(1, 3) ], } for sub_menu in range(1, 5) ], mode='horizontal', ), html.Div( id='menu-demo-output', style={ 'height': '200px', 'background': '#a5d8ff', 'color': 'white', 'fontSize': '24px', 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', }, ), ], style=style(padding=50), ) @app.callback( Output('menu-demo-output', 'children'), Input('menu-demo', 'currentKey'), State('menu-demo', 'currentItem'), ) def menu_callback_demo(currentKey, currentItem): return json.dumps( { 'currentKey': currentKey, 'currentItem': currentItem, }, ensure_ascii=False, indent=4, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdMenu/feat_currentItemPath.py ================================================ if True: import sys sys.path.append('../../../') import json from dash import Dash, html from dash.dependencies import Input, Output, State from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdMenu( id='menu-demo', currentKey='1-1-1', menuItems=[ { 'component': 'SubMenu', 'props': { 'key': f'{sub_menu}', 'title': f'子菜单{sub_menu}', }, 'children': [ { 'component': 'ItemGroup', 'props': { 'key': f'{sub_menu}-{item_group}', 'title': f'菜单项分组{sub_menu}-{item_group}', }, 'children': [ { 'component': 'Item', 'props': { 'key': f'{sub_menu}-{item_group}-{item}', 'title': f'菜单项{sub_menu}-{item_group}-{item}', }, 'extra': f'extra-{sub_menu}-{item_group}-{item}', } for item in range(1, 3) ], } for item_group in range(1, 3) ], } for sub_menu in range(1, 5) ], mode='horizontal', ), html.Div( id='menu-demo-output', style={ 'height': '800px', 'background': '#a5d8ff', 'color': 'white', 'fontSize': '24px', 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', }, ), ], style=style(padding=50), ) @app.callback( Output('menu-demo-output', 'children'), Input('menu-demo', 'currentKey'), State('menu-demo', 'currentItemPath'), ) def menu_callback_demo(currentKey, currentItemPath): return json.dumps( { 'currentKey': currentKey, 'currentItemPath': currentItemPath, }, ensure_ascii=False, indent=4, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdMenu/feat_currentKeyPath.py ================================================ if True: import sys sys.path.append('../../../') import json from dash import Dash, html from dash.dependencies import Input, Output, State from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdMenu( id='menu-demo', currentKey='1-1-1', menuItems=[ { 'component': 'SubMenu', 'props': { 'key': f'{sub_menu}', 'title': f'子菜单{sub_menu}', }, 'children': [ { 'component': 'ItemGroup', 'props': { 'key': f'{sub_menu}-{item_group}', 'title': f'菜单项分组{sub_menu}-{item_group}', }, 'children': [ { 'component': 'Item', 'props': { 'key': f'{sub_menu}-{item_group}-{item}', 'title': f'菜单项{sub_menu}-{item_group}-{item}', }, 'extra': f'extra-{sub_menu}-{item_group}-{item}', } for item in range(1, 3) ], } for item_group in range(1, 3) ], } for sub_menu in range(1, 5) ], mode='horizontal', ), html.Div( id='menu-demo-output', style={ 'height': '200px', 'background': '#a5d8ff', 'color': 'white', 'fontSize': '24px', 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', }, ), ], style=style(padding=50), ) @app.callback( Output('menu-demo-output', 'children'), Input('menu-demo', 'currentKey'), State('menu-demo', 'currentKeyPath'), ) def menu_callback_demo(currentKey, currentKeyPath): return json.dumps( { 'currentKey': currentKey, 'currentKeyPath': currentKeyPath, }, ensure_ascii=False, indent=4, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdMenu/feat_custom_icon.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash import feffery_antd_components as fac app = Dash(__name__) app.layout = fac.AntdLayout( [ fac.AntdMenu( menuItems=[ { 'component': 'SubMenu', 'props': { 'key': f'{sub_menu}', 'title': f'子菜单{sub_menu}', }, 'children': [ { 'component': 'ItemGroup', 'props': { 'key': f'{sub_menu}-{item_group}', 'title': f'菜单项分组{sub_menu}-{item_group}', }, 'children': [ { 'component': 'Item', 'props': { 'key': f'{sub_menu}-{item_group}-{item}', 'title': f'菜单项{sub_menu}-{item_group}-{item}', }, } for item in range(1, 3) ], } for item_group in range(1, 3) ], } for sub_menu in range(1, 5) ], mode='inline', defaultOpenKeys=['1', '3'], menuItemKeyToIcon={ '1-1-1': fac.AntdIcon( icon='antd-smile', style={'color': 'red'}, ), }, style={'width': 256}, ) ], ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdMenu/feat_expandIcon.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ html.Div( [ fac.AntdDivider( f'mode="{mode}"', innerTextOrientation='left', ), fac.AntdMenu( menuItems=[ { 'component': 'SubMenu', 'props': { 'key': f'{sub_menu}', 'title': f'子菜单{sub_menu}', }, 'children': [ { 'component': 'ItemGroup', 'props': { 'key': f'{sub_menu}-{item_group}', 'title': f'菜单项分组{sub_menu}-{item_group}', }, 'children': [ { 'component': 'Item', 'props': { 'key': f'{sub_menu}-{item_group}-{item}', 'title': f'菜单项{sub_menu}-{item_group}-{item}', }, } for item in range(1, 3) ], } for item_group in range(1, 3) ], } for sub_menu in range(1, 5) ], mode=mode, expandIcon={ 'expand': fac.AntdIcon(icon='antd-down-circle'), 'collapse': fac.AntdIcon(icon='antd-up-circle'), }, style={'width': 256}, ), ] ) for mode in ['vertical', 'horizontal', 'inline'] ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdMenu/feat_triggerSubMenuAction.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ html.Div( [ fac.AntdDivider( f'mode="{mode}"', innerTextOrientation='left', ), fac.AntdMenu( menuItems=[ { 'component': 'SubMenu', 'props': { 'key': f'{sub_menu}', 'title': f'子菜单{sub_menu}', }, 'children': [ { 'component': 'ItemGroup', 'props': { 'key': f'{sub_menu}-{item_group}', 'title': f'菜单项分组{sub_menu}-{item_group}', }, 'children': [ { 'component': 'Item', 'props': { 'key': f'{sub_menu}-{item_group}-{item}', 'title': f'菜单项{sub_menu}-{item_group}-{item}', }, } for item in range(1, 3) ], } for item_group in range(1, 3) ], } for sub_menu in range(1, 5) ], mode=mode, triggerSubMenuAction='click', style={'width': 256}, ), ] ) for mode in ['vertical', 'horizontal', 'inline'] ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdMenu/fix_onlyExpandCurrentSubMenu.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdMenu( id='menu-demo', currentKey='1-1-1', menuItems=[ { 'component': 'SubMenu', 'props': { 'key': f'{sub_menu}', 'title': f'子菜单{sub_menu}', }, 'children': [ { 'component': 'ItemGroup' if item_group == 1 else 'SubMenu', 'props': { 'key': f'{sub_menu}-{item_group}', 'title': f'菜单项分组{sub_menu}-{item_group}', }, 'children': [ { 'component': 'Item', 'props': { 'key': f'{sub_menu}-{item_group}-{item}', 'title': f'菜单项{sub_menu}-{item_group}-{item}', }, 'extra': f'extra-{sub_menu}-{item_group}-{item}', } for item in range(1, 4) ], } for item_group in range(1, 4) ], } for sub_menu in range(1, 5) ], mode='inline', onlyExpandCurrentSubMenu=True, style=style(width=256), ), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdMenu/fix_with_sider.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash import feffery_antd_components as fac app = Dash(__name__) app.layout = fac.AntdLayout( [ fac.AntdSider( [ fac.AntdMenu( menuItems=[ { 'component': 'Item', 'props': { 'key': f'图标{icon}', 'title': f'图标{icon}', 'icon': icon, }, } for icon in [ 'antd-home', 'antd-cloud-upload', 'antd-bar-chart', 'antd-pie-chart', 'antd-dot-chart', 'antd-line-chart', 'antd-apartment', 'antd-app-store', 'antd-app-store-add', 'antd-bell', 'antd-calculator', 'antd-calendar', 'antd-database', 'antd-history', ] ], mode='inline', style={ 'height': '100%', 'width': '100%', 'overflow': 'hidden auto', }, ) ], collapsible=True, collapsedWidth=60, style={'backgroundColor': 'rgb(240, 242, 245)'}, ), fac.AntdContent( fac.AntdCenter( fac.AntdTitle( '内容区示例', level=2, style={'margin': '0'}, ), style={ 'height': '100%', }, ), style={'backgroundColor': 'white'}, ), ], style={'height': '100vh'}, ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/navigation/AntdPagination/feat_align.py ================================================ if True: import sys sys.path.append('../../../') from dash import Dash, html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = Dash(__name__) app.layout = html.Div( [ fac.AntdDivider("align='start'"), fac.AntdPagination(defaultPageSize=10, total=100, align='start'), fac.AntdDivider("align='center'"), fac.AntdPagination(defaultPageSize=10, total=100, align='center'), fac.AntdDivider("align='end'"), fac.AntdPagination(defaultPageSize=10, total=100, align='end'), ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/other/AntdAffix/feat_listen_affixed.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ html.Div( fac.AntdAffix( fac.AntdButton( 'affixed: False', id='output', type='primary', ), id='affix-demo', offsetTop=24, ), style={'marginBottom': '1000px'}, ) ], style=style(padding=100, height='1000vh'), ) @app.callback( Output('output', 'children'), Input('affix-demo', 'affixed'), ) def listen_affixed(affixed): return 'affixed: True' if affixed else 'affixed: False' if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/other/AntdBackTop/refactor.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [fac.AntdBackTop()], style=style(height=9999), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/other/AntdConfigProvider/feat_use_css.py ================================================ if True: import sys sys.path.append('../../../') # adjust if needed import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdConfigProvider( fac.Fragment( fac.AntdCenter( fac.AntdSpace( [ fac.AntdSegmented( id='theme-mode', options=[ {'label': 'Light', 'value': 'light'}, {'label': 'Dark', 'value': 'dark'}, ], value='dark', ), html.Div( 'HTML styled via AntD CSS vars', style={ 'background': 'var(--ant-color-bg-container)', 'color': 'var(--ant-color-text)', 'border': '1px solid var(--ant-color-split)', 'padding': 12, 'borderRadius': 6, }, ), fac.AntdDivider(), fac.AntdText( 'Resolved design tokens:', strong=True, ), html.Pre(id='show-token', style={'whiteSpace': 'pre-wrap'}), ], direction='vertical', size='large', style={'width': '100%', 'maxWidth': 800}, ), style=style(height='100vh', overflowY='auto'), ), id='listen-token', # exposes `token` for the clientside callback ), id='cfg', algorithm='dark', # initial theme token={'fontSize': 18}, # sample token override cssVar=True, ) # Toggle between algorithms @app.callback(Output('cfg', 'algorithm'), Input('theme-mode', 'value')) def apply_theme(mode: str): return 'dark' if mode == 'dark' else 'default' if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/other/AntdCopyText/feat_copy_table.py ================================================ if True: import sys sys.path.append('../../../') import io import dash import pandas as pd from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTable( id='table', columns=[ { 'dataIndex': f'字段{i}', 'title': f'字段{i}', } for i in range(1, 6) ], data=[{f'字段{i}': f'字段{i}第{row}行' for i in range(1, 6)} for row in range(10)], pagination=False, bordered=True, title=fac.AntdCopyText( id='copy-table', beforeIcon=fac.AntdButton('复制表格', type='primary'), afterIcon=fac.AntdButton('复制成功', type='primary'), ), ) ], style=style(padding=50), ) @app.callback( Output('copy-table', 'text'), Input('table', 'data'), ) def generate_copy_text(data): # 将表格数据转换为可直接粘贴到excel中形成表格的字符串数据 temp_io = io.StringIO() pd.DataFrame(data).to_csv(temp_io, sep='\t', index=False) return temp_io.getvalue() if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/other/AntdCopyText/feat_tooltips.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdSpace( [ fac.AntdSpace( [ 'False', fac.AntdCopyText(text='测试', tooltips=False), ] ), fac.AntdSpace( [ '文本', fac.AntdCopyText( text='测试', tooltips=[ '点击复制~', '复制完成~', ], ), ] ), fac.AntdSpace( [ '文本', fac.AntdCopyText( text='测试', tooltips=[ fac.AntdText('点击复制~', strong=True), fac.AntdText('复制完成~', strong=True), ], ), ] ), ], direction='vertical', style=style(width='100%'), ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/other/AntdHappyProvider/feat_component.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = html.Div( [ fac.AntdTabs( items=[ { 'key': '开启', 'label': '开启', 'children': fac.AntdHappyProvider( fac.AntdSpace( [ fac.AntdButton('测试', type='primary'), fac.AntdSwitch(), fac.AntdCheckbox(), fac.AntdRadioGroup(options=['a', 'b', 'c']), ] ) ), }, { 'key': '关闭', 'label': '关闭', 'children': fac.AntdHappyProvider( fac.AntdSpace( [ fac.AntdButton('测试', type='primary'), fac.AntdSwitch(), fac.AntdCheckbox(), fac.AntdRadioGroup(options=['a', 'b', 'c']), ] ), disabled=True, ), }, ] ) ], style=style(padding=50), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: legacy_tests/other/Fragment/feat_use_token.py ================================================ if True: import sys sys.path.append('../../../') import dash from dash import html from dash.dependencies import Input, Output from feffery_dash_utils.style_utils import style import feffery_antd_components as fac app = dash.Dash(__name__) app.layout = fac.AntdConfigProvider( fac.Fragment( fac.AntdCenter( html.Pre(id='show-token'), style=style(height='100vh', overflowY='auto'), ), id='listen-token', ), algorithm='dark', token={'fontSize': 18}, ) app.clientside_callback( '(token) => console.log(token)', Output('show-token', 'children'), Input('listen-token', 'token'), ) if __name__ == '__main__': app.run(debug=True) ================================================ FILE: package.json ================================================ { "name": "feffery_antd_components", "version": "0.4.6-rc1", "description": "Plotly Dash components based on Ant Design", "repository": { "type": "git", "url": "https://github.com/CNFeffery/feffery-antd-components.git" }, "bugs": { "url": "https://github.com/CNFeffery/feffery-antd-components/issues" }, "homepage": "http://fac.feffery.tech", "main": "build/index.js", "scripts": { "start": "webpack serve --config ./webpack.serve.config.js --open", "validate-init": "python _validate_init.py", "prepublishOnly": "npm run validate-init", "build:js": "webpack --mode production", "build:backends": "dash-generate-components ./src/lib/components feffery_antd_components --keep-prop-order ALL -p package-info.json --r-prefix '' --jl-prefix '' --ignore \\.test\\.", "build:backends-activated": "(. venv/bin/activate || venv\\scripts\\activate && npm run build:backends)", "build": "npm run prettier && npm run build:js && npm run build:backends && npm run ruff:check && npm run ruff:format", "build:activated": "npm run build:js && npm run build:backends-activated", "prettier": "prettier --write src/**/*.js src/**/*.react.js", "ruff:check": "python -m ruff check . --fix --exclude=node_modules,venv,build", "ruff:format": "python -m ruff format . --exclude=node_modules,venv,build", "format": "npm run prettier && npm run ruff:format" }, "author": "CNFeffery ", "email": "fefferypzy@gmail.com", "license": "MIT", "dependencies": { "@ant-design/charts": "^1.4.2", "@ant-design/compatible": "^5.0.0", "@ant-design/happy-work-theme": "^1.0.0", "@ant-design/icons": "^5.0.0", "@ant-design/pro-components": "^2.6.49", "@plotly/webpack-dash-dynamic-import": "^1.3.0", "ahooks": "^3.7.0", "antd": "^5.28.0", "antd-img-crop": "^4.2.3", "color": "^4.2.3", "dayjs": "^1.11.13", "is-absolute-url": "4.0.1", "md5": "2.3.0", "nano-css": "^5.3.5", "ramda": "0.26.1", "react-draggable": "4.4.6", "react-fast-marquee": "1.3.1", "react-highlight-words": "0.17.0", "react-icons": "^4.11.0", "react-text-loop": "2.3.0", "react-use": "^17.4.0", "uuid": "8.3.2", "zustand": "^4.5.2" }, "devDependencies": { "@babel/core": "^7.5.4", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@babel/plugin-proposal-object-rest-spread": "^7.5.4", "@babel/plugin-proposal-optional-chaining": "^7.21.0", "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", "babel-eslint": "^10.0.2", "babel-loader": "^8.0.6", "copyfiles": "^2.1.1", "css-loader": "^3.0.0", "eslint": "^6.0.1", "eslint-config-prettier": "^6.0.0", "eslint-plugin-import": "^2.18.0", "eslint-plugin-react": "^7.14.2", "less": "^3.13.1", "less-loader": "^5.0.0", "lodash": "^4.17.21", "prettier": "^3.7.4", "prop-types": "^15.7.2", "react": "^18.3.1", "react-docgen": "^5.4.3", "react-dom": "^18.3.1", "style-loader": "^0.23.1", "styled-jsx": "^4.0.0", "webpack": "4.36.1", "webpack-bundle-analyzer": "^4.7.0", "webpack-cli": "^3.3.6", "webpack-serve": "3.1.0" }, "overrides": { "@ant-design/charts": { "@ant-design/icons": "$@ant-design/icons", "antd": "$antd" }, "react-fast-marquee": { "react": "$react", "react-dom": "$react-dom" }, "react-highlight-words": { "react": "$react", "react-dom": "$react-dom" }, "react-text-loop": { "react": "$react", "react-dom": "$react-dom" } }, "babel": { "presets": [ "@babel/preset-react", "@babel/preset-env" ], "plugins": [ "@babel/plugin-proposal-optional-chaining", "@babel/plugin-transform-react-jsx" ] }, "engines": { "node": ">=8.11.0", "npm": ">=6.1.0" } } ================================================ FILE: pytest.ini ================================================ [pytest] testpaths = tests/ addopts = -rsxX -vv log_format = %(asctime)s | %(levelname)s | %(name)s:%(lineno)d | %(message)s log_cli_level = ERROR ================================================ FILE: requirements.txt ================================================ # dash is required to call `build:py` dash[testing]>=3.3.0 feffery_dash_utils flask_compress pyyaml ruff build pydantic ================================================ FILE: ruff.toml ================================================ line-length = 100 show-fixes = true target-version = "py38" indent-width = 4 [lint] select = [ "I", # isort "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes ] ignore = [ "E501", # line too long "W191", # indentation contains tabs ] [format] docstring-code-format = true quote-style = "single" ================================================ FILE: setup.py ================================================ import json from pathlib import Path from setuptools import setup here = Path(__file__).parent with open('package.json') as f: package = json.load(f) long_description = (here / 'README.md').read_text(encoding='utf-8') package_name = package['name'].replace(' ', '_').replace('-', '_') setup( name=package_name, version=package['version'], homepage=package['homepage'], author=package['author'], packages=[package_name], include_package_data=True, package_data={'feffery_antd_components': ['*']}, license=package['license'], description=package.get('description', package_name), long_description=long_description, long_description_content_type='text/markdown', install_requires=[ 'dash>=3.3.0', ], classifiers=[ 'Framework :: Dash', ], url='https://github.com/CNFeffery/feffery-antd-components', ) ================================================ FILE: src/lib/components/dataDisplay/AntdAccordion.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdAccordion = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdAccordion.react' ) ); /** * 手风琴组件AntdAccordion */ const AntdAccordion = ({ id, className, style, key, classNames, styles, items, accordion = true, activeKey, defaultActiveKey, bordered = true, size = 'middle', collapsible, expandIconPosition = 'left', ghost = false, setProps, ...others }) => { return ( ); }; AntdAccordion.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.shape({ /** * 头部元素css样式 */ header: PropTypes.object, /** * 内容元素css样式 */ body: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.shape({ /** * 头部元素css类名 */ header: PropTypes.string, /** * 内容元素css类名 */ body: PropTypes.string, }), /** * 定义手风琴子项 */ items: PropTypes.arrayOf( PropTypes.exact({ /** * 当前子项内部元素 */ children: PropTypes.node, /** * 当前子项css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([ PropTypes.string, PropTypes.object, ]), /** * 当前子项css样式 */ style: PropTypes.object, /** * 必填,当前子项唯一key值 */ key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) .isRequired, /** * 当前子项折叠触发方式,可选项有`'header'`、`'disabled'`、`'icon'` */ collapsible: PropTypes.oneOf(['header', 'disabled', 'icon']), /** * 当前子项标题元素 */ title: PropTypes.node, /** * 当前子项右上角额外元素 */ extra: PropTypes.node, /** * 是否展示当前手风琴项的箭头图标 * 默认值:`true` */ showArrow: PropTypes.bool, /** * 是否强制渲染内部元素 * 默认值:`false` */ forceRender: PropTypes.bool, }) ), /** * 是否开启手风琴模式 * 默认值:`true` */ accordion: PropTypes.bool, /** * 监听或设置当前处于展开状态的手风琴项key值 */ activeKey: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.arrayOf(PropTypes.number), ]), /** * 设置初始化处于展开状态的手风琴项key值 */ defaultActiveKey: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.arrayOf(PropTypes.number), ]), /** * 是否渲染边框 * 默认值:`true` */ bordered: PropTypes.bool, /** * 组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['large', 'middle', 'small']), /** * 设置所有子项折叠触发方式,可选项有`'header'`、`'disabled'`、`'icon'` */ collapsible: PropTypes.oneOf(['header', 'disabled', 'icon']), /** * 设置折叠图标位置,可选项有`'left'`、`'right'` */ expandIconPosition: PropTypes.oneOf(['left', 'right']), /** * 是否开启透明无边框模式 * 默认值:`false` */ ghost: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdAccordion; export const propTypes = AntdAccordion.propTypes; export const defaultProps = AntdAccordion.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdAvatar.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdAvatar = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdAvatar.react' ) ); /** * 头像组件AntdAvatar */ const AntdAvatar = ({ id, className, style, key, mode = 'icon', text, src, srcSet, draggable, crossOrigin, icon, iconRenderer = 'AntdIcon', alt, gap = 4, size, shape = 'circle', setProps, ...others }) => { return ( ); }; AntdAvatar.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 头像模式,可选项有`'text'`、`'icon'`、`'image'` * 默认值:`'icon'` */ mode: PropTypes.oneOf(['text', 'icon', 'image']), /** * `mode='text'`时,设置字符距离左右两侧边界的像素距离 * 默认值:`4` */ gap: PropTypes.number, /** * `mode='text'`时,设置文字内容 */ text: PropTypes.string, /** * `mode='icon'`时,设置图标,同**AntdIcon**的`icon`参数 */ icon: PropTypes.string, /** * `mode='icon'`时,设置图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), /** * `mode='image'`时,设置图像无法显示时的占位文字 */ alt: PropTypes.string, /** * `mode='image'`时,设置图片地址 */ src: PropTypes.string, /** * `mode='image'`时,设置图片base64地址 */ srcSet: PropTypes.string, /** * `mode='image'`时,设置图片是否允许拖拽 */ draggable: PropTypes.oneOfType([ PropTypes.bool, PropTypes.oneOf(['true', 'false']), ]), /** * `mode='image'`时,设置图片的CORS属性,可选项有`'anonymous'`、`'use-credentials'`、`''` */ crossOrigin: PropTypes.oneOf(['anonymous', 'use-credentials', '']), /** * 配置头像尺寸,可传入数值型代表像素尺寸(支持响应式),或传入字符型使用预设尺寸规格,可选项有`'large'`、`'small'`、`'default'` */ size: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['large', 'small', 'default']), PropTypes.exact({ xs: PropTypes.number, sm: PropTypes.number, md: PropTypes.number, lg: PropTypes.number, xl: PropTypes.number, xxl: PropTypes.number, }), ]), /** * 头像形状,可选项有`'circle'`、`'square'` * 默认值:`'circle'` */ shape: PropTypes.oneOf(['circle', 'square']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdAvatar; export const propTypes = AntdAvatar.propTypes; export const defaultProps = AntdAvatar.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdAvatarGroup.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdAvatarGroup = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdAvatarGroup.react' ) ); /** * 头像组合组件AntdAvatarGroup */ const AntdAvatarGroup = ({ id, children, className, style, key, max, size = 'default', setProps, ...others }) => { return ( ); }; AntdAvatarGroup.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,传入组内各`AntdAvatar`组件 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配置最多显示功能相关参数 */ max: PropTypes.shape({ /** * 最多显示的头像个数,默认无限制 */ count: PropTypes.number, /** * 头像省略部分css样式 */ style: PropTypes.object, /** * 展开层相关配置参数 */ popover: PropTypes.shape({ /** * 超出`maxCount`数量限制之外的头像气泡卡片弹出方位,可选项有`'top'`、`'bottom'`、`'right'` * 默认值:`'top'` */ placement: PropTypes.oneOf(['top', 'bottom', 'right']), /** * 超出`maxCount`数量限制之外的头像气泡卡片弹出触发方式,可选项有`'hover'`、`'click'` * 默认值:`'hover'` */ trigger: PropTypes.oneOf(['hover', 'click']), }), }), /** * 统一设置内部头像尺寸规格,传入数值型表示像素尺寸,传入字符型表示内置规格,可选项有`'large'`、`'small'`、`'default'`,支持响应式断点 * 默认值:`'default'` */ size: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['large', 'small', 'default']), PropTypes.exact({ xs: PropTypes.number, sm: PropTypes.number, md: PropTypes.number, lg: PropTypes.number, xl: PropTypes.number, xxl: PropTypes.number, }), ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdAvatarGroup; export const propTypes = AntdAvatarGroup.propTypes; export const defaultProps = AntdAvatarGroup.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdBadge.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdBadge = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdBadge.react' ) ); /** * 徽标组件AntdBadge */ const AntdBadge = ({ id, children, className, style, styles, classNames, key, color, count, dot = false, offset, overflowCount = 99, showZero = false, status, text, title, size = 'default', nClicks = 0, setProps, ...others }) => { return ( ); }; AntdBadge.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,定义徽标添加目标元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 控制根元素css样式 */ root: PropTypes.object, /** * 控制徽标元素css样式 */ indicator: PropTypes.object, }), /** * 细分控制子元素css类 */ classNames: PropTypes.exact({ /** * 控制根元素css类 */ root: PropTypes.string, /** * 控制徽标元素css类 */ indicator: PropTypes.string, }), /** * 徽标颜色 */ color: PropTypes.string, /** * 徽标显示的数字 */ count: PropTypes.number, /** * 是否用圆点代替数字显示 * 默认值:`false` */ dot: PropTypes.bool, /** * 当`count=0`时,是否强制显示数字 * 默认值:`false` */ showZero: PropTypes.bool, /** * 数字显示上限,超出会以显示`+`后缀 * 默认值:`99` */ overflowCount: PropTypes.number, /** * 徽标在水平、竖直方向上的像素偏移,格式为`[水平偏移, 竖直偏移]` */ offset: PropTypes.arrayOf(PropTypes.number), /** * 徽标状态,可选项有`'success'`、`'processing'`、`'default'`、`'error'`、`'warning'` */ status: PropTypes.oneOf([ 'success', 'processing', 'default', 'error', 'warning', ]), /** * 参数`status`有效时,设置徽标文本内容 */ text: PropTypes.string, /** * 徽标鼠标悬停显示文字内容 */ title: PropTypes.string, /** * 徽标尺寸规格,可选项有`'default'`、`'small'` */ size: PropTypes.oneOf(['default', 'small']), /** * 监听徽标累计被点击次数 * 默认值:`0` */ nClicks: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdBadge; export const propTypes = AntdBadge.propTypes; export const defaultProps = AntdBadge.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdCarousel.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCarousel = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdCarousel.react' ) ); /** * 走马灯组件AntdCarousel */ const AntdCarousel = ({ id, children, className, style, key, arrows = false, autoplay = false, dotPosition = 'bottom', easing = 'linear', effect = 'scrollx', autoplaySpeed = 3000, speed = 500, pauseOnHover = false, infinite = true, lazyLoad = false, slidesToShow = 1, slidesToScroll = 1, setProps, ...others }) => { return ( ); }; AntdCarousel.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,定义走马灯中需要轮播的若干元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 是否显示箭头 * 默认值:`false` */ arrows: PropTypes.bool, /** * 是否自动轮播,可传入字典型进行更多配置 * 默认值:`false` */ autoplay: PropTypes.oneOfType([ PropTypes.bool, PropTypes.shape({ /** * 是否展示指示点进度条 */ dotDuration: PropTypes.bool, }), ]), /** * 面板指示器位置,可选项有`'top'`、`'bottom'`、`'left'`、`'right'` * 默认值:`'bottom'` */ dotPosition: PropTypes.oneOf(['top', 'bottom', 'left', 'right']), /** * 调整动画效果,同css中的`animation-timing-function` * 默认值:'linear' */ easing: PropTypes.string, /** * 动化效果,可选项有`'scrollx'`、`'fade'` * 默认值:'scrollx' */ effect: PropTypes.oneOf(['scrollx', 'fade']), /** * 轮播间隔时长,单位:毫秒 * 默认值:`3000` */ autoplaySpeed: PropTypes.number, /** * 轮播动画耗时,单位:毫秒 * 默认值:`500` */ speed: PropTypes.number, /** * 是否在鼠标悬停时暂停轮播 * 默认值:`false` */ pauseOnHover: PropTypes.bool, /** * 是否启用无限循环轮播 * 默认值:`true` */ infinite: PropTypes.bool, /** * 是否针对走马灯中的子项实施懒加载效果 * 默认值:`false` */ lazyLoad: PropTypes.bool, /** * 同时展示的子项数量 * 默认值:`1` */ slidesToShow: PropTypes.number, /** * 一次轮播划过的子项数量 * 默认值:`1` */ slidesToScroll: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCarousel; export const propTypes = AntdCarousel.propTypes; export const defaultProps = AntdCarousel.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdCheckableTag.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCheckableTag = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdCheckableTag.react' ) ); /** * 可选择标签AntdCheckableTag */ const AntdCheckableTag = ({ id, className, style, key, content, checkedContent, unCheckedContent, checked = false, setProps, ...others }) => { return ( ); }; AntdCheckableTag.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件型,标签内容 */ content: PropTypes.node, /** * 组件型,选择状态下的标签内容 */ checkedContent: PropTypes.node, /** * 组件型,未选择状态下的标签内容 */ unCheckedContent: PropTypes.node, /** * 监听或设置当前标签的选择状态 * 默认值:`false` */ checked: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCheckableTag; export const propTypes = AntdCheckableTag.propTypes; export const defaultProps = AntdCheckableTag.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdCollapse.react.js ================================================ // react核心 import React, { useContext } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Collapse } from 'antd'; // 辅助库 import { parseChildrenToArray, useLoading } from '../utils'; import { isString, isUndefined } from 'lodash'; import { pickBy } from 'ramda'; // 自定义hooks import useCss from '../../hooks/useCss'; // 上下文 import PropsContext from '../../contexts/PropsContext'; /** * 折叠面板组件AntdCollapse */ const AntdCollapse = ({ id, children, className, style, key, styles, classNames, title, isOpen = true, bordered = true, size = 'middle', showArrow = true, collapsible, ghost = false, forceRender = false, setProps, persistence, persisted_props, persistence_type, ...others }) => { children = parseChildrenToArray(children); const context = useContext(PropsContext); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} items={[ { key: '1', label: title, children: children, showArrow: showArrow, forceRender: forceRender, styles: styles, classNames: classNames, }, ]} activeKey={isOpen ? ['1'] : []} bordered={bordered} size={ context && !isUndefined(context.componentSize) ? context.componentSize : size } ghost={ghost} collapsible={collapsible} onChange={(e) => { if (e.length === 1) { setProps({ isOpen: true, }); } else { setProps({ isOpen: false, }); } }} data-dash-is-loading={useLoading()} /> ); }; AntdCollapse.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.shape({ /** * 头部元素css样式 */ header: PropTypes.object, /** * 内容元素css样式 */ body: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.shape({ /** * 头部元素css类名 */ header: PropTypes.string, /** * 内容元素css类名 */ body: PropTypes.string, }), /** * 组件型,标题内容 */ title: PropTypes.node, /** * 是否展开 * 默认值:`true` */ isOpen: PropTypes.bool, /** * 组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['large', 'middle', 'small']), /** * 是否渲染边框 * 默认值:`true` */ bordered: PropTypes.bool, /** * 是否渲染箭头 * 默认值:`true` */ showArrow: PropTypes.bool, /** * 是否开启透明背景模式 * 默认值:`false` */ ghost: PropTypes.bool, /** * 折叠交互触发行为,可选项有`'header'`(仅标题区域)、`'disabled'`(禁用折叠)、`'icon'`(仅图标区域) */ collapsible: PropTypes.oneOf(['header', 'disabled', 'icon']), /** * 初始化未展开时,是否强制渲染内部元素 * 默认值:`false` */ forceRender: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'isOpen'` * 默认值:`['isOpen']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['isOpen'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdCollapse.dashPersistence = { persisted_props: ['isOpen'], persistence_type: 'local', }; export default AntdCollapse; ================================================ FILE: src/lib/components/dataDisplay/AntdComment.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdComment = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdComment.react' ) ); /** * 评论组件AntdComment */ const AntdComment = ({ id, children, className, style, locale = 'zh-cn', commentId, showLikeDislike = true, showReply = true, showDelete = false, replyClicks = 0, deleteClicks = 0, authorName, authorNameHref, publishTime, fromNow = false, commentContent, likesCount = 0, dislikesCount = 0, action, defaultAction, avatarProps, popupContainer = 'body', setProps, batchPropsNames = [], ...others }) => { return ( ); }; AntdComment.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 传入内部嵌套的评论组件 */ children: PropTypes.node, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 评论唯一id,可用于数据库匹配等场景 */ commentId: PropTypes.string, /** * 评论发布用户名 */ authorName: PropTypes.string, /** * 评论发布用户名附带链接地址 */ authorNameHref: PropTypes.string, /** * 必填,配置发布日期时间相关参数 */ publishTime: PropTypes.exact({ /** * 必填,日期时间字符串 */ value: PropTypes.string.isRequired, /** * 与日期时间字符串匹配的格式 */ format: PropTypes.string, }).isRequired, /** * 是否以相对时间格式呈现发布日期时间 */ fromNow: PropTypes.bool, /** * 是否显示“支持/反对”按钮 * 默认值:`true` */ showLikeDislike: PropTypes.bool, /** * 是否显示“添加回复”按钮 * 默认值:`true` */ showReply: PropTypes.bool, /** * 是否显示“删除”按钮 * 默认值:`false` */ showDelete: PropTypes.bool, /** * 监听“添加回复”按钮累计点击次数 * 默认值:`0` */ replyClicks: PropTypes.number, /** * 监听“删除”按钮累计点击次数 * 默认值:`0` */ deleteClicks: PropTypes.number, /** * 组件型,评论正文内容 */ commentContent: PropTypes.node, /** * 监听或设置“支持”次数 */ likesCount: PropTypes.number, /** * 监听或设置“反对”次数 */ dislikesCount: PropTypes.number, /** * 监听或设置当前评论“支持/反对”状态,可选项有`'liked'`、`'disliked'`、`'default'` * 默认值:`'default'` */ action: PropTypes.oneOf(['liked', 'disliked', 'default']), /** * 设置当前评论初始化时的“支持/反对”状态,可选项有`'liked'`、`'disliked'`、`'default'` */ defaultAction: PropTypes.oneOf(['liked', 'disliked', 'default']), /** * 配置评论用户头像,同`AntdAvatar` */ avatarProps: PropTypes.object, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdComment; export const propTypes = AntdComment.propTypes; export const defaultProps = AntdComment.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdCountdown.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCountdown = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdCountdown.react' ) ); /** * 倒计时组件AntdCountdown */ const AntdCountdown = ({ id, className, style, key, value, valueFormat = 'YYYY-MM-DD hh:mm:ss', format, prefix, suffix, title, titleTooltip, valueStyle, setProps, ...others }) => { return ( ); }; AntdCountdown.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 日期时间显示格式,[参考资料](https://day.js.org/docs/en/display/format),如`HH:mm:ss`代表`时:分:秒` */ format: PropTypes.string, /** * 目标截止日期时间字符串,与`valueFormat`对应 */ value: PropTypes.string, /** * 针对`value`设置对应的日期时间解析格式,[参考资料](https://day.js.org/docs/en/display/format) * 默认值:`'YYYY-MM-DD hh:mm:ss'` */ valueFormat: PropTypes.string, /** * 组件型,数值前缀内容 */ prefix: PropTypes.node, /** * 组件型,数值后缀内容 */ suffix: PropTypes.node, /** * 组件型,标题内容 */ title: PropTypes.node, /** * 为标题内容添加额外鼠标悬停提示信息 */ titleTooltip: PropTypes.string, /** * 数值内容css样式 */ valueStyle: PropTypes.object, /** * 监听倒计时结束事件 */ finishEvent: PropTypes.shape({ /** * 事件时间戳 */ timestamp: PropTypes.number, }), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCountdown; export const propTypes = AntdCountdown.propTypes; export const defaultProps = AntdCountdown.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdCountup.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCountup = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdCountup.react' ) ); /** * 正计时组件AntdCountup */ const AntdCountup = ({ id, className, style, key, value, valueFormat = 'YYYY-MM-DD hh:mm:ss', format, prefix, suffix, title, titleTooltip, valueStyle, setProps, ...others }) => { return ( ); }; AntdCountup.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 日期时间显示格式,[参考资料](https://day.js.org/docs/en/display/format),如`HH:mm:ss`代表`时:分:秒` */ format: PropTypes.string, /** * 目标截止日期时间字符串,与`valueFormat`对应 */ value: PropTypes.string, /** * 针对`value`设置对应的日期时间解析格式,[参考资料](https://day.js.org/docs/en/display/format) * 默认值:`'YYYY-MM-DD hh:mm:ss'` */ valueFormat: PropTypes.string, /** * 组件型,数值前缀内容 */ prefix: PropTypes.node, /** * 组件型,数值后缀内容 */ suffix: PropTypes.node, /** * 组件型,标题内容 */ title: PropTypes.node, /** * 为标题内容添加额外鼠标悬停提示信息 */ titleTooltip: PropTypes.string, /** * 数值内容css样式 */ valueStyle: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCountup; export const propTypes = AntdCountup.propTypes; export const defaultProps = AntdCountup.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdEmpty.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdEmpty = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdEmpty.react' ) ); /** * 空状态组件AntdEmpty */ const AntdEmpty = ({ id, children, className, style, styles, classNames, key, locale = 'zh-cn', description, image = 'default', setProps, ...others }) => { return ( ); }; AntdEmpty.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 根元素css样式 */ root: PropTypes.object, /** * 图标元素css样式 */ image: PropTypes.object, /** * 描述元素css样式 */ description: PropTypes.object, /** * 底部元素css样式 */ footer: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 根元素css类名 */ root: PropTypes.string, /** * 图标元素css类名 */ image: PropTypes.string, /** * 描述元素css类名 */ description: PropTypes.string, /** * 底部元素css类名 */ footer: PropTypes.string, }), /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 描述信息内容 */ description: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]), /** * 状态图片地址,也可以使用内置图片,可选项有`'default'`、`'simple'` * 默认值:`'default'` */ image: PropTypes.oneOfType([ PropTypes.string, PropTypes.oneOf(['default', 'simple']), ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdEmpty; export const propTypes = AntdEmpty.propTypes; export const defaultProps = AntdEmpty.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdImage.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdImage = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdImage.react' ) ); /** * 图片组件AntdImage */ const AntdImage = ({ id, className, style, key, locale = 'zh-cn', width, height, src, fallback, multiImageMode = 'fold', previewCurrent, previewVisible, preview = true, toolbarExtra, setProps, ...others }) => { return ( ); }; AntdImage.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 图片alt信息 */ alt: PropTypes.string, /** * 图片宽度 */ width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 图片高度 */ height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 配置图片资源地址,当传入数组时为多图片模式 */ src: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), ]), /** * 图片加载失败占位图资源地址 */ fallback: PropTypes.string, /** * 多图片模式展示方式,可选项有`'fold'`、`'unfold'` * 默认值:`'fold'` */ multiImageMode: PropTypes.oneOf(['fold', 'unfold']), /** * 监听或控制当前图片预览层是否处于打开状态 */ previewVisible: PropTypes.bool, /** * 监听或控制当前图片预览对应切换到的图片下标 */ previewCurrent: PropTypes.number, /** * 配置图片预览相关功能,传入`false`时会禁用预览功能 * 默认值:`true` */ preview: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 自定义预览图链接地址 */ src: PropTypes.string, /** * 预览模式下是否可移动图片 */ movable: PropTypes.bool, /** * 组件型,用于自定义缩略图遮罩元素 */ mask: PropTypes.node, /** * 缩略图遮罩元素css类名 */ maskClassName: PropTypes.string, /** * 缩略图根节点css类名 */ rootClassName: PropTypes.string, /** * `1+scaleStep`值为每一步缩放的倍数 * 默认值:`0.5` */ scaleStep: PropTypes.number, /** * 最小缩放倍数 * 默认值:`1` */ minScale: PropTypes.number, /** * 最大缩放倍数 * 默认值:`50` */ maxScale: PropTypes.number, }), ]), /** * 针对预览模式下的工具栏,末尾扩充自定义工具图标元素 */ toolbarExtra: PropTypes.node, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdImage; export const propTypes = AntdImage.propTypes; export const defaultProps = AntdImage.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdImageGroup.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdImageGroup = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdImageGroup.react' ) ); /** * 图片组合组件AntdImageGroup */ const AntdImageGroup = ({ id, children, className, style, key, locale = 'zh-cn', items, fallback, preview = true, visible, current, disableCurrent = true, toolbarExtra, setProps, ...others }) => { return ( ); }; AntdImageGroup.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,定义组内需要嵌套的`AntdImage`组件 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 控制图片组合内部实际展示的图片资源地址数组,顺序依次展示 */ items: PropTypes.arrayOf(PropTypes.string), /** * 图片加载失败占位图资源地址 */ fallback: PropTypes.string, /** * 配置图片预览相关功能,传入`false`时会禁用预览功能 * 默认值:`true` */ preview: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 自定义预览图链接地址 */ src: PropTypes.string, /** * 预览模式下是否可移动图片 */ movable: PropTypes.bool, /** * 组件型,用于自定义缩略图遮罩元素 */ mask: PropTypes.node, /** * 缩略图遮罩元素css类名 */ maskClassName: PropTypes.string, /** * 缩略图根节点css类名 */ rootClassName: PropTypes.string, /** * `1+scaleStep`值为每一步缩放的倍数 * 默认值:`0.5` */ scaleStep: PropTypes.number, /** * 最小缩放倍数 * 默认值:`1` */ minScale: PropTypes.number, /** * 最大缩放倍数 * 默认值:`50` */ maxScale: PropTypes.number, }), ]), /** * 监听或设置当前图片组是否处于全屏预览状态 */ visible: PropTypes.bool, /** * 监听或控制当前图片预览对应切换到的图片下标 */ current: PropTypes.number, /** * 是否关闭基于`current`的当前图片下标受控功能 * 默认值:`true` */ disableCurrent: PropTypes.bool, /** * 针对预览模式下的工具栏,末尾扩充自定义工具图标元素 */ toolbarExtra: PropTypes.node, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdImageGroup; export const propTypes = AntdImageGroup.propTypes; export const defaultProps = AntdImageGroup.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdPopover.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdPopover = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdPopover.react' ) ); /** * 气泡卡片组件Popover */ const AntdPopover = ({ id, children, className, style, styles, classNames, key, title, content, placement = 'top', color, mouseEnterDelay = 0.1, mouseLeaveDelay = 0.1, trigger = 'hover', zIndex, arrow = 'show', fresh = false, open = false, permanent = false, popupContainer = 'body', setProps, ...others }) => { return ( ); }; AntdPopover.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,气泡卡片触发目标元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 根元素(包含箭头、内容元素)css样式 */ root: PropTypes.object, /** * 内容元素css样式 */ body: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 根元素(包含箭头、内容元素)css类名 */ root: PropTypes.string, /** * 内容元素css类名 */ body: PropTypes.string, }), /** * 组件型,标题内容 */ title: PropTypes.node, /** * 组件型,内容区元素 */ content: PropTypes.node, /** * 气泡卡片展开方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` * 默认值:`top'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ]), /** * 背景颜色 */ color: PropTypes.string, /** * 鼠标移入到气泡卡片弹出延时,单位:秒 * 默认值:`0.1` */ mouseEnterDelay: PropTypes.number, /** * 鼠标移出到气泡卡片消失延时,单位:秒 * 默认值:`0.1` */ mouseLeaveDelay: PropTypes.number, /** * 触发方式,可选项有`'hover'`、`'focus'`、`'click'`,可多选 * 默认值:`'hover'` */ trigger: PropTypes.oneOfType([ PropTypes.oneOf(['hover', 'focus', 'click']), PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click'])), ]), /** * 气泡卡片z-index */ zIndex: PropTypes.number, /** * 控制气泡卡片附带箭头显示形式,可选项有`'show'`、`'hide'`、`'center'` * 默认值:`'show'` */ arrow: PropTypes.oneOf(['show', 'hide', 'center']), /** * 是否始终保持更新内容 * 默认值:`false` */ fresh: PropTypes.bool, /** * 监听或设置当前气泡卡片的展开状态 * 默认值:`false` */ open: PropTypes.bool, /** * 是否保持气泡卡片处于`open`对应状态不变 * 默认值:`false` */ permanent: PropTypes.bool, /** * 气泡卡片展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdPopover; export const propTypes = AntdPopover.propTypes; export const defaultProps = AntdPopover.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdQRCode.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdQRCode = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdQRCode.react' ) ); /** * 二维码组件AntdQRCode */ const AntdQRCode = ({ id, className, style, key, locale = 'zh-cn', value, type = 'canvas', icon, size = 160, iconSize = 40, color = '#000', bgColor = 'transparent', bordered = true, errorLevel = 'M', status = 'active', expires, autoSpin = false, refreshClicks = 0, setProps, ...others }) => { return ( ); }; AntdQRCode.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 二维码解析结果 */ value: PropTypes.string, /** * 渲染方式,可选项有`'canvas'`、`'svg'` * 默认值:`'canvas'` */ type: PropTypes.oneOf(['canvas', 'svg']), /** * 二维码内嵌图片地址 */ icon: PropTypes.string, /** * 二维码像素边长 * 默认值:`160` */ size: PropTypes.number, /** * 二维码内嵌图片像素边长 * 默认值:`40` */ iconSize: PropTypes.oneOfType([ PropTypes.number, PropTypes.exact({ width: PropTypes.number, height: PropTypes.number, }), ]), /** * 二维码颜色 * 默认值:`'#000'` */ color: PropTypes.string, /** * 二维码背景颜色 * 默认值:`'transparent'` */ bgColor: PropTypes.string, /** * 二维码是否渲染边框 * 默认值:`true` */ bordered: PropTypes.bool, /** * 二维码纠错级别,可选项有`'L'`、`'M'`、`'Q'`、`'H'` * 默认值:`'M'` */ errorLevel: PropTypes.oneOf(['L', 'M', 'Q', 'H']), /** * 二维码状态,可选项有`'active'`、`'expired'`、`'loading'`、`'scanned'` * 默认值:`'active'` */ status: PropTypes.oneOf(['active', 'expired', 'loading', 'scanned']), /** * 当前二维码过期时间,单位:秒,到期后二维码状态将会被强制更新为`'expired'` */ expires: PropTypes.number, /** * 是否在`value`处于回调更新中时,自动切换为`loading`状态 * 默认值:`false` */ autoSpin: PropTypes.bool, /** * 监听当前"点击刷新"按钮累计点击次数,仅在`status`为`'expired'`时有效 * 默认值:`0` */ refreshClicks: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdQRCode; export const propTypes = AntdQRCode.propTypes; export const defaultProps = AntdQRCode.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdRibbon.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdRibbon = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdRibbon.react' ) ); /** * 缎带组件AntdRibbon */ const AntdRibbon = ({ id, children, className, style, key, color, placement = 'end', text, setProps, ...others }) => { return ( ); }; AntdRibbon.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,添加徽标的目标元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 缎带颜色 */ color: PropTypes.string, /** * 缎带显示位置,可选项有`'start'`、`'end'` * 默认值:`'end'` */ placement: PropTypes.oneOf(['start', 'end']), /** * 组件型,缎带内容 */ text: PropTypes.node, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdRibbon; export const propTypes = AntdRibbon.propTypes; export const defaultProps = AntdRibbon.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdSegmented.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdSegmented = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdSegmented.react' ) ); /** * 分段控制器组件AntdSegmented */ const AntdSegmented = ({ id, style, className, key, options, defaultValue, value, block = false, shape = 'default', vertical = false, disabled = false, size = 'middle', setProps, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; AntdSegmented.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配置选项相关参数 */ options: PropTypes.arrayOf( PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.exact({ /** * 组件型,选项标题内容 */ label: PropTypes.node, /** * 必填,选项值 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) .isRequired, /** * 是否禁用当前选项 * 默认值:`false` */ disabled: PropTypes.bool, /** * 选项前缀图标,`iconRenderer='AntdIcon'`时同`AntdIcon`,`iconRenderer='fontawesome'`时表示css类名 */ icon: PropTypes.string, /** * 选项前缀图标类型,可选项有`'AntdIcon'`、`'fontawesome'` * 默认值:`'AntdIcon'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), }), ]) ), /** * 监听或设置当前选中值 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 设置初始化选中值 */ defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 是否撑满父容器 * 默认值:`false` */ block: PropTypes.bool, /** * 形状,可选项有`'default'`、`'round'` * 默认值:`'default'` */ shape: PropTypes.oneOf(['default', 'round']), /** * 是否垂直展示 * 默认值:`false` */ vertical: PropTypes.bool, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['large', 'middle', 'small']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdSegmented.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdSegmented; export const propTypes = AntdSegmented.propTypes; export const defaultProps = AntdSegmented.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdSpoiler.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdSpoiler = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdSpoiler.react' ) ); /** * 展开收起组件AntdSpoiler */ const AntdSpoiler = ({ id, children, className, style, key, locale = 'zh-cn', contentClassName, contentStyle, hideLabel, showLabel, labelPosition = 'left', open = false, maxHeight = 50, transitionDuration = 0.1, setProps, ...others }) => { return ( ); }; AntdSpoiler.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 内容区css类名,支持[动态css](/advanced-classname) */ contentClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 内容区css样式 */ contentStyle: PropTypes.object, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 组件型,展开状态下,收起按钮的文案内容 */ hideLabel: PropTypes.node, /** * 组件型,收起状态下,展开按钮的文案内容 */ showLabel: PropTypes.node, /** * 展开/收起按钮的位置,可选项有`'left'`、`'right'` * 默认值:`'left'` */ labelPosition: PropTypes.oneOf(['left', 'right']), /** * 监听或设置是否处于展开状态 * 默认值:`false` */ open: PropTypes.bool, /** * 收起状态下,内容区域最大像素高度 * 默认值:`50` */ maxHeight: PropTypes.number, /** * 展开/收起过渡动画耗时,单位:秒 * 默认值:`0.1` */ transitionDuration: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSpoiler; export const propTypes = AntdSpoiler.propTypes; export const defaultProps = AntdSpoiler.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdStatistic.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Statistic, Space, Tooltip } from 'antd'; import { QuestionCircleOutlined } from '@ant-design/icons'; // 辅助库 import { isString, isNumber } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 统计数值组件AntdStatistic */ const AntdStatistic = ({ id, className, style, key, value, showGroupSeparator = true, precision, prefix, suffix, title, titleTooltip, valueStyle, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} value={isString(value) || isNumber(value) ? value : undefined} formatter={ !(isString(value) || isNumber(value)) ? () => value : undefined } groupSeparator={showGroupSeparator ? ',' : ''} precision={precision} prefix={prefix} suffix={suffix} title={ titleTooltip ? ( {title} ) : ( title ) } valueStyle={valueStyle} data-dash-is-loading={useLoading()} /> ); }; AntdStatistic.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 支持组件型,要展示的数值 */ value: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, PropTypes.node, ]), /** * 是否为数值型`value`添加千分位符 * 默认值:`true` */ showGroupSeparator: PropTypes.bool, /** * 针对数值型`value`,设置数值精度 */ precision: PropTypes.number, /** * 组件型,数值前缀内容 */ prefix: PropTypes.node, /** * 组件型,数值后缀内容 */ suffix: PropTypes.node, /** * 组件型,标题内容 */ title: PropTypes.node, /** * 为标题内容添加额外鼠标悬停提示信息 */ titleTooltip: PropTypes.string, /** * 数值内容css样式 */ valueStyle: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdStatistic; ================================================ FILE: src/lib/components/dataDisplay/AntdTable.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTable = React.lazy( () => import( /* webpackChunkName: "antd_table" */ '../../fragments/AntdTable.react' ) ); /** * 表格组件AntdTable */ const AntdTable = ({ id, className, style, key, locale = 'zh-cn', containerId, columns = [], showHeader = true, rowHoverable = true, tableLayout, miniChartHeight = 30, miniChartAnimation = false, rowSelectionType, selectedRowKeys, rowSelectionWidth = 32, rowSelectionCheckStrictly, rowSelectionIgnoreRowKeys, sticky = false, titlePopoverInfo, columnsFormatConstraint, enableHoverListen = false, data = [], sortOptions = {}, showSorterTooltip = true, showSorterTooltipTarget = 'full-header', filterOptions = {}, defaultFilteredValues = {}, pagination, bordered = false, maxHeight, maxWidth, scrollToFirstRowOnChange = true, size = 'middle', mode = 'client-side', nClicksButton = 0, nDoubleClicksCell = 0, summaryRowContents, summaryRowBlankColumns = 0, summaryRowFixed = false, customFormatFuncs, conditionalStyleFuncs = {}, expandedRowKeyToContent, expandedRowWidth, expandRowByClick = false, defaultExpandedRowKeys, expandedRowKeys, enableCellClickListenColumns = [], nClicksCell = 0, nContextMenuClicksCell = 0, emptyContent, cellUpdateOptimize = false, nClicksDropdownItem = 0, hiddenRowKeys = [], virtual = false, title, footer, loading = false, rowClassName, selectedRowsSyncWithData = false, setProps, ...others }) => { return ( ); }; AntdTable.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名 */ className: PropTypes.string, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 当表格渲染在具有滚动条的局部容器中时,指定该容器id,可避免出现部分表格内部展开层随滚动条滚动显示异常的问题 */ containerId: PropTypes.string, /** * 配置字段定义相关参数 */ columns: PropTypes.arrayOf( PropTypes.shape({ /** * 必填,当前字段标题 */ title: PropTypes.oneOfType([PropTypes.func, PropTypes.node]) .isRequired, /** * 必填,当前字段唯一识别id */ dataIndex: PropTypes.string.isRequired, /** * 当前字段所属分组信息,用于渲染多级表头 */ group: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), ]), /** * 配置字段[再渲染模式](/AntdTable-rerender)相关参数 */ renderOptions: PropTypes.exact({ /** * 再渲染类型,可选项有`'link'`、`'ellipsis'`、`'copyable'`、`'ellipsis-copyable'`、`'tags'`、`'status-badge'`、`'image'` * 、`'custom-format'`、`'corner-mark'`、`'row-merge'`、`'dropdown'`、`'dropdown-links'`、`'image-avatar'` * 、`'mini-line'`、`'mini-bar'`、`'mini-progress'`、`'mini-ring-progress'`、`'mini-area'` * 、`'button'`、`'checkbox'`、`'switch'`、`'select'` */ renderType: PropTypes.oneOf([ // 内容展示类 'link', 'ellipsis', 'copyable', 'ellipsis-copyable', 'tags', 'status-badge', 'image', 'custom-format', 'corner-mark', 'row-merge', 'dropdown', 'dropdown-links', 'image-avatar', // 迷你图类 'mini-line', 'mini-bar', 'mini-progress', 'mini-ring-progress', 'mini-area', // 监听交互类 'button', 'checkbox', 'switch', 'select', ]), /** * 当`renderType='link'`时,统一设置渲染链接文本内容 */ renderLinkText: PropTypes.string, /** * 当`renderType`为`'link'`、`'button'`时,统一设置链接跳转行为是否采用`dcc.Link`模式 * 默认值:`false` */ likeDccLink: PropTypes.bool, /** * 当`renderType='button'`时,控制多个按钮之间是否添加分割线 */ renderButtonSplit: PropTypes.bool, /** * 当`renderType='button'`时,配置气泡确认框相关参数 */ renderButtonPopConfirmProps: PropTypes.exact({ /** * 气泡确认框标题 */ title: PropTypes.string, /** * 气泡确认框确认按钮文案 */ okText: PropTypes.string, /** * 气泡确认框取消按钮文案 */ cancelText: PropTypes.string, }), /** * 当`renderType`为`'mini-line'`、`'mini-area'`、`'mini-bar'`时,设置图表颜色 */ miniChartColor: PropTypes.string, /** * 当`renderType`为`'mini-line'`、`'mini-area'`、`'mini-bar'`时,设置用于渲染信息卡片的`javascript`函数字符串 */ tooltipCustomContent: PropTypes.string, /** * 当`renderType`为`'mini-progress'`、`'mini-ring-progress'`时,设置进度完成状态下的填充色 */ progressOneHundredPercentColor: PropTypes.string, /** * 当`renderType`为`'mini-progress'`时,设置进度条是否附带进度数值信息 * 默认值:`false` */ progressShowPercent: PropTypes.bool, /** * 当`renderType`为`'mini-progress'`时,设置进度条附带进度数值信息的小数位数,默认保持原始数值的精度 */ progressPercentPrecision: PropTypes.number, /** * 当`renderType`为`'mini-progress'`时,设置进度条附带进度数值信息显示的位置 */ progressPercentPosition: PropTypes.shape({ /** * 对齐方式,可选项有`'start'`、`'center'`、`'end'` */ align: PropTypes.oneOf(['start', 'center', 'end']), /** * 内外位置,可选项有`'inner'`、`'outer'` */ type: PropTypes.oneOf(['inner', 'outer']), }), /** * 当`renderType`为`'mini-progress'`时,设置进度条形状类型,可选项有`'square'`、`'round'` * 默认值:`'square'` */ progressStrokeLinecap: PropTypes.oneOf(['square', 'round']), /** * 当`renderType`为`'mini-progress'`时,设置进度条像素尺寸 */ progressSize: PropTypes.number, /** * 当`renderType`为`'mini-progress'`时,设置进度条主体部分颜色,支持通过字段`'from'`、`'to'`配置渐变色 */ progressColor: PropTypes.oneOfType([ PropTypes.string, PropTypes.shape({ /** * 渐变色起始颜色 */ from: PropTypes.string, /** * 渐变色结束颜色 */ to: PropTypes.string, }), ]), /** * 当`renderType='mini-ring-progress'`时,设置进度数值像素大小 */ ringProgressFontSize: PropTypes.number, /** * 当`renderType`为`'dropdown'`、`'dropdown-links'`时,配置下拉菜单相关参数 */ dropdownProps: PropTypes.exact({ /** * 下拉菜单锚点标题内容 */ title: PropTypes.string, /** * 下拉菜单是否显示指示箭头 * 默认值:`false` */ arrow: PropTypes.bool, /** * 是否整体禁用下拉菜单功能,优先级低于各记录值内部参数 */ disabled: PropTypes.bool, /** * 下拉菜单容器css类名 */ overlayClassName: PropTypes.string, /** * 下拉菜单容器css样式 */ overlayStyle: PropTypes.object, /** * 下拉菜单展开方向,可选项有`'bottomLeft'`、`'bottomCenter'`、`'bottomRight'`、`'topLeft'`、`'topCenter'`、`'topRight'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight', ]), }), }), /** * 当前字段冻结方向,可选项有`'left'`、`'right'`,设置为`true`时等价于`'left'` */ fixed: PropTypes.oneOfType([ PropTypes.oneOf(['left', 'right']), PropTypes.bool, ]), /** * 当前字段是否可编辑 * 默认值:`false` */ editable: PropTypes.bool, /** * 配置可编辑模式下输入框相关参数 */ editOptions: PropTypes.exact({ /** * 编辑框模式,可选项有`'default'`、`'text-area'` * 默认值:`'default'` */ mode: PropTypes.oneOf(['default', 'text-area']), /** * 当`mode='textarea'`时,配置文本框自适应高度相关功能,同`AntdInput` * 默认值:`false` */ autoSize: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ minRows: PropTypes.number, maxRows: PropTypes.number, }), ]), /** * 限制当前字段可编辑模式下,输入框内最多可输入的字符数量,默认无限制 */ maxLength: PropTypes.number, /** * 输入框无输入值时的占位提示信息 */ placeholder: PropTypes.string, /** * 当前字段下需进行输入框禁用的行记录`key`值列表 */ disabledKeys: PropTypes.arrayOf(PropTypes.string), }), /** * 当前字段对齐方式,可选项有`'left'`、`'center'`、`'right'` * 默认值:`'center'` */ align: PropTypes.oneOf(['left', 'center', 'right']), /** * 当前表头对齐方式,默认跟随当前字段对齐方式,可选项有`'left'`、`'center'`、`'right'` * 默认值:`'center'` */ headerAlign: PropTypes.oneOf(['left', 'center', 'right']), /** * 当前字段宽度 */ width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 控制当前字段最小宽度,仅当`tableLayout="auto"`时有效 */ minWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 是否隐藏当前字段 * 默认值:`false` */ hidden: PropTypes.bool, /** * 当前字段css类名 */ className: PropTypes.string, /** * 当前字段初始化时的默认排序状态,可选项有`'ascend'`、`'descend'` */ defaultSortOrder: PropTypes.oneOf(['ascend', 'descend']), /** * 若当前字段通过参数`defaultFilteredValues`设置了初始化默认选中的筛选值,用于设置是否在用户点击重置按钮后恢复默认选中筛选项 * 默认值:`false` */ filterResetToDefaultFilteredValue: PropTypes.bool, }) ), /** * 是否显示表头 * 默认值:`true` */ showHeader: PropTypes.bool, /** * 表格行是否开启鼠标悬停样式效果 * 默认值:`true` */ rowHoverable: PropTypes.bool, /** * 当`columns`中各字段未设置`width`时,用于控制整体字段宽度分配方式,可选项有`'auto'`、`'fixed'` */ tableLayout: PropTypes.oneOf(['auto', 'fixed']), /** * 定义表格数据源,与`columns`对应 */ data: PropTypes.arrayOf( PropTypes.objectOf( PropTypes.oneOfType([ /** * 通过`children`向下嵌套行记录 */ PropTypes.arrayOf(PropTypes.any), /** * 组件型元素 */ PropTypes.node, /** * 常规模式、`'ellipsis'`模式、`'copyable'`模式、`'custom-format'`模式、`'ellipsis-copyable'`模式 */ PropTypes.string, /** * 常规模式、`'ellipsis'`模式、`'mini-prorgess'`模式、`mini-ring-progress`模式、`'copyable'`模式、`'custom-format'`模式, * 其中`mini-prorgess`模式、`'mini-ring-progress'`模式下输入值需在0~1之间 */ PropTypes.number, PropTypes.bool, /** * `'link'`模式 */ PropTypes.exact({ /** * 适用于`'link'`模式,链接显示的文字内容,优先级高于字段配置信息中的`renderLinkText`参数 */ content: PropTypes.string, /** * 适用于`'link'`模式,链接地址 */ href: PropTypes.string, /** * 适用于`'link'`模式,链接跳转行为 * 默认值:`'_blank'` */ target: PropTypes.string, /** * 适用于`'link'`模式,是否禁用当前链接 * 默认值:`false` */ disabled: PropTypes.bool, }), /** * `'mini-line'`模式、`'mini-bar'`模式、`'mini-area'`模式 */ PropTypes.arrayOf(PropTypes.number), /** * `tags`模式 */ PropTypes.oneOfType([ /** * 渲染单个标签 */ PropTypes.exact({ /** * 适用于`'tags'`模式,标签颜色 */ color: PropTypes.string, /** * 适用于`'tags'`模式,标签内容 */ tag: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), /** * 适用于`'tags'`模式,为当前标签添加额外的文字提示功能 */ tooltip: PropTypes.shape({ /** * 文字提示内容 */ title: PropTypes.string, /** * 文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` * 默认值:`'top'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ]), }), }), /** * 渲染多个标签 */ PropTypes.arrayOf( PropTypes.exact({ /** * 适用于`'tags'`模式,当前标签颜色 */ color: PropTypes.string, /** * 适用于`'tags'`模式,当前标签内容 */ tag: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), /** * 适用于`'tags'`模式,为当前标签添加额外的文字提示功能 */ tooltip: PropTypes.shape({ /** * 文字提示内容 */ title: PropTypes.string, /** * 文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` * 默认值:`'top'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ]), }), }) ), ]), /** * `'button'`模式 */ PropTypes.oneOfType([ /** * 渲染单个按钮 */ PropTypes.exact({ /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ disabled: PropTypes.bool, /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ type: PropTypes.oneOf([ 'primary', 'ghost', 'dashed', 'link', 'text', 'default', ]), /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ color: PropTypes.oneOf([ 'default', 'primary', 'danger', 'blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold', ]), /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ variant: PropTypes.oneOf([ 'outlined', 'dashed', 'solid', 'filled', 'text', 'link', ]), /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ danger: PropTypes.bool, /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ style: PropTypes.object, /** * 适用于`'button'`模式,按钮内容 */ content: PropTypes.string, /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ href: PropTypes.string, /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ target: PropTypes.string, /** * 适用于`'button'`模式,用于为当前按钮配置气泡确认框相关参数,优先级更高 */ popConfirmProps: PropTypes.exact({ /** * 气泡确认框标题 */ title: PropTypes.string, /** * 气泡确认框确认按钮文案 */ okText: PropTypes.string, /** * 气泡确认框取消按钮文案 */ cancelText: PropTypes.string, }), /** * 适用于`'button'`模式,按钮前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名 */ icon: PropTypes.string, /** * 适用于`'button'`模式,按钮前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf([ 'AntdIcon', 'fontawesome', ]), /** * 适用于`'button'`模式,为当前按钮添加额外的文字提示功能 */ tooltip: PropTypes.shape({ /** * 文字提示内容 */ title: PropTypes.string, /** * 文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` * 默认值:`'top'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ]), }), /** * 适用于`'button'`模式,额外补充信息 */ custom: PropTypes.any, }), /** * 渲染多个按钮 */ PropTypes.arrayOf( PropTypes.exact({ /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ disabled: PropTypes.bool, /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ type: PropTypes.oneOf([ 'primary', 'ghost', 'dashed', 'link', 'text', 'default', ]), /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ danger: PropTypes.bool, /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ style: PropTypes.object, /** * 适用于`'button'`模式,按钮内容 */ content: PropTypes.string, /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ href: PropTypes.string, /** * 适用于`'button'`模式,同`AntdButton`中的同名参数 */ target: PropTypes.string, /** * 适用于`'button'`模式,当前按钮前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名 */ icon: PropTypes.string, /** * 适用于`'button'`模式,当前按钮前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf([ 'AntdIcon', 'fontawesome', ]), /** * 适用于`'button'`模式,额外补充信息 */ custom: PropTypes.any, }) ), ]), /** * `'status-badge'`模式 */ PropTypes.exact({ /** * 适用于`'status-badge'`模式,状态徽标状态,可选项有`'success'`、`'processing'`、`'default'`、`'error'`、`'warning'` */ status: PropTypes.oneOf([ 'success', 'processing', 'default', 'error', 'warning', ]), /** * 适用于`'status-badge'`模式,状态徽标标签内容 */ text: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), }), /** * `'image'`模式 */ PropTypes.exact({ /** * 适用于`'image'`模式,图片资源地址 */ src: PropTypes.string, /** * 适用于`'image'`模式,图片高度 */ height: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), /** * 适用于`'image'`模式,图片是否可交互预览 * 默认值:`true` */ preview: PropTypes.bool, }), /** * `'corner-mark'`模式 */ PropTypes.exact({ /** * 适用于`'corner-mark'`模式,角标显示方位,可选项有`'top-left'`、`'top-right'`、`'bottom-left'`、`'bottom-right'` */ placement: PropTypes.oneOf([ 'top-left', 'top-right', 'bottom-left', 'bottom-right', ]), /** * 适用于`'corner-mark'`模式,角标颜色 * 默认值:`'#1890ff'` */ color: PropTypes.string, /** * 适用于`'corner-mark'`模式,单元格数值内容 */ content: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 适用于`'corner-mark'`模式,角标水平方向像素偏移量 */ offsetX: PropTypes.number, /** * 适用于`'corner-mark'`模式,角标竖直方向像素偏移量 */ offsetY: PropTypes.number, /** * 适用于`'corner-mark'`模式,是否隐藏当前角标 * 默认值:`false` */ hide: PropTypes.bool, }), /** * `'checkbox'`模式 */ PropTypes.exact({ /** * 适用于`'checkbox'`模式,当前勾选框状态 */ checked: PropTypes.bool, /** * 适用于`'checkbox'`模式,是否禁用当前勾选框 */ disabled: PropTypes.bool, /** * 适用于`'checkbox'`模式,当前勾选框标签内容 */ label: PropTypes.string, /** * 适用于`'checkbox'`模式,额外补充信息 */ custom: PropTypes.any, }), /** * `'switch'`模式 */ PropTypes.exact({ /** * 适用于`'switch'`模式,当前开关状态 */ checked: PropTypes.bool, /** * 适用于`'switch'`模式,是否禁用当前开关 */ disabled: PropTypes.bool, /** * 适用于`'switch'`模式,“开”状态标签内容 */ checkedChildren: PropTypes.string, /** * 适用于`'switch'`模式,“关”状态标签内容 */ unCheckedChildren: PropTypes.string, /** * 适用于`'switch'`模式,额外补充信息 */ custom: PropTypes.any, }), /** * `'row-merge'`模式 */ PropTypes.exact({ /** * 适用于`'row-merge'`模式,单元格数值内容 */ content: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 适用于`'row-merge'`模式,从当前单元格开始,向后合并的其他单元格数量 */ rowSpan: PropTypes.number, }), /** * `'dropdown'`模式 */ PropTypes.arrayOf( PropTypes.exact({ /** * 适用于`'dropdown'`模式,当前下拉菜单项锚点内容 */ title: PropTypes.string, /** * 适用于`'dropdown'`模式,是否禁用当前下拉菜单项 */ disabled: PropTypes.bool, /** * 适用于`'dropdown'`模式,当前按钮前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名 */ icon: PropTypes.string, /** * 适用于`'dropdown'`模式,当前按钮前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf([ 'AntdIcon', 'fontawesome', ]), /** * 适用于`'dropdown'`模式,额外补充信息 */ custom: PropTypes.any, /** * 适用于`'dropdown'`模式,当前项是否渲染为分割线 * 默认值:`false` */ isDivider: PropTypes.bool, }) ), /** * `'dropdown-links'`模式 */ PropTypes.arrayOf( PropTypes.exact({ /** * 适用于`'dropdown-links'`模式,当前下拉菜单项锚点内容 */ title: PropTypes.string, /** * 适用于`'dropdown-links'`模式,当前下拉菜单项链接地址 */ href: PropTypes.string, /** * 适用于`'dropdown-links'`模式,是否禁用当前下拉菜单项 */ disabled: PropTypes.bool, /** * 适用于`'dropdown-links'`模式,当前按钮前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名 */ icon: PropTypes.string, /** * 适用于`'dropdown-links'`模式,当前按钮前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf([ 'AntdIcon', 'fontawesome', ]), /** * 适用于`'dropdown-links'`模式,当前项是否渲染为分割线 * 默认值:`false` */ isDivider: PropTypes.bool, }) ), /** * `'image-avatar'`模式 */ PropTypes.exact({ /** * 适用于`'image-avatar'`模式,头像图片资源链接 */ src: PropTypes.string, /** * 适用于`'image-avatar'`模式,头像尺寸规格,传入数值型时表示像素大小,传入字符型时可使用内置尺寸规格,可选项有`'small'`、`'default'`、`'large'`,支持响应式 * 默认值:`'default'` */ size: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['large', 'small', 'default']), PropTypes.exact({ xs: PropTypes.number, sm: PropTypes.number, md: PropTypes.number, lg: PropTypes.number, xl: PropTypes.number, xxl: PropTypes.number, }), ]), /** * 适用于`'image-avatar'`模式,头像形状,可选项有`'circle'`、`'square'` * 默认值:`'circle'` */ shape: PropTypes.oneOf(['circle', 'square']), }), /** * `'select'`模式 */ PropTypes.exact({ /** * 适用于`'select'`模式,下拉选择css类名 */ className: PropTypes.string, /** * 适用于`'select'`模式,下拉选择css样式,其中`width`默认为`'100%'` */ style: PropTypes.object, /** * 适用于`'select'`模式,定义下拉选择选项 */ options: PropTypes.arrayOf( PropTypes.exact({ /** * 当前选项标题 */ label: PropTypes.string, /** * 当前选项值 */ value: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), }) ), /** * 适用于`'select'`模式,下拉选择菜单像素高度 * 默认值:`256` */ listHeight: PropTypes.number, /** * 适用于`'select'`模式,选择模式,可选项有`'multiple'`、`'tags'`,默认为单选模式 */ mode: PropTypes.oneOf(['multiple', 'tags']), /** * 适用于`'select'`模式,是否禁用当前下拉选择 */ disabled: PropTypes.bool, /** * 适用于`'select'`模式,下拉选择尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 适用于`'select'`模式,是否渲染边框 * 默认值:`true` */ bordered: PropTypes.bool, /** * 适用于`'select'`模式,选择框占位内容 */ placeholder: PropTypes.string, /** * 适用于`'select'`模式,下拉菜单展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` * 默认值:`'bottomLeft'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomRight', 'topLeft', 'topRight', ]), /** * 适用于`'select'`模式,下拉选择已选中值 */ value: PropTypes.oneOfType([ PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), PropTypes.arrayOf( PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]) ), ]), /** * 适用于`'select'`模式,最多显示的已选中选项数量,超出部分将会自动省略 * 默认值:`5` */ maxTagCount: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['responsive']), ]), /** * 适用于`'select'`模式,选择框内搜索对应的目标字段,可选项有`'value'`、`'label'` * 默认值:`'value'` */ optionFilterProp: PropTypes.oneOf(['value', 'label']), /** * 适用于`'select'`模式,是否允许快捷清空已选项 * 默认值:`true` */ allowClear: PropTypes.bool, /** * 适用于`'select'`模式,是否开启输入框可搜索功能 */ showSearch: PropTypes.bool, }), /** * 兼容携带自定义数据的场景 */ PropTypes.object, ]) ) ), /** * 是否渲染框线 * 默认值:`false` */ bordered: PropTypes.bool, /** * 表格最大像素高度,当实际表格高度超出限制时,会自动渲染竖直滚动条 */ maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 表格最大宽度,当实际表格宽度超出限制时,会自动渲染水平滚动条 */ maxWidth: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, PropTypes.bool, ]), /** * 当分页、排序、筛选操作触发表格变化后,是否滚动到表格顶部 * 默认值:`true` */ scrollToFirstRowOnChange: PropTypes.bool, /** * 表格单元格尺寸规格,可选项有`'small'`、`'middle'`、`'large'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 行选择模式,可选项有`'checkbox'`(多选)、`'radio'`(单选),默认不开启行选择功能 */ rowSelectionType: PropTypes.oneOf(['checkbox', 'radio']), /** * 监听已选行对应`key`值 */ selectedRowKeys: PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ), /** * 监听已选行记录 */ selectedRows: PropTypes.array, /** * 行选择控件所在列宽度 * 默认值:`32` */ rowSelectionWidth: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), /** * 针对嵌套行,各行与其所嵌套的内部行之间的行选择行为是否互相独立 * 默认值:`true` */ rowSelectionCheckStrictly: PropTypes.bool, /** * 指定不可被选中的行对应`key`值 */ rowSelectionIgnoreRowKeys: PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ), /** * 当表格数据源`data`更新时,是否根据当前有效的`selectedRowKeys`参数对`selectedRows`中的数据进行同步更新 * 默认值:`false` */ selectedRowsSyncWithData: PropTypes.bool, /** * 配置粘性表头相关功能 * 默认值:`false` */ sticky: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 粘性表头附着目标元素对应的选择器规则字符串,设置后,粘性表头激活后将附着在目标元素下方 */ belowSelector: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), ]), /** * 粘性表头竖直方向上的像素偏移量 */ offsetHeader: PropTypes.number, /** * 粘性表头底部横向滚动条竖直方向上的像素偏移量 */ offsetScroll: PropTypes.number, }), ]), /** * 是否启用行鼠标移入/移出事件监听,开启后可能会影响到部分其他功能,请根据实际情况进行使用 * 默认值:`false` */ enableHoverListen: PropTypes.bool, /** * 当`enableHoverListen=True`时,监听最近一次鼠标移入的字段对应`dataIndex`信息 */ recentlyMouseEnterColumnDataIndex: PropTypes.string, /** * 当`enableHoverListen=True`时,监听最近一次鼠标移入的行对应`key`信息 */ recentlyMouseEnterRowKey: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), /** * 当`enableHoverListen=True`时,监听最近一次鼠标移入的行数据信息 */ recentlyMouseEnterRow: PropTypes.object, /** * 配置各字段标题额外气泡说明卡片信息相关参数 */ titlePopoverInfo: PropTypes.objectOf( PropTypes.exact({ /** * 气泡卡片标题,支持字符串或组件型 */ title: PropTypes.string, /** * 气泡卡片内容,支持字符串或组件型 */ content: PropTypes.string, /** * 气泡卡片弹出方位,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` * 默认值:`'bottom'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ]), /** * 气泡卡片展开层css样式 */ overlayStyle: PropTypes.object, }) ), /** * 针对开启了可编辑模式的字段,配置基于正则表达式的输入内容格式校验约束规则 */ columnsFormatConstraint: PropTypes.objectOf( PropTypes.exact({ /** * 正则表达式,用于校验输入内容是否符合格式要求 */ rule: PropTypes.string, /** * 用户输入内容校验失败时的提示说明信息 */ content: PropTypes.string, }) ), /** * 配置表格字段排序相关功能 */ sortOptions: PropTypes.exact({ /** * 参与排序的若干字段`dataIndex`数组,多字段组合排序时,数组顺序即为组合排序优先级顺序,由高到低 */ sortDataIndexes: PropTypes.arrayOf(PropTypes.string), /** * 是否启用多字段组合排序,当设置为`'auto'`时表示自动组合排序,此时组合排序的字段优先级顺序与用户依次点击排序字段的顺序对应 * 默认值:`false`` */ multiple: PropTypes.oneOfType([ PropTypes.bool, PropTypes.oneOf(['auto']), ]), /** * 为各字段指定排序比较模式,可选项有`'number'`(强制数值型排序)、`'custom'`(自定义排序) */ forceCompareModes: PropTypes.objectOf( PropTypes.oneOf(['number', 'custom']) ), /** * 当`forceCompareModes`为`'custom'`时,用于为相应字段设置自定义排序对应的元素顺序 */ customOrders: PropTypes.objectOf(PropTypes.array), }), /** * 针对可排序字段是否在鼠标移入表头后展示额外信息提示 * 默认值:`true` */ showSorterTooltip: PropTypes.bool, /** * 控制可排序字段表头额外信息提示的鼠标移入触发目标,可选项有`'full-header'`、`'sorter-icon'` * 默认值:`'full-header'` */ showSorterTooltipTarget: PropTypes.oneOf(['full-header', 'sorter-icon']), /** * 配置表格字段筛选相关功能 */ filterOptions: PropTypes.objectOf( PropTypes.exact({ /** * 筛选模式,可选项有`'checkbox'`、`'keyword'`、`'tree'`,其中`'tree'`模式需要依赖相应的`'filterCustomTreeItems'`参数进行自定义树形菜单结构的构造 * 默认值:`'checkbox'` */ filterMode: PropTypes.oneOf(['checkbox', 'keyword', 'tree']), /** * `filterMode`为`'checkbox'`时,用于自定义筛选菜单项 */ filterCustomItems: PropTypes.oneOfType([ PropTypes.arrayOf([PropTypes.string, PropTypes.number]), PropTypes.any, ]), /** * `filterMode`为`'tree'`时,用于构造自定义树形菜单结构 */ filterCustomTreeItems: PropTypes.arrayOf(PropTypes.object), /** * `filterMode`为`'checkbox'`时,是否开启多选模式 * 默认值:`true` */ filterMultiple: PropTypes.bool, /** * `filterMode`为`'checkbox'`时,是否开启搜索框 * 默认值:`false` */ filterSearch: PropTypes.bool, }) ), /** * 字段筛选相关字段默认选中的筛选值 */ defaultFilteredValues: PropTypes.objectOf(PropTypes.array), /** * 配置表格翻页相关功能,设置为`false`时将关闭分页相关功能 */ pagination: PropTypes.oneOfType([ PropTypes.exact({ /** * 分页组件渲染方位,可选项有`'topLeft'`、`'topCenter'`、`'topRight'`、`'bottomLeft'`、`'bottomCenter'`、`'bottomRight'` * 默认值:`'bottomRight'` */ position: PropTypes.oneOf([ 'topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight', ]), /** * 监听或设置每页允许显示的最大行记录数量 */ pageSize: PropTypes.number, /** * 监听或设置当前页码 */ current: PropTypes.number, /** * 是否显示`pageSize`切换控件,当表格总记录数量大于50时默认为`true` */ showSizeChanger: PropTypes.bool, /** * `pageSize`切换控件的可选项 */ pageSizeOptions: PropTypes.arrayOf(PropTypes.number), /** * 各页码在鼠标移入时,是否显示浏览器原生提示信息 * 默认值:`true` */ showTitle: PropTypes.bool, /** * 是否渲染快捷跳页控件 * 默认值:`false` */ showQuickJumper: PropTypes.bool, /** * 总记录描述文案前缀文字 */ showTotalPrefix: PropTypes.string, /** * 总记录描述文案后缀文字 */ showTotalSuffix: PropTypes.string, /** * 是否在数据行数量不足一页时,自动隐藏分页相关控件 * 默认值:`false` */ hideOnSinglePage: PropTypes.bool, /** * 是否开启简洁模式 * 默认值:`false` */ simple: PropTypes.bool, /** * 是否禁用分页相关控件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 分页控件尺寸规格,可选项有`'small'`、`'default'` * 默认值:`'default'` */ size: PropTypes.oneOf(['default', 'small']), /** * 手动设置总记录数量,通常配合[服务端数据加载模式](/AntdTable-server-side-mode)使用 */ total: PropTypes.number, /** * 是否优先展示较少的跳页项 * 默认值:`false` */ showLessItems: PropTypes.bool, }), PropTypes.bool, ]), /** * 监听经过编辑修改操作后,最新状态下的表格数据源 */ currentData: PropTypes.array, /** * 监听最近一次编辑修改操作,对应的被修改行记录数据 */ recentlyChangedRow: PropTypes.object, /** * 监听最近一次编辑修改操作,对应的被修改字段`dataIndex`信息 */ recentlyChangedColumn: PropTypes.string, /** * 监听排序操作相关行为参数 */ sorter: PropTypes.exact({ /** * 监听排序涉及的字段`dataIndex`信息 */ columns: PropTypes.arrayOf(PropTypes.string), /** * 监听排序涉及的字段对应排序方式,其中`'ascend'`表示升序,`'descend'`表示降序 */ orders: PropTypes.arrayOf(PropTypes.oneOf(['ascend', 'descend'])), }), /** * 监听筛选操作相关行为参数 */ filter: PropTypes.object, /** * 表格数据加载控制方式,可选项有`'client-side'`(客户端加载)、`'server-side'`(服务端),其中服务端模式适用于大量数据展示需求,具体请参考[服务端数据加载模式](/AntdTable-server-side-mode) * 默认值:`'client-side'` */ mode: PropTypes.oneOf(['client-side', 'server-side']), /** * 配置总结栏内容,按数组顺序渲染 */ summaryRowContents: PropTypes.arrayOf( PropTypes.shape({ /** * 组件型,当前总结栏单元格内容 */ content: PropTypes.node, /** * 当前总结栏单元格横跨占据的字段数量 * 默认值:`1` */ colSpan: PropTypes.number, /** * 当前总结栏列对齐方式,可选项有`'left'`、`'center'`、`'right'` */ align: PropTypes.oneOf(['left', 'center', 'right']), }) ), /** * 总结栏每行用于占位的列数,适用于同时使用行选择等功能的场景 * 默认值:`0` */ summaryRowBlankColumns: PropTypes.number, /** * 总结栏是否启用固定布局功能,也可设置为`'top'`、`'bottom'`控制总结栏固定在顶部或底部 * 默认值:`false` */ summaryRowFixed: PropTypes.oneOfType([ PropTypes.bool, PropTypes.oneOf(['top', 'bottom']), ]), /** * 配置各字段条件格式化渲染对应的`javascript`函数字符串 */ conditionalStyleFuncs: PropTypes.objectOf(PropTypes.string), /** * 配置各数据行的行展开内容,键为数据行`key`值,值为对应行的展开内容 */ expandedRowKeyToContent: PropTypes.arrayOf( PropTypes.exact({ key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) .isRequired, content: PropTypes.node, }) ), /** * 行展开控件所在列宽度 */ expandedRowWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 是否允许通过直接点击行的方式展开对应行 * 默认值:`false` */ expandRowByClick: PropTypes.bool, /** * 初始化处于展开状态的行对应`key`值 */ defaultExpandedRowKeys: PropTypes.arrayOf(PropTypes.string), /** * 监听或设置处于展开状态的行对应`key`值 */ expandedRowKeys: PropTypes.arrayOf(PropTypes.string), /** * 是否启用单元格单击、双击、右键相关事件的监听,开启后可能会影响到部分其他功能,请根据实际情况进行使用 * 默认值:`false` */ enableCellClickListenColumns: PropTypes.arrayOf(PropTypes.string), /** * 当`enableCellClickListenColumns=True`时,监听最近一次单元格单击事件对应的字段`dataIndex` */ recentlyCellClickColumn: PropTypes.string, /** * 当`enableCellClickListenColumns=True`时,监听最近一次单元格单击事件对应的行记录信息 */ recentlyCellClickRecord: PropTypes.object, /** * 当`enableCellClickListenColumns=True`时,监听表格单元格单击事件累计发生次数 * 默认值:`0` */ nClicksCell: PropTypes.number, /** * 当`enableCellClickListenColumns=True`时,监听最近一次表格单元格单击事件详细参数 */ cellClickEvent: PropTypes.exact({ /** * 以页面整体左上角为原点,记录x坐标 */ pageX: PropTypes.number, /** * 以页面整体左上角为原点,记录y坐标 */ pageY: PropTypes.number, /** * 以浏览器窗口左上角为原点,记录x坐标 */ clientX: PropTypes.number, /** * 以浏览器窗口左上角为原点,记录y坐标 */ clientY: PropTypes.number, /** * 以屏幕左上角为原点,记录x坐标 */ screenX: PropTypes.number, /** * 以屏幕左上角为原点,记录y坐标 */ screenY: PropTypes.number, /** * 事件对应的时间戳 */ timestamp: PropTypes.number, }), /** * 当`enableCellClickListenColumns=True`时,监听最近一次单元格双击事件对应的字段`dataIndex` */ recentlyCellDoubleClickColumn: PropTypes.string, /** * 当`enableCellClickListenColumns=True`时,监听最近一次单元格双击事件对应的行记录信息 */ recentlyCellDoubleClickRecord: PropTypes.object, /** * 当`enableCellClickListenColumns=True`时,监听表格单元格双击事件累计发生次数 * 默认值:`0` */ nDoubleClicksCell: PropTypes.number, /** * 当`enableCellClickListenColumns=True`时,监听最近一次表格单元格双击事件详细参数 */ cellDoubleClickEvent: PropTypes.exact({ /** * 以页面整体左上角为原点,记录x坐标 */ pageX: PropTypes.number, /** * 以页面整体左上角为原点,记录y坐标 */ pageY: PropTypes.number, /** * 以浏览器窗口左上角为原点,记录x坐标 */ clientX: PropTypes.number, /** * 以浏览器窗口左上角为原点,记录y坐标 */ clientY: PropTypes.number, /** * 以屏幕左上角为原点,记录x坐标 */ screenX: PropTypes.number, /** * 以屏幕左上角为原点,记录y坐标 */ screenY: PropTypes.number, /** * 事件对应的时间戳 */ timestamp: PropTypes.number, }), /** * 当`enableCellClickListenColumns=True`时,监听最近一次单元格右键事件对应的字段`dataIndex` */ recentlyContextMenuClickColumn: PropTypes.string, /** * 当`enableCellClickListenColumns=True`时,监听最近一次单元格右键事件对应的行记录信息 */ recentlyContextMenuClickRecord: PropTypes.object, /** * 当`enableCellClickListenColumns=True`时,监听表格单元格右键事件累计发生次数 * 默认值:`0` */ nContextMenuClicksCell: PropTypes.number, /** * 当`enableCellClickListenColumns=True`时,监听最近一次表格单元格右键事件详细参数 */ cellContextMenuClickEvent: PropTypes.exact({ /** * 以页面整体左上角为原点,记录x坐标 */ pageX: PropTypes.number, /** * 以页面整体左上角为原点,记录y坐标 */ pageY: PropTypes.number, /** * 以浏览器窗口左上角为原点,记录x坐标 */ clientX: PropTypes.number, /** * 以浏览器窗口左上角为原点,记录y坐标 */ clientY: PropTypes.number, /** * 以屏幕左上角为原点,记录x坐标 */ screenX: PropTypes.number, /** * 以屏幕左上角为原点,记录y坐标 */ screenY: PropTypes.number, /** * 事件对应的时间戳 */ timestamp: PropTypes.number, }), /** * 组件型,自定义空数据状态下,表格内的显示内容 */ emptyContent: PropTypes.node, /** * 是否严格启用单元格内容渲染优化,开启后,会基于单元格数据对单元格内容进行渲染优化,减少渲染次数 * 默认值:`false` */ cellUpdateOptimize: PropTypes.bool, /** * 针对再渲染模式中的各迷你图模式,统一设置相关单元格像素高度 * 默认值:`30` */ miniChartHeight: PropTypes.number, /** * 针对再渲染模式中的各迷你图模式,是否启用出场动画 * 默认值:`false` */ miniChartAnimation: PropTypes.bool, /** * 针对再渲染模式中的`'button'`模式,监听最近一次按钮点击对应的行记录信息 */ recentlyButtonClickedRow: PropTypes.object, /** * 针对再渲染模式中的`'button'`模式,监听表格中按钮点击累计次数 * 默认值:`0` */ nClicksButton: PropTypes.number, /** * 针对再渲染模式中的`'button'`模式,监听最近一次按钮点击对应的按钮文字内容 */ clickedContent: PropTypes.string, /** * 针对再渲染模式中的`'button'`模式,监听最近一次按钮点击对应的按钮数据项对应`'custom'`字段内容 */ clickedCustom: PropTypes.any, /** * 针对再渲染模式中的`'button'`模式,监听最近一次按钮点击对应的字段`dataIndex` */ recentlyButtonClickedDataIndex: PropTypes.string, /** * 针对再渲染模式中的`'custom-format'`模式,键为对应字段`dataIndex`信息,值为对应的预处理`javascript`函数字符串 */ customFormatFuncs: PropTypes.objectOf(PropTypes.string), /** * 针对再渲染模式中的`'checkbox'`模式,监听最近发生勾选事件的记录行 */ recentlyCheckedRow: PropTypes.object, /** * 针对再渲染模式中的`'checkbox'`模式,监听最近发生勾选事件的勾选框标签内容 */ recentlyCheckedLabel: PropTypes.string, /** * 针对再渲染模式中的`'checkbox'`模式,监听最近发生勾选事件的字段`dataIndex`信息 */ recentlyCheckedDataIndex: PropTypes.string, /** * 针对再渲染模式中的`'checkbox'`模式,监听最近发生勾选事件对应的勾选状态 */ recentlyCheckedStatus: PropTypes.bool, /** * 针对再渲染模式中的`'switch'`模式,监听最近发生开关切换事件的记录行 */ recentlySwitchRow: PropTypes.object, /** * 针对再渲染模式中的`'switch'`模式,监听最近发生开关切换事件对应的开关状态 */ recentlySwitchDataIndex: PropTypes.string, /** * 针对再渲染模式中的`'switch'`模式,监听最近发生开关切换事件对应的开关状态 */ recentlySwitchStatus: PropTypes.bool, /** * 针对再渲染模式中的`'dropdown'`模式,监听表格中各下拉菜单项累计点击次数 */ nClicksDropdownItem: PropTypes.number, /** * 针对再渲染模式中的`'dropdown'`模式,监听最近一次被点击的下拉菜单项`title`值 */ recentlyClickedDropdownItemTitle: PropTypes.string, /** * 针对再渲染模式中的`'dropdown'`模式,监听最近一次被点击的下拉菜单项对应的字段dataIndex */ recentlyDropdownItemClickedDataIndex: PropTypes.string, /** * 针对再渲染模式中的`'dropdown'`模式,监听最近一次被点击的下拉菜单项对应的行记录 */ recentlyDropdownItemClickedRow: PropTypes.object, /** * 针对再渲染模式中的`'select'`模式,监听最近发生下拉选项值更新的记录行 */ recentlySelectRow: PropTypes.object, /** * 针对再渲染模式中的`'select'`模式,监听最近发生下拉选项值更新对应的字段`dataIndex` */ recentlySelectDataIndex: PropTypes.string, /** * 针对再渲染模式中的`'select'`模式,监听最近发生下拉选项值更新对应的选项值 */ recentlySelectValue: PropTypes.oneOfType([ PropTypes.oneOfType([PropTypes.number, PropTypes.string]), PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.number, PropTypes.string]) ), ]), /** * 需要进行隐藏的行记录`key`值数组 * 默认值:`[]` */ hiddenRowKeys: PropTypes.arrayOf(PropTypes.string), /** * 是否在表格底层进行重绘时,通过深度比较数据源`data`变化情况,来进行表格重绘优化,适用于中小数据量表格 * 默认值:`false` */ dataDeepCompare: PropTypes.bool, /** * 是否开启虚拟滚动模式 * 默认值:`false` */ virtual: PropTypes.bool, /** * 组件型,表格整体标题内容 */ title: PropTypes.node, /** * 组件型,表格整体页脚内容 */ footer: PropTypes.node, /** * 是否启用表格自带加载中状态 * 默认值:`false` */ loading: PropTypes.bool, /** * 表格行css类名,支持通过`func`字段定义`javascript`函数动态计算 */ rowClassName: PropTypes.oneOfType([ PropTypes.string, PropTypes.shape({ /** * 字符串形式的`javascript`函数 */ func: PropTypes.string, }), ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdTable; export const propTypes = AntdTable.propTypes; export const defaultProps = AntdTable.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdTabs.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTabs = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdTabs.react' ) ); /** * 标签页组件AntdTabs */ const AntdTabs = ({ id, className, style, key, items, disabledTabKeys = [], tabBarLeftExtraContent, tabBarRightExtraContent, defaultActiveKey, activeKey, size = 'default', tabPosition = 'top', type = 'line', centered = false, indicator, tabBarGutter, tabBarStyle, inkBarAnimated = true, tabPaneAnimated = false, destroyInactiveTabPane = false, tabCloseCounts = 0, placeholder, setProps, persistence, persisted_props, persistence_type, ...others }) => { return ( ); }; AntdTabs.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 标签页类型,可选项有`'line'`、`'card'`、`'editable-card'` * 默认值:`'line'` */ type: PropTypes.oneOf(['line', 'card', 'editable-card']), /** * 定义标签项 */ items: PropTypes.arrayOf( PropTypes.exact({ /** * 组件型,标签页标题 */ label: PropTypes.node, /** * 标签页唯一识别id */ key: PropTypes.string, /** * 组件型,标签页内部元素 */ children: PropTypes.node, /** * 组件型,标签页图标元素 */ icon: PropTypes.node, /** * `'editable-card'`型标签页可用,用于自定义关闭按钮,设置为`None`或`false`时会隐藏默认的关闭按钮 */ closeIcon: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), /** * 是否在当前标签页隐藏时,自动销毁当前标签页内部元素 * 默认值:`false` */ destroyInactiveTabPane: PropTypes.bool, /** * 是否禁用当前标签页 * 默认值:`false` */ disabled: PropTypes.bool, /** * 初始化是否强制渲染当前标签页内部元素 * 默认值:`false` */ forceRender: PropTypes.bool, /** * `'editable-card'`型标签页可用,控制当前标签页是否可被关闭 * 默认值:`true` */ closable: PropTypes.bool, /** * 为当前标签页标题配置右键菜单相关参数 */ contextMenu: PropTypes.arrayOf( PropTypes.exact({ /** * 当前右键菜单项唯一标识id */ key: PropTypes.string, /** * 当前右键菜单项标题 */ label: PropTypes.string, /** * 当前右键菜单项前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名 */ icon: PropTypes.string, /** * 当前右键菜单项前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), }) ), }) ), /** * 监听当前各标签页`key`值,顺序与`items`一致 */ itemKeys: PropTypes.arrayOf(PropTypes.string), /** * 监听或设置当前激活的标签页对应`key`值 */ activeKey: PropTypes.string, /** * 初始化激活的标签页对应`key`值 */ defaultActiveKey: PropTypes.string, /** * 呈现禁用状态的标签页`key`值数组,优先级高于`items`中各标签页的`disabled`设定 */ disabledTabKeys: PropTypes.arrayOf(PropTypes.string), /** * 标签页切换控件显示方位,可选项有`'top'`、`'left'`、`'right'`、`'bottom'` * 默认值:`'top'` */ tabPosition: PropTypes.oneOf(['top', 'left', 'right', 'bottom']), /** * 当前组件尺寸规格,可选项有`'small'`、`'default'`、`'large'` * 默认值:'default' */ size: PropTypes.oneOf(['small', 'default', 'large']), /** * 是否居中显示标签页切换控件 * 默认值:`false` */ centered: PropTypes.bool, /** * 配置指示条长度及对齐方式 */ indicator: PropTypes.exact({ /** * 指示条像素宽度,当传入负数时,表示在完整宽度基础上应减去的像素宽度,默认与标签卡片同宽 */ size: PropTypes.number, /** * 指示条对齐方式,可选项有`'start'`、`'center'`、`'end'` */ align: PropTypes.oneOf(['start', 'center', 'end']), }), /** * 标签卡片之间的像素间距 */ tabBarGutter: PropTypes.number, /** * 标签卡片css样式 */ tabBarStyle: PropTypes.object, /** * 标签卡片切换是否添加动画效果 * 默认值:`true` */ inkBarAnimated: PropTypes.bool, /** * 标签内容切换是否添加动画效果 * 默认值:`false` */ tabPaneAnimated: PropTypes.bool, /** * 监听最近一次删除操作对应的标签页`key`值 */ latestDeletePane: PropTypes.string, /** * 标签页关闭按钮累计点击次数 * 默认值:`0` */ tabCloseCounts: PropTypes.number, /** * 组件型,第一方位额外元素 */ tabBarLeftExtraContent: PropTypes.node, /** * 组件型,第二方位额外元素 */ tabBarRightExtraContent: PropTypes.node, /** * 监听标签页数量 */ tabCount: PropTypes.number, /** * 统一设置是否自动销毁取消激活状态的标签页内部元素 */ destroyInactiveTabPane: PropTypes.bool, /** * 监听标签页标题右键菜单项相关点击事件 */ clickedContextMenu: PropTypes.exact({ /** * 被点击的右键菜单项对应标签页`key`值 */ tabKey: PropTypes.string, /** * 被点击的右键菜单项对应`key`值 */ menuKey: PropTypes.string, /** * 事件对应时间戳信息 */ timestamp: PropTypes.number, }), /** * 当`items`为空或长度为`0`时,替代进行占位显示的内容 */ placeholder: PropTypes.node, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'activeKey'` * 默认值:`['activeKey']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['activeKey'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdTabs.dashPersistence = { persisted_props: ['activeKey'], persistence_type: 'local', }; export default AntdTabs; export const propTypes = AntdTabs.propTypes; export const defaultProps = AntdTabs.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdTag.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTag = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdTag.react' ) ); /** * 标签组件AntdTag */ const AntdTag = ({ id, className, style, key, content, icon, color, href, target = '_blank', bordered = true, closeIcon = false, closeCounts = 0, setProps, ...others }) => { return ( ); }; AntdTag.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件型,标签内容 */ content: PropTypes.node, /** * 组件型,标签前缀图标 */ icon: PropTypes.node, /** * 标签颜色,可使用内置的若干种颜色主题,也可使用任何合法的css颜色值 */ color: PropTypes.string, /** * 标签点击跳转链接地址 */ href: PropTypes.string, /** * 标签链接跳转行为 */ target: PropTypes.string, /** * 是否渲染边框 * 默认值:`true` */ bordered: PropTypes.bool, /** * 是否渲染关闭按钮 * 默认值:`false` */ closeIcon: PropTypes.bool, /** * `closeIcon=True`时,监听关闭按钮累计点击次数 * 默认值:`0` */ closeCounts: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdTag; export const propTypes = AntdTag.propTypes; export const defaultProps = AntdTag.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdTimeline.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTimeline = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdTimeline.react' ) ); /** * 时间轴组件AntdTimeline */ const AntdTimeline = ({ id, className, style, key, items, mode = 'left', pending, pendingDot, reverse = false, setProps, ...others }) => { return ( ); }; AntdTimeline.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 必填,定义时间轴节点 */ items: PropTypes.arrayOf( PropTypes.exact({ /** * 组件型,当前节点正文内容 */ content: PropTypes.node, /** * 当前节点颜色,可用于表达节点状态,常用方案有`'blue'`(进行中或默认状态)、`'green'`(已完成状态)、`'red'`(警告或错误状态)、`'grey'`(未完成或失效状态) */ color: PropTypes.string, /** * 组件型,自定义作为图标的元素 */ icon: PropTypes.node, /** * 组件型,当前节点标签内容 */ label: PropTypes.node, // 设置节点位置,可选的有'left'和'right' /** * 当前节点位置,可选项有`'left'`、`'right'` */ position: PropTypes.oneOf(['left', 'right']), }) ).isRequired, /** * 时间轴与内容的相对位置,可选项有`'left'`、`'alternate'`、`'right'` */ mode: PropTypes.oneOf(['left', 'alternate', 'right']), /** * 组件型,设置时间轴末尾额外幽灵节点标题内容,默认不添加 */ pending: PropTypes.node, /** * 组件型,自定义幽灵节点图标 */ pendingDot: PropTypes.node, /** * 是否逆序排列时间轴 * 默认值:`false` */ reverse: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdTimeline; export const propTypes = AntdTimeline.propTypes; export const defaultProps = AntdTimeline.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdTooltip.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTooltip = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdTooltip.react' ) ); /** * 文字提示组件AntdTooltip */ const AntdTooltip = ({ id, children, className, style, styles, classNames, key, title, placement = 'top', color, mouseEnterDelay = 0.1, mouseLeaveDelay = 0.1, trigger = 'hover', zIndex, arrow = 'show', fresh = false, open = false, permanent = false, popupContainer = 'body', setProps, ...others }) => { return ( ); }; AntdTooltip.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,文字提示挂载目标 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 根元素(包含箭头、内容元素)css样式 */ root: PropTypes.object, /** * 内容元素css样式 */ body: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 根元素(包含箭头、内容元素)css类名 */ root: PropTypes.string, /** * 内容元素css类名 */ body: PropTypes.string, }), /** * 组件型,文字提示内容 */ title: PropTypes.node, /** * 文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` * 默认值:`'top'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ]), /** * 背景颜色 */ color: PropTypes.string, /** * 鼠标移入到文字提示弹出延时,单位:秒 * 默认值:`0.1` */ mouseEnterDelay: PropTypes.number, /** * 鼠标移出到文字提示消失延时,单位:秒 * 默认值:`0.1` */ mouseLeaveDelay: PropTypes.number, /** * 触发方式,可选项有`'hover'`、`'focus'`、`'click'`,可多选 * 默认值:`'hover'` */ trigger: PropTypes.oneOfType([ PropTypes.oneOf(['hover', 'focus', 'click']), PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click'])), ]), /** * 文字提示卡片z-index */ zIndex: PropTypes.number, /** * 文字提示卡片附带箭头显示形式,可选项有`'show'`、`'hide'`、`'center'` * 默认值:`'show'` */ arrow: PropTypes.oneOf(['show', 'hide', 'center']), /** * 是否始终保持更新内容 * 默认值:`false` */ fresh: PropTypes.bool, /** * 监听或设置当前文字提示卡片的展开状态 * 默认值:`false` */ open: PropTypes.bool, /** * 是否保持文字提示卡片处于`open`对应状态不变 * 默认值:`false` */ permanent: PropTypes.bool, /** * 文字提示卡片展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdTooltip; export const propTypes = AntdTooltip.propTypes; export const defaultProps = AntdTooltip.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/AntdTree.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTree = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataDisplay/AntdTree.react' ) ); /** * 树形控件组件AntdTree */ const AntdTree = ({ id, className, setProps, style, key, treeData, treeNodeKeyToTitle, treeDataMode = 'tree', checkable = false, selectable = true, selectedKeys, expandedKeys, checkedKeys, defaultExpandAll = false, defaultExpandedKeys, defaultExpandParent = false, checkStrictly = false, defaultCheckedKeys, defaultSelectedKeys, multiple = false, showLine = { showLeafIcon: false }, switcherIcon, showIcon = false, height, draggable = false, showDragIcon = true, dragInSameLevel = false, dragDisabledKeys = [], dropDisabledKeys = [], enableNodeFavorites = false, favoritedKeys = [], scrollTarget, searchKeyword, caseSensitive = true, highlightStyle = { fontWeight: 'bold', backgroundColor: 'transparent', padding: 0, color: '#ff5500', }, nodeCheckedSuffix, nodeUncheckedSuffix, nodeCheckedStyle, nodeUncheckedStyle, enableAsyncLoad = false, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; // 定义递归PropTypes const PropTreeNodeShape = { /** * 当前节点标题 */ title: PropTypes.string.isRequired, /** * 当前节点唯一识别id */ key: PropTypes.string.isRequired, /** * 是否禁用当前节点 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当前节点前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名 */ icon: PropTypes.string, /** * 当前节点前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), /** * 当树组件整体的`checkable=True`时,单独控制当前节点是否渲染勾选框 */ checkable: PropTypes.bool, /** * 当树组件整体的`checkable=True`时,控制是否禁用当前节点的勾选框 */ disableCheckbox: PropTypes.bool, /** * 当前节点是否可点击选择 */ selectable: PropTypes.bool, /** * 当树组件整体的`enableNodeFavorites=True`时,控制是否可对当前节点进行收藏 */ enableFavorites: PropTypes.bool, /** * 当前节点css样式 */ style: PropTypes.object, /** * 当前节点css类名 */ className: PropTypes.string, /** * 配置当前节点文字提示相关参数 */ tooltipProps: PropTypes.exact({ /** * 当前节点文字提示内容 */ title: PropTypes.string, /** * 当前节点文字提示展开方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'` * 默认值:`'top'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ]), }), /** * 配置当前节点右键菜单相关参数 */ contextMenu: PropTypes.arrayOf( PropTypes.exact({ /** * 当前右键菜单项唯一识别id */ key: PropTypes.string, /** * 当前右键菜单项标题内容 */ label: PropTypes.string, /** * 当前节点前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名 */ icon: PropTypes.string, /** * 当前节点前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), }) ), /** * 当前节点是否为叶节点 */ isLeaf: PropTypes.bool, }; const PropTreeNode = PropTypes.shape(PropTreeNodeShape); PropTreeNodeShape.children = PropTypes.arrayOf(PropTreeNode); const treeDataPropTypes = PropTypes.arrayOf(PropTreeNode); // 定义偏平结构节点类型 const PropFlatNodeShape = { /** * 当前节点标题 */ title: PropTypes.string.isRequired, /** * 当前节点唯一识别id */ key: PropTypes.string.isRequired, /** * 是否禁用当前节点 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当前节点前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名 */ icon: PropTypes.string, /** * 当前节点前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), /** * 当树组件整体的`checkable=True`时,单独控制当前节点是否渲染勾选框 */ checkable: PropTypes.bool, /** * 当树组件整体的`checkable=True`时,控制是否禁用当前节点的勾选框 */ disableCheckbox: PropTypes.bool, /** * 当前节点是否可点击选择 */ selectable: PropTypes.bool, /** * 当树组件整体的`enableNodeFavorites=True`时,控制是否可对当前节点进行收藏 */ enableFavorites: PropTypes.bool, /** * 当前节点对应的父节点`key`值 */ parent: PropTypes.string, /** * 当前节点css样式 */ style: PropTypes.object, /** * 当前节点css类名 */ className: PropTypes.string, /** * 配置当前节点文字提示相关参数 */ tooltipProps: PropTypes.exact({ /** * 当前节点文字提示内容 */ title: PropTypes.string, /** * 当前节点文字提示展开方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'` * 默认值:`'top'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ]), }), /** * 配置当前节点右键菜单相关参数 */ contextMenu: PropTypes.arrayOf( PropTypes.exact({ /** * 当前右键菜单项唯一识别id */ key: PropTypes.string, /** * 当前右键菜单项标题内容 */ label: PropTypes.string, /** * 当前节点前缀图标类型,`iconRenderer`为`'AntdIcon'`时同`AntdIcon`同名参数,`iconRenderer`为`'fontawesome'`时为css类名 */ icon: PropTypes.string, /** * 当前节点前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), }) ), }; AntdTree.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 对应`treeData`格式的渲染模式,可选项有`'tree'`(树形模式)、`'flat'`(扁平模式) * 默认值:`'tree'` */ treeDataMode: PropTypes.oneOf(['tree', 'flat']), /** * 定义构造树所需的数据结构,与`treeDataMode`一致 */ treeData: PropTypes.oneOfType([ /** * 树形模式对应结构 */ treeDataPropTypes, /** * 扁平模式对应结构 */ PropTypes.arrayOf(PropFlatNodeShape), ]), /** * 针对树结构中的指定节点,定义作为标题的组件型内容,优先级高于`treeData`中对应的`title`值 */ treeNodeKeyToTitle: PropTypes.objectOf(PropTypes.node), /** * 是否渲染节点额外图标 * 默认值:`false` */ showIcon: PropTypes.bool, /** * 节点是否可点击选择 * 默认值:`true` */ selectable: PropTypes.bool, /** * 节点是否允许多选 * 默认值:`false` */ multiple: PropTypes.bool, /** * 节点是否可勾选 * 默认值:`false` */ checkable: PropTypes.bool, /** * 初始化是否展开全部节点 * 默认值:`false` */ defaultExpandAll: PropTypes.bool, /** * 监听或设置已展开节点`key`值数组 */ expandedKeys: PropTypes.arrayOf(PropTypes.string), /** * 初始化已展开节点`key`值数组 */ defaultExpandedKeys: PropTypes.arrayOf(PropTypes.string), /** * 初始化是否展开处于展开状态节点的父节点 * 默认值:`true` */ defaultExpandParent: PropTypes.bool, /** * 监听或设置已选择节点`key`值数组 */ selectedKeys: PropTypes.arrayOf(PropTypes.string), /** * 初始化已选择节点`key`值数组 */ defaultSelectedKeys: PropTypes.arrayOf(PropTypes.string), /** * 监听或设置已勾选节点`key`值数组 */ checkedKeys: PropTypes.arrayOf(PropTypes.string), /** * 初始化已勾选节点`key`值数组 */ defaultCheckedKeys: PropTypes.arrayOf(PropTypes.string), /** * 监听或设置处于半勾选状态下的节点`key`值数组 */ halfCheckedKeys: PropTypes.arrayOf(PropTypes.string), /** * 节点与其后代节点之间的选择行为是否彼此独立 * 默认值:`false` */ checkStrictly: PropTypes.bool, /** * 是否显示连接线 */ showLine: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 叶节点是否渲染前缀图标 */ showLeafIcon: PropTypes.bool, }), ]), /** * 组件型,自定义树节点的展开/折叠图标 */ switcherIcon: PropTypes.node, /** * 虚拟滚动模式下的组件最大像素高度,未设置时则不启用虚拟滚动功能 */ height: PropTypes.number, /** * 节点是否可拖拽 * 默认值:`false` */ draggable: PropTypes.bool, /** * 开启节点拖拽功能后,是否为节点渲染拖拽图标 * 默认值:`true` */ showDragIcon: PropTypes.bool, /** * 当`draggable=True`时,是否仅允许同级拖拽 * 默认值:`false` */ dragInSameLevel: PropTypes.bool, /** * 禁止进行拖拽调整的节点`key`值数组 * 默认值:`[]` */ dragDisabledKeys: PropTypes.arrayOf(PropTypes.string), /** * 禁止进行拖拽放置的节点`key`值数组 * 默认值:`[]` */ dropDisabledKeys: PropTypes.arrayOf(PropTypes.string), /** * 监听最近一次被拖拽节点`key`值信息 */ draggedNodeKey: PropTypes.string, /** * 监听节点右键菜单项点击事件 */ clickedContextMenu: PropTypes.exact({ /** * 事件对应节点`key`值 */ nodeKey: PropTypes.string, /** * 事件对应右键菜单项`key`值 */ menuKey: PropTypes.string, /** * 事件对应时间戳信息 */ timestamp: PropTypes.number, }), /** * 是否启用节点收藏功能 * 默认值:`false` */ enableNodeFavorites: PropTypes.bool, /** * 监听或设置已收藏节点`key`值数组 */ favoritedKeys: PropTypes.arrayOf(PropTypes.string), /** * 执行滚动到指定节点的动作,每次执行完毕后会重置为空值 */ scrollTarget: PropTypes.exact({ /** * 滚动目标节点`key`值 */ key: PropTypes.string.isRequired, /** * 滚动目标节点对齐位置,可选项有`'top'`、`'bottom'`、`'auto'` * 默认值:`'auto'` */ align: PropTypes.oneOf(['top', 'bottom', 'auto']), /** * 滚动后的像素偏移量 */ offset: PropTypes.number, }), /** * 快捷树搜索功能对应的单个关键词,或由多个关键词构成的数组 */ searchKeyword: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), ]), /** * 针对`searchKeyword`,是否大小写敏感 * 默认值:`true` */ caseSensitive: PropTypes.bool, /** * 快捷树搜索关键词匹配部分的高亮样式 */ highlightStyle: PropTypes.object, /** * 组件型,节点勾选状态下的后缀元素 */ nodeCheckedSuffix: PropTypes.node, /** * 组件型,节点非勾选状态下的后缀元素 */ nodeUncheckedSuffix: PropTypes.node, /** * 节点勾选状态下的css样式 */ nodeCheckedStyle: PropTypes.object, /** * 节点非勾选状态下的css样式 */ nodeUncheckedStyle: PropTypes.object, /** * 是否开启子节点异步加载功能,开启后无`children`属性,且未设置`isLeaf`为`true`的节点将可展开并触发`loadingNode`事件更新 * 默认值:`false` */ enableAsyncLoad: PropTypes.bool, /** * 监听触发异步数据加载的节点展开事件信息 */ loadingNode: PropTypes.object, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'selectedKeys'`、`'checkedKeys'`、`'expandedKeys'`、`'halfCheckedKeys'` * 默认值:`['selectedKeys', 'checkedKeys', 'expandedKeys', 'halfCheckedKeys']` */ persisted_props: PropTypes.arrayOf( PropTypes.oneOf([ 'selectedKeys', 'checkedKeys', 'expandedKeys', 'halfCheckedKeys', ]) ), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdTree.dashPersistence = { persisted_props: [ 'selectedKeys', 'checkedKeys', 'expandedKeys', 'halfCheckedKeys', ], persistence_type: 'local', }; export default AntdTree; export const propTypes = AntdTree.propTypes; export const defaultProps = AntdTree.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/card/AntdCard.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCard = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../../fragments/dataDisplay/card/AntdCard.react' ) ); const AntdCard = ({ id, children, className, style, styles, classNames, key, actions, extraLink, extra, coverImg, variant = 'outlined', hoverable = false, size = 'default', title, nClicks = 0, setProps, ...others }) => { return ( ); }; AntdCard.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 设置卡片头部区域css样式 */ header: PropTypes.object, /** * 设置卡片标题css样式 */ title: PropTypes.object, /** * 设置卡片右上角的操作区域css样式 */ extra: PropTypes.object, /** * 设置标题封面css样式 */ cover: PropTypes.object, /** * 设置卡片内容区域css样式 */ body: PropTypes.object, /** * 设置卡片底部操作组css样式 */ actions: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 设置卡片头部区域css类名 */ header: PropTypes.string, /** * 设置卡片标题css类名 */ title: PropTypes.string, /** * 设置卡片右上角的操作区域css类名 */ extra: PropTypes.string, /** * 设置标题封面css类名 */ cover: PropTypes.string, /** * 设置卡片内容区域css类名 */ body: PropTypes.string, /** * 设置卡片底部操作组css类名 */ actions: PropTypes.string, }), /** * 组件型,底部操作区元素 */ actions: PropTypes.node, /** * 组件型,标题内容 */ title: PropTypes.node, /** * 配置卡片右上角额外链接相关参数 */ extraLink: PropTypes.exact({ /** * 链接文字内容 */ content: PropTypes.string, /** * 链接地址 */ href: PropTypes.string, /** * 链接跳转行为 */ target: PropTypes.string, /** * 链接css类名 */ className: PropTypes.string, /** * 链接css样式 */ style: PropTypes.object, }), /** * 组件型,卡片右上角额外元素,优先级高于`extraLink` */ extra: PropTypes.node, /** * 配置封面图片相关参数 */ coverImg: PropTypes.exact({ /** * 图片资源地址 */ src: PropTypes.string, /** * 图片alt信息 */ alt: PropTypes.string, /** * 图片css类名 */ className: PropTypes.string, /** * 图片css样式 */ style: PropTypes.object, }), /** * 卡片形态变体,可选项有`'outlined'`、`'borderless'` * 默认值:`'outlined'` */ variant: PropTypes.oneOf(['outlined', 'borderless']), /** * 是否在鼠标悬停时显示特殊样式 * 默认值:`false` */ hoverable: PropTypes.bool, /** * 卡片尺寸规格,可选项有`'default'`、`'small'` * 默认值:`'default'` */ size: PropTypes.oneOf(['default', 'small']), /** * 监听当前卡片累计点击次数 * 默认值:`0` */ nClicks: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCard; export const propTypes = AntdCard.propTypes; export const defaultProps = AntdCard.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/card/AntdCardGrid.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCardGrid = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../../fragments/dataDisplay/card/AntdCardGrid.react' ) ); /** * 卡片网格组件AntdCardGrid */ const AntdCardGrid = ({ id, children, className, style, key, hoverable = true, nClicks = 0, setProps, ...others }) => { return ( ); }; AntdCardGrid.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 鼠标悬停时是否显示特殊样式 * 默认值:`true` */ hoverable: PropTypes.bool, /** * 监听当前卡片网格累计点击次数 * 默认值:`0` */ nClicks: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCardGrid; export const propTypes = AntdCardGrid.propTypes; export const defaultProps = AntdCardGrid.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/card/AntdCardMeta.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCardMeta = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../../fragments/dataDisplay/card/AntdCardMeta.react' ) ); /** * 结构化卡片组件AntdCardMeta */ const AntdCardMeta = ({ id, className, style, key, avatar, description, title, setProps, ...others }) => { return ( ); }; AntdCardMeta.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件型,头像元素 */ avatar: PropTypes.node, /** * 组件型,描述内容 */ description: PropTypes.node, /** * 组件型,标题内容 */ title: PropTypes.node, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCardMeta; export const propTypes = AntdCardMeta.propTypes; export const defaultProps = AntdCardMeta.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/descriptions/AntdDescriptionItem.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdDescriptionItem = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../../fragments/dataDisplay/descriptions/AntdDescriptionItem.react' ) ); /** * 描述列表子项组件AntdDescriptionItem */ const AntdDescriptionItem = ({ id, children, className, style, styles, classNames, key, label, span = 1, setProps, ...others }) => { return ( ); }; AntdDescriptionItem.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 标签元素css样式 */ label: PropTypes.object, /** * 内容元素css样式 */ content: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 标签元素css类名 */ label: PropTypes.string, /** * 内容元素css类名 */ content: PropTypes.string, }), /** * 组件型,标题内容 */ label: PropTypes.node, /** * 所占宽度份数 * 默认值:`1` */ span: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdDescriptionItem; export const propTypes = AntdDescriptionItem.propTypes; export const defaultProps = AntdDescriptionItem.defaultProps; ================================================ FILE: src/lib/components/dataDisplay/descriptions/AntdDescriptions.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdDescriptions = React.lazy( () => import( /* webpackChunkName: "data_display" */ '../../../fragments/dataDisplay/descriptions/AntdDescriptions.react' ) ); /** * 描述列表组件AntdDescriptions */ const AntdDescriptions = ({ id, children, className, style, styles, classNames, key, items, title, column = 3, bordered = false, size = 'default', layout = 'horizontal', extra, setProps, ...others }) => { return ( ); }; AntdDescriptions.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,传入内部各描述列表子项 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 根元素css样式 */ root: PropTypes.object, /** * 头部元素css样式 */ header: PropTypes.object, /** * 标题元素css样式 */ title: PropTypes.object, /** * 额外内容css样式 */ extra: PropTypes.object, /** * 标签元素css样式 */ label: PropTypes.object, /** * 内容元素css样式 */ content: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 根元素css类名 */ root: PropTypes.string, /** * 头部元素css类名 */ header: PropTypes.string, /** * 标题元素css类名 */ title: PropTypes.string, /** * 额外内容css类名 */ extra: PropTypes.string, /** * 标签元素css类名 */ label: PropTypes.string, /** * 内容元素css类名 */ content: PropTypes.string, }), /** * 配置描述列表子项,优先级高于`children` */ items: PropTypes.arrayOf( PropTypes.exact({ /** * 组件型,子项标题内容 */ label: PropTypes.node, /** * 子项所占宽度份数,当设置为`'filled'`时会自适应占满当前行剩余可用空间 * 默认值:`1` */ span: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['filled']), ]), /** * 组件型,子项内容 */ children: PropTypes.node, /** * 子项css样式 */ style: PropTypes.object, /** * 子项css类名 */ className: PropTypes.string, }) ), /** * 组件型,标题内容 */ title: PropTypes.node, /** * 每行显示的字段项数量,支持响应式 * 默认值:`3` */ column: PropTypes.oneOfType([ PropTypes.number, PropTypes.exact({ xxl: PropTypes.number, xl: PropTypes.number, lg: PropTypes.number, md: PropTypes.number, sm: PropTypes.number, xs: PropTypes.number, }), ]), /** * 是否显示边框 * 默认值:`false` */ bordered: PropTypes.bool, /** * 整体尺寸规格,可选项有`'small'`、`'default'`、`'large'` * 默认值:`'default'` */ size: PropTypes.oneOf(['small', 'default', 'large']), /** * 布局方式,可选项有`'horizontal'`、`'vertical'` * 默认值:`'horizontal'` */ layout: PropTypes.oneOf(['horizontal', 'vertical']), /** * 组件型,设置操作区域,显示在右上方 */ extra: PropTypes.node, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdDescriptions; export const propTypes = AntdDescriptions.propTypes; export const defaultProps = AntdDescriptions.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdCalendar.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCalendar = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdCalendar.react' ) ); /** * 日历组件AntdCalendar */ const AntdCalendar = ({ id, className, style, key, name, enableBatchControl = true, locale = 'zh-cn', defaultValue, value, format = 'YYYY-MM-DD', size = 'default', customCells, setProps, persistence, persisted_props, persistence_type, ...others }) => { return ( ); }; AntdCalendar.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 日期显示格式,[参考资料](https://day.js.org/docs/en/display/format) * 默认值:`'YYYY-MM-DD'` */ format: PropTypes.string, /** * 日历尺寸规格,可选项有`'default'`、`'large'` * 默认值:`'default'` */ size: PropTypes.oneOf(['default', 'large']), /** * 监听或设置当前选中日期值 */ value: PropTypes.string, /** * 初始化选中日期值 */ defaultValue: PropTypes.string, /** * 自定义对应月份、日期的单元格显示内容 */ customCells: PropTypes.arrayOf( PropTypes.exact({ /** * 必填,当前项对应类型,可选项有`'month'`、`'date'` */ type: PropTypes.oneOf(['month', 'date']).isRequired, /** * 当前项匹配的年份值 */ year: PropTypes.number, /** * 当前项匹配的月份值 */ month: PropTypes.number, /** * 当前项匹配的日期值 */ date: PropTypes.number, /** * 自定义内容 */ content: PropTypes.node, }) ), /** * 监听日期单元格点击事件 */ cellClickEvent: PropTypes.exact({ /** * 记录面板类型 */ type: PropTypes.string, /** * 事件发生时间戳 */ timestamp: PropTypes.number, }), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdCalendar.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdCalendar; export const propTypes = AntdCalendar.propTypes; export const defaultProps = AntdCalendar.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdCascader.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCascader = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdCascader.react' ) ); /** * 级联选择组件AntdCascader */ const AntdCascader = ({ id, style, className, popupClassName, key, name, enableBatchControl = true, locale = 'zh-cn', options, optionFilterProp = 'label', panelMode = false, optionsNodeKeyToLabel, optionsMode = 'tree', changeOnSelect = false, size, bordered = true, variant, disabled = false, placeholder, defaultValue, value, placement = 'bottomLeft', maxTagCount, multiple = false, expandTrigger = 'click', status, allowClear = true, autoFocus = false, showCheckedStrategy, popupContainer = 'body', prefix, suffixIcon, readOnly, setProps, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; // 定义递归PropTypes const PropOptionNodeShape = { /** * 当前节点值 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, /** * 当前节点唯一识别id */ key: PropTypes.string, /** * 当前节点标题内容 */ label: PropTypes.string.isRequired, /** * 是否禁用当前节点 */ disabled: PropTypes.bool, }; const PropOptionNode = PropTypes.shape(PropOptionNodeShape); PropOptionNodeShape.children = PropTypes.arrayOf(PropOptionNode); const optionDataPropTypes = PropTypes.arrayOf(PropOptionNode); // 定义扁平节点PropTypes const PropFlatOptionNodeShape = { /** * 当前节点值 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, /** * 当前节点标题内容 */ label: PropTypes.string.isRequired, /** * 是否禁用当前节点 */ disabled: PropTypes.bool, /** * 当前节点唯一识别id */ key: PropTypes.string, /** * 当前节点对应父节点`key`值 */ parent: PropTypes.string, }; AntdCascader.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 展开菜单css类名 */ popupClassName: PropTypes.string, /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 对应`options`格式的渲染模式,可选项有`'tree'`(树形模式)、`'flat'`(扁平模式) * 默认值:`'tree'` */ optionsMode: PropTypes.oneOf(['tree', 'flat']), /** * 定义构造级联选择所需的数据结构,与`optionsMode`一致 */ options: PropTypes.oneOfType([ /** * 树形模式对应结构 */ optionDataPropTypes, /** * 偏平模式对应结构 */ PropTypes.arrayOf(PropFlatOptionNodeShape), ]).isRequired, /** * 针对级联结构中的指定节点,定义作为标题的组件型内容,优先级高于`options`中对应的`label`值 */ optionsNodeKeyToLabel: PropTypes.objectOf(PropTypes.node), /** * 选项关键词搜索时的目标字段,可选项有`'value'`、`'label'` * 默认值:`'label'` */ optionFilterProp: PropTypes.oneOf(['value', 'label']), /** * 是否开启内嵌面板模式 * 默认值:`false` */ panelMode: PropTypes.bool, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 是否当级联选择中的任意节点被选择时均进行选中值更新 * 默认值:`false` */ changeOnSelect: PropTypes.bool, /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 输入框占位文字内容 */ placeholder: PropTypes.string, /** * 选择菜单展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` * 默认值:`'bottomLeft'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomRight', 'topLeft', 'topRight', ]), /** * 监听或设置已选值 */ value: PropTypes.oneOfType([ PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ), PropTypes.arrayOf( PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ) ), ]), /** * 初始化已选值 */ defaultValue: PropTypes.oneOfType([ PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ), PropTypes.arrayOf( PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ) ), ]), /** * 是否开启多选模式 * 默认值:`false` */ multiple: PropTypes.bool, /** * 当`multiple=True`时,已选值展示的最大数量 */ maxTagCount: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['responsive']), ]), /** * 选择菜单展开触发方式,可选项有`'click'`、`'hover'` * 默认值:`'click'` */ expandTrigger: PropTypes.oneOf(['click', 'hover']), /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否允许一键清空已选值 * 默认值:`true` */ allowClear: PropTypes.bool, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 已选项回填策略,可选项有`'show-parent'`、`'show-child'` */ showCheckedStrategy: PropTypes.oneOf(['show-parent', 'show-child']), /** * 组件型,前缀内嵌内容 */ prefix: PropTypes.node, /** * 自定义选择框后缀图标内容 */ suffixIcon: PropTypes.node, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdCascader.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdCascader; export const propTypes = AntdCascader.propTypes; export const defaultProps = AntdCascader.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdCheckbox.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCheckbox = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdCheckbox.react' ) ); /** * 选择框组件AntdCheckbox */ const AntdCheckbox = ({ id, style, className, key, name, enableBatchControl = true, label, disabled = false, autoFocus = false, checked = false, indeterminate = false, readOnly = false, setProps, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; AntdCheckbox.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 组件型,标签内容 */ label: PropTypes.node, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 监听或设置当前选择框是否选中 * 默认值:`false` */ checked: PropTypes.bool, /** * 是否强制渲染为半选中状态,仅影响样式,与选中状态无关 * 默认值:`false` */ indeterminate: PropTypes.bool, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'checked'` * 默认值:`['checked']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['checked'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdCheckbox.dashPersistence = { persisted_props: ['checked'], persistence_type: 'local', }; export default AntdCheckbox; export const propTypes = AntdCheckbox.propTypes; export const defaultProps = AntdCheckbox.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdCheckboxGroup.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCheckboxGroup = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdCheckboxGroup.react' ) ); /** * 组合选择框组件AntdCheckboxGroup */ const AntdCheckboxGroup = ({ id, style, className, key, name, enableBatchControl = true, options, value, disabled = false, readOnly = false, setProps, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; AntdCheckboxGroup.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 定义构造组合选择框所需的数据结构 */ options: PropTypes.arrayOf( PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.exact({ /** * 组件型,当前选择框标签内容 */ label: PropTypes.node, /** * 当前选择框对应值 */ value: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), /** * 是否禁用当前选择框 * 默认值:`false` */ disabled: PropTypes.bool, }), ]) ), /** * 监听或设置已选值 */ value: PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ), /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdCheckboxGroup.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdCheckboxGroup; export const propTypes = AntdCheckboxGroup.propTypes; export const defaultProps = AntdCheckboxGroup.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdColorPicker.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdColorPicker = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdColorPicker.react' ) ); /** * 颜色选择器组件AntdColorPicker */ const AntdColorPicker = ({ id, className, style, key, locale = 'zh-cn', name, enableBatchControl = true, allowClear = false, arrow, defaultValue, value, format = 'hex', mode = 'single', disabled = false, disabledAlpha = true, open, presets, placement = 'bottomLeft', showText = false, size = 'middle', trigger = 'click', setProps, ...others }) => { return ( ); }; AntdColorPicker.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 是否允许清除已选颜色 * 默认值:`false` */ allowClear: PropTypes.bool, /** * 配置颜色选择面板额外箭头 * 默认值:`true` */ arrow: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 箭头是否指向面板中心 * 默认值:`false` */ pointAtCenter: PropTypes.bool, }), ]), /** * 初始化已输入值 */ defaultValue: PropTypes.string, /** * 监听或设置选中颜色值 * 默认值:`'#1677FF'` */ value: PropTypes.string, /** * 监听或设置颜色格式,可选项有`'rgb'`、`'hex'`、`'hsb'` * 默认值:`'hex'` */ format: PropTypes.oneOf(['rgb', 'hex', 'hsb']), /** * 选择器模式,用于配置单色与渐变,可选项有`'single'`、`'gradient'`,支持单选项或多选项组合 * 默认值:`single` */ mode: PropTypes.oneOfType([ PropTypes.oneOf(['single', 'gradient']), PropTypes.arrayOf(PropTypes.oneOf(['single', 'gradient'])), ]), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 是否禁用透明度选择 * 默认值:`true` */ disabledAlpha: PropTypes.bool, /** * 监听或设置颜色选择面板展开状态 */ open: PropTypes.bool, /** * 配置预设颜色选择项 */ presets: PropTypes.arrayOf( PropTypes.exact({ /** * 组件型,当前预设项标签内容 */ label: PropTypes.node, /** * 当前预设项所包含的颜色值数组 */ colors: PropTypes.arrayOf(PropTypes.string), /** * 当前预设项默认是否展开 * 默认值:`true` */ defaultOpen: PropTypes.bool, }) ), /** * 颜色选择面板展开方向,可选项有`'top'`、`'topLeft'`、`'topRight'`、`'bottom'`、`'bottomLeft'`、`'bottomRight'` * 默认值:`'bottomRight'` */ placement: PropTypes.oneOf([ 'top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight', ]), /** * 是否显示颜色值文本 * 默认值:`false` */ showText: PropTypes.bool, /** * 设置触发控件尺寸规格,可选项有`'large'`、`'middle'`、`'small'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['large', 'middle', 'small']), /** * 颜色选择面板触发方式,可选项有`'hover'`、`'click'` * 默认值:`'click'` */ trigger: PropTypes.oneOf(['hover', 'click']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdColorPicker; export const propTypes = AntdColorPicker.propTypes; export const defaultProps = AntdColorPicker.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdDatePicker.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdDatePicker = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdDatePicker.react' ) ); /** * 日期选择组件AntdDatePicker */ const AntdDatePicker = ({ id, className, style, popupClassName, key, name, enableBatchControl = true, locale = 'zh-cn', setProps, picker = 'date', format, firstDayOfWeek, disabled = false, showTime = false, allowClear = true, autoFocus = false, placeholder, disabledDatesStrategy, pickerValue, value, defaultValue, bordered = true, variant, size = 'middle', status, popupContainer = 'body', readOnly, placement = 'bottomLeft', extraFooter, showToday = true, presets, customCells, prefix, suffixIcon, persistence, persisted_props, persistence_type, batchPropsNames = [], needConfirm = false, ...others }) => { return ( ); }; AntdDatePicker.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 展开菜单css类名 */ popupClassName: PropTypes.string, /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 日期时间显示格式,[参考资料](https://day.js.org/docs/en/display/format) * 默认值:`'YYYY-MM-DD'` */ format: PropTypes.string, /** * 日期选择粒度,可选项有`'date'`、`'week'`、`'month'`、`'quarter'`、`'year'` * 默认值:`'date'` */ picker: PropTypes.oneOf(['date', 'week', 'month', 'quarter', 'year']), /** * 自定义每周起始日下标 */ firstDayOfWeek: PropTypes.number, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 配置时间选择面板相关参数 * 默认值:`false` */ showTime: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 时间选择面板初始化选中时间字符串 */ defaultValue: PropTypes.string, /** * 与`defaultValue`对应的时间格式,[参考资料](https://day.js.org/docs/en/display/format) * 默认值:`'HH:mm:ss'` */ format: PropTypes.string, }), ]), /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 输入框占位文字内容 */ placeholder: PropTypes.string, /** * 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` * 默认值:`'bottomLeft'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomRight', 'topLeft', 'topRight', ]), /** * 监听或设置已选值,与`format`格式对应 */ value: PropTypes.string, /** * 初始化已选值,与`format`格式对应 */ defaultValue: PropTypes.string, /** * 监听或设置面板展开对应日期,与`format`格式对应 */ pickerValue: PropTypes.string, /** * 配置日期禁用项策略数组,满足策略中至少一项规则的日期将会被禁止选中 */ disabledDatesStrategy: PropTypes.arrayOf( PropTypes.exact({ /** * 当前策略类型,可选项有`'eq'`(等于)、`'ne'`(不等于)、`'le'`(小于等于)、`'lt'`(小于)、`'ge'`(大于等于) * 、`'gt'`(大于)、`'in'`(属于)、`'not-in'`(不属于)、`'in-enumerate-dates'`(属于日期字符串枚举数组),`'not-in-enumerate-dates'`(不属于日期字符串枚举数组) */ mode: PropTypes.oneOf([ 'eq', 'ne', 'le', 'lt', 'ge', 'gt', 'in', 'not-in', 'in-enumerate-dates', 'not-in-enumerate-dates', ]), /** * 当前策略约束目标,可选项有`'dayOfYear'`(按年份天数)、`'dayOfWeek'`(按周天数)、`'day'`(按日) * 、`'month'`(按月份)、`'quarter'`(按季度)、`'year'`(按年份)、`'specific-date'`(具体日期) * ,其中在`'specific-date'`目标下,`value`值将严格按照`'YYYY-MM-DD'`格式进行解析 */ target: PropTypes.oneOf([ 'day', 'month', 'quarter', 'year', 'dayOfYear', 'dayOfWeek', 'specific-date', ]), /** * 与策略类型、策略约束目标相对应的实际约束值 */ value: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, PropTypes.arrayOf(PropTypes.number), PropTypes.arrayOf(PropTypes.string), ]), }) ), /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否允许一键清空已选值 * 默认值:`true` */ allowClear: PropTypes.bool, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 组件型,底部额外区域内容 */ extraFooter: PropTypes.node, /** * 是否显示“今天”快捷选择按钮 * 默认值:`true` */ showToday: PropTypes.bool, /** * 配置预设项列表 */ presets: PropTypes.arrayOf( PropTypes.exact({ /** * 组件型,当前预设项标题 */ label: PropTypes.node, /** * 当前预设项对应值,与`format`格式对应 */ value: PropTypes.string, }) ), /** * 配合`presets`参数,监听最近一次预设项点击事件相关信息 */ clickedPreset: PropTypes.exact({ /** * 对应预设项值 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 事件对应时间戳信息 */ timestamp: PropTypes.number, }), /** * 是否需要点击按钮确认选值,传入`false`时失去焦点即代表选择 * 默认值:`false` */ needConfirm: PropTypes.bool, /** * 自定义对应日期的单元格样式 */ customCells: PropTypes.arrayOf( PropTypes.exact({ /** * 当前项匹配的年份值 */ year: PropTypes.number, /** * 当前项匹配的月份值 */ month: PropTypes.number, /** * 当前项匹配的日期值 */ date: PropTypes.number, /** * 自定义css样式 */ style: PropTypes.object, /** * 自定义css类名 */ className: PropTypes.string, }) ), /** * 组件型,前缀内嵌内容 */ prefix: PropTypes.node, /** * 自定义选择框后缀图标内容 */ suffixIcon: PropTypes.node, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdDatePicker.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdDatePicker; export const propTypes = AntdDatePicker.propTypes; export const defaultProps = AntdDatePicker.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdDateRangePicker.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdDateRangePicker = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdDateRangePicker.react' ) ); /** * 日期范围选择组件AntdDateRangePicker */ const AntdDateRangePicker = ({ id, className, style, popupClassName, key, name, enableBatchControl = true, locale = 'zh-cn', setProps, picker = 'date', firstDayOfWeek, format, showTime = false, allowClear = true, autoFocus = false, value, disabledDatesStrategy, open, defaultValue, placeholder, disabled = [false, false], bordered = true, variant, size = 'middle', pickerValue, status, popupContainer = 'body', readOnly, placement = 'bottomLeft', extraFooter, presets, customCells, prefix, suffixIcon, persistence, persisted_props, persistence_type, batchPropsNames = [], needConfirm = false, ...others }) => { return ( ); }; AntdDateRangePicker.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 展开菜单css类名 */ popupClassName: PropTypes.string, /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 日期时间显示格式,[参考资料](https://day.js.org/docs/en/display/format) * 默认值:`'YYYY-MM-DD'` */ format: PropTypes.string, /** * 日期选择粒度,可选项有`'date'`、`'week'`、`'month'`、`'quarter'`、`'year'` * 默认值:`'date'` */ picker: PropTypes.oneOf(['date', 'week', 'month', 'quarter', 'year']), /** * 自定义每周起始日下标 */ firstDayOfWeek: PropTypes.number, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.arrayOf(PropTypes.bool), /** * 配置时间选择面板相关参数 * 默认值:`false` */ showTime: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 时间选择面板初始化选中时间字符串 */ defaultValue: PropTypes.arrayOf(PropTypes.string), /** * 与`defaultValue`对应的时间格式,[参考资料](https://day.js.org/docs/en/display/format) * 默认值:`'HH:mm:ss'` */ format: PropTypes.string, }), ]), /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 输入框占位文字内容 */ placeholder: PropTypes.arrayOf(PropTypes.string), /** * 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` * 默认值:`'bottomLeft'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomRight', 'topLeft', 'topRight', ]), /** * 监听或设置已选值,与`format`格式对应 */ value: PropTypes.arrayOf(PropTypes.string), /** * 初始化已选值,与`format`格式对应 */ defaultValue: PropTypes.arrayOf(PropTypes.string), /** * 监听或设置面板展开对应日期,与`format`格式对应 */ pickerValue: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), ]), /** * 配置日期禁用项策略数组,满足策略中至少一项规则的日期将会被禁止选中 */ disabledDatesStrategy: PropTypes.arrayOf( PropTypes.exact({ /** * 当前策略类型,可选项有`'eq'`(等于)、`'ne'`(不等于)、`'le'`(小于等于)、`'lt'`(小于)、`'ge'`(大于等于) * 、`'gt'`(大于)、`'in'`(属于)、`'not-in'`(不属于)、`'in-enumerate-dates'`(属于日期字符串枚举数组),`'not-in-enumerate-dates'`(不属于日期字符串枚举数组) */ mode: PropTypes.oneOf([ 'eq', 'ne', 'le', 'lt', 'ge', 'gt', 'in', 'not-in', 'in-enumerate-dates', 'not-in-enumerate-dates', ]), /** * 当前策略约束目标,可选项有`'dayOfYear'`(按年份天数)、`'dayOfWeek'`(按周天数)、`'day'`(按日) * 、`'month'`(按月份)、`'quarter'`(按季度)、`'year'`(按年份)、`'specific-date'`(具体日期) * ,其中在`'specific-date'`目标下,`value`值将严格按照`'YYYY-MM-DD'`格式进行解析 */ target: PropTypes.oneOf([ 'day', 'month', 'quarter', 'year', 'dayOfYear', 'dayOfWeek', 'specific-date', ]), /** * 与策略类型、策略约束目标相对应的实际约束值 */ value: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, PropTypes.arrayOf(PropTypes.number), PropTypes.arrayOf(PropTypes.string), ]), }) ), /** * 监听或设置当前日期范围选择面板是否展开 */ open: PropTypes.bool, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否允许一键清空已选值 * 默认值:`true` */ allowClear: PropTypes.bool, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 组件型,底部额外区域内容 */ extraFooter: PropTypes.node, /** * 配置预设项列表 */ presets: PropTypes.arrayOf( PropTypes.exact({ /** * 组件型,当前预设项标题 */ label: PropTypes.node, /** * 当前预设项对应值,与`format`格式对应 */ value: PropTypes.arrayOf(PropTypes.string), }) ), /** * 配合`presets`参数,监听最近一次预设项点击事件相关信息 */ clickedPreset: PropTypes.exact({ /** * 对应预设项值 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 事件对应时间戳信息 */ timestamp: PropTypes.number, }), /** * 是否需要点击按钮确认选值,传入`false`时失去焦点即代表选择 * 默认值:`false` */ needConfirm: PropTypes.bool, /** * 自定义对应日期的单元格样式 */ customCells: PropTypes.arrayOf( PropTypes.exact({ /** * 当前项匹配的年份值 */ year: PropTypes.number, /** * 当前项匹配的月份值 */ month: PropTypes.number, /** * 当前项匹配的日期值 */ date: PropTypes.number, /** * 自定义css样式 */ style: PropTypes.object, /** * 自定义css类名 */ className: PropTypes.string, }) ), /** * 组件型,前缀内嵌内容 */ prefix: PropTypes.node, /** * 自定义选择框后缀图标内容 */ suffixIcon: PropTypes.node, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; AntdDateRangePicker.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdDateRangePicker; export const propTypes = AntdDateRangePicker.propTypes; export const defaultProps = AntdDateRangePicker.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdInput.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdInput = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdInput.react' ) ); /** * 输入框组件AntdInput */ const AntdInput = ({ id, className, style, styles, classNames, key, name, enableBatchControl = true, mode = 'default', passwordUseMd5 = false, autoComplete = 'on', placeholder, value, size = 'middle', addonBefore, addonAfter, prefix, suffix, allowClear = false, autoFocus = false, bordered = true, variant, defaultValue, disabled = false, maxLength, showCount = false, countFormat, nClicksSearch = 0, nSubmit = 0, status, autoSize = false, debounceWait = 0, readOnly, emptyAsNone = false, setProps, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; AntdInput.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 控制文本框元素css样式 */ input: PropTypes.object, /** * 控制前缀容器css样式 */ prefix: PropTypes.object, /** * 控制后缀容器css样式 */ suffix: PropTypes.object, /** * 控制文字计数元素css样式 */ count: PropTypes.object, /** * 控制文本域元素css样式 */ textarea: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 控制文本框元素css类名 */ input: PropTypes.string, /** * 控制前缀容器css类名 */ prefix: PropTypes.string, /** * 控制后缀容器css类名 */ suffix: PropTypes.string, /** * 控制文字计数元素css类名 */ count: PropTypes.string, /** * 控制文本域元素css类名 */ textarea: PropTypes.string, }), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 输入框模式,可选项有`'default'`、`'search'`、`'text-area'`、`'password'` * 默认值:`'default'` */ mode: PropTypes.oneOf(['default', 'search', 'text-area', 'password']), /** * 是否开启浏览器自带的自动补全功能,可选项有`'off'`、`'on'` * 默认值:`'on'` */ autoComplete: PropTypes.oneOf(['off', 'on']), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 输入框占位文字内容 */ placeholder: PropTypes.string, /** * 监听或设置已输入值 */ value: PropTypes.string, /** * 初始化已输入值 */ defaultValue: PropTypes.string, /** * 针对`'password'`模式,是否启用md5加密功能 * 默认值:`false` */ passwordUseMd5: PropTypes.bool, /** * 当`passwordUseMd5=True`时,监听已输入值md5编码结果 */ md5Value: PropTypes.string, /** * 监听防抖版本的已输入值 */ debounceValue: PropTypes.string, /** * 防抖延时时长,单位:毫秒 * 默认值:`0` */ debounceWait: PropTypes.number, /** * 组件型,前置标签内容 */ addonBefore: PropTypes.node, /** * 组件型,后置标签内容 */ addonAfter: PropTypes.node, /** * 组件型,前缀内嵌内容 */ prefix: PropTypes.node, /** * 组件型,后缀内嵌内容 */ suffix: PropTypes.node, /** * 限制输入框最大可输入字符数量 */ maxLength: PropTypes.number, /** * 是否显示已输入字符计数 * 默认值:`false` */ showCount: PropTypes.bool, /** * 正则表达式,用于配合字符计数相关功能,自定义计数规则 */ countFormat: PropTypes.string, /** * 针对`'text-area'`模式,配置输入框高度自适应相关功能 * 默认值:`false` */ autoSize: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 输入框最小行数 */ minRows: PropTypes.number, /** * 输入框最大行数 */ maxRows: PropTypes.number, }), ]), /** * 监听输入框聚焦状态下,键盘enter键累计点按次数 * 默认值:`0` */ nSubmit: PropTypes.number, /** * 针对`'search'`模式,监听搜索按钮累计点击次数 * 默认值:`0` */ nClicksSearch: PropTypes.number, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否允许一键清空已输入值 * 默认值:`false` */ allowClear: PropTypes.bool, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 监听输入框是否聚焦 */ focusing: PropTypes.bool, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 当输入框已输入值为空时,是否强制更新`value`为空值,从而统一空字符串与空值混合的情况 * 默认值:`false` */ emptyAsNone: PropTypes.bool, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'`、`'md5Value'` * 默认值:`['value', 'md5Value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value', 'md5Value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdInput.dashPersistence = { persisted_props: ['value', 'md5Value'], persistence_type: 'local', }; export default AntdInput; export const propTypes = AntdInput.propTypes; export const defaultProps = AntdInput.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdInputNumber.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdInputNumber = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdInputNumber.react' ) ); /** * 数值输入框组件AntdInputNumber */ const AntdInputNumber = ({ id, className, style, key, name, enableBatchControl = true, size = 'middle', addonBefore, addonAfter, autoFocus = false, prefix, suffix, bordered = true, variant, controls = true, value, defaultValue, disabled = false, placeholder, keyboard = true, min, max, step, precision, readOnly, stringMode = false, nSubmit = 0, status, debounceWait = 0, setProps, persistence, persisted_props = ['value'], persistence_type = 'local', batchPropsNames = [], ...others }) => { return ( ); }; AntdInputNumber.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件型,前置标签内容 */ addonBefore: PropTypes.node, /** * 组件型,后置标签内容 */ addonAfter: PropTypes.node, /** * 组件型,前缀内嵌内容 */ prefix: PropTypes.node, /** * 组件型,后缀内嵌内容 */ suffix: PropTypes.node, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 是否显示增减数值按钮 * 默认值:`true` */ controls: PropTypes.bool, /** * 是否允许通过键盘上下方向键控制数值 * 默认值:`true` */ keyboard: PropTypes.bool, /** * 允许输入的数值下限,默认无限制 */ min: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 允许输入的数值上限,默认无限制 */ max: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 数值增减步长 */ step: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 数值精度 */ precision: PropTypes.number, /** * 是否开启字符串模式,用于在接受超高精度数值输入时不丢失精度,开启后,参数`min`、`max`、`step`、`value`、`defaultValue`均需要设置为字符型 * 默认值:`false` */ stringMode: PropTypes.bool, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 输入框占位文字内容 */ placeholder: PropTypes.string, /** * 监听或设置已输入值 */ value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 初始化已输入值 */ defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 监听防抖版本的已输入值 */ debounceValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 防抖延时时长,单位:毫秒 * 默认值:`0` */ debounceWait: PropTypes.number, /** * 监听输入框聚焦状态下,键盘enter键累计点按次数 * 默认值:`0` */ nSubmit: PropTypes.number, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'md5Value'` * 默认值:`['md5Value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdInputNumber.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdInputNumber; export const propTypes = AntdInputNumber.propTypes; export const defaultProps = AntdInputNumber.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdMentions.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdMentions = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdMentions.react' ) ); /** * 提及组件AntdMentions */ const AntdMentions = ({ id, className, style, popupClassName, key, name, enableBatchControl = true, autoSize = false, prefix = '@', value, defaultValue, placement = 'bottom', bordered = true, variant, placeholder, options, disabled = false, status, autoFocus = false, popupContainer, setProps, batchPropsNames = [], ...others }) => { return ( ); }; AntdMentions.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 展开菜单css类名 */ popupClassName: PropTypes.string, /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 配置输入框高度自适应相关功能 * 默认值:`false` */ autoSize: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 输入框最小行数 */ minRows: PropTypes.number, /** * 输入框最大行数 */ maxRows: PropTypes.number, }), ]), /** * 触发选择菜单展开的关键字 * 默认值:`'@'` */ prefix: PropTypes.string, /** * 监听或设置已输入值 */ value: PropTypes.string, /** * 初始化已输入值 */ defaultValue: PropTypes.string, /** * 必填,配置选择菜单子项 */ options: PropTypes.arrayOf( PropTypes.exact({ /** * 组件型,当前选项标签内容 */ label: PropTypes.node, /** * 当前选项值 */ value: PropTypes.string, }) ).isRequired, /** * 监听输入内容中对应的已选子项值 */ selectedOptions: PropTypes.arrayOf(PropTypes.string), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 选择菜单弹出方向,可选项有`'top'`、`'bottom'` * 默认值:`'bottom'` */ placement: PropTypes.oneOf(['top', 'bottom']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 输入框占位文字内容 */ placeholder: PropTypes.string, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdMentions; export const propTypes = AntdMentions.propTypes; export const defaultProps = AntdMentions.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdOTP.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdOTP = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdOTP.react' ) ); /** * 一次性密码框组件AntdOTP */ const AntdOTP = ({ id, className, style, key, name, enableBatchControl = true, defaultValue, value, disabled = false, length = 6, mask = false, status, size = 'middle', variant = 'outlined', setProps, persistence, persisted_props, persistence_type, ...others }) => { return ( ); }; AntdOTP.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 监听或设置已选值 */ value: PropTypes.string, /** * 初始化已选值 */ defaultValue: PropTypes.string, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 单体输入框数量 * 默认值:`6` */ length: PropTypes.number, /** * 自定义遮罩字符 * 默认值:`false` */ mask: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]), /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdOTP.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdOTP; export const propTypes = AntdOTP.propTypes; export const defaultProps = AntdOTP.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdRadioGroup.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdRadioGroup = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdRadioGroup.react' ) ); /** * 单选框组件AntdRadioGroup */ const AntdRadioGroup = ({ id, style, className, key, name, enableBatchControl = true, options, defaultValue, value, direction = 'horizontal', optionType = 'default', buttonStyle = 'outline', block = false, disabled = false, size = 'middle', readOnly = false, setProps, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; AntdRadioGroup.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 单选框排列方向,可选项有`'horizontal'`、`'vertical'` * 默认值:`'horizontal'` */ direction: PropTypes.oneOf(['horizontal', 'vertical']), /** * 配置选项 */ options: PropTypes.arrayOf( PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.exact({ /** * 组件型,当前选项标签内容 */ label: PropTypes.node, /** * 当前选项值 */ value: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), /** * 是否禁用当前选项 * 默认值:`false` */ disabled: PropTypes.bool, }), ]) ), /** * 是否撑满父容器 * 默认值:`false` */ block: PropTypes.bool, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当`optionType='button'`时,控制各选项按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 监听或设置已选值,与`format`格式对应 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 初始化已选值,与`format`格式对应 */ defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 选项形式,可选项有`'default'`、`'button'` * 默认值:`'default'` */ optionType: PropTypes.oneOf(['default', 'button']), /** * 当`optionType='button'`时,设置按钮风格,可选项有`'outline'`、`'solid'` * 默认值:`'outline'` */ buttonStyle: PropTypes.oneOf(['outline', 'solid']), /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdRadioGroup.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdRadioGroup; export const propTypes = AntdRadioGroup.propTypes; export const defaultProps = AntdRadioGroup.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdRate.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdRate = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdRate.react' ) ); /** * 评分组件AntdRate */ const AntdRate = ({ id, className, style, key, name, enableBatchControl = true, allowClear = true, allowHalf = false, count = 5, disabled = false, autoFocus = false, tooltips, defaultValue = 0, value, setProps, persistence, persisted_props = ['value'], persistence_type = 'local', batchPropsNames = [], ...others }) => { return ( ); }; AntdRate.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 是否允许通过再次点击清除已选分值 * 默认值:`true` */ allowClear: PropTypes.bool, /** * 是否允许半星选择 * 默认值:`false` */ allowHalf: PropTypes.bool, /** * 总分值 * 默认值:`5` */ count: PropTypes.number, /** * 为各分值设置提示文字信息 */ tooltips: PropTypes.arrayOf(PropTypes.string), /** * 是否渲染为只读评分形式 * 默认值:`false` */ disabled: PropTypes.bool, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 监听或设置已选值 */ value: PropTypes.number, /** * 初始化已选值 * 默认值:`0` */ defaultValue: PropTypes.number, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdRate.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdRate; export const propTypes = AntdRate.propTypes; export const defaultProps = AntdRate.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdSegmentedColoring.react.js ================================================ /* eslint-disable no-undefined */ /* eslint-disable no-unused-vars */ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdSegmentedColoring = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdSegmentedColoring.react' ) ); /** * 分段着色组件AntdSegmentedColoring */ const AntdSegmentedColoring = ({ id, key, className, style, size = 'middle', bordered = true, variant, controls = true, disabled = false, keyboard = true, placeholder, min, max, step = 0.01, precision = 2, readOnly, pureLegend = false, breakpoints, colors, inputNumberStyle, colorBlockPosition = 'right', colorBlockStyle, pureLegendLabelStyle, setProps, batchPropsNames = [], ...others }) => { return ( ); }; AntdSegmentedColoring.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 必填,监听或设置分段断点数组 */ breakpoints: PropTypes.arrayOf(PropTypes.number).isRequired, /** * 必填,为各分段设置颜色,数组长度应为`breakpoints`长度减1 */ colors: PropTypes.arrayOf(PropTypes.string).isRequired, /** * 是否为各分段数值输入框添加增减按钮 * 默认值:`true` */ controls: PropTypes.bool, /** * 是否可通过键盘上下方向键增减各分段数值输入框数值 * 默认值:`true` */ keyboard: PropTypes.bool, /** * 各分段数值输入框允许输入数值下限,默认无限制 */ min: PropTypes.number, /** * 各分段数值输入框允许输入数值上限,默认无限制 */ max: PropTypes.number, /** * 各分段数值输入框数值调整步长 * 默认值:`0.01` */ step: PropTypes.number, /** * 各分段数值输入框数值精度 * 默认值:`2` */ precision: PropTypes.number, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 各分段数值输入框占位文字内容 */ placeholder: PropTypes.string, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 是否开启纯图例模式 * 默认值:`false` */ pureLegend: PropTypes.bool, /** * 各分段数值输入框统一css样式 */ inputNumberStyle: PropTypes.object, /** * 色块css样式 */ colorBlockStyle: PropTypes.object, /** * 色块显示方位,可选项有`'left'`、`'right'` * 默认值:`'right'` */ colorBlockPosition: PropTypes.oneOf(['left', 'right']), /** * 监听分段色块点击事件 */ colorBlockClickEvent: PropTypes.shape({ /** * 被点击色块的颜色值 */ color: PropTypes.string, /** * 被点击色块对应范围值 */ range: PropTypes.arrayOf(PropTypes.number), /** * 事件对应时间戳 */ timestamp: PropTypes.number, }), /** * 当`pureLegend=True`时,设置各分段数值统一css样式 */ pureLegendLabelStyle: PropTypes.object, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSegmentedColoring; export const propTypes = AntdSegmentedColoring.propTypes; export const defaultProps = AntdSegmentedColoring.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdSelect.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdSelect = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdSelect.react' ) ); /** * 下拉选择组件AntdSelect */ const AntdSelect = ({ id, style, className, popupClassName, key, name, enableBatchControl = true, locale = 'zh-cn', setProps, placeholder, size = 'middle', bordered = true, variant, options = [], colorsNameWidth = 40, allowClear = true, autoFocus = false, disabled, value, mode, defaultValue, maxTagCount = 5, listHeight = 256, colorsMode = 'sequential', placement = 'bottomLeft', status, optionFilterProp = 'value', optionFilterMode = 'case-insensitive', autoSpin = false, debounceWait = 0, autoClearSearchValue = true, emptyContent, loadingEmptyContent, dropdownBefore, dropdownAfter, prefix, suffixIcon, popupContainer = 'body', readOnly, maxCount, showSearch, popupMatchSelectWidth = true, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; AntdSelect.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果F */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 展开菜单css类名 */ popupClassName: PropTypes.string, /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 配置下拉选项 */ options: PropTypes.arrayOf( PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.exact({ /** * 组件型,当前选项标签内容 */ label: PropTypes.node.isRequired, /** * 当前选项值 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) .isRequired, /** * 是否禁用当前选项 * 默认值:`false` */ disabled: PropTypes.bool, /** * 针对色带特殊渲染模式,设置生成渐变色带所需的色彩值数组 */ colors: PropTypes.arrayOf(PropTypes.string), }), PropTypes.exact({ /** * 组件型,当前分组标签内容 */ group: PropTypes.node, /** * 配置当前分组内选项 */ options: PropTypes.arrayOf( PropTypes.exact({ /** * 组件型,当前选项标签内容 */ label: PropTypes.node.isRequired, /** * 当前选项值 */ value: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]).isRequired, /** * 是否禁用当前选项 * 默认值:`false` */ disabled: PropTypes.bool, /** * 针对色带特殊渲染模式,设置生成渐变色带所需的色彩值数组 */ colors: PropTypes.arrayOf(PropTypes.string), }) ), }), ]) ), /** * 下拉菜单最大像素高度 */ listHeight: PropTypes.number, /** * 色带特殊渲染模式下,设置渲染形式,可选项有`'sequential'`、`'diverging'` */ colorsMode: PropTypes.oneOf(['sequential', 'diverging']), /** * 色带特殊渲染模式下,设置各选项名称部分像素宽度 * 默认值:`40` */ colorsNameWidth: PropTypes.number, /** * 选择模式,可选项有`'multiple'`(多选)、`'tags'`(自由新增) */ mode: PropTypes.oneOf(['multiple', 'tags']), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 输入框占位文字内容 */ placeholder: PropTypes.string, /** * 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` * 默认值:`'bottomLeft'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomRight', 'topLeft', 'topRight', ]), /** * 监听或设置已选值 */ value: PropTypes.oneOfType([ PropTypes.oneOfType([PropTypes.string, PropTypes.number]), PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ), ]), /** * 初始化已选值 */ defaultValue: PropTypes.oneOfType([ PropTypes.oneOfType([PropTypes.string, PropTypes.number]), PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ), ]), /** * 当`multiple=True`时,已选值展示的最大数量 * 默认值:`5` */ maxTagCount: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['responsive']), ]), /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 基于搜索框中输入内容进行搜索的目标字段,可选项有`'value'`、`'label'` * 默认值:`'value'` */ optionFilterProp: PropTypes.oneOf(['value', 'label']), /** * 监听搜索框已输入内容 */ searchValue: PropTypes.string, /** * 搜索匹配模式,可选项有`'case-insensitive'`(大小写不敏感)、`'case-sensitive'`(大小写敏感)、`'regex'`(正则表达式)、`'remote-match'`(远程匹配模式) * 默认值:`'case-insensitive'` */ optionFilterMode: PropTypes.oneOf([ 'case-insensitive', 'case-sensitive', 'regex', 'remote-match', ]), /** * 以防抖延时的方式监听搜索框已输入内容 */ debounceSearchValue: PropTypes.string, /** * 防抖延时时长,单位:毫秒 * 默认值:`0` */ debounceWait: PropTypes.number, /** * 是否在当前组件相关属性处理回调更新中状态时,以加载中状态进行渲染 * 默认值:`false` */ autoSpin: PropTypes.bool, /** * 当`mode`为`'multiple'`或`'tags'`时,设置是否在选中项后自动清空搜索框中的内容 * 默认值:`true` */ autoClearSearchValue: PropTypes.bool, /** * 组件型,自定义空数据状态提示内容 */ emptyContent: PropTypes.node, /** * 组件型,自定义加载中状态下的空数据状态提示内容 */ loadingEmptyContent: PropTypes.node, /** * 组件型,选择菜单前缀内容 */ dropdownBefore: PropTypes.node, /** * 组件型,选择菜单后缀内容 */ dropdownAfter: PropTypes.node, /** * 组件型,前缀内嵌内容 */ prefix: PropTypes.node, /** * 自定义选择框后缀图标内容 */ suffixIcon: PropTypes.node, /** * 是否允许一键清空已选值 * 默认值:`true` */ allowClear: PropTypes.bool, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 选择菜单是否与选择框同宽,设置为`false`时将关闭虚拟滚动功能 * 默认值:`true` */ popupMatchSelectWidth: PropTypes.bool, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * `'multiple'`及 `'tags'`模式下有效,限制已选项数量上限 */ maxCount: PropTypes.number, /** * 是否开启输入框可搜索功能 */ showSearch: PropTypes.bool, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdSelect.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdSelect; export const propTypes = AntdSelect.propTypes; export const defaultProps = AntdSelect.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdSlider.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdSlider = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdSlider.react' ) ); /** * 滑动输入条组件AntdSlider */ const AntdSlider = ({ id, className, style, styles, classNames, key, name, enableBatchControl = true, value, defaultValue, disabled = false, autoFocus = false, vertical = false, range = false, min = 0, max = 100, step = 1, marks, tooltipVisible, tooltipPrefix = '', tooltipSuffix = '', popupContainer = 'body', readOnly = false, setProps, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; AntdSlider.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 根元素css样式 */ root: PropTypes.object, /** * 范围选择下,点和点之间单个选取条css样式 */ track: PropTypes.object, /** * 范围选择下,整个范围选取条css样式 */ tracks: PropTypes.object, /** * 背景条css样式 */ rail: PropTypes.object, /** * 抓取点元素css样式 */ handle: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 根元素css类名 */ root: PropTypes.string, /** * 范围选择下,点和点之间单个选取条css类名 */ track: PropTypes.string, /** * 范围选择下,整个范围选取条css类名 */ tracks: PropTypes.string, /** * 背景条css类名 */ rail: PropTypes.string, /** * 抓取点元素css类名 */ handle: PropTypes.string, }), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 是否以垂直模式显示 * 默认值:`false` */ vertical: PropTypes.bool, /** * 是否以范围模式显示 */ range: PropTypes.oneOfType([ PropTypes.bool, PropTypes.shape({ /** * 是否开启节点动态增减功能 * 默认值:`false` */ editable: PropTypes.bool, /** * 开启节点动态增减功能后,允许的最小节点数量 * 默认值:`0` */ minCount: PropTypes.number, /** * 开启节点动态增减功能后,允许的最大节点数量 */ maxCount: PropTypes.number, }), ]), /** * 必填,可滑动范围下限 */ min: PropTypes.number.isRequired, /** * 必填,可滑动范围上限 */ max: PropTypes.number.isRequired, /** * 滑动步长 */ step: PropTypes.number, /** * 为部分数值设置刻度信息 */ marks: PropTypes.objectOf(PropTypes.node), /** * 滑动数值文字提示显示策略,`true`表示持续显示,`false`表示始终不显示 */ tooltipVisible: PropTypes.bool, /** * 滑动数值文字提示前缀信息 */ tooltipPrefix: PropTypes.string, /** * 滑动数值文字提示后缀信息 */ tooltipSuffix: PropTypes.string, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 监听或设置已选值 */ value: PropTypes.oneOfType([ PropTypes.number, PropTypes.arrayOf(PropTypes.number), ]), /** * 初始化已选值 */ defaultValue: PropTypes.oneOfType([ PropTypes.number, PropTypes.arrayOf(PropTypes.number), ]), /** * 是否允许一键清空已选值 * 默认值:`true` */ autoFocus: PropTypes.bool, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdSlider.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdSlider; export const propTypes = AntdSlider.propTypes; export const defaultProps = AntdSlider.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdSwitch.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdSwitch = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdSwitch.react' ) ); /** * 开关组件AntdSwitch */ const AntdSwitch = ({ id, style, className, key, name, enableBatchControl = true, disabled = false, autoFocus = false, checked, checkedChildren, unCheckedChildren, size = 'default', loading = false, readOnly = false, setProps, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; AntdSwitch.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 监听或设置当前开关是否打开 */ checked: PropTypes.bool, /** * 组件型,打开状态下内嵌内容 */ checkedChildren: PropTypes.node, /** * 组件型,关闭状态下内嵌内容 */ unCheckedChildren: PropTypes.node, /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'` * 默认值:`'default'` */ size: PropTypes.oneOf(['default', 'small']), /** * 是否渲染加载中状态 * 默认值:`false` */ loading: PropTypes.bool, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'checked'` * 默认值:`['checked']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['checked'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdSwitch.dashPersistence = { persisted_props: ['checked'], persistence_type: 'local', }; export default AntdSwitch; export const propTypes = AntdSwitch.propTypes; export const defaultProps = AntdSwitch.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdTimePicker.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTimePicker = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdTimePicker.react' ) ); /** * 时间选择组件AntdTimePicker */ const AntdTimePicker = ({ id, className, style, popupClassName, key, name, enableBatchControl = true, locale = 'zh-cn', setProps, disabled = false, hourStep = 1, minuteStep = 1, secondStep = 1, format = 'HH:mm:ss', value, defaultValue, use12Hours = false, allowClear = true, autoFocus = false, placeholder, placement = 'bottomLeft', bordered = true, variant, size = 'middle', status, popupContainer = 'body', readOnly, extraFooter, showNow = true, prefix, suffixIcon, persistence, persisted_props, persistence_type, batchPropsNames = [], needConfirm = false, ...others }) => { return ( ); }; AntdTimePicker.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 展开菜单css类名 */ popupClassName: PropTypes.string, /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 时间显示格式,[参考资料](https://day.js.org/docs/en/display/format) * 默认值:`'HH:mm:ss'` */ format: PropTypes.string, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 小时选项间隔 * 默认值:`1` */ hourStep: PropTypes.number, /** * 分钟选项间隔 * 默认值:`1` */ minuteStep: PropTypes.number, /** * 秒选项间隔 * 默认值:`1` */ secondStep: PropTypes.number, /** * 是否使用12小时制,当设置为`true`时,`format`参数默认值变更为`'h:mm:ss a'` * 默认值:`false` */ use12Hours: PropTypes.bool, /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 输入框占位文字内容 */ placeholder: PropTypes.string, /** * 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` * 默认值:`'bottomLeft'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomRight', 'topLeft', 'topRight', ]), /** * 监听或设置已选值,与`format`格式对应 */ value: PropTypes.string, /** * 初始化已选值,与`format`格式对应 */ defaultValue: PropTypes.string, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否允许一键清空已选值 * 默认值:`true` */ allowClear: PropTypes.bool, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 组件型,底部额外区域内容 */ extraFooter: PropTypes.node, /** * 是否显示“此刻”快捷选择按钮 * 默认值:`true` */ showNow: PropTypes.bool, /** * 组件型,前缀内嵌内容 */ prefix: PropTypes.node, /** * 自定义选择框后缀图标内容 */ suffixIcon: PropTypes.node, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * 是否需要确认按钮,为`false`时失去焦点即代表选择 * 默认值:`false` */ needConfirm: PropTypes.bool, /** * Object that holds the loading state object coming from dash-renderer */ loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdTimePicker.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdTimePicker; export const propTypes = AntdTimePicker.propTypes; export const defaultProps = AntdTimePicker.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdTimeRangePicker.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTimeRangePicker = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdTimeRangePicker.react' ) ); /** * 时间范围选择组件AntdTimeRangePicker */ const AntdTimeRangePicker = ({ id, className, style, popupClassName, key, name, enableBatchControl = true, locale = 'zh-cn', setProps, value, defaultValue, placeholder, placement = 'bottomLeft', disabled = [false, false], hourStep = 1, minuteStep = 1, secondStep = 1, format = 'HH:mm:ss', use12Hours = false, allowClear = true, autoFocus = false, bordered = true, variant, size = 'middle', open, status, prefix, suffixIcon, popupContainer = 'body', readOnly, extraFooter, persistence, persisted_props, persistence_type, batchPropsNames = [], needConfirm = false, ...others }) => { return ( ); }; AntdTimeRangePicker.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 展开菜单css类名 */ popupClassName: PropTypes.string, /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 时间显示格式,[参考资料](https://day.js.org/docs/en/display/format) * 默认值:`'HH:mm:ss'` */ format: PropTypes.string, /** * 小时选项间隔 * 默认值:`1` */ hourStep: PropTypes.number, /** * 分钟选项间隔 * 默认值:`1` */ minuteStep: PropTypes.number, /** * 秒选项间隔 * 默认值:`1` */ secondStep: PropTypes.number, /** * 是否使用12小时制,当设置为`true`时,`format`参数默认值变更为`'h:mm:ss a'` * 默认值:`false` */ use12Hours: PropTypes.bool, /** * 是否允许一键清空已选值 * 默认值:`true` */ allowClear: PropTypes.bool, /** * 是否自动获取焦点 * 默认值:`false` */ autoFocus: PropTypes.bool, /** * 输入框占位文字内容 */ placeholder: PropTypes.arrayOf(PropTypes.string), /** * 选择面板展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` * 默认值:`'bottomLeft'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomRight', 'topLeft', 'topRight', ]), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.arrayOf(PropTypes.bool), /** * 监听或设置已选值,与`format`格式对应 */ value: PropTypes.arrayOf(PropTypes.string), /** * 初始化已选值,与`format`格式对应 */ defaultValue: PropTypes.arrayOf(PropTypes.string), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 形态变体类型,可选项有`'outlined'`、`'borderless'`、`'filled'`、`'underlined'`,其中`'outlined'`等价于`bordered=True`,但优先级更高 */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 监听或设置当前选择面板是否展开 */ open: PropTypes.bool, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 组件型,底部额外区域内容 */ extraFooter: PropTypes.node, /** * 组件型,前缀内嵌内容 */ prefix: PropTypes.node, /** * 自定义选择框后缀图标内容 */ suffixIcon: PropTypes.node, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * 是否需要确认按钮,为`false`时失去焦点即代表选择 * 默认值:`false` */ needConfirm: PropTypes.bool, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdTimeRangePicker.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdTimeRangePicker; export const propTypes = AntdTimeRangePicker.propTypes; export const defaultProps = AntdTimeRangePicker.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdTransfer.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTransfer = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdTransfer.react' ) ); /** * 穿梭框组件AntdTransfer */ const AntdTransfer = ({ id, className, style, key, name, enableBatchControl = true, locale = 'zh-cn', setProps, dataSource, selectionsIcon, height, pagination = false, oneWay = false, operations = ['', ''], showSearch = false, optionFilterMode = 'case-insensitive', showSelectAll = true, titles, disabled = false, targetKeys = [], status, readOnly = false, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; AntdTransfer.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 配置选项 */ dataSource: PropTypes.arrayOf( PropTypes.exact({ /** * 当前选项唯一识别id */ key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 组件型,当前选项标题内容 */ title: PropTypes.node, /** * 是否禁用当前选项 * 默认值:`false` */ disabled: PropTypes.bool, }) ), /** * 组件型,自定义下拉菜单图标 */ selectionsIcon: PropTypes.node, /** * 穿梭框整体高度 */ height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), // 用于设置是否以分页模式展示左右区域内部超长的项目集合,默认为false /** * 选项分页展示配置 * 默认值:`false` */ pagination: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 每页最大选项数 */ pageSize: PropTypes.number, }), ]), /** * 是否启用单向模式 * 默认值:`false` */ oneWay: PropTypes.bool, /** * 左右移动操作按钮内容 * 默认值:`'['', '']'` */ operations: PropTypes.arrayOf(PropTypes.node), /** * 是否显示搜索框 * 默认值:`false` */ showSearch: PropTypes.bool, /** * 搜索匹配模式,可选项有`'case-insensitive'`(大小写不敏感)、`'case-sensitive'`(大小写敏感)、`'regex'`(正则表达式) * 默认值:`'case-insensitive'` */ optionFilterMode: PropTypes.oneOf([ 'case-insensitive', 'case-sensitive', 'regex', ]), /** * 是否显示全选勾选框 * 默认值:`true` */ showSelectAll: PropTypes.bool, /** * 左右标题内容 */ titles: PropTypes.arrayOf(PropTypes.node), /** * 监听或设置右侧区域已选项`key`值 */ targetKeys: PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.number, PropTypes.string]) ), /** * 监听最近一次选项移动对应方向,可选项有`'left'`、`'right'` */ moveDirection: PropTypes.oneOf(['left', 'right']), /** * 监听最近一次选项移动涉及的选项`key`值 */ moveKeys: PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.number, PropTypes.string]) ), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'targetKeys'` * 默认值:`['targetKeys']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['targetKeys'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdTransfer.dashPersistence = { persisted_props: ['targetKeys'], persistence_type: 'local', }; export default AntdTransfer; export const propTypes = AntdTransfer.propTypes; export const defaultProps = AntdTransfer.defaultProps; ================================================ FILE: src/lib/components/dataEntry/AntdTreeSelect.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdTreeSelect = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdTreeSelect.react' ) ); /** * 树选择组件AntdTreeSelect */ const AntdTreeSelect = ({ id, style, className, popupClassName, key, name, enableBatchControl = true, locale = 'zh-cn', treeData, treeNodeKeyToTitle, treeDataMode = 'tree', allowClear = true, bordered = true, variant, treeLine = false, listHeight = 256, placeholder, value, defaultValue, maxCount, maxTagCount, maxTagPlaceholder, maxTagTextLength, multiple = false, size = 'middle', prefix, suffixIcon, switcherIcon, treeCheckable = false, treeCheckStrictly = false, treeDefaultExpandAll = false, treeDefaultExpandedKeys, treeExpandedKeys, virtual = true, disabled = false, placement = 'bottomLeft', status, treeNodeFilterProp = 'value', treeNodeFilterMode = 'case-insensitive', autoClearSearchValue = true, popupContainer = 'body', setProps, readOnly, showCheckedStrategy = 'show-all', dropdownBefore, dropdownAfter, enableAsyncLoad = false, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { return ( ); }; // 定义递归PropTypes const PropTreeNodeShape = { /** * 当前节点标题 */ title: PropTypes.string.isRequired, /** * 当前节点唯一识别id */ key: PropTypes.string.isRequired, /** * 当前节点唯一值 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, /** * 是否禁用当前节点 */ disabled: PropTypes.bool, /** * 当`treeCheckable=True`时,控制当前节点是否显示勾选框 */ checkable: PropTypes.bool, /** * 当`treeCheckable=True`时,是否禁用当前节点勾选框 */ disableCheckbox: PropTypes.bool, /** * 当前节点是否可选择 */ selectable: PropTypes.bool, /** * 当前节点是否为叶节点(末端节点) */ isLeaf: PropTypes.bool, }; const PropTreeNode = PropTypes.shape(PropTreeNodeShape); PropTreeNodeShape.children = PropTypes.arrayOf(PropTreeNode); const treeDataPropTypes = PropTypes.arrayOf(PropTreeNode); // 定义扁平结构节点类型 const PropFlatNodeShape = { /** * 当前节点标题 */ title: PropTypes.string.isRequired, /** * 当前节点唯一识别id */ key: PropTypes.string.isRequired, /** * 当前节点唯一值 */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, /** * 是否禁用当前节点 */ disabled: PropTypes.bool, /** * 当`treeCheckable=True`时,控制当前节点是否显示勾选框 */ checkable: PropTypes.bool, /** * 当`treeCheckable=True`时,是否禁用当前节点勾选框 */ disableCheckbox: PropTypes.bool, /** * 当前节点是否可选择 */ selectable: PropTypes.bool, /** * 当前节点是否为末端节点 */ isLeaf: PropTypes.bool, /** * 当前节点所属父节点`key`值 */ parent: PropTypes.string, }; AntdTreeSelect.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 展开菜单css类名 */ popupClassName: PropTypes.string, /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 对应`treeData`格式的渲染模式,可选项有`'tree'`(树形模式)、`'flat'`(扁平模式) * 默认值:`'tree'` */ treeDataMode: PropTypes.oneOf(['tree', 'flat']), /** * 定义构造树所需的数据结构,与`treeDataMode`一致 */ treeData: PropTypes.oneOfType([ /** * 树形模式对应结构 */ treeDataPropTypes, /** * 扁平模式对应结构 */ PropTypes.arrayOf(PropFlatNodeShape), ]).isRequired, /** * 针对树结构中的指定节点,定义作为标题的组件型内容,优先级高于`treeData`中对应的`title`值 */ treeNodeKeyToTitle: PropTypes.objectOf(PropTypes.node), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当前组件尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 是否显示边框,设置为`true`时等价于`variant='outlined'` * 默认值:`true` */ bordered: PropTypes.bool, /** * 设置形态变体类型,可选的有'outlined'、'borderless'、'filled'、`'underlined'`,其中'outlined'等价于bordered=true,优先级高于bordered */ variant: PropTypes.oneOf([ 'outlined', 'borderless', 'filled', 'underlined', ]), /** * 输入框占位文字内容 */ placeholder: PropTypes.string, /** * 选择菜单展开方向,可选项有`'bottomLeft'`、`'bottomRight'`、`'topLeft'`、`'topRight'` * 默认值:`'bottomLeft'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomRight', 'topLeft', 'topRight', ]), /** * 是否显示连接线 * 默认值:`false` */ treeLine: PropTypes.bool, /** * 监听或设置已选值 */ value: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ), ]), /** * 初始化已选值 */ defaultValue: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.string, PropTypes.number]) ), ]), /** * 当`multiple=True`时,可选中的最大数量 * 如果`showCheckedStrategy='show-all'`且`treeCheckStrictly=False`,或者`showCheckedStrategy='show-parent'`,则`maxCount`无效 */ maxCount: PropTypes.number, /** * 当`multiple=True`时,已选值tag展示的最大数量 */ maxTagCount: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['responsive']), ]), /** * 当`multiple=True`时,隐藏已选值tag时显示的内容 */ maxTagPlaceholder: PropTypes.node, /** * 当`multiple=True`时,最大显示的已选值tag文本长度 */ maxTagTextLength: PropTypes.number, /** * 选择菜单最大像素高度 * 默认值:`256` */ listHeight: PropTypes.number, /** * 是否开启多选模式 * 默认值:`false` */ multiple: PropTypes.bool, /** * 组件型,自定义的选择框后缀图标 */ suffixIcon: PropTypes.node, /** * 组件型,自定义树节点的展开/折叠图标 */ switcherIcon: PropTypes.node, /** * 树节点是否可勾选 * 默认值:`false` */ treeCheckable: PropTypes.bool, /** * 节点与其后代节点之间的选择行为是否彼此独立 * 默认值:`false` */ treeCheckStrictly: PropTypes.bool, /** * 初始化是否展开全部节点 * 默认值:`false` */ treeDefaultExpandAll: PropTypes.bool, /** * 初始化已展开节点`key`值数组 */ treeDefaultExpandedKeys: PropTypes.arrayOf(PropTypes.string), /** * 监听或设置已展开节点`key`值数组 */ treeExpandedKeys: PropTypes.arrayOf(PropTypes.string), /** * 是否开启虚拟滚动 * 默认值:`true` */ virtual: PropTypes.bool, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * 是否允许一键清空已选值 * 默认值:`true` */ allowClear: PropTypes.bool, /** * 基于搜索框中输入内容进行搜索的目标字段,可选项有`'value'`、`'title'` * 默认值:`'value'` */ treeNodeFilterProp: PropTypes.oneOf(['title', 'value']), /** * 搜索匹配模式,可选项有`'case-insensitive'`(大小写不敏感)、`'case-sensitive'`(大小写敏感)、`'regex'`(正则表达式) * 默认值:`'case-insensitive'` */ treeNodeFilterMode: PropTypes.oneOf([ 'case-insensitive', 'case-sensitive', 'regex', ]), /** * 当`multiple=true`时,设置是否在选中项后自动清空搜索框中的内容 * 默认值:`true` */ autoClearSearchValue: PropTypes.bool, /** * 已选项回填搜索框策略,可选项有`'show-all'`、`'show-parent'`、`'show-child'` * 默认值:`'show-all'` */ showCheckedStrategy: PropTypes.oneOf([ 'show-all', 'show-parent', 'show-child', ]), /** * 组件型,选择菜单前缀内容 */ dropdownBefore: PropTypes.node, /** * 组件型,选择菜单后缀内容 */ dropdownAfter: PropTypes.node, /** * 组件型,前缀内嵌内容 */ prefix: PropTypes.node, /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * 是否开启子节点异步加载功能,开启后无`children`属性,且未设置`isLeaf`为`true`的节点将可展开并触发`loadingNode`事件更新 * 默认值:`false` */ enableAsyncLoad: PropTypes.bool, /** * 监听触发异步数据加载的节点展开事件信息 */ loadingNode: PropTypes.object, /** * 相关展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入[批量属性监听](/batch-props-values)的若干属性名 */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 监听`batchPropsNames`中指定的若干属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdTreeSelect.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdTreeSelect; export const propTypes = AntdTreeSelect.propTypes; export const defaultProps = AntdTreeSelect.defaultProps; ================================================ FILE: src/lib/components/dataEntry/check-card/AntdCheckCard.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCheckCard = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../../fragments/dataEntry/check-card/AntdCheckCard.react' ) ); /** * 选择卡片组件AntdCheckCard */ const AntdCheckCard = ({ id, children, className, style, key, name, enableBatchControl = true, checked, bordered = true, value, defaultChecked, disabled = false, size = 'default', readOnly = false, setProps, persistence, persisted_props, persistence_type, ...others }) => { return ( ); }; AntdCheckCard.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 监听或设置是否被选中 */ checked: PropTypes.bool, /** * 初始化是否被选中 */ defaultChecked: PropTypes.bool, /** * 是否显示边框 * 默认值:`true` */ bordered: PropTypes.bool, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当前组件尺寸规格,可选项有`'small'`、`'default'`、`'large'` * 默认值:`'default'` */ size: PropTypes.oneOf(['small', 'default', 'large']), /** * 当前选择卡片值 */ value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'checked'` * 默认值:`['checked']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['checked'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdCheckCard.dashPersistence = { persisted_props: ['checked'], persistence_type: 'local', }; export default AntdCheckCard; export const propTypes = AntdCheckCard.propTypes; export const defaultProps = AntdCheckCard.defaultProps; ================================================ FILE: src/lib/components/dataEntry/check-card/AntdCheckCardGroup.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdCheckCardGroup = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../../fragments/dataEntry/check-card/AntdCheckCardGroup.react' ) ); /** * 组合选择卡片组件AntdCheckCardGroup */ const AntdCheckCardGroup = ({ id, children, className, style, key, name, enableBatchControl = true, multiple = false, allowNoValue = true, bordered = true, value, defaultValue, disabled = false, size = 'default', readOnly = false, setProps, persistence, persisted_props, persistence_type, ...others }) => { return ( ); }; AntdCheckCardGroup.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌若干`AntdCheckCard`相关组件 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 是否开启多选 * 默认值:`false` */ multiple: PropTypes.bool, /** * 是否允许当前组合选择卡片中仅剩的选项被取消选中 * 默认值:`true` */ allowNoValue: PropTypes.bool, /** * 是否显示边框 * 默认值:`true` */ bordered: PropTypes.bool, /** * 监听或设置已选中卡片值 */ value: PropTypes.oneOfType([ PropTypes.oneOfType([PropTypes.number, PropTypes.string]), PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.number, PropTypes.string]) ), ]), /** * 初始化已选中卡片值 */ defaultValue: PropTypes.oneOfType([ PropTypes.oneOfType([PropTypes.number, PropTypes.string]), PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.number, PropTypes.string]) ), ]), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 当前组件尺寸规格,可选项有`'small'`、`'default'`、`'large'` * 默认值:`'default'` */ size: PropTypes.oneOf(['small', 'default', 'large']), /** * 是否渲染为只读状态 * 默认值:`false` */ readOnly: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否开启[属性持久化](/prop-persistence) */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 开启属性持久化功能的若干属性名,可选项有`'value'` * 默认值:`['value']` */ persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])), /** * 属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化) * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdCheckCardGroup.dashPersistence = { persisted_props: ['value'], persistence_type: 'local', }; export default AntdCheckCardGroup; export const propTypes = AntdCheckCardGroup.propTypes; export const defaultProps = AntdCheckCardGroup.defaultProps; ================================================ FILE: src/lib/components/dataEntry/form/AntdForm.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdForm = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../../fragments/dataEntry/form/AntdForm.react' ) ); /** * 表单组件AntdForm */ const AntdForm = ({ id, children, className, style, key, labelCol, wrapperCol, colon = true, labelAlign = 'right', labelWrap = false, layout = 'horizontal', enableBatchControl = false, values, validateStatuses, helps, tooltips, setProps, ...others }) => { return ( ); }; AntdForm.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌相关`AntdFormItem`组件或常用表单输入类组件 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 表单布局模式,可选项有`'horizontal'`、`'vertical'`、`'inline'` * 默认值:`'horizontal'` */ layout: PropTypes.oneOf(['horizontal', 'vertical', 'inline']), /** * 配置表单项标签部分相关参数 */ labelCol: PropTypes.exact({ /** * 标签部分所占宽度份数(总份数24) */ span: PropTypes.number, /** * 标签部分向右偏移宽度份数 */ offset: PropTypes.number, /** * 同css中的flex属性,用于更灵活的控制标签部分所占宽度 */ flex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), }), /** * 配置表单项控件部分相关参数 */ wrapperCol: PropTypes.exact({ /** * 控件部分所占宽度份数(总份数24) */ span: PropTypes.number, /** * 控件部分向右偏移宽度份数 */ offset: PropTypes.number, /** * 同css中的flex属性,用于更灵活的控制控件部分所占宽度 */ flex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), }), /** * 当`layput='horizontal'`时,控制是否在表单项标签部分末尾添加冒号 */ colon: PropTypes.bool, /** * 表单项标签部分文本对齐方式,可选项有`'left'`、`'right'` * 默认值:`'right'` */ labelAlign: PropTypes.oneOf(['left', 'right']), /** * 针对超长表单项标签是否允许换行 * 默认值:`false` */ labelWrap: PropTypes.bool, /** * 是否启用表单批量控制功能,开启后会导致部分性能的损耗 * 默认值:`false` */ enableBatchControl: PropTypes.bool, /** * 当`enableBatchControl=True`时,可用于监听或设置搜集内部表单输入类组件的输入值变化情况,开启后内部表单输入类组件自身的`defaultValue`、`value`参数将会失效 */ values: PropTypes.object, /** * 当`enableBatchControl=True`时,可用于统一设置内部各`AntdFormItem`组件的`validateStatus`值,键为对应`AntdFormItem`组件的`label`值,优先级低于各`AntdFormItem`组件的`validateStatus`值 */ validateStatuses: PropTypes.objectOf( /** * 校验状态值,可选项有`'success'`、`'warning'`、`'error'`、`'validating'` */ PropTypes.oneOf(['success', 'warning', 'error', 'validating']) ), /** * 当`enableBatchControl=True`时,可用于统一设置内部各`AntdFormItem`组件的`help`值,键为对应`AntdFormItem`组件的`label`值,优先级低于各`AntdFormItem`组件的`help`值 */ helps: PropTypes.objectOf(PropTypes.node), /** * 当`enableBatchControl=True`时,可用于统一设置内部各`AntdFormItem`组件的`tooltip`值,键为对应`AntdFormItem`组件的`label`值,优先级低于各`AntdFormItem`组件的`tooltip`值 */ tooltips: PropTypes.objectOf(PropTypes.node), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdForm; export const propTypes = AntdForm.propTypes; export const defaultProps = AntdForm.defaultProps; ================================================ FILE: src/lib/components/dataEntry/form/AntdFormItem.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdFormItem = React.lazy( () => import( /* webpackChunkName: "data_entry" */ '../../../fragments/dataEntry/form/AntdFormItem.react' ) ); /** * 表单项组件AntdFormItem */ const AntdFormItem = ({ id, children, className, style, key, labelCol, colon, wrapperCol, label, labelAlign, tooltip, extra, help, hidden = false, required = false, validateStatus, hasFeedback = false, layout, setProps, ...others }) => { return ( ); }; AntdFormItem.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌相关常用表单输入类组件 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 是否显示表示必填项的额外“*”标识 * 默认值:`false` */ required: PropTypes.bool, /** * 配置表单项标签部分相关参数,优先级高于所属`AntdForm`中的`labelCol`参数 */ labelCol: PropTypes.exact({ /** * 标签部分所占宽度份数(总份数24) */ span: PropTypes.number, /** * 标签部分向右偏移宽度份数 */ offset: PropTypes.number, /** * 同css中的flex属性,用于更灵活的控制标签部分所占宽度 */ flex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), }), /** * 配置表单项控件部分相关参数,优先级高于所属`AntdForm`中的`labelCol`参数 */ wrapperCol: PropTypes.exact({ /** * 控件部分所占宽度份数(总份数24) */ span: PropTypes.number, /** * 控件部分向右偏移宽度份数 */ offset: PropTypes.number, /** * 同css中的flex属性,用于更灵活的控制控件部分所占宽度 */ flex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), }), /** * 当`layout='horizontal'`时,控制是否在表单项标签部分末尾添加冒号,优先级高于所属`AntdForm`中的`colon`参数 */ colon: PropTypes.bool, /** * 组件型,当前表单项标签内容 */ label: PropTypes.node, /** * 表单项标签部分文本对齐方式,可选项有`'left'`、`'right'`,优先级高于所属`AntdForm`中的`labelAlign`参数 * 默认值:`'right'` */ labelAlign: PropTypes.oneOf(['left', 'right']), /** * 组件型,当前表单项标签内容后的额外文字提示信息 */ tooltip: PropTypes.node, /** * 组件型,当前表单项额外提示信息 */ extra: PropTypes.node, /** * 控制校验状态,可选项有`'success'`、`'warning'`、`'error'`、`'validating'` */ validateStatus: PropTypes.oneOf([ 'success', 'warning', 'error', 'validating', ]), /** * 与`validateStatus`设定的状态对应,用于控制是否显示额外的状态图标 * 默认值:`false` */ hasFeedback: PropTypes.bool, /** * 组件型,与`validateStatus`状态一致的额外说明内容 */ help: PropTypes.node, /** * 是否隐藏当前字段 * 默认值:`false` */ hidden: PropTypes.bool, /** * 表单项布局模式,可选项有`'horizontal'`、`'vertical'` */ layout: PropTypes.oneOf(['horizontal', 'vertical']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdFormItem; export const propTypes = AntdFormItem.propTypes; export const defaultProps = AntdFormItem.defaultProps; ================================================ FILE: src/lib/components/dataEntry/upload/AntdDraggerUpload.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdDraggerUpload = React.lazy( () => import( /* webpackChunkName: "upload" */ '../../../fragments/upload/AntdDraggerUpload.react' ) ); /** * 文件拖拽上传组件AntdDraggerUpload */ const AntdDraggerUpload = ({ id, className, style, draggerClassName, draggerStyle, key, name, enableBatchControl = true, locale = 'zh-cn', apiUrl, apiUrlExtraParams, headers, withCredentials = false, withOriginFileObj = false, downloadUrl, downloadUrlExtraParams, downloadUrlFromBackend = false, icon, text, hint, uploadId, fileListMaxLength = null, fileTypes, fileMaxSize = 500, showUploadList = true, multiple = false, directory = false, failedTooltipInfo, confirmBeforeDelete = false, showPercent = false, progressProps, showSuccessMessage = true, showErrorMessage = true, pastable = false, listUploadTaskRecord = [], defaultFileList, disabled = false, status, setProps, ...others }) => { return ( ); }; AntdDraggerUpload.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 拖拽区域css类名,支持[动态css](/advanced-classname) */ draggerClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 拖拽区域css样式 */ draggerStyle: PropTypes.object, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 文件上传服务接口地址 */ apiUrl: PropTypes.string, /** * 文件上传服务接口额外参数 */ apiUrlExtraParams: PropTypes.object, /** * 文件上传服务接口额外headers参数 */ headers: PropTypes.object, /** * 是否在请求上传服务接口时自动携带cookies等凭据信息 * 默认值:`false` */ withCredentials: PropTypes.bool, /** * `listUploadTaskRecord`监听结果中是否额外记录浏览器原生`originFileObj`相关信息 * 默认值:`false` */ withOriginFileObj: PropTypes.bool, /** * 对应已上传文件的`GET`类型下载服务接口地址,自带参数`taskId`、`filename` */ downloadUrl: PropTypes.string, /** * 配合`downloadUrl`参数,设置文件下载服务接口额外参数 */ downloadUrlExtraParams: PropTypes.object, /** * 是否将文件上传接口返回信息中的`url`属性作为下载链接地址 * 默认值:`false` */ downloadUrlFromBackend: PropTypes.bool, /** * 组件型,自定义上传图标 */ icon: PropTypes.node, /** * 组件型,上传区域主要文字说明内容 */ text: PropTypes.node, /** * 组件型,上传区域次要文字说明内容 */ hint: PropTypes.node, /** * 限制已上传文件列表长度上限 */ fileListMaxLength: PropTypes.number, /** * 允许上传的文件后缀名列表,默认不限制 */ fileTypes: PropTypes.arrayOf(PropTypes.string), /** * 自定义当前组件发起文件上传请求时携带的`uploadId`参数,可用于辅助后端创建文件上传所在文件夹 */ uploadId: PropTypes.string, /** * 文件上传尺寸上限,单位:兆 */ fileMaxSize: PropTypes.number, /** * 是否开启多文件上传模式 * 默认值:`false` */ multiple: PropTypes.bool, /** * 是否开启文件夹上传模式 * 默认值:`false` */ directory: PropTypes.bool, /** * 文件上传失败消息提示文字内容 * 默认值:`'上传失败'` */ failedTooltipInfo: PropTypes.string, /** * 是否显示已上传文件列表 * 默认值:`true` */ showUploadList: PropTypes.bool, /** * 是否为已上传文件删除操作添加二次确认模态框 * 默认值:`false` */ confirmBeforeDelete: PropTypes.bool, /** * 是否显示上传进度条 * 默认值:`false` */ showPercent: PropTypes.bool, /** * 配置上传进度条相关参数 */ progressProps: PropTypes.exact({ /** * 进度条颜色 */ strokeColor: PropTypes.oneOfType([ PropTypes.string, /** * 配置渐变色 */ PropTypes.exact({ /** * 渐变色开始颜色 */ from: PropTypes.string, /** * 渐变色结束颜色 */ to: PropTypes.string, }), ]), /** * 进度条像素宽度 */ strokeWidth: PropTypes.number, /** * 进度文字格式 */ format: PropTypes.exact({ /** * 进度文字前缀内容 */ prefix: PropTypes.string, /** * 进度文字后缀内容 * 默认值:`'%'` */ suffix: PropTypes.string, }), }), /** * 是否在每个文件上传成功后,分别弹出消息提示 * 默认值:`true` */ showSuccessMessage: PropTypes.bool, /** * 是否在每个文件上传失败后,分别弹出消息提示 * 默认值:`true` */ showErrorMessage: PropTypes.bool, /** * 是否开启粘贴上传,即本地复制文件后,在页面任意位置粘贴即可完成上传 * 默认值:`false` */ pastable: PropTypes.bool, /** * 监听最近一次文件上传任务相关信息 */ lastUploadTaskRecord: PropTypes.oneOfType([ PropTypes.exact({ /** * 文件名称 */ fileName: PropTypes.string, /** * 文件大小 */ fileSize: PropTypes.number, /** * 上传完成时间戳 */ completeTimestamp: PropTypes.number, /** * 上传任务状态,`'success'`表示成功,`'failed'`表示失败 */ taskStatus: PropTypes.string, /** * 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息 */ taskId: PropTypes.string, /** * 当前文件的下载链接 */ url: PropTypes.string, /** * 上传任务的接口响应信息 */ uploadResponse: PropTypes.any, }), PropTypes.arrayOf( PropTypes.exact({ /** * 文件名称 */ fileName: PropTypes.string, /** * 文件大小 */ fileSize: PropTypes.number, /** * 上传完成时间戳 */ completeTimestamp: PropTypes.number, /** * 上传任务状态,`'success'`表示成功,`'failed'`表示失败 */ taskStatus: PropTypes.string, /** * 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息 */ taskId: PropTypes.string, /** * 当前文件的下载链接 */ url: PropTypes.string, /** * 上传任务的接口响应信息 */ uploadResponse: PropTypes.any, }) ), ]), /** * 监听当前已上传文件列表中上传任务相关信息 */ listUploadTaskRecord: PropTypes.arrayOf( PropTypes.exact({ /** * 文件名称 */ fileName: PropTypes.string, /** * 文件大小 */ fileSize: PropTypes.number, /** * 上传完成时间戳 */ completeTimestamp: PropTypes.number, /** * 上传任务状态,`'success'`表示成功,`'failed'`表示失败 */ taskStatus: PropTypes.string, /** * 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息 */ taskId: PropTypes.string, /** * 当前文件上传唯一识别id,前端自动生成 */ uid: PropTypes.string, /** * 当前文件下载链接 */ url: PropTypes.string, /** * 上传任务的接口响应信息 */ uploadResponse: PropTypes.any, /** * 当`withOriginFileObj=True`时,监听当前文件上传任务对应的`originFileObj`主要信息 */ originFileObj: PropTypes.any, }) ), /** * 初始化文件列表展示信息 */ defaultFileList: PropTypes.arrayOf( PropTypes.exact({ /** * 当前文件名称 */ name: PropTypes.string, /** * 当前文件展示状态,可选项有`'done'`、`'error'`、`'removed'` */ status: PropTypes.oneOf(['done', 'error', 'removed']), /** * 当前文件唯一识别id */ uid: PropTypes.any, /** * 当前文件下载链接 */ url: PropTypes.string, /** * 若传入有效值,将作为当前组件的`uploadId`参数 */ taskId: PropTypes.string, /** * 当前文件大小 */ fileSize: PropTypes.number, }) ), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdDraggerUpload; export const propTypes = AntdDraggerUpload.propTypes; export const defaultProps = AntdDraggerUpload.defaultProps; ================================================ FILE: src/lib/components/dataEntry/upload/AntdPictureUpload.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdPictureUpload = React.lazy( () => import( /* webpackChunkName: "upload" */ '../../../fragments/upload/AntdPictureUpload.react' ) ); /** * 图片上传组件AntdPictureUpload */ const AntdPictureUpload = ({ id, className, style, key, name, enableBatchControl = true, locale = 'zh-cn', apiUrl, apiUrlExtraParams, headers, withCredentials = false, downloadUrl, downloadUrlExtraParams, downloadUrlFromBackend = false, editable = false, editConfig, uploadId, fileListMaxLength = null, buttonContent, fileTypes = [ 'tiff', 'bmp', 'gif', 'png', 'jpeg', 'jpg', 'webp', 'ico', 'tif', ], fileMaxSize = 10, failedTooltipInfo, showRemoveIcon = true, showPreviewIcon = true, confirmBeforeDelete = false, showPercent = false, progressProps, showSuccessMessage = true, showErrorMessage = true, pastable = false, listUploadTaskRecord = [], defaultFileList, disabled = false, status, setProps, ...others }) => { return ( ); }; AntdPictureUpload.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 文件上传服务接口地址 */ apiUrl: PropTypes.string, /** * 文件上传服务接口额外参数 */ apiUrlExtraParams: PropTypes.object, /** * 文件上传服务接口额外headers参数 */ headers: PropTypes.object, /** * 是否在请求上传服务接口时自动携带cookies等凭据信息 * 默认值:`false` */ withCredentials: PropTypes.bool, /** * 对应已上传文件的`GET`类型下载服务接口地址,自带参数`taskId`、`filename` */ downloadUrl: PropTypes.string, /** * 配合`downloadUrl`参数,设置文件下载服务接口额外参数 */ downloadUrlExtraParams: PropTypes.object, /** * 是否将文件上传接口返回信息中的`url`属性作为下载链接地址 * 默认值:`false` */ downloadUrlFromBackend: PropTypes.bool, /** * 是否为图片上传过程添加裁切、旋转等预处理功能 * 默认值:`false` */ editable: PropTypes.bool, /** * 当`editable=True`时,配置图片编辑相关功能 */ editConfig: PropTypes.exact({ /** * 裁切区域宽高比 * 默认值:`1` */ aspect: PropTypes.number, /** * 裁切区域形状,可选项有`'rect'`、`'round'` * 默认值:`'rect'` */ shape: PropTypes.oneOf(['rect', 'round']), /** * 是否显示裁切区域辅助网格线 * 默认值:`false` */ grid: PropTypes.bool, /** * 图片质量,取值应在0到1之间 * 默认值:`0.4` */ quality: PropTypes.number, /** * 是否启用图片缩放功能 * 默认值:`true` */ zoom: PropTypes.bool, /** * 是否启用图片旋转功能 * 默认值:`false` */ rotate: PropTypes.bool, /** * 开启缩放功能时,设置最小缩放倍数 * 默认值:`1` */ minZoom: PropTypes.number, /** * 开启缩放功能时,设置最大缩放倍数 * 默认值:`3` */ maxZoom: PropTypes.number, /** * 组件型,图片编辑模态框的标题 * 默认值:`'编辑图片'` */ modalTitle: PropTypes.node, /** * 图片编辑模态框像素宽度 * 默认值:`520` */ modalWidth: PropTypes.number, /** * 组件型,图片编辑模态框确认按钮内容 * 默认值:`'确定'` */ modalOk: PropTypes.node, /** * 组件型,图片编辑模态框取消按钮内容 * 默认值:`'取消'` */ modalCancel: PropTypes.node, }), /** * 限制已上传文件列表长度上限 */ fileListMaxLength: PropTypes.number, /** * 允许上传的文件后缀名列表 * 默认值:`['tiff', 'bmp', 'gif', 'png', 'jpeg', 'jpg', 'webp', 'ico', 'tif']` */ fileTypes: PropTypes.arrayOf(PropTypes.string), /** * 组件型,上传按钮内容 */ buttonContent: PropTypes.node, /** * 自定义当前组件发起文件上传请求时携带的`uploadId`参数,可用于辅助后端创建文件上传所在文件夹 */ uploadId: PropTypes.string, /** * 文件上传尺寸上限,单位:兆 */ fileMaxSize: PropTypes.number, /** * 文件上传失败消息提示文字内容 * 默认值:`'上传失败'` */ failedTooltipInfo: PropTypes.string, /** * 已上传图片是否显示删除按钮 * 默认值:`true` */ showRemoveIcon: PropTypes.bool, /** * 已上传图片是否显示预览按钮 * 默认值:`true` */ showPreviewIcon: PropTypes.bool, /** * 是否为已上传文件删除操作添加二次确认模态框 * 默认值:`false` */ confirmBeforeDelete: PropTypes.bool, /** * 是否显示上传进度条 * 默认值:`false` */ showPercent: PropTypes.bool, /** * 配置上传进度条相关参数 */ progressProps: PropTypes.exact({ /** * 进度条颜色 */ strokeColor: PropTypes.oneOfType([ PropTypes.string, /** * 配置渐变色 */ PropTypes.exact({ /** * 渐变色开始颜色 */ from: PropTypes.string, /** * 渐变色结束颜色 */ to: PropTypes.string, }), ]), /** * 进度条像素宽度 */ strokeWidth: PropTypes.number, /** * 进度文字格式 */ format: PropTypes.exact({ /** * 进度文字前缀内容 */ prefix: PropTypes.string, /** * 进度文字后缀内容 * 默认值:`'%'` */ suffix: PropTypes.string, }), }), /** * 是否在每个文件上传成功后,分别弹出消息提示 * 默认值:`true` */ showSuccessMessage: PropTypes.bool, /** * 是否在每个文件上传失败后,分别弹出消息提示 * 默认值:`true` */ showErrorMessage: PropTypes.bool, /** * 是否开启粘贴上传,即本地复制文件后,在页面任意位置粘贴即可完成上传 * 默认值:`false` */ pastable: PropTypes.bool, /** * 监听最近一次文件上传任务相关信息 */ lastUploadTaskRecord: PropTypes.oneOfType([ PropTypes.exact({ /** * 文件名称 */ fileName: PropTypes.string, /** * 文件大小 */ fileSize: PropTypes.number, /** * 上传完成时间戳 */ completeTimestamp: PropTypes.number, /** * 上传任务状态,`'success'`表示成功,`'failed'`表示失败 */ taskStatus: PropTypes.string, /** * 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息 */ taskId: PropTypes.string, /** * 当前文件的下载链接 */ url: PropTypes.string, /** * 上传任务的接口响应信息 */ uploadResponse: PropTypes.any, }), PropTypes.arrayOf( PropTypes.exact({ /** * 文件名称 */ fileName: PropTypes.string, /** * 文件大小 */ fileSize: PropTypes.number, /** * 上传完成时间戳 */ completeTimestamp: PropTypes.number, /** * 上传任务状态,`'success'`表示成功,`'failed'`表示失败 */ taskStatus: PropTypes.string, /** * 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息 */ taskId: PropTypes.string, /** * 当前文件的下载链接 */ url: PropTypes.string, /** * 上传任务的接口响应信息 */ uploadResponse: PropTypes.any, }) ), ]), /** * 监听当前已上传文件列表中上传任务相关信息 */ listUploadTaskRecord: PropTypes.arrayOf( PropTypes.exact({ /** * 文件名称 */ fileName: PropTypes.string, /** * 文件大小 */ fileSize: PropTypes.number, /** * 上传完成时间戳 */ completeTimestamp: PropTypes.number, /** * 上传任务状态,`'success'`表示成功,`'failed'`表示失败 */ taskStatus: PropTypes.string, /** * 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息 */ taskId: PropTypes.string, /** * 当前文件上传唯一识别id,前端自动生成 */ uid: PropTypes.string, /** * 当前文件下载链接 */ url: PropTypes.string, /** * 上传任务的接口响应信息 */ uploadResponse: PropTypes.any, }) ), /** * 初始化文件列表展示信息 */ defaultFileList: PropTypes.arrayOf( PropTypes.exact({ /** * 当前文件名称 */ name: PropTypes.string, /** * 当前文件展示状态,可选项有`'done'`、`'error'`、`'removed'` */ status: PropTypes.oneOf(['done', 'error', 'removed']), /** * 当前文件唯一识别id */ uid: PropTypes.any, /** * 当前文件下载链接 */ url: PropTypes.string, /** * 若传入有效值,将作为当前组件的`uploadId`参数 */ taskId: PropTypes.string, /** * 当前文件大小 */ fileSize: PropTypes.number, }) ), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdPictureUpload; export const propTypes = AntdPictureUpload.propTypes; export const defaultProps = AntdPictureUpload.defaultProps; ================================================ FILE: src/lib/components/dataEntry/upload/AntdUpload.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdUpload = React.lazy( () => import( /* webpackChunkName: "upload" */ '../../../fragments/upload/AntdUpload.react' ) ); /** * 文件上传组件AntdUpload */ const AntdUpload = ({ id, className, style, key, name, enableBatchControl = true, locale = 'zh-cn', apiUrl, apiUrlExtraParams, headers, withCredentials = false, withOriginFileObj = false, downloadUrl, downloadUrlExtraParams = {}, downloadUrlFromBackend = false, uploadId, fileListMaxLength = null, buttonContent, buttonIcon, buttonProps, fileTypes, fileMaxSize = 500, showUploadList = true, multiple = false, directory = false, failedTooltipInfo, confirmBeforeDelete = false, showPercent = false, progressProps, showSuccessMessage = true, showErrorMessage = true, pastable = false, listUploadTaskRecord = [], defaultFileList, disabled = false, status, setProps, ...others }) => { return ( ); }; AntdUpload.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配合`AntdForm`表单批量值搜集/控制功能使用,充当当前表单项的字段名,以`id`作为缺省值 */ name: PropTypes.string, /** * 控制当前组件是否参与有效的`AntdForm`表单批量值搜集/控制功能 * 默认值:`true` */ enableBatchControl: PropTypes.bool, /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 文件上传服务接口地址 */ apiUrl: PropTypes.string, /** * 文件上传服务接口额外参数 */ apiUrlExtraParams: PropTypes.object, /** * 文件上传服务接口额外headers参数 */ headers: PropTypes.object, /** * 是否在请求上传服务接口时自动携带cookies等凭据信息 * 默认值:`false` */ withCredentials: PropTypes.bool, /** * `listUploadTaskRecord`监听结果中是否额外记录浏览器原生`originFileObj`相关信息 * 默认值:`false` */ withOriginFileObj: PropTypes.bool, /** * 对应已上传文件的`GET`类型下载服务接口地址,自带参数`taskId`、`filename` */ downloadUrl: PropTypes.string, /** * 配合`downloadUrl`参数,设置文件下载服务接口额外参数 */ downloadUrlExtraParams: PropTypes.object, /** * 是否将文件上传接口返回信息中的`url`属性作为下载链接地址 * 默认值:`false` */ downloadUrlFromBackend: PropTypes.bool, /** * 限制已上传文件列表长度上限 */ fileListMaxLength: PropTypes.number, /** * 允许上传的文件后缀名列表,默认不限制 */ fileTypes: PropTypes.arrayOf(PropTypes.string), /** * 组件型,自定义上传按钮内容 */ buttonContent: PropTypes.node, /** * 组件型,自定义上传按钮图标 */ buttonIcon: PropTypes.node, /** * 配置上传按钮相关参数 */ buttonProps: PropTypes.exact({ /** * 按钮尺寸规格,可选项有`'default'`、`'small'`、`'large'` * 默认值:`'default'` */ size: PropTypes.oneOf(['default', 'small', 'large']), /** * 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` * 默认值:`'default'` */ type: PropTypes.oneOf([ 'primary', 'ghost', 'dashed', 'link', 'text', 'default', ]), /** * 按钮是否渲染危险状态 * 默认值:`false` */ danger: PropTypes.bool, /** * 按钮是否撑满父元素 * 默认值:`false` */ block: PropTypes.bool, /** * 按钮css样式 */ style: PropTypes.object, /** * 按钮css类名 */ className: PropTypes.string, }), /** * 自定义当前组件发起文件上传请求时携带的`uploadId`参数,可用于辅助后端创建文件上传所在文件夹 */ uploadId: PropTypes.string, /** * 文件上传尺寸上限,单位:兆 */ fileMaxSize: PropTypes.number, /** * 是否开启多文件上传模式 * 默认值:`false` */ multiple: PropTypes.bool, /** * 是否开启文件夹上传模式 * 默认值:`false` */ directory: PropTypes.bool, /** * 文件上传失败消息提示文字内容 * 默认值:`'上传失败'` */ failedTooltipInfo: PropTypes.string, /** * 是否显示已上传文件列表 * 默认值:`true` */ showUploadList: PropTypes.bool, /** * 是否为已上传文件删除操作添加二次确认模态框 * 默认值:`false` */ confirmBeforeDelete: PropTypes.bool, /** * 是否显示上传进度条 * 默认值:`false` */ showPercent: PropTypes.bool, /** * 配置上传进度条相关参数 */ progressProps: PropTypes.exact({ /** * 进度条颜色 */ strokeColor: PropTypes.oneOfType([ PropTypes.string, /** * 配置渐变色 */ PropTypes.exact({ /** * 渐变色开始颜色 */ from: PropTypes.string, /** * 渐变色结束颜色 */ to: PropTypes.string, }), ]), /** * 进度条像素宽度 */ strokeWidth: PropTypes.number, /** * 进度文字格式 */ format: PropTypes.exact({ /** * 进度文字前缀内容 */ prefix: PropTypes.string, /** * 进度文字后缀内容 * 默认值:`'%'` */ suffix: PropTypes.string, }), }), /** * 是否在每个文件上传成功后,分别弹出消息提示 * 默认值:`true` */ showSuccessMessage: PropTypes.bool, /** * 是否在每个文件上传失败后,分别弹出消息提示 * 默认值:`true` */ showErrorMessage: PropTypes.bool, /** * 是否开启粘贴上传,即本地复制文件后,在页面任意位置粘贴即可完成上传 * 默认值:`false` */ pastable: PropTypes.bool, /** * 监听最近一次文件上传任务相关信息 */ lastUploadTaskRecord: PropTypes.oneOfType([ // 单文件 PropTypes.exact({ /** * 文件名称 */ fileName: PropTypes.string, /** * 文件大小 */ fileSize: PropTypes.number, /** * 上传完成时间戳 */ completeTimestamp: PropTypes.number, /** * 上传任务状态,`'success'`表示成功,`'failed'`表示失败 */ taskStatus: PropTypes.string, /** * 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息 */ taskId: PropTypes.string, /** * 当前文件的下载链接 */ url: PropTypes.string, /** * 上传任务的接口响应信息 */ uploadResponse: PropTypes.any, }), PropTypes.arrayOf( PropTypes.exact({ /** * 文件名称 */ fileName: PropTypes.string, /** * 文件大小 */ fileSize: PropTypes.number, /** * 上传完成时间戳 */ completeTimestamp: PropTypes.number, /** * 上传任务状态,`'success'`表示成功,`'failed'`表示失败 */ taskStatus: PropTypes.string, /** * 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息 */ taskId: PropTypes.string, /** * 当前文件的下载链接 */ url: PropTypes.string, /** * 上传任务的接口响应信息 */ uploadResponse: PropTypes.any, }) ), ]), /** * 监听当前已上传文件列表中上传任务相关信息 */ listUploadTaskRecord: PropTypes.arrayOf( PropTypes.exact({ /** * 文件名称 */ fileName: PropTypes.string, /** * 文件大小 */ fileSize: PropTypes.number, /** * 上传完成时间戳 */ completeTimestamp: PropTypes.number, /** * 上传任务状态,`'success'`表示成功,`'failed'`表示失败 */ taskStatus: PropTypes.string, /** * 上传任务唯一识别id,当任务状态为`'failed'`时不会携带此信息 */ taskId: PropTypes.string, /** * 当前文件上传唯一识别id,前端自动生成 */ uid: PropTypes.string, /** * 当前文件下载链接 */ url: PropTypes.string, /** * 上传任务的接口响应信息 */ uploadResponse: PropTypes.any, /** * 当`withOriginFileObj=True`时,监听当前文件上传任务对应的`originFileObj`主要信息 */ originFileObj: PropTypes.any, }) ), /** * 初始化文件列表展示信息 */ defaultFileList: PropTypes.arrayOf( PropTypes.exact({ /** * 当前文件名称 */ name: PropTypes.string, /** * 当前文件展示状态,可选项有`'done'`、`'error'`、`'removed'` */ status: PropTypes.oneOf(['done', 'error', 'removed']), /** * 当前文件唯一识别id */ uid: PropTypes.any, /** * 当前文件下载链接 */ url: PropTypes.string, /** * 若传入有效值,将作为当前组件的`uploadId`参数 */ taskId: PropTypes.string, /** * 当前文件大小 */ fileSize: PropTypes.number, }) ), /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 控制校验状态,可选项有`'error'`、`'warning'` */ status: PropTypes.oneOf(['error', 'warning']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdUpload; export const propTypes = AntdUpload.propTypes; export const defaultProps = AntdUpload.defaultProps; ================================================ FILE: src/lib/components/feedback/AntdAlert.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Alert } from 'antd'; // 辅助库 import TextLoop from 'react-text-loop'; import Marquee from 'react-fast-marquee'; import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 警告提示组件AntdAlert */ const AntdAlert = ({ id, className, style, key, type = 'info', showIcon = false, icon, closable = false, message, messageRenderMode = 'default', description, action, banner = false, setProps, ...others }) => { if (messageRenderMode === 'loop-text' && Array.isArray(message)) { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} message={ {message.map((item) => (
{item}
))}
} type={type} description={description} showIcon={showIcon} icon={icon} closable={closable} action={action} banner={banner} data-dash-is-loading={useLoading()} /> ); } return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} message={ messageRenderMode === 'marquee' ? ( {message} ) : ( message ) } type={type} description={description} showIcon={showIcon} icon={icon} closable={closable} action={action} banner={banner} data-dash-is-loading={useLoading()} /> ); }; AntdAlert.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 主要提示信息内容 */ message: PropTypes.node, /** * 额外提示信息内容 */ description: PropTypes.node, /** * 提示信息类型,可选项有`'success'`、`'info'`、`'warning'`、`'error'` * 默认值:`'info'` */ type: PropTypes.oneOf(['success', 'info', 'warning', 'error']), /** * 是否显示额外图标 * 默认值:`false` */ showIcon: PropTypes.bool, /** * 组件型,当`showIcon=true`时,用于自定义图标元素 */ icon: PropTypes.node, /** * 是否可关闭 * 默认值:`false` */ closable: PropTypes.bool, /** * 渲染模式,可选项有`'default'`、`'loop-text'`、`'marquee'` * 默认值:`'default'` */ messageRenderMode: PropTypes.oneOf(['default', 'loop-text', 'marquee']), /** * 组件型,定义右上角额外操作区元素 */ action: PropTypes.node, /** * 是否用作顶部公告 * 默认值:`false` */ banner: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdAlert; ================================================ FILE: src/lib/components/feedback/AntdDrawer.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Drawer } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 抽屉组件AntdDrawer */ const AntdDrawer = ({ id, children, className, style, rootStyle, classNames, styles, key, visible = false, title, placement = 'right', closable = true, forceRender = false, destroyOnClose = false, containerId, containerSelector, height = 256, mask = true, maskClosable = true, width = 256, zIndex = 1000, loading = false, extra, footer, setProps, ...others }) => { const onClose = () => { setProps({ visible: false }); }; return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} key={key} className={ isString(className) ? className : className ? useCss(className) : undefined } style={ containerId || containerSelector ? { ...{ position: 'absolute' }, ...style, } : style } classNames={classNames} styles={styles} rootStyle={ containerId || containerSelector ? { position: 'absolute', ...rootStyle, } : rootStyle } open={visible} title={title} placement={placement} closable={closable} forceRender={forceRender} destroyOnClose={destroyOnClose} getContainer={ containerId || containerSelector ? containerId ? () => document.getElementById(containerId) || document.body : () => eval(containerSelector) : undefined } height={height} mask={mask} maskClosable={maskClosable} width={width} zIndex={zIndex} loading={loading} extra={extra} footer={footer} onClose={onClose} data-dash-is-loading={useLoading()} > {children} ); }; AntdDrawer.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 配置各子元素的css类名 */ classNames: PropTypes.exact({ /** * 头部元素css类名 */ header: PropTypes.string, /** * 内容元素css类名 */ body: PropTypes.string, /** * 底部元素css类名 */ footer: PropTypes.string, /** * 遮罩层元素css类名 */ mask: PropTypes.string, /** * 抽屉容器元素css类名 */ content: PropTypes.string, }), /** * 配置各子元素的css样式 */ styles: PropTypes.exact({ /** * 头部元素css样式 */ header: PropTypes.object, /** * 内容元素css样式 */ body: PropTypes.object, /** * 底部元素css样式 */ footer: PropTypes.object, /** * 遮罩层元素css样式 */ mask: PropTypes.object, /** * 抽屉容器元素css样式 */ content: PropTypes.object, }), /** * 抽屉根节点css样式(包含遮罩层),特殊的,当设置了`containerId`或`containerSelector`时,该参数会自动设置`position`为`absolute` */ rootStyle: PropTypes.object, /** * 监听或设置抽屉是否可见 * 默认值:`false` */ visible: PropTypes.bool, /** * 组件型,抽屉标题内容 */ title: PropTypes.node, /** * 抽屉弹出位置,可选项有`'left'`、`'right'`、`'top'`、`'bottom'` * 默认值:`'right'` */ placement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']), /** * 是否显示关闭按钮 * 默认值:`true` */ closable: PropTypes.bool, /** * 是否对抽屉内的子元素进行预渲染 * 默认值:`false` */ forceRender: PropTypes.bool, /** * 是否在关闭时销毁抽屉内的子元素 * 默认值:`false` */ destroyOnClose: PropTypes.bool, /** * 抽屉像素宽度,`placement`为`'left'`、`'right'`时有效 * 默认值:`256` */ width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 抽屉像素高度,`placement`为`'top'`、`'bottom'`时有效 * 默认值:`256` */ height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 是否显示遮罩层 * 默认值:`true` */ mask: PropTypes.bool, /** * 是否允许点击遮罩区域关闭抽屉 * 默认值:`true` */ maskClosable: PropTypes.bool, /** * 抽屉整体`z-index` * 默认值:`1000` */ zIndex: PropTypes.number, /** * 是否渲染为加载中状态 * 默认值:`false` */ loading: PropTypes.bool, /** * 组件型,额外操作区元素 */ extra: PropTypes.node, /** * 组件型,底部元素 */ footer: PropTypes.node, /** * 用于设置`position`为`relative`的局部容器id */ containerId: PropTypes.string, /** * 当目标容器定位较为复杂时,可传入获取元素对应的js代码字符串,优先级低于`containerId` */ containerSelector: PropTypes.string, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdDrawer; ================================================ FILE: src/lib/components/feedback/AntdMessage.react.js ================================================ // react核心 import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { message } from 'antd'; import AntdIcon from '../general/AntdIcon.react'; // 辅助库 import { isString } from 'lodash'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 全局提示组件AntdMessage */ const AntdMessage = ({ className, style, content, type = 'default', duration = 3, icon, iconRenderer = 'AntdIcon', top = 8, maxCount, setProps, }) => { const config = { className: isString(className) ? className : className ? useCss(className) : undefined, style: style, content: content || ' ', // 规避content为空时Objects are not valid as a React child报错问题 duration: duration, top: top, maxCount: maxCount, }; if (icon) { config.icon = iconRenderer === 'fontawesome' ? ( React.createElement('i', { className: icon, style: { marginRight: 3 }, }) ) : ( ); } const [messageApi, contextHolder] = message.useMessage(config); useEffect(() => { if (type === 'default') { messageApi.open(config); } else if (type === 'success') { messageApi.success(config); } else if (type === 'error') { messageApi.error(config); } else if (type === 'info') { messageApi.info(config); } else if (type === 'warning') { messageApi.warning(config); } }); return <>{contextHolder}; }; AntdMessage.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名 */ className: PropTypes.string, /** * 提示信息内容 */ content: PropTypes.string, /** * 提示信息类型,可选项有`'default'`、`'success'`、`'error'`、`'info'`、`'warning'` * 默认值:'default' */ type: PropTypes.oneOf(['default', 'success', 'error', 'info', 'warning']), /** * 提示信息自动消失对应的延时,单位:秒,设置为`0`时不会自动消失 * 默认值:`3` */ duration: PropTypes.number, /** * 提示信息距离顶端的像素距离 * 默认值:`8` */ top: PropTypes.number, /** * 最多允许同时出现的提示信息数量 */ maxCount: PropTypes.number, /** * 自定义前缀图标,同`AntdIcon`的`icon`参数 */ icon: PropTypes.string, /** * 自定义前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdMessage; ================================================ FILE: src/lib/components/feedback/AntdModal.react.js ================================================ // react核心 import React, { useContext } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Modal, ConfigProvider } from 'antd'; // 辅助库 import { str2Locale } from '../locales.react'; import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; // 自定义上下文 import PropsContext from '../../contexts/PropsContext'; /** * 对话框组件AntdModal */ const AntdModal = ({ id, children, className, key, style, styles, classNames, locale = 'zh-cn', setProps, title, loadingTitle, visible = false, renderFooter = false, okButtonProps, cancelButtonProps, okText, loadingOkText, cancelText, width = 520, centered = false, keyboard = true, closable = true, mask = true, maskClosable = true, okClickClose = true, preventClose = false, zIndex = 1000, okCounts = 0, cancelCounts = 0, closeCounts = 0, confirmLoading = false, confirmAutoSpin = false, transitionType = 'zoom', forceRender = false, destroyOnClose = true, loading = false, ...others }) => { const context = useContext(PropsContext); locale = (context && context.locale) || locale; // 监听确认按钮点击事件 const listenOk = () => { if (okClickClose) { setProps({ visible: false, okCounts: okCounts + 1 }); } else if (confirmAutoSpin) { setProps({ okCounts: okCounts + 1, confirmLoading: true }); } else { setProps({ okCounts: okCounts + 1 }); } }; // 监听取消按钮点击事件 const listenCancel = () => { // 是否阻止默认的各类关闭触发行为生效 if (preventClose) { setProps({ cancelCounts: cancelCounts + 1 }); } else { setProps({ visible: false, cancelCounts: cancelCounts + 1 }); } }; const listenClose = () => { setProps({ closeCounts: closeCounts + 1 }); }; const effectiveTitle = loading && loadingTitle !== undefined ? loadingTitle : title; return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} styles={styles} classNames={classNames} key={key} title={effectiveTitle} open={visible} okText={confirmLoading ? loadingOkText || okText : okText} cancelText={cancelText} okButtonProps={okButtonProps} cancelButtonProps={cancelButtonProps} transitionName={ transitionType === 'none' ? '' : `ant-${transitionType}` } width={width} centered={centered} keyboard={keyboard} closable={closable} mask={mask} maskClosable={maskClosable} zIndex={zIndex} onOk={listenOk} onCancel={listenCancel} afterClose={listenClose} footer={renderFooter ? undefined : null} confirmLoading={confirmLoading} forceRender={forceRender} destroyOnHidden={destroyOnClose} loading={loading} data-dash-is-loading={useLoading()} > {children} ); }; AntdModal.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 遮罩层元素css样式 */ mask: PropTypes.object, /** * 容器元素css样式 */ content: PropTypes.object, /** * 包裹层元素css样式 */ wrapper: PropTypes.object, /** * 头部元素css样式 */ header: PropTypes.object, /** * 内容元素css样式 */ body: PropTypes.object, /** * 底部元素css样式 */ footer: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 遮罩层元素css类名 */ mask: PropTypes.string, /** * 容器元素css类名 */ content: PropTypes.string, /** * 包裹层元素css类名 */ wrapper: PropTypes.string, /** * 头部元素css类名 */ header: PropTypes.string, /** * 内容元素css类名 */ body: PropTypes.string, /** * 底部元素css类名 */ footer: PropTypes.string, }), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 监听或设置对话框是否可见 * 默认值:`false` */ visible: PropTypes.bool, /** * 组件型,标题内容 */ title: PropTypes.node, /** * 组件型,loading状态下的标题内容 */ loadingTitle: PropTypes.node, /** * 是否渲染底部操作按钮 * 默认值:`false` */ renderFooter: PropTypes.bool, /** * 组件型,确认按钮内容 */ okText: PropTypes.node, /** * 配置确认按钮相关参数 */ okButtonProps: PropTypes.exact({ /** * 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` * 默认值:`'default'` */ type: PropTypes.oneOf([ 'primary', 'ghost', 'dashed', 'link', 'text', 'default', ]), /** * 按钮是否呈现危险样式 * 默认值:`false` */ danger: PropTypes.bool, /** * 按钮是否呈现禁用状态 * 默认值:`false` */ disabled: PropTypes.bool, /** * 按钮形状,可选项有`'default'`、`'circle'`、`'round'` * 默认值:`'default'` */ shape: PropTypes.oneOf(['circle', 'round']), /** * 按钮css样式 */ style: PropTypes.object, /** * 按钮css类名 */ className: PropTypes.string, }), /** * 组件型,取消按钮内容 */ cancelText: PropTypes.node, /** * 配置取消按钮相关参数 */ cancelButtonProps: PropTypes.exact({ /** * 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` * 默认值:`'default'` */ type: PropTypes.oneOf([ 'primary', 'ghost', 'dashed', 'link', 'text', 'default', ]), /** * 按钮是否呈现危险样式 * 默认值:`false` */ danger: PropTypes.bool, /** * 按钮是否呈现禁用状态 * 默认值:`false` */ disabled: PropTypes.bool, /** * 按钮形状,可选项有`'default'`、`'circle'`、`'round'` * 默认值:`'default'` */ shape: PropTypes.oneOf(['circle', 'round']), /** * 按钮css样式 */ style: PropTypes.object, /** * 按钮css类名 */ className: PropTypes.string, }), /** * 对话框像素宽度 * 默认值:`520` */ width: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, // 响应式 PropTypes.shape({ /** * 对应页面宽度<576px的响应式断点 */ xs: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 对应页面宽度≥576px的响应式断点 */ sm: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 对应页面宽度≥768px的响应式断点 */ md: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 对应页面宽度≥992px的响应式断点 */ lg: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 对应页面宽度≥1200px的响应式断点 */ xl: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 对应页面宽度≥1600px的响应式断点 */ xxl: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), }), ]), /** * 是否垂直居中显示对话框 * 默认值:`false` */ centered: PropTypes.bool, /** * 是否支持键盘esc关闭对话框 * 默认值:`true` */ keyboard: PropTypes.bool, /** * 是否显示右上角的关闭按钮 * 默认值:`true` */ closable: PropTypes.bool, /** * 是否显示背景遮罩 * 默认值:`true` */ mask: PropTypes.bool, /** * 是否允许点击遮罩层关闭对话框 * 默认值:`true` */ maskClosable: PropTypes.bool, /** * 是否点击确认按钮触发对话框关闭 * 默认值:`true` */ okClickClose: PropTypes.bool, /** * 是否阻止通过点击关闭图标、点击遮罩层区域、点击取消、按下ESC等方式自动触发的对话框关闭行为 * 默认值:`false` */ preventClose: PropTypes.bool, /** * 模态框z-index * 默认值:`1000` */ zIndex: PropTypes.number, /** * 监听确认按钮累计点击次数 * 默认值:`0` */ okCounts: PropTypes.number, /** * 监听取消按钮累计点击次数 * 默认值:`0` */ cancelCounts: PropTypes.number, /** * 监听关闭按钮累计点击次数 * 默认值:`0` */ closeCounts: PropTypes.number, /** * 是否在每次确认按钮点击之后,自动更新`confirmLoading=true` * 默认值:`false` */ confirmAutoSpin: PropTypes.bool, /** * 组件型,`confirmLoading=true`时,确认按钮的内容 */ loadingOkText: PropTypes.node, /** * 底部确认按钮是否处于加载中状态 * 默认值:`false` */ confirmLoading: PropTypes.bool, /** * 模态框显隐动画类型,可选项有`'none'`、`'fade'`、`'zoom'`、`'zoom-big'`、`'zoom-big-fast'`、`'slide-up'`、`'slide-down'`、`'slide-left'`、`'slide-right'`、`'move-up'`、`'move-down'`、`'move-left'`、`'move-right'` * 默认值:`'zoom'` */ transitionType: PropTypes.oneOf([ 'none', 'fade', 'zoom', 'zoom-big', 'zoom-big-fast', 'slide-up', 'slide-down', 'slide-left', 'slide-right', 'move-up', 'move-down', 'move-left', 'move-right', ]), /** * 是否在初始化模态框未显示时,强制渲染模态框内部元素 * 默认值:`false` */ forceRender: PropTypes.bool, /** * 是否在模态框关闭后自动销毁内部元素 * 默认值:`true` */ destroyOnClose: PropTypes.bool, /** * 是否整体渲染为加载中状态 * 默认值:`false` */ loading: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdModal; ================================================ FILE: src/lib/components/feedback/AntdNotification.react.js ================================================ // react核心 import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { notification, Button } from 'antd'; // 辅助库 import { isString, omit } from 'lodash'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 通知提醒框组件AntdNotification */ const AntdNotification = ({ className, style, message, description, type = 'default', placement = 'topRight', top = 24, bottom = 24, duration = 4.5, showProgress = false, pauseOnHover = true, closable = true, closeButton, stack = false, setProps, }) => { const config = { className: isString(className) ? className : className ? useCss(className) : undefined, style: style, message: message, description: description, placement: placement, top: top, bottom: bottom, duration: duration, showProgress: showProgress, pauseOnHover: pauseOnHover, closeIcon: closable ? undefined : ( ), btn: closeButton ? ( ) : undefined, stack: stack, }; const [notificationApi, contextHolder] = notification.useNotification(config); useEffect(() => { if (type === 'default') { notificationApi.open(config); } else if (type === 'success') { notificationApi.success(config); } else if (type === 'error') { notificationApi.error(config); } else if (type === 'info') { notificationApi.info(config); } else if (type === 'warning') { notificationApi.warning(config); } }); return <>{contextHolder}; }; AntdNotification.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 通知提醒主要信息 */ message: PropTypes.node, /** * 通知提醒描述信息 */ description: PropTypes.node, /** * 通知提醒类型,可选项有`'default'`、`'success'`、`'error'`、`'info'`、`'warning'` * 默认值:`'default'` */ type: PropTypes.oneOf(['default', 'success', 'error', 'info', 'warning']), /** * 通知提醒框在屏幕中的弹出位置,可选项有`'top'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'` * 默认值:`'topRight'` */ placement: PropTypes.oneOf([ 'top', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ]), /** * 当通知从顶部弹出时,设置距离顶部的像素距离 * 默认值:`24` */ top: PropTypes.number, /** * 当通知从底部弹出时,设置距离底部的像素距离 * 默认值:`24` */ bottom: PropTypes.number, /** * 通知从显示到自动消失的时长,单位:秒,当传入`None`时会一直显示 * 默认值:`4.5` */ duration: PropTypes.number, /** * 是否显示自动关闭进度条 * 默认值:`false` */ showProgress: PropTypes.bool, /** * `showProgress=True`时,是否在鼠标移入时暂停进度条倒计时 * 默认值:`true` */ pauseOnHover: PropTypes.bool, /** * 是否显示关闭按钮 * 默认值:`true` */ closable: PropTypes.bool, /** * 配置右下方关闭按钮相关参数,默认不显示关闭按钮 */ closeButton: PropTypes.exact({ /** * 按钮内容 */ content: PropTypes.string, /** * 按钮css样式 */ style: PropTypes.object, /** * 按钮css类名 */ className: PropTypes.string, /** * 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` * 默认值:`'default'` */ type: PropTypes.oneOf([ 'default', 'primary', 'ghost', 'dashed', 'link', 'text', ]), /** * 按钮是否呈现危险状态 * 默认值:`false` */ danger: PropTypes.bool, }), /** * 是否开启多通知自动折叠堆叠功能 * 默认值:`false` */ stack: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ threshold: PropTypes.number, }), ]), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdNotification; ================================================ FILE: src/lib/components/feedback/AntdPopconfirm.react.js ================================================ // react核心 import React, { useContext, useMemo } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Popconfirm, ConfigProvider } from 'antd'; // 辅助库 import { str2Locale } from '../locales.react'; import { parseChildrenToArray, useLoading } from '../utils'; import { isString, isUndefined } from 'lodash'; import { pickBy } from 'ramda'; // 自定义hooks import useCss from '../../hooks/useCss'; // 自定义上下文 import PropsContext from '../../contexts/PropsContext'; /** * 气泡确认框组件AntdPopconfirm */ const AntdPopconfirm = ({ id, children, className, style, styles, classNames, key, locale = 'zh-cn', icon, title, description, disabled = false, placement = 'top', mouseEnterDelay = 0.1, mouseLeaveDelay = 0.1, okText, okButtonProps, cancelText, cancelButtonProps, showCancel = true, confirmCounts = 0, cancelCounts = 0, trigger = 'click', zIndex, arrow = 'show', fresh = false, open = false, permanent = false, popupContainer = 'body', setProps, ...others }) => { const arrowPoint = useMemo(() => { if (arrow === 'hide') { return false; } if (arrow === 'show') { return true; } return { pointAtCenter: true, }; }, [arrow]); const context = useContext(PropsContext); locale = (context && context.locale) || locale; children = parseChildrenToArray(children); // 监听确认按钮点击事件 const listenConfirm = () => { setProps({ confirmCounts: confirmCounts + 1 }); }; // 监听取消按钮点击事件 const listenCancel = () => { setProps({ cancelCounts: cancelCounts + 1 }); }; return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} styles={styles} classNames={classNames} key={key} icon={icon} title={title} description={description} disabled={ context && !isUndefined(context.componentDisabled) ? context.componentDisabled : disabled } placement={placement} mouseEnterDelay={mouseEnterDelay} mouseLeaveDelay={mouseLeaveDelay} trigger={trigger} okText={okText} okButtonProps={okButtonProps} cancelText={cancelText} cancelButtonProps={cancelButtonProps} zIndex={zIndex} arrow={arrowPoint} fresh={fresh} open={open} showCancel={showCancel} onOpenChange={ permanent ? undefined : (e) => setProps({ open: e }) } getPopupContainer={ popupContainer === 'parent' ? (triggerNode) => triggerNode.parentNode : undefined } onCancel={listenCancel} onConfirm={listenConfirm} data-dash-is-loading={useLoading()} > {children} ); }; AntdPopconfirm.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,气泡确认框挂载元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 根元素(包含箭头、内容元素)css样式 */ root: PropTypes.object, /** * 内容元素css样式 */ body: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 根元素(包含箭头、内容元素)css类名 */ root: PropTypes.string, /** * 内容元素css类名 */ body: PropTypes.string, }), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 组件型,提示图标 */ icon: PropTypes.node, /** * 组件型,标题内容 */ title: PropTypes.node, /** * 组件型,描述内容 */ description: PropTypes.node, /** * 是否禁用当前组件 * 默认值:`false` */ disabled: PropTypes.bool, /** * 气泡确认框弹出位置,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` * 默认值:`'top'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ]), /** * 从鼠标移入挂载元素,到气泡确认框显示的延时,单位:秒 * 默认值:`0.1` */ mouseEnterDelay: PropTypes.number, /** * 从鼠标移出挂载元素,到气泡确认框消失的延时,单位:秒 * 默认值:`0.1` */ mouseLeaveDelay: PropTypes.number, /** * 组件型,确认按钮内容 */ okText: PropTypes.node, /** * 配置确认按钮相关参数 */ okButtonProps: PropTypes.exact({ /** * 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` * 默认值:`'default'` */ type: PropTypes.oneOf([ 'primary', 'ghost', 'dashed', 'link', 'text', 'default', ]), /** * 按钮是否呈现危险样式 * 默认值:`false` */ danger: PropTypes.bool, /** * 按钮是否呈现禁用状态 * 默认值:`false` */ disabled: PropTypes.bool, /** * 按钮形状,可选项有`'default'`、`'circle'`、`'round'` * 默认值:`'default'` */ shape: PropTypes.oneOf(['circle', 'round']), /** * 按钮css样式 */ style: PropTypes.object, /** * 按钮css类名 */ className: PropTypes.string, }), /** * 组件型,取消按钮内容 */ cancelText: PropTypes.node, /** * 配置取消按钮相关参数 */ cancelButtonProps: PropTypes.exact({ /** * 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` * 默认值:`'default'` */ type: PropTypes.oneOf([ 'primary', 'ghost', 'dashed', 'link', 'text', 'default', ]), /** * 按钮是否呈现危险样式 * 默认值:`false` */ danger: PropTypes.bool, /** * 按钮是否呈现禁用状态 * 默认值:`false` */ disabled: PropTypes.bool, /** * 按钮形状,可选项有`'default'`、`'circle'`、`'round'` * 默认值:`'default'` */ shape: PropTypes.oneOf(['circle', 'round']), /** * 按钮css样式 */ style: PropTypes.object, /** * 按钮css类名 */ className: PropTypes.string, }), /** * 是否显示取消按钮 * 默认值:`true` */ showCancel: PropTypes.bool, /** * 监听确认按钮累计点击次数 * 默认值:`0` */ confirmCounts: PropTypes.number, /** * 监听取消按钮累计点击次数 * 默认值:`0` */ cancelCounts: PropTypes.number, /** * 气泡确认框触发行为,可选项有`'hover'`、`'focus'`、`'click'`,可多选组合 * 默认值:`'click'` */ trigger: PropTypes.oneOfType([ PropTypes.oneOf(['hover', 'focus', 'click']), PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click'])), ]), /** * 气泡确认框z-index */ zIndex: PropTypes.number, /** * 指示箭头显示形式,可选项有`'show'`、`'hide'`、`'center'` * 默认值:`'show'` */ arrow: PropTypes.oneOf(['show', 'hide', 'center']), /** * 是否保持内容更新 * 默认值:`false` */ fresh: PropTypes.bool, /** * 监听或设置气泡确认框的显示状态 * 默认值:`false` */ open: PropTypes.bool, /** * 是否保持气泡确认框显示/隐藏 * 默认值:`false` */ permanent: PropTypes.bool, /** * 悬浮层渲染挂载父节点策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdPopconfirm; ================================================ FILE: src/lib/components/feedback/AntdPopupCard.react.js ================================================ // react核心 import React, { useRef, useState } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Modal } from 'antd'; import { CloseCircleFilled, CloseCircleOutlined, CloseCircleTwoTone, } from '@ant-design/icons'; // 辅助库 import Draggable from 'react-draggable'; import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { v4 as uuidv4 } from 'uuid'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 弹出式卡片组件AntdPopupCard */ const AntdPopupCard = ({ id, children, className, key, style, styles, classNames, visible = true, title, width, transitionType = 'fade', forceRender = false, destroyOnClose = true, closable = true, closeIconType = 'default', draggable = false, dragClassName, zIndex = 1000, loading = false, setProps, ...others }) => { const [handleId, setHandleId] = useState(uuidv4().replace(/\d+/g, '')); const [disabled, setDisabled] = useState(false); const [bounds, setBounds] = useState({ left: 0, top: 0, bottom: 0, right: 0, }); const draggleRef = useRef(null); const onStart = (_event, uiData) => { const { clientWidth, clientHeight } = window.document.documentElement; const targetRect = draggleRef.current.getBoundingClientRect(); if (!targetRect) { return; } setBounds({ left: -targetRect.left + uiData.x, right: clientWidth - (targetRect.right - uiData.x), top: -targetRect.top + uiData.y, bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} styles={styles} classNames={classNames} key={key} title={
{ if (disabled) { setDisabled(false); } }} onMouseOut={() => { setDisabled(true); }} > {title} {closable ? ( closeIconType === 'outlined' ? ( setProps({ visible: false })} /> ) : closeIconType == 'two-tone' ? ( setProps({ visible: false })} /> ) : ( setProps({ visible: false })} /> ) ) : null}
} transitionName={ transitionType === 'none' ? '' : `ant-${transitionType}` } forceRender={forceRender} destroyOnClose={destroyOnClose} width={width} open={visible} zIndex={zIndex} mask={false} maskClosable={false} closable={false} footer={false} wrapClassName={'ant-modal-wrap-overwrite'} modalRender={ draggable ? (modal) => ( onStart(event, uiData) } >
{modal}
) : undefined } loading={loading} data-dash-is-loading={useLoading()} > {children}
); }; AntdPopupCard.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 遮罩层元素css样式 */ mask: PropTypes.object, /** * 容器元素css样式 */ content: PropTypes.object, /** * 包裹层元素css样式 */ wrapper: PropTypes.object, /** * 头部元素css样式 */ header: PropTypes.object, /** * 内容元素css样式 */ body: PropTypes.object, /** * 底部元素css样式 */ footer: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 遮罩层元素css类名 */ mask: PropTypes.string, /** * 容器元素css类名 */ content: PropTypes.string, /** * 包裹层元素css类名 */ wrapper: PropTypes.string, /** * 头部元素css类名 */ header: PropTypes.string, /** * 内容元素css类名 */ body: PropTypes.string, /** * 底部元素css类名 */ footer: PropTypes.string, }), /** * 组件型,标题内容 */ title: PropTypes.node, /** * 设置或监听当前弹出式卡片是否显示 * 默认值:`true` */ visible: PropTypes.bool, /** * 弹出式卡片像素宽度 */ width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 卡片显隐动画类型,可选项有`'none'`、`'fade'`、`'zoom'`、`'zoom-big'`、`'zoom-big-fast'`、`'slide-up'`、`'slide-down'`、`'slide-left'`、`'slide-right'`、`'move-up'`、`'move-down'`、`'move-left'`、`'move-right'` * 默认值:`'zoom'` */ transitionType: PropTypes.oneOf([ 'none', 'fade', 'zoom', 'zoom-big', 'zoom-big-fast', 'slide-up', 'slide-down', 'slide-left', 'slide-right', 'move-up', 'move-down', 'move-left', 'move-right', ]), /** * 是否在初始化卡片未显示时,强制渲染卡片内部元素 * 默认值:`false` */ forceRender: PropTypes.bool, /** * 是否在卡片关闭后自动销毁内部元素 * 默认值:`true` */ destroyOnClose: PropTypes.bool, /** * 是否显示右上角的关闭按钮 * 默认值:`true` */ closable: PropTypes.bool, /** * 关闭按钮类型,可选项有`'default'`、`'outlined'`、`'two-tone'` * 默认值:`'default'` */ closeIconType: PropTypes.oneOf(['default', 'outlined', 'two-tone']), /** * 是否可拖拽 * 默认值:`false` */ draggable: PropTypes.bool, /** * 顶部可拖拽区域css类名 */ dragClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 弹出式卡片z-index * 默认值:`1000` */ zIndex: PropTypes.number, /** * 是否整体渲染为加载中状态 * 默认值:`false` */ loading: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdPopupCard; ================================================ FILE: src/lib/components/feedback/AntdProgress.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Progress } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 进度条组件AntdProgress */ const AntdProgress = ({ id, className, style, key, type = 'line', size = 'default', percent = 0, success, format, status, showInfo = true, percentPosition, strokeColor, strokeLinecap, strokeWidth, trailColor, gapDegree, gapPosition = 'bottom', steps, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} type={type} size={size} percent={percent} success={success} format={ format ? (p) => format && format.content ? format.content : (format && format.prefix ? format.prefix : '') + `${p}` + (format && format.suffix ? format.suffix : '%') : undefined } status={status} showInfo={showInfo} percentPosition={percentPosition} strokeColor={ strokeColor ? strokeColor.from && strokeColor.to ? { '0%': strokeColor.from, '100%': strokeColor.to, } : strokeColor : undefined } strokeLinecap={strokeLinecap} strokeWidth={strokeWidth} trailColor={trailColor} gapDegree={gapDegree} gapPosition={gapPosition} steps={steps} data-dash-is-loading={useLoading()} > ); }; AntdProgress.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 进度条类型,可选项有`'line'`、`'circle'`、`'dashboard'` * 默认值:`'line'` */ type: PropTypes.oneOf(['line', 'circle', 'dashboard']), /** * 进度条尺寸规格,可选项有`'small'`、`'default'`、`'large'`,传入数值型表示像素尺寸,传入字典型可分别控制宽度和高度 * 默认值:`'default'` */ size: PropTypes.oneOfType([ PropTypes.number, PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.number, PropTypes.string]) ), PropTypes.oneOf(['small', 'default']), PropTypes.shape({ /** * 像素宽度 */ width: PropTypes.number, /** * 像素高度 */ height: PropTypes.number, }), ]), /** * 进度条进度,取值应在`0`到`100`之间,当`100`时默认会渲染为完成状态 * 默认值:`0` */ percent: PropTypes.number, /** * 配置进度条完成状态相关参数 */ success: PropTypes.exact({ /** * 达到完成状态对应的进度,取值应在`0`到`100`之间 * 默认值:`100` */ percent: PropTypes.number, /** * 完成状态进度条颜色,支持渐变色 */ strokeColor: PropTypes.oneOfType([ PropTypes.string, PropTypes.exact({ /** * 渐变色开端颜色 */ from: PropTypes.string, /** * 渐变色末端颜色 */ to: PropTypes.string, }), ]), }), /** * 配置进度提示相关参数 */ format: PropTypes.exact({ /** * 进度提示前缀文字 * 默认值:`''` */ prefix: PropTypes.string, /** * 进度提示后缀文字 * 默认值:`'%'` */ suffix: PropTypes.string, /** * 组件型,强制设置显示内容 */ content: PropTypes.node, }), /** * 进度条状态,可选项有`'success'`、`'exception'`、`'normal'`、`'active'`,其中`'active'`仅在`type='line'`时生效 * 默认值:`'normal'` */ status: PropTypes.oneOf(['success', 'exception', 'normal', 'active']), /** * 是否显示进度数值或状态图标 * 默认值:`true` */ showInfo: PropTypes.bool, /** * 适用于`'line'`型进度条,配置进度条附带进度数值信息显示位置 */ percentPosition: PropTypes.shape({ /** * 对齐方式,可选项有`'start'`、`'center'`、`'end'` */ align: PropTypes.oneOf(['start', 'center', 'end']), /** * 内外位置,可选项有`'inner'`、`'outer'` */ type: PropTypes.oneOf(['inner', 'outer']), }), /** * 配置进度条颜色,支持渐变色 */ strokeColor: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.exact({ /** * 渐变色开端颜色 */ from: PropTypes.string, /** * 渐变色末端颜色 */ to: PropTypes.string, }), PropTypes.objectOf(PropTypes.string), ]), /** * 进度条线型,可选项有`'round'`、`'butt'`、`'square'` * 默认值:`'round'` */ strokeLinecap: PropTypes.oneOf(['round', 'butt', 'square']), /** * 进度条线的宽度,单位是进度条画布宽度的百分比 */ strokeWidth: PropTypes.number, /** * 未完成分段部分的颜色,默认无颜色 */ trailColor: PropTypes.string, /** * 进度条缺口角度,取值应在`0`到`295`之间,仅`type='dashboard'`时可用 * 默认值:`75` */ gapDegree: PropTypes.number, /** * 仪表盘缺口方向,可选项有`'top'`、`'bottom'`、`'left'`、`'right'`,仅`type='dashboard'`时可用 * 默认值:`'bottom'` */ gapPosition: PropTypes.oneOf(['top', 'bottom', 'left', 'right']), /** * 配置进度条分段数量,针对`'circle'`、`'dashboard'`型进度条支持传入字典型进行更详细的配置 */ steps: PropTypes.oneOfType([ PropTypes.number, PropTypes.shape({ /** * 分段数量 */ count: PropTypes.number, /** * 分段间隔像素大小 */ gap: PropTypes.number, }), ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdProgress; ================================================ FILE: src/lib/components/feedback/AntdResult.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Result } from 'antd'; import { LoadingOutlined } from '@ant-design/icons'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 结果组件AntdResult */ const AntdResult = ({ id, className, style, key, extra, status = 'info', title, subTitle, icon, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} icon={ icon || (status === 'loading' ? ( ) : undefined) } extra={extra} status={status} title={title} subTitle={subTitle} data-dash-is-loading={useLoading()} > ); }; AntdResult.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件型,操作区域 */ extra: PropTypes.node, /** * 状态,可选项有`'success'`、`'error'`、`'info'`、`'warning'`、`'404'`、`'403'`、`'500'` * 默认值:`'info'` */ status: PropTypes.oneOf([ 'success', 'error', 'info', 'warning', '404', '403', '500', 'loading', ]), /** * 组件型,标题内容 */ title: PropTypes.node, /** * 组件型,副标题内容 */ subTitle: PropTypes.node, /** * 组件型,图标内容 */ icon: PropTypes.node, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdResult; ================================================ FILE: src/lib/components/feedback/AntdSpin.react.js ================================================ // react核心 import React, { useState, useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Spin } from 'antd'; // 辅助库 import { isString, isNumber } from 'lodash'; import { pickBy, equals } from 'ramda'; import { useLoading, loadingSelector } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 加载动画组件AntdSpin */ const AntdSpin = ({ id, className, wrapperClassName, style, key, children, spinning = false, size = 'middle', delay, fullscreen = false, text, listenPropsMode = 'default', excludeProps = [], includeProps = [], debug = false, indicator, manual = false, percent, setProps, ...others }) => { const ctx = window.dash_component_api.useDashContext(); // 获取内部加载中组件信息 const loading_info = ctx.useSelector( loadingSelector(ctx.componentPath), equals ); useEffect(() => { // 检查数值型percent参数是否取值在合法的0到100之间 if (isNumber(percent) && (percent < 0 || percent > 100)) { // 抛出中英文错误提示 setProps({ _dash_error: new Error( '数值型percent取值应在0到100之间!\nThe value of the numerical type "percent" should be between 0 and 100!' ), }); } }, [percent]); const [showSpinning, setShowSpinning] = useState(spinning); const timer = useRef(); useEffect(() => { // 非手动控制模式下 if (!manual && loading_info) { if (timer.current) { clearTimeout(timer.current); } if (loading_info.length > 0 && !showSpinning) { // 当listenPropsMode为'default'时 if (listenPropsMode === 'default') { if (debug) { loading_info.forEach((item) => console.log(item.id + '.' + item.property) ); } setShowSpinning(true); } else if (listenPropsMode === 'exclude') { // 当listenPropsMode为'exclude'模式时 // 当前触发加载状态的组件+属性组合均不在排除列表中时,激活动画 if ( loading_info.every( (item) => excludeProps.indexOf( item.id + '.' + item.property ) === -1 ) ) { if (debug) { loading_info.forEach((item) => console.log(item.id + '.' + item.property) ); } setShowSpinning(true); } } else if (listenPropsMode === 'include') { // 当listenPropsMode为'include'模式时 // 当前触发加载状态的组件+属性组合至少有一个在包含列表中时,激活动画 if ( loading_info.some( (item) => includeProps.indexOf( item.id + '.' + item.property ) !== -1 ) ) { if (debug) { loading_info.forEach((item) => console.log(item.id + '.' + item.property) ); } setShowSpinning(true); } } } else if (loading_info.length === 0 && showSpinning) { timer.current = setTimeout(() => setShowSpinning(false)); } } }, [loading_info]); // 修复设置全屏后子元素无法渲染的问题 if (fullscreen) { return ( <> k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } key={key} wrapperClassName={ isString(wrapperClassName) ? wrapperClassName : wrapperClassName ? useCss(wrapperClassName) : undefined } style={style} spinning={manual ? spinning : showSpinning} size={size} delay={delay} fullscreen={fullscreen} tip={text} indicator={indicator} percent={percent} data-dash-is-loading={useLoading()} /> {children} ); } return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } key={key} wrapperClassName={ isString(wrapperClassName) ? wrapperClassName : wrapperClassName ? useCss(wrapperClassName) : undefined } style={style} spinning={manual ? spinning : showSpinning} size={size} delay={delay} fullscreen={fullscreen} tip={text} indicator={indicator} percent={percent} data-dash-is-loading={useLoading()} > {' '} {children}{' '} ); }; AntdSpin.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 外层容器css类名 */ wrapperClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 是否处于加载中状态 */ spinning: PropTypes.bool, /** * 默认加载状态图标的尺寸,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 加载动画渲染延时,单位:毫秒 * 默认值:`0` */ delay: PropTypes.number, /** * 加载动画提示文字 */ text: PropTypes.string, /** * 是否开启全屏模式 * 默认值:`false` */ fullscreen: PropTypes.bool, /** * 是否开启debug模式,开启后,每次动画加载都会在开发者工具的控制台打印相关`prop`信息 * 默认值:`false` */ debug: PropTypes.bool, /** * 监听模式,可选项有`'default'`、`'exclude'`、`'include'` * 默认值:`'default'` */ listenPropsMode: PropTypes.oneOf(['default', 'exclude', 'include']), /** * `listenPropsMode='exclude'`时,设置需要排除监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]` */ excludeProps: PropTypes.arrayOf(PropTypes.string), /** * `listenPropsMode='include'`时,设置需要包含监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]` */ includeProps: PropTypes.arrayOf(PropTypes.string), /** * 组件型,自定义加载状态图标 */ indicator: PropTypes.node, /** * 是否开启手动控制模式,开启后是否处于加载状态将由`spinning`参数控制,与内部元素参与的回调状态无关 * 默认值:`false` */ manual: PropTypes.bool, /** * 控制加载中状态下的环状进度渲染形式,传入0到100之间数值型时表示实际进度,传入`'auto'`时会预估一个永远不会停止的进度 */ percent: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSpin; ================================================ FILE: src/lib/components/feedback/skeleton/AntdCustomSkeleton.react.js ================================================ // react核心 import React, { useState, useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; // 辅助库 import { isString } from 'lodash'; import { pickBy, equals } from 'ramda'; import { useLoading, loadingSelector } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; /** * 自定义骨架屏组件AntdCustomSkeleton */ const AntdCustomSkeleton = ({ id, className, style, key, children, skeletonContent, loading = false, delay, listenPropsMode = 'default', excludeProps = [], includeProps = [], debug = false, manual = false, setProps, ...others }) => { const ctx = window.dash_component_api.useDashContext(); // 获取内部加载中组件信息 const loading_info = ctx.useSelector( loadingSelector(ctx.componentPath), equals ); const [showLoading, setShowLoading] = useState(loading); const timer = useRef(); const delayTimer = useRef(); useEffect(() => { if (!manual && loading_info) { if (timer.current) { clearTimeout(timer.current); } if (delayTimer.current) { clearTimeout(delayTimer.current); } if (loading_info.length > 0 && !showLoading) { // 当listenPropsMode为'default'时 if (listenPropsMode === 'default') { if (debug) { loading_info.forEach((item) => console.log(item.id + '.' + item.property) ); } delayTimer.current = setTimeout( () => setShowLoading(true), delay ); } else if (listenPropsMode === 'exclude') { // 当listenPropsMode为'exclude'模式时 // 当前触发加载状态的组件+属性组合均不在排除列表中时,激活动画 if ( loading_info.every( (item) => excludeProps.indexOf( item.id + '.' + item.property ) === -1 ) ) { if (debug) { loading_info.forEach((item) => console.log(item.id + '.' + item.property) ); } delayTimer.current = setTimeout( () => setShowLoading(true), delay ); } } else if (listenPropsMode === 'include') { // 当listenPropsMode为'include'模式时 // 当前触发加载状态的组件+属性组合至少有一个在包含列表中时,激活动画 if ( loading_info.some( (item) => includeProps.indexOf( item.id + '.' + item.property ) !== -1 ) ) { if (debug) { loading_info.forEach((item) => console.log(item.id + '.' + item.property) ); } delayTimer.current = setTimeout( () => setShowLoading(true), delay ); } } } else if (loading_info.length === 0 && showLoading) { timer.current = setTimeout(() => setShowLoading(false)); } } }, [loading_info]); return (
k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} data-dash-is-loading={useLoading()} > {(manual ? loading : showLoading) ? skeletonContent : children}
); }; AntdCustomSkeleton.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件型,加载状态下显示的内容 */ skeletonContent: PropTypes.node, /** * 是否处于加载中状态 */ loading: PropTypes.bool, /** * 加载动画渲染延时,单位:毫秒 * 默认值:`0` */ delay: PropTypes.number, /** * 是否开启debug模式,开启后,每次动画加载都会在开发者工具的控制台打印相关`prop`信息 * 默认值:`false` */ debug: PropTypes.bool, /** * 监听模式,可选项有`'default'`、`'exclude'`、`'include'` * 默认值:`'default'` */ listenPropsMode: PropTypes.oneOf(['default', 'exclude', 'include']), /** * `listenPropsMode='exclude'`时,设置需要排除监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]` */ excludeProps: PropTypes.arrayOf(PropTypes.string), /** * `listenPropsMode='include'`时,设置需要包含监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]` */ includeProps: PropTypes.arrayOf(PropTypes.string), /** * 是否开启手动控制模式,开启后是否处于加载状态将由`loading`参数控制,与内部元素参与的回调状态无关 * 默认值:`false` */ manual: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCustomSkeleton; ================================================ FILE: src/lib/components/feedback/skeleton/AntdSkeleton.react.js ================================================ // react核心 import React, { useState, useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Skeleton } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy, equals } from 'ramda'; import { useLoading, loadingSelector } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; /** * 骨架屏组件AntdSkeleton */ const AntdSkeleton = ({ id, className, style, key, children, loading = false, active = false, delay = 0, avatar = false, paragraph = true, round = false, title = true, listenPropsMode = 'default', excludeProps = [], includeProps = [], debug = false, manual = false, setProps, ...others }) => { const ctx = window.dash_component_api.useDashContext(); // 获取内部加载中组件信息 const loading_info = ctx.useSelector( loadingSelector(ctx.componentPath), equals ); const [showLoading, setShowLoading] = useState(loading); const timer = useRef(); const delayTimer = useRef(); useEffect(() => { if (!manual && loading_info) { if (timer.current) { clearTimeout(timer.current); } if (delayTimer.current) { clearTimeout(delayTimer.current); } if (loading_info.length > 0 && !showLoading) { // 当listenPropsMode为'default'时 if (listenPropsMode === 'default') { if (debug) { loading_info.forEach((item) => console.log(item.id + '.' + item.property) ); } delayTimer.current = setTimeout( () => setShowLoading(true), delay ); } else if (listenPropsMode === 'exclude') { // 当listenPropsMode为'exclude'模式时 // 当前触发加载状态的组件+属性组合均不在排除列表中时,激活动画 if ( loading_info.every( (item) => excludeProps.indexOf( item.id + '.' + item.property ) === -1 ) ) { if (debug) { loading_info.forEach((item) => console.log(item.id + '.' + item.property) ); } delayTimer.current = setTimeout( () => setShowLoading(true), delay ); } } else if (listenPropsMode === 'include') { // 当listenPropsMode为'include'模式时 // 当前触发加载状态的组件+属性组合至少有一个在包含列表中时,激活动画 if ( loading_info.some( (item) => includeProps.indexOf( item.id + '.' + item.property ) !== -1 ) ) { if (debug) { loading_info.forEach((item) => console.log(item.id + '.' + item.property) ); } delayTimer.current = setTimeout( () => setShowLoading(true), delay ); } } } else if (loading_info.length === 0 && showLoading) { timer.current = setTimeout(() => setShowLoading(false)); } } }, [loading_info]); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} loading={manual ? loading : showLoading} active={active} avatar={avatar} paragraph={paragraph} round={round} title={title} data-dash-is-loading={useLoading()} > {children} ); }; AntdSkeleton.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 是否处于加载中状态 */ loading: PropTypes.bool, /** * 是否显示动画 * 默认值:`false` */ active: PropTypes.bool, /** * 加载动画渲染延时,单位:毫秒 * 默认值:`0` */ delay: PropTypes.number, /** * 配置头像占位图相关参数,设置为`false`时不显示 * 默认值:`true` */ avatar: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 头像占位图是否显示动画 * 默认值:`false` */ active: PropTypes.bool, /** * 头像占位图形状,可选项有`'circle'`、`'square'` */ shape: PropTypes.oneOf(['circle', 'square']), /** * 头像占位图尺寸,传入数值型表示像素尺寸,也可传入预设的尺寸规格,可选项有`'large'`、`'small'`、`'default'` * 默认值:`'default'` */ size: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['large', 'small', 'default']), ]), }), ]), /** * 配置段落占位图相关参数,设置为`false`时不显示 * 默认值:`true` */ paragraph: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 段落占位图行数 */ rows: PropTypes.number, // 设置段落占位图的宽度(数值像素或字符串css宽度),若为数组时,则一一对应每行宽度, // 反之则是最后一行的宽度 /** * 段落占位图宽度,当传入*int*或*string*型时,用于设置段落占位图最后一行的宽度,当传入*list*型时,用于逐行设置宽度 */ width: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, PropTypes.arrayOf( PropTypes.oneOfType([PropTypes.number, PropTypes.string]) ), ]), }), ]), /** * 是否显示标题占位图 * 默认值:`true` */ title: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 标题占位图宽度 */ width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), }), ]), /** * 段落、标题占位图是否渲染圆角 * 默认值:`false` */ round: PropTypes.bool, /** * 是否开启debug模式,开启后,每次动画加载都会在开发者工具的控制台打印相关`prop`信息 * 默认值:`false` */ debug: PropTypes.bool, /** * 监听模式,可选项有`'default'`、`'exclude'`、`'include'` * 默认值:`'default'` */ listenPropsMode: PropTypes.oneOf(['default', 'exclude', 'include']), /** * `listenPropsMode='exclude'`时,设置需要排除监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]` */ excludeProps: PropTypes.arrayOf(PropTypes.string), /** * `listenPropsMode='include'`时,设置需要包含监听的回调目标列表,格式如`['组件id1.组件属性1', '组件id2.组件属性2', ...]` */ includeProps: PropTypes.arrayOf(PropTypes.string), /** * 是否开启手动控制模式,开启后是否处于加载状态将由`loading`参数控制,与内部元素参与的回调状态无关 * 默认值:`false` */ manual: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; AntdSkeleton.dashChildrenUpdate = true; export default AntdSkeleton; ================================================ FILE: src/lib/components/feedback/skeleton/AntdSkeletonAvatar.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Skeleton } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; /** * 骨骼屏头像占位图组件AntdSkeletonAvatar */ const AntdSkeletonAvatar = ({ id, style, className, key, active = false, shape = 'circle', size = 'default', setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} style={style} className={ isString(className) ? className : className ? useCss(className) : undefined } key={key} active={active} shape={shape} size={size} data-dash-is-loading={useLoading()} /> ); }; AntdSkeletonAvatar.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 是否显示动画 * 默认值:`false` */ active: PropTypes.bool, /** * 头像占位图形状,可选项有`'circle'`、`'square'` * 默认值:`'circle'` */ shape: PropTypes.oneOf(['circle', 'square']), /** * 头像占位图尺寸,传入数值型表示像素尺寸,也可传入预设的尺寸规格,可选项有`'large'`、`'small'`、`'default'` * 默认值:`'default'` */ size: PropTypes.oneOfType([ PropTypes.number, PropTypes.oneOf(['large', 'small', 'default']), ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSkeletonAvatar; ================================================ FILE: src/lib/components/feedback/skeleton/AntdSkeletonButton.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Skeleton } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; /** * 骨骼屏按钮占位图组件AntdSkeletonButton */ const AntdSkeletonButton = ({ id, style, className, key, active = false, block = false, shape = 'default', size = 'default', setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} style={style} className={ isString(className) ? className : className ? useCss(className) : undefined } key={key} active={active} block={block} shape={shape} size={size} data-dash-is-loading={useLoading()} /> ); }; AntdSkeletonButton.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 是否显示动画 * 默认值:`false` */ active: PropTypes.bool, /** * 是否撑满父容器 * 默认值:`false` */ block: PropTypes.bool, /** * 按钮占位图形状,可选项有`'circle'`、`'round'`、`'default'` * 默认值:`'default'` */ shape: PropTypes.oneOf(['circle', 'round', 'default']), /** * 按钮占位图尺寸,可选项有`'large'`、`'small'`、`'default'` * 默认值:`'default'` */ size: PropTypes.oneOf(['large', 'small', 'default']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSkeletonButton; ================================================ FILE: src/lib/components/feedback/skeleton/AntdSkeletonImage.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Skeleton } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; /** * 骨骼屏图片占位图组件AntdSkeletonImage */ const AntdSkeletonImage = ({ id, style, className, key, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} style={style} className={ isString(className) ? className : className ? useCss(className) : undefined } key={key} data-dash-is-loading={useLoading()} /> ); }; AntdSkeletonImage.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSkeletonImage; ================================================ FILE: src/lib/components/feedback/skeleton/AntdSkeletonInput.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Skeleton } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; /** * 骨骼屏输入框占位图组件AntdSkeletonInput */ const AntdSkeletonInput = ({ id, style, className, key, active = false, size = 'default', setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} style={style} className={ isString(className) ? className : className ? useCss(className) : undefined } key={key} active={active} size={size} data-dash-is-loading={useLoading()} /> ); }; AntdSkeletonInput.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 是否显示动画 * 默认值:`false` */ active: PropTypes.bool, /** * 输入框占位图尺寸,可选项有`'large'`、`'small'`、`'default'` * 默认值:`'default'` */ size: PropTypes.oneOf(['large', 'small', 'default']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSkeletonInput; ================================================ FILE: src/lib/components/formRender/AntdFormRender.react.js ================================================ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; const LazyAntdFormRender = React.lazy( () => import( /* webpackChunkName: "form_render" */ '../../fragments/formRender/AntdFormRender.react' ) ); const AntdFormRender = (props) => { return ( ); }; // 定义参数或属性 AntdFormRender.propTypes = { /** * 组件id */ id: PropTypes.string, /** * css类名 */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 自定义css字典 */ style: PropTypes.object, /** * 辅助刷新用唯一标识key值 */ key: PropTypes.string, /** * 必填,设置表单的schema */ schema: PropTypes.exact({ /** * 固定配置为type: 'object' */ type: PropTypes.oneOf(['object']), /** * 设置表单表单项label布局方式,可选的有'column'、'row'与'inline',默认为'column' */ displayType: PropTypes.oneOf(['column', 'row', 'inline']), /** * 设置表单布局,一行应该有几列,默认为3 */ column: PropTypes.number, /** * 设置表单项标签的宽度 */ labelWidth: PropTypes.number, /** * 设置表单项控件的最大宽度 */ maxWidth: PropTypes.number, /** * 设置表单标签占位格数 */ labelCol: PropTypes.number, /** * 设置表单控件占位格数 */ fieldCol: PropTypes.number, /** * 设置表单控件 */ properties: PropTypes.objectOf( PropTypes.oneOfType([ /** * 基础控件配置项 */ PropTypes.shape({ /** * 设置表单字段的类型,可选的有'string'、'number'、'boolean'、'array'、'range'、'html'、'block' */ type: PropTypes.oneOf([ 'string', 'number', 'boolean', 'array', 'range', 'html', 'block', ]), /** * 设置表单字段的标签 */ title: PropTypes.string, /** * 设置表单项标签的宽度 */ labelWidth: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置表单项控件的最大宽度 */ maxWidth: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置表单标签占位格数 */ labelCol: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置表单控件占位格数 */ fieldCol: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置表单项跨列展示,目前需配合lableWidth来使用,否则无法与其他表单项在样式上对齐,通过配置单个表单项的labelCol、fieldCol勉强能改善 */ cellSpan: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置表单项列宽度,表单布局会被切割成 24 等份,可以通过设置 span 来自定义表单项所占的宽度 */ span: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置指定渲染的控件名称 */ widget: PropTypes.oneOf([ 'input', 'inputNumber', 'select', 'multiSelect', 'radio', 'checkboxes', 'textArea', 'checkbox', 'switch', 'rate', 'slider', 'datePicker', 'dateRange', 'timePicker', 'timeRange', 'cascader', 'treeSelect', 'color', 'imageInput', 'urlInput', 'html', ]), /** * 设置输入内容提示 */ placeholder: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), ]), /** * 设置副标题描述 */ description: PropTypes.string, /** * 设置气泡提示,支持html格式,可传入一个antd的tooltip配置对象支持更多配置 */ tooltip: PropTypes.oneOfType([ PropTypes.string, PropTypes.shape({ /** * 设置显示的文字内容 */ title: PropTypes.any, /** * 设置气泡框的位置,可选的有'top'、'left'、'right'、'bottom'、'topLeft' * 、'topRight'、'bottomLeft'、'bottomRight'、'leftTop'、'leftBottom' * 、'rightTop'、'rightBottom',默认为'top' */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ]), /** * 设置背景颜色 */ color: PropTypes.string, /** * 设置鼠标移入后延时多少才显示 Tooltip,单位:秒,默认为0.1 */ mouseEnterDelay: PropTypes.number, /** * 设置鼠标移出后延时多少才隐藏 Tooltip,单位:秒,默认为0.1 */ mouseLeaveDelay: PropTypes.number, /** * 设置卡片css类 */ overlayClassName: PropTypes.oneOfType([ PropTypes.string, PropTypes.object, ]), /** * 设置卡片样式 */ overlayStyle: PropTypes.object, /** * 设置卡片内容区域的样式 */ overlayInnerStyle: PropTypes.object, /** * 设置触发行为,可选的有'hover'、'focus'、'click',或是以上多个组成的数组,默认为'hover' */ trigger: PropTypes.oneOfType([ PropTypes.oneOf(['hover', 'focus', 'click']), PropTypes.arrayOf( PropTypes.oneOf(['hover', 'focus', 'click']) ), ]), /** * 设置悬浮层zIndex */ zIndex: PropTypes.number, /** * 设置修改箭头的显示状态以及修改箭头是否指向目标元素中心,默认为'show' */ arrow: PropTypes.oneOf(['show', 'hide', 'center']), /** * 用于设置是否始终保持更新内容,默认为false。默认情况下,Tooltip 在关闭时会缓存内容,设置该属性后会始终保持更新。 */ fresh: PropTypes.bool, /** * 用于监听或控制当前tooltip的显隐,默认为false */ open: PropTypes.bool, /** * 用于设置气泡被遮挡时自动调整位置,默认为true */ autoAdjustOverflow: PropTypes.bool, /** * 设置默认是否显隐,默认为false */ defaultOpen: PropTypes.bool, /** * 设置关闭后是否销毁Tooltip,默认为false */ destroyTooltipOnHide: PropTypes.bool, }), ]), /** * 设置更多的说明信息,支持html格式,会紧贴在元素下面一行展示 */ extra: PropTypes.string, /** * 设置是否必填,默认为false */ required: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, ]), /** * 设置string类型为字符串最小长度;number类型时为最小值;array 类型时为数组最小长度 */ min: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置string类型为字符串最大长度;number类型时为最大值;array 类型时为数组最大长度 */ max: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 在已设置的type下,如何处理这个type */ format: PropTypes.oneOf([ 'image', 'textarea', 'color', 'email', 'url', 'dateTime', 'date', 'time', 'upload', ]), /** * 设置表单元素的校验规则 */ rules: PropTypes.arrayOf( PropTypes.shape({ /** * 仅在 type 为 array 类型时有效,用于指定数组元素的校验规则 */ defaultField: PropTypes.object, /** * 是否匹配枚举中的值(需要将 type 设置为 enum) */ enum: PropTypes.any, /** * 仅在 type 为 array 或 object 类型时有效,用于指定子元素的校验规则 */ fields: PropTypes.any, /** * string 类型时为字符串长度;number 类型时为确定数字; array 类型时为数组长度 */ len: PropTypes.number, /** * 必须设置 type:string 类型为字符串最大长度;number 类型时为最大值;array 类型时为数组最大长度 */ max: PropTypes.number, /** * 错误信息,不设置时会通过模板自动生成 */ message: PropTypes.string, /** * 必须设置 type:string 类型为字符串最小长度;number 类型时为最小值;array 类型时为数组最小长度 */ min: PropTypes.number, /** * 正则表达式匹配 */ pattern: PropTypes.oneOfType([ PropTypes.string, PropTypes.instanceOf(RegExp), ]), /** * 是否为必选字段 */ required: PropTypes.bool, /** * 类型,常见有 string |number |boolean |url | email等 */ type: PropTypes.oneOf([ 'string', 'number', 'boolean', 'method', 'regexp', 'integer', 'float', 'array', 'object', 'enum', 'date', 'url', 'hex', 'email', 'any', ]), /** * 设置触发验证时机,可选值有onChange、onBlur、onFocus,默认为onChange */ validateTrigger: PropTypes.oneOf([ 'onChange', 'onBlur', 'onFocus', ]), /** * 设置自定义校验,值需要是字符串格式的js函数 */ validator: PropTypes.string, /** * 仅警告,不阻塞表单提交 */ warningOnly: PropTypes.bool, /** * 如果字段仅包含空格则校验不通过,只在 type: 'string' 时生效 */ whitespace: PropTypes.bool, }) ), /** * 设置是否隐藏,默认为false */ hidden: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, ]), /** * 设置是否禁用,默认为false */ disabled: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, ]), /** * 设置是否为可读模式,默认为false */ readOnly: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, ]), /** * 指定只读渲染组件名称 */ readOnlyWidget: PropTypes.string, /** * 设置表单依赖元素,当依赖的元素更新时,会触发本元素的重新渲染,用于复杂的表单联动 */ dependencies: PropTypes.arrayOf(PropTypes.string), /** * 设置自定义控件class名称 */ className: PropTypes.string, /** * 当title未设置时,通过配置reserveLabel: true可以保留labelWidth占位,使得输入控件和其他控件上下对齐 */ reserveLabel: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, ]), /** * 设置额外属性,如果使用的是antd组件,对应的就是antd组件的其他属性 */ props: PropTypes.object, }), /** * 嵌套控件配置项 */ PropTypes.shape({ /** * 固定配置为type: 'object' */ type: PropTypes.oneOf(['object']), /** * 设置标题 */ title: PropTypes.string, /** * 设置希望使用的嵌套组件名称,可选的有'collapse'、'card'、'lineTitle'、'subInline',默认为'card' */ widget: PropTypes.oneOf([ 'collapse', 'card', 'lineTitle', 'subInline', ]), /** * 设置表单元素集合 */ properties: PropTypes.object, /** * 设置表单布局,一行应该有几列,默认为3 */ column: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置副标题描述 */ description: PropTypes.string, /** * 设置气泡提示,支持html格式,可传入一个antd的tooltip配置对象支持更多配置 */ tooltip: PropTypes.oneOfType([ PropTypes.string, PropTypes.shape({ /** * 设置显示的文字内容 */ title: PropTypes.any, /** * 设置气泡框的位置,可选的有'top'、'left'、'right'、'bottom'、'topLeft' * 、'topRight'、'bottomLeft'、'bottomRight'、'leftTop'、'leftBottom' * 、'rightTop'、'rightBottom',默认为'top' */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', ]), /** * 设置背景颜色 */ color: PropTypes.string, /** * 设置鼠标移入后延时多少才显示 Tooltip,单位:秒,默认为0.1 */ mouseEnterDelay: PropTypes.number, /** * 设置鼠标移出后延时多少才隐藏 Tooltip,单位:秒,默认为0.1 */ mouseLeaveDelay: PropTypes.number, /** * 设置卡片css类 */ overlayClassName: PropTypes.oneOfType([ PropTypes.string, PropTypes.object, ]), /** * 设置卡片样式 */ overlayStyle: PropTypes.object, /** * 设置卡片内容区域的样式 */ overlayInnerStyle: PropTypes.object, /** * 设置触发行为,可选的有'hover'、'focus'、'click',或是以上多个组成的数组,默认为'hover' */ trigger: PropTypes.oneOfType([ PropTypes.oneOf(['hover', 'focus', 'click']), PropTypes.arrayOf( PropTypes.oneOf(['hover', 'focus', 'click']) ), ]), /** * 设置悬浮层zIndex */ zIndex: PropTypes.number, /** * 设置修改箭头的显示状态以及修改箭头是否指向目标元素中心,默认为'show' */ arrow: PropTypes.oneOf(['show', 'hide', 'center']), /** * 用于设置是否始终保持更新内容,默认为false。默认情况下,Tooltip 在关闭时会缓存内容,设置该属性后会始终保持更新。 */ fresh: PropTypes.bool, /** * 用于监听或控制当前tooltip的显隐,默认为false */ open: PropTypes.bool, /** * 用于设置气泡被遮挡时自动调整位置,默认为true */ autoAdjustOverflow: PropTypes.bool, /** * 设置默认是否显隐,默认为false */ defaultOpen: PropTypes.bool, /** * 设置关闭后是否销毁Tooltip,默认为false */ destroyTooltipOnHide: PropTypes.bool, }), ]), /** * 设置额外属性,透传到对应的嵌套组件中 */ props: PropTypes.object, }), /** * 列表控件配置项 */ PropTypes.shape({ /** * 固定配置为type: 'array' */ type: PropTypes.oneOf(['array']), /** * 设置标题 */ title: PropTypes.string, /** * 设置希望使用的列表组件名称,可选的有'cardList'、'simpleList'、'tableList'、'drawerList'、'virtualList',默认为'cardList' */ widget: PropTypes.oneOf([ 'cardList', 'simpleList', 'tableList', 'drawerList', 'virtualList', ]), /** * 设置列表的最大长度 */ max: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置列表的最小长度 */ min: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 设置列表控件 */ props: PropTypes.shape({ /** * 设置添加按钮属性,参考 Antd Button Props() */ addBtnProps: PropTypes.object, /** * 设置删除确认弹窗属性,参考 Antd PopConfirm Props */ delConfirmProps: PropTypes.object, /** * 设置tableList | drawerList | virtualList 中操作列的属性,参考 Antd Table ColumnType。 其中 title 使用 colHeaderText 代替。 */ actionColumnProps: PropTypes.object, /** * 设置是否隐藏添加按钮 */ hideAdd: PropTypes.bool, /** * 设置是否隐藏复制按钮 */ hideCopy: PropTypes.bool, /** * 设置是否隐藏移动按钮 */ hideMove: PropTypes.bool, /** * 设置是否隐藏删除按钮 */ hideDelete: PropTypes.bool, }), /** * 动态项配置,可以是一个嵌套控件 */ items: PropTypes.object, }), ]) ), }).isRequired, /** * 设置表单布局模式,表单元素与 label 同行 or 分两行展示, inline 则整个展示自然顺排, * 可选的有'column'、'row'与'inline',默认为'column' */ displayType: PropTypes.oneOf(['column', 'row', 'inline']), /** * 设置label标签的文本对齐方式,可选的有'left'和'right',默认为'right' */ labelAlign: PropTypes.oneOf(['left', 'right']), /** * 设置表单标签固定宽度 */ lableWidth: PropTypes.number, /** * 设置表单项控件的最大宽度 */ maxWidth: PropTypes.number, /** * 设置表单标签占位格数 */ labelCol: PropTypes.number, /** * 设置表单控件占位格数 */ fieldCol: PropTypes.number, /** * 设置是否是否显示label后面的冒号,默认为true */ colon: PropTypes.bool, /** * 设置表单全局配置 */ globalConfig: PropTypes.exact({ /** * 设置是否禁用表达式 */ mustacheDisabled: PropTypes.bool, /** * 设置列表表单配置 */ listOperate: PropTypes.exact({ /** * 设置列表表单操作按钮样式 */ btnType: PropTypes.oneOf(['icon', 'text']), /** * 设置是否隐藏移动按钮 */ hideMove: PropTypes.bool, }), }), /** * 监听表单的数据变化,属性值需要是字符串格式的js函数 */ watch: PropTypes.objectOf(PropTypes.string), /** * 设置提交数据的时候是否去掉已经被隐藏的元素的数据,默认为true */ removeHiddenData: PropTypes.bool, /** * 设否开启只读模式,一般用于预览展示,全文text展示,默认为false */ readOnly: PropTypes.bool, /** * 设置一行展示多少列 */ column: PropTypes.number, /** * 设置是否禁用全部表单项,默认为false */ disabled: PropTypes.bool, /** * 设置提交失败是否自动滚动到第一个错误字段,默认为false */ scrollToFirstError: PropTypes.bool, /** * 设置展示语言,目前只支持中文、英文, * 可选的有'zh-CN'与'en-US',默认为'zh-CN' */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 设置底部操作区域 */ footer: PropTypes.oneOfType([ PropTypes.bool, PropTypes.shape({ /** * 设置提交按钮 */ submit: PropTypes.shape({ /** * 设置按钮文字 */ text: PropTypes.string, /** * 设置是否显示 */ hide: PropTypes.bool, /** * 设置其他按钮属性,参考 Antd Button Props() */ btnProps: PropTypes.object, }), /** * 设置重置按钮 */ reset: PropTypes.shape({ /** * 设置按钮文字 */ text: PropTypes.string, /** * 设置是否显示 */ hide: PropTypes.bool, /** * 设置其他按钮属性,参考 Antd Button Props() */ btnProps: PropTypes.object, }), }), PropTypes.node, ]), /** * 同antd的configProvider */ configProvider: PropTypes.object, /** * 设置默认的校验提示信息 */ validateMessages: PropTypes.exact({ default: PropTypes.string, required: PropTypes.string, whitespace: PropTypes.string, date: PropTypes.exact({ format: PropTypes.string, parse: PropTypes.string, invalid: PropTypes.string, }), types: PropTypes.exact({ string: PropTypes.string, method: PropTypes.string, array: PropTypes.string, object: PropTypes.string, number: PropTypes.string, date: PropTypes.string, boolean: PropTypes.string, integer: PropTypes.string, float: PropTypes.string, regexp: PropTypes.string, email: PropTypes.string, url: PropTypes.string, hex: PropTypes.string, }), string: PropTypes.exact({ len: PropTypes.string, min: PropTypes.string, max: PropTypes.string, range: PropTypes.string, }), number: PropTypes.exact({ len: PropTypes.string, min: PropTypes.string, max: PropTypes.string, range: PropTypes.string, }), array: PropTypes.exact({ len: PropTypes.string, min: PropTypes.string, max: PropTypes.string, range: PropTypes.string, }), pattern: PropTypes.exact({ mismatch: PropTypes.string, }), }), /** * 设置与监听表单数据 */ values: PropTypes.object, /** * 监听表单校验结果 */ validateStatuses: PropTypes.bool, /** * 控制参数,用于提交表单时手动搜集表单的校验结果,回调设置为true后会自动变为false */ submitForm: PropTypes.bool, /** * 辅助监听表单提交参数 */ submitFormClicks: PropTypes.number, /** * 控制参数,用于重置表单项校验状态(不能重置表单项包裹的组件的值,需要通过回调重置表单项包裹的组件的值),回调设置为true后会自动变为false */ resetForm: PropTypes.bool, /** * 辅助监听表单重置参数 */ resetFormClicks: PropTypes.number, loading_state: PropTypes.shape({ /** * Determines if the component is loading or not */ is_loading: PropTypes.bool, /** * Holds which property is loading */ prop_name: PropTypes.string, /** * Holds the name of the component that is loading */ component_name: PropTypes.string, }), /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; // 设置默认参数 AntdFormRender.defaultProps = { displayType: 'column', labelAlign: 'right', colon: true, removeHiddenData: true, readOnly: false, column: 1, disabled: false, scrollToFirstError: false, locale: 'zh-CN', submitFormClicks: 0, resetFormClicks: 0, }; export default AntdFormRender; export const propTypes = AntdFormRender.propTypes; export const defaultProps = AntdFormRender.defaultProps; ================================================ FILE: src/lib/components/general/AntdButton.react.js ================================================ // react核心 import { useContext } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Button } from 'antd'; // 辅助库 import { isString, isUndefined } from 'lodash'; import { pickBy } from 'ramda'; import { useRequest } from 'ahooks'; import { HappyProvider } from '@ant-design/happy-work-theme'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; // 自定义上下文 import PropsContext from '../../contexts/PropsContext'; /** * 按钮组件AntdButton */ const AntdButton = ({ id, children, loadingChildren, className, style, styles, classNames, key, setProps, type = 'default', href, target = '_blank', autoInsertSpace = true, block = false, danger = false, disabled = false, ghost = false, shape = 'default', size = 'middle', nClicks = 0, clickExecuteJsString, debounceWait = 0, icon, iconPosition = 'start', loading, autoSpin = false, motionType, color, variant, title, ...others }) => { // 使用自定义上下文 const context = useContext(PropsContext); // 防抖点击事件监听 const { run: onClick } = useRequest( () => { // 若clickExecuteJsString有效,则通过eval进行执行 if (clickExecuteJsString) { try { eval(clickExecuteJsString); } catch (error) { console.error(error); } } if (autoSpin) { // 更新nClicks,并自动进入loading状态 setProps({ nClicks: nClicks + 1, loading: true }); } else { // 更新nClicks setProps({ nClicks: nClicks + 1 }); } }, { debounceWait: debounceWait, debounceLeading: true, manual: true, } ); const renderElement = ( ); if (motionType === 'happy-work') { return {renderElement}; } return renderElement; }; AntdButton.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,按钮内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 按钮图标元素css样式 */ icon: PropTypes.object, }), /** * 细分控制子元素css类名 */ classNames: PropTypes.exact({ /** * 按钮图标元素css类名 */ icon: PropTypes.string, }), /** * 组件型,按钮加载状态下显示的内嵌元素 */ loadingChildren: PropTypes.node, /** * 按钮类型,可选项有`'default'`、`'primary'`、`'dashed'`、`'link'`、`'text'` * 默认值:`'default'` */ type: PropTypes.oneOf(['default', 'primary', 'dashed', 'link', 'text']), /** * 按钮点击跳转链接地址 */ href: PropTypes.string, /** * 按钮点击跳转链接方式 * 默认值:`'_blank'` */ target: PropTypes.string, /** * 按钮两个汉字内是否插入空格 * 默认值:`true` */ autoInsertSpace: PropTypes.bool, /** * 按钮是否渲染为块级元素(宽度撑满父容器) * 默认值:`false` */ block: PropTypes.bool, /** * 按钮是否呈现危险样式 * 默认值:`false` */ danger: PropTypes.bool, /** * 按钮是否呈现禁用状态 * 默认值:`false` */ disabled: PropTypes.bool, /** * 按钮是否呈现透明背景状态 * 默认值:`false` */ ghost: PropTypes.bool, /** * 按钮形状,可选项有`'default'`、`'circle'`、`'round'` * 默认值:`'default'` */ shape: PropTypes.oneOf(['default', 'circle', 'round']), /** * 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 按钮累计点击次数,用于监听按钮点击行为 * 默认值:`0` */ nClicks: PropTypes.number, /** * 按钮点击时需要附带执行的js程序字符串 */ clickExecuteJsString: PropTypes.string, /** * 按钮点击事件监听防抖延时,单位:毫秒 * 默认值:`0` */ debounceWait: PropTypes.number, /** * 组件型,按钮内嵌前缀图标元素 */ icon: PropTypes.node, /** * 按钮图标组件的位置,可选项有`'start'`、`'end'` * 默认值:`'start'` */ iconPosition: PropTypes.oneOf(['start', 'end']), /** * 按钮是否呈现加载状态 * 默认值:`false` */ loading: PropTypes.bool, /** * 当前按钮在每次点击后是否自动进入加载中状态 * 默认值:`false` */ autoSpin: PropTypes.bool, /** * 按钮额外的特殊交互类型,可选项有`'happy-work'` */ motionType: PropTypes.oneOf(['happy-work']), /** * 按钮颜色风格,可选项有`'default'`、`'primary'`、`'danger'`,以及可用的一系列内置颜色:`'blue'`、`'purple'`、`'cyan'`、`'green'`、`'magenta'`、`'pink'`、`'red'`、`'orange'`、`'yellow'`、`'volcano'`、`'geekblue'`、`'lime'`、`'gold'` */ color: PropTypes.oneOf([ 'default', 'primary', 'danger', 'blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold', ]), /** * 形态变体类型,可选项有`'outlined'`、`'dashed'`、`'solid'`、`'filled'`、`'text'`、`'link'` */ variant: PropTypes.oneOf([ 'outlined', 'dashed', 'solid', 'filled', 'text', 'link', ]), /** * 原生按钮title属性 */ title: PropTypes.string, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdButton; ================================================ FILE: src/lib/components/general/AntdFloatButton.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { FloatButton } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 悬浮按钮组件AntdFloatButton */ const AntdFloatButton = ({ id, className, style, key, icon, description, tooltip, type = 'default', shape = 'circle', href, target = '_blank', nClicks = 0, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} icon={icon} description={description} tooltip={tooltip} type={type} shape={shape} href={href} target={target} onClick={() => setProps({ nClicks: nClicks + 1 })} data-dash-is-loading={useLoading()} /> ); }; AntdFloatButton.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件型,按钮内嵌前缀图标元素 */ icon: PropTypes.node, /** * 组件型,按钮内嵌元素,仅`shape='square'`时可用 */ description: PropTypes.node, /** * 组件型,按钮额外气泡卡片内容 */ tooltip: PropTypes.oneOfType([ PropTypes.node, PropTypes.shape({ /** * 气泡卡片内容 */ title: PropTypes.node, /** * 气泡卡片背景色 */ color: PropTypes.string, /** * 气泡卡片展开方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ]), }), ]), /** * 按钮类型,可选项有`'default'`、`'primary'` * 默认值:`'default'` */ type: PropTypes.oneOf(['default', 'primary']), /** * 按钮形状,可选项有`'circle'`、`'square'` * 默认值:`'circle'` */ shape: PropTypes.oneOf(['circle', 'square']), /** * 按钮点击跳转链接地址 */ href: PropTypes.string, /** * 按钮点击跳转链接方式 * 默认值:`'_blank'` */ target: PropTypes.string, /** * 按钮累计点击次数,用于监听按钮点击行为 * 默认值:`0` */ nClicks: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdFloatButton; ================================================ FILE: src/lib/components/general/AntdFloatButtonGroup.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { FloatButton } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 悬浮按钮组组件AntdFloatButtonGroup */ const AntdFloatButtonGroup = ({ id, children, className, style, key, icon, description, tooltip, type = 'default', shape = 'circle', trigger, placement, open, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} icon={icon} description={description} tooltip={tooltip} type={type} shape={shape} trigger={trigger} placement={placement} open={open} onOpenChange={(e) => setProps({ open: e })} data-dash-is-loading={useLoading()} > {children} ); }; AntdFloatButtonGroup.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前悬浮按钮组内悬浮按钮 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 图标元素 */ icon: PropTypes.node, /** * 描述内容 */ description: PropTypes.node, /** * 气泡卡片内容 */ tooltip: PropTypes.oneOfType([ PropTypes.node, PropTypes.shape({ /** * 气泡卡片内容 */ title: PropTypes.node, /** * 气泡卡片背景色 */ color: PropTypes.string, /** * 气泡卡片展开方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'` */ placement: PropTypes.oneOf([ 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', ]), }), ]), /** * 按钮类型,可选项有`'default'`、`'primary'` * 默认值:`'default'` */ type: PropTypes.oneOf(['default', 'primary']), /** * 内部各悬浮按钮形状,可选项有`'circle'`、`'square'` * 默认值:`'circle'` */ shape: PropTypes.oneOf(['circle', 'square']), /** * 菜单展开模式触发方式,可选项有`'click'`、`'hover'` */ trigger: PropTypes.oneOf(['click', 'hover']), /** * 菜单展开方向,可选项有`'top'`、`'right'`、`'bottom'`、`'left'` */ placement: PropTypes.oneOf(['top', 'right', 'bottom', 'left']), /** * 设置或监听当前悬浮按钮组展开状态 */ open: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdFloatButtonGroup; ================================================ FILE: src/lib/components/general/AntdIcon.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { str2Icon } from '../icons.react'; import { createFromIconfontCN } from '@ant-design/icons'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useRequest } from 'ahooks'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 图标组件AntdIcon */ const AntdIcon = ({ id, className, mode = 'default', icon, scriptUrl, style, key, nClicks = 0, debounceWait = 0, setProps, ...others }) => { const { run: onClick } = useRequest( () => { // 更新nClicks setProps({ nClicks: nClicks + 1 }); }, { debounceWait: debounceWait, debounceLeading: true, manual: true, } ); if (icon) { // 内置图标模式 if (mode === 'default' || !mode) { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={ icon.startsWith('fc-') || icon.startsWith('md-') || icon.startsWith('di-') || icon.startsWith('bi-') || icon.startsWith('bs-') || icon.startsWith('gi-') || icon.startsWith('si-') ? { ...{ verticalAlign: 'middle', userSelect: 'none', }, ...style, } : { ...{ userSelect: 'none' }, ...style } } key={key} onClick={onClick} data-dash-is-loading={useLoading()} > {str2Icon.get(icon)} ); } // 阿里巴巴矢量图标模式 else if (mode === 'iconfont') { const IconFont = createFromIconfontCN({ scriptUrl: scriptUrl, }); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={{ ...{ userSelect: 'none' }, ...style }} key={key} onClick={onClick} data-dash-is-loading={useLoading()} > ); } } return null; }; AntdIcon.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 图标调用模式,可选项有`'default'`(内置图标)、`'iconfont'`(阿里巴巴矢量图标) * 默认值:`'default'` */ mode: PropTypes.oneOf(['default', 'iconfont']), /** * 当`mode='default'`时,设置内置图标名称,当`mode='iconfont'`时,设置自定义源图标名称 */ icon: PropTypes.string, /** * 当`mode='iconfont'`时,设置单个或多个阿里巴巴矢量图标源(在iconfont.cn上制作) */ scriptUrl: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), ]), /** * 图标累计点击次数,用于监听图标点击行为 * 默认值:`0` */ nClicks: PropTypes.number, /** * 图标点击事件监听防抖延时,单位:毫秒 * 默认值:`0` */ debounceWait: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdIcon; ================================================ FILE: src/lib/components/general/typography/AntdParagraph.react.js ================================================ // react核心 import { useContext } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Typography, ConfigProvider } from 'antd'; // 辅助库 import { str2Locale } from '../../locales.react'; import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; // 自定义上下文 import PropsContext from '../../../contexts/PropsContext'; const { Paragraph } = Typography; /** * 段落组件AntdParagraph */ const AntdParagraph = ({ id, children, className, style, key, locale = 'zh-cn', code, copyable, strikethrough, disabled, mark, strong, italic, underline, type, ellipsis = false, setProps, ...others }) => { const context = useContext(PropsContext); locale = (context && context.locale) || locale; children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} code={code} copyable={copyable} delete={strikethrough} disabled={disabled} mark={mark} strong={strong} italic={italic} underline={underline} type={type} ellipsis={ellipsis} data-dash-is-loading={useLoading()} > {children} ); }; AntdParagraph.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 是否渲染为代码形式 */ code: PropTypes.bool, /** * 是否开启快捷复制功能 */ copyable: PropTypes.bool, /** * 是否渲染为删除线形式 */ strikethrough: PropTypes.bool, /** * 是否渲染为禁用形式 */ disabled: PropTypes.bool, /** * 是否渲染为高亮形式 */ mark: PropTypes.bool, /** * 是否渲染为加粗形式 */ strong: PropTypes.bool, /** * 是否渲染为斜体形式 */ italic: PropTypes.bool, /** * 是否渲染为下划线形式 */ underline: PropTypes.bool, /** * 设置内容特殊状态形式,可选项有`'secondary'`、`'success'`、`'warning'`、`'danger'` */ type: PropTypes.oneOf(['secondary', 'success', 'warning', 'danger']), /** * 配置内容省略相关功能,设置为`false`则不开启 * 默认值:`false` */ ellipsis: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 是否可展开 */ expandable: PropTypes.oneOfType([ PropTypes.bool, PropTypes.oneOf(['collapsible']), ]), /** * 最大显示行数 */ rows: PropTypes.number, /** * 自定义内容省略后缀 */ suffix: PropTypes.string, /** * 组件型,自定义内容展开控件 */ symbol: PropTypes.node, }), ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdParagraph; ================================================ FILE: src/lib/components/general/typography/AntdText.react.js ================================================ // react核心 import { useContext } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Typography, ConfigProvider } from 'antd'; // 辅助库 import { str2Locale } from '../../locales.react'; import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; // 自定义上下文 import PropsContext from '../../../contexts/PropsContext'; const { Text } = Typography; /** * 文字组件AntdText */ const AntdText = ({ id, children, className, style, key, locale = 'zh-cn', code, copyable, strikethrough, disabled, mark, strong, italic, underline, type, keyboard, ellipsis = false, setProps, ...others }) => { const context = useContext(PropsContext); locale = (context && context.locale) || locale; children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} code={code} copyable={copyable} delete={strikethrough} disabled={disabled} mark={mark} strong={strong} italic={italic} underline={underline} type={type} keyboard={keyboard} ellipsis={ellipsis} data-dash-is-loading={useLoading()} > {children} ); }; AntdText.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 是否渲染为代码形式 */ code: PropTypes.bool, /** * 是否开启快捷复制功能 */ copyable: PropTypes.bool, /** * 是否渲染为删除线形式 */ strikethrough: PropTypes.bool, /** * 是否渲染为禁用形式 */ disabled: PropTypes.bool, /** * 是否渲染为高亮形式 */ mark: PropTypes.bool, /** * 是否渲染为加粗形式 */ strong: PropTypes.bool, /** * 是否渲染为斜体形式 */ italic: PropTypes.bool, /** * 是否渲染为下划线形式 */ underline: PropTypes.bool, /** * 是否渲染为键盘形式 */ keyboard: PropTypes.bool, /** * 设置内容特殊状态形式,可选项有`'secondary'`、`'success'`、`'warning'`、`'danger'` */ type: PropTypes.oneOf(['secondary', 'success', 'warning', 'danger']), /** * 配置内容省略相关功能,设置为`false`则不开启 * 默认值:`false` */ ellipsis: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 自定义内容省略后缀 */ suffix: PropTypes.string, }), ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdText; ================================================ FILE: src/lib/components/general/typography/AntdTitle.react.js ================================================ // react核心 import { useContext } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Typography, ConfigProvider } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { str2Locale } from '../../locales.react'; import { parseChildrenToArray, useLoading } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; // 自定义上下文 import PropsContext from '../../../contexts/PropsContext'; const { Title } = Typography; /** * 标题组件AntdTitle */ const AntdTitle = ({ id, children, className, style, key, locale = 'zh-cn', level = 1, code, copyable, strikethrough, disabled, mark, strong, italic, underline, type, keyboard, setProps, ...others }) => { const context = useContext(PropsContext); locale = (context && context.locale) || locale; children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} level={level} code={code} copyable={copyable} delete={strikethrough} disabled={disabled} mark={mark} strong={strong} italic={italic} underline={underline} type={type} keyboard={keyboard} data-dash-is-loading={useLoading()} > {children} ); }; AntdTitle.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 标题级别,可选项有`1`、`2`、`3`、`4`、`5` * 默认值:`1` */ level: PropTypes.number, /** * 是否渲染为代码形式 */ code: PropTypes.bool, /** * 是否开启快捷复制功能 */ copyable: PropTypes.bool, /** * 是否渲染为删除线形式 */ strikethrough: PropTypes.bool, /** * 是否渲染为禁用形式 */ disabled: PropTypes.bool, /** * 是否渲染为高亮形式 */ mark: PropTypes.bool, /** * 是否渲染为加粗形式 */ strong: PropTypes.bool, /** * 是否渲染为斜体形式 */ italic: PropTypes.bool, /** * 是否渲染为下划线形式 */ underline: PropTypes.bool, /** * 是否渲染为键盘形式 */ keyboard: PropTypes.bool, /** * 设置内容特殊状态形式,可选项有`'secondary'`、`'success'`、`'warning'`、`'danger'` */ type: PropTypes.oneOf(['secondary', 'success', 'warning', 'danger']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdTitle; ================================================ FILE: src/lib/components/icons.react.js ================================================ import { ToolTwoTone, NotificationTwoTone, HourglassTwoTone, CloudTwoTone, ApiTwoTone, SlidersTwoTone, FundTwoTone, BoxPlotTwoTone, PieChartTwoTone, HighlightTwoTone, DeleteTwoTone, EditTwoTone, CheckSquareTwoTone, CheckCircleTwoTone, CloseSquareTwoTone, CloseCircleTwoTone, ExclamationCircleTwoTone, InfoCircleTwoTone, MinusSquareTwoTone, PlusSquareTwoTone, MinusCircleTwoTone, PlusCircleTwoTone, QuestionCircleTwoTone, RightSquareTwoTone, LeftSquareTwoTone, DownSquareTwoTone, UpSquareTwoTone, DownCircleTwoTone, UpCircleTwoTone, RightCircleTwoTone, LeftCircleTwoTone, StarOutlined, SkinOutlined, SmileOutlined, InsuranceOutlined, BlockOutlined, BankOutlined, SketchOutlined, CheckOutlined, CloseOutlined, MinusOutlined, PlusOutlined, QuestionOutlined, FullscreenOutlined, DownOutlined, UpOutlined, LeftOutlined, RightOutlined, ArrowDownOutlined, ArrowUpOutlined, ArrowLeftOutlined, ArrowRightOutlined, ManOutlined, WomanOutlined, UserDeleteOutlined, UserAddOutlined, TrophyOutlined, SelectOutlined, ThunderboltOutlined, TagsOutlined, TagOutlined, SoundOutlined, ShoppingCartOutlined, RobotOutlined, PushpinOutlined, PrinterOutlined, PictureOutlined, PhoneOutlined, PartitionOutlined, MoreOutlined, MonitorOutlined, MoneyCollectOutlined, MobileOutlined, LinkOutlined, LayoutOutlined, IdcardOutlined, GiftOutlined, FunnelPlotOutlined, FundProjectionScreenOutlined, ForkOutlined, FolderOpenOutlined, FolderOutlined, FolderAddOutlined, FlagOutlined, FireOutlined, FilterOutlined, FileZipOutlined, FileWordOutlined, FileTextOutlined, FileSyncOutlined, FileProtectOutlined, FilePdfOutlined, FileMarkdownOutlined, FileImageOutlined, FileOutlined, FileDoneOutlined, FileAddOutlined, FieldTimeOutlined, FieldStringOutlined, FieldNumberOutlined, FieldBinaryOutlined, EyeInvisibleOutlined, EyeOutlined, ExperimentOutlined, ExceptionOutlined, EnvironmentOutlined, DownloadOutlined, DollarOutlined, EuroOutlined, LikeOutlined, DislikeOutlined, DisconnectOutlined, DesktopOutlined, DeploymentUnitOutlined, CrownOutlined, CoffeeOutlined, CloudSyncOutlined, CarryOutOutlined, CarOutlined, BulbOutlined, BuildOutlined, BugOutlined, BranchesOutlined, BarcodeOutlined, AimOutlined, IssuesCloseOutlined, EllipsisOutlined, HomeOutlined, FundOutlined, RadarChartOutlined, BarChartOutlined, PieChartOutlined, DotChartOutlined, LineChartOutlined, ApartmentOutlined, AppstoreOutlined, AppstoreAddOutlined, BellOutlined, CalculatorOutlined, DatabaseOutlined, CalendarOutlined, HistoryOutlined, SearchOutlined, FileSearchOutlined, CloudDownloadOutlined, CloudServerOutlined, CloudUploadOutlined, SwapOutlined, RollbackOutlined, LoginOutlined, TableOutlined, LogoutOutlined, MenuFoldOutlined, MenuUnfoldOutlined, FullscreenExitOutlined, QuestionCircleOutlined, PlusCircleOutlined, MinusCircleOutlined, InfoCircleOutlined, ExclamationCircleOutlined, CloseCircleOutlined, CheckCircleOutlined, ClockCircleOutlined, StopOutlined, EditOutlined, DeleteOutlined, HighlightOutlined, RedoOutlined, UndoOutlined, ZoomInOutlined, ZoomOutOutlined, SortAscendingOutlined, SortDescendingOutlined, AreaChartOutlined, BoxPlotOutlined, FallOutlined, RiseOutlined, StockOutlined, GithubOutlined, WeiboCircleOutlined, AlipayOutlined, AlipayCircleOutlined, AndroidOutlined, AppleOutlined, WechatOutlined, WechatWorkOutlined, OpenAIOutlined, BilibiliOutlined, TikTokOutlined, JavaScriptOutlined, PythonOutlined, DockerOutlined, AccountBookOutlined, AlertOutlined, ApiOutlined, BarsOutlined, BookOutlined, CameraOutlined, ClearOutlined, CloudOutlined, ClusterOutlined, CodeOutlined, CommentOutlined, CompassOutlined, ConsoleSqlOutlined, ControlOutlined, DashboardOutlined, ExportOutlined, ImportOutlined, FunctionOutlined, GlobalOutlined, HourglassOutlined, KeyOutlined, LoadingOutlined, LockOutlined, MailOutlined, MenuOutlined, NotificationOutlined, NumberOutlined, PoweroffOutlined, QrcodeOutlined, ReadOutlined, ReloadOutlined, SaveOutlined, RocketOutlined, ScheduleOutlined, SendOutlined, SettingOutlined, SyncOutlined, TeamOutlined, ToolOutlined, UnlockOutlined, UserOutlined, CaretUpOutlined, CaretDownOutlined, CaretLeftOutlined, CaretRightOutlined, UpCircleOutlined, DownCircleOutlined, LeftCircleOutlined, RightCircleOutlined, EnterOutlined, RetweetOutlined, WarningOutlined, FormOutlined, CopyOutlined, ScissorOutlined, SnippetsOutlined, DiffOutlined, OrderedListOutlined, UnorderedListOutlined, SlidersOutlined, AuditOutlined, BorderOutlined, ContactsOutlined, ContainerOutlined, DeliveredProcedureOutlined, PauseOutlined, StepBackwardOutlined, StepForwardOutlined, FastForwardOutlined, FastBackwardOutlined, SunOutlined, MoonOutlined, } from '@ant-design/icons'; import { BsAlarm, BsEnvelope, BsEnvelopeOpen, BsLink, BsLink45Deg, BsListCheck, BsListTask, } from 'react-icons/bs/index.esm'; import { BiAnalyse, BiTable, BiLayer, BiLayerMinus, BiLayerPlus, } from 'react-icons/bi/index.esm'; import { DiPython, DiLinux, DiChrome, DiDatabase, DiFirefox, DiMarkdown, DiPostgresql, DiTerminal, DiWindows, } from 'react-icons/di/index.esm'; import { FcAdvertising, FcApproval, FcBookmark, FcBearish, FcBullish, FcCalculator, FcCalendar, FcCommandLine, FcDataSheet, FcElectronics, FcFolder, FcGlobe, FcInspection, FcOk, FcOpenedFolder, FcOrgUnit, FcParallelTasks, FcPlanner, FcNegativeDynamic, FcPositiveDynamic, FcSafe, FcSerialTasks, FcSearch, FcStatistics, FcSupport, FcSynchronize, FcTodoList, FcWorkflow, FcComboChart, FcAreaChart, FcBarChart, FcDoughnutChart, FcFlowChart, FcLineChart, FcPieChart, FcScatterPlot, FcRadarPlot, FcAbout, FcAcceptDatabase, FcAddDatabase, FcAlphabeticalSortingAz, FcAlphabeticalSortingZa, FcAutomatic, FcBinoculars, FcBriefcase, FcCancel, FcCheckmark, FcDataBackup, FcDataConfiguration, FcDataEncryption, FcConferenceCall, FcDataProtection, FcDatabase, FcDeleteDatabase, FcDeployment, FcDocument, FcDownload, FcEmptyTrash, FcExport, FcFaq, FcFile, FcFinePrint, FcFullTrash, FcGenealogy, FcHighPriority, FcHome, FcIdea, FcImageFile, FcImport, FcInfo, FcLikePlaceholder, FcLike, FcList, FcLowPriority, FcMenu, FcMindMap, FcMultipleInputs, FcNumericalSorting12, FcNumericalSorting21, FcOrganization, FcOvertime, FcPlus, FcProcess, FcQuestions, FcRules, FcServices, FcSettings, FcShare, FcSignature, FcSurvey, FcTemplate, FcTimeline, FcTreeStructure, FcUpload, FcViewDetails, FcVlc, } from 'react-icons/fc/index.esm'; import { MdAccountCircle, MdAlarm, MdAlarmAdd, MdAlarmOff, MdAlarmOn, MdAssessment, MdAssignment, MdBugReport, MdBuild, MdCode, MdDashboard, MdDelete, MdDeleteForever, MdDescription, MdEvent, MdExitToApp, MdExplore, MdExtension, MdFavorite, MdFavoriteBorder, MdFindInPage, MdFingerprint, MdGTranslate, MdGetApp, MdHelp, MdHelpOutline, MdHighlightOff, MdHistory, MdHome, MdHourglassEmpty, MdInfo, MdInfoOutline, MdInput, MdLabel, MdLabelOutline, MdLaunch, MdLightbulbOutline, MdList, MdLockOpen, MdLockOutline, MdNoteAdd, MdOpacity, MdPowerSettingsNew, MdQueryBuilder, MdRestore, MdSchedule, MdSearch, MdSettings, MdSubject, MdSupervisorAccount, MdSwapHoriz, MdSwapVert, MdThumbDown, MdThumbUp, MdTimeline, MdToc, MdTranslate, MdTrendingDown, MdTrendingFlat, MdTrendingUp, MdUpdate, MdVerifiedUser, MdVisibility, MdVisibilityOff, MdAddAlert, MdEqualizer, MdLibraryAdd, MdLibraryBooks, MdNotInterested, MdEmail, MdMailOutline, MdLocationOn, MdAddCircle, MdAddCircleOutline, MdAdd, MdAddBox, MdBackspace, MdBlock, MdClear, MdContentCopy, MdContentCut, MdContentPaste, MdCreate, MdDrafts, MdFlag, MdForward, MdGesture, MdLink, MdLowPriority, MdRemove, MdRemoveCircle, MdRemoveCircleOutline, MdSave, MdStorage, MdAttachFile, MdFormatQuote, MdFunctions, MdInsertChart, MdCloudDone, MdCloudDownload, MdCloudQueue, MdCloudUpload, MdCreateNewFolder, MdFileDownload, MdFileUpload, MdTimer, MdTimerOff, MdTransform, MdTune, MdEditLocation, MdLayers, MdLayersClear, MdPinDrop, MdNotifications, MdPlusOne, MdPeople, MdStar, MdStarBorder, MdStarHalf, } from 'react-icons/md/index.esm'; import { ImEarth, ImSphere } from 'react-icons/im/index.esm'; import { GiMeshNetwork } from 'react-icons/gi/index.esm'; import { PiCircle, PiPolygon, PiMapPin, PiLineSegment, PiLineSegments, PiTrashSimple, PiTrash, PiRuler, PiSelection, PiSelectionSlash, PiSquareSplitHorizontal, PiSquareSplitVertical, PiStackSimple, PiStack, PiNavigationArrow, PiMapTrifold, PiInfo, PiLockKeyOpen, PiLockKey, PiGear, PiAirplane, PiAnchorSimple, PiArrowArcLeft, PiArrowArcRight, PiArrowClockwise, PiArrowCounterClockwise, PiBarricade, PiBinoculars, PiBoundingBox, PiBroom, PiBuildings, PiCalculator, PiCamera, PiCircuitry, PiClipboard, PiCompass, PiCopy, PiCpu, PiCrosshair, PiCubeFocus, PiCube, PiCursor, PiDatabase, PiEyeSlash, PiEye, PiFaders, PiFloppyDisk, PiDotsThreeVertical, PiDotsThree, PiMathOperations, PiPlus, PiMinus, PiPath, } from 'react-icons/pi/index.esm'; import { SiGitee } from 'react-icons/si/index.esm'; // vscode中,使用正则查找目标后,按快捷键alt+enter批量选中匹配项 const str2Icon = new Map([ ['antd-carry-out', ], ['antd-car', ], ['antd-bulb', ], ['antd-build', ], ['antd-bug', ], ['antd-bar-code', ], ['antd-branches', ], ['antd-aim', ], ['antd-issues-close', ], ['antd-ellipsis', ], ['antd-user', ], ['antd-unlock', ], ['antd-repair', ], ['antd-team', ], ['antd-sync', ], ['antd-setting', ], ['antd-send', ], ['antd-schedule', ], ['antd-save', ], ['antd-rocket', ], ['antd-reload', ], ['antd-read', ], ['antd-qrcode', ], ['antd-power-off', ], ['antd-number', ], ['antd-notification', ], ['antd-menu', ], ['antd-mail', ], ['antd-lock', ], ['antd-loading', ], ['antd-key', ], ['antd-hourglass', ], ['antd-global', ], ['antd-function', ], ['antd-import', ], ['antd-export', ], ['antd-dashboard', ], ['antd-control', ], ['antd-console-sql', ], ['antd-compass', ], ['antd-comment', ], ['antd-code', ], ['antd-cluster', ], ['antd-clear', ], ['antd-camera', ], ['antd-book', ], ['antd-catalog', ], ['antd-api', ], ['antd-alert', ], ['antd-account-book', ], ['antd-alipay', ], ['antd-alipay-circle', ], ['antd-weibo', ], ['antd-github', ], ['antd-android', ], ['antd-apple', ], ['antd-wechat', ], ['antd-wechat-work', ], ['antd-openai', ], ['antd-bilibili', ], ['antd-tiktok', ], ['antd-javascript', ], ['antd-python', ], ['antd-docker', ], ['antd-fall', ], ['antd-rise', ], ['antd-stock', ], ['antd-home', ], ['antd-fund', ], ['antd-area-chart', ], ['antd-radar-chart', ], ['antd-bar-chart', ], ['antd-pie-chart', ], ['antd-box-plot', ], ['antd-dot-chart', ], ['antd-line-chart', ], ['antd-field-binary', ], ['antd-field-number', ], ['antd-field-string', ], ['antd-field-time', ], ['antd-file-add', ], ['antd-file-done', ], ['antd-file', ], ['antd-file-image', ], ['antd-file-markdown', ], ['antd-file-pdf', ], ['antd-file-protect', ], ['antd-file-sync', ], ['antd-file-text', ], ['antd-file-word', ], ['antd-file-zip', ], ['antd-filter', ], ['antd-fire', ], ['antd-woman', ], ['antd-arrow-up', ], ['antd-arrow-down', ], ['antd-arrow-left', ], ['antd-arrow-right', ], ['antd-flag', ], ['antd-user-add', ], ['antd-folder-add', ], ['antd-man', ], ['antd-tag', ], ['antd-folder', ], ['antd-user-delete', ], ['antd-trophy', ], ['antd-shopping-cart', ], ['antd-folder-open', ], ['antd-fork', ], ['antd-select', ], ['antd-tags', ], ['antd-thunderbolt', ], ['antd-sound', ], ['antd-fund-projection-screen', ], ['antd-funnel-plot', ], ['antd-gift', ], ['antd-robot', ], ['antd-pushpin', ], ['antd-printer', ], ['antd-phone', ], ['antd-picture', ], ['antd-idcard', ], ['antd-partition', ], ['antd-monitor', ], ['antd-more', ], ['antd-apartment', ], ['antd-money-collect', ], ['antd-experiment', ], ['antd-link', ], ['antd-mobile', ], ['antd-coffee', ], ['antd-layout', ], ['antd-eye', ], ['antd-eye-invisible', ], ['antd-exception', ], ['antd-dollar', ], ['antd-euro', ], ['antd-download', ], ['antd-environment', ], ['antd-deployment-unit', ], ['antd-crown', ], ['antd-desktop', ], ['antd-like', ], ['antd-dislike', ], ['antd-disconnect', ], ['antd-app-store', ], ['antd-app-store-add', ], ['antd-bell', ], ['antd-calculator', ], ['antd-calendar', ], ['antd-database', ], ['antd-history', ], ['antd-search', ], ['antd-file-search', ], ['antd-cloud', ], ['antd-cloud-upload', ], ['antd-cloud-download', ], ['antd-cloud-server', ], ['antd-cloud-sync', ], ['antd-swap', ], ['antd-rollback', ], ['antd-login', ], ['antd-logout', ], ['antd-menu-fold', ], ['antd-menu-unfold', ], ['antd-full-screen', ], ['antd-full-screen-exit', ], ['antd-question-circle', ], ['antd-plus-circle', ], ['antd-minus-circle', ], ['antd-info-circle', ], ['antd-exclamation-circle', ], ['antd-close-circle', ], ['antd-check-circle', ], ['antd-clock-circle', ], ['antd-stop', ], ['antd-edit', ], ['antd-delete', ], ['antd-highlight', ], ['antd-redo', ], ['antd-undo', ], ['antd-zoom-in', ], ['antd-zoom-out', ], ['antd-sort-ascending', ], ['antd-sort-descending', ], ['antd-table', ], ['antd-question', ], ['antd-plus', ], ['antd-minus', ], ['antd-close', ], ['antd-check', ], ['antd-sketch', ], ['antd-bank', ], ['antd-block', ], ['antd-insurance', ], ['antd-smile', ], ['antd-skin', ], ['antd-star', ], ['antd-right-circle-two-tone', ], ['antd-left-circle-two-tone', ], ['antd-up-circle-two-tone', ], ['antd-down-circle-two-tone', ], ['antd-up-square-two-tone', ], ['antd-down-square-two-tone', ], ['antd-left-square-two-tone', ], ['antd-right-square-two-tone', ], ['antd-question-circle-two-tone', ], ['antd-plus-circle-two-tone', ], ['antd-minus-circle-two-tone', ], ['antd-plus-square-two-tone', ], ['antd-minus-square-two-tone', ], ['antd-info-circle-two-tone', ], ['antd-exclamation-circle-two-tone', ], ['antd-close-circle-two-tone', ], ['antd-close-square-two-tone', ], ['antd-check-circle-two-tone', ], ['antd-check-square-two-tone', ], ['antd-edit-two-tone', ], ['antd-delete-two-tone', ], ['antd-highlight-two-tone', ], ['antd-pie-chart-two-tone', ], ['antd-box-chart-two-tone', ], ['antd-fund-two-tone', ], ['antd-sliders-two-tone', ], ['antd-api-two-tone', ], ['antd-cloud-two-tone', ], ['antd-hourglass-two-tone', ], ['antd-notification-two-tone', ], ['antd-tool-two-tone', ], ['antd-down', ], ['antd-up', ], ['antd-left', ], ['antd-right', ], ['antd-caret-up', ], ['antd-caret-down', ], ['antd-caret-left', ], ['antd-caret-right', ], ['antd-up-circle', ], ['antd-down-circle', ], ['antd-left-circle', ], ['antd-right-circle', ], ['antd-enter', ], ['antd-retweet', ], ['antd-warning', ], ['antd-form', ], ['antd-copy', ], ['antd-scissor', ], ['antd-snippets', ], ['antd-diff', ], ['antd-ordered-list', ], ['antd-unordered-list', ], ['antd-sliders', ], ['antd-audit', ], ['antd-border', ], ['antd-contacts', ], ['antd-container', ], ['antd-delivered-procedure', ], ['antd-pause', ], ['antd-step-backward', ], ['antd-step-forward', ], ['antd-fast-forward', ], ['antd-fast-backward', ], ['antd-sun', ], ['antd-moon', ], ['md-star-half', ], ['md-star-border', ], ['md-star', ], ['md-people', ], ['md-plus-one', ], ['md-notifications', ], ['md-pin-drop', ], ['md-layers-clear', ], ['md-layers', ], ['md-edit-location', ], ['md-tune', ], ['md-transform', ], ['md-timer-off', ], ['md-timer', ], ['md-file-upload', ], ['md-file-download', ], ['md-create-new-folder', ], ['md-cloud-upload', ], ['md-cloud-queue', ], ['md-cloud-download', ], ['md-cloud-done', ], ['md-insert-chart', ], ['md-functions', ], ['md-format-quote', ], ['md-attach-file', ], ['md-storage', ], ['md-save', ], ['md-remove-circle-outline', ], ['md-remove-circle', ], ['md-remove', ], ['md-low-priority', ], ['md-link', ], ['md-gesture', ], ['md-forward', ], ['md-flag', ], ['md-drafts', ], ['md-create', ], ['md-content-paste', ], ['md-content-cut', ], ['md-content-copy', ], ['md-clear', ], ['md-block', ], ['md-backspace', ], ['md-add-box', ], ['md-add', ], ['md-add-circle-outline', ], ['md-add-circle', ], ['md-location-on', ], ['md-mail-outline', ], ['md-email', ], ['md-not-interested', ], ['md-library-books', ], ['md-library-add', ], ['md-equalizer', ], ['md-add-alert', ], ['md-visibility-off', ], ['md-visibility', ], ['md-verified-user', ], ['md-update', ], ['md-trending-up', ], ['md-trending-flat', ], ['md-trending-down', ], ['md-translate', ], ['md-toc', ], ['md-timeline', ], ['md-thumb-up', ], ['md-thumb-down', ], ['md-swap-vert', ], ['md-swap-horiz', ], ['md-supervisor-account', ], ['md-subject', ], ['md-settings', ], ['md-search', ], ['md-schedule', ], ['md-restore', ], ['md-query-builder', ], ['md-power-settings-new', ], ['md-opacity', ], ['md-note-add', ], ['md-lock-outline', ], ['md-lock-open', ], ['md-list', ], ['md-lightbulb-outline', ], ['md-launch', ], ['md-label-outline', ], ['md-label', ], ['md-input', ], ['md-info-outline', ], ['md-info', ], ['md-hourglass', ], ['md-home', ], ['md-history', ], ['md-highlight-off', ], ['md-help-outline', ], ['md-help', ], ['md-get-app', ], ['md-translate', ], ['md-fingerprint', ], ['md-findIn-page', ], ['md-favorite-border', ], ['md-favorite', ], ['md-extension', ], ['md-explore', ], ['md-exit-to-app', ], ['md-event', ], ['md-description', ], ['md-delete-forever', ], ['md-delete', ], ['md-dashboard', ], ['md-code', ], ['md-build', ], ['md-bug-report', ], ['md-assignment', ], ['md-assessment', ], ['md-alarm-on', ], ['md-alarm-off', ], ['md-alarm-add', ], ['md-alarm', ], ['md-account-circle', ], ['fc-vlc', ], ['fc-view-details', ], ['fc-upload', ], ['fc-tree-structure', ], ['fc-timeline', ], ['fc-template', ], ['fc-survey', ], ['fc-signature', ], ['fc-share', ], ['fc-services', ], ['fc-rules', ], ['fc-questions', ], ['fc-process', ], ['fc-plus', ], ['fc-overtime', ], ['fc-organization', ], ['fc-numerical-sorting21', ], ['fc-numerical-sorting12', ], ['fc-multiple-inputs', ], ['fc-mind-map', ], ['fc-menu', ], ['fc-list', ], ['fc-like', ], ['fc-like-placeholder', ], ['fc-info', ], ['fc-import', ], ['fc-image-file', ], ['fc-idea', ], ['fc-home', ], ['fc-high-priority', ], ['fc-low-priority', ], ['fc-genealogy', ], ['fc-full-trash', ], ['fc-document-search', ], ['fc-file', ], ['fc-faq', ], ['fc-export', ], ['fc-empty-trash', ], ['fc-download', ], ['fc-document', ], ['fc-deployment', ], ['fc-delete-database', ], ['fc-conference-call', ], ['fc-database', ], ['fc-data-protection', ], ['fc-data-encryption', ], ['fc-data-configuration', ], ['fc-data-backup', ], ['fc-checkmark', ], ['fc-cancel', ], ['fc-briefcase', ], ['fc-binoculars', ], ['fc-automatic', ], ['fc-alphabetical-sorting-za', ], ['fc-alphabetical-sorting-az', ], ['fc-add-database', ], ['fc-accept-database', ], ['fc-about', ], ['fc-radar-chart', ], ['fc-scatter-chart', ], ['fc-pie-chart', ], ['fc-line-chart', ], ['fc-flow-chart', ], ['fc-doughnut-chart', ], ['fc-bar-chart', ], ['fc-area-chart', ], ['fc-line-bar-chart', ], ['fc-workflow', ], ['fc-todo-list', ], ['fc-synchronize', ], ['fc-repair', ], ['fc-statistics', ], ['fc-settings', ], ['fc-search', ], ['fc-serial-tasks', ], ['fc-safe', ], ['fc-negative-dynamic', ], ['fc-positive-dynamic', ], ['fc-planner', ], ['fc-parallel-tasks', ], ['fc-org-unit', ], ['fc-opened-folder', ], ['fc-ok', ], ['fc-inspection', ], ['fc-globe', ], ['fc-folder', ], ['fc-electronics', ], ['fc-data-sheet', ], ['fc-command-line', ], ['fc-calendar', ], ['fc-calculator', ], ['fc-bullish', ], ['fc-bearish', ], ['fc-bookmark', ], ['fc-approval', ], ['fc-advertising', ], ['di-linux', ], ['di-python', ], ['di-chrome', ], ['di-database', ], ['di-firefox', ], ['di-markdown', ], ['di-postgresql', ], ['di-terminal', ], ['di-windows', ], ['bi-table', ], ['bi-analyse', ], ['bi-layer', ], ['bi-layer-minus', ], ['bi-layer-plus', ], ['bs-list-task', ], ['bs-list-check', ], ['bs-link', ], ['bs-link-45-deg', ], ['bs-envelope-open', ], ['bs-envelope', ], ['bs-alarm', ], ['im-earth', ], ['im-sphere', ], ['gi-mesh-network', ], ['pi-circle', ], ['pi-polygon', ], ['pi-map-pin', ], ['pi-line-segment', ], ['pi-line-segments', ], ['pi-trash-simple', ], ['pi-trash', ], ['pi-ruler', ], ['pi-selection', ], ['pi-selection-slash', ], ['pi-square-split-horizontal', ], ['pi-square-split-vertical', ], ['pi-stack-simple', ], ['pi-stack', ], ['pi-navigation-arrow', ], ['pi-map-trifold', ], ['pi-info', ], ['pi-lock-key-open', ], ['pi-lock-key', ], ['pi-gear', ], ['pi-airplane', ], ['pi-anchor-simple', ], ['pi-arrow-arc-left', ], ['pi-arrow-arc-right', ], ['pi-arrow-clockwise', ], ['pi-arrow-counter-clockwise', ], ['pi-barricade', ], ['pi-binoculars', ], ['pi-bounding-box', ], ['pi-broom', ], ['pi-buildings', ], ['pi-calculator', ], ['pi-camera', ], ['pi-circuitry', ], ['pi-clipboard', ], ['pi-compass', ], ['pi-copy', ], ['pi-cpu', ], ['pi-crosshair', ], ['pi-cube-focus', ], ['pi-cube', ], ['pi-cursor', ], ['pi-database', ], ['pi-eye-slash', ], ['pi-eye', ], ['pi-faders', ], ['pi-floppy-disk', ], ['pi-dots-three-vertical', ], ['pi-dots-three', ], ['pi-math-operations', ], ['pi-plus', ], ['pi-minus', ], ['pi-path', ], ['si-gitee', ], ]); export { str2Icon }; ================================================ FILE: src/lib/components/layout/AntdCenter.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { theme } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; const { useToken } = theme; /** * 居中组件AntdCenter */ const AntdCenter = ({ id, children, className, style, key, inline = false, inheritStyleToken = false, setProps, ...others }) => { const { token } = useToken(); children = parseChildrenToArray(children); return (
k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={{ display: inline ? 'inline-flex' : 'flex', alignItems: 'center', justifyContent: 'center', ...(inheritStyleToken ? { backgroundColor: token.colorBgBase, color: token.colorTextBase, fontSize: token.fontSize, } : {}), ...style, }} key={key} data-dash-is-loading={useLoading()} > {children}
); }; AntdCenter.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 是否渲染为行内元素 * 默认值:`false` */ inline: PropTypes.bool, /** * 是否在背景色、字体颜色、字体大小等样式上联动`AntdConfigProvider`相关设置 * 默认值:`false` */ inheritStyleToken: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCenter; ================================================ FILE: src/lib/components/layout/AntdCompact.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Space } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; const { Compact } = Space; /** * 紧凑排列组件AntdCompact */ const AntdCompact = ({ id, children, className, style, key, direction = 'horizontal', block = false, setProps, ...others }) => { children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} direction={direction} block={block} data-dash-is-loading={useLoading()} > {children} ); }; AntdCompact.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 排列方向,可选项有`'vertical'`、`'horizontal'` * 默认值:`'horizontal'` */ direction: PropTypes.oneOf(['vertical', 'horizontal']), /** * 是否渲染为块级元素(宽度撑满父容器) * 默认值:`false` */ block: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCompact; ================================================ FILE: src/lib/components/layout/AntdContent.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Layout } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; const { Content } = Layout; /** * 内容区组件AntdContent */ const AntdContent = ({ id, children, className, style, key, setProps, ...others }) => { children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} data-dash-is-loading={useLoading()} > {children} ); }; AntdContent.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdContent; ================================================ FILE: src/lib/components/layout/AntdDivider.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Divider } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 分割线组件AntdDivider */ const AntdDivider = ({ id, children, className, style, key, direction = 'horizontal', innerTextOrientation = 'center', isDashed = false, lineColor, fontSize, fontStyle, fontWeight, fontFamily, fontColor, variant = 'solid', plain = true, size, ...others }) => { if (direction === 'horizontal') { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} style={{ ...style, borderTopColor: lineColor, fontStyle: fontStyle, fontWeight: fontWeight, fontFamily: fontFamily, fontSize: fontSize, color: fontColor, }} className={ isString(className) ? className : className ? useCss(className) : undefined } key={key} dashed={isDashed} variant={variant} orientation={innerTextOrientation} type={'horizontal'} plain={plain} size={size} data-dash-is-loading={useLoading()} > {children} ); } else if (direction === 'vertical') { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} style={{ ...style, borderLeftColor: lineColor, fontStyle: fontStyle, fontWeight: fontWeight, fontFamily: fontFamily, fontSize: fontSize, color: fontColor, }} className={ isString(className) ? className : className ? useCss(className) : undefined } key={key} dashed={isDashed} variant={variant} orientation={innerTextOrientation} type={'vertical'} plain={plain} data-dash-is-loading={useLoading()} > {children} ); } }; AntdDivider.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,分割线内嵌元素 */ children: PropTypes.node, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 当前组件css样式 */ style: PropTypes.object, /** * 内嵌元素对齐方式,可选项有`'left'`、`'center'`、`'right'` * 默认值:`'center'` */ innerTextOrientation: PropTypes.oneOf(['left', 'center', 'right']), /** * 是否渲染为虚线形式 * 默认值:`false` */ isDashed: PropTypes.bool, /** * 分割线方向,可选项有`'horizontal'`、`'vertical'` * 默认值:`'horizontal'` */ direction: PropTypes.oneOf(['horizontal', 'vertical']), /** * 内嵌元素字体大小 */ fontSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 分割线颜色 */ lineColor: PropTypes.string, /** * 内嵌元素字体风格 */ fontStyle: PropTypes.string, /** * 内嵌元素字重 */ fontWeight: PropTypes.string, /** * 内嵌元素字体 */ fontFamily: PropTypes.string, /** * 内嵌元素字体颜色 */ fontColor: PropTypes.string, /** * 分割线变体,可选项有`'dashed'`(虚线)、`'dotted'`(点线)、`'solid'`(实线) * 默认值:`'solid'` */ variant: PropTypes.oneOf(['dashed', 'dotted', 'solid']), /** * 文字内容是否呈现为常规正文形式 * 默认值:`true` */ plain: PropTypes.bool, /** * 间距大小,仅当``direction='horizontal'``时有效,可选项有`'small'`、`'middle'`、`'large'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdDivider; ================================================ FILE: src/lib/components/layout/AntdFlex.react.js ================================================ // react核心 import { Flex } from 'antd'; import PropTypes from 'prop-types'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 弹性布局组件AntdFlex */ const AntdFlex = ({ id, children, className, style, key, vertical = false, wrap = 'nowrap', justify = 'normal', align = 'normal', flex = 'normal', gap, setProps, ...others }) => { children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} vertical={vertical} wrap={wrap} justify={justify} align={align} flex={flex} gap={gap} data-dash-is-loading={useLoading()} > {children} ); }; AntdFlex.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 是否使用垂直主轴 * 默认值:`false` */ vertical: PropTypes.bool, /** * 子元素换行显示行为,同css中的flex-wrap,也可直接传入布尔型设置是否自动换行 * 默认值:`'nowrap'` */ wrap: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]), /** * 子元素在主轴方向上的对齐方式,同css中的justify-content * 默认值:`'normal'` */ justify: PropTypes.string, /** * 子元素在交叉轴方向上的对齐方式,同css中的align-items * 默认值:`'normal'` */ align: PropTypes.string, /** * 同css中的flex * 默认值:`'normal'` */ flex: PropTypes.string, /** * 子元素之间的间隙,可选项有`'small'`、`'middle'`、`'large'`,也可传入字符型css宽度,或数值型像素宽度 */ gap: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.oneOf(['small', 'middle', 'large']), ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdFlex; ================================================ FILE: src/lib/components/layout/AntdFooter.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Layout } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; const { Footer } = Layout; /** * 页尾组件AntdFooter */ const AntdFooter = ({ id, children, className, style, key, setProps, ...others }) => { children = parseChildrenToArray(children); return (
k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} data-dash-is-loading={useLoading()} > {children}
); }; AntdFooter.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdFooter; ================================================ FILE: src/lib/components/layout/AntdHeader.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Layout } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; const { Header } = Layout; /** * 页首组件AntdHeader */ const AntdHeader = ({ id, children, className, style, key, setProps, ...others }) => { children = parseChildrenToArray(children); return (
k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} data-dash-is-loading={useLoading()} > {children}
); }; AntdHeader.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdHeader; ================================================ FILE: src/lib/components/layout/AntdLayout.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Layout } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 布局容器组件AntdLayout */ const AntdLayout = ({ id, children, className, style, key, setProps, ...others }) => { children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} data-dash-is-loading={useLoading()} > {children} ); }; AntdLayout.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdLayout; ================================================ FILE: src/lib/components/layout/AntdSider.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Layout } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; const { Sider } = Layout; /** * 侧边栏组件AntdSider */ const AntdSider = ({ id, children, className, style, key, breakpoint, collapsed, collapsedWidth = 80, collapsible = false, reverseArrow = false, theme = 'dark', width = 200, trigger, setProps, ...others }) => { const onCollapse = (collapsed) => { setProps({ collapsed }); }; children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} collapsed={collapsed} collapsedWidth={collapsedWidth} collapsible={collapsible} reverseArrow={reverseArrow} theme={theme} width={width} trigger={trigger} breakpoint={breakpoint} onCollapse={onCollapse} data-dash-is-loading={useLoading()} > {children} ); }; AntdSider.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 当前是否收起 */ collapsed: PropTypes.bool, // 设置收缩的像素宽度,默认为80即80px,设置为0时会渲染特殊触发组件 /** * 收起后呈现的像素宽度,设置为0时会额外渲染特殊触发组件 * 默认值:`80` */ collapsedWidth: PropTypes.number, /** * 是否可收起 * 默认值:`false` */ collapsible: PropTypes.bool, /** * 是否翻转收起箭头的方向,通常在Sider位于右侧时使用 * 默认值:`false` */ reverseArrow: PropTypes.bool, /** * 主题,可选项有`'light'`、`'dark'` * 默认值:`'dark'` */ theme: PropTypes.oneOf(['light', 'dark']), /** * 侧边栏像素宽度 * 默认值:`200` */ width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 设置为`None`时不渲染自带的特殊触发组件 */ trigger: PropTypes.node, /** * 侧边栏自动收起对应的响应式断点 */ breakpoint: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', 'xxl']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSider; ================================================ FILE: src/lib/components/layout/AntdSpace.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Space, Divider } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 排列组件AntdSpace */ const AntdSpace = ({ id, children, className, style, key, align, direction = 'horizontal', size = 'small', customSplit, wrap = false, addSplitLine = false, styles, classNames, setProps, ...others }) => { children = parseChildrenToArray(children); if (addSplitLine) { if (direction === 'horizontal') { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} styles={styles} classNames={classNames} key={key} align={align} direction={direction} size={size} split={} wrap={wrap} data-dash-is-loading={useLoading()} > {children} ); } return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} styles={styles} classNames={classNames} key={key} align={align} direction={direction} size={size} split={} wrap={wrap} data-dash-is-loading={useLoading()} > {children} ); } return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} styles={styles} classNames={classNames} key={key} align={align} direction={direction} size={size} split={customSplit} wrap={wrap} data-dash-is-loading={useLoading()} > {children} ); }; AntdSpace.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 细分控制子元素css样式 */ styles: PropTypes.exact({ /** * 控制子项容器元素css样式 */ item: PropTypes.object, }), /** * 细分控制子元素css类 */ classNames: PropTypes.exact({ /** * 控制子项容器元素css类 */ item: PropTypes.string, }), /** * 对齐方式,可选项有`'start'`、`'end'`、`'center'`、`'baseline'` */ align: PropTypes.oneOf(['start', 'end', 'center', 'baseline']), /** * 排列方向,可选项有`'vertical'`、`'horizontal'` * 默认值:`'horizontal'` */ direction: PropTypes.oneOf(['vertical', 'horizontal']), /** * 子元素间隔大小,可选项有`'small'`、`'middle'`、`'large'`,或直接设置数值型代表像素间隔 * 默认值:`'small'` */ size: PropTypes.oneOfType([ PropTypes.oneOf(['small', 'middle', 'large']), PropTypes.number, ]), /** * 是否添加分隔线 * 默认值:`false` */ addSplitLine: PropTypes.bool, /** * 自定义分隔线元素 */ customSplit: PropTypes.node, /** * 子元素是否自动换行,仅`direction='horizontal'`时有效 * 默认值:`false` */ wrap: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSpace; ================================================ FILE: src/lib/components/layout/AntdSplitter.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Splitter } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 分隔面板组件AntdSplitter */ const AntdSplitter = ({ id, className, style, key, layout = 'horizontal', items, lazy = false, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} layout={layout} lazy={lazy} data-dash-is-loading={useLoading()} > {(items || []).map((item, index) => ( ))} ); }; AntdSplitter.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 布局方向,可选项有`'horizontal'`、`'vertical'` * 默认值:`'horizontal'` */ layout: PropTypes.oneOf(['horizontal', 'vertical']), /** * 配置分隔面板子项 */ items: PropTypes.arrayOf( PropTypes.shape({ /** * 当前子项唯一识别`key` */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前子项`css`样式 */ style: PropTypes.object, /** * 当前子项`css`类名 */ className: PropTypes.string, /** * 初始面板尺寸,支持数字`px`或者文字`'百分比%'`类型 */ defaultSize: PropTypes.oneOfType([ PropTypes.number, PropTypes.string, ]), /** * 面板尺寸,支持数字`px`或者文字`'百分比%'`类型 */ size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 最小尺寸,支持数字`px`或者文字`'百分比%'`类型 */ min: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 最大尺寸,支持数字`px`或者文字`'百分比%'`类型 */ max: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), /** * 是否可折叠 * 默认值:`false` */ collapsible: PropTypes.oneOfType([ PropTypes.bool, PropTypes.shape({ start: PropTypes.bool, end: PropTypes.bool, }), ]), /** * 是否开启拖拽伸缩 * 默认值:`true` */ resizable: PropTypes.bool, }) ).isRequired, /** * 是否开启延迟渲染模式,开启后面板将在拖拽调整完成后才进行更新渲染 * 默认值:`false` */ lazy: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSplitter; ================================================ FILE: src/lib/components/layout/grid/AntdCol.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Col } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; /** * 列组件AntdCol */ const AntdCol = ({ id, children, className, style, key, span, offset = 0, order = 0, pull = 0, push = 0, flex, xs, sm, md, lg, xl, xxl, setProps, ...others }) => { children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={{ height: '100%', ...style }} key={key} span={span} offset={offset} order={order} pull={pull} push={push} flex={flex} xs={xs} sm={sm} md={md} lg={lg} xl={xl} xxl={xxl} data-dash-is-loading={useLoading()} > {children} ); }; AntdCol.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 列所占宽度份数 */ span: PropTypes.number, /** * 列左侧间隔宽度份数 * 默认值:`0` */ offset: PropTypes.number, /** * 列顺序 * 默认值:`0` */ order: PropTypes.number, /** * 列向左移动宽度份数 * 默认值:`0` */ pull: PropTypes.number, /** * 列向右移动宽度份数 * 默认值:`0` */ push: PropTypes.number, /** * 同css中的flex */ flex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 配置列在页面宽度小于567px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数 */ xs: PropTypes.oneOfType([ PropTypes.number, PropTypes.exact({ /** * 同span参数 */ span: PropTypes.number, /** * 同offset参数 */ offset: PropTypes.number, /** * 同order参数 */ order: PropTypes.number, /** * 同pull参数 */ pull: PropTypes.number, /** * 同push参数 */ push: PropTypes.number, }), ]), /** * 配置列在页面宽度大于等于567px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数 */ sm: PropTypes.oneOfType([ PropTypes.number, PropTypes.exact({ /** * 同span参数 */ span: PropTypes.number, /** * 同offset参数 */ offset: PropTypes.number, /** * 同order参数 */ order: PropTypes.number, /** * 同pull参数 */ pull: PropTypes.number, /** * 同push参数 */ push: PropTypes.number, }), ]), /** * 配置列在页面宽度大于等于768px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数 */ md: PropTypes.oneOfType([ PropTypes.number, PropTypes.exact({ /** * 同span参数 */ span: PropTypes.number, /** * 同offset参数 */ offset: PropTypes.number, /** * 同order参数 */ order: PropTypes.number, /** * 同pull参数 */ pull: PropTypes.number, /** * 同push参数 */ push: PropTypes.number, }), ]), /** * 配置列在页面宽度大于等于992px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数 */ lg: PropTypes.oneOfType([ PropTypes.number, PropTypes.exact({ /** * 同span参数 */ span: PropTypes.number, /** * 同offset参数 */ offset: PropTypes.number, /** * 同order参数 */ order: PropTypes.number, /** * 同pull参数 */ pull: PropTypes.number, /** * 同push参数 */ push: PropTypes.number, }), ]), /** * 配置列在页面宽度大于等于1200px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数 */ xl: PropTypes.oneOfType([ PropTypes.number, PropTypes.exact({ /** * 同span参数 */ span: PropTypes.number, /** * 同offset参数 */ offset: PropTypes.number, /** * 同order参数 */ order: PropTypes.number, /** * 同pull参数 */ pull: PropTypes.number, /** * 同push参数 */ push: PropTypes.number, }), ]), /** * 配置列在页面宽度大于等于1600px时的布局参数,传入数值型时代表span参数,传入字典时分别设置各布局参数 */ xxl: PropTypes.oneOfType([ PropTypes.number, PropTypes.exact({ /** * 同span参数 */ span: PropTypes.number, /** * 同offset参数 */ offset: PropTypes.number, /** * 同order参数 */ order: PropTypes.number, /** * 同pull参数 */ pull: PropTypes.number, /** * 同push参数 */ push: PropTypes.number, }), ]), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCol; ================================================ FILE: src/lib/components/layout/grid/AntdRow.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Row } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../../utils'; // 自定义hooks import useCss from '../../../hooks/useCss'; /** * 行组件AntdRow */ const AntdRow = ({ id, children, className, style, key, align = 'top', gutter = 0, justify = 'start', wrap = true, setProps, ...others }) => { children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} align={align} gutter={gutter} justify={justify} wrap={wrap} data-dash-is-loading={useLoading()} > {children} ); }; AntdRow.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 竖直方向对齐方式,可选项有`'top'`、`'middle'`、`'bottom'` * 默认值:`'top'` */ align: PropTypes.oneOf(['top', 'middle', 'bottom']), /** * 网格间隔,传入数值型时为水平像素间隔,传入数组时分别设置水平、垂直像素间隔,传入字典时可为响应式各断点设置水平像素间隔 */ gutter: PropTypes.oneOfType([ PropTypes.number, PropTypes.arrayOf(PropTypes.number), PropTypes.exact({ /** * 页面宽度小于567px时的水平像素间隔 */ xs: PropTypes.number, /** * 页面宽度大于等于567px时的水平像素间隔 */ sm: PropTypes.number, /** * 页面宽度大于等于768px时的水平像素间隔 */ md: PropTypes.number, /** * 页面宽度大于等于992px时的水平像素间隔 */ lg: PropTypes.number, /** * 页面宽度大于等于1200px时的水平像素间隔 */ xl: PropTypes.number, /** * 页面宽度大于等于1600px时的水平像素间隔 */ xxl: PropTypes.number, }), ]), /** * 水平排列方式,可选项有`'start'`、`'end'`、`'center'`、`'space-around'`、`'space-between'` * 默认值:`'start'` */ justify: PropTypes.oneOf([ 'start', 'end', 'center', 'space-around', 'space-between', ]), /** * 是否允许自动换行 * 默认值:`true` */ wrap: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdRow; ================================================ FILE: src/lib/components/locales.react.js ================================================ import zhCN from 'antd/lib/locale/zh_CN'; import enUS from 'antd/lib/locale/en_US'; import deDE from 'antd/lib/locale/de_DE'; import ruRU from 'antd/lib/locale/ru_RU'; import frFR from 'antd/lib/locale/fr_FR'; const str2Locale = new Map([ ['zh-cn', zhCN], ['en-us', enUS], ['de-de', deDE], ['ru-ru', ruRU], ['fr-fr', frFR], ]); const locale2text = { AntdSpoiler: { 'zh-cn': { hideLabel: '收起', showLabel: '查看更多', }, 'en-us': { hideLabel: 'Hide', showLabel: 'Show more', }, 'de-de': { hideLabel: 'Verbergen', showLabel: 'Mehr anzeigen', }, 'ru-ru': { hideLabel: 'Скрыть', showLabel: 'Показать больше', }, 'fr-fr': { hideLabel: 'Cacher', showLabel: 'Afficher plus', }, }, AntdPictureUpload: { 'zh-cn': { confirmBeforeDeleteTitle: '确认删除', confirmBeforeDeleteOkText: '确认', confirmBeforeDeleteCancelText: '取消', imgCropModalOKText: '确认', imgCropModalCancelText: '取消', }, 'en-us': { confirmBeforeDeleteTitle: 'Confirm Delete', confirmBeforeDeleteOkText: 'Ok', confirmBeforeDeleteCancelText: 'Cancel', imgCropModalOKText: 'Ok', imgCropModalCancelText: 'Cancel', }, 'de-de': { confirmBeforeDeleteTitle: 'Löschen bestätigen', confirmBeforeDeleteOkText: 'Ok', confirmBeforeDeleteCancelText: 'Abbrechen', imgCropModalOKText: 'Ok', imgCropModalCancelText: 'Abbrechen', }, 'ru-ru': { confirmBeforeDeleteTitle: 'Подтвердите удаление', confirmBeforeDeleteOkText: 'Ок', confirmBeforeDeleteCancelText: 'Отмена', imgCropModalOKText: 'Ок', imgCropModalCancelText: 'Отмена', }, 'fr-fr': { confirmBeforeDeleteTitle: 'Confirmer la suppression', confirmBeforeDeleteOkText: 'OK', confirmBeforeDeleteCancelText: 'Annuler', imgCropModalOKText: 'OK', imgCropModalCancelText: 'Annuler', }, }, AntdPagination: { 'zh-cn': { showTotalPrefix: '共 ', showTotalSuffix: ' 条记录', }, 'en-us': { showTotalPrefix: 'Total ', showTotalSuffix: ' items', }, 'de-de': { showTotalPrefix: 'Gesamt ', showTotalSuffix: ' items', }, 'ru-ru': { showTotalPrefix: 'Всего ', showTotalSuffix: ' элементов', }, 'fr-fr': { showTotalPrefix: 'Total ', showTotalSuffix: ' articles', }, }, AntdTable: { 'zh-cn': { showTotalPrefix: '共 ', showTotalSuffix: ' 条记录', filterKeywordPlaceholder: '搜索', filterKeywordSearchButtonText: '搜索', filterKeywordResetButtonText: '重置', columnEditableFormatConstraintMessage: '编辑失败,输入的“[VALUE]”不符合对应字段的格式要求。', }, 'en-us': { showTotalPrefix: 'Total ', showTotalSuffix: ' items', filterKeywordPlaceholder: 'Search', filterKeywordSearchButtonText: 'Search', filterKeywordResetButtonText: 'Reset', columnEditableFormatConstraintMessage: 'Edit failed, The input "[VALUE]" does not meet the format requirements for the corresponding field.', }, 'de-de': { showTotalPrefix: 'Gesamt ', showTotalSuffix: ' items', filterKeywordPlaceholder: 'Suche', filterKeywordSearchButtonText: 'Suchen', filterKeywordResetButtonText: 'Zurücksetzen', columnEditableFormatConstraintMessage: 'Bearbeiten fehlgeschlagen, Die Eingabe "[VALUE]" entspricht nicht den Anforderungen des entsprechenden Feldes.', }, 'ru-ru': { showTotalPrefix: 'Всего ', showTotalSuffix: ' элементов', filterKeywordPlaceholder: 'Поиск', filterKeywordSearchButtonText: 'Поиск', filterKeywordResetButtonText: 'Сбросить', columnEditableFormatConstraintMessage: 'Редактирование не удалось, введенное значение "[VALUE]" не соответствует требованиям поля.', }, 'fr-fr': { showTotalPrefix: 'Total ', showTotalSuffix: ' articles', filterKeywordPlaceholder: 'Rechercher', filterKeywordSearchButtonText: 'Rechercher', filterKeywordResetButtonText: 'Réinitialiser', columnEditableFormatConstraintMessage: 'Échec de la modification. La valeur saisie "[VALUE]" ne respecte pas les exigences de format du champ correspondant.', }, }, AntdTransfer: { 'zh-cn': { titles: ['待选区', '选定区'], }, 'en-us': { titles: ['Source', 'Target'], }, 'de-de': { titles: ['Quelle', 'Ziel'], }, 'ru-ru': { titles: ['Источник', 'Цель'], }, 'fr-fr': { titles: ['Source', 'Cible'], }, }, Upload: { 'zh-cn': { uploadSuccess: '上传成功!', uploadFailed: '上传失败!', sizeError: ['文件大小超出', 'MB限制!'], typeError: ['上传失败,', '文件格式不符合要求!'], buttonContent: '点击上传文件', }, 'en-us': { uploadSuccess: 'upload success!', uploadFailed: 'upload failed!', sizeError: ['File size exceeds the ', 'MB limit!'], typeError: [ 'Uploading failed, The format of ', ' does not meet requirements!', ], buttonContent: 'Click to upload file', }, 'de-de': { uploadSuccess: 'Hochladen erfolgreich!', uploadFailed: 'Hochladen fehlgeschlagen!', sizeError: ['Dateigröße überschreitet das Limit von ', 'MB!'], typeError: [ 'Hochladen fehlgeschlagen. Das Format von ', ' entspricht nicht den Anforderungen!', ], buttonContent: 'Klicken, um eine Datei hochzuladen', }, 'ru-ru': { uploadSuccess: 'Загрузка успешна!', uploadFailed: 'Ошибка загрузки!', sizeError: ['Размер файла превышает ', 'MB ограничение!'], typeError: [ 'Ошибка загрузки, формат ', ' не соответствует требованиям!', ], buttonContent: 'Нажмите для загрузки файла', }, 'fr-fr': { uploadSuccess: 'téléversement réussi !', uploadFailed: 'échec du téléversement !', sizeError: ['La taille du fichier dépasse la limite de ', 'Mo !'], typeError: [ 'Échec du téléversement, le format de ', ' ne respecte pas les exigences !', ], buttonContent: 'Cliquez pour téléverser un fichier', }, }, AntdComment: { 'zh-cn': { likeTooltipTitle: '支持', dislikeTooltipTitle: '反对', replayTitle: '添加回复', deleteConfirmTitle: '确认删除', deleteConfirmOkText: '确认', deleteConfirmCancelText: '取消', deleteTitle: '删除', }, 'en-us': { likeTooltipTitle: 'like', dislikeTooltipTitle: 'dislike', replayTitle: 'Add a reply', deleteConfirmTitle: 'Confirm deletion', deleteConfirmOkText: 'Yes', deleteConfirmCancelText: 'No', deleteTitle: 'Delete', }, 'de-de': { likeTooltipTitle: 'Gefällt mir', dislikeTooltipTitle: 'Gefällt mir nicht', replayTitle: 'Antwort hinzufügen', deleteConfirmTitle: 'Löschen bestätigen', deleteConfirmOkText: 'Ja', deleteConfirmCancelText: 'Nein', deleteTitle: 'Löschen', }, 'ru-ru': { likeTooltipTitle: 'Нравится', dislikeTooltipTitle: 'Не нравится', replayTitle: 'Добавить ответ', deleteConfirmTitle: 'Подтвердите удаление', deleteConfirmOkText: 'Да', deleteConfirmCancelText: 'Нет', deleteTitle: 'Удалить', }, 'fr-fr': { likeTooltipTitle: 'j’aime', dislikeTooltipTitle: 'je n’aime pas', replayTitle: 'Ajouter une réponse', deleteConfirmTitle: 'Confirmer la suppression', deleteConfirmOkText: 'Oui', deleteConfirmCancelText: 'Non', deleteTitle: 'Supprimer', }, }, }; export { str2Locale, locale2text }; ================================================ FILE: src/lib/components/navigation/AntdAnchor.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Anchor } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 锚点组件AntdAnchor */ const AntdAnchor = ({ id, className, style, key, linkDict, direction = 'vertical', align = 'right', containerId, targetOffset, affix = true, bounds = 5, offsetTop, replace = false, currentAnchor, setProps, ...others }) => { // 监听锚点被点击情况 const onClick = (e, link) => { setProps({ clickedLink: link, }); }; return (
k.startsWith('data-') || k.startsWith('aria-'), others )} style={{ float: align }} data-dash-is-loading={useLoading()} > { document.getElementById(containerId) : undefined : undefined } targetOffset={targetOffset} affix={affix} bounds={bounds} offsetTop={offsetTop} replace={replace} getCurrentAnchor={ currentAnchor ? () => currentAnchor : undefined } /> }
); }; // 定义递归PropTypes const PropLinkNodeShape = { /** * 节点唯一识别id */ key: PropTypes.string, /** * 节点标题 */ title: PropTypes.string, /** * 节点目标链接地址 */ href: PropTypes.string, /** * 节点链接跳转行为 */ target: PropTypes.string, }; const PropLinkNode = PropTypes.shape(PropLinkNodeShape); PropLinkNodeShape.children = PropTypes.arrayOf(PropLinkNode); const linkDictPropTypes = PropTypes.arrayOf(PropLinkNode); AntdAnchor.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 目录层次数据结构 */ linkDict: linkDictPropTypes.isRequired, /** * 导航方向,可选项有`'vertical'`、`'horizontal'`,其中`'horizontal'`方向下不支持子目录 * 默认值:`'vertical'` */ direction: PropTypes.oneOf(['vertical', 'horizontal']), /** * 锚点位置,可选项有`'left'`、`'right'` * 默认值:`'right'` */ align: PropTypes.oneOf(['left', 'right']), /** * 锚点目标容器id */ containerId: PropTypes.string, /** * 锚点位移偏移量,默认同参数offsetTop */ targetOffset: PropTypes.number, /** * 是否开启固定模式 * 默认值:`true` */ affix: PropTypes.bool, /** * 锚点像素边距 * 默认值:`5` */ bounds: PropTypes.number, /** * 设置距离窗口顶部触发锚定效果的指定像素偏移量 */ offsetTop: PropTypes.number, /** * 设置为`true`后,浏览器后退或前进时,不会跳转到锚点地址 * 默认值:`false` */ replace: PropTypes.bool, /** * 强制指定当前处于高亮状态的锚点链接 */ currentAnchor: PropTypes.string, /** * 监听锚点节点点击事件 */ clickedLink: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdAnchor; ================================================ FILE: src/lib/components/navigation/AntdBreadcrumb.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Breadcrumb, Menu } from 'antd'; import AntdIcon from '../general/AntdIcon.react'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 面包屑组件AntdBreadcrumb */ const AntdBreadcrumb = ({ id, className, style, key, separator = '/', items, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} items={items.map((item) => ({ key: item.key, title: ( <> {item.icon ? ( item.iconRenderer === 'fontawesome' ? ( React.createElement('i', { className: item.icon, style: { marginRight: 3 }, }) ) : ( ) ) : null} {item.title} ), onClick: (e) => setProps({ clickedItem: { itemTitle: item.title, itemKey: item.key, timestamp: Date.now(), }, }), menu: item.menuItems ? { items: item.menuItems.map((menuItem) => ({ key: menuItem.title || menuItem.key, label: ( <> {menuItem.icon ? ( menuItem.iconRenderer === 'fontawesome' ? ( React.createElement('i', { className: menuItem.icon, style: { marginRight: 3 }, }) ) : ( ) ) : null} setProps({ clickedItem: { itemTitle: item.title, itemKey: item.key, menuItemTitle: menuItem.title, menuItemKey: menuItem.key, timestamp: Date.now(), }, }) } > {menuItem.title} ), disabled: menuItem.disabled, })), } : null, }))} separator={separator} data-dash-is-loading={useLoading()} /> ); }; AntdBreadcrumb.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 面包屑节点数据结构 */ items: PropTypes.arrayOf( PropTypes.exact({ /** * 节点标题 */ title: PropTypes.string, /** * 节点唯一key值 */ key: PropTypes.string, /** * 节点链接地址 */ href: PropTypes.string, /** * 节点链接跳转行为 */ target: PropTypes.string, /** * 节点前缀图标名称,与`iconRenderer`方式相关联,`'AntdIcon'`方式下同AntdIcon的icon参数,`'fontawesome'`方式下代表图标的css类名 */ icon: PropTypes.string, /** * 前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` * 默认值:`'AntdIcon'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), /** * 为当前节点设置下拉菜单生成所需的数据结构 */ menuItems: PropTypes.arrayOf( PropTypes.exact({ /** * 下拉菜单节点标题 */ title: PropTypes.string, /** * 下拉菜单节点唯一key值 */ key: PropTypes.string, /** * 下拉菜单节点链接地址 */ href: PropTypes.string, /** * 下拉菜单节点链接跳转方式 */ target: PropTypes.string, /** * 是否禁用当前下拉菜单节点 */ disabled: PropTypes.bool, /** * 下拉菜单节点前缀图标名称,与`iconRenderer`方式相关联,`'AntdIcon'`方式下同AntdIcon的icon参数,`'fontawesome'`方式下代表图标的css类名 */ icon: PropTypes.string, /** * 前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` * 默认值:`'AntdIcon'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), }) ), }) ), /** * 组件型,分隔符 * 默认值:`'/'` */ separator: PropTypes.node, /** * 监听面包屑节点点击事件 */ clickedItem: PropTypes.shape({ /** * 对应节点标题 */ itemTitle: PropTypes.string, /** * 对应节点key值 */ itemKey: PropTypes.string, /** * 对应下拉菜单节点标题 */ menuItemTitle: PropTypes.string, /** * 对应下拉菜单节点key值 */ menuItemKey: PropTypes.string, /** * 点击事件时间戳 */ timestamp: PropTypes.number, }), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdBreadcrumb; ================================================ FILE: src/lib/components/navigation/AntdDropdown.react.js ================================================ // react核心 import React, { useContext, useEffect } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Dropdown, Button, Typography } from 'antd'; import AntdIcon from '../general/AntdIcon.react'; import { DownOutlined } from '@ant-design/icons'; // 辅助库 import { isString, isUndefined } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; // 自定义上下文 import PropsContext from '../../contexts/PropsContext'; const { Link } = Typography; /** * 下拉菜单组件AntdDropdown */ const AntdDropdown = ({ id, children, className, style, wrapperStyle, wrapperClassName, key, title, buttonMode = false, arrow = false, disabled = false, overlayClassName, overlayStyle, placement, trigger = 'hover', autoAdjustOverflow = true, visible = false, menuItems, nClicks = 0, selectable = false, multiple = false, selectedKeys, nonSelectableKeys = [], popupContainer = 'body', buttonProps, freePosition = false, freePositionStyle, freePositionClassName, setProps, batchPropsNames = [], ...others }) => { // 批属性监听 useEffect(() => { if (batchPropsNames && batchPropsNames.length !== 0) { const _batchPropsValues = {}; for (const propName of batchPropsNames) { _batchPropsValues[propName] = props[propName]; } setProps({ batchPropsValues: _batchPropsValues, }); } }); const context = useContext(PropsContext); // 递归处理菜单项,支持级联菜单 const transformMenuItem = (menuItem) => ({ type: menuItem.isDivider ? 'divider' : undefined, disabled: menuItem.disabled, key: menuItem.key || menuItem.title, label: ( {menuItem.title} ), extra: menuItem.extra, icon: menuItem.icon ? ( menuItem.iconRenderer === 'fontawesome' ? ( React.createElement('i', { className: menuItem.icon, }) ) : ( ) ) : null, children: menuItem.children ? menuItem.children.map(transformMenuItem) : undefined, }); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} menu={{ items: menuItems.map(transformMenuItem), selectable: selectable, multiple: multiple, selectedKeys: selectedKeys, onClick: (item, key, keyPath, e) => { setProps({ clickedKey: item.key, nClicks: nClicks + 1, ...(freePosition && !multiple ? { visible: false, } : {}), }); }, onSelect: (e) => setProps({ selectedKeys: (e.selectedKeys || []).filter( (key) => !nonSelectableKeys.includes(key) ), }), onDeselect: (e) => setProps({ selectedKeys: e.selectedKeys }), }} arrow={arrow} disabled={ context && !isUndefined(context.componentDisabled) ? context.componentDisabled : disabled } overlayClassName={ isString(overlayClassName) ? overlayClassName : overlayClassName ? useCss(overlayClassName) : undefined } overlayStyle={overlayStyle} placement={placement} trigger={[trigger]} autoAdjustOverflow={autoAdjustOverflow} open={visible} onOpenChange={(e) => setProps({ visible: e })} getPopupContainer={ popupContainer === 'parent' ? (triggerNode) => triggerNode.parentNode : undefined } data-dash-is-loading={useLoading()} > { // 开启自由位置模式 freePosition ? (
) : children ? (
{children}
) : buttonMode ? ( ) : ( e.preventDefault()}> {title} ) } ); }; AntdDropdown.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,下拉菜单触发锚定元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 锚定元素父容器css样式 */ wrapperStyle: PropTypes.object, /** * 锚定元素父容器css类名 */ wrapperClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 下拉菜单触发元素标题内容,children参数未设置时有效 */ title: PropTypes.string, /** * 下拉菜单触发元素是否渲染为按钮形式,children参数未设置时有效 * 默认值:`false` */ buttonMode: PropTypes.bool, /** * 针对下拉菜单触发元素的按钮形式进行进一步配置 */ buttonProps: PropTypes.exact({ /** * 组件型,按钮图标元素 */ icon: PropTypes.node, /** * 按钮尺寸规格,可选项有`'small'`、`'middle'`、`'large'` * 默认值:`'middle'` */ size: PropTypes.oneOf(['small', 'middle', 'large']), /** * 按钮类型,可选项有`'default'`、`'primary'`、`'ghost'`、`'dashed'`、`'link'`、`'text'` * 默认值:`'default'` */ type: PropTypes.oneOf([ 'default', 'primary', 'ghost', 'dashed', 'link', 'text', ]), /** * 按钮是否呈现危险样式 * 默认值:`false` */ danger: PropTypes.bool, /** * 按钮css样式 */ style: PropTypes.object, /** * 按钮css类名 */ className: PropTypes.string, }), /** * 是否开启自由位置模式 * 默认值:`false` */ freePosition: PropTypes.bool, /** * 自由位置模式开启后,控制挂载位置对应css样式 */ freePositionStyle: PropTypes.object, /** * 自由位置模式开启后,控制挂载位置对应css类名 */ freePositionClassName: PropTypes.string, /** * 监听被点击的下拉菜单选项key值 */ clickedKey: PropTypes.string, /** * 监听下拉菜单选项累计被点击次数 * 默认值:`0` */ nClicks: PropTypes.number, /** * 下拉菜单数据结构 */ menuItems: PropTypes.arrayOf( PropTypes.exact({ /** * 组件型,节点标题 */ title: PropTypes.node, /** * 组件型,额外内容 */ extra: PropTypes.node, /** * 节点链接地址 */ href: PropTypes.string, /** * 节点链接跳转行为 */ target: PropTypes.string, /** * 是否禁用节点 * 默认值:`false` */ disabled: PropTypes.bool, /** * 节点前缀图标名称,与`iconRenderer`方式相关联,`'AntdIcon'`方式下同AntdIcon的icon参数,`'fontawesome'`方式下代表图标的css类名 */ icon: PropTypes.string, /** * 前缀图标渲染方式,可选项有`'AntdIcon'`、`'fontawesome'` * 默认值:`'AntdIcon'` */ iconRenderer: PropTypes.oneOf(['AntdIcon', 'fontawesome']), /** * 节点唯一key值 */ key: PropTypes.string, /** * 节点是否渲染为分割线 */ isDivider: PropTypes.bool, /** * 子菜单项,用于构建级联菜单 */ children: PropTypes.array, }) ), /** * 菜单项是否可选择 * 默认值:`false` */ selectable: PropTypes.bool, /** * 菜单项是否可多选 * 默认值:`false` */ multiple: PropTypes.bool, /** * 设置或监听当前已选中菜单项key值 */ selectedKeys: PropTypes.arrayOf(PropTypes.string), /** * 设置不可选中项key值数组 * 默认值:`[]` */ nonSelectableKeys: PropTypes.arrayOf(PropTypes.string), /** * 下拉菜单是否渲染指示箭头 * 默认值:`false` */ arrow: PropTypes.bool, /** * 是否禁用组件功能 * 默认值:`false` */ disabled: PropTypes.bool, /** * 下拉菜单容器css类名,支持[动态css](/advanced-classname) */ overlayClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 下拉菜单容器css样式 */ overlayStyle: PropTypes.object, /** * 下拉菜单弹出方位,可选项有`'bottomLeft'`、`'bottomCenter'`、`'bottomRight'`、`'topLeft'`、`'topCenter'`、`'topRight'` */ placement: PropTypes.oneOf([ 'bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight', ]), /** * 下拉菜单显示触发方式,可选项有`'click'`、`'hover'` * 默认值:`'hover'` */ trigger: PropTypes.oneOf(['click', 'hover']), /** * 下拉菜单是否在被遮挡时自动调整位置 * 默认值:`true` */ autoAdjustOverflow: PropTypes.bool, /** * 监听或设置下拉菜单是否展开 * 默认值:`false` */ visible: PropTypes.bool, /** * 下拉菜单展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 需要纳入批属性监听的属性名 * 默认值:`[]` */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 批量监听与当前batchPropsNames对应的属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdDropdown; ================================================ FILE: src/lib/components/navigation/AntdMenu.react.js ================================================ // react核心 import React, { useEffect, useMemo } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Menu, Button } from 'antd'; import AntdIcon from '../general/AntdIcon.react'; import { MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons'; // 辅助库 import { get, has, isArray, isUndefined, isNull, isString, cloneDeep, } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; // 内部组件 import { UtilsLink } from '../../internal_components/UtilsLink.react'; const { SubMenu, Item, ItemGroup, Divider } = Menu; function findByKey(array, key) { for (const item of array) { if (get(item, 'props.key') === key) { return item; } if (get(item, 'children') && isArray(get(item, 'children'))) { const result = findByKey(item.children, key); if (result) { return result; } } } return null; } function findKeyPath(array, key, path = []) { for (const item of array) { if (item?.props?.key) { const currentPath = [...path, item.props.key]; if (get(item, 'props.key') === key) { return currentPath; } if (get(item, 'children') && isArray(get(item, 'children'))) { const result = findKeyPath(item.children, key, currentPath); if (result) { return result; } } } } return null; } const getLevelKeys = (items1) => { const key = {}; const func = (items2, level = 1) => { items2.forEach((item) => { if (item?.props?.key) { key[item.props.key] = level; } if (item?.children) { func(item.children, level + 1); } }); }; func(items1); return key; }; // 字符串 -> 组件 const str2Jsx = new Map([ ['SubMenu', SubMenu], ['Item', Item], ['ItemGroup', ItemGroup], ['Divider', Divider], ]); // 递归推导多层菜单结构 const raw2Jsx = (obj, str2Jsx, menuItemKeyToTitle, menuItemKeyToIcon) => { // 若obj为数组 if (Array.isArray(obj)) { // 若obj为数组,则针对数组中每个对象向下递归 obj = obj.map((obj_) => raw2Jsx(obj_, str2Jsx, menuItemKeyToTitle, menuItemKeyToIcon) ); } else if (obj.hasOwnProperty('component')) { // 若obj包含children属性,则向下递归处理 if (obj.hasOwnProperty('children')) { Object.assign(obj, { children: obj.children.map((obj_) => raw2Jsx( obj_, str2Jsx, menuItemKeyToTitle, menuItemKeyToIcon ) ), }); if (obj.component === 'SubMenu') { obj = ( )) } > {obj.children} ); } else { obj = ( )) } > {obj.children} ); } } else { // 检查obj.component是否为Divider if (obj.component === 'Divider') { obj = ; } else if (obj.props.href) { // 生成Item对应的jsx obj = ( )) } name={obj.props && obj.props.name} > {menuItemKeyToTitle[obj.props.key] || obj.props.title} ); } else { obj = ( )) } name={obj.props && obj.props.name} > {menuItemKeyToTitle[obj.props.key] || obj.props.title} ); } } } return obj; }; /** * 导航菜单组件AntdMenu */ const AntdMenu = ({ id, className, style, key, expandIcon, menuItems, menuItemKeyToTitle, menuItemKeyToIcon, mode = 'vertical', theme = 'light', defaultOpenKeys, currentKey, openKeys, onlyExpandCurrentSubMenu = false, defaultSelectedKey, renderCollapsedButton = false, popupContainer = 'body', inlineCollapsed, inlineIndent = 24, triggerSubMenuAction = 'hover', setProps, persistence, persisted_props, persistence_type, ...others }) => { const levelKeys = useMemo(() => { return getLevelKeys(menuItems); }, [menuItems]); const onOpenChange = (keys) => { if (onlyExpandCurrentSubMenu) { if (isUndefined(openKeys) || isNull(openKeys)) { openKeys = []; } const currentOpenKey = keys.find( (key) => openKeys.indexOf(key) === -1 ); if (!isUndefined(currentOpenKey)) { const repeatIndex = keys .filter((key) => key !== currentOpenKey) .findIndex( (key) => levelKeys[key] === levelKeys[currentOpenKey] ); setProps({ openKeys: keys .filter((_, index) => index !== repeatIndex) .filter( (key) => levelKeys[key] <= levelKeys[currentOpenKey] ), }); } else { setProps({ openKeys: keys }); } } else { setProps({ openKeys: keys }); } }; useEffect(() => { // 初始化currentKey if (defaultSelectedKey && !currentKey) { // 当defaultSelectedKey不为空且currentKey为空时 // 为currentKey初始化defaultSelectedKey对应的key值 setProps({ currentKey: defaultSelectedKey }); } // 初始化openKeys if (defaultOpenKeys) { // 当defaultOpenKeys不为空且openKeys为空时 // 为openKeys初始化defaultOpenKeys对应的key值 setProps({ openKeys: defaultOpenKeys }); } }, []); useEffect(() => { // 当currentKey发生变化时,自动查找currentKey对应的菜单信息 const currentItem = findByKey(menuItems, currentKey); // 当currentKey发生变化时,自动查找currentKey对应的key路径信息和菜单路径信息 const currentKeyPath = findKeyPath(menuItems, currentKey); const currentItemPath = currentKeyPath?.map((item) => findByKey(menuItems, item) ); setProps({ currentItem: currentItem, currentKeyPath: currentKeyPath, currentItemPath: currentItemPath, }); }, [currentKey]); // 基于menuItems推导jsx数据结构 const _menuItems = raw2Jsx( cloneDeep(menuItems), str2Jsx, menuItemKeyToTitle || {}, menuItemKeyToIcon || {} ); // 监听Item的点击事件 const listenSelected = (item) => { // 将当前选中的key值赋给currentKey setProps({ currentKey: item.key }); }; if (renderCollapsedButton) { return (
k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} expandIcon={ has(expandIcon, 'collapse') && has(expandIcon, 'expand') ? (props) => props.isSubMenu ? props.isOpen ? expandIcon.collapse : expandIcon.expand : undefined : expandIcon } mode={mode} theme={theme} selectedKeys={[currentKey]} openKeys={openKeys} defaultOpenKeys={defaultOpenKeys} defaultSelectedKeys={ defaultSelectedKey ? [defaultSelectedKey] : defaultSelectedKey } onSelect={listenSelected} onOpenChange={onOpenChange} getPopupContainer={ popupContainer === 'parent' ? (triggerNode) => triggerNode.parentNode : undefined } inlineCollapsed={inlineCollapsed} inlineIndent={inlineIndent} triggerSubMenuAction={triggerSubMenuAction} data-dash-is-loading={useLoading()} > {_menuItems}
); } return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} expandIcon={ has(expandIcon, 'collapse') && has(expandIcon, 'expand') ? (props) => props.isSubMenu ? props.isOpen ? expandIcon.collapse : expandIcon.expand : undefined : expandIcon } mode={mode} theme={theme} selectedKeys={[currentKey]} openKeys={openKeys} defaultOpenKeys={defaultOpenKeys} defaultSelectedKeys={ defaultSelectedKey ? [defaultSelectedKey] : defaultSelectedKey } onSelect={listenSelected} onOpenChange={onOpenChange} getPopupContainer={ popupContainer === 'parent' ? (triggerNode) => triggerNode.parentNode : undefined } inlineCollapsed={inlineCollapsed} inlineIndent={inlineIndent} triggerSubMenuAction={triggerSubMenuAction} data-dash-is-loading={useLoading()} > {_menuItems} ); }; AntdMenu.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 自定义展开图标,建议仅在`mode='inline'`时使用字典类型 */ expandIcon: PropTypes.oneOfType([ PropTypes.node, PropTypes.exact({ /** * 展开图标 */ expand: PropTypes.node, /** * 收起图标 */ collapse: PropTypes.node, }), ]), /** * 导航菜单数据结构 */ menuItems: PropTypes.array, /** * 为指定节点定义组件型菜单项标题,优先级高于menuItems中对应节点的title属性 */ menuItemKeyToTitle: PropTypes.objectOf(PropTypes.node), /** * 为指定节点定义组件型菜单项图标元素,优先级高于menuItems中对应节点的icon属性 */ menuItemKeyToIcon: PropTypes.objectOf(PropTypes.node), /** * 显示模式,可选项有`'vertical'`、`'horizontal'`、`'inline'` * 默认值:`'vertical'` */ mode: PropTypes.oneOf(['vertical', 'horizontal', 'inline']), /** * 主题,可选项有`'light'`、`'dark'` * 默认值:`'light'` */ theme: PropTypes.oneOf(['light', 'dark']), /** * 监听或设置当前已选中菜单项key值 */ currentKey: PropTypes.string, /** * 监听当前已选中菜单项信息 */ currentItem: PropTypes.object, /** * 监听当前已选中菜单项key值路径信息 */ currentKeyPath: PropTypes.array, /** * 监听当前已选中菜单项路径信息 */ currentItemPath: PropTypes.array, /** * 监听或设置当前已展开子菜单项key值 */ openKeys: PropTypes.arrayOf(PropTypes.string), /** * 是否只展开当前选中项的父级菜单 * 默认值:`false` */ onlyExpandCurrentSubMenu: PropTypes.bool, /** * 默认展开的菜单项key值 */ defaultOpenKeys: PropTypes.arrayOf(PropTypes.string), // 默认选中的菜单项对应key defaultSelectedKey: PropTypes.string, /** * 是否渲染菜单折叠状态控制按钮 * 默认值:`false` */ renderCollapsedButton: PropTypes.bool, /** * 菜单展开层锚定策略,可选项有`'parent'`、`'body'` * 默认值:`'body'` */ popupContainer: PropTypes.oneOf(['parent', 'body']), /** * 当前菜单是否折叠,仅inline模式下有效 * 默认值:`false` */ inlineCollapsed: PropTypes.bool, /** * inline模式下,子菜单相对上一级的像素缩进宽度 * 默认值:`24` */ inlineIndent: PropTypes.number, /** * `SubMenu`展开/关闭的触发行为,可选项有`'hover'`、`'click'`,`mode='inline'`下无效 * 默认值:`'hover'` */ triggerSubMenuAction: PropTypes.oneOf(['hover', 'click']), /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否为当前组件开启持久化功能 */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 当前组件启用持久化的属性值数组,可选项有`'currentKey'`、`'openKeys'` * 默认值:`['currentKey', 'openKeys']` */ persisted_props: PropTypes.arrayOf( PropTypes.oneOf(['currentKey', 'openKeys']) ), /** * 当前组件的属性持久化存储类型 * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdMenu.dashPersistence = { persisted_props: ['currentKey', 'openKeys'], persistence_type: 'local', }; export default AntdMenu; ================================================ FILE: src/lib/components/navigation/AntdPageHeader.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { PageHeader } from '@ant-design/pro-components'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 页头组件AntdPageHeader */ const AntdPageHeader = ({ id, children, className, style, key, title, subTitle, showBackIcon = true, historyBackDisabled = false, backClicks = 0, ghost = false, setProps, ...others }) => { children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} title={title} subTitle={subTitle} backIcon={showBackIcon ? undefined : false} ghost={ghost} onBack={ historyBackDisabled ? () => setProps({ backClicks: backClicks + 1 }) : () => window.history.back() } data-dash-is-loading={useLoading()} > {children} ); }; AntdPageHeader.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件型,页头标题内容 */ title: PropTypes.node, /** * 组件型,页头副标题内容 */ subTitle: PropTypes.node, /** * 是否渲染返回按钮 * 默认值:`true` */ showBackIcon: PropTypes.bool, /** * 是否禁用点击返回按钮回退上一地址的功能 * 默认值:`false` */ historyBackDisabled: PropTypes.bool, /** * 返回按钮累计点击次数,用于监听返回按钮点击行为 * 默认值:`0` */ backClicks: PropTypes.number, /** * 是否开启透明背景模式 * 默认值:`false` */ ghost: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdPageHeader; ================================================ FILE: src/lib/components/navigation/AntdPagination.react.js ================================================ // react核心 import { useEffect, useContext } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Pagination, ConfigProvider } from 'antd'; // 辅助库 import { str2Locale, locale2text } from '../locales.react'; import { isString, isUndefined } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; // 自定义上下文 import PropsContext from '../../contexts/PropsContext'; /** * 分页组件AntdPagination */ const AntdPagination = ({ id, style, className, key, locale = 'zh-cn', align = 'start', defaultCurrent = 1, defaultPageSize = 10, current, pageSize, disabled = false, hideOnSinglePage = false, pageSizeOptions, showQuickJumper = false, showSizeChanger = false, showTotalPrefix, showTotalSuffix, simple = false, size = 'default', total, showTotal = true, showLessItems = false, setProps, persistence, persisted_props, persistence_type, batchPropsNames = [], ...others }) => { // 批属性监听 useEffect(() => { if (batchPropsNames && batchPropsNames.length !== 0) { const _batchPropsValues = {}; for (const propName of batchPropsNames) { _batchPropsValues[propName] = props[propName]; } setProps({ batchPropsValues: _batchPropsValues, }); } }); const context = useContext(PropsContext); locale = (context && context.locale) || locale; useEffect(() => { if (defaultCurrent && !current) { setProps({ current: defaultCurrent }); } if (defaultPageSize && !pageSize) { setProps({ pageSize: defaultPageSize }); } }, []); const onChange = (page, pageSize) => { setProps({ current: page, pageSize: pageSize }); }; const renderShowTotal = (e) => { return `${showTotalPrefix || locale2text.AntdPagination[locale].showTotalPrefix} ${e.toString()} ${showTotalSuffix || locale2text.AntdPagination[locale].showTotalSuffix}`; }; // 返回定制化的前端部件 return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} pageSize={pageSize || defaultPageSize} align={align} defaultCurrent={defaultCurrent} defaultPageSize={defaultPageSize} current={current} disabled={ context && !isUndefined(context.componentDisabled) ? context.componentDisabled : disabled } hideOnSinglePage={hideOnSinglePage} pageSizeOptions={pageSizeOptions} showQuickJumper={showQuickJumper} showSizeChanger={showSizeChanger} showTotal={showTotal ? renderShowTotal : undefined} simple={simple} size={size} total={total} showLessItems={showLessItems} onChange={onChange} data-dash-is-loading={useLoading()} /> ); }; AntdPagination.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 组件尺寸规格,可选项有`'start'`、`'center'`、`'end'` * 默认值:`'start'` */ align: PropTypes.oneOf(['start', 'center', 'end']), /** * 初始化时的当前页码 * 默认值:`1` */ defaultCurrent: PropTypes.number, /** * 初始化时的每页条数 * 默认值:`10` */ defaultPageSize: PropTypes.number, /** * 监听或设置当前页码 */ current: PropTypes.number, /** * 是否禁用当前组件功能 * 默认值:`false` */ disabled: PropTypes.bool, /** * 仅有一页时是否隐藏分页器 * 默认值:`false` */ hideOnSinglePage: PropTypes.bool, /** * 监听或设置每页条数 */ pageSize: PropTypes.number, /** * 每页条数切换可选项 */ pageSizeOptions: PropTypes.arrayOf(PropTypes.number), /** * 是否渲染每页条数切换器 * 默认值:`false` */ showSizeChanger: PropTypes.bool, /** * 是否渲染快捷跳页控件 * 默认值:`false` */ showQuickJumper: PropTypes.bool, /** * 总记录数描述前缀内容 */ showTotalPrefix: PropTypes.string, /** * 总记录数描述后缀内容 */ showTotalSuffix: PropTypes.string, /** * 是否启用简洁模式 * 默认值:`false` */ simple: PropTypes.bool, /** * 组件尺寸规格,可选项有`'default'`、`'small'` * 默认值:`'default'` */ size: PropTypes.oneOf(['default', 'small']), /** * 总记录数 */ total: PropTypes.number, /** * 是否渲染总记录数描述内容 * 默认值:`true` */ showTotal: PropTypes.bool, /** * 是否显示较少的跳页按钮 * 默认值:`false` */ showLessItems: PropTypes.bool, /** * 需要纳入批属性监听的属性名 * 默认值:`[]` */ batchPropsNames: PropTypes.arrayOf(PropTypes.string), /** * 批量监听与当前batchPropsNames对应的属性值 */ batchPropsValues: PropTypes.object, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, /** * 是否为当前组件开启持久化功能 */ persistence: PropTypes.oneOfType([ PropTypes.bool, PropTypes.string, PropTypes.number, ]), /** * 当前组件启用持久化的属性值数组,可选项有`'current'`、`'pageSize'` * 默认值:`['current', 'pageSize']` */ persisted_props: PropTypes.arrayOf( PropTypes.oneOf(['current', 'pageSize']) ), /** * 当前组件的属性持久化存储类型 * 默认值:`'local'` */ persistence_type: PropTypes.oneOf(['local', 'session', 'memory']), }; AntdPagination.dashPersistence = { persisted_props: ['current', 'pageSize'], persistence_type: 'local', }; export default AntdPagination; ================================================ FILE: src/lib/components/navigation/AntdSteps.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { Steps } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 步骤条组件AntdSteps */ const AntdSteps = ({ id, className, style, key, current = 0, direction = 'horizontal', labelPlacement, progressDot = false, size = 'default', status = 'process', type = 'default', steps, allowClick = false, responsive = true, percent, setProps, ...others }) => { // 限制current上限 setProps({ current: current < steps.length ? current : steps.length }); // 限制current下限 setProps({ current: current >= 0 ? current : 0 }); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} items={steps} current={current} direction={direction} labelPlacement={labelPlacement} progressDot={progressDot} size={size} status={status} type={type} responsive={responsive} percent={percent} onChange={ allowClick ? (current) => setProps({ current: current }) : undefined } data-dash-is-loading={useLoading()} /> ); }; AntdSteps.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 必填,步骤内容定义数据结构 */ steps: PropTypes.arrayOf( PropTypes.exact({ /** * 步骤标题 */ title: PropTypes.node.isRequired, /** * 步骤子标题 */ subTitle: PropTypes.node, /** * 步骤描述内容 */ description: PropTypes.node, /** * 步骤自定义图标 */ icon: PropTypes.node, /** * 是否禁用当前步骤 */ disabled: PropTypes.bool, /** * 强制设置当前步骤状态,同参数status */ status: PropTypes.oneOf(['wait', 'process', 'finish', 'error']), }) ).isRequired, /** * 当前所处的步骤序号 * 默认值:`0` */ current: PropTypes.number, /** * 步骤条显示方向,可选项有`'horizontal'`、`'vertical'` * 默认值:`'horizontal'` */ direction: PropTypes.oneOf(['horizontal', 'vertical']), /** * 标签内容显示方位,可选项有`'horizontal'`、`'vertical'` */ labelPlacement: PropTypes.oneOf(['horizontal', 'vertical']), /** * 是否渲染为点状步骤条 * 默认值:`false` */ progressDot: PropTypes.bool, /** * 步骤条尺寸规格,可选项有`'default'`、`'small'` * 默认值:`'default'` */ size: PropTypes.oneOf(['default', 'small']), /** * 步骤条状态,可选项有`'wait'`、`'process'`、`'finish'`、`'error'` * 默认值:`'process'` */ status: PropTypes.oneOf(['wait', 'process', 'finish', 'error']), /** * 步骤条类型,可选项有`'default'`、`'navigation'`、`'inline'` * 默认值:`'default'` */ type: PropTypes.oneOf(['default', 'navigation', 'inline']), /** * 是否可点击切换步骤 * 默认值:`false` */ allowClick: PropTypes.bool, /** * 是否在页面宽度小于532px时自动强制垂直显示 * 默认值:`true` */ responsive: PropTypes.bool, /** * 当前步骤进度,取值应在0到100之间,适用于常规步骤条 */ percent: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdSteps; ================================================ FILE: src/lib/components/other/AntdAffix.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Affix } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { parseChildrenToArray, useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 固钉组件AntdAffix */ const AntdAffix = ({ id, className, style, key, children, offsetBottom, offsetTop = 0, target, setProps, ...others }) => { children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} offsetBottom={offsetBottom} offsetTop={offsetTop} target={() => (target ? document.getElementById(target) : window)} onChange={(e) => setProps({ affixed: e })} data-dash-is-loading={useLoading()} > {children} ); }; AntdAffix.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 触发固钉效果的视窗底部距离像素阈值 */ offsetBottom: PropTypes.number, /** * 触发固钉效果的视窗顶部距离像素阈值 * 默认值:`0` */ offsetTop: PropTypes.number, /** * 滚动事件监听的特定目标容器id */ target: PropTypes.string, /** * 监听当前目标是否已触发固定 */ affixed: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdAffix; ================================================ FILE: src/lib/components/other/AntdBackTop.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { FloatButton } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; const { BackTop } = FloatButton; /** * 回到顶部组件AntdBackTop */ const AntdBackTop = ({ id, className, style, key, duration = 0.45, visibilityHeight = 400, containerId, containerSelector, nClicks = 0, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} target={ containerId || containerSelector ? containerId ? () => document.getElementById(containerId) || window : () => eval(containerSelector) : () => window } duration={duration * 1000} visibilityHeight={visibilityHeight} onClick={() => setProps({ nClicks: nClicks + 1 })} data-dash-is-loading={useLoading()} /> ); }; AntdBackTop.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 回到顶部过程耗时,单位:秒 * 默认值:`0.45` */ duration: PropTypes.number, /** * 回到顶部按钮显示时对应的页面滚动像素高度阈值 * 默认值:`400` */ visibilityHeight: PropTypes.number, /** * 滚动事件监听的特定目标容器id */ containerId: PropTypes.string, /** * 滚动事件监听的特定目标容器js选择代码,优先级低于containerId */ containerSelector: PropTypes.string, /** * 监听回到顶部按钮累计被点击次数 * 默认值:`0` */ nClicks: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdBackTop; ================================================ FILE: src/lib/components/other/AntdConfigProvider.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { ConfigProvider, theme } from 'antd'; import { // 默认主题 defaultTheme, // 暗色主题 darkTheme, } from '@ant-design/compatible'; import { StyleProvider, legacyLogicalPropertiesTransformer, } from '@ant-design/cssinjs'; // 辅助库 import { isUndefined, omitBy } from 'lodash'; import { useLoading } from '../utils'; // 自定义上下文 import PropsContext from '../../contexts/PropsContext'; const str2algorithm = new Map([ ['default', theme.defaultAlgorithm], ['dark', theme.darkAlgorithm], ['compact', theme.compactAlgorithm], ]); const str2oldTheme = new Map([ ['default', defaultTheme], ['dark', darkTheme], ]); /** * 参数配置组件AntdConfigProvider */ const AntdConfigProvider = ({ id, children, algorithm = 'default', cssVar, useOldTheme, primaryColor, componentDisabled, componentSize, locale, wavesDisabled = false, token, componentsToken, compatibilityMode = false, enableLayer = false, setProps, }) => { const themeObject = useOldTheme ? str2oldTheme.get(useOldTheme) : omitBy( { algorithm: Array.isArray(algorithm) ? algorithm.map((e) => str2algorithm.get(e)) : str2algorithm.get(algorithm), cssVar: cssVar, hashed: false, token: omitBy( { colorPrimary: primaryColor, ...token, }, isUndefined ), components: omitBy( { ...componentsToken, }, isUndefined ), }, isUndefined ); const configProviderInstance = ( {children} ); if (compatibilityMode) { return ( {configProviderInstance} ); } else if (enableLayer) { return ( {configProviderInstance} ); } return ( {configProviderInstance} ); }; AntdConfigProvider.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 为内部组件设置快捷主题算法,支持多种主题组合,可选项有`'default'`、`'dark'`、`'compact'` * 默认值:`'default'` */ algorithm: PropTypes.oneOfType([ PropTypes.oneOf(['default', 'dark', 'compact']), PropTypes.arrayOf(PropTypes.oneOf(['default', 'dark', 'compact'])), ]), /** * 是否开启`CSS`变量模式,具体参考:https://ant-design.antgroup.com/docs/react/css-variables * 默认值:`false` */ cssVar: PropTypes.oneOfType([ PropTypes.bool, PropTypes.shape({ prefix: PropTypes.string, key: PropTypes.string, }), ]), /** * 是否强制使用`0.3.x`版本之前的主题样式,可选项有`'default'`、`'dark'` */ useOldTheme: PropTypes.oneOf(['default', 'dark']), /** * 主题色 */ primaryColor: PropTypes.string, /** * 是否针后代元素中的所有组件强制设置禁用状态 */ componentDisabled: PropTypes.bool, /** * 强制设置后代元素的尺寸规格,可选项有`'small'`、`'middle'`、`'large'`,其中`'default'`兼容`'middle'` */ componentSize: PropTypes.oneOf(['small', 'middle', 'large']), /** * 强制设置后代元素的语言,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语) */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 是否禁用内部组件水波纹动效 * 默认值:`false` */ wavesDisabled: PropTypes.bool, /** * 配置`design token`相关参数 */ token: PropTypes.shape({ /** * 是否开启动画效果 * 默认值:`true` */ motion: PropTypes.bool, }), /** * 配置针对具体组件的`design token`相关参数 */ componentsToken: PropTypes.objectOf( PropTypes.shape({ /** * 是否开启派生样式自动推导运算 * 默认值:`false` */ algorithm: PropTypes.bool, }) ), /** * 是否开启针对`88`及以下版本`Chromium`内核浏览器的向下兼容模式 * 默认值:`false` */ compatibilityMode: PropTypes.bool, /** * 是否启用layer样式降权 * 默认值:`false` */ enableLayer: PropTypes.bool, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdConfigProvider; ================================================ FILE: src/lib/components/other/AntdCopyText.react.js ================================================ // react核心 import React, { useContext } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Typography, ConfigProvider } from 'antd'; // 辅助库 import { str2Locale } from '../locales.react'; import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; // 上下文 import PropsContext from '../../contexts/PropsContext'; const { Text } = Typography; /** * 文字复制组件AntdCopyText */ const AntdCopyText = ({ id, className, style, key, locale = 'zh-cn', text = '', format = 'text/plain', tooltips, beforeIcon, afterIcon, setProps, ...others }) => { const context = useContext(PropsContext); locale = (context && context.locale) || locale; return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} copyable={{ text: text, icon: [beforeIcon, afterIcon], format: format, tooltips: tooltips, }} data-dash-is-loading={useLoading()} /> ); }; AntdCopyText.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 复制目标内容 */ text: PropTypes.string, /** * 剪切板内容的类型,可选项有`'text/plain'`、`text/html` * 默认值:`'text/plain'` */ format: PropTypes.oneOf(['text/plain', 'text/html']), /** * 设置复制前后的文字提示内容,格式为`[复制前内容, 复制后内容]`,设置为`false`时关闭文字提示 */ tooltips: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.node), PropTypes.bool, ]), /** * 组件型,未复制状态图标 */ beforeIcon: PropTypes.node, /** * 组件型,完成复制状态图标 */ afterIcon: PropTypes.node, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdCopyText; ================================================ FILE: src/lib/components/other/AntdHappyProvider.react.js ================================================ // react核心 import PropTypes from 'prop-types'; // antd核心 import { HappyProvider } from '@ant-design/happy-work-theme'; // 辅助库 import { useLoading } from '../utils'; /** * 快乐工作特效组件AntdHappyProvider */ const AntdHappyProvider = ({ children, disabled = false }) => { return ( {children} ); }; AntdHappyProvider.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 是否禁用当前特效 * 默认值:`false` */ disabled: PropTypes.bool, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdHappyProvider; ================================================ FILE: src/lib/components/other/AntdTour.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { Tour, ConfigProvider } from 'antd'; // 辅助库 import { isString } from 'lodash'; import { pickBy } from 'ramda'; import { str2Locale } from '../locales.react'; import { useLoading } from '../utils'; // 自定义hooks import useCss from '../../hooks/useCss'; /** * 漫游式引导组件AntdTour */ const AntdTour = ({ id, className, style, key, locale = 'zh-cn', steps = [], arrow = true, placement = 'bottom', mask = true, type = 'default', open = false, current, zIndex = 1001, setProps, ...others }) => { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} key={key} steps={steps.map((item) => ({ ...item, target: item.targetId ? () => document.getElementById(item.targetId) : item.targetSelector ? () => document.querySelector(item.targetSelector) : null, }))} arrow={arrow} placement={placement} mask={mask} type={type} open={open} current={current} zIndex={zIndex} onChange={(e) => setProps({ current: e })} onClose={() => setProps({ open: false })} onFinish={() => setProps({ open: false })} data-dash-is-loading={useLoading()} /> ); }; AntdTour.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名,支持[动态css](/advanced-classname) */ className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), /** * 组件文案语种,可选项有`'zh-cn'`(简体中文)、`'en-us'`(英语)、`'de-de'`(德语)、`'fr-fr'`(法语)、`'ru-ru'`(俄语) * 默认值:`'zh-cn'` */ locale: PropTypes.oneOf(['zh-cn', 'en-us', 'de-de', 'ru-ru', 'fr-fr']), /** * 配置引导步骤 */ steps: PropTypes.arrayOf( PropTypes.exact({ /** * 当前步骤目标元素id,优先级高于`targetSelector` */ targetId: PropTypes.string, /** * 定位当前步骤目标元素的javascript代码字符串 */ targetSelector: PropTypes.string, /** * 配置当前步骤箭头 * 默认值:`true` */ arrow: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 箭头是否指向目标中心 */ pointAtCenter: PropTypes.bool, }), ]), /** * 组件型,当前步骤弹框的封面内容 */ cover: PropTypes.node, /** * 组件型,当前步骤弹框的标题内容 */ title: PropTypes.node, /** * 组件型,当前步骤弹框的描述内容 */ description: PropTypes.node, /** * 当前引导步骤弹框相对目标元素的位置,可选项有`'center'`、`'left'`、`'leftTop'`、`'leftBottom'`、`'right'`、`'rightTop'`、`'rightBottom'`、`'top'`、`'topLeft'`、`'topRight'`、`'bottom'`、`'bottomLeft'`、`'bottomRight'` */ placement: PropTypes.oneOf([ 'center', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight', ]), /** * 配置当前步骤蒙版层 * 默认值:`true` */ mask: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 当前步骤蒙版层css样式 */ style: PropTypes.object, /** * 当前步骤蒙版层颜色 */ color: PropTypes.string, }), ]), /** * 当前步骤弹框类型,可选项有`'default'`、`'primary'` * 默认值:`'default'` */ type: PropTypes.oneOf(['default', 'primary']), /** * 配置当前步骤下一步按钮 */ nextButtonProps: PropTypes.exact({ /** * 组件型,按钮内嵌元素 */ children: PropTypes.node, }), /** * 配置当前步骤上一步按钮 */ prevButtonProps: PropTypes.exact({ /** * 组件型,按钮内嵌元素 */ children: PropTypes.node, }), }) ), /** * 统一配置引导步骤弹框箭头 * 默认值:`true` */ arrow: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 箭头是否指向目标中心 */ pointAtCenter: PropTypes.bool, }), ]), /** * 统一配置引导步骤弹框相对于目标元素的展开方向,可选项有`'center'`、`'left'`、`'leftTop'`、`'leftBottom'`、`'right'`、`'rightTop'`、`'rightBottom'`、`'top'`、`'topLeft'`、`'topRight'`、`'bottom'`、`'bottomLeft'`、`'bottomRight'` * 默认值:`'bottom'` */ placement: PropTypes.oneOf([ 'center', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight', ]), /** * 统一配置引导弹框蒙版 * 默认值:`true` */ mask: PropTypes.oneOfType([ PropTypes.bool, PropTypes.exact({ /** * 蒙版层css样式 */ style: PropTypes.object, /** * 蒙版层颜色 */ color: PropTypes.string, }), ]), /** * 统一设置引导步骤弹框类型,可选项有`'default'`、`'primary'` * 默认值:`'default'` */ type: PropTypes.oneOf(['default', 'primary']), /** * 监听或设置当前漫游式引导的打开状态 * 默认值:`false` */ open: PropTypes.bool, /** * 监听或设置当前漫游式引导所在步骤序号 */ current: PropTypes.number, /** * 当前漫游式引导z-index * 默认值:`1001` */ zIndex: PropTypes.number, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdTour; ================================================ FILE: src/lib/components/other/AntdWatermark.react.js ================================================ // react核心 import React from 'react'; import PropTypes from 'prop-types'; // antd核心 import { WaterMark } from '@ant-design/pro-components'; // 辅助库 import { parseChildrenToArray, useLoading } from '../utils'; import { pickBy } from 'ramda'; /** * 水印组件AntdWatermark */ const AntdWatermark = ({ id, children, className, style, markClassName, markStyle, key, content, rotate = -22, zIndex, fontColor, fontSize = 16, gapX = 212, gapY = 222, image, width, height, inherit = true, ...others }) => { children = parseChildrenToArray(children); return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={className} style={style} markClassName={markClassName} markStyle={markStyle} key={key} content={content} rotate={rotate} zIndex={zIndex} fontColor={fontColor} fontSize={fontSize} gapX={gapX} gapY={gapY} image={image} width={width} height={height} inherit={inherit} data-dash-is-loading={useLoading()} > {children} ); }; AntdWatermark.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 当前组件css样式 */ style: PropTypes.object, /** * 当前组件css类名 */ className: PropTypes.string, /** * 水印层css类名 */ markClassName: PropTypes.string, /** * 水印层css样式 */ markStyle: PropTypes.object, /** * 配置水印内容,传入数组时渲染多行水印 */ content: PropTypes.oneOfType([ PropTypes.string, PropTypes.arrayOf(PropTypes.string), ]), /** * 水印旋转角度 * 默认值:`-22` */ rotate: PropTypes.number, /** * 水印z-index */ zIndex: PropTypes.number, /** * 文字水印颜色 */ fontColor: PropTypes.string, /** * 文字水印字体大小 * 默认值:`16` */ fontSize: PropTypes.number, /** * 水印之间的水平像素间距 * 默认值:`212` */ gapX: PropTypes.number, /** * 水印之间的垂直像素间距 * 默认值:`222` */ gapY: PropTypes.number, /** * 图片水印地址 */ image: PropTypes.string, /** * 图片水印像素宽度 */ width: PropTypes.number, /** * 图片水印像素高度 */ height: PropTypes.number, /** * 是否将水印传导给`AntdModal`、`AntdDrawer`等弹出类组件 * 默认值:`true` */ inherit: PropTypes.bool, /** * `data-*`格式属性通配 */ 'data-*': PropTypes.string, /** * `aria-*`格式属性通配 */ 'aria-*': PropTypes.string, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default AntdWatermark; ================================================ FILE: src/lib/components/other/Fragment.react.js ================================================ // react核心 import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; // antd核心 import { theme } from 'antd'; const { useToken } = theme; /** * 空节点组件Fragment */ const Fragment = (props) => { const { token: _token } = useToken(); useEffect(() => { props.setProps({ token: _token }); }, [_token]); return <>{props.children}; }; Fragment.propTypes = { /** * 组件唯一id */ id: PropTypes.string, /** * 对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果 */ key: PropTypes.string, /** * 组件型,内嵌元素 */ children: PropTypes.node, /** * 监听当前组件所在作用范围对应的样式`token`参数,需配合上层`AntdConfigProvider`组件使用 */ token: PropTypes.object, /** * Dash-assigned callback that should be called to report property changes * to Dash, to make them available for callbacks. */ setProps: PropTypes.func, }; export default Fragment; ================================================ FILE: src/lib/components/styles.css ================================================ /* 屏蔽浏览器默认的margin */ body { margin: 0; } /* 隐藏幽灵行 */ .ant-table-measure-row { height: 0px !important; } .editable-cell { position: relative; } .editable-cell-value-wrap { padding: 5px 5px; cursor: pointer; height: 100%; } .editable-row:hover .editable-cell-value-wrap { padding: 4px 4px; border: 1px solid #d9d9d9; border-radius: 4px; height: 100%; } [data-theme="dark"] .editable-row:hover .editable-cell-value-wrap { border: 1px solid #434343; } .ant-table-thead>tr>th, .ant-table-tbody>tr>td, .ant-table tfoot>tr>th, .ant-table tfoot>tr>td { position: relative; padding: 5px 5px; overflow-wrap: break-word; } .ant-table-tbody>tr { height: 36px; } .ant-steps-item-icon .ant-steps-icon { position: relative; top: -1px; color: #1890ff; line-height: 1; } .comment-action { padding-left: 8px; cursor: "auto"; } [class*="-col-rtl"] .comment-action { padding-right: 8px; padding-left: 0; } .feffery-paste-image-container { height: 400px; overflow: auto; border: 1px solid #d9d9d9; transition: all 0.3s, height 0s; cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAkdJREFUSEtjZMABcnNny3ByMpQyMzNpISv59u3XtokTM/tx6UMXZ4QJJCTM5+Dh+WIB4zMxMe83M1NhkJUVRdFz8eJ9hgcPXr/+9etXGEzi3z+mG9OmZb/AZinYgqbqqWVvvzC2Gyv8YgLxP3xjYvjwR4AhM8sTq0Obm1czmCj+gsu9+cx879MPxicNbTn2WH2Qnzftb5rTF7Dhh2+yM7z8yMzw8x8rgyAfKwPci1Cd/xkYGF69+8Ugwv2bQV3yN4OqxB+wzPaLnA+fvGdxmDAh8wGyJWD9teVT70dYflUAsb/+ZGTgZAMZQxgwIdl+9Bbbg0uPmBOnTMk9gNcCwsZiV0GRBTP38eC1l52dlYGL+efnt1/++5Hlg23XJRmi4/1xWjJ16jqGz5+/MTAw/N84aVJ2AMlBRMiCSZPWMLS3JzLk509nYGRknDZxYmY2zBKMSMbmTEIW9PevZOjqSgFrBVnCwMAwf9KkrCQQgyoW9PQsZ+jtTYO7DdkSqljQ2bmU4f9/rEm7iioWgJz+8+d3hl+/fsJ9cfHi7W+HDl3zppoF6JbQxAJkS2hmAcyS06evUD+IkJP44cNnvh4+fNWHqnGAbMGhQ+c/HzlyyQ9sQU3ZlIeRVt/kcJUFhDIaNn0oFlSXTX0UZfVVlmYWVJVNeRxk8l2GlQV7PbDrJv7CjhgfzFEQ/R0oyvtPCJvim+/FGWLjfUmqKlCCCKSzrHhyAA87QzA2U5i5RMKcXUzYSLHhwYNniEgmpLGsbG4XITXY5Lu6kssAynVWbI/9nxAAAAAASUVORK5CYII=), auto; } .feffery-paste-image-container:hover { border: 1px solid rgb(64, 169, 255); } /* AntdTable自定义角标模式 */ .ant-corner-mark-top-right { position: relative; height: 100%; } .ant-corner-mark-top-right:after { position: absolute; top: 2px; right: 2px; width: 0; height: 0; border: 6px solid var(--ant-corner-mark-color); border-bottom: 6px solid transparent; border-left: 6px solid transparent; border-top-right-radius: 2px; content: ""; transform: var(--ant-corner-mark-transform); } .ant-corner-mark-top-left { position: relative; height: 100%; } .ant-corner-mark-top-left:after { position: absolute; top: 2px; left: 2px; width: 0; height: 0; border: 6px solid var(--ant-corner-mark-color); border-bottom: 6px solid transparent; border-right: 6px solid transparent; border-top-left-radius: 2px; content: ""; transform: var(--ant-corner-mark-transform); } .ant-corner-mark-bottom-left { position: relative; height: 100%; } .ant-corner-mark-bottom-left:after { position: absolute; bottom: 2px; left: 2px; width: 0; height: 0; border: 6px solid var(--ant-corner-mark-color); border-top: 6px solid transparent; border-right: 6px solid transparent; border-bottom-left-radius: 2px; content: ""; transform: var(--ant-corner-mark-transform); } .ant-corner-mark-bottom-right { position: relative; height: 100%; } .ant-corner-mark-bottom-right:after { position: absolute; bottom: 2px; right: 2px; width: 0; height: 0; border: 6px solid var(--ant-corner-mark-color); border-top: 6px solid transparent; border-left: 6px solid transparent; border-bottom-right-radius: 2px; content: ""; transform: var(--ant-corner-mark-transform); } /* 修复AntdTabs开启tabPane切换动画后滚动条异常问题 */ .ant-tabs { overflow-x: hidden; } .ant-modal-wrap-overwrite { pointer-events: none; } .ant-tree-draggable-icon { cursor: grab; } /* 确保spin容器高度继承自wrapperClassName */ .ant-spin-nested-loading>.ant-spin-container { height: inherit; } /* 为AntdButton内嵌元素设置间距 */ .ant-btn>*:not(:last-child) { margin-right: 0.25em; } .ant-tree-title .ant-rate { font-size: 16px; } /* 针对上传组件允许按钮block模式 */ .ant-upload-button-block .ant-upload { display: block; } /* 为AntdTag图标元素设置间距 */ .ant-tag span:not(:first-child) { margin-inline-start: 5px; } /* AntdPopupCard、AntdModal内置显隐动效补丁 */ @keyframes antZoomBigIn { 0% { transform: scale(.8); opacity: 0 } to { transform: scale(1); opacity: 1 } } @keyframes antZoomBigOut { 0% { transform: scale(1) } to { transform: scale(.8); opacity: 0 } } .ant-zoom-big-appear, .ant-zoom-big-enter, .ant-zoom-big-leave { animation-duration: .2s; animation-fill-mode: both; animation-play-state: paused } .ant-zoom-big-appear.ant-zoom-big-appear-active, .ant-zoom-big-enter.ant-zoom-big-enter-active { animation-name: antZoomBigIn; animation-play-state: running } .ant-zoom-big-leave.ant-zoom-big-leave-active { animation-name: antZoomBigOut; animation-play-state: running; pointer-events: none } .ant-zoom-big-appear, .ant-zoom-big-enter { transform: scale(0); opacity: 0; animation-timing-function: cubic-bezier(.08, .82, .17, 1) } .ant-zoom-big-appear-prepare, .ant-zoom-big-enter-prepare { transform: none } .ant-zoom-big-leave { animation-timing-function: cubic-bezier(.78, .14, .15, .86) } .ant-zoom-big-fast-appear, .ant-zoom-big-fast-enter, .ant-zoom-big-fast-leave { animation-duration: .1s; animation-fill-mode: both; animation-play-state: paused } .ant-zoom-big-fast-appear.ant-zoom-big-fast-appear-active, .ant-zoom-big-fast-enter.ant-zoom-big-fast-enter-active { animation-name: antZoomBigIn; animation-play-state: running } .ant-zoom-big-fast-leave.ant-zoom-big-fast-leave-active { animation-name: antZoomBigOut; animation-play-state: running; pointer-events: none } .ant-zoom-big-fast-appear, .ant-zoom-big-fast-enter { transform: scale(0); opacity: 0; animation-timing-function: cubic-bezier(.08, .82, .17, 1) } .ant-zoom-big-fast-appear-prepare, .ant-zoom-big-fast-enter-prepare { transform: none } .ant-zoom-big-fast-leave { animation-timing-function: cubic-bezier(.78, .14, .15, .86) } @keyframes antSlideLeftIn { 0% { transform: scaleX(.8); transform-origin: 0 0; opacity: 0 } to { transform: scaleX(1); transform-origin: 0 0; opacity: 1 } } @keyframes antSlideLeftOut { 0% { transform: scaleX(1); transform-origin: 0 0; opacity: 1 } to { transform: scaleX(.8); transform-origin: 0 0; opacity: 0 } } .ant-slide-left-appear, .ant-slide-left-enter, .ant-slide-left-leave { animation-duration: .2s; animation-fill-mode: both; animation-play-state: paused } .ant-slide-left-appear.ant-slide-left-appear-active, .ant-slide-left-enter.ant-slide-left-enter-active { animation-name: antSlideLeftIn; animation-play-state: running } .ant-slide-left-leave.ant-slide-left-leave-active { animation-name: antSlideLeftOut; animation-play-state: running; pointer-events: none } .ant-slide-left-appear, .ant-slide-left-enter { transform: scale(0); transform-origin: 0 0; opacity: 0; animation-timing-function: cubic-bezier(.23, 1, .32, 1) } .ant-slide-left-leave { animation-timing-function: cubic-bezier(.755, .05, .855, .06) } @keyframes antSlideRightIn { 0% { transform: scaleX(.8); transform-origin: 100% 0; opacity: 0 } to { transform: scaleX(1); transform-origin: 100% 0; opacity: 1 } } @keyframes antSlideRightOut { 0% { transform: scaleX(1); transform-origin: 100% 0; opacity: 1 } to { transform: scaleX(.8); transform-origin: 100% 0; opacity: 0 } } .ant-slide-right-appear, .ant-slide-right-enter, .ant-slide-right-leave { animation-duration: .2s; animation-fill-mode: both; animation-play-state: paused } .ant-slide-right-appear.ant-slide-right-appear-active, .ant-slide-right-enter.ant-slide-right-enter-active { animation-name: antSlideRightIn; animation-play-state: running } .ant-slide-right-leave.ant-slide-right-leave-active { animation-name: antSlideRightOut; animation-play-state: running; pointer-events: none } .ant-slide-right-appear, .ant-slide-right-enter { transform: scale(0); transform-origin: 0 0; opacity: 0; animation-timing-function: cubic-bezier(.23, 1, .32, 1) } .ant-slide-right-leave { animation-timing-function: cubic-bezier(.755, .05, .855, .06) } @keyframes antMoveLeftIn { 0% { transform: translateX(-100%); transform-origin: 0 0; opacity: 0 } to { transform: translateX(0); transform-origin: 0 0; opacity: 1 } } @keyframes antMoveLeftOut { 0% { transform: translateX(0); transform-origin: 0 0; opacity: 1 } to { transform: translateX(-100%); transform-origin: 0 0; opacity: 0 } } .ant-move-left-appear, .ant-move-left-enter, .ant-move-left-leave { animation-duration: .2s; animation-fill-mode: both; animation-play-state: paused } .ant-move-left-appear.ant-move-left-appear-active, .ant-move-left-enter.ant-move-left-enter-active { animation-name: antMoveLeftIn; animation-play-state: running } .ant-move-left-leave.ant-move-left-leave-active { animation-name: antMoveLeftOut; animation-play-state: running; pointer-events: none } .ant-move-left-appear, .ant-move-left-enter { opacity: 0; animation-timing-function: cubic-bezier(.08, .82, .17, 1) } .ant-move-left-leave { animation-timing-function: cubic-bezier(.6, .04, .98, .34) } @keyframes antMoveRightIn { 0% { transform: translateX(100%); transform-origin: 0 0; opacity: 0 } to { transform: translateX(0); transform-origin: 0 0; opacity: 1 } } @keyframes antMoveRightOut { 0% { transform: translateX(0); transform-origin: 0 0; opacity: 1 } to { transform: translateX(100%); transform-origin: 0 0; opacity: 0 } } .ant-move-right-appear, .ant-move-right-enter, .ant-move-right-leave { animation-duration: .2s; animation-fill-mode: both; animation-play-state: paused } .ant-move-right-appear.ant-move-right-appear-active, .ant-move-right-enter.ant-move-right-enter-active { animation-name: antMoveRightIn; animation-play-state: running } .ant-move-right-leave.ant-move-right-leave-active { animation-name: antMoveRightOut; animation-play-state: running; pointer-events: none } .ant-move-right-appear, .ant-move-right-enter { opacity: 0; animation-timing-function: cubic-bezier(.08, .82, .17, 1) } .ant-move-right-leave { animation-timing-function: cubic-bezier(.6, .04, .98, .34) } ================================================ FILE: src/lib/components/utils.js ================================================ import { cloneDeep, isUndefined } from 'lodash'; import { toPairs, flatten } from 'ramda'; const flatToTree = (rawFlat) => { if (rawFlat) { const temp = cloneDeep(rawFlat); const parents = temp.filter((item) => isUndefined(item.parent)); const children = temp.filter((item) => item.parent); children.forEach((item) => { const currentNode = temp.find((node) => node.key === item.parent); currentNode && (currentNode.children ? currentNode.children.push(item) : (currentNode.children = [item])); }); return parents; } return rawFlat; }; const parseChildrenToArray = (children) => { if (children && !Array.isArray(children)) { return [children]; } return children; }; const resolveChildProps = (child) => window.dash_component_api.getLayout(child.props.componentPath)?.props; const useLoading = () => window.dash_component_api.useDashContext().useLoading() || undefined; const loadingSelector = (componentPath) => (state) => { let stringPath = JSON.stringify(componentPath); stringPath = stringPath.substring(0, stringPath.length - 1); const loadingChildren = toPairs(state.loading).reduce( (acc, [path, load]) => { if (path.startsWith(stringPath) && load.length) { return [...acc, load]; } return acc; }, [] ); if (loadingChildren?.length) { return flatten(loadingChildren); } return []; }; export { flatToTree, parseChildrenToArray, resolveChildProps, useLoading, loadingSelector, }; ================================================ FILE: src/lib/contexts/FormContext.js ================================================ import React from 'react'; const FormContext = React.createContext(); export default FormContext; ================================================ FILE: src/lib/contexts/FormItemContext.js ================================================ import React from 'react'; const FormItemContext = React.createContext(); export default FormItemContext; ================================================ FILE: src/lib/contexts/PropsContext.js ================================================ import React from 'react'; const PropsContext = React.createContext(); export default PropsContext; ================================================ FILE: src/lib/fragments/AntdTable.react.js ================================================ // react核心 import React, { useContext, useState, useEffect, useRef } from 'react'; // antd核心 import { Table, Checkbox, Switch, Popover, Popconfirm, ConfigProvider, Typography, Menu, Dropdown, Input, Form, Tag, Button, Badge, Space, Image, Avatar, message, Select, Divider, Tooltip, Progress, } from 'antd'; import { TinyLine, TinyArea, TinyColumn, RingProgress, } from '@ant-design/plots'; import AntdIcon from '../components/general/AntdIcon.react'; import { SearchOutlined, QuestionCircleOutlined, DownOutlined, } from '@ant-design/icons'; // 辅助库 import Highlighter from 'react-highlight-words'; import { isNumber, isEqual, isString, isBoolean, isEmpty, omitBy, isUndefined, } from 'lodash'; import { pickBy } from 'ramda'; import { str2Locale, locale2text } from '../components/locales.react'; import { useLoading } from '../components/utils'; import useStickyOffset from '../hooks/useStickyOffset'; // 上下文 import PropsContext from '../contexts/PropsContext'; // 参数类型 import { propTypes, defaultProps, } from '../components/dataDisplay/AntdTable.react'; // 内部组件 import { UtilsLink } from '../internal_components/UtilsLink.react'; const { Text } = Typography; const insertNewColumnNode = (column, group, currentLevel, currentNode) => { // 若当前递归到的层级小于group数组长度 if (currentLevel < group.length) { // 尝试在currentNode中搜索dataIndex等于当前group层级的元素 const matchColumnIdx = currentNode.findIndex( (item) => item.dataIndex === group[currentLevel] ); // 若未在currentNode中搜索到当前group层级对应元素 if (matchColumnIdx === -1) { // 向currentNode中push当前group层级对应元素 currentNode.push({ dataIndex: group[currentLevel], title: group[currentLevel], children: [], }); // 继续向下一层级递归 insertNewColumnNode( column, group, currentLevel + 1, currentNode[currentNode.length - 1].children ); } else { // 若在currentNode中搜索到当前group层级对应元素 // 继续向下一层级递归 insertNewColumnNode( column, group, currentLevel + 1, currentNode[matchColumnIdx].children ); } } else { // 否则则视作到达最深层 currentNode.push({ ...column }); } }; const splitSummaryRowContents = ( summaryRowContents, columnCount, blankColumns ) => { const summaryGroups = blankColumns > 0 ? [Array.from({ length: blankColumns }, () => ({ empty: true }))] : [[]]; let currentGroupSpans = 0; for (const item of summaryRowContents) { // 检查当前字段追加到末尾分组后,是否超出总列数 if (currentGroupSpans + (item.colSpan || 1) > columnCount) { currentGroupSpans = item.colSpan || 1; // 处理前置空白列填充 if (blankColumns > 0) { summaryGroups.push([ ...Array.from({ length: blankColumns }, () => ({ empty: true, })), item, ]); } else { summaryGroups.push([item]); } } else { currentGroupSpans += item.colSpan || 1; summaryGroups[summaryGroups.length - 1].push(item); } } return summaryGroups; }; const findItemByKey = (array, key) => { let foundItem = null; const search = (item) => { if (item.key === key) { foundItem = item; return true; } return Array.isArray(item.children) && item.children.some(search); }; array.some(search); return foundItem; }; const replaceItemByKey = (array, key, replacement) => { for (let i = 0; i < array.length; i++) { const item = array[i]; if (item && item.key === key) { array.splice(i, 1, replacement); return true; } if (item && Array.isArray(item.children)) { if (replaceItemByKey(item.children, key, replacement)) { return true; } } } return false; }; // 定义不触发重绘的参数数组 const preventUpdateProps = [ 'recentlyMouseEnterColumnDataIndex', 'recentlyMouseEnterRowKey', 'recentlyMouseEnterRow', ]; /** * 表格组件AntdTable */ const AntdTable = (props) => { let { id, className, style, key, locale, containerId, columns, showHeader, rowHoverable, tableLayout, miniChartHeight, miniChartAnimation, rowSelectionType, selectedRowKeys, rowSelectionWidth, rowSelectionCheckStrictly, rowSelectionIgnoreRowKeys, sticky, titlePopoverInfo, columnsFormatConstraint, enableHoverListen, data, sortOptions, showSorterTooltip, showSorterTooltipTarget, filterOptions, defaultFilteredValues, pagination, bordered, maxHeight, maxWidth, scrollToFirstRowOnChange, size, mode, nClicksButton, nDoubleClicksCell, summaryRowContents, summaryRowBlankColumns, summaryRowFixed, customFormatFuncs, conditionalStyleFuncs, expandedRowKeyToContent, expandedRowWidth, expandRowByClick, defaultExpandedRowKeys, expandedRowKeys, enableCellClickListenColumns, nClicksCell, nContextMenuClicksCell, emptyContent, cellUpdateOptimize, nClicksDropdownItem, hiddenRowKeys, virtual, title, footer, loading, rowClassName, setProps, ...others } = props; const context = useContext(PropsContext); locale = (context && context.locale) || locale; useEffect(() => { // 处理pagination参数的默认值问题 if (isBoolean(pagination) && !pagination) { } else { setProps({ pagination: { ...pagination, current: pagination?.current ? pagination?.current : 1, }, }); } }, []); const [searchText, setSearchText] = useState(''); const [searchedColumn, setSearchedColumn] = useState(''); const stickyObj = sticky && typeof sticky === 'object' ? sticky : {}; const belowSelector = stickyObj.belowSelector ?? undefined; const offsetHeader = Number(stickyObj.offsetHeader || 0); const autoMeasuredOffset = belowSelector ? useStickyOffset({ selector: belowSelector, extra: offsetHeader }) : offsetHeader; const { belowSelector: _rm1, offsetHeader: _rm2, ...stickyRest } = stickyObj; const computedSticky = sticky === true || belowSelector || (sticky && typeof sticky === 'object') ? { ...stickyRest, offsetHeader: autoMeasuredOffset } : undefined; const onPageChange = (pagination, filter, sorter, currentData) => { // 当本次事件由翻页操作引发时 if (currentData.action === 'paginate') { setProps({ pagination: { ...pagination, pageSize: pagination.pageSize, current: pagination.current, position: pagination.position ? Array.isArray(pagination.position) ? pagination.position[0] : pagination.position : pagination.position, }, currentData: currentData.currentDataSource, }); } else if (currentData.action === 'sort') { // 当sorter为数组时,即为多字段组合排序方式时 if (Array.isArray(sorter)) { setProps({ sorter: { columns: sorter.map((item) => item.column.dataIndex), orders: sorter.map((item) => item.order), }, }); } else if (sorter.order) { // 单字段排序方式 setProps({ sorter: { columns: [sorter.column.dataIndex], orders: [sorter.order], }, }); } else { // 非排序状态 setProps({ sorter: { columns: [], orders: [], }, }); } } else if (currentData.action === 'filter') { setProps({ filter: filter }); } }; // 自定义关键词搜索过滤模式 let searchInput; const getColumnSearchProps = (dataIndex, title) => ({ filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters, }) => (
{ searchInput = node; }} placeholder={`${locale2text.AntdTable[locale].filterKeywordPlaceholder} ${title}`} value={selectedKeys[0]} onChange={(e) => setSelectedKeys(e.target.value ? [e.target.value] : []) } onPressEnter={() => handleSearch(selectedKeys, confirm, dataIndex) } style={{ marginBottom: 8, display: 'block' }} />
), filterIcon: (filtered) => ( ), // 搜索筛选 onFilter: (value, record) => { if (mode === 'client-side') { // 仅支持非数组型合法输入值,对象型输入支持对content、text、label、tag属性进行搜索筛选 if (record[dataIndex] && !Array.isArray(record[dataIndex])) { // 判断当前记录是否有content属性 if (record[dataIndex]?.content) { return record[dataIndex].content .toString() .toLowerCase() .includes(value?.toLowerCase()); } else if (record[dataIndex]?.text) { return record[dataIndex].text .toString() .toLowerCase() .includes(value?.toLowerCase()); } else if (record[dataIndex]?.label) { return record[dataIndex].label .toString() .toLowerCase() .includes(value?.toLowerCase()); } else if (record[dataIndex]?.tag) { return record[dataIndex].tag .toString() .toLowerCase() .includes(value?.toLowerCase()); } else if (record[dataIndex]?.toString) { return record[dataIndex] .toString() .toLowerCase() .includes(value?.toLowerCase()); } } else if (Array.isArray(record[dataIndex])) { // 若当前记录为数组,分别检查数组元素对象是否具有content、tag、title属性 if (record[dataIndex].some((item) => item?.content)) { // 检查当前记录数组中是否至少有一个对象的content属性命中关键词 return record[dataIndex].some((item) => item?.content .toString() .toLowerCase() .includes(value?.toLowerCase()) ); } else if (record[dataIndex].some((item) => item?.tag)) { // 检查当前记录数组中是否至少有一个对象的tag属性命中关键词 return record[dataIndex].some((item) => item?.tag .toString() .toLowerCase() .includes(value?.toLowerCase()) ); } else if (record[dataIndex].some((item) => item?.title)) { // 检查当前记录数组中是否至少有一个对象的title属性命中关键词 return record[dataIndex].some((item) => item?.title .toString() .toLowerCase() .includes(value?.toLowerCase()) ); } } return false; } return true; }, onFilterDropdownVisibleChange: (visible) => { if (visible) { setTimeout(() => searchInput.select(), 100); } }, render: (text) => searchedColumn === dataIndex && isString(text) ? ( ) : ( text ), }); const handleSearch = (selectedKeys, confirm, dataIndex) => { confirm(); setSearchText(selectedKeys[0]); setSearchedColumn(dataIndex); }; const handleSearchReset = (clearFilters) => { clearFilters(); setSearchText(''); }; if (!data) { data = []; } // 当未设置行key时,自动以自增1的字符型结果作为key for (const i in data) { if (!data[i].hasOwnProperty('key')) { data[i].key = i.toString(); } } // 为pagination补充默认参数值 if (isBoolean(pagination) && !pagination) { } else { pagination = { ...pagination, showTotalPrefix: pagination?.showTotalPrefix || locale2text.AntdTable[locale].showTotalPrefix, showTotalSuffix: pagination?.showTotalSuffix || locale2text.AntdTable[locale].showTotalSuffix, }; } // 根据columns中的hidden属性控制是否忽略对应字段 columns = columns.filter((item) => !item.hidden); // 为columns配置默认align参数 for (const i in columns) { columns[i] = { align: 'center', ...columns[i], }; } // 自定义可编辑单元格 const EditableContext = React.createContext(null); const EditableRow = ({ index, ...props }) => { const [form] = Form.useForm(); return (
); }; const EditableCell = ({ title, editable, children, dataIndex, record, ...restProps }) => { const [editing, setEditing] = useState(false); const inputRef = useRef(null); const form = useContext(EditableContext); useEffect(() => { if (editing) { inputRef.current?.focus(); } }, [editing]); const toggleEdit = () => { setEditing(!editing); form.setFieldsValue({ [dataIndex]: record[dataIndex], }); }; const [dataSource, setDataSource] = useState(data); // 负责监听单元格内容修改动作从而进行相关值的更新 const handleSave = (row, setProps, dataSource, setDataSource) => { const newData = [...dataSource]; const item = findItemByKey(newData, row.key); const rowColumns = Object.getOwnPropertyNames(row); // 循环取出属性名,再判断属性值是否一致 for (let i = 0; i < rowColumns.length; i++) { // 找到发生值修改的字段 if ( row[rowColumns[i]] !== item[rowColumns[i]] && columnsFormatConstraint && columnsFormatConstraint[rowColumns[i]] && columnsFormatConstraint[rowColumns[i]].rule ) { // 检查是否满足预设的正则表达式规则 if ( !eval( `/${columnsFormatConstraint[rowColumns[i]].rule}/` ).test(row[rowColumns[i]]) ) { message.error( columnsFormatConstraint[rowColumns[i]]?.content ? columnsFormatConstraint[ rowColumns[i] ]?.content.replace( '[VALUE]', row[rowColumns[i]] ) : locale2text.AntdTable[ locale ].columnEditableFormatConstraintMessage.replace( '[VALUE]', row[rowColumns[i]] ) ); // 提前终止函数 return; } } } // #93 找到发生编辑行为的字段dataIndex let _changedColumn = null; for (let i = 0; i < rowColumns.length; i++) { if (row[rowColumns[i]] !== item[rowColumns[i]]) { _changedColumn = rowColumns[i]; } } replaceItemByKey(newData, row.key, { ...item, ...row }); setDataSource(newData); setProps({ currentData: newData, // 忽略组件型字段键值对 recentlyChangedRow: omitBy(row, (value) => value?.$$typeof), recentlyChangedColumn: _changedColumn, data: newData, }); }; const save = async () => { try { const values = await form.validateFields(); toggleEdit(); handleSave( { ...record, ...values }, setProps, dataSource, setDataSource ); } catch (errInfo) { console.log(errInfo); } }; let childNode = children; if (editable) { const recordDisabled = ( columns.filter((e) => e.dataIndex === dataIndex)[0].editOptions ?.disabledKeys || [] ).includes(record.key); childNode = editing ? ( {columns.filter((e) => e.dataIndex === dataIndex)[0] .editOptions?.mode === 'text-area' ? ( e.dataIndex === dataIndex )[0].editOptions?.autoSize } maxLength={ columns.filter( (e) => e.dataIndex === dataIndex )[0].editOptions?.maxLength } placeholder={ columns.filter( (e) => e.dataIndex === dataIndex )[0].editOptions?.placeholder } ref={inputRef} onBlur={save} onFocus={() => { // 移动光标至内容末尾 inputRef.current?.focus({ cursor: 'end', }); }} disabled={recordDisabled} /> ) : ( e.dataIndex === dataIndex )[0].editOptions?.maxLength } placeholder={ columns.filter( (e) => e.dataIndex === dataIndex )[0].editOptions?.placeholder } ref={inputRef} onPressEnter={save} onBlur={save} disabled={recordDisabled} /> )} ) : (
{children[1] || children[1] === 0 ? children : ' '}
); } return {childNode}; }; // 数值比较函数 const compareNumeric = (x, y) => { if (x.value < y.value) { return -1; } else if (x.value > y.value) { return 1; } return 0; }; // 多模式值筛选选项自动生成策略 const generateFilterOptions = (inputData, columnDataIndex) => { let filterOptions = []; for (const item of inputData) { // 若当前记录不为数组 if ( (item[columnDataIndex] || item[columnDataIndex] === 0) && !Array.isArray(item[columnDataIndex]) ) { if (item[columnDataIndex]?.content) { filterOptions.push(item[columnDataIndex].content); } else if (item[columnDataIndex]?.text) { filterOptions.push(item[columnDataIndex].text); } else if (item[columnDataIndex]?.label) { filterOptions.push(item[columnDataIndex].label); } else if (item[columnDataIndex]?.tag) { filterOptions.push(item[columnDataIndex].tag); } else if (item[columnDataIndex]?.toString) { filterOptions.push(item[columnDataIndex]); } } else if (Array.isArray(item[columnDataIndex])) { // 若当前记录为数组,提取数组元素对象中存在的content或tag属性 if (item[columnDataIndex].some((_item) => _item?.content)) { filterOptions = filterOptions.concat( item[columnDataIndex] .filter((_item) => _item?.content) .map((_item) => _item.content) ); } else if (item[columnDataIndex].some((_item) => _item?.tag)) { filterOptions = filterOptions.concat( item[columnDataIndex] .filter((_item) => _item?.tag) .map((_item) => _item.tag) ); } } } // 将提取到的合法筛选值去重结构化并排序 return Array.from(new Set(filterOptions)) .map((value) => ({ text: value || value === 0 ? value.toString() : '', value: value, })) .sort(compareNumeric); }; // 处理可筛选特性 // 若为前端渲染模式,在filterOptions中每个字段filterCustomItems缺失的情况下 // 则会自动根据前端一次性加载的数据推算出所有添加过滤器字段的唯一值集合作为待选菜单 if (mode !== 'server-side') { // 为filterOptions.filterDataIndexes中定义的每个字段添加过滤功能 for (let i = 0; i < columns.length; i++) { // 若当前字段在filterOptions的keys()中 if ( Object.keys(filterOptions).indexOf(columns[i].dataIndex) !== -1 ) { // 若当前字段对应filterOptions子元素有filterMode.filterMode为'keyword' if ( filterOptions[columns[i].dataIndex].filterMode === 'keyword' ) { columns[i] = { ...columns[i], ...getColumnSearchProps( columns[i].dataIndex, columns[i].title ), }; } else if ( filterOptions[columns[i].dataIndex].filterMode === 'tree' ) { // 若当前字段筛选模式为'tree'模式 // 若当前字段对应filterOptions子元素下有filterCustomTreeItems属性 // 则为其添加自定义树形选项 if ( filterOptions[columns[i].dataIndex] .filterCustomTreeItems ) { columns[i] = { ...columns[i], defaultFilteredValue: defaultFilteredValues[columns[i].dataIndex], filterMode: 'tree', // 直接使用自定义树形筛选菜单结构 filters: filterOptions[columns[i].dataIndex] .filterCustomTreeItems, // 针对不同再渲染模式设计值筛选逻辑 onFilter: (value, record) => { // 仅支持非数组型合法输入值,对象型输入支持对content、text、label、tag属性进行值筛选 if ( (record[columns[i].dataIndex] || record[columns[i].dataIndex] === 0) && !Array.isArray(record[columns[i].dataIndex]) ) { // 判断当前记录是否有content属性 if (record[columns[i].dataIndex]?.content) { return ( record[columns[i].dataIndex] .content === value ); } else if ( record[columns[i].dataIndex]?.text ) { return ( record[columns[i].dataIndex] .text === value ); } else if ( record[columns[i].dataIndex]?.label ) { return ( record[columns[i].dataIndex] .label === value ); } else if ( record[columns[i].dataIndex]?.tag ) { return ( record[columns[i].dataIndex].tag === value ); } else if ( record[columns[i].dataIndex]?.toString ) { // 确保字符型、数值型均可稳定进行筛选 return ( record[ columns[i].dataIndex ].toString() === value.toString() ); } } else if ( Array.isArray(record[columns[i].dataIndex]) ) { // 若当前记录为数组,分别检查数组元素对象是否具有content、tag、title属性 if ( record[columns[i].dataIndex].some( (item) => item?.content ) ) { // 检查当前记录数组中是否至少有一个对象的content属性等于筛选值value return record[ columns[i].dataIndex ].some( (item) => item?.content .toString() .toLowerCase() === value?.toLowerCase() ); } else if ( record[columns[i].dataIndex].some( (item) => item?.tag ) ) { // 检查当前记录数组中是否至少有一个对象的tag属性命中关键词 return record[ columns[i].dataIndex ].some( (item) => item?.tag .toString() .toLowerCase() === value?.toLowerCase() ); } else if ( record[columns[i].dataIndex].some( (item) => item?.title ) ) { // 检查当前记录数组中是否至少有一个对象的title属性命中关键词 return record[ columns[i].dataIndex ].some( (item) => item?.title .toString() .toLowerCase() === value?.toLowerCase() ); } } return false; }, filterSearch: filterOptions[columns[i].dataIndex] .filterSearch, }; } } else { // 否则则一律视为'checkbox'模式 // 若当前字段对应filterOptions子元素下有filterCustomItems属性 // 则为其添加自定义选项 if (filterOptions[columns[i].dataIndex].filterCustomItems) { columns[i] = { ...columns[i], defaultFilteredValue: defaultFilteredValues[columns[i].dataIndex], filters: filterOptions[ columns[i].dataIndex ].filterCustomItems.map((value) => ({ text: value || value === 0 ? value.toString() : '', value: value, })), // 针对不同再渲染模式设计值筛选逻辑 onFilter: (value, record) => { // 仅支持非数组型合法输入值,对象型输入支持对content、text、label、tag属性进行值筛选 if ( (record[columns[i].dataIndex] || record[columns[i].dataIndex] === 0) && !Array.isArray(record[columns[i].dataIndex]) ) { // 判断当前记录是否有content属性 if (record[columns[i].dataIndex]?.content) { return ( record[columns[i].dataIndex] .content === value ); } else if ( record[columns[i].dataIndex]?.text ) { return ( record[columns[i].dataIndex] .text === value ); } else if ( record[columns[i].dataIndex]?.label ) { return ( record[columns[i].dataIndex] .label === value ); } else if ( record[columns[i].dataIndex]?.tag ) { return ( record[columns[i].dataIndex].tag === value ); } else if ( record[columns[i].dataIndex]?.toString ) { // 确保字符型、数值型均可稳定进行筛选 return ( record[ columns[i].dataIndex ].toString() === value.toString() ); } } else if ( Array.isArray(record[columns[i].dataIndex]) ) { // 若当前记录为数组,分别检查数组元素对象是否具有content、tag、title属性 if ( record[columns[i].dataIndex].some( (item) => item?.content ) ) { // 检查当前记录数组中是否至少有一个对象的content属性等于筛选值value return record[ columns[i].dataIndex ].some( (item) => item?.content .toString() .toLowerCase() === value?.toLowerCase() ); } else if ( record[columns[i].dataIndex].some( (item) => item?.tag ) ) { // 检查当前记录数组中是否至少有一个对象的tag属性命中关键词 return record[ columns[i].dataIndex ].some( (item) => item?.tag .toString() .toLowerCase() === value?.toLowerCase() ); } else if ( record[columns[i].dataIndex].some( (item) => item?.title ) ) { // 检查当前记录数组中是否至少有一个对象的title属性命中关键词 return record[ columns[i].dataIndex ].some( (item) => item?.title .toString() .toLowerCase() === value?.toLowerCase() ); } } return false; }, filterMultiple: filterOptions[columns[i].dataIndex] .filterMultiple, filterSearch: filterOptions[columns[i].dataIndex] .filterSearch, }; } else { // 否则自动基于数据中的唯一值生成选项列表 columns[i] = { ...columns[i], defaultFilteredValue: defaultFilteredValues[columns[i].dataIndex], filters: generateFilterOptions( data, columns[i].dataIndex ), // 针对不同再渲染模式设计值筛选逻辑 onFilter: (value, record) => { // 仅支持非数组型合法输入值,对象型输入支持对content、text、label、tag属性进行值筛选 if ( (record[columns[i].dataIndex] || record[columns[i].dataIndex] === 0) && !Array.isArray(record[columns[i].dataIndex]) ) { if (record[columns[i].dataIndex]?.content) { return ( record[columns[i].dataIndex] .content === value ); } else if ( record[columns[i].dataIndex]?.text ) { return ( record[columns[i].dataIndex] .text === value ); } else if ( record[columns[i].dataIndex]?.label ) { return ( record[columns[i].dataIndex] .label === value ); } else if ( record[columns[i].dataIndex]?.tag ) { return ( record[columns[i].dataIndex].tag === value ); } else if ( record[columns[i].dataIndex]?.toString ) { // 确保字符型、数值型均可稳定进行筛选 return ( record[ columns[i].dataIndex ].toString() === value.toString() ); } } else if ( Array.isArray(record[columns[i].dataIndex]) ) { // 若当前记录为数组,分别检查数组元素对象是否具有content、tag、title属性 if ( record[columns[i].dataIndex].some( (item) => item?.content ) ) { // 检查当前记录数组中是否至少有一个对象的content属性等于筛选值value return record[ columns[i].dataIndex ].some( (item) => item?.content .toString() .toLowerCase() === value?.toLowerCase() ); } else if ( record[columns[i].dataIndex].some( (item) => item?.tag ) ) { // 检查当前记录数组中是否至少有一个对象的tag属性命中关键词 return record[ columns[i].dataIndex ].some( (item) => item?.tag .toString() .toLowerCase() === value?.toLowerCase() ); } else if ( record[columns[i].dataIndex].some( (item) => item?.title ) ) { // 检查当前记录数组中是否至少有一个对象的title属性命中关键词 return record[ columns[i].dataIndex ].some( (item) => item?.title .toString() .toLowerCase() === value?.toLowerCase() ); } } return false; }, filterMultiple: filterOptions[columns[i].dataIndex] ?.filterMultiple, filterSearch: filterOptions[columns[i].dataIndex] ?.filterSearch, }; } } } } } else { // 否则在server-side模式下 // 为filterOptions.filterDataIndexes中定义的每个字段 // 添加简单值选择过滤功能 // 为filterOptions.filterDataIndexes中定义的每个字段添加过滤功能 for (let i = 0; i < columns.length; i++) { // 若当前字段在filterOptions的keys()中 if ( Object.keys(filterOptions).indexOf(columns[i].dataIndex) !== -1 ) { // 若当前字段对应filterOptions子元素有filterMode属性且filterMode属性为'keyword' if ( filterOptions[columns[i].dataIndex].filterMode === 'keyword' ) { columns[i] = { ...columns[i], ...getColumnSearchProps( columns[i].dataIndex, columns[i].title ), }; } else if ( filterOptions[columns[i].dataIndex].filterMode === 'tree' ) { // 若当前字段筛选模式为'tree'模式 // 若当前字段对应filterOptions子元素下有filterCustomTreeItems属性 // 则为其添加自定义树形选项 if ( filterOptions[columns[i].dataIndex] .filterCustomTreeItems ) { columns[i] = { ...columns[i], defaultFilteredValue: defaultFilteredValues[columns[i].dataIndex], filterMode: 'tree', filters: filterOptions[columns[i].dataIndex] .filterCustomTreeItems, onFilter: (value, record) => true, // 契合后端刷新模式 }; } else { columns[i] = { ...columns[i], filters: [], onFilter: (value, record) => true, }; } } else { // 否则则一律视为'checkbox'模式 // 若当前字段对应filterOptions子元素下有filterCustomItems属性 // 则为其添加自定义选项 if ( filterOptions[columns[i].dataIndex].hasOwnProperty( 'filterCustomItems' ) ) { columns[i] = { ...columns[i], defaultFilteredValue: defaultFilteredValues[columns[i].dataIndex], filters: filterOptions[ columns[i].dataIndex ].filterCustomItems.map((value) => ({ text: value || value === 0 ? value.toString() : '', value: value, })), onFilter: (value, record) => true, // 契合后端刷新模式 filterMultiple: filterOptions[columns[i].dataIndex] .filterMultiple, filterSearch: filterOptions[columns[i].dataIndex] .filterSearch, }; } else { columns[i] = { ...columns[i], filters: [], onFilter: (value, record) => true, }; } } } } } // 处理sortOptions参数的默认值问题 sortOptions = { sortDataIndexes: [], multiple: false, forceCompareModes: {}, customOrders: {}, ...sortOptions, }; // 配置字段排序参数 for (let i = 0; i < sortOptions.sortDataIndexes.length; i++) { for (let j = 0; j < columns.length; j++) { // 若sortOptions与data中本轮迭代到的dataIndex一致 if (sortOptions.sortDataIndexes[i] === columns[j].dataIndex) { // 根据是否组合排序模式来决定当前字段的排序参数设置 columns[j].sorter = { compare: (a, b) => { // 当渲染模式为server-side时,禁用前端排序操作 if (mode === 'server-side') { return 0; } // 初始化排序直接比较值 let valueA = null; let valueB = null; // 兼容各种具有单个值的再渲染模式,提取待比较的成对数据 if ( a[columns[j].dataIndex]?.content || b[columns[j].dataIndex]?.content ) { valueA = a[columns[j].dataIndex]?.content; valueB = b[columns[j].dataIndex]?.content; } else if ( a[columns[j].dataIndex]?.text || b[columns[j].dataIndex]?.text ) { valueA = a[columns[j].dataIndex]?.text; valueB = b[columns[j].dataIndex]?.text; } else if ( a[columns[j].dataIndex]?.label || b[columns[j].dataIndex]?.label ) { valueA = a[columns[j].dataIndex]?.label; valueB = b[columns[j].dataIndex]?.label; } else if ( a[columns[j].dataIndex]?.tag || b[columns[j].dataIndex]?.tag ) { valueA = a[columns[j].dataIndex]?.tag; valueB = b[columns[j].dataIndex]?.tag; } else if ( a[columns[j].dataIndex]?.toString || b[columns[j].dataIndex]?.toString ) { valueA = a[columns[j].dataIndex]; valueB = b[columns[j].dataIndex]; } // 根据valueA、valueB的数据类型返回不同逻辑的判断结果 // 若valueA、valueB至少有1个为数值型,则视作数值型比较 // 若当前字段使用了强制比较模式 if ( sortOptions.forceCompareModes[columns[j].dataIndex] ) { // 数值比较模式 if ( sortOptions.forceCompareModes[ columns[j].dataIndex ] === 'number' ) { // 强制转换比较值为数值型 const numberA = Number(valueA); const numberB = Number(valueB); if (numberA < numberB) { return -1; } else if (numberA > numberB) { return 1; } return 0; } else if ( sortOptions.forceCompareModes[ columns[j].dataIndex ] === 'custom' && sortOptions.customOrders[columns[j].dataIndex] ) { // 自定义顺序模式 // 查询比较值在对应的自定义顺序中的索引 const orderA = sortOptions.customOrders[ columns[j].dataIndex ].indexOf(valueA); const orderB = sortOptions.customOrders[ columns[j].dataIndex ].indexOf(valueB); if (orderA < orderB) { return 1; } else if (orderA > orderB) { return -1; } return 0; } } else { // 默认自动判断 if (isNumber(valueA) || isNumber(valueB)) { return valueA - valueB; } // 否则均视作字符型比较 const stringA = valueA?.toString().toUpperCase(); const stringB = valueB?.toString().toUpperCase(); if (stringA < stringB) { return -1; } else if (stringA > stringB) { return 1; } return 0; } }, multiple: sortOptions.multiple ? sortOptions.multiple === 'auto' ? 1 : sortOptions.sortDataIndexes.length - i : undefined, }; } } } // 配置各种再渲染模式 for (let i = 0; i < columns.length; i++) { // 当前字段具有renderOptions参数时且renderOptions参数是字典时 if (columns[i].renderOptions && columns[i].renderOptions.renderType) { // ellipsis模式 if (columns[i].renderOptions.renderType === 'ellipsis') { columns[i].ellipsis = { showTitle: false, }; columns[i].render = (content) => ( {content} ); } // row-merge模式 else if (columns[i].renderOptions.renderType === 'row-merge') { columns[i].render = (content, record, index) => { return { children: content.content, props: { rowSpan: content.rowSpan, }, }; }; } // link模式 else if (columns[i].renderOptions.renderType === 'link') { // 检查renderLinkText参数是否定义 if (columns[i].renderOptions.renderLinkText) { columns[i].render = (content) => { if ( (!content || isEmpty(content)) && content !== 0 && content !== '' ) { return null; } return columns[i].renderOptions.likeDccLink ? ( {content.content ? content.content : columns[i].renderOptions.renderLinkText} ) : ( {content.content ? content.content : columns[i].renderOptions.renderLinkText} ); }; } else { columns[i].render = (content) => { if ( (!content || isEmpty(content)) && content !== 0 && content !== '' ) { return null; } return columns[i].renderOptions.likeDccLink ? ( {content.content ? content.content : ' '} ) : ( {content.content ? content.content : ' '} ); }; } } // copyable模式 else if (columns[i].renderOptions.renderType === 'copyable') { columns[i].render = (content) => { if ( (!content || isEmpty(content)) && content !== 0 && content !== '' ) { return null; } return {content}; }; } // dropdown模式 else if (columns[i].renderOptions.renderType === 'dropdown') { columns[i].render = (menuItems, record) => { // 针对空值进行错误处理 menuItems = menuItems || []; return ( { setTimeout(function () { setProps({ nClicksDropdownItem: nClicksDropdownItem + 1, recentlyClickedDropdownItemTitle: item.key, recentlyDropdownItemClickedDataIndex: columns[i].dataIndex, // 忽略组件型字段键值对 recentlyDropdownItemClickedRow: omitBy( record, (value) => value?.$$typeof ), }); }, 200); }} > {menuItems.map((menuItem) => menuItem ? ( // 判断isDivider参数是否不为false menuItem.isDivider ? ( ) : ( )) } disabled={menuItem.disabled} key={menuItem.title} > {menuItem.title} ) ) : null )} } arrow={ columns[i].renderOptions?.dropdownProps?.arrow } disabled={ columns[i].renderOptions?.dropdownProps ?.disabled || menuItems.length === 0 } overlayClassName={ columns[i].renderOptions?.dropdownProps ?.overlayClassName } overlayStyle={ columns[i].renderOptions?.dropdownProps ?.overlayStyle } placement={ columns[i].renderOptions?.dropdownProps ?.placement } trigger={ columns[i].renderOptions?.dropdownProps?.trigger ? [ columns[i].renderOptions.dropdownProps .trigger, ] : ['hover'] } getPopupContainer={ containerId ? () => document.getElementById(containerId) ? document.getElementById( containerId ) : document.body : undefined } > e.preventDefault()} > {columns[i].renderOptions?.dropdownProps?.title}{' '} ); }; } // dropdown-links模式 else if (columns[i].renderOptions.renderType === 'dropdown-links') { columns[i].render = (menuItems) => { // 针对空值进行错误处理 menuItems = menuItems || []; return ( {menuItems.map((menuItem) => menuItem ? ( // 判断isDivider参数是否不为false menuItem.isDivider ? ( ) : ( )) } disabled={menuItem.disabled} key={menuItem.title} > {menuItem.title} ) ) : null )} } arrow={ columns[i].renderOptions?.dropdownProps?.arrow } disabled={ columns[i].renderOptions?.dropdownProps ?.disabled || menuItems.length === 0 } overlayClassName={ columns[i].renderOptions?.dropdownProps ?.overlayClassName } overlayStyle={ columns[i].renderOptions?.dropdownProps ?.overlayStyle } placement={ columns[i].renderOptions?.dropdownProps ?.placement } trigger={ columns[i].renderOptions?.dropdownProps?.trigger ? [ columns[i].renderOptions.dropdownProps .trigger, ] : ['hover'] } getPopupContainer={ containerId ? () => document.getElementById(containerId) ? document.getElementById( containerId ) : document.body : undefined } > e.preventDefault()} > {columns[i].renderOptions?.dropdownProps?.title}{' '} ); }; } // ellipsis-copyable模式 else if ( columns[i].renderOptions.renderType === 'ellipsis-copyable' ) { columns[i].ellipsis = { showTitle: false, }; columns[i].render = (content) => { if ( (!content || isEmpty(content)) && content !== 0 && content !== '' ) { return null; } return ( {content} ); }; } // corner-mark模式 else if (columns[i].renderOptions.renderType === 'corner-mark') { columns[i].render = (content) => { if ( (!content || isEmpty(content)) && content !== 0 && content !== '' ) { return null; } return (
{content.content}
); }; } // status-badge模式 else if (columns[i].renderOptions.renderType === 'status-badge') { columns[i].render = (content) => { if ( (!content || isEmpty(content)) && content !== 0 && content !== '' ) { return null; } return ( ); }; } // image模式 else if (columns[i].renderOptions.renderType === 'image') { columns[i].render = (content) => { if ( (!content || isEmpty(content)) && content !== 0 && content !== '' ) { return null; } return ( ); }; } // image-avatar模式 else if (columns[i].renderOptions.renderType === 'image-avatar') { columns[i].render = (content) => { if ( (!content || isEmpty(content)) && content !== 0 && content !== '' ) { return null; } return ( ); }; } // checkbox模式 else if (columns[i].renderOptions.renderType === 'checkbox') { columns[i].render = (content, record) => { const currentDataIndex = columns[i].dataIndex; return ( { // 修改对应行对应字段item.checked值 try { data.forEach(function (item, i) { // 命中后,修改值并利用错误抛出来跳出循环 if (item.key === record.key) { data[i][currentDataIndex] = { ...record[currentDataIndex], checked: e.target.checked, }; throw new Error('目标已修改'); } }); } catch (e) {} setTimeout(function () { setProps({ data: data, // 忽略组件型字段键值对 recentlyCheckedRow: omitBy( record, (value) => value?.$$typeof ), recentlyCheckedLabel: content.label, recentlyCheckedDataIndex: columns[i].dataIndex, recentlyCheckedStatus: e.target.checked, }); }, 200); }} > {content.label} ); }; } // switch模式 else if (columns[i].renderOptions.renderType === 'switch') { columns[i].render = (content, record) => { const currentDataIndex = columns[i].dataIndex; return ( { // 修改对应行对应字段item.checked值 try { data.forEach(function (item, i) { // 命中后,修改值并利用错误抛出来跳出循环 if (item.key === record.key) { data[i][currentDataIndex] = { ...record[currentDataIndex], checked: checked, }; throw new Error('目标已修改'); } }); } catch (e) {} setTimeout(function () { setProps({ data: data, // 忽略组件型字段键值对 recentlySwitchRow: omitBy( record, (value) => value?.$$typeof ), recentlySwitchDataIndex: columns[i].dataIndex, recentlySwitchStatus: checked, }); }, 200); }} /> ); }; } // select模式 else if (columns[i].renderOptions.renderType === 'select') { columns[i].render = (content, record) => { const currentDataIndex = columns[i].dataIndex; // 针对空值进行错误处理 content = content || {}; return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} styles={styles} classNames={classNames} key={key} placeholder={placeholder} autoComplete={autoComplete} defaultValue={ formId && (name || id) && enableBatchControl ? undefined : defaultValue } value={ formId && (name || id) && enableBatchControl ? currentFormValue : rawValue || value } size={ context && !isUndefined(context.componentSize) ? context.componentSize : size } addonBefore={addonBefore} addonAfter={addonAfter} prefix={prefix} suffix={suffix} allowClear={allowClear} autoFocus={autoFocus} variant={ !variant ? (bordered ? 'outlined' : 'borderless') : variant } disabled={ context && !isUndefined(context.componentDisabled) ? context.componentDisabled : disabled } maxLength={maxLength} status={status} readOnly={readOnly} onChange={(e) => { onChange(e); onDebounceChange(e.target.value); }} onPressEnter={onPressEnter} onFocus={() => setProps({ focusing: true })} onBlur={() => setProps({ focusing: false })} data-dash-is-loading={useLoading()} /> ); } else if (mode === 'search') { return ( k.startsWith('data-') || k.startsWith('aria-'), others )} id={id} className={ isString(className) ? className : className ? useCss(className) : undefined } style={style} styles={styles} classNames={classNames} key={key} placeholder={placeholder} autoComplete={autoComplete} size={ context && !isUndefined(context.componentSize) ? context.componentSize : size } addonBefore={addonBefore} prefix={prefix} suffix={suffix} allowClear={allowClear} autoFocus={autoFocus} variant={ !variant ? (bordered ? 'outlined' : 'borderless') : variant } defaultValue={ formId && (name || id) && enableBatchControl ? undefined : defaultValue } value={ formId && (name || id) && enableBatchControl ? currentFormValue : rawValue || value } disabled={ context && !isUndefined(context.componentDisabled) ? context.componentDisabled : disabled } maxLength={maxLength} status={status} readOnly={readOnly} onSearch={onSearch} onChange={(e) => { onChange(e); onDebounceChange(e.target.value); }} onPressEnter={onPressEnter} onFocus={() => setProps({ focusing: true })} onBlur={() => setProps({ focusing: false })} data-dash-is-loading={useLoading()} /> ); } else if (mode === 'text-area') { return (