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,66 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
export var responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
|
|
3
|
+
export var responsiveMap = {
|
|
4
|
+
xs: '(max-width: 575px)',
|
|
5
|
+
sm: '(min-width: 576px)',
|
|
6
|
+
md: '(min-width: 768px)',
|
|
7
|
+
lg: '(min-width: 992px)',
|
|
8
|
+
xl: '(min-width: 1200px)',
|
|
9
|
+
xxl: '(min-width: 1600px)'
|
|
10
|
+
};
|
|
11
|
+
var subscribers = new Map();
|
|
12
|
+
var subUid = -1;
|
|
13
|
+
var screens = {};
|
|
14
|
+
var responsiveObserve = {
|
|
15
|
+
matchHandlers: {},
|
|
16
|
+
dispatch: function dispatch(pointMap) {
|
|
17
|
+
screens = pointMap;
|
|
18
|
+
subscribers.forEach(function (func) {
|
|
19
|
+
return func(screens);
|
|
20
|
+
});
|
|
21
|
+
return subscribers.size >= 1;
|
|
22
|
+
},
|
|
23
|
+
subscribe: function subscribe(func) {
|
|
24
|
+
if (!subscribers.size) this.register();
|
|
25
|
+
subUid += 1;
|
|
26
|
+
subscribers.set(subUid, func);
|
|
27
|
+
func(screens);
|
|
28
|
+
return subUid;
|
|
29
|
+
},
|
|
30
|
+
unsubscribe: function unsubscribe(token) {
|
|
31
|
+
subscribers.delete(token);
|
|
32
|
+
if (!subscribers.size) this.unregister();
|
|
33
|
+
},
|
|
34
|
+
unregister: function unregister() {
|
|
35
|
+
var _this = this;
|
|
36
|
+
|
|
37
|
+
Object.keys(responsiveMap).forEach(function (screen) {
|
|
38
|
+
var matchMediaQuery = responsiveMap[screen];
|
|
39
|
+
var handler = _this.matchHandlers[matchMediaQuery];
|
|
40
|
+
handler === null || handler === void 0 ? void 0 : handler.mql.removeListener(handler === null || handler === void 0 ? void 0 : handler.listener);
|
|
41
|
+
});
|
|
42
|
+
subscribers.clear();
|
|
43
|
+
},
|
|
44
|
+
register: function register() {
|
|
45
|
+
var _this2 = this;
|
|
46
|
+
|
|
47
|
+
Object.keys(responsiveMap).forEach(function (screen) {
|
|
48
|
+
var matchMediaQuery = responsiveMap[screen];
|
|
49
|
+
|
|
50
|
+
var listener = function listener(_ref) {
|
|
51
|
+
var matches = _ref.matches;
|
|
52
|
+
|
|
53
|
+
_this2.dispatch(Object.assign(Object.assign({}, screens), _defineProperty({}, screen, matches)));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var mql = window.matchMedia(matchMediaQuery);
|
|
57
|
+
mql.addListener(listener);
|
|
58
|
+
_this2.matchHandlers[matchMediaQuery] = {
|
|
59
|
+
mql: mql,
|
|
60
|
+
listener: listener
|
|
61
|
+
};
|
|
62
|
+
listener(mql);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export default responsiveObserve;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import canUseDom from 'rc-util/lib/Dom/canUseDom';
|
|
2
|
+
import { isStyleSupport } from 'rc-util/lib/Dom/styleChecker';
|
|
3
|
+
export var canUseDocElement = function canUseDocElement() {
|
|
4
|
+
return canUseDom() && window.document.documentElement;
|
|
5
|
+
};
|
|
6
|
+
export { isStyleSupport };
|
|
7
|
+
var flexGapSupported;
|
|
8
|
+
export var detectFlexGapSupported = function detectFlexGapSupported() {
|
|
9
|
+
if (!canUseDocElement()) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (flexGapSupported !== undefined) {
|
|
14
|
+
return flexGapSupported;
|
|
15
|
+
} // create flex container with row-gap set
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var flex = document.createElement('div');
|
|
19
|
+
flex.style.display = 'flex';
|
|
20
|
+
flex.style.flexDirection = 'column';
|
|
21
|
+
flex.style.rowGap = '1px'; // create two, elements inside it
|
|
22
|
+
|
|
23
|
+
flex.appendChild(document.createElement('div'));
|
|
24
|
+
flex.appendChild(document.createElement('div')); // append to the DOM (needed to obtain scrollHeight)
|
|
25
|
+
|
|
26
|
+
document.body.appendChild(flex);
|
|
27
|
+
flexGapSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap
|
|
28
|
+
|
|
29
|
+
document.body.removeChild(flex);
|
|
30
|
+
return flexGapSupported;
|
|
31
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface TransButtonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
onClick?: (e?: React.MouseEvent<HTMLDivElement>) => void;
|
|
4
|
+
noStyle?: boolean;
|
|
5
|
+
autoFocus?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const TransButton: React.ForwardRefExoticComponent<TransButtonProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export default TransButton;
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
* Wrap of sub component which need use as Button capacity (like Icon component).
|
|
15
|
+
*
|
|
16
|
+
* This helps accessibility reader to tread as a interactive button to operation.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
import KeyCode from 'rc-util/lib/KeyCode';
|
|
21
|
+
import * as React from 'react';
|
|
22
|
+
var inlineStyle = {
|
|
23
|
+
border: 0,
|
|
24
|
+
background: 'transparent',
|
|
25
|
+
padding: 0,
|
|
26
|
+
lineHeight: 'inherit',
|
|
27
|
+
display: 'inline-block'
|
|
28
|
+
};
|
|
29
|
+
var TransButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
30
|
+
var onKeyDown = function onKeyDown(event) {
|
|
31
|
+
var keyCode = event.keyCode;
|
|
32
|
+
|
|
33
|
+
if (keyCode === KeyCode.ENTER) {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var onKeyUp = function onKeyUp(event) {
|
|
39
|
+
var keyCode = event.keyCode;
|
|
40
|
+
var onClick = props.onClick;
|
|
41
|
+
|
|
42
|
+
if (keyCode === KeyCode.ENTER && onClick) {
|
|
43
|
+
onClick();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var style = props.style,
|
|
48
|
+
noStyle = props.noStyle,
|
|
49
|
+
disabled = props.disabled,
|
|
50
|
+
restProps = __rest(props, ["style", "noStyle", "disabled"]);
|
|
51
|
+
|
|
52
|
+
var mergedStyle = {};
|
|
53
|
+
|
|
54
|
+
if (!noStyle) {
|
|
55
|
+
mergedStyle = Object.assign({}, inlineStyle);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (disabled) {
|
|
59
|
+
mergedStyle.pointerEvents = 'none';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
mergedStyle = Object.assign(Object.assign({}, mergedStyle), style);
|
|
63
|
+
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
64
|
+
role: "button",
|
|
65
|
+
tabIndex: 0,
|
|
66
|
+
ref: ref
|
|
67
|
+
}, restProps, {
|
|
68
|
+
onKeyDown: onKeyDown,
|
|
69
|
+
onKeyUp: onKeyUp,
|
|
70
|
+
style: mergedStyle
|
|
71
|
+
}));
|
|
72
|
+
});
|
|
73
|
+
export default TransButton;
|
package/es/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export { default as CustomTableOption } from './CustomTableOption';
|
|
|
45
45
|
export { default as Upload } from './Upload';
|
|
46
46
|
export type { UploadProps, UploadFile, RcFile } from './Upload';
|
|
47
47
|
export { default as Tooltip } from './Tooltip';
|
|
48
|
+
export type { TooltipProps } from './Tooltip';
|
|
48
49
|
export { default as Form } from './Form';
|
|
49
50
|
export { default as Spin } from './Spin';
|
|
50
51
|
export { default as LmEditTable } from './LmEditTable';
|
|
@@ -52,3 +53,16 @@ export { default as List } from './List';
|
|
|
52
53
|
export { default as LMQuickMenu } from './QuickMenu';
|
|
53
54
|
export { default as DatePicker } from './DatePicker';
|
|
54
55
|
export type { DatePickerProps, MonthPickerProps, WeekPickerProps, RangePickerProps } from './DatePicker';
|
|
56
|
+
export { default as Popover } from './Popover';
|
|
57
|
+
export type { PopoverProps } from './Popover';
|
|
58
|
+
export { default as Typography } from './Typography';
|
|
59
|
+
export type { TypographyProps } from './Typography';
|
|
60
|
+
export { default as AutoComplete } from './AutoComplete';
|
|
61
|
+
export type { AutoCompleteProps } from './AutoComplete';
|
|
62
|
+
export { default as Grid } from './Grid';
|
|
63
|
+
export { default as Row } from './Row';
|
|
64
|
+
export type { RowProps } from './Row';
|
|
65
|
+
export { default as Col } from './Col';
|
|
66
|
+
export type { ColProps } from './Col';
|
|
67
|
+
export { default as Layout } from './Layout';
|
|
68
|
+
export type { LayoutProps, SiderProps } from './Layout';
|
package/es/index.js
CHANGED
|
@@ -48,4 +48,11 @@ export { default as Spin } from './Spin';
|
|
|
48
48
|
export { default as LmEditTable } from './LmEditTable';
|
|
49
49
|
export { default as List } from './List';
|
|
50
50
|
export { default as LMQuickMenu } from './QuickMenu';
|
|
51
|
-
export { default as DatePicker } from './DatePicker';
|
|
51
|
+
export { default as DatePicker } from './DatePicker';
|
|
52
|
+
export { default as Popover } from './Popover';
|
|
53
|
+
export { default as Typography } from './Typography';
|
|
54
|
+
export { default as AutoComplete } from './AutoComplete';
|
|
55
|
+
export { default as Grid } from './Grid';
|
|
56
|
+
export { default as Row } from './Row';
|
|
57
|
+
export { default as Col } from './Col';
|
|
58
|
+
export { default as Layout } from './Layout';
|
|
@@ -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,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _ = require("..");
|
|
15
|
+
|
|
16
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
|
|
19
|
+
for (var p in s) {
|
|
20
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
24
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var prefixCls = 'lm_approval';
|
|
30
|
+
var colors = ['#36BCF1', '#AE86DC', '#8BD248', '#F5A173'];
|
|
31
|
+
var statusMap = new Map([[1, '审核中'], [2, '已审核'], [3, '未通过']]);
|
|
32
|
+
var defaultStatus = 1;
|
|
33
|
+
|
|
34
|
+
var LMDrawer = function LMDrawer(props) {
|
|
35
|
+
var _props$visible = props.visible,
|
|
36
|
+
visible = _props$visible === void 0 ? false : _props$visible,
|
|
37
|
+
_props$title = props.title,
|
|
38
|
+
title = _props$title === void 0 ? '' : _props$title,
|
|
39
|
+
_props$status = props.status,
|
|
40
|
+
status = _props$status === void 0 ? defaultStatus : _props$status,
|
|
41
|
+
_props$userType = props.userType,
|
|
42
|
+
userType = _props$userType === void 0 ? 'self' : _props$userType,
|
|
43
|
+
close = props.close,
|
|
44
|
+
children = props.children,
|
|
45
|
+
_props$onComment = props.onComment,
|
|
46
|
+
onComment = _props$onComment === void 0 ? function () {} : _props$onComment,
|
|
47
|
+
_props$onRefuse = props.onRefuse,
|
|
48
|
+
onRefuse = _props$onRefuse === void 0 ? function () {} : _props$onRefuse,
|
|
49
|
+
_props$onAgree = props.onAgree,
|
|
50
|
+
onAgree = _props$onAgree === void 0 ? function () {} : _props$onAgree;
|
|
51
|
+
var currentStatusCls = (0, _classnames.default)(prefixCls + '_title_status');
|
|
52
|
+
var drawerCls = (0, _classnames.default)(prefixCls + '_drawer');
|
|
53
|
+
var statusText = statusMap.has(status) ? statusMap.get(status) : statusMap.get(1);
|
|
54
|
+
|
|
55
|
+
var handleClose = function handleClose() {
|
|
56
|
+
visible = false;
|
|
57
|
+
close();
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_.Drawer, {
|
|
61
|
+
className: drawerCls,
|
|
62
|
+
visible: visible,
|
|
63
|
+
title: title,
|
|
64
|
+
onClose: handleClose,
|
|
65
|
+
extra: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: currentStatusCls
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, statusText)), status === 1 && userType === 'approver' && /*#__PURE__*/_react.default.createElement(_.Space, null, /*#__PURE__*/_react.default.createElement(_.Button, {
|
|
68
|
+
size: "small",
|
|
69
|
+
onClick: onComment
|
|
70
|
+
}, "\u4EC5\u8BC4\u8BBA"), /*#__PURE__*/_react.default.createElement(_.Button, {
|
|
71
|
+
size: "small",
|
|
72
|
+
onClick: onRefuse,
|
|
73
|
+
style: {
|
|
74
|
+
borderColor: '#FA4F53',
|
|
75
|
+
color: '#FA4F53'
|
|
76
|
+
}
|
|
77
|
+
}, "\u62D2\u7EDD"), /*#__PURE__*/_react.default.createElement(_.Button, {
|
|
78
|
+
size: "small",
|
|
79
|
+
onClick: onAgree,
|
|
80
|
+
type: "primary"
|
|
81
|
+
}, "\u540C\u610F")))
|
|
82
|
+
}, children);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
var ApprovalItem = function ApprovalItem(props) {
|
|
86
|
+
var _props$avator = props.avator,
|
|
87
|
+
avator = _props$avator === void 0 ? '' : _props$avator,
|
|
88
|
+
_props$name = props.name,
|
|
89
|
+
name = _props$name === void 0 ? '' : _props$name,
|
|
90
|
+
_props$time = props.time,
|
|
91
|
+
time = _props$time === void 0 ? '' : _props$time,
|
|
92
|
+
color = props.color,
|
|
93
|
+
status = props.status,
|
|
94
|
+
_props$type = props.type,
|
|
95
|
+
type = _props$type === void 0 ? 'start' : _props$type;
|
|
96
|
+
var itemCls = (0, _classnames.default)(prefixCls + '_item');
|
|
97
|
+
var itemHeaderCls = (0, _classnames.default)(itemCls + '_header');
|
|
98
|
+
var itemBodyCls = (0, _classnames.default)(itemCls + '_body');
|
|
99
|
+
|
|
100
|
+
var getIcon = function getIcon() {
|
|
101
|
+
if (status === 1) {
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement("i", {
|
|
103
|
+
className: 'icon iconfont lmweb-icon_china1'
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (status === 2) {
|
|
108
|
+
return /*#__PURE__*/_react.default.createElement("i", {
|
|
109
|
+
className: 'icon iconfont lmweb-icon_china1'
|
|
110
|
+
}); // return <img className='icon' src={fulfilledSvg} alt="" />
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (status === 3) {
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement("i", {
|
|
115
|
+
className: 'icon iconfont lmweb-icon_china1'
|
|
116
|
+
}); // return <img className='icon' src={rejectdSvg} alt="" />
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return null;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var getApprovalText = function getApprovalText() {
|
|
123
|
+
if (type === 'refuse') {
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
+
className: 'desc red'
|
|
126
|
+
}, "\u62D2\u7EDD");
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (type === 'start') {
|
|
130
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
+
className: 'desc'
|
|
132
|
+
}, "\u53D1\u8D77\u5BA1\u6279");
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (type === 'comment') {
|
|
136
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
137
|
+
className: 'desc grey'
|
|
138
|
+
}, "\u4EC5\u8BC4\u8BBA");
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (type === 'carbonCopy') {
|
|
142
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
+
className: 'desc grey'
|
|
144
|
+
}, "\u5DF2\u6284\u90018\u4EBA");
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (type === 'agree') {
|
|
148
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
149
|
+
className: 'desc'
|
|
150
|
+
}, "\u5DF2\u540C\u610F");
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return null;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
var subname = name.substring(name.length - 1, name.length);
|
|
157
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
158
|
+
className: itemCls
|
|
159
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
160
|
+
className: itemHeaderCls
|
|
161
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
162
|
+
className: "avator"
|
|
163
|
+
}, avator ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
164
|
+
className: 'picture',
|
|
165
|
+
src: avator,
|
|
166
|
+
alt: ""
|
|
167
|
+
}), getIcon()) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
168
|
+
className: 'subname',
|
|
169
|
+
style: {
|
|
170
|
+
backgroundColor: color
|
|
171
|
+
}
|
|
172
|
+
}, subname), getIcon())), /*#__PURE__*/_react.default.createElement("div", {
|
|
173
|
+
className: "content"
|
|
174
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
175
|
+
className: 'name'
|
|
176
|
+
}, name), getApprovalText()), /*#__PURE__*/_react.default.createElement("div", {
|
|
177
|
+
className: "right"
|
|
178
|
+
}, time)), type !== 'start' && /*#__PURE__*/_react.default.createElement("div", {
|
|
179
|
+
className: itemBodyCls
|
|
180
|
+
}, "sdf"));
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
var Approval = function Approval(props) {
|
|
184
|
+
var _props$status2 = props.status,
|
|
185
|
+
status = _props$status2 === void 0 ? 1 : _props$status2,
|
|
186
|
+
_props$steps = props.steps,
|
|
187
|
+
steps = _props$steps === void 0 ? [] : _props$steps;
|
|
188
|
+
var cacheColorMap = new Map();
|
|
189
|
+
steps.forEach(function (step, i) {
|
|
190
|
+
if (i === 0) {
|
|
191
|
+
step.status = status;
|
|
192
|
+
} else {
|
|
193
|
+
step.status = 2;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (!step.color) {
|
|
197
|
+
if (cacheColorMap.has(step.name)) {
|
|
198
|
+
step.color = cacheColorMap.get(step.name);
|
|
199
|
+
} else {
|
|
200
|
+
var index = parseInt(Math.random() * 4 + '');
|
|
201
|
+
var color = colors[index];
|
|
202
|
+
step.color = color;
|
|
203
|
+
cacheColorMap.set(step.name, color);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
var list = steps.map(function (step) {
|
|
208
|
+
return /*#__PURE__*/_react.default.createElement(ApprovalItem, Object.assign({}, step));
|
|
209
|
+
});
|
|
210
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, list);
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
var LMApproval = function LMApproval(props) {
|
|
214
|
+
var className = props.className,
|
|
215
|
+
others = __rest(props, ["className"]);
|
|
216
|
+
|
|
217
|
+
return /*#__PURE__*/_react.default.createElement(LMDrawer, Object.assign({
|
|
218
|
+
className: (0, _classnames.default)(className, prefixCls)
|
|
219
|
+
}, others), /*#__PURE__*/_react.default.createElement(Approval, Object.assign({}, others)));
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
var _default = LMApproval;
|
|
223
|
+
exports.default = _default;
|