@jiovan-labs/ant-buddy-pro 0.0.0-stage → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +21 -0
- package/README.md +55 -2
- package/dist/cjs/constant/DesignConst.d.ts +11 -0
- package/dist/cjs/constant/DesignConst.js +48 -0
- package/dist/cjs/constant/PackageConst.d.ts +3 -0
- package/dist/cjs/constant/PackageConst.js +31 -0
- package/dist/cjs/field/AvatarStamp/index.d.ts +14 -0
- package/dist/cjs/field/AvatarStamp/index.js +103 -0
- package/dist/cjs/field/AvatarStamp/styles.d.ts +2 -0
- package/dist/cjs/field/AvatarStamp/styles.js +54 -0
- package/dist/cjs/field/BadgeRibbon/index.d.ts +9 -0
- package/dist/cjs/field/BadgeRibbon/index.js +68 -0
- package/dist/cjs/field/BadgeRibbon/styles.d.ts +2 -0
- package/dist/cjs/field/BadgeRibbon/styles.js +55 -0
- package/dist/cjs/field/CommentCard/index.d.ts +12 -0
- package/dist/cjs/field/CommentCard/index.js +65 -0
- package/dist/cjs/field/CommentCard/styles.d.ts +2 -0
- package/dist/cjs/field/CommentCard/styles.js +132 -0
- package/dist/cjs/field/CompactTuple/index.d.ts +25 -0
- package/dist/cjs/field/CompactTuple/index.js +84 -0
- package/dist/cjs/field/CompactTuple/styles.d.ts +2 -0
- package/dist/cjs/field/CompactTuple/styles.js +118 -0
- package/dist/cjs/field/CornerStamp/index.d.ts +19 -0
- package/dist/cjs/field/CornerStamp/index.js +237 -0
- package/dist/cjs/field/CornerStamp/styles.d.ts +2 -0
- package/dist/cjs/field/CornerStamp/styles.js +66 -0
- package/dist/cjs/field/CountField/index.d.ts +25 -0
- package/dist/cjs/field/CountField/index.js +119 -0
- package/dist/cjs/field/CountField/styles.d.ts +2 -0
- package/dist/cjs/field/CountField/styles.js +58 -0
- package/dist/cjs/field/DelayModal/index.d.ts +32 -0
- package/dist/cjs/field/DelayModal/index.js +232 -0
- package/dist/cjs/field/DragModal/index.d.ts +7 -0
- package/dist/cjs/field/DragModal/index.js +151 -0
- package/dist/cjs/field/FallbackImage/index.d.ts +8 -0
- package/dist/cjs/field/FallbackImage/index.js +72 -0
- package/dist/cjs/field/Fullscreen/index.d.ts +24 -0
- package/dist/cjs/field/Fullscreen/index.js +95 -0
- package/dist/cjs/field/Fullscreen/locales.d.ts +2 -0
- package/dist/cjs/field/Fullscreen/locales.js +37 -0
- package/dist/cjs/field/LabelField/index.d.ts +26 -0
- package/dist/cjs/field/LabelField/index.js +100 -0
- package/dist/cjs/field/LabelField/styles.d.ts +2 -0
- package/dist/cjs/field/LabelField/styles.js +101 -0
- package/dist/cjs/field/NotifyBadge/index.d.ts +53 -0
- package/dist/cjs/field/NotifyBadge/index.js +203 -0
- package/dist/cjs/field/NotifyBadge/locales.d.ts +2 -0
- package/dist/cjs/field/NotifyBadge/locales.js +43 -0
- package/dist/cjs/field/NotifyBadge/styles.d.ts +2 -0
- package/dist/cjs/field/NotifyBadge/styles.js +163 -0
- package/dist/cjs/field/PreviewImage/index.d.ts +8 -0
- package/dist/cjs/field/PreviewImage/index.js +75 -0
- package/dist/cjs/field/RefreshImage/index.d.ts +20 -0
- package/dist/cjs/field/RefreshImage/index.js +105 -0
- package/dist/cjs/field/RefreshImage/locales.d.ts +2 -0
- package/dist/cjs/field/RefreshImage/locales.js +34 -0
- package/dist/cjs/field/RefreshImage/styles.d.ts +2 -0
- package/dist/cjs/field/RefreshImage/styles.js +50 -0
- package/dist/cjs/field/RemoteField/index.d.ts +17 -0
- package/dist/cjs/field/RemoteField/index.js +90 -0
- package/dist/cjs/field/SettingDrawer/index.d.ts +20 -0
- package/dist/cjs/field/SettingDrawer/index.js +115 -0
- package/dist/cjs/field/SettingDrawer/locales.d.ts +2 -0
- package/dist/cjs/field/SettingDrawer/locales.js +34 -0
- package/dist/cjs/field/SettingDrawer/styles.d.ts +2 -0
- package/dist/cjs/field/SettingDrawer/styles.js +61 -0
- package/dist/cjs/field/ThumbToggle/index.d.ts +43 -0
- package/dist/cjs/field/ThumbToggle/index.js +184 -0
- package/dist/cjs/field/ThumbToggle/locales.d.ts +2 -0
- package/dist/cjs/field/ThumbToggle/locales.js +40 -0
- package/dist/cjs/field/ThumbToggle/styles.d.ts +2 -0
- package/dist/cjs/field/ThumbToggle/styles.js +52 -0
- package/dist/cjs/field/ThumbTuple/index.d.ts +16 -0
- package/dist/cjs/field/ThumbTuple/index.js +110 -0
- package/dist/cjs/field/ThumbTuple/styles.d.ts +2 -0
- package/dist/cjs/field/ThumbTuple/styles.js +47 -0
- package/dist/cjs/field/TooltipField/index.d.ts +15 -0
- package/dist/cjs/field/TooltipField/index.js +57 -0
- package/dist/cjs/form/AddonInput/index.d.ts +15 -0
- package/dist/cjs/form/AddonInput/index.js +138 -0
- package/dist/cjs/form/AddonInput/styles.d.ts +2 -0
- package/dist/cjs/form/AddonInput/styles.js +106 -0
- package/dist/cjs/form/AvatarUpload/index.d.ts +68 -0
- package/dist/cjs/form/AvatarUpload/index.js +241 -0
- package/dist/cjs/form/AvatarUpload/locales.d.ts +2 -0
- package/dist/cjs/form/AvatarUpload/locales.js +46 -0
- package/dist/cjs/form/AvatarUpload/styles.d.ts +2 -0
- package/dist/cjs/form/AvatarUpload/styles.js +58 -0
- package/dist/cjs/form/CaptchaInput/index.d.ts +43 -0
- package/dist/cjs/form/CaptchaInput/index.js +219 -0
- package/dist/cjs/form/CaptchaInput/locales.d.ts +2 -0
- package/dist/cjs/form/CaptchaInput/locales.js +37 -0
- package/dist/cjs/form/CaptchaInput/styles.d.ts +2 -0
- package/dist/cjs/form/CaptchaInput/styles.js +56 -0
- package/dist/cjs/form/ChronoSelect/index.d.ts +25 -0
- package/dist/cjs/form/ChronoSelect/index.js +95 -0
- package/dist/cjs/form/ChronoSelect/locales.d.ts +2 -0
- package/dist/cjs/form/ChronoSelect/locales.js +58 -0
- package/dist/cjs/form/ChronoSelect/styles.d.ts +2 -0
- package/dist/cjs/form/ChronoSelect/styles.js +49 -0
- package/dist/cjs/form/ChronoTuple/index.d.ts +13 -0
- package/dist/cjs/form/ChronoTuple/index.js +102 -0
- package/dist/cjs/form/ChronoTuple/styles.d.ts +2 -0
- package/dist/cjs/form/ChronoTuple/styles.js +73 -0
- package/dist/cjs/form/CipherStrength/index.d.ts +32 -0
- package/dist/cjs/form/CipherStrength/index.js +119 -0
- package/dist/cjs/form/CipherStrength/locales.d.ts +2 -0
- package/dist/cjs/form/CipherStrength/locales.js +46 -0
- package/dist/cjs/form/CipherStrength/styles.d.ts +2 -0
- package/dist/cjs/form/CipherStrength/styles.js +66 -0
- package/dist/cjs/form/CollapseForm/index.d.ts +31 -0
- package/dist/cjs/form/CollapseForm/index.js +165 -0
- package/dist/cjs/form/CollapseForm/styles.d.ts +2 -0
- package/dist/cjs/form/CollapseForm/styles.js +60 -0
- package/dist/cjs/form/CronInput/component/DayPanel/index.d.ts +41 -0
- package/dist/cjs/form/CronInput/component/DayPanel/index.js +381 -0
- package/dist/cjs/form/CronInput/component/DayPanel/locales.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/DayPanel/locales.js +76 -0
- package/dist/cjs/form/CronInput/component/DayPanel/styles.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/DayPanel/styles.js +63 -0
- package/dist/cjs/form/CronInput/component/HourPanel/index.d.ts +29 -0
- package/dist/cjs/form/CronInput/component/HourPanel/index.js +284 -0
- package/dist/cjs/form/CronInput/component/HourPanel/locales.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/HourPanel/locales.js +55 -0
- package/dist/cjs/form/CronInput/component/HourPanel/styles.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/HourPanel/styles.js +63 -0
- package/dist/cjs/form/CronInput/component/MinutePanel/index.d.ts +29 -0
- package/dist/cjs/form/CronInput/component/MinutePanel/index.js +284 -0
- package/dist/cjs/form/CronInput/component/MinutePanel/locales.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/MinutePanel/locales.js +55 -0
- package/dist/cjs/form/CronInput/component/MinutePanel/styles.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/MinutePanel/styles.js +63 -0
- package/dist/cjs/form/CronInput/component/MonthPanel/index.d.ts +32 -0
- package/dist/cjs/form/CronInput/component/MonthPanel/index.js +341 -0
- package/dist/cjs/form/CronInput/component/MonthPanel/locales.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/MonthPanel/locales.js +58 -0
- package/dist/cjs/form/CronInput/component/MonthPanel/styles.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/MonthPanel/styles.js +63 -0
- package/dist/cjs/form/CronInput/component/SecondPanel/index.d.ts +29 -0
- package/dist/cjs/form/CronInput/component/SecondPanel/index.js +284 -0
- package/dist/cjs/form/CronInput/component/SecondPanel/locales.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/SecondPanel/locales.js +55 -0
- package/dist/cjs/form/CronInput/component/SecondPanel/styles.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/SecondPanel/styles.js +63 -0
- package/dist/cjs/form/CronInput/component/WeekPanel/index.d.ts +48 -0
- package/dist/cjs/form/CronInput/component/WeekPanel/index.js +506 -0
- package/dist/cjs/form/CronInput/component/WeekPanel/locales.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/WeekPanel/locales.js +94 -0
- package/dist/cjs/form/CronInput/component/WeekPanel/styles.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/WeekPanel/styles.js +52 -0
- package/dist/cjs/form/CronInput/component/YearPanel/index.d.ts +31 -0
- package/dist/cjs/form/CronInput/component/YearPanel/index.js +288 -0
- package/dist/cjs/form/CronInput/component/YearPanel/locales.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/YearPanel/locales.js +55 -0
- package/dist/cjs/form/CronInput/component/YearPanel/styles.d.ts +2 -0
- package/dist/cjs/form/CronInput/component/YearPanel/styles.js +63 -0
- package/dist/cjs/form/CronInput/context.d.ts +7 -0
- package/dist/cjs/form/CronInput/context.js +40 -0
- package/dist/cjs/form/CronInput/index.d.ts +61 -0
- package/dist/cjs/form/CronInput/index.js +600 -0
- package/dist/cjs/form/CronInput/locales.d.ts +2 -0
- package/dist/cjs/form/CronInput/locales.js +61 -0
- package/dist/cjs/form/CronInput/styles.d.ts +2 -0
- package/dist/cjs/form/CronInput/styles.js +96 -0
- package/dist/cjs/form/DivideSelect/index.d.ts +21 -0
- package/dist/cjs/form/DivideSelect/index.js +239 -0
- package/dist/cjs/form/DivideSelect/styles.d.ts +2 -0
- package/dist/cjs/form/DivideSelect/styles.js +73 -0
- package/dist/cjs/form/ExactInput/index.d.ts +23 -0
- package/dist/cjs/form/ExactInput/index.js +119 -0
- package/dist/cjs/form/ExactInput/locales.d.ts +2 -0
- package/dist/cjs/form/ExactInput/locales.js +34 -0
- package/dist/cjs/form/IconSelect/index.d.ts +50 -0
- package/dist/cjs/form/IconSelect/index.js +561 -0
- package/dist/cjs/form/IconSelect/locales.d.ts +2 -0
- package/dist/cjs/form/IconSelect/locales.js +61 -0
- package/dist/cjs/form/IconSelect/styles.d.ts +2 -0
- package/dist/cjs/form/IconSelect/styles.js +140 -0
- package/dist/cjs/form/LocaleInput/index.d.ts +47 -0
- package/dist/cjs/form/LocaleInput/index.js +439 -0
- package/dist/cjs/form/LocaleInput/locales.d.ts +2 -0
- package/dist/cjs/form/LocaleInput/locales.js +43 -0
- package/dist/cjs/form/LocaleInput/styles.d.ts +2 -0
- package/dist/cjs/form/LocaleInput/styles.js +134 -0
- package/dist/cjs/form/LocaleTextarea/index.d.ts +45 -0
- package/dist/cjs/form/LocaleTextarea/index.js +305 -0
- package/dist/cjs/form/LocaleTextarea/locales.d.ts +2 -0
- package/dist/cjs/form/LocaleTextarea/locales.js +34 -0
- package/dist/cjs/form/LocaleTextarea/styles.d.ts +2 -0
- package/dist/cjs/form/LocaleTextarea/styles.js +89 -0
- package/dist/cjs/form/MaskInput/index.d.ts +9 -0
- package/dist/cjs/form/MaskInput/index.js +128 -0
- package/dist/cjs/form/MathInput/index.d.ts +26 -0
- package/dist/cjs/form/MathInput/index.js +192 -0
- package/dist/cjs/form/MathInput/locales.d.ts +2 -0
- package/dist/cjs/form/MathInput/locales.js +34 -0
- package/dist/cjs/form/MathInput/styles.d.ts +2 -0
- package/dist/cjs/form/MathInput/styles.js +71 -0
- package/dist/cjs/form/SegmentRadio/index.d.ts +16 -0
- package/dist/cjs/form/SegmentRadio/index.js +116 -0
- package/dist/cjs/form/ServerTuple/index.d.ts +22 -0
- package/dist/cjs/form/ServerTuple/index.js +141 -0
- package/dist/cjs/form/ServerTuple/locales.d.ts +2 -0
- package/dist/cjs/form/ServerTuple/locales.js +37 -0
- package/dist/cjs/form/ServerTuple/styles.d.ts +2 -0
- package/dist/cjs/form/ServerTuple/styles.js +84 -0
- package/dist/cjs/form/SortableList/index.d.ts +17 -0
- package/dist/cjs/form/SortableList/index.js +153 -0
- package/dist/cjs/form/SortableList/locales.d.ts +2 -0
- package/dist/cjs/form/SortableList/locales.js +43 -0
- package/dist/cjs/form/SortableList/styles.d.ts +2 -0
- package/dist/cjs/form/SortableList/styles.js +58 -0
- package/dist/cjs/form/StretchInput/index.d.ts +16 -0
- package/dist/cjs/form/StretchInput/index.js +139 -0
- package/dist/cjs/form/StretchInput/styles.d.ts +2 -0
- package/dist/cjs/form/StretchInput/styles.js +49 -0
- package/dist/cjs/form/TagInput/index.d.ts +57 -0
- package/dist/cjs/form/TagInput/index.js +368 -0
- package/dist/cjs/form/TagInput/locales.d.ts +2 -0
- package/dist/cjs/form/TagInput/locales.js +34 -0
- package/dist/cjs/form/TagInput/styles.d.ts +2 -0
- package/dist/cjs/form/TagInput/styles.js +80 -0
- package/dist/cjs/global.d.ts +20 -0
- package/dist/cjs/index.d.ts +73 -0
- package/dist/cjs/index.js +243 -0
- package/dist/cjs/layout/ApartTitle/index.d.ts +19 -0
- package/dist/cjs/layout/ApartTitle/index.js +75 -0
- package/dist/cjs/layout/ApartTitle/styles.d.ts +2 -0
- package/dist/cjs/layout/ApartTitle/styles.js +96 -0
- package/dist/cjs/layout/BorderBox/index.d.ts +16 -0
- package/dist/cjs/layout/BorderBox/index.js +86 -0
- package/dist/cjs/layout/BorderBox/styles.d.ts +2 -0
- package/dist/cjs/layout/BorderBox/styles.js +75 -0
- package/dist/cjs/layout/CardTabs/index.d.ts +19 -0
- package/dist/cjs/layout/CardTabs/index.js +79 -0
- package/dist/cjs/layout/CardTabs/styles.d.ts +2 -0
- package/dist/cjs/layout/CardTabs/styles.js +210 -0
- package/dist/cjs/layout/CodePreview/index.d.ts +25 -0
- package/dist/cjs/layout/CodePreview/index.js +79 -0
- package/dist/cjs/layout/CodePreview/styles.d.ts +2 -0
- package/dist/cjs/layout/CodePreview/styles.js +125 -0
- package/dist/cjs/layout/FlexBox/index.d.ts +23 -0
- package/dist/cjs/layout/FlexBox/index.js +96 -0
- package/dist/cjs/layout/FlexBox/styles.d.ts +2 -0
- package/dist/cjs/layout/FlexBox/styles.js +57 -0
- package/dist/cjs/layout/FoldSection/index.d.ts +36 -0
- package/dist/cjs/layout/FoldSection/index.js +124 -0
- package/dist/cjs/layout/FoldSection/locales.d.ts +2 -0
- package/dist/cjs/layout/FoldSection/locales.js +37 -0
- package/dist/cjs/layout/FoldSection/styles.d.ts +2 -0
- package/dist/cjs/layout/FoldSection/styles.js +141 -0
- package/dist/cjs/layout/LoginPortal/index.d.ts +21 -0
- package/dist/cjs/layout/LoginPortal/index.js +57 -0
- package/dist/cjs/layout/LoginPortal/styles.d.ts +2 -0
- package/dist/cjs/layout/LoginPortal/styles.js +73 -0
- package/dist/cjs/layout/MenuTabs/index.d.ts +38 -0
- package/dist/cjs/layout/MenuTabs/index.js +158 -0
- package/dist/cjs/layout/MenuTabs/styles.d.ts +2 -0
- package/dist/cjs/layout/MenuTabs/styles.js +159 -0
- package/dist/cjs/layout/PageFooter/index.d.ts +32 -0
- package/dist/cjs/layout/PageFooter/index.js +96 -0
- package/dist/cjs/layout/PageFooter/styles.d.ts +2 -0
- package/dist/cjs/layout/PageFooter/styles.js +82 -0
- package/dist/cjs/layout/SectionTitle/index.d.ts +19 -0
- package/dist/cjs/layout/SectionTitle/index.js +75 -0
- package/dist/cjs/layout/SectionTitle/styles.d.ts +2 -0
- package/dist/cjs/layout/SectionTitle/styles.js +130 -0
- package/dist/cjs/layout/SpaceBox/index.d.ts +11 -0
- package/dist/cjs/layout/SpaceBox/index.js +88 -0
- package/dist/cjs/layout/SpaceBox/styles.d.ts +2 -0
- package/dist/cjs/layout/SpaceBox/styles.js +58 -0
- package/dist/cjs/render/SchemaRender.d.ts +22 -0
- package/dist/cjs/render/SchemaRender.js +268 -0
- package/dist/cjs/render/SelectRender.d.ts +6 -0
- package/dist/cjs/render/SelectRender.js +57 -0
- package/dist/cjs/render/TooltipRender.d.ts +5 -0
- package/dist/cjs/render/TooltipRender.js +51 -0
- package/dist/cjs/style/calendar/default.less +85 -0
- package/dist/cjs/style/color/gray.less +50 -0
- package/dist/cjs/style/keepalive/tabs.less +49 -0
- package/dist/cjs/style/scrollbar/gray.less +64 -0
- package/dist/cjs/type/declaration.d.ts +16 -0
- package/dist/cjs/type/declaration.js +17 -0
- package/dist/cjs/type/design-icon.d.ts +31 -0
- package/dist/cjs/type/design-icon.js +986 -0
- package/dist/cjs/type/design-token.d.ts +5 -0
- package/dist/cjs/type/design-token.js +17 -0
- package/dist/cjs/util/ChildUtils.d.ts +4 -0
- package/dist/cjs/util/ChildUtils.js +80 -0
- package/dist/cjs/util/ConsoleUtils.d.ts +7 -0
- package/dist/cjs/util/ConsoleUtils.js +203 -0
- package/dist/cjs/util/DatasetUtils.d.ts +5 -0
- package/dist/cjs/util/DatasetUtils.js +69 -0
- package/dist/cjs/util/DesignUtils.d.ts +6 -0
- package/dist/cjs/util/DesignUtils.js +161 -0
- package/dist/cjs/util/ElementUtils.d.ts +6 -0
- package/dist/cjs/util/ElementUtils.js +98 -0
- package/dist/cjs/util/FieldUtils.d.ts +7 -0
- package/dist/cjs/util/FieldUtils.js +105 -0
- package/dist/cjs/util/FileUtils.d.ts +6 -0
- package/dist/cjs/util/FileUtils.js +64 -0
- package/dist/cjs/util/IconUtils.d.ts +11 -0
- package/dist/cjs/util/IconUtils.js +231 -0
- package/dist/cjs/util/ImageUtils.d.ts +3 -0
- package/dist/cjs/util/ImageUtils.js +54 -0
- package/dist/cjs/util/ModalUtils.d.ts +8 -0
- package/dist/cjs/util/ModalUtils.js +87 -0
- package/dist/cjs/util/NodeUtils.d.ts +5 -0
- package/dist/cjs/util/NodeUtils.js +88 -0
- package/dist/cjs/util/PaginationUtils.d.ts +5 -0
- package/dist/cjs/util/PaginationUtils.js +67 -0
- package/dist/cjs/util/ParticleUtils.d.ts +6 -0
- package/dist/cjs/util/ParticleUtils.js +410 -0
- package/dist/cjs/util/PropUtils.d.ts +5 -0
- package/dist/cjs/util/PropUtils.js +86 -0
- package/dist/cjs/util/ReactUtils.d.ts +3 -0
- package/dist/cjs/util/ReactUtils.js +55 -0
- package/dist/cjs/util/StyleUtils.d.ts +12 -0
- package/dist/cjs/util/StyleUtils.js +178 -0
- package/dist/cjs/util/TriggerUtils.d.ts +3 -0
- package/dist/cjs/util/TriggerUtils.js +76 -0
- package/dist/esm/constant/DesignConst.d.ts +11 -0
- package/dist/esm/constant/DesignConst.js +27 -0
- package/dist/esm/constant/PackageConst.d.ts +3 -0
- package/dist/esm/constant/PackageConst.js +11 -0
- package/dist/esm/field/AvatarStamp/index.d.ts +14 -0
- package/dist/esm/field/AvatarStamp/index.js +72 -0
- package/dist/esm/field/AvatarStamp/styles.d.ts +2 -0
- package/dist/esm/field/AvatarStamp/styles.js +28 -0
- package/dist/esm/field/BadgeRibbon/index.d.ts +9 -0
- package/dist/esm/field/BadgeRibbon/index.js +31 -0
- package/dist/esm/field/BadgeRibbon/styles.d.ts +2 -0
- package/dist/esm/field/BadgeRibbon/styles.js +26 -0
- package/dist/esm/field/CommentCard/index.d.ts +12 -0
- package/dist/esm/field/CommentCard/index.js +58 -0
- package/dist/esm/field/CommentCard/styles.d.ts +2 -0
- package/dist/esm/field/CommentCard/styles.js +85 -0
- package/dist/esm/field/CompactTuple/index.d.ts +25 -0
- package/dist/esm/field/CompactTuple/index.js +62 -0
- package/dist/esm/field/CompactTuple/styles.d.ts +2 -0
- package/dist/esm/field/CompactTuple/styles.js +66 -0
- package/dist/esm/field/CornerStamp/index.d.ts +19 -0
- package/dist/esm/field/CornerStamp/index.js +212 -0
- package/dist/esm/field/CornerStamp/styles.d.ts +2 -0
- package/dist/esm/field/CornerStamp/styles.js +38 -0
- package/dist/esm/field/CountField/index.d.ts +25 -0
- package/dist/esm/field/CountField/index.js +94 -0
- package/dist/esm/field/CountField/styles.d.ts +2 -0
- package/dist/esm/field/CountField/styles.js +30 -0
- package/dist/esm/field/DelayModal/index.d.ts +32 -0
- package/dist/esm/field/DelayModal/index.js +222 -0
- package/dist/esm/field/DragModal/index.d.ts +7 -0
- package/dist/esm/field/DragModal/index.js +137 -0
- package/dist/esm/field/FallbackImage/index.d.ts +8 -0
- package/dist/esm/field/FallbackImage/index.js +55 -0
- package/dist/esm/field/Fullscreen/index.d.ts +24 -0
- package/dist/esm/field/Fullscreen/index.js +74 -0
- package/dist/esm/field/Fullscreen/locales.d.ts +2 -0
- package/dist/esm/field/Fullscreen/locales.js +2 -0
- package/dist/esm/field/LabelField/index.d.ts +26 -0
- package/dist/esm/field/LabelField/index.js +61 -0
- package/dist/esm/field/LabelField/styles.d.ts +2 -0
- package/dist/esm/field/LabelField/styles.js +60 -0
- package/dist/esm/field/NotifyBadge/index.d.ts +53 -0
- package/dist/esm/field/NotifyBadge/index.js +212 -0
- package/dist/esm/field/NotifyBadge/locales.d.ts +2 -0
- package/dist/esm/field/NotifyBadge/locales.js +2 -0
- package/dist/esm/field/NotifyBadge/styles.d.ts +2 -0
- package/dist/esm/field/NotifyBadge/styles.js +106 -0
- package/dist/esm/field/PreviewImage/index.d.ts +8 -0
- package/dist/esm/field/PreviewImage/index.js +57 -0
- package/dist/esm/field/RefreshImage/index.d.ts +20 -0
- package/dist/esm/field/RefreshImage/index.js +89 -0
- package/dist/esm/field/RefreshImage/locales.d.ts +2 -0
- package/dist/esm/field/RefreshImage/locales.js +2 -0
- package/dist/esm/field/RefreshImage/styles.d.ts +2 -0
- package/dist/esm/field/RefreshImage/styles.js +24 -0
- package/dist/esm/field/RemoteField/index.d.ts +17 -0
- package/dist/esm/field/RemoteField/index.js +68 -0
- package/dist/esm/field/SettingDrawer/index.d.ts +20 -0
- package/dist/esm/field/SettingDrawer/index.js +76 -0
- package/dist/esm/field/SettingDrawer/locales.d.ts +2 -0
- package/dist/esm/field/SettingDrawer/locales.js +2 -0
- package/dist/esm/field/SettingDrawer/styles.d.ts +2 -0
- package/dist/esm/field/SettingDrawer/styles.js +33 -0
- package/dist/esm/field/ThumbToggle/index.d.ts +43 -0
- package/dist/esm/field/ThumbToggle/index.js +217 -0
- package/dist/esm/field/ThumbToggle/locales.d.ts +2 -0
- package/dist/esm/field/ThumbToggle/locales.js +2 -0
- package/dist/esm/field/ThumbToggle/styles.d.ts +2 -0
- package/dist/esm/field/ThumbToggle/styles.js +24 -0
- package/dist/esm/field/ThumbTuple/index.d.ts +16 -0
- package/dist/esm/field/ThumbTuple/index.js +105 -0
- package/dist/esm/field/ThumbTuple/styles.d.ts +2 -0
- package/dist/esm/field/ThumbTuple/styles.js +22 -0
- package/dist/esm/field/TooltipField/index.d.ts +15 -0
- package/dist/esm/field/TooltipField/index.js +29 -0
- package/dist/esm/form/AddonInput/index.d.ts +15 -0
- package/dist/esm/form/AddonInput/index.js +144 -0
- package/dist/esm/form/AddonInput/styles.d.ts +2 -0
- package/dist/esm/form/AddonInput/styles.js +67 -0
- package/dist/esm/form/AvatarUpload/index.d.ts +68 -0
- package/dist/esm/form/AvatarUpload/index.js +235 -0
- package/dist/esm/form/AvatarUpload/locales.d.ts +2 -0
- package/dist/esm/form/AvatarUpload/locales.js +2 -0
- package/dist/esm/form/AvatarUpload/styles.d.ts +2 -0
- package/dist/esm/form/AvatarUpload/styles.js +29 -0
- package/dist/esm/form/CaptchaInput/index.d.ts +43 -0
- package/dist/esm/form/CaptchaInput/index.js +287 -0
- package/dist/esm/form/CaptchaInput/locales.d.ts +2 -0
- package/dist/esm/form/CaptchaInput/locales.js +2 -0
- package/dist/esm/form/CaptchaInput/styles.d.ts +2 -0
- package/dist/esm/form/CaptchaInput/styles.js +29 -0
- package/dist/esm/form/ChronoSelect/index.d.ts +25 -0
- package/dist/esm/form/ChronoSelect/index.js +62 -0
- package/dist/esm/form/ChronoSelect/locales.d.ts +2 -0
- package/dist/esm/form/ChronoSelect/locales.js +2 -0
- package/dist/esm/form/ChronoSelect/styles.d.ts +2 -0
- package/dist/esm/form/ChronoSelect/styles.js +22 -0
- package/dist/esm/form/ChronoTuple/index.d.ts +13 -0
- package/dist/esm/form/ChronoTuple/index.js +62 -0
- package/dist/esm/form/ChronoTuple/styles.d.ts +2 -0
- package/dist/esm/form/ChronoTuple/styles.js +37 -0
- package/dist/esm/form/CipherStrength/index.d.ts +32 -0
- package/dist/esm/form/CipherStrength/index.js +73 -0
- package/dist/esm/form/CipherStrength/locales.d.ts +2 -0
- package/dist/esm/form/CipherStrength/locales.js +2 -0
- package/dist/esm/form/CipherStrength/styles.d.ts +2 -0
- package/dist/esm/form/CipherStrength/styles.js +34 -0
- package/dist/esm/form/CollapseForm/index.d.ts +31 -0
- package/dist/esm/form/CollapseForm/index.js +176 -0
- package/dist/esm/form/CollapseForm/styles.d.ts +2 -0
- package/dist/esm/form/CollapseForm/styles.js +28 -0
- package/dist/esm/form/CronInput/component/DayPanel/index.d.ts +41 -0
- package/dist/esm/form/CronInput/component/DayPanel/index.js +374 -0
- package/dist/esm/form/CronInput/component/DayPanel/locales.d.ts +2 -0
- package/dist/esm/form/CronInput/component/DayPanel/locales.js +2 -0
- package/dist/esm/form/CronInput/component/DayPanel/styles.d.ts +2 -0
- package/dist/esm/form/CronInput/component/DayPanel/styles.js +31 -0
- package/dist/esm/form/CronInput/component/HourPanel/index.d.ts +29 -0
- package/dist/esm/form/CronInput/component/HourPanel/index.js +271 -0
- package/dist/esm/form/CronInput/component/HourPanel/locales.d.ts +2 -0
- package/dist/esm/form/CronInput/component/HourPanel/locales.js +2 -0
- package/dist/esm/form/CronInput/component/HourPanel/styles.d.ts +2 -0
- package/dist/esm/form/CronInput/component/HourPanel/styles.js +31 -0
- package/dist/esm/form/CronInput/component/MinutePanel/index.d.ts +29 -0
- package/dist/esm/form/CronInput/component/MinutePanel/index.js +271 -0
- package/dist/esm/form/CronInput/component/MinutePanel/locales.d.ts +2 -0
- package/dist/esm/form/CronInput/component/MinutePanel/locales.js +2 -0
- package/dist/esm/form/CronInput/component/MinutePanel/styles.d.ts +2 -0
- package/dist/esm/form/CronInput/component/MinutePanel/styles.js +31 -0
- package/dist/esm/form/CronInput/component/MonthPanel/index.d.ts +32 -0
- package/dist/esm/form/CronInput/component/MonthPanel/index.js +318 -0
- package/dist/esm/form/CronInput/component/MonthPanel/locales.d.ts +2 -0
- package/dist/esm/form/CronInput/component/MonthPanel/locales.js +2 -0
- package/dist/esm/form/CronInput/component/MonthPanel/styles.d.ts +2 -0
- package/dist/esm/form/CronInput/component/MonthPanel/styles.js +31 -0
- package/dist/esm/form/CronInput/component/SecondPanel/index.d.ts +29 -0
- package/dist/esm/form/CronInput/component/SecondPanel/index.js +271 -0
- package/dist/esm/form/CronInput/component/SecondPanel/locales.d.ts +2 -0
- package/dist/esm/form/CronInput/component/SecondPanel/locales.js +2 -0
- package/dist/esm/form/CronInput/component/SecondPanel/styles.d.ts +2 -0
- package/dist/esm/form/CronInput/component/SecondPanel/styles.js +31 -0
- package/dist/esm/form/CronInput/component/WeekPanel/index.d.ts +48 -0
- package/dist/esm/form/CronInput/component/WeekPanel/index.js +483 -0
- package/dist/esm/form/CronInput/component/WeekPanel/locales.d.ts +2 -0
- package/dist/esm/form/CronInput/component/WeekPanel/locales.js +2 -0
- package/dist/esm/form/CronInput/component/WeekPanel/styles.d.ts +2 -0
- package/dist/esm/form/CronInput/component/WeekPanel/styles.js +23 -0
- package/dist/esm/form/CronInput/component/YearPanel/index.d.ts +31 -0
- package/dist/esm/form/CronInput/component/YearPanel/index.js +277 -0
- package/dist/esm/form/CronInput/component/YearPanel/locales.d.ts +2 -0
- package/dist/esm/form/CronInput/component/YearPanel/locales.js +2 -0
- package/dist/esm/form/CronInput/component/YearPanel/styles.d.ts +2 -0
- package/dist/esm/form/CronInput/component/YearPanel/styles.js +31 -0
- package/dist/esm/form/CronInput/context.d.ts +7 -0
- package/dist/esm/form/CronInput/context.js +2 -0
- package/dist/esm/form/CronInput/index.d.ts +61 -0
- package/dist/esm/form/CronInput/index.js +608 -0
- package/dist/esm/form/CronInput/locales.d.ts +2 -0
- package/dist/esm/form/CronInput/locales.js +2 -0
- package/dist/esm/form/CronInput/styles.d.ts +2 -0
- package/dist/esm/form/CronInput/styles.js +58 -0
- package/dist/esm/form/DivideSelect/index.d.ts +21 -0
- package/dist/esm/form/DivideSelect/index.js +234 -0
- package/dist/esm/form/DivideSelect/styles.d.ts +2 -0
- package/dist/esm/form/DivideSelect/styles.js +37 -0
- package/dist/esm/form/ExactInput/index.d.ts +23 -0
- package/dist/esm/form/ExactInput/index.js +95 -0
- package/dist/esm/form/ExactInput/locales.d.ts +2 -0
- package/dist/esm/form/ExactInput/locales.js +2 -0
- package/dist/esm/form/IconSelect/index.d.ts +50 -0
- package/dist/esm/form/IconSelect/index.js +601 -0
- package/dist/esm/form/IconSelect/locales.d.ts +2 -0
- package/dist/esm/form/IconSelect/locales.js +2 -0
- package/dist/esm/form/IconSelect/styles.d.ts +2 -0
- package/dist/esm/form/IconSelect/styles.js +91 -0
- package/dist/esm/form/LocaleInput/index.d.ts +47 -0
- package/dist/esm/form/LocaleInput/index.js +482 -0
- package/dist/esm/form/LocaleInput/locales.d.ts +2 -0
- package/dist/esm/form/LocaleInput/locales.js +2 -0
- package/dist/esm/form/LocaleInput/styles.d.ts +2 -0
- package/dist/esm/form/LocaleInput/styles.js +82 -0
- package/dist/esm/form/LocaleTextarea/index.d.ts +45 -0
- package/dist/esm/form/LocaleTextarea/index.js +295 -0
- package/dist/esm/form/LocaleTextarea/locales.d.ts +2 -0
- package/dist/esm/form/LocaleTextarea/locales.js +2 -0
- package/dist/esm/form/LocaleTextarea/styles.d.ts +2 -0
- package/dist/esm/form/LocaleTextarea/styles.js +45 -0
- package/dist/esm/form/MaskInput/index.d.ts +9 -0
- package/dist/esm/form/MaskInput/index.js +101 -0
- package/dist/esm/form/MathInput/index.d.ts +26 -0
- package/dist/esm/form/MathInput/index.js +183 -0
- package/dist/esm/form/MathInput/locales.d.ts +2 -0
- package/dist/esm/form/MathInput/locales.js +2 -0
- package/dist/esm/form/MathInput/styles.d.ts +2 -0
- package/dist/esm/form/MathInput/styles.js +41 -0
- package/dist/esm/form/SegmentRadio/index.d.ts +16 -0
- package/dist/esm/form/SegmentRadio/index.js +100 -0
- package/dist/esm/form/ServerTuple/index.d.ts +22 -0
- package/dist/esm/form/ServerTuple/index.js +97 -0
- package/dist/esm/form/ServerTuple/locales.d.ts +2 -0
- package/dist/esm/form/ServerTuple/locales.js +2 -0
- package/dist/esm/form/ServerTuple/styles.d.ts +2 -0
- package/dist/esm/form/ServerTuple/styles.js +44 -0
- package/dist/esm/form/SortableList/index.d.ts +17 -0
- package/dist/esm/form/SortableList/index.js +103 -0
- package/dist/esm/form/SortableList/locales.d.ts +2 -0
- package/dist/esm/form/SortableList/locales.js +2 -0
- package/dist/esm/form/SortableList/styles.d.ts +2 -0
- package/dist/esm/form/SortableList/styles.js +27 -0
- package/dist/esm/form/StretchInput/index.d.ts +16 -0
- package/dist/esm/form/StretchInput/index.js +111 -0
- package/dist/esm/form/StretchInput/styles.d.ts +2 -0
- package/dist/esm/form/StretchInput/styles.js +22 -0
- package/dist/esm/form/TagInput/index.d.ts +57 -0
- package/dist/esm/form/TagInput/index.js +425 -0
- package/dist/esm/form/TagInput/locales.d.ts +2 -0
- package/dist/esm/form/TagInput/locales.js +2 -0
- package/dist/esm/form/TagInput/styles.d.ts +2 -0
- package/dist/esm/form/TagInput/styles.js +42 -0
- package/dist/esm/global.d.ts +20 -0
- package/dist/esm/index.d.ts +73 -0
- package/dist/esm/index.js +73 -0
- package/dist/esm/layout/ApartTitle/index.d.ts +19 -0
- package/dist/esm/layout/ApartTitle/index.js +36 -0
- package/dist/esm/layout/ApartTitle/styles.d.ts +2 -0
- package/dist/esm/layout/ApartTitle/styles.js +58 -0
- package/dist/esm/layout/BorderBox/index.d.ts +16 -0
- package/dist/esm/layout/BorderBox/index.js +52 -0
- package/dist/esm/layout/BorderBox/styles.d.ts +2 -0
- package/dist/esm/layout/BorderBox/styles.js +42 -0
- package/dist/esm/layout/CardTabs/index.d.ts +19 -0
- package/dist/esm/layout/CardTabs/index.js +54 -0
- package/dist/esm/layout/CardTabs/styles.d.ts +2 -0
- package/dist/esm/layout/CardTabs/styles.js +128 -0
- package/dist/esm/layout/CodePreview/index.d.ts +25 -0
- package/dist/esm/layout/CodePreview/index.js +54 -0
- package/dist/esm/layout/CodePreview/styles.d.ts +2 -0
- package/dist/esm/layout/CodePreview/styles.js +80 -0
- package/dist/esm/layout/FlexBox/index.d.ts +23 -0
- package/dist/esm/layout/FlexBox/index.js +69 -0
- package/dist/esm/layout/FlexBox/styles.d.ts +2 -0
- package/dist/esm/layout/FlexBox/styles.js +29 -0
- package/dist/esm/layout/FoldSection/index.d.ts +36 -0
- package/dist/esm/layout/FoldSection/index.js +121 -0
- package/dist/esm/layout/FoldSection/locales.d.ts +2 -0
- package/dist/esm/layout/FoldSection/locales.js +2 -0
- package/dist/esm/layout/FoldSection/styles.d.ts +2 -0
- package/dist/esm/layout/FoldSection/styles.js +85 -0
- package/dist/esm/layout/LoginPortal/index.d.ts +21 -0
- package/dist/esm/layout/LoginPortal/index.js +31 -0
- package/dist/esm/layout/LoginPortal/styles.d.ts +2 -0
- package/dist/esm/layout/LoginPortal/styles.js +44 -0
- package/dist/esm/layout/MenuTabs/index.d.ts +38 -0
- package/dist/esm/layout/MenuTabs/index.js +125 -0
- package/dist/esm/layout/MenuTabs/styles.d.ts +2 -0
- package/dist/esm/layout/MenuTabs/styles.js +99 -0
- package/dist/esm/layout/PageFooter/index.d.ts +32 -0
- package/dist/esm/layout/PageFooter/index.js +77 -0
- package/dist/esm/layout/PageFooter/styles.d.ts +2 -0
- package/dist/esm/layout/PageFooter/styles.js +44 -0
- package/dist/esm/layout/SectionTitle/index.d.ts +19 -0
- package/dist/esm/layout/SectionTitle/index.js +36 -0
- package/dist/esm/layout/SectionTitle/styles.d.ts +2 -0
- package/dist/esm/layout/SectionTitle/styles.js +81 -0
- package/dist/esm/layout/SpaceBox/index.d.ts +11 -0
- package/dist/esm/layout/SpaceBox/index.js +68 -0
- package/dist/esm/layout/SpaceBox/styles.d.ts +2 -0
- package/dist/esm/layout/SpaceBox/styles.js +30 -0
- package/dist/esm/render/SchemaRender.d.ts +22 -0
- package/dist/esm/render/SchemaRender.js +162 -0
- package/dist/esm/render/SelectRender.d.ts +6 -0
- package/dist/esm/render/SelectRender.js +56 -0
- package/dist/esm/render/TooltipRender.d.ts +5 -0
- package/dist/esm/render/TooltipRender.js +30 -0
- package/dist/esm/style/calendar/default.less +85 -0
- package/dist/esm/style/color/gray.less +50 -0
- package/dist/esm/style/keepalive/tabs.less +49 -0
- package/dist/esm/style/scrollbar/gray.less +64 -0
- package/dist/esm/type/declaration.d.ts +16 -0
- package/dist/esm/type/declaration.js +1 -0
- package/dist/esm/type/design-icon.d.ts +31 -0
- package/dist/esm/type/design-icon.js +30 -0
- package/dist/esm/type/design-token.d.ts +5 -0
- package/dist/esm/type/design-token.js +1 -0
- package/dist/esm/util/ChildUtils.d.ts +4 -0
- package/dist/esm/util/ChildUtils.js +31 -0
- package/dist/esm/util/ConsoleUtils.d.ts +7 -0
- package/dist/esm/util/ConsoleUtils.js +117 -0
- package/dist/esm/util/DatasetUtils.d.ts +5 -0
- package/dist/esm/util/DatasetUtils.js +37 -0
- package/dist/esm/util/DesignUtils.d.ts +6 -0
- package/dist/esm/util/DesignUtils.js +75 -0
- package/dist/esm/util/ElementUtils.d.ts +6 -0
- package/dist/esm/util/ElementUtils.js +54 -0
- package/dist/esm/util/FieldUtils.d.ts +7 -0
- package/dist/esm/util/FieldUtils.js +72 -0
- package/dist/esm/util/FileUtils.d.ts +6 -0
- package/dist/esm/util/FileUtils.js +34 -0
- package/dist/esm/util/IconUtils.d.ts +11 -0
- package/dist/esm/util/IconUtils.js +174 -0
- package/dist/esm/util/ImageUtils.d.ts +3 -0
- package/dist/esm/util/ImageUtils.js +29 -0
- package/dist/esm/util/ModalUtils.d.ts +8 -0
- package/dist/esm/util/ModalUtils.js +37 -0
- package/dist/esm/util/NodeUtils.d.ts +5 -0
- package/dist/esm/util/NodeUtils.js +51 -0
- package/dist/esm/util/PaginationUtils.d.ts +5 -0
- package/dist/esm/util/PaginationUtils.js +41 -0
- package/dist/esm/util/ParticleUtils.d.ts +6 -0
- package/dist/esm/util/ParticleUtils.js +350 -0
- package/dist/esm/util/PropUtils.d.ts +5 -0
- package/dist/esm/util/PropUtils.js +49 -0
- package/dist/esm/util/ReactUtils.d.ts +3 -0
- package/dist/esm/util/ReactUtils.js +19 -0
- package/dist/esm/util/StyleUtils.d.ts +12 -0
- package/dist/esm/util/StyleUtils.js +132 -0
- package/dist/esm/util/TriggerUtils.d.ts +3 -0
- package/dist/esm/util/TriggerUtils.js +48 -0
- package/package.json +152 -5
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SpaceSize } from 'antd/es/space';
|
|
3
|
+
import { type WithFalse, type AxisDirectionType } from "../../type/declaration";
|
|
4
|
+
export type LabelPresetStyle = WithFalse<'label-prior' | 'field-prior'>;
|
|
5
|
+
export type LabelFieldProps = React.PropsWithChildren<{
|
|
6
|
+
clazzPrefix?: string;
|
|
7
|
+
containerClazz?: string;
|
|
8
|
+
containerStyle?: React.CSSProperties;
|
|
9
|
+
layout?: AxisDirectionType;
|
|
10
|
+
label?: React.ReactNode | (() => React.ReactNode | undefined);
|
|
11
|
+
labelClazz?: string;
|
|
12
|
+
labelStyle?: React.CSSProperties;
|
|
13
|
+
colon?: React.ReactNode;
|
|
14
|
+
labelColon?: boolean;
|
|
15
|
+
field?: React.ReactNode | (() => React.ReactNode | undefined);
|
|
16
|
+
fieldClazz?: string;
|
|
17
|
+
fieldStyle?: React.CSSProperties;
|
|
18
|
+
spaceSize?: SpaceSize;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
tooltip?: React.ReactNode | (() => React.ReactNode | undefined);
|
|
21
|
+
widthBlock?: boolean;
|
|
22
|
+
hideLabelWhenEmpty?: boolean;
|
|
23
|
+
hideFieldWhenEmpty?: boolean;
|
|
24
|
+
presetStyle?: LabelPresetStyle;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const LabelField: React.FC<LabelFieldProps>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Space, Tooltip } from 'antd';
|
|
3
|
+
import { FormContext } from 'antd/es/form/context';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
6
|
+
import { useFieldStyle } from "./styles";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export var LabelField = function LabelField(props) {
|
|
10
|
+
var _props$clazzPrefix, _formContext$colon;
|
|
11
|
+
var formContext = React.useContext(FormContext);
|
|
12
|
+
var clazzPrefix = (_props$clazzPrefix = props === null || props === void 0 ? void 0 : props.clazzPrefix) !== null && _props$clazzPrefix !== void 0 ? _props$clazzPrefix : 'abp-label-field';
|
|
13
|
+
var _ref = props !== null && props !== void 0 ? props : {},
|
|
14
|
+
_ref$colon = _ref.colon,
|
|
15
|
+
colon = _ref$colon === void 0 ? (_formContext$colon = formContext === null || formContext === void 0 ? void 0 : formContext.colon) !== null && _formContext$colon !== void 0 ? _formContext$colon : ':' : _ref$colon,
|
|
16
|
+
_ref$labelColon = _ref.labelColon,
|
|
17
|
+
labelColon = _ref$labelColon === void 0 ? (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' : _ref$labelColon,
|
|
18
|
+
_ref$layout = _ref.layout,
|
|
19
|
+
layout = _ref$layout === void 0 ? (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'vertical' ? 'vertical' : 'horizontal' : _ref$layout,
|
|
20
|
+
_ref$presetStyle = _ref.presetStyle,
|
|
21
|
+
presetStyle = _ref$presetStyle === void 0 ? 'field-prior' : _ref$presetStyle;
|
|
22
|
+
var fieldStyle = useFieldStyle(clazzPrefix);
|
|
23
|
+
var buildLabelDom = function buildLabelDom() {
|
|
24
|
+
var income = !(props !== null && props !== void 0 && props.label) ? undefined : typeof props.label === 'function' ? props.label() : props.label;
|
|
25
|
+
if (!income && props !== null && props !== void 0 && props.hideLabelWhenEmpty) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
var tooltipDom = typeof (props === null || props === void 0 ? void 0 : props.tooltip) === 'function' ? props.tooltip() : props === null || props === void 0 ? void 0 : props.tooltip;
|
|
29
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
30
|
+
className: classnames("".concat(clazzPrefix, "-label"), props === null || props === void 0 ? void 0 : props.labelClazz),
|
|
31
|
+
style: props === null || props === void 0 ? void 0 : props.labelStyle,
|
|
32
|
+
children: [income, labelColon ? colon : undefined, !!tooltipDom && /*#__PURE__*/_jsx(Tooltip, {
|
|
33
|
+
title: tooltipDom,
|
|
34
|
+
children: /*#__PURE__*/_jsx(QuestionCircleOutlined, {
|
|
35
|
+
className: "".concat(clazzPrefix, "-tooltip")
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
var buildFieldDom = function buildFieldDom() {
|
|
41
|
+
var income = !(props !== null && props !== void 0 && props.field) ? props === null || props === void 0 ? void 0 : props.children : typeof props.field === 'function' ? props.field() : props.field;
|
|
42
|
+
if (!income && props !== null && props !== void 0 && props.hideFieldWhenEmpty) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
return /*#__PURE__*/_jsx("div", {
|
|
46
|
+
className: classnames("".concat(clazzPrefix, "-field"), props === null || props === void 0 ? void 0 : props.fieldClazz),
|
|
47
|
+
style: props === null || props === void 0 ? void 0 : props.fieldStyle,
|
|
48
|
+
children: income
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
return /*#__PURE__*/_jsx("div", {
|
|
52
|
+
className: classnames(clazzPrefix, fieldStyle.hashId, (formContext === null || formContext === void 0 ? void 0 : formContext.requiredMark) !== false && props !== null && props !== void 0 && props.required ? "".concat(clazzPrefix, "-required") : undefined, props !== null && props !== void 0 && props.widthBlock ? "".concat(clazzPrefix, "-width-block") : undefined, presetStyle ? "".concat(clazzPrefix, "-").concat(presetStyle) : undefined, props === null || props === void 0 ? void 0 : props.containerClazz),
|
|
53
|
+
style: props === null || props === void 0 ? void 0 : props.containerStyle,
|
|
54
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
55
|
+
className: "".concat(clazzPrefix, "-space-").concat(layout),
|
|
56
|
+
orientation: layout,
|
|
57
|
+
size: props === null || props === void 0 ? void 0 : props.spaceSize,
|
|
58
|
+
children: [buildLabelDom(), buildFieldDom()]
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { useStyle } from '@ant-design/pro-components';
|
|
8
|
+
import { PackageConst } from "../../constant/PackageConst";
|
|
9
|
+
var buildFieldStyle = function buildFieldStyle(token) {
|
|
10
|
+
return _defineProperty({}, "".concat(token.componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&&-width-block > ".concat(token.antCls, "-space"), {
|
|
11
|
+
width: '100%'
|
|
12
|
+
}), "&&-required &-label::before", {
|
|
13
|
+
display: 'inline-block',
|
|
14
|
+
marginRight: token.marginXXS,
|
|
15
|
+
color: token.colorErrorText,
|
|
16
|
+
content: '"*"'
|
|
17
|
+
}), "&&-label-prior &-space-horizontal", _defineProperty(_defineProperty({
|
|
18
|
+
display: 'flex'
|
|
19
|
+
}, "".concat(token.antCls, "-space-item:first-of-type"), _defineProperty({
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flex: 1
|
|
22
|
+
}, "".concat(token.componentCls, "-label"), {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
flex: 1
|
|
25
|
+
})), "".concat(token.antCls, "-space-item:last-of-type"), {
|
|
26
|
+
display: 'flex',
|
|
27
|
+
flex: 'none',
|
|
28
|
+
width: 'fit-content'
|
|
29
|
+
})), "&&-field-prior &-space-horizontal", _defineProperty(_defineProperty({
|
|
30
|
+
display: 'flex'
|
|
31
|
+
}, "".concat(token.antCls, "-space-item:first-of-type"), {
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flex: 'none',
|
|
34
|
+
width: 'fit-content'
|
|
35
|
+
}), "".concat(token.antCls, "-space-item:last-of-type"), _defineProperty({
|
|
36
|
+
display: 'flex',
|
|
37
|
+
flex: 1
|
|
38
|
+
}, "".concat(token.componentCls, "-field"), {
|
|
39
|
+
display: 'flex',
|
|
40
|
+
flex: 1
|
|
41
|
+
}))), "&-space-vertical", _defineProperty({
|
|
42
|
+
display: 'flex',
|
|
43
|
+
flex: 1
|
|
44
|
+
}, "".concat(token.antCls, "-space-item"), _defineProperty({}, "".concat(token.componentCls, "-label, ").concat(token.componentCls, "-field"), {
|
|
45
|
+
display: 'flex',
|
|
46
|
+
flex: 1
|
|
47
|
+
}))), "&-tooltip", {
|
|
48
|
+
marginLeft: token.marginXXS,
|
|
49
|
+
color: token.colorTextTertiary
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
52
|
+
export function useFieldStyle(prefixCls) {
|
|
53
|
+
return useStyle("".concat(PackageConst.PACKAGE_NAME, ":LabelField"), function (token) {
|
|
54
|
+
var mesh = _objectSpread(_objectSpread({}, token), {}, {
|
|
55
|
+
prefixCls: prefixCls,
|
|
56
|
+
componentCls: ".".concat(prefixCls)
|
|
57
|
+
});
|
|
58
|
+
return [buildFieldStyle(mesh)];
|
|
59
|
+
});
|
|
60
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type BadgeProps, type DropdownProps, type ListProps, type TabsProps } from 'antd';
|
|
3
|
+
import { ListItemMetaProps } from 'antd/es/list/Item';
|
|
4
|
+
import { type TabPlacement } from 'antd/es/tabs';
|
|
5
|
+
import { type Tab as RcTab } from '@rc-component/tabs/es/interface';
|
|
6
|
+
import { type WithFalse, type ReadonlyTabsType } from "../../type/declaration";
|
|
7
|
+
export type NotifyPresetStyle = WithFalse<'notice' | 'task'>;
|
|
8
|
+
export type NotifyTabPosition = Exclude<TabPlacement, 'bottom'>;
|
|
9
|
+
export type NotifyDataItem = Omit<ListItemMetaProps, 'children'> & {
|
|
10
|
+
id?: string;
|
|
11
|
+
extra?: React.ReactNode;
|
|
12
|
+
read?: boolean;
|
|
13
|
+
timestamp?: string;
|
|
14
|
+
};
|
|
15
|
+
export type HyperlinkProps = {
|
|
16
|
+
clazz?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
href?: string;
|
|
19
|
+
target?: string;
|
|
20
|
+
rel?: string;
|
|
21
|
+
};
|
|
22
|
+
export type MixinTabProps = Omit<RcTab, 'children'> & {
|
|
23
|
+
labelBadgeProps?: Omit<BadgeProps, 'children'>;
|
|
24
|
+
listProps?: ListProps<any>;
|
|
25
|
+
listPlaceholder?: React.ReactNode;
|
|
26
|
+
showClear?: boolean | (() => boolean);
|
|
27
|
+
showMore?: boolean | (() => boolean);
|
|
28
|
+
onClick?: (event: any, key: string) => void;
|
|
29
|
+
onClear?: (event: any, key: string) => void;
|
|
30
|
+
onMore?: (event: any, key: string) => void;
|
|
31
|
+
presetStyle?: NotifyPresetStyle;
|
|
32
|
+
};
|
|
33
|
+
export type MixinTabsProps = Omit<TabsProps, 'activeKey' | 'addIcon' | 'hideAdd' | 'items' | 'tabPlacement' | 'type' | 'onEdit' | 'children'> & {
|
|
34
|
+
items?: MixinTabProps[];
|
|
35
|
+
type?: ReadonlyTabsType;
|
|
36
|
+
tabPlacement?: NotifyTabPosition;
|
|
37
|
+
};
|
|
38
|
+
export type IntlLocaleProps = {
|
|
39
|
+
clear?: React.ReactNode;
|
|
40
|
+
more?: React.ReactNode;
|
|
41
|
+
};
|
|
42
|
+
export type NotifyBadgeProps = {
|
|
43
|
+
clazzPrefix?: string;
|
|
44
|
+
hyperlinkProps?: HyperlinkProps;
|
|
45
|
+
badgeContent?: React.ReactNode;
|
|
46
|
+
badgeProps?: Omit<BadgeProps, 'children'>;
|
|
47
|
+
dropdownEnabled?: boolean;
|
|
48
|
+
dropdownProps?: Omit<DropdownProps, 'popupRender' | 'menu' | 'children'>;
|
|
49
|
+
tabsProps?: MixinTabsProps;
|
|
50
|
+
locale?: string;
|
|
51
|
+
localeProps?: IntlLocaleProps;
|
|
52
|
+
};
|
|
53
|
+
export declare const NotifyBadge: React.FC<NotifyBadgeProps>;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { Avatar, Badge, Dropdown, Empty, List, Tabs } from 'antd';
|
|
9
|
+
import { BellOutlined } from '@ant-design/icons';
|
|
10
|
+
import { useIntl } from '@ant-design/pro-components';
|
|
11
|
+
import { If } from '@jiovan-labs/react-condition';
|
|
12
|
+
import { ArrayUtils, BooleanUtils, ObjectUtils } from '@jiovan-labs/ts-lang-utils';
|
|
13
|
+
import { omit } from '@rc-component/util';
|
|
14
|
+
import classnames from 'classnames';
|
|
15
|
+
import { intlLocales } from "./locales";
|
|
16
|
+
import { useFieldStyle } from "./styles";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
|
+
export var NotifyBadge = function NotifyBadge(props) {
|
|
21
|
+
var _props$clazzPrefix, _props$tabsProps2, _props$dropdownProps;
|
|
22
|
+
var clazzPrefix = (_props$clazzPrefix = props === null || props === void 0 ? void 0 : props.clazzPrefix) !== null && _props$clazzPrefix !== void 0 ? _props$clazzPrefix : 'abp-notify-badge';
|
|
23
|
+
var intlType = useIntl();
|
|
24
|
+
var _ref = props !== null && props !== void 0 ? props : {},
|
|
25
|
+
_ref$badgeContent = _ref.badgeContent,
|
|
26
|
+
badgeContent = _ref$badgeContent === void 0 ? /*#__PURE__*/_jsx(BellOutlined, {
|
|
27
|
+
style: {
|
|
28
|
+
cursor: 'pointer'
|
|
29
|
+
}
|
|
30
|
+
}) : _ref$badgeContent,
|
|
31
|
+
_ref$dropdownEnabled = _ref.dropdownEnabled,
|
|
32
|
+
dropdownEnabled = _ref$dropdownEnabled === void 0 ? true : _ref$dropdownEnabled,
|
|
33
|
+
_ref$locale = _ref.locale,
|
|
34
|
+
locale = _ref$locale === void 0 ? intlType.locale : _ref$locale;
|
|
35
|
+
var fieldStyle = useFieldStyle(clazzPrefix);
|
|
36
|
+
var badgeDom = /*#__PURE__*/_jsx(Badge, _objectSpread(_objectSpread({
|
|
37
|
+
className: "".concat(clazzPrefix, "-entry-badge")
|
|
38
|
+
}, props === null || props === void 0 ? void 0 : props.badgeProps), {}, {
|
|
39
|
+
children: badgeContent
|
|
40
|
+
}));
|
|
41
|
+
var hyperlinkDom = !(props !== null && props !== void 0 && props.hyperlinkProps) ? badgeDom : /*#__PURE__*/_jsx("a", _objectSpread(_objectSpread({
|
|
42
|
+
className: classnames("".concat(clazzPrefix, "-entry-link"), props.hyperlinkProps.clazz)
|
|
43
|
+
}, omit(props === null || props === void 0 ? void 0 : props.hyperlinkProps, ['clazz'])), {}, {
|
|
44
|
+
children: badgeDom
|
|
45
|
+
}));
|
|
46
|
+
var renderTabLabel = function renderTabLabel(tab) {
|
|
47
|
+
var _tab$labelBadgeProps$, _tab$labelBadgeProps, _tab$listProps, _intlLocales$get;
|
|
48
|
+
var unreadCount = (_tab$labelBadgeProps$ = (_tab$labelBadgeProps = tab.labelBadgeProps) === null || _tab$labelBadgeProps === void 0 ? void 0 : _tab$labelBadgeProps.count) !== null && _tab$labelBadgeProps$ !== void 0 ? _tab$labelBadgeProps$ : ArrayUtils.count((_tab$listProps = tab.listProps) === null || _tab$listProps === void 0 ? void 0 : _tab$listProps.dataSource, function (item) {
|
|
49
|
+
return BooleanUtils.isNotTrue(item.read);
|
|
50
|
+
});
|
|
51
|
+
var omitProps = !tab.labelBadgeProps ? {} : omit(tab.labelBadgeProps, ['count']);
|
|
52
|
+
if (tab.label) {
|
|
53
|
+
return !tab.labelBadgeProps ? tab.label : /*#__PURE__*/_jsx(Badge, _objectSpread(_objectSpread({
|
|
54
|
+
count: unreadCount
|
|
55
|
+
}, omitProps), {}, {
|
|
56
|
+
children: tab.label
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
if (tab.presetStyle !== 'notice' && tab.presetStyle !== 'task') {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
var label = (_intlLocales$get = intlLocales.get([locale, tab.presetStyle])) !== null && _intlLocales$get !== void 0 ? _intlLocales$get : intlLocales.get(['en_US', tab.presetStyle]);
|
|
63
|
+
return !tab.labelBadgeProps ? label : /*#__PURE__*/_jsx(Badge, _objectSpread(_objectSpread({
|
|
64
|
+
count: unreadCount
|
|
65
|
+
}, omitProps), {}, {
|
|
66
|
+
children: label
|
|
67
|
+
}));
|
|
68
|
+
};
|
|
69
|
+
var renderPresetList = function renderPresetList(item, index, tab) {
|
|
70
|
+
var avatar = !item.avatar ? undefined : /*#__PURE__*/_jsx(_Fragment, {
|
|
71
|
+
children: /*#__PURE__*/_jsxs(If, {
|
|
72
|
+
condition: typeof item.avatar === 'string',
|
|
73
|
+
validation: false,
|
|
74
|
+
children: [/*#__PURE__*/_jsx(If.Then, {
|
|
75
|
+
children: /*#__PURE__*/_jsx(Avatar, {
|
|
76
|
+
className: "".concat(clazzPrefix, "-list-item-avatar"),
|
|
77
|
+
src: item.avatar
|
|
78
|
+
})
|
|
79
|
+
}), /*#__PURE__*/_jsx(If.Else, {
|
|
80
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
81
|
+
className: "".concat(clazzPrefix, "-list-item-icon"),
|
|
82
|
+
children: item.avatar
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
return /*#__PURE__*/_jsx(List.Item, {
|
|
88
|
+
className: classnames("".concat(clazzPrefix, "-list-item"), "".concat(clazzPrefix, "-list-item-").concat(item.read ? 'read' : 'unread')),
|
|
89
|
+
onClick: function onClick(event) {
|
|
90
|
+
var _tab$onClick;
|
|
91
|
+
return (_tab$onClick = tab.onClick) === null || _tab$onClick === void 0 ? void 0 : _tab$onClick.call(tab, event, item.key || item.id || index);
|
|
92
|
+
},
|
|
93
|
+
children: /*#__PURE__*/_jsx(List.Item.Meta, {
|
|
94
|
+
className: "".concat(clazzPrefix, "-list-item-meta"),
|
|
95
|
+
avatar: avatar,
|
|
96
|
+
title: /*#__PURE__*/_jsxs("div", {
|
|
97
|
+
className: "".concat(clazzPrefix, "-list-item-title"),
|
|
98
|
+
children: [item.title, /*#__PURE__*/_jsx(If, {
|
|
99
|
+
condition: item.extra,
|
|
100
|
+
validation: false,
|
|
101
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
102
|
+
className: "".concat(clazzPrefix, "-list-item-extra"),
|
|
103
|
+
children: item.extra
|
|
104
|
+
})
|
|
105
|
+
})]
|
|
106
|
+
}),
|
|
107
|
+
description: /*#__PURE__*/_jsxs(_Fragment, {
|
|
108
|
+
children: [/*#__PURE__*/_jsx(If, {
|
|
109
|
+
condition: item.description,
|
|
110
|
+
validation: false,
|
|
111
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
112
|
+
className: "".concat(clazzPrefix, "-list-item-description"),
|
|
113
|
+
children: item.description
|
|
114
|
+
})
|
|
115
|
+
}), /*#__PURE__*/_jsx(If, {
|
|
116
|
+
condition: item.timestamp,
|
|
117
|
+
validation: false,
|
|
118
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
119
|
+
className: "".concat(clazzPrefix, "-list-item-timestamp"),
|
|
120
|
+
children: item.timestamp
|
|
121
|
+
})
|
|
122
|
+
})]
|
|
123
|
+
})
|
|
124
|
+
})
|
|
125
|
+
}, item.key || item.id || index);
|
|
126
|
+
};
|
|
127
|
+
var renderListFooter = function renderListFooter(tab) {
|
|
128
|
+
var _tab$listProps3, _props$localeProps, _props$localeProps2;
|
|
129
|
+
var showClear = BooleanUtils.isTrue(tab.showClear);
|
|
130
|
+
var showMore = BooleanUtils.isTrue(tab.showMore);
|
|
131
|
+
if (!showClear && !showMore) {
|
|
132
|
+
var _tab$listProps2;
|
|
133
|
+
return (_tab$listProps2 = tab.listProps) === null || _tab$listProps2 === void 0 ? void 0 : _tab$listProps2.footer;
|
|
134
|
+
}
|
|
135
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
136
|
+
children: [(_tab$listProps3 = tab.listProps) === null || _tab$listProps3 === void 0 ? void 0 : _tab$listProps3.footer, /*#__PURE__*/_jsxs("div", {
|
|
137
|
+
className: "".concat(clazzPrefix, "-builtin-footer"),
|
|
138
|
+
children: [/*#__PURE__*/_jsx(If, {
|
|
139
|
+
condition: showClear,
|
|
140
|
+
validation: false,
|
|
141
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
142
|
+
className: "".concat(clazzPrefix, "-action-button"),
|
|
143
|
+
onClick: function onClick(event) {
|
|
144
|
+
var _tab$onClear, _tab$key;
|
|
145
|
+
return (_tab$onClear = tab.onClear) === null || _tab$onClear === void 0 ? void 0 : _tab$onClear.call(tab, event, (_tab$key = tab.key) !== null && _tab$key !== void 0 ? _tab$key : tab.presetStyle);
|
|
146
|
+
},
|
|
147
|
+
children: ObjectUtils.firstNotNil(props === null || props === void 0 || (_props$localeProps = props.localeProps) === null || _props$localeProps === void 0 ? void 0 : _props$localeProps.clear, intlLocales.get([locale, 'clear']), intlLocales.get(['en_US', 'clear']))
|
|
148
|
+
})
|
|
149
|
+
}), /*#__PURE__*/_jsx(If, {
|
|
150
|
+
condition: showMore,
|
|
151
|
+
validation: false,
|
|
152
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
153
|
+
className: "".concat(clazzPrefix, "-action-button"),
|
|
154
|
+
onClick: function onClick(event) {
|
|
155
|
+
var _tab$onMore, _tab$key2;
|
|
156
|
+
return (_tab$onMore = tab.onMore) === null || _tab$onMore === void 0 ? void 0 : _tab$onMore.call(tab, event, (_tab$key2 = tab.key) !== null && _tab$key2 !== void 0 ? _tab$key2 : tab.presetStyle);
|
|
157
|
+
},
|
|
158
|
+
children: ObjectUtils.firstNotNil(props === null || props === void 0 || (_props$localeProps2 = props.localeProps) === null || _props$localeProps2 === void 0 ? void 0 : _props$localeProps2.more, intlLocales.get([locale, 'more']), intlLocales.get(['en_US', 'more']))
|
|
159
|
+
})
|
|
160
|
+
})]
|
|
161
|
+
})]
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
var buildTabDom = function buildTabDom() {
|
|
165
|
+
var _props$tabsProps;
|
|
166
|
+
if (!(props !== null && props !== void 0 && (_props$tabsProps = props.tabsProps) !== null && _props$tabsProps !== void 0 && _props$tabsProps.items)) {
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
return props.tabsProps.items.map(function (tab) {
|
|
170
|
+
var _tab$listProps4, _tab$listPlaceholder, _tab$listProps5, _tab$key3;
|
|
171
|
+
var empty = !((_tab$listProps4 = tab.listProps) !== null && _tab$listProps4 !== void 0 && _tab$listProps4.dataSource) || Array.isArray(tab.listProps.dataSource) && !tab.listProps.dataSource.length;
|
|
172
|
+
var placeholder = (_tab$listPlaceholder = tab.listPlaceholder) !== null && _tab$listPlaceholder !== void 0 ? _tab$listPlaceholder : /*#__PURE__*/_jsx(Empty, {
|
|
173
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
174
|
+
});
|
|
175
|
+
var content = empty ? placeholder : /*#__PURE__*/_jsx(List, _objectSpread(_objectSpread({
|
|
176
|
+
className: classnames("".concat(clazzPrefix, "-tab-list"), (_tab$listProps5 = tab.listProps) === null || _tab$listProps5 === void 0 ? void 0 : _tab$listProps5.className)
|
|
177
|
+
}, !(tab !== null && tab !== void 0 && tab.listProps) ? {} : omit(tab.listProps, ['className', 'footer', 'renderItem'])), {}, {
|
|
178
|
+
footer: renderListFooter(tab),
|
|
179
|
+
renderItem: function renderItem(item, index) {
|
|
180
|
+
var _tab$listProps6;
|
|
181
|
+
if ((_tab$listProps6 = tab.listProps) !== null && _tab$listProps6 !== void 0 && _tab$listProps6.renderItem) {
|
|
182
|
+
return tab.listProps.renderItem(item, index);
|
|
183
|
+
}
|
|
184
|
+
return tab.presetStyle === 'notice' || tab.presetStyle === 'task' ? renderPresetList(item, index, tab) : undefined;
|
|
185
|
+
}
|
|
186
|
+
}));
|
|
187
|
+
return _objectSpread(_objectSpread({
|
|
188
|
+
key: (_tab$key3 = tab.key) !== null && _tab$key3 !== void 0 ? _tab$key3 : tab.presetStyle,
|
|
189
|
+
label: renderTabLabel(tab)
|
|
190
|
+
}, omit(tab, ['key', 'label', 'labelBadgeProps', 'listProps', 'showClear', 'showMore', 'onClick', 'onClear', 'onMore', 'presetStyle'])), {}, {
|
|
191
|
+
children: content
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
var menuItems = [{
|
|
196
|
+
key: 'tabs',
|
|
197
|
+
label: /*#__PURE__*/_jsx(Tabs, _objectSpread({
|
|
198
|
+
className: classnames("".concat(clazzPrefix, "-tabs"), props === null || props === void 0 || (_props$tabsProps2 = props.tabsProps) === null || _props$tabsProps2 === void 0 ? void 0 : _props$tabsProps2.className),
|
|
199
|
+
items: buildTabDom()
|
|
200
|
+
}, !(props !== null && props !== void 0 && props.tabsProps) ? {} : omit(props.tabsProps, ['className', 'items'])))
|
|
201
|
+
}];
|
|
202
|
+
return !dropdownEnabled ? hyperlinkDom : /*#__PURE__*/_jsx(Dropdown, _objectSpread(_objectSpread({
|
|
203
|
+
menu: {
|
|
204
|
+
items: menuItems
|
|
205
|
+
},
|
|
206
|
+
classNames: {
|
|
207
|
+
root: classnames("".concat(clazzPrefix, "-trigger"), "".concat(clazzPrefix, "-popup"), fieldStyle.hashId, props === null || props === void 0 || (_props$dropdownProps = props.dropdownProps) === null || _props$dropdownProps === void 0 || (_props$dropdownProps = _props$dropdownProps.classNames) === null || _props$dropdownProps === void 0 ? void 0 : _props$dropdownProps.root)
|
|
208
|
+
}
|
|
209
|
+
}, !(props !== null && props !== void 0 && props.dropdownProps) ? {} : omit(props === null || props === void 0 ? void 0 : props.dropdownProps, ['className', 'classNames'])), {}, {
|
|
210
|
+
children: hyperlinkDom
|
|
211
|
+
}));
|
|
212
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ReadonlyMultiKeyMap } from '@jiovan-labs/ts-multi-map';
|
|
2
|
+
export var intlLocales = ReadonlyMultiKeyMap.of([[['en_US', 'clear'], 'Clear'], [['en_US', 'more'], 'More'], [['en_US', 'notice'], 'Notice'], [['en_US', 'task'], 'Task'], [['zh_CN', 'clear'], '清空'], [['zh_CN', 'more'], '更多'], [['zh_CN', 'notice'], '通知'], [['zh_CN', 'task'], '任务'], [['zh_TW', 'clear'], '清空'], [['zh_TW', 'more'], '更多'], [['zh_TW', 'notice'], '通知'], [['zh_TW', 'task'], '任務']]);
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { unit } from '@ant-design/cssinjs';
|
|
8
|
+
import { useStyle } from '@ant-design/pro-components';
|
|
9
|
+
import { PackageConst } from "../../constant/PackageConst";
|
|
10
|
+
var buildFieldStyle = function buildFieldStyle(token) {
|
|
11
|
+
return _defineProperty({}, "".concat(token.componentCls), _defineProperty({}, "&-popup", _defineProperty(_defineProperty({
|
|
12
|
+
minWidth: 320
|
|
13
|
+
}, "> ".concat(token.antCls, "-dropdown-menu > ").concat(token.antCls, "-dropdown-menu-item"), _defineProperty({
|
|
14
|
+
paddingLeft: "".concat(token.paddingXS, "px !important"),
|
|
15
|
+
paddingRight: "".concat(token.paddingXS, "px !important")
|
|
16
|
+
}, "&:hover", {
|
|
17
|
+
backgroundColor: 'unset !important',
|
|
18
|
+
cursor: 'unset !important'
|
|
19
|
+
})), "".concat(token.componentCls, "-tabs"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(token.antCls, "-tabs-content-top ").concat(token.antCls, "-tabs-tab"), {
|
|
20
|
+
paddingTop: 2
|
|
21
|
+
}), "".concat(token.antCls, "-tabs-content-left ").concat(token.antCls, "-tabs-tabpane"), {
|
|
22
|
+
paddingLeft: token.paddingXS
|
|
23
|
+
}), "".concat(token.antCls, "-tabs-content-right ").concat(token.antCls, "-tabs-tabpane"), {
|
|
24
|
+
paddingRight: token.paddingXS
|
|
25
|
+
}), "".concat(token.componentCls, "-tab-list"), _defineProperty(_defineProperty({
|
|
26
|
+
maxHeight: 400,
|
|
27
|
+
overflow: 'auto'
|
|
28
|
+
}, "&::-webkit-scrollbar", {
|
|
29
|
+
display: 'none'
|
|
30
|
+
}), "".concat(token.antCls, "-list-footer"), {
|
|
31
|
+
paddingBottom: 0
|
|
32
|
+
})), "".concat(token.componentCls, "-list-item"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
33
|
+
borderRadius: token.borderRadius,
|
|
34
|
+
cursor: 'pointer',
|
|
35
|
+
paddingRight: token.paddingXS,
|
|
36
|
+
paddingLeft: token.paddingXS,
|
|
37
|
+
overflow: 'hidden',
|
|
38
|
+
transition: 'all 0.3s'
|
|
39
|
+
}, "&&-read", {
|
|
40
|
+
opacity: 0.4
|
|
41
|
+
}), "&-avatar", {
|
|
42
|
+
backgroundColor: token.colorBgContainer,
|
|
43
|
+
marginTop: token.marginXXS
|
|
44
|
+
}), "&-icon", {
|
|
45
|
+
fontSize: 32
|
|
46
|
+
}), "&-meta", {
|
|
47
|
+
width: '100%'
|
|
48
|
+
}), "&-title", {
|
|
49
|
+
marginBottom: token.marginXS,
|
|
50
|
+
fontWeight: 'normal'
|
|
51
|
+
}), "&-description", {
|
|
52
|
+
fontSize: token.fontSize - 1
|
|
53
|
+
}), "&-timestamp", {
|
|
54
|
+
marginTop: token.marginXXS,
|
|
55
|
+
fontSize: token.fontSizeSM
|
|
56
|
+
}), "&-extra", {
|
|
57
|
+
float: 'right',
|
|
58
|
+
marginTop: -1.5,
|
|
59
|
+
marginRight: 0,
|
|
60
|
+
color: token.colorTextSecondary,
|
|
61
|
+
fontWeight: 'normal'
|
|
62
|
+
}), "&:hover", {
|
|
63
|
+
backgroundColor: token.controlItemBgActive
|
|
64
|
+
}), "&:last-child", {
|
|
65
|
+
borderBottom: 'none !important'
|
|
66
|
+
})), "".concat(token.componentCls, "-builtin-footer"), _defineProperty({
|
|
67
|
+
height: 38,
|
|
68
|
+
color: token.colorPrimaryText,
|
|
69
|
+
display: 'flex',
|
|
70
|
+
alignItems: 'start',
|
|
71
|
+
textAlign: 'center',
|
|
72
|
+
borderTop: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit),
|
|
73
|
+
borderRadius: "0 0 ".concat(token.borderRadius, "px ").concat(token.borderRadius, "px"),
|
|
74
|
+
transition: 'all 0.3s'
|
|
75
|
+
}, "".concat(token.componentCls, "-action-button"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
76
|
+
display: 'flex',
|
|
77
|
+
flex: 1,
|
|
78
|
+
cursor: 'pointer',
|
|
79
|
+
height: '100%',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
justifyContent: 'center',
|
|
82
|
+
transition: 'all 0.3s',
|
|
83
|
+
userSelect: 'none'
|
|
84
|
+
}, "&:hover", {
|
|
85
|
+
backgroundColor: token.controlItemBgHover,
|
|
86
|
+
color: token.colorPrimaryHover
|
|
87
|
+
}), "&:only-child:hover", {
|
|
88
|
+
borderBottomLeftRadius: token.borderRadius,
|
|
89
|
+
borderBottomRightRadius: token.borderRadius
|
|
90
|
+
}), "&:not(:only-child):first-child", _defineProperty({}, "&:hover", {
|
|
91
|
+
borderBottomLeftRadius: token.borderRadius
|
|
92
|
+
})), "&:not(:only-child):last-child", _defineProperty({
|
|
93
|
+
borderLeft: "".concat(unit(token.lineWidth), " ").concat(token.lineType, " ").concat(token.colorSplit)
|
|
94
|
+
}, "&:hover", {
|
|
95
|
+
borderBottomRightRadius: token.borderRadius
|
|
96
|
+
})))))));
|
|
97
|
+
};
|
|
98
|
+
export function useFieldStyle(prefixCls) {
|
|
99
|
+
return useStyle("".concat(PackageConst.PACKAGE_NAME, ":NotifyBadge"), function (token) {
|
|
100
|
+
var mesh = _objectSpread(_objectSpread({}, token), {}, {
|
|
101
|
+
prefixCls: prefixCls,
|
|
102
|
+
componentCls: ".".concat(prefixCls)
|
|
103
|
+
});
|
|
104
|
+
return [buildFieldStyle(mesh)];
|
|
105
|
+
});
|
|
106
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImagePreviewType } from 'antd/es/image';
|
|
3
|
+
export type PreviewImageProps = Omit<ImagePreviewType, 'src'> & {
|
|
4
|
+
clazzPrefix?: string;
|
|
5
|
+
src?: string | Promise<string | undefined> | (() => string | undefined | Promise<string | undefined>);
|
|
6
|
+
fallback?: string | Promise<string | undefined> | (() => string | undefined | Promise<string | undefined>);
|
|
7
|
+
};
|
|
8
|
+
export declare const PreviewImage: React.FC<PreviewImageProps>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { Image } from 'antd';
|
|
15
|
+
import { ImageUtils, NanoidUtils } from '@jiovan-labs/ts-lang-utils';
|
|
16
|
+
import { omit } from '@rc-component/util';
|
|
17
|
+
import classnames from 'classnames';
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
export var PreviewImage = function PreviewImage(props) {
|
|
20
|
+
var _props$clazzPrefix;
|
|
21
|
+
var clazzPrefix = (_props$clazzPrefix = props === null || props === void 0 ? void 0 : props.clazzPrefix) !== null && _props$clazzPrefix !== void 0 ? _props$clazzPrefix : 'abp-preview-image';
|
|
22
|
+
var _React$useState = React.useState(NanoidUtils.getPopularId()),
|
|
23
|
+
_React$useState2 = _slicedToArray(_React$useState, 1),
|
|
24
|
+
fieldId = _React$useState2[0];
|
|
25
|
+
var _React$useState3 = React.useState(),
|
|
26
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
27
|
+
imageSrc = _React$useState4[0],
|
|
28
|
+
setImageSrc = _React$useState4[1];
|
|
29
|
+
var _React$useState5 = React.useState(),
|
|
30
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
31
|
+
imageFallback = _React$useState6[0],
|
|
32
|
+
setImageFallback = _React$useState6[1];
|
|
33
|
+
React.useEffect(function () {
|
|
34
|
+
ImageUtils.detectSource(props === null || props === void 0 ? void 0 : props.src, function (res) {
|
|
35
|
+
return setImageSrc(res);
|
|
36
|
+
});
|
|
37
|
+
}, [props === null || props === void 0 ? void 0 : props.src]);
|
|
38
|
+
React.useEffect(function () {
|
|
39
|
+
ImageUtils.detectSource(props === null || props === void 0 ? void 0 : props.fallback, function (res) {
|
|
40
|
+
return setImageFallback(res);
|
|
41
|
+
});
|
|
42
|
+
}, [props === null || props === void 0 ? void 0 : props.fallback]);
|
|
43
|
+
var omitProps = !props ? {} : omit(props, ['clazzPrefix', 'src', 'fallback']);
|
|
44
|
+
return /*#__PURE__*/_jsx(Image, {
|
|
45
|
+
className: classnames(clazzPrefix, "".concat(clazzPrefix, "-").concat(fieldId)),
|
|
46
|
+
width: 0,
|
|
47
|
+
height: 0,
|
|
48
|
+
preview: _objectSpread({
|
|
49
|
+
src: imageSrc,
|
|
50
|
+
fallback: imageFallback
|
|
51
|
+
}, omitProps),
|
|
52
|
+
rootClassName: classnames("".concat(clazzPrefix, "-preview"), "".concat(clazzPrefix, "-preview-").concat(fieldId), props === null || props === void 0 ? void 0 : props.rootClassName),
|
|
53
|
+
style: {
|
|
54
|
+
display: 'none'
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ImageProps } from 'antd';
|
|
3
|
+
export type RefreshImageRef = {
|
|
4
|
+
refresh: () => void;
|
|
5
|
+
};
|
|
6
|
+
export type IntlLocaleProps = {
|
|
7
|
+
clickToRefresh?: string;
|
|
8
|
+
};
|
|
9
|
+
export type RefreshImageProps = Omit<ImageProps, 'src' | 'fallback' | 'preview'> & {
|
|
10
|
+
clazzPrefix?: string;
|
|
11
|
+
containerClazz?: string;
|
|
12
|
+
containerStyle?: React.CSSProperties;
|
|
13
|
+
handCursor?: boolean;
|
|
14
|
+
src?: string | Promise<string | undefined> | (() => string | undefined | Promise<string | undefined>);
|
|
15
|
+
fallback?: string | Promise<string | undefined> | (() => string | undefined | Promise<string | undefined>);
|
|
16
|
+
onRefresh?: (currentSrc?: string, previousSrc?: string) => void;
|
|
17
|
+
locale?: string;
|
|
18
|
+
localeProps?: IntlLocaleProps;
|
|
19
|
+
};
|
|
20
|
+
export declare const RefreshImage: React.ForwardRefExoticComponent<RefreshImageProps & React.RefAttributes<RefreshImageRef>>;
|