linkmore-design 1.0.62 → 1.0.66
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/README.md +1 -1
- package/dist/Approval/demos/basic.d.ts +2 -0
- package/dist/Approval/index.d.ts +24 -0
- package/dist/Approval/style/index.d.ts +1 -0
- package/dist/AutoComplete/demos/basic.d.ts +3 -0
- package/dist/AutoComplete/index.d.ts +30 -0
- package/dist/AutoComplete/style/index.d.ts +1 -0
- package/dist/Avatar/demos/basic.d.ts +2 -0
- package/dist/Avatar/index.d.ts +3 -0
- package/dist/Avatar/style/index.d.ts +1 -0
- package/dist/Breadcrumb/demos/basic.d.ts +2 -0
- package/dist/Breadcrumb/demos/basic1.d.ts +2 -0
- package/dist/Breadcrumb/index.d.ts +4 -0
- package/dist/Breadcrumb/style/index.d.ts +1 -0
- package/dist/CardTable/utils.d.ts +1 -1
- package/dist/Col/demos/basic.d.ts +2 -0
- package/dist/Col/index.d.ts +3 -0
- package/dist/Col/style/index.d.ts +1 -0
- package/dist/Form/index.d.ts +1 -1
- package/dist/Grid/RowContext.d.ts +8 -0
- package/dist/Grid/col.d.ts +28 -0
- package/dist/Grid/demos/basic.d.ts +2 -0
- package/dist/Grid/hooks/useBreakpoint.d.ts +3 -0
- package/dist/Grid/index.d.ts +11 -0
- package/dist/Grid/row.d.ts +14 -0
- package/dist/Grid/style/index.d.ts +1 -0
- package/dist/Layout/demos/basic.d.ts +2 -0
- package/dist/Layout/index.d.ts +4 -0
- package/dist/Layout/style/index.d.ts +1 -0
- package/dist/LmEditTable/EditTable.d.ts +4 -1
- package/dist/LmEditTable/demos/colsort.d.ts +2 -0
- package/dist/LmEditTable/demos/size.d.ts +2 -0
- package/dist/LmEditTable/sortableBoxCol.d.ts +5 -0
- package/dist/LmEditTable/sortableItemCol.d.ts +1 -0
- package/dist/LmFilter/components/CustomSelectFilter.d.ts +4 -0
- package/dist/LmFilter/customFilter/drawer.d.ts +4 -0
- package/dist/LmFilter/customFilter/saveModal.d.ts +4 -0
- package/dist/LmFilter/customFilter/valueDrawer.d.ts +4 -0
- package/dist/LmFilter/filterFns/index.d.ts +35 -17
- package/dist/LmFilter/utils.d.ts +2 -0
- package/dist/Mentions/demos/basic.d.ts +2 -0
- package/dist/Mentions/index.d.ts +3 -0
- package/dist/Mentions/style/index.d.ts +1 -0
- package/dist/PageHeader/demos/basic.d.ts +2 -0
- package/dist/PageHeader/index.d.ts +24 -0
- package/dist/PageHeader/style/index.d.ts +1 -0
- package/dist/Popover/demos/basic.d.ts +2 -0
- package/dist/Popover/demos/basic1.d.ts +2 -0
- package/dist/Popover/index.d.ts +11 -0
- package/dist/Popover/style/index.d.ts +1 -0
- package/dist/Rate/demos/basic.d.ts +2 -0
- package/dist/Rate/index.d.ts +3 -0
- package/dist/Rate/style/index.d.ts +1 -0
- package/dist/Row/demos/basic.d.ts +2 -0
- package/dist/Row/index.d.ts +3 -0
- package/dist/Row/style/index.d.ts +1 -0
- package/dist/Steps/demos/basic.d.ts +2 -0
- package/dist/Steps/index.d.ts +3 -0
- package/dist/Steps/style/index.d.ts +1 -0
- package/dist/Tooltip/index.d.ts +43 -1
- package/dist/Typography/Base/Ellipsis.d.ts +14 -0
- package/dist/Typography/Base/EllipsisTooltip.d.ts +13 -0
- package/dist/Typography/Base/index.d.ts +54 -0
- package/dist/Typography/Editable.d.ts +20 -0
- package/dist/Typography/Link.d.ts +7 -0
- package/dist/Typography/Paragraph.d.ts +7 -0
- package/dist/Typography/Text.d.ts +8 -0
- package/dist/Typography/Title.d.ts +9 -0
- package/dist/Typography/Typography.d.ts +11 -0
- package/dist/Typography/demos/basic.d.ts +2 -0
- package/dist/Typography/hooks/useMergedConfig.d.ts +1 -0
- package/dist/Typography/hooks/useUpdatedEffect.d.ts +3 -0
- package/dist/Typography/index.d.ts +15 -0
- package/dist/Typography/style/index.d.ts +1 -0
- package/dist/_util/colors.d.ts +5 -0
- package/dist/_util/getRenderPropValue.d.ts +3 -0
- package/dist/_util/hooks/useFlexGapSupport.d.ts +2 -0
- package/dist/_util/hooks/useForceUpdate.d.ts +2 -0
- package/dist/_util/placements.d.ts +16 -0
- package/dist/_util/responsiveObserve.d.ts +21 -0
- package/dist/_util/styleChecker.d.ts +4 -0
- package/dist/_util/transButton.d.ts +9 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.umd.js +17449 -8958
- package/dist/index.umd.min.js +6 -6
- package/es/Approval/index.d.ts +24 -0
- package/es/Approval/index.js +210 -0
- package/es/Approval/style/index.css +592 -0
- package/es/Approval/style/index.d.ts +1 -0
- package/es/Approval/style/index.js +1 -0
- package/es/AutoComplete/index.d.ts +30 -0
- package/es/AutoComplete/index.js +101 -0
- package/es/AutoComplete/style/index.css +505 -0
- package/es/AutoComplete/style/index.d.ts +1 -0
- package/es/AutoComplete/style/index.js +1 -0
- package/es/Avatar/index.d.ts +3 -0
- package/es/Avatar/index.js +3 -0
- package/es/Avatar/style/index.css +505 -0
- package/es/Avatar/style/index.d.ts +1 -0
- package/es/Avatar/style/index.js +1 -0
- package/es/Breadcrumb/index.d.ts +4 -0
- package/es/Breadcrumb/index.js +3 -0
- package/es/Breadcrumb/style/index.css +505 -0
- package/es/Breadcrumb/style/index.d.ts +1 -0
- package/es/Breadcrumb/style/index.js +1 -0
- package/es/Col/README.md.old +22 -0
- package/es/Col/index.d.ts +3 -0
- package/es/Col/index.js +2 -0
- package/es/Col/style/index.css +505 -0
- package/es/Col/style/index.d.ts +1 -0
- package/es/Col/style/index.js +1 -0
- package/es/EditTable/README.md.old +66 -0
- package/es/Form/container.js +17 -1
- package/es/Form/index.d.ts +1 -1
- package/es/Form/index.js +5 -2
- package/es/Form/style/index.css +32 -17
- package/es/Grid/RowContext.d.ts +8 -0
- package/es/Grid/RowContext.js +3 -0
- package/es/Grid/col.d.ts +28 -0
- package/es/Grid/col.js +112 -0
- package/es/Grid/hooks/useBreakpoint.d.ts +3 -0
- package/es/Grid/hooks/useBreakpoint.js +24 -0
- package/es/Grid/index.d.ts +11 -0
- package/es/Grid/index.js +14 -0
- package/es/Grid/row.d.ts +14 -0
- package/es/Grid/row.js +142 -0
- package/es/Grid/style/index.css +505 -0
- package/es/Grid/style/index.d.ts +1 -0
- package/es/Grid/style/index.js +1 -0
- package/es/Layout/index.d.ts +4 -0
- package/es/Layout/index.js +3 -0
- package/es/Layout/style/index.css +505 -0
- package/es/Layout/style/index.d.ts +1 -0
- package/es/Layout/style/index.js +1 -0
- package/es/LmEditTable/EditTable.d.ts +4 -1
- package/es/LmEditTable/EditTable.js +241 -59
- package/es/LmEditTable/sortableBoxCol.d.ts +5 -0
- package/es/LmEditTable/sortableBoxCol.js +13 -0
- package/es/LmEditTable/sortableItemCol.d.ts +1 -0
- package/es/LmEditTable/sortableItemCol.js +48 -0
- package/es/LmFilter/{icon_placeholder.png → assets/empty.png} +0 -0
- package/es/LmFilter/clearFilter/index.js +3 -5
- package/es/LmFilter/complexFilter/drawer.js +26 -9
- package/es/LmFilter/components/CheckboxFilter.js +1 -1
- package/es/LmFilter/components/CustomSelectFilter.js +139 -0
- package/es/LmFilter/components/EmptyFilter.js +2 -2
- package/es/LmFilter/components/SelectFilter.js +15 -6
- package/es/LmFilter/components/index.js +9 -2
- package/es/LmFilter/customFilter/drawer.js +427 -0
- package/es/LmFilter/customFilter/index.js +107 -2
- package/es/LmFilter/customFilter/saveModal.js +187 -0
- package/es/LmFilter/customFilter/valueDrawer.js +238 -0
- package/es/LmFilter/filterFns/index.js +316 -70
- package/es/LmFilter/style/{style.css → index.css} +61 -6
- package/es/LmFilter/style/index.js +1 -1
- package/es/LmFilter/utils.js +34 -0
- package/es/LmFilter/wrapper/FilterRoot.js +63 -49
- package/es/Mentions/index.d.ts +3 -0
- package/es/Mentions/index.js +3 -0
- package/es/Mentions/style/index.css +505 -0
- package/es/Mentions/style/index.d.ts +1 -0
- package/es/Mentions/style/index.js +1 -0
- package/es/PageHeader/index.d.ts +24 -0
- package/es/PageHeader/index.js +169 -0
- package/es/PageHeader/style/index.css +505 -0
- package/es/PageHeader/style/index.d.ts +1 -0
- package/es/PageHeader/style/index.js +1 -0
- package/es/Popover/index.d.ts +11 -0
- package/es/Popover/index.js +63 -0
- package/es/Popover/style/index.css +505 -0
- package/es/Popover/style/index.d.ts +1 -0
- package/es/Popover/style/index.js +1 -0
- package/es/Rate/index.d.ts +3 -0
- package/es/Rate/index.js +3 -0
- package/es/Rate/style/index.css +505 -0
- package/es/Rate/style/index.d.ts +1 -0
- package/es/Rate/style/index.js +1 -0
- package/es/Row/README.md.old +22 -0
- package/es/Row/index.d.ts +3 -0
- package/es/Row/index.js +2 -0
- package/es/Row/style/index.css +505 -0
- package/es/Row/style/index.d.ts +1 -0
- package/es/Row/style/index.js +1 -0
- package/es/Steps/index.d.ts +3 -0
- package/es/Steps/index.js +3 -0
- package/es/Steps/style/index.css +505 -0
- package/es/Steps/style/index.d.ts +1 -0
- package/es/Steps/style/index.js +1 -0
- package/es/Tooltip/index.d.ts +43 -1
- package/es/Tooltip/index.js +236 -1
- package/es/Typography/Base/Ellipsis.d.ts +14 -0
- package/es/Typography/Base/Ellipsis.js +197 -0
- package/es/Typography/Base/EllipsisTooltip.d.ts +13 -0
- package/es/Typography/Base/EllipsisTooltip.js +23 -0
- package/es/Typography/Base/index.d.ts +54 -0
- package/es/Typography/Base/index.js +509 -0
- package/es/Typography/Editable.d.ts +20 -0
- package/es/Typography/Editable.js +117 -0
- package/es/Typography/Link.d.ts +7 -0
- package/es/Typography/Link.js +43 -0
- package/es/Typography/Paragraph.d.ts +7 -0
- package/es/Typography/Paragraph.js +12 -0
- package/es/Typography/Text.d.ts +8 -0
- package/es/Typography/Text.js +41 -0
- package/es/Typography/Title.d.ts +9 -0
- package/es/Typography/Title.js +41 -0
- package/es/Typography/Typography.d.ts +11 -0
- package/es/Typography/Typography.js +61 -0
- package/es/Typography/hooks/useMergedConfig.d.ts +1 -0
- package/es/Typography/hooks/useMergedConfig.js +8 -0
- package/es/Typography/hooks/useUpdatedEffect.d.ts +3 -0
- package/es/Typography/hooks/useUpdatedEffect.js +13 -0
- package/es/Typography/index.d.ts +15 -0
- package/es/Typography/index.js +14 -0
- package/es/Typography/style/index.css +505 -0
- package/es/Typography/style/index.d.ts +1 -0
- package/es/Typography/style/index.js +1 -0
- package/es/_util/colors.d.ts +5 -0
- package/es/_util/colors.js +4 -0
- package/es/_util/getRenderPropValue.d.ts +3 -0
- package/es/_util/getRenderPropValue.js +13 -0
- package/es/_util/hooks/useFlexGapSupport.d.ts +2 -0
- package/es/_util/hooks/useFlexGapSupport.js +14 -0
- package/es/_util/hooks/useForceUpdate.d.ts +2 -0
- package/es/_util/hooks/useForceUpdate.js +11 -0
- package/es/_util/placements.d.ts +16 -0
- package/es/_util/placements.js +87 -0
- package/es/_util/responsiveObserve.d.ts +21 -0
- package/es/_util/responsiveObserve.js +66 -0
- package/es/_util/styleChecker.d.ts +4 -0
- package/es/_util/styleChecker.js +31 -0
- package/es/_util/transButton.d.ts +9 -0
- package/es/_util/transButton.js +73 -0
- package/es/index.d.ts +14 -0
- package/es/index.js +8 -1
- package/lib/Approval/index.d.ts +24 -0
- package/lib/Approval/index.js +223 -0
- package/lib/Approval/style/index.css +592 -0
- package/lib/Approval/style/index.d.ts +1 -0
- package/lib/Approval/style/index.js +3 -0
- package/lib/AutoComplete/index.d.ts +30 -0
- package/lib/AutoComplete/index.js +125 -0
- package/lib/AutoComplete/style/index.css +505 -0
- package/lib/AutoComplete/style/index.d.ts +1 -0
- package/lib/AutoComplete/style/index.js +3 -0
- package/lib/Avatar/index.d.ts +3 -0
- package/lib/Avatar/index.js +15 -0
- package/lib/Avatar/style/index.css +505 -0
- package/lib/Avatar/style/index.d.ts +1 -0
- package/lib/Avatar/style/index.js +3 -0
- package/lib/Breadcrumb/index.d.ts +4 -0
- package/lib/Breadcrumb/index.js +15 -0
- package/lib/Breadcrumb/style/index.css +505 -0
- package/lib/Breadcrumb/style/index.d.ts +1 -0
- package/lib/Breadcrumb/style/index.js +3 -0
- package/lib/Col/README.md.old +22 -0
- package/lib/Col/index.d.ts +3 -0
- package/lib/Col/index.js +11 -0
- package/lib/Col/style/index.css +505 -0
- package/lib/Col/style/index.d.ts +1 -0
- package/lib/Col/style/index.js +3 -0
- package/lib/EditTable/README.md.old +66 -0
- package/lib/Form/container.js +17 -1
- package/lib/Form/index.d.ts +1 -1
- package/lib/Form/index.js +5 -2
- package/lib/Form/style/index.css +32 -17
- package/lib/Grid/RowContext.d.ts +8 -0
- package/lib/Grid/RowContext.js +12 -0
- package/lib/Grid/col.d.ts +28 -0
- package/lib/Grid/col.js +128 -0
- package/lib/Grid/hooks/useBreakpoint.d.ts +3 -0
- package/lib/Grid/hooks/useBreakpoint.js +37 -0
- package/lib/Grid/index.d.ts +11 -0
- package/lib/Grid/index.js +45 -0
- package/lib/Grid/row.d.ts +14 -0
- package/lib/Grid/row.js +164 -0
- package/lib/Grid/style/index.css +505 -0
- package/lib/Grid/style/index.d.ts +1 -0
- package/lib/Grid/style/index.js +3 -0
- package/lib/Layout/index.d.ts +4 -0
- package/lib/Layout/index.js +15 -0
- package/lib/Layout/style/index.css +505 -0
- package/lib/Layout/style/index.d.ts +1 -0
- package/lib/Layout/style/index.js +3 -0
- package/lib/LmEditTable/EditTable.d.ts +4 -1
- package/lib/LmEditTable/EditTable.js +242 -60
- package/lib/LmEditTable/sortableBoxCol.d.ts +5 -0
- package/lib/LmEditTable/sortableBoxCol.js +24 -0
- package/lib/LmEditTable/sortableItemCol.d.ts +1 -0
- package/lib/LmEditTable/sortableItemCol.js +61 -0
- package/lib/LmFilter/{icon_placeholder.png → assets/empty.png} +0 -0
- package/lib/LmFilter/clearFilter/index.js +3 -5
- package/lib/LmFilter/complexFilter/drawer.js +26 -9
- package/lib/LmFilter/components/CheckboxFilter.js +1 -1
- package/lib/LmFilter/components/CustomSelectFilter.js +139 -0
- package/lib/LmFilter/components/EmptyFilter.js +2 -2
- package/lib/LmFilter/components/SelectFilter.js +15 -6
- package/lib/LmFilter/components/index.js +9 -2
- package/lib/LmFilter/customFilter/drawer.js +427 -0
- package/lib/LmFilter/customFilter/index.js +107 -2
- package/lib/LmFilter/customFilter/saveModal.js +187 -0
- package/lib/LmFilter/customFilter/valueDrawer.js +238 -0
- package/lib/LmFilter/filterFns/index.js +316 -70
- package/lib/LmFilter/style/{style.css → index.css} +61 -6
- package/lib/LmFilter/style/index.js +1 -1
- package/lib/LmFilter/utils.js +34 -0
- package/lib/LmFilter/wrapper/FilterRoot.js +63 -49
- package/lib/Mentions/index.d.ts +3 -0
- package/lib/Mentions/index.js +15 -0
- package/lib/Mentions/style/index.css +505 -0
- package/lib/Mentions/style/index.d.ts +1 -0
- package/lib/Mentions/style/index.js +3 -0
- package/lib/PageHeader/index.d.ts +24 -0
- package/lib/PageHeader/index.js +194 -0
- package/lib/PageHeader/style/index.css +505 -0
- package/lib/PageHeader/style/index.d.ts +1 -0
- package/lib/PageHeader/style/index.js +3 -0
- package/lib/Popover/index.d.ts +11 -0
- package/lib/Popover/index.js +81 -0
- package/lib/Popover/style/index.css +505 -0
- package/lib/Popover/style/index.d.ts +1 -0
- package/lib/Popover/style/index.js +3 -0
- package/lib/Rate/index.d.ts +3 -0
- package/lib/Rate/index.js +15 -0
- package/lib/Rate/style/index.css +505 -0
- package/lib/Rate/style/index.d.ts +1 -0
- package/lib/Rate/style/index.js +3 -0
- package/lib/Row/README.md.old +22 -0
- package/lib/Row/index.d.ts +3 -0
- package/lib/Row/index.js +11 -0
- package/lib/Row/style/index.css +505 -0
- package/lib/Row/style/index.d.ts +1 -0
- package/lib/Row/style/index.js +3 -0
- package/lib/Steps/index.d.ts +3 -0
- package/lib/Steps/index.js +15 -0
- package/lib/Steps/style/index.css +505 -0
- package/lib/Steps/style/index.d.ts +1 -0
- package/lib/Steps/style/index.js +3 -0
- package/lib/Tooltip/index.d.ts +43 -1
- package/lib/Tooltip/index.js +247 -1
- package/lib/Typography/Base/Ellipsis.d.ts +14 -0
- package/lib/Typography/Base/Ellipsis.js +212 -0
- package/lib/Typography/Base/EllipsisTooltip.d.ts +13 -0
- package/lib/Typography/Base/EllipsisTooltip.js +36 -0
- package/lib/Typography/Base/index.d.ts +54 -0
- package/lib/Typography/Base/index.js +545 -0
- package/lib/Typography/Editable.d.ts +20 -0
- package/lib/Typography/Editable.js +137 -0
- package/lib/Typography/Link.d.ts +7 -0
- package/lib/Typography/Link.js +58 -0
- package/lib/Typography/Paragraph.d.ts +7 -0
- package/lib/Typography/Paragraph.js +26 -0
- package/lib/Typography/Text.d.ts +8 -0
- package/lib/Typography/Text.js +57 -0
- package/lib/Typography/Title.d.ts +9 -0
- package/lib/Typography/Title.js +58 -0
- package/lib/Typography/Typography.d.ts +11 -0
- package/lib/Typography/Typography.js +77 -0
- package/lib/Typography/hooks/useMergedConfig.d.ts +1 -0
- package/lib/Typography/hooks/useMergedConfig.js +21 -0
- package/lib/Typography/hooks/useUpdatedEffect.d.ts +3 -0
- package/lib/Typography/hooks/useUpdatedEffect.js +24 -0
- package/lib/Typography/index.d.ts +15 -0
- package/lib/Typography/index.js +31 -0
- package/lib/Typography/style/index.css +505 -0
- package/lib/Typography/style/index.d.ts +1 -0
- package/lib/Typography/style/index.js +3 -0
- package/lib/_util/colors.d.ts +5 -0
- package/lib/_util/colors.js +14 -0
- package/lib/_util/getRenderPropValue.d.ts +3 -0
- package/lib/_util/getRenderPropValue.js +22 -0
- package/lib/_util/hooks/useFlexGapSupport.d.ts +2 -0
- package/lib/_util/hooks/useFlexGapSupport.js +30 -0
- package/lib/_util/hooks/useForceUpdate.d.ts +2 -0
- package/lib/_util/hooks/useForceUpdate.js +24 -0
- package/lib/_util/placements.d.ts +16 -0
- package/lib/_util/placements.js +98 -0
- package/lib/_util/responsiveObserve.d.ts +21 -0
- package/lib/_util/responsiveObserve.js +79 -0
- package/lib/_util/styleChecker.d.ts +4 -0
- package/lib/_util/styleChecker.js +52 -0
- package/lib/_util/transButton.d.ts +9 -0
- package/lib/_util/transButton.js +87 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.js +57 -1
- package/package.json +2 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type VoidFunction = () => void;
|
|
3
|
+
export interface IApprovalItemProps {
|
|
4
|
+
avator?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
time?: string;
|
|
7
|
+
type?: 'start' | 'comment' | 'carbonCopy' | 'agree' | 'refuse';
|
|
8
|
+
[prop: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface IApprovalProps {
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
title?: string;
|
|
13
|
+
close?: () => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
userType?: 'self' | 'approver';
|
|
17
|
+
status?: number;
|
|
18
|
+
steps?: [];
|
|
19
|
+
onComment: VoidFunction;
|
|
20
|
+
onRefuse: VoidFunction;
|
|
21
|
+
onAgree: VoidFunction;
|
|
22
|
+
}
|
|
23
|
+
declare const LMApproval: React.FC<IApprovalProps>;
|
|
24
|
+
export default LMApproval;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
|
|
4
|
+
for (var p in s) {
|
|
5
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
9
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import classNames from 'classnames';
|
|
16
|
+
import { Button, Drawer, Space } from '..';
|
|
17
|
+
var prefixCls = 'lm_approval';
|
|
18
|
+
var colors = ['#36BCF1', '#AE86DC', '#8BD248', '#F5A173'];
|
|
19
|
+
var statusMap = new Map([[1, '审核中'], [2, '已审核'], [3, '未通过']]);
|
|
20
|
+
var defaultStatus = 1;
|
|
21
|
+
|
|
22
|
+
var LMDrawer = function LMDrawer(props) {
|
|
23
|
+
var _props$visible = props.visible,
|
|
24
|
+
visible = _props$visible === void 0 ? false : _props$visible,
|
|
25
|
+
_props$title = props.title,
|
|
26
|
+
title = _props$title === void 0 ? '' : _props$title,
|
|
27
|
+
_props$status = props.status,
|
|
28
|
+
status = _props$status === void 0 ? defaultStatus : _props$status,
|
|
29
|
+
_props$userType = props.userType,
|
|
30
|
+
userType = _props$userType === void 0 ? 'self' : _props$userType,
|
|
31
|
+
close = props.close,
|
|
32
|
+
children = props.children,
|
|
33
|
+
_props$onComment = props.onComment,
|
|
34
|
+
onComment = _props$onComment === void 0 ? function () {} : _props$onComment,
|
|
35
|
+
_props$onRefuse = props.onRefuse,
|
|
36
|
+
onRefuse = _props$onRefuse === void 0 ? function () {} : _props$onRefuse,
|
|
37
|
+
_props$onAgree = props.onAgree,
|
|
38
|
+
onAgree = _props$onAgree === void 0 ? function () {} : _props$onAgree;
|
|
39
|
+
var currentStatusCls = classNames(prefixCls + '_title_status');
|
|
40
|
+
var drawerCls = classNames(prefixCls + '_drawer');
|
|
41
|
+
var statusText = statusMap.has(status) ? statusMap.get(status) : statusMap.get(1);
|
|
42
|
+
|
|
43
|
+
var handleClose = function handleClose() {
|
|
44
|
+
visible = false;
|
|
45
|
+
close();
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
49
|
+
className: drawerCls,
|
|
50
|
+
visible: visible,
|
|
51
|
+
title: title,
|
|
52
|
+
onClose: handleClose,
|
|
53
|
+
extra: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: currentStatusCls
|
|
55
|
+
}, /*#__PURE__*/React.createElement("span", null, statusText)), status === 1 && userType === 'approver' && /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
56
|
+
size: "small",
|
|
57
|
+
onClick: onComment
|
|
58
|
+
}, "\u4EC5\u8BC4\u8BBA"), /*#__PURE__*/React.createElement(Button, {
|
|
59
|
+
size: "small",
|
|
60
|
+
onClick: onRefuse,
|
|
61
|
+
style: {
|
|
62
|
+
borderColor: '#FA4F53',
|
|
63
|
+
color: '#FA4F53'
|
|
64
|
+
}
|
|
65
|
+
}, "\u62D2\u7EDD"), /*#__PURE__*/React.createElement(Button, {
|
|
66
|
+
size: "small",
|
|
67
|
+
onClick: onAgree,
|
|
68
|
+
type: "primary"
|
|
69
|
+
}, "\u540C\u610F")))
|
|
70
|
+
}, children);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
var ApprovalItem = function ApprovalItem(props) {
|
|
74
|
+
var _props$avator = props.avator,
|
|
75
|
+
avator = _props$avator === void 0 ? '' : _props$avator,
|
|
76
|
+
_props$name = props.name,
|
|
77
|
+
name = _props$name === void 0 ? '' : _props$name,
|
|
78
|
+
_props$time = props.time,
|
|
79
|
+
time = _props$time === void 0 ? '' : _props$time,
|
|
80
|
+
color = props.color,
|
|
81
|
+
status = props.status,
|
|
82
|
+
_props$type = props.type,
|
|
83
|
+
type = _props$type === void 0 ? 'start' : _props$type;
|
|
84
|
+
var itemCls = classNames(prefixCls + '_item');
|
|
85
|
+
var itemHeaderCls = classNames(itemCls + '_header');
|
|
86
|
+
var itemBodyCls = classNames(itemCls + '_body');
|
|
87
|
+
|
|
88
|
+
var getIcon = function getIcon() {
|
|
89
|
+
if (status === 1) {
|
|
90
|
+
return /*#__PURE__*/React.createElement("i", {
|
|
91
|
+
className: 'icon iconfont lmweb-icon_china1'
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (status === 2) {
|
|
96
|
+
return /*#__PURE__*/React.createElement("i", {
|
|
97
|
+
className: 'icon iconfont lmweb-icon_china1'
|
|
98
|
+
}); // return <img className='icon' src={fulfilledSvg} alt="" />
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (status === 3) {
|
|
102
|
+
return /*#__PURE__*/React.createElement("i", {
|
|
103
|
+
className: 'icon iconfont lmweb-icon_china1'
|
|
104
|
+
}); // return <img className='icon' src={rejectdSvg} alt="" />
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return null;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var getApprovalText = function getApprovalText() {
|
|
111
|
+
if (type === 'refuse') {
|
|
112
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: 'desc red'
|
|
114
|
+
}, "\u62D2\u7EDD");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (type === 'start') {
|
|
118
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
className: 'desc'
|
|
120
|
+
}, "\u53D1\u8D77\u5BA1\u6279");
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (type === 'comment') {
|
|
124
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
125
|
+
className: 'desc grey'
|
|
126
|
+
}, "\u4EC5\u8BC4\u8BBA");
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (type === 'carbonCopy') {
|
|
130
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
className: 'desc grey'
|
|
132
|
+
}, "\u5DF2\u6284\u90018\u4EBA");
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (type === 'agree') {
|
|
136
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: 'desc'
|
|
138
|
+
}, "\u5DF2\u540C\u610F");
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return null;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
var subname = name.substring(name.length - 1, name.length);
|
|
145
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
146
|
+
className: itemCls
|
|
147
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
148
|
+
className: itemHeaderCls
|
|
149
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
className: "avator"
|
|
151
|
+
}, avator ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
|
|
152
|
+
className: 'picture',
|
|
153
|
+
src: avator,
|
|
154
|
+
alt: ""
|
|
155
|
+
}), getIcon()) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
156
|
+
className: 'subname',
|
|
157
|
+
style: {
|
|
158
|
+
backgroundColor: color
|
|
159
|
+
}
|
|
160
|
+
}, subname), getIcon())), /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
className: "content"
|
|
162
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
className: 'name'
|
|
164
|
+
}, name), getApprovalText()), /*#__PURE__*/React.createElement("div", {
|
|
165
|
+
className: "right"
|
|
166
|
+
}, time)), type !== 'start' && /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: itemBodyCls
|
|
168
|
+
}, "sdf"));
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
var Approval = function Approval(props) {
|
|
172
|
+
var _props$status2 = props.status,
|
|
173
|
+
status = _props$status2 === void 0 ? 1 : _props$status2,
|
|
174
|
+
_props$steps = props.steps,
|
|
175
|
+
steps = _props$steps === void 0 ? [] : _props$steps;
|
|
176
|
+
var cacheColorMap = new Map();
|
|
177
|
+
steps.forEach(function (step, i) {
|
|
178
|
+
if (i === 0) {
|
|
179
|
+
step.status = status;
|
|
180
|
+
} else {
|
|
181
|
+
step.status = 2;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (!step.color) {
|
|
185
|
+
if (cacheColorMap.has(step.name)) {
|
|
186
|
+
step.color = cacheColorMap.get(step.name);
|
|
187
|
+
} else {
|
|
188
|
+
var index = parseInt(Math.random() * 4 + '');
|
|
189
|
+
var color = colors[index];
|
|
190
|
+
step.color = color;
|
|
191
|
+
cacheColorMap.set(step.name, color);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
var list = steps.map(function (step) {
|
|
196
|
+
return /*#__PURE__*/React.createElement(ApprovalItem, Object.assign({}, step));
|
|
197
|
+
});
|
|
198
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, list);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
var LMApproval = function LMApproval(props) {
|
|
202
|
+
var className = props.className,
|
|
203
|
+
others = __rest(props, ["className"]);
|
|
204
|
+
|
|
205
|
+
return /*#__PURE__*/React.createElement(LMDrawer, Object.assign({
|
|
206
|
+
className: classNames(className, prefixCls)
|
|
207
|
+
}, others), /*#__PURE__*/React.createElement(Approval, Object.assign({}, others)));
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
export default LMApproval;
|