dtable-ui-component 0.1.75-beta1 → 0.1.75-beta10
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 +15 -2
- package/lib/AutoNumberFormatter/index.css +1 -0
- package/{es/components/cell-formatter/auto-number-formatter.js → lib/AutoNumberFormatter/index.js} +1 -0
- package/lib/ButtonFormatter/index.css +13 -0
- package/{es/components/cell-formatter/button-formatter.js → lib/ButtonFormatter/index.js} +1 -0
- package/lib/CTimeFormatter/index.css +1 -0
- package/{es/components/cell-formatter/ctime-formatter.js → lib/CTimeFormatter/index.js} +1 -0
- package/{es/components/cell-editor/checkbox-editor.js → lib/CheckboxEditor/index.js} +0 -0
- package/lib/CheckboxFormatter/index.css +1 -0
- package/{es/components/cell-formatter/checkbox-formatter.js → lib/CheckboxFormatter/index.js} +1 -0
- package/lib/CollaboratorEditor/index.css +48 -0
- package/{es/components/cell-editor/collaborator-editor.js → lib/CollaboratorEditor/index.js} +6 -5
- package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.css +86 -0
- package/{es/components/cell-editor-popover/mb-collaborator-editor-popover.js → lib/CollaboratorEditor/mb-collaborator-editor-popover/index.js} +2 -1
- package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.css +1 -0
- package/{es/components/cell-editor-popover/pc-collaborator-editor-popover.js → lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js} +2 -1
- package/lib/CollaboratorFormatter/index.css +1 -0
- package/{es/components/cell-formatter/collaborator-formatter.js → lib/CollaboratorFormatter/index.js} +3 -2
- package/lib/CollaboratorItem/index.css +49 -0
- package/{es/components/common/collaborator-item.js → lib/CollaboratorItem/index.js} +1 -0
- package/lib/CreatorFormatter/index.css +1 -0
- package/{es/components/cell-formatter/creator-formatter.js → lib/CreatorFormatter/index.js} +3 -2
- package/lib/DateEditor/index.css +4 -0
- package/{es/components/cell-editor/date-editor.js → lib/DateEditor/index.js} +5 -4
- package/{es/css → lib/DateEditor/mb-date-editor-popover}/custom-rc-calendar.css +0 -0
- package/lib/DateEditor/mb-date-editor-popover/index.css +45 -0
- package/{es/components/cell-editor-popover/mb-date-editor-popover.js → lib/DateEditor/mb-date-editor-popover/index.js} +10 -10
- package/{es/components/cell-editor-popover → lib/DateEditor}/pc-date-editor-popover.js +2 -2
- package/lib/DateFormatter/index.css +1 -0
- package/{es/components/cell-formatter/date-formatter.js → lib/DateFormatter/index.js} +2 -1
- package/lib/DurationFormatter/index.css +1 -0
- package/{es/components/cell-formatter/duration-formatter.js → lib/DurationFormatter/index.js} +2 -1
- package/{es/components/common/edit-editor-button.js → lib/EditEditorButton/index.js} +0 -0
- package/lib/EmailFormatter/index.css +5 -0
- package/{es/components/cell-formatter/email-formatter.js → lib/EmailFormatter/index.js} +1 -0
- package/{es/components/cell-editor-dialog/pc-file-editor-dialog.js → lib/FileEditor/index.js} +10 -10
- package/{es/components/cell-editor-dialog → lib/FileEditor}/pc-files-addition/index.js +0 -0
- package/{es/components/cell-editor-dialog → lib/FileEditor}/pc-files-addition/pc-file-uploaded-item.js +0 -0
- package/{es/components/cell-editor-dialog → lib/FileEditor}/pc-files-preview/index.js +0 -0
- package/{es/components/cell-editor-dialog → lib/FileEditor}/pc-files-preview/pc-file-item-preview.js +0 -0
- package/lib/FileFormatter/index.css +29 -0
- package/{es/components/cell-formatter/file-formatter.js → lib/FileFormatter/index.js} +2 -1
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/excel.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/file.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/music.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/pdf.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/pic.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/ppt.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/txt.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/video.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/192/word.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/excel.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/file.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/music.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/pdf.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/pic.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/ppt.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/txt.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/video.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/file/24/word.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/folder/folder-192.png +0 -0
- package/{es/assets/images → lib/FileItemFormatter/assets}/folder/folder-24.png +0 -0
- package/{es/components/cell-formatter/widgets/file-item-formatter.js → lib/FileItemFormatter/index.js} +2 -2
- package/lib/FileItemFormatter/utils.js +72 -0
- package/{es/components/file-uploader → lib/FileUploader}/index.js +0 -0
- package/{es/utils → lib/FormulaFormatter}/cell-value-validator.js +1 -2
- package/lib/FormulaFormatter/index.css +19 -0
- package/{es/components/cell-formatter/formula-formatter.js → lib/FormulaFormatter/index.js} +7 -8
- package/{es/utils/column-utils.js → lib/FormulaFormatter/utils.js} +5 -1
- package/lib/GeolocationFormatter/index.css +1 -0
- package/{es/components/cell-formatter/geolocation-formatter.js → lib/GeolocationFormatter/index.js} +2 -1
- package/lib/HtmlLongTextFormatter/index.css +63 -0
- package/{es/components/cell-formatter/widgets/long-text-formatter/html-long-text-formatter.js → lib/HtmlLongTextFormatter/index.js} +2 -1
- package/{es/utils → lib/HtmlLongTextFormatter}/markdown2html.js +0 -0
- package/{es/utils → lib/HtmlLongTextFormatter}/unified/index.js +1 -0
- package/{es/utils → lib/HtmlLongTextFormatter}/vfile/core.js +1 -0
- package/{es/utils → lib/HtmlLongTextFormatter}/vfile/index.js +0 -0
- package/{es/components/common → lib/ImageFormatter}/images-lazy-load.js +2 -2
- package/lib/ImageFormatter/index.css +34 -0
- package/{es/components/cell-formatter/image-formatter.js → lib/ImageFormatter/index.js} +4 -3
- package/lib/ImageFormatter/utils.js +7 -0
- package/{es/css/image-previewer-ligntbox.css → lib/ImagePreviewerLightbox/index.css} +0 -0
- package/{es/components/cell-formatter/widgets/image-previewer-lightbox.js → lib/ImagePreviewerLightbox/index.js} +3 -3
- package/lib/ImagePreviewerLightbox/utils.js +8 -0
- package/lib/LastModifierFormatter/index.css +1 -0
- package/{es/components/cell-formatter/last-modifier-formatter.js → lib/LastModifierFormatter/index.js} +5 -4
- package/lib/LinkEditor/index.css +9 -0
- package/{es/components/cell-editor/link-editor.js → lib/LinkEditor/index.js} +10 -9
- package/{es/components/common → lib/LinkEditor}/link-editor-option.js +0 -0
- package/lib/LinkEditor/mb-link-editor-popover/index.css +85 -0
- package/{es/components/cell-editor-popover/mb-link-editor-popover.js → lib/LinkEditor/mb-link-editor-popover/index.js} +2 -1
- package/lib/LinkEditor/pc-link-editor-popover/index.css +63 -0
- package/{es/components/cell-editor-popover/pc-link-editor-popover.js → lib/LinkEditor/pc-link-editor-popover/index.js} +1 -0
- package/lib/LinkFormatter/index.css +27 -0
- package/{es/components/cell-formatter/link-formatter.js → lib/LinkFormatter/index.js} +2 -2
- package/{es/css/loading.css → lib/Loading/index.css} +0 -0
- package/{es/components/loading.js → lib/Loading/index.js} +1 -1
- package/{es/components/cell-formatter/long-text-formatter.js → lib/LongTextFormatter/index.js} +2 -2
- package/{es/components/common/mobile/mb-editor-header.js → lib/MBEditorHeader/index.js} +0 -0
- package/lib/MTimeFormatter/index.css +1 -0
- package/{es/components/cell-formatter/mtime-formatter.js → lib/MTimeFormatter/index.js} +1 -0
- package/{es/components/common/modal-portal.js → lib/ModalPortal/index.js} +0 -0
- package/lib/MultipleSelectEditor/index.css +9 -0
- package/{es/components/cell-editor/multiple-select-editor.js → lib/MultipleSelectEditor/index.js} +5 -6
- package/lib/MultipleSelectFormatter/index.css +1 -0
- package/{es/components/cell-formatter/multiple-select-formatter.js → lib/MultipleSelectFormatter/index.js} +2 -1
- package/{es/components/cell-editor/number-editor.js → lib/NumberEditor/index.js} +2 -2
- package/lib/NumberFormatter/index.css +1 -0
- package/{es/components/cell-formatter/number-formatter.js → lib/NumberFormatter/index.js} +2 -1
- package/lib/RateFormatter/index.css +1 -0
- package/{es/components/cell-formatter/rate-formatter.js → lib/RateFormatter/index.js} +1 -0
- package/{es/components/common/select-item.js → lib/SelectItem/index.js} +0 -0
- package/lib/SimpleLongTextFormatter/index.css +63 -0
- package/{es/components/cell-formatter/widgets/long-text-formatter/simple-long-text-formatter.js → lib/SimpleLongTextFormatter/index.js} +2 -1
- package/{es/utils → lib/SimpleLongTextFormatter}/normalize-long-text-value.js +3 -3
- package/lib/SingleSelectEditor/index.css +9 -0
- package/{es/components/cell-editor/single-select-editor.js → lib/SingleSelectEditor/index.js} +5 -6
- package/lib/SingleSelectFormatter/index.css +1 -0
- package/{es/components/cell-formatter/single-select-formatter.js → lib/SingleSelectFormatter/index.js} +2 -1
- package/{es/components/cell-editor/text-editor.js → lib/TextEditor/index.js} +2 -2
- package/lib/TextFormatter/index.css +1 -0
- package/{es/components/cell-formatter/text-formatter.js → lib/TextFormatter/index.js} +1 -0
- package/lib/UrlFormatter/index.css +5 -0
- package/{es/components/cell-formatter/url-formatter.js → lib/UrlFormatter/index.js} +1 -0
- package/{es/components/cell-factory/cell-formatter-factory.js → lib/cellFormatterFactory/index.js} +3 -3
- package/lib/constants/cell-types.js +25 -54
- package/lib/constants/index.js +5 -26
- package/lib/css/cell-editor.css +0 -608
- package/lib/css/cell-formatter.css +0 -243
- package/lib/css/mb-cell-editor.css +55 -0
- package/lib/formatterConfig/index.js +31 -0
- package/lib/index.js +45 -64
- package/lib/lang/index.js +11 -27
- package/lib/locals/de.js +1 -6
- package/lib/locals/en.js +1 -6
- package/lib/locals/fr.js +1 -6
- package/lib/locals/zh-CN.js +1 -6
- package/lib/select-editor/index.js +4 -0
- package/lib/select-editor/mb-select-editor-popover/index.css +127 -0
- package/{es/components/cell-editor-popover/mb-select-editor-popover.js → lib/select-editor/mb-select-editor-popover/index.js} +12 -11
- package/lib/select-editor/pc-select-editor-popover/index.css +72 -0
- package/{es/components/cell-editor-popover/pc-select-editor-popover.js → lib/select-editor/pc-select-editor-popover/index.js} +1 -0
- package/{es/components/common → lib/select-editor}/select-editor-option.js +0 -0
- package/{es/components/toast → lib/toaster}/alert.js +0 -0
- package/{es/components/toast → lib/toaster}/index.js +0 -0
- package/{es/components/toast → lib/toaster}/toast.js +0 -0
- package/{es/components/toast → lib/toaster}/toastManager.js +0 -0
- package/{es/components/toast → lib/toaster}/toaster.js +0 -0
- package/lib/utils/editor-utils.js +3 -13
- package/lib/utils/number-precision.js +14 -31
- package/lib/utils/utils.js +3 -119
- package/lib/utils/value-format-utils.js +59 -108
- package/package.json +5 -5
- package/es/app.css +0 -20
- package/es/app.js +0 -91
- package/es/assets/images/avatar/default_avatar.png +0 -0
- package/es/components/cell-editor/index.js +0 -9
- package/es/components/cell-formatter/formatter-config.js +0 -31
- package/es/components/cell-formatter/index.js +0 -27
- package/es/constants/cell-types.js +0 -25
- package/es/constants/index.js +0 -48
- package/es/css/cell-editor.css +0 -614
- package/es/css/cell-formatter.css +0 -247
- package/es/index.js +0 -6
- package/es/lang/index.js +0 -50
- package/es/locals/de.js +0 -2
- package/es/locals/en.js +0 -17
- package/es/locals/fr.js +0 -2
- package/es/locals/zh-CN.js +0 -17
- package/es/utils/editor-utils.js +0 -71
- package/es/utils/number-precision.js +0 -163
- package/es/utils/utils.js +0 -116
- package/es/utils/value-format-utils.js +0 -495
- package/lib/app.css +0 -20
- package/lib/app.js +0 -96
- package/lib/assets/images/file/192/excel.png +0 -0
- package/lib/assets/images/file/192/file.png +0 -0
- package/lib/assets/images/file/192/music.png +0 -0
- package/lib/assets/images/file/192/pdf.png +0 -0
- package/lib/assets/images/file/192/pic.png +0 -0
- package/lib/assets/images/file/192/ppt.png +0 -0
- package/lib/assets/images/file/192/txt.png +0 -0
- package/lib/assets/images/file/192/video.png +0 -0
- package/lib/assets/images/file/192/word.png +0 -0
- package/lib/assets/images/file/24/excel.png +0 -0
- package/lib/assets/images/file/24/file.png +0 -0
- package/lib/assets/images/file/24/music.png +0 -0
- package/lib/assets/images/file/24/pdf.png +0 -0
- package/lib/assets/images/file/24/pic.png +0 -0
- package/lib/assets/images/file/24/ppt.png +0 -0
- package/lib/assets/images/file/24/txt.png +0 -0
- package/lib/assets/images/file/24/video.png +0 -0
- package/lib/assets/images/file/24/word.png +0 -0
- package/lib/assets/images/folder/folder-192.png +0 -0
- package/lib/assets/images/folder/folder-24.png +0 -0
- package/lib/components/cell-editor/checkbox-editor.js +0 -111
- package/lib/components/cell-editor/collaborator-editor.js +0 -249
- package/lib/components/cell-editor/date-editor.js +0 -171
- package/lib/components/cell-editor/index.js +0 -40
- package/lib/components/cell-editor/link-editor.js +0 -321
- package/lib/components/cell-editor/multiple-select-editor.js +0 -250
- package/lib/components/cell-editor/number-editor.js +0 -162
- package/lib/components/cell-editor/single-select-editor.js +0 -216
- package/lib/components/cell-editor/text-editor.js +0 -129
- package/lib/components/cell-editor-dialog/pc-file-editor-dialog.js +0 -66
- package/lib/components/cell-editor-dialog/pc-files-addition/index.js +0 -1
- package/lib/components/cell-editor-dialog/pc-files-addition/pc-file-uploaded-item.js +0 -1
- package/lib/components/cell-editor-dialog/pc-files-preview/index.js +0 -1
- package/lib/components/cell-editor-dialog/pc-files-preview/pc-file-item-preview.js +0 -1
- package/lib/components/cell-editor-popover/mb-collaborator-editor-popover.js +0 -183
- package/lib/components/cell-editor-popover/mb-date-editor-popover.js +0 -262
- package/lib/components/cell-editor-popover/mb-link-editor-popover.js +0 -176
- package/lib/components/cell-editor-popover/mb-select-editor-popover.js +0 -243
- package/lib/components/cell-editor-popover/pc-collaborator-editor-popover.js +0 -124
- package/lib/components/cell-editor-popover/pc-date-editor-popover.js +0 -156
- package/lib/components/cell-editor-popover/pc-link-editor-popover.js +0 -128
- package/lib/components/cell-editor-popover/pc-select-editor-popover.js +0 -157
- package/lib/components/cell-factory/cell-formatter-factory.js +0 -28
- package/lib/components/cell-formatter/auto-number-formatter.js +0 -45
- package/lib/components/cell-formatter/button-formatter.js +0 -66
- package/lib/components/cell-formatter/checkbox-formatter.js +0 -56
- package/lib/components/cell-formatter/collaborator-formatter.js +0 -111
- package/lib/components/cell-formatter/creator-formatter.js +0 -105
- package/lib/components/cell-formatter/ctime-formatter.js +0 -70
- package/lib/components/cell-formatter/date-formatter.js +0 -73
- package/lib/components/cell-formatter/duration-formatter.js +0 -49
- package/lib/components/cell-formatter/email-formatter.js +0 -45
- package/lib/components/cell-formatter/file-formatter.js +0 -77
- package/lib/components/cell-formatter/formatter-config.js +0 -66
- package/lib/components/cell-formatter/formula-formatter.js +0 -189
- package/lib/components/cell-formatter/geolocation-formatter.js +0 -66
- package/lib/components/cell-formatter/image-formatter.js +0 -171
- package/lib/components/cell-formatter/index.js +0 -112
- package/lib/components/cell-formatter/last-modifier-formatter.js +0 -105
- package/lib/components/cell-formatter/link-formatter.js +0 -165
- package/lib/components/cell-formatter/long-text-formatter.js +0 -46
- package/lib/components/cell-formatter/mtime-formatter.js +0 -70
- package/lib/components/cell-formatter/multiple-select-formatter.js +0 -84
- package/lib/components/cell-formatter/number-formatter.js +0 -60
- package/lib/components/cell-formatter/rate-formatter.js +0 -93
- package/lib/components/cell-formatter/single-select-formatter.js +0 -84
- package/lib/components/cell-formatter/text-formatter.js +0 -67
- package/lib/components/cell-formatter/url-formatter.js +0 -45
- package/lib/components/cell-formatter/widgets/file-item-formatter.js +0 -63
- package/lib/components/cell-formatter/widgets/image-previewer-lightbox.js +0 -152
- package/lib/components/cell-formatter/widgets/long-text-formatter/html-long-text-formatter.js +0 -107
- package/lib/components/cell-formatter/widgets/long-text-formatter/simple-long-text-formatter.js +0 -110
- package/lib/components/common/collaborator-item.js +0 -79
- package/lib/components/common/edit-editor-button.js +0 -67
- package/lib/components/common/images-lazy-load.js +0 -158
- package/lib/components/common/link-editor-option.js +0 -121
- package/lib/components/common/mobile/mb-editor-header.js +0 -61
- package/lib/components/common/modal-portal.js +0 -51
- package/lib/components/common/select-editor-option.js +0 -122
- package/lib/components/common/select-item.js +0 -73
- package/lib/components/file-uploader/index.js +0 -63
- package/lib/components/loading.js +0 -16
- package/lib/components/toast/alert.js +0 -164
- package/lib/components/toast/index.js +0 -12
- package/lib/components/toast/toast.js +0 -223
- package/lib/components/toast/toastManager.js +0 -189
- package/lib/components/toast/toaster.js +0 -92
- package/lib/css/custom-rc-calendar.css +0 -118
- package/lib/css/image-previewer-ligntbox.css +0 -87
- package/lib/css/loading.css +0 -54
- package/lib/utils/cell-value-validator.js +0 -41
- package/lib/utils/column-utils.js +0 -15
- package/lib/utils/markdown2html.js +0 -68
- package/lib/utils/normalize-long-text-value.js +0 -74
- package/lib/utils/unified/index.js +0 -470
- package/lib/utils/vfile/core.js +0 -172
- package/lib/utils/vfile/index.js +0 -48
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
9
|
-
|
|
10
|
-
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
|
|
11
|
-
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
|
-
var _glamor = require("glamor");
|
|
17
|
-
|
|
18
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
-
|
|
20
|
-
var _Transition = _interopRequireDefault(require("react-transition-group/Transition"));
|
|
21
|
-
|
|
22
|
-
var _alert = _interopRequireDefault(require("./alert"));
|
|
23
|
-
|
|
24
|
-
var animationEasing = {
|
|
25
|
-
deceleration: 'cubic-bezier(0.0, 0.0, 0.2, 1)',
|
|
26
|
-
acceleration: 'cubic-bezier(0.4, 0.0, 1, 1)',
|
|
27
|
-
spring: 'cubic-bezier(0.175, 0.885, 0.320, 1.175)'
|
|
28
|
-
};
|
|
29
|
-
var ANIMATION_DURATION = 240;
|
|
30
|
-
|
|
31
|
-
var openAnimation = _glamor.css.keyframes('openAnimation', {
|
|
32
|
-
from: {
|
|
33
|
-
opacity: 0,
|
|
34
|
-
transform: 'translateY(-120%)'
|
|
35
|
-
},
|
|
36
|
-
to: {
|
|
37
|
-
transform: 'translateY(0)'
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
var closeAnimation = _glamor.css.keyframes('closeAnimation', {
|
|
42
|
-
from: {
|
|
43
|
-
transform: 'scale(1)',
|
|
44
|
-
opacity: 1
|
|
45
|
-
},
|
|
46
|
-
to: {
|
|
47
|
-
transform: 'scale(0.9)',
|
|
48
|
-
opacity: 0
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
var animationStyles = (0, _glamor.css)({
|
|
53
|
-
display: 'flex',
|
|
54
|
-
flexDirection: 'column',
|
|
55
|
-
alignItems: 'center',
|
|
56
|
-
height: 0,
|
|
57
|
-
transition: "all " + ANIMATION_DURATION + "ms " + animationEasing.deceleration,
|
|
58
|
-
'&[data-state="entering"], &[data-state="entered"]': {
|
|
59
|
-
animation: openAnimation + " " + ANIMATION_DURATION + "ms " + animationEasing.spring + " both"
|
|
60
|
-
},
|
|
61
|
-
'&[data-state="exiting"]': {
|
|
62
|
-
animation: closeAnimation + " 120ms " + animationEasing.acceleration + " both"
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
var Toast = /*#__PURE__*/function (_React$PureComponent) {
|
|
67
|
-
(0, _inheritsLoose2.default)(Toast, _React$PureComponent);
|
|
68
|
-
|
|
69
|
-
function Toast() {
|
|
70
|
-
var _this;
|
|
71
|
-
|
|
72
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
73
|
-
args[_key] = arguments[_key];
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
_this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;
|
|
77
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
78
|
-
isShown: true,
|
|
79
|
-
height: 0
|
|
80
|
-
});
|
|
81
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "close", function () {
|
|
82
|
-
_this.clearCloseTimer();
|
|
83
|
-
|
|
84
|
-
_this.setState({
|
|
85
|
-
isShown: false
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startCloseTimer", function () {
|
|
89
|
-
if (_this.props.duration) {
|
|
90
|
-
_this.closeTimer = setTimeout(function () {
|
|
91
|
-
_this.close();
|
|
92
|
-
}, _this.props.duration * 1000);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "clearCloseTimer", function () {
|
|
96
|
-
if (_this.closeTimer) {
|
|
97
|
-
clearTimeout(_this.closeTimer);
|
|
98
|
-
_this.closeTimer = null;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMouseEnter", function () {
|
|
102
|
-
_this.clearCloseTimer();
|
|
103
|
-
});
|
|
104
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMouseLeave", function () {
|
|
105
|
-
_this.startCloseTimer();
|
|
106
|
-
});
|
|
107
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onRef", function (ref) {
|
|
108
|
-
if (ref === null) return;
|
|
109
|
-
|
|
110
|
-
var _ref$getBoundingClien = ref.getBoundingClientRect(),
|
|
111
|
-
height = _ref$getBoundingClien.height;
|
|
112
|
-
|
|
113
|
-
_this.setState({
|
|
114
|
-
height: height
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
return _this;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
var _proto = Toast.prototype;
|
|
121
|
-
|
|
122
|
-
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
123
|
-
if (prevProps.isShown !== this.props.isShown) {
|
|
124
|
-
// eslint-disable-next-line react/no-did-update-set-state
|
|
125
|
-
this.setState({
|
|
126
|
-
isShown: this.props.isShown
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
_proto.componentDidMount = function componentDidMount() {
|
|
132
|
-
this.startCloseTimer();
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
136
|
-
this.clearCloseTimer();
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
_proto.render = function render() {
|
|
140
|
-
var _this2 = this;
|
|
141
|
-
|
|
142
|
-
return /*#__PURE__*/_react.default.createElement(_Transition.default, {
|
|
143
|
-
appear: true,
|
|
144
|
-
unmountOnExit: true,
|
|
145
|
-
timeout: ANIMATION_DURATION,
|
|
146
|
-
in: this.state.isShown,
|
|
147
|
-
onExited: this.props.onRemove
|
|
148
|
-
}, function (state) {
|
|
149
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
-
"data-state": state,
|
|
151
|
-
className: animationStyles,
|
|
152
|
-
onMouseEnter: _this2.handleMouseEnter,
|
|
153
|
-
onMouseLeave: _this2.handleMouseLeave,
|
|
154
|
-
style: {
|
|
155
|
-
height: _this2.state.height,
|
|
156
|
-
zIndex: _this2.props.zIndex,
|
|
157
|
-
marginBottom: _this2.state.isShown ? 0 : -_this2.state.height
|
|
158
|
-
}
|
|
159
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
160
|
-
ref: _this2.onRef,
|
|
161
|
-
style: {
|
|
162
|
-
padding: 8
|
|
163
|
-
}
|
|
164
|
-
}, /*#__PURE__*/_react.default.createElement(_alert.default, {
|
|
165
|
-
intent: _this2.props.intent,
|
|
166
|
-
title: _this2.props.title,
|
|
167
|
-
children: _this2.props.children || '',
|
|
168
|
-
isRemoveable: _this2.props.hasCloseButton,
|
|
169
|
-
onRemove: function onRemove() {
|
|
170
|
-
return _this2.close();
|
|
171
|
-
}
|
|
172
|
-
})));
|
|
173
|
-
});
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
return Toast;
|
|
177
|
-
}(_react.default.PureComponent);
|
|
178
|
-
|
|
179
|
-
exports.default = Toast;
|
|
180
|
-
(0, _defineProperty2.default)(Toast, "propTypes", {
|
|
181
|
-
/**
|
|
182
|
-
* The z-index of the toast.
|
|
183
|
-
*/
|
|
184
|
-
zIndex: _propTypes.default.number,
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Duration of the toast.
|
|
188
|
-
*/
|
|
189
|
-
duration: _propTypes.default.number,
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Function called when the toast is all the way closed.
|
|
193
|
-
*/
|
|
194
|
-
onRemove: _propTypes.default.func,
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* The type of the alert.
|
|
198
|
-
*/
|
|
199
|
-
intent: _propTypes.default.oneOf(['none', 'success', 'warning', 'danger']).isRequired,
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* The title of the alert.
|
|
203
|
-
*/
|
|
204
|
-
title: _propTypes.default.node,
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Description of the alert.
|
|
208
|
-
*/
|
|
209
|
-
children: _propTypes.default.node,
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* When true, show a close icon button inside of the toast.
|
|
213
|
-
*/
|
|
214
|
-
hasCloseButton: _propTypes.default.bool,
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* When false, will close the Toast and call onRemove when finished.
|
|
218
|
-
*/
|
|
219
|
-
isShown: _propTypes.default.bool
|
|
220
|
-
});
|
|
221
|
-
(0, _defineProperty2.default)(Toast, "defaultProps", {
|
|
222
|
-
intent: 'none'
|
|
223
|
-
});
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
|
|
10
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
-
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
-
|
|
14
|
-
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
|
|
15
|
-
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
|
|
18
|
-
var _react = _interopRequireDefault(require("react"));
|
|
19
|
-
|
|
20
|
-
var _glamor = require("glamor");
|
|
21
|
-
|
|
22
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
-
|
|
24
|
-
var _toast = _interopRequireDefault(require("./toast"));
|
|
25
|
-
|
|
26
|
-
var _excluded = ["id", "description"];
|
|
27
|
-
|
|
28
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
-
|
|
30
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
31
|
-
|
|
32
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
-
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
var wrapperClass = (0, _glamor.css)({
|
|
39
|
-
maxWidth: 560,
|
|
40
|
-
margin: '0 auto',
|
|
41
|
-
top: 0,
|
|
42
|
-
left: 0,
|
|
43
|
-
right: 0,
|
|
44
|
-
position: 'fixed',
|
|
45
|
-
zIndex: 999999
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
var hasCustomId = function hasCustomId(settings) {
|
|
49
|
-
return Object.hasOwnProperty.call(settings, 'id');
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
var ToastManager = /*#__PURE__*/function (_React$PureComponent) {
|
|
53
|
-
(0, _inheritsLoose2.default)(ToastManager, _React$PureComponent);
|
|
54
|
-
|
|
55
|
-
function ToastManager(props, context) {
|
|
56
|
-
var _this;
|
|
57
|
-
|
|
58
|
-
_this = _React$PureComponent.call(this, props, context) || this;
|
|
59
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getToasts", function () {
|
|
60
|
-
return _this.state.toasts;
|
|
61
|
-
});
|
|
62
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "closeAll", function () {
|
|
63
|
-
_this.getToasts().forEach(function (toast) {
|
|
64
|
-
return toast.close();
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "notify", function (title, settings) {
|
|
68
|
-
// If there's a custom toast ID passed, close existing toasts with the same custom ID
|
|
69
|
-
if (hasCustomId(settings)) {
|
|
70
|
-
for (var _iterator = _createForOfIteratorHelperLoose(_this.state.toasts), _step; !(_step = _iterator()).done;) {
|
|
71
|
-
var toast = _step.value;
|
|
72
|
-
|
|
73
|
-
// Since unique ID is still appended to a custom ID, skip the unique ID and check only prefix
|
|
74
|
-
if (String(toast.id).startsWith(settings.id)) {
|
|
75
|
-
_this.closeToast(toast.id);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
var instance = _this.createToastInstance(title, settings);
|
|
81
|
-
|
|
82
|
-
_this.setState(function (previousState) {
|
|
83
|
-
return {
|
|
84
|
-
toasts: [instance].concat(previousState.toasts)
|
|
85
|
-
};
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
return instance;
|
|
89
|
-
});
|
|
90
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createToastInstance", function (title, settings) {
|
|
91
|
-
var uniqueId = ++ToastManager.idCounter;
|
|
92
|
-
var id = hasCustomId(settings) ? settings.id + "-" + uniqueId : uniqueId;
|
|
93
|
-
var hasCloseButton = settings.hasCloseButton || true;
|
|
94
|
-
var duration = settings.duration || 2;
|
|
95
|
-
|
|
96
|
-
if (settings.hasCloseButton !== undefined) {
|
|
97
|
-
hasCloseButton = settings.hasCloseButton;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (settings.duration !== undefined) {
|
|
101
|
-
duration = settings.duration;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return {
|
|
105
|
-
id: id,
|
|
106
|
-
title: title,
|
|
107
|
-
description: settings.description,
|
|
108
|
-
hasCloseButton: hasCloseButton,
|
|
109
|
-
duration: duration,
|
|
110
|
-
close: function close() {
|
|
111
|
-
return _this.closeToast(id);
|
|
112
|
-
},
|
|
113
|
-
intent: settings.intent
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "closeToast", function (id) {
|
|
117
|
-
_this.setState(function (previousState) {
|
|
118
|
-
return {
|
|
119
|
-
toasts: previousState.toasts.map(function (toast) {
|
|
120
|
-
if (toast.id === id) {
|
|
121
|
-
return _objectSpread(_objectSpread({}, toast), {}, {
|
|
122
|
-
isShown: false
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
return toast;
|
|
127
|
-
})
|
|
128
|
-
};
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "removeToast", function (id) {
|
|
132
|
-
_this.setState(function (previousState) {
|
|
133
|
-
return {
|
|
134
|
-
toasts: previousState.toasts.filter(function (toast) {
|
|
135
|
-
return toast.id !== id;
|
|
136
|
-
})
|
|
137
|
-
};
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
props.bindNotify(_this.notify);
|
|
141
|
-
props.bindGetToasts(_this.getToasts);
|
|
142
|
-
props.bindCloseAll(_this.closeAll);
|
|
143
|
-
_this.state = {
|
|
144
|
-
toasts: []
|
|
145
|
-
};
|
|
146
|
-
return _this;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
var _proto = ToastManager.prototype;
|
|
150
|
-
|
|
151
|
-
_proto.render = function render() {
|
|
152
|
-
var _this2 = this;
|
|
153
|
-
|
|
154
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
155
|
-
className: wrapperClass
|
|
156
|
-
}, this.state.toasts.map(function (_ref) {
|
|
157
|
-
var id = _ref.id,
|
|
158
|
-
description = _ref.description,
|
|
159
|
-
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
160
|
-
return /*#__PURE__*/_react.default.createElement(_toast.default, (0, _extends2.default)({
|
|
161
|
-
key: id,
|
|
162
|
-
onRemove: function onRemove() {
|
|
163
|
-
return _this2.removeToast(id);
|
|
164
|
-
}
|
|
165
|
-
}, props), description);
|
|
166
|
-
}));
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
return ToastManager;
|
|
170
|
-
}(_react.default.PureComponent);
|
|
171
|
-
|
|
172
|
-
exports.default = ToastManager;
|
|
173
|
-
(0, _defineProperty2.default)(ToastManager, "propTypes", {
|
|
174
|
-
/**
|
|
175
|
-
* Function called with the `this.notify` function.
|
|
176
|
-
*/
|
|
177
|
-
bindNotify: _propTypes.default.func.isRequired,
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Function called with the `this.getToasts` function.
|
|
181
|
-
*/
|
|
182
|
-
bindGetToasts: _propTypes.default.func.isRequired,
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Function called with the `this.closeAll` function.
|
|
186
|
-
*/
|
|
187
|
-
bindCloseAll: _propTypes.default.func.isRequired
|
|
188
|
-
});
|
|
189
|
-
(0, _defineProperty2.default)(ToastManager, "idCounter", 0);
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
13
|
-
|
|
14
|
-
var _toastManager = _interopRequireDefault(require("./toastManager"));
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
21
|
-
/**
|
|
22
|
-
* The Toaster manages the interactionsb between
|
|
23
|
-
* the ToasterManger and the toast API.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
var Toaster = function Toaster() {
|
|
27
|
-
var _this = this;
|
|
28
|
-
|
|
29
|
-
(0, _defineProperty2.default)(this, "_bindNotify", function (handler) {
|
|
30
|
-
_this.notifyHandler = handler;
|
|
31
|
-
});
|
|
32
|
-
(0, _defineProperty2.default)(this, "_bindGetToasts", function (handler) {
|
|
33
|
-
_this.getToastsHandler = handler;
|
|
34
|
-
});
|
|
35
|
-
(0, _defineProperty2.default)(this, "_bindCloseAll", function (handler) {
|
|
36
|
-
_this.closeAllHandler = handler;
|
|
37
|
-
});
|
|
38
|
-
(0, _defineProperty2.default)(this, "getToasts", function () {
|
|
39
|
-
return _this.getToastsHandler();
|
|
40
|
-
});
|
|
41
|
-
(0, _defineProperty2.default)(this, "closeAll", function () {
|
|
42
|
-
return _this.closeAllHandler();
|
|
43
|
-
});
|
|
44
|
-
(0, _defineProperty2.default)(this, "notify", function (title, settings) {
|
|
45
|
-
if (settings === void 0) {
|
|
46
|
-
settings = {};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return _this.notifyHandler(title, _objectSpread(_objectSpread({}, settings), {}, {
|
|
50
|
-
intent: 'none'
|
|
51
|
-
}));
|
|
52
|
-
});
|
|
53
|
-
(0, _defineProperty2.default)(this, "success", function (title, settings) {
|
|
54
|
-
if (settings === void 0) {
|
|
55
|
-
settings = {};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return _this.notifyHandler(title, _objectSpread(_objectSpread({}, settings), {}, {
|
|
59
|
-
intent: 'success'
|
|
60
|
-
}));
|
|
61
|
-
});
|
|
62
|
-
(0, _defineProperty2.default)(this, "warning", function (title, settings) {
|
|
63
|
-
if (settings === void 0) {
|
|
64
|
-
settings = {};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return _this.notifyHandler(title, _objectSpread(_objectSpread({}, settings), {}, {
|
|
68
|
-
intent: 'warning'
|
|
69
|
-
}));
|
|
70
|
-
});
|
|
71
|
-
(0, _defineProperty2.default)(this, "danger", function (title, settings) {
|
|
72
|
-
if (settings === void 0) {
|
|
73
|
-
settings = {};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return _this.notifyHandler(title, _objectSpread(_objectSpread({}, settings), {}, {
|
|
77
|
-
intent: 'danger'
|
|
78
|
-
}));
|
|
79
|
-
});
|
|
80
|
-
if (!isBrowser) return;
|
|
81
|
-
var container = document.createElement('div');
|
|
82
|
-
container.setAttribute('data-evergreen-toaster-container', '');
|
|
83
|
-
document.body.appendChild(container);
|
|
84
|
-
|
|
85
|
-
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_toastManager.default, {
|
|
86
|
-
bindNotify: this._bindNotify,
|
|
87
|
-
bindGetToasts: this._bindGetToasts,
|
|
88
|
-
bindCloseAll: this._bindCloseAll
|
|
89
|
-
}), container);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
exports.default = Toaster;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-date {
|
|
2
|
-
width: 28px;
|
|
3
|
-
height: 30px;
|
|
4
|
-
border-radius: 50%;
|
|
5
|
-
font-size: 14px;
|
|
6
|
-
line-height: 30px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-date-panel {
|
|
10
|
-
width: 100%;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-selected-day .rc-calendar-date {
|
|
14
|
-
background-color: #FcEcD9;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-date:hover,
|
|
18
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-year-panel-year:hover,
|
|
19
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-month-panel-cell .rc-calendar-month-panel-month:hover {
|
|
20
|
-
background-color: #FcEcD9;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-selected-date .rc-calendar-date,
|
|
24
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-selected-date .rc-calendar-date:hover,
|
|
25
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-year-panel-selected-cell .rc-calendar-year-panel-year,
|
|
26
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-month-panel-selected-cell .rc-calendar-month-panel-month {
|
|
27
|
-
background-color: #f09f3f;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]),
|
|
31
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]),
|
|
32
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]),
|
|
33
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]) {
|
|
34
|
-
color: #999;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]):hover,
|
|
38
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]):hover,
|
|
39
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]):hover,
|
|
40
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]):hover {
|
|
41
|
-
color: #666;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-today .rc-calendar-date {
|
|
45
|
-
border: none;
|
|
46
|
-
position: relative;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-today .rc-calendar-date::after {
|
|
50
|
-
content: '';
|
|
51
|
-
background: #f09f3f;
|
|
52
|
-
position: absolute;
|
|
53
|
-
width: 4px;
|
|
54
|
-
height: 4px;
|
|
55
|
-
border-radius: 50%;
|
|
56
|
-
left: 45%;
|
|
57
|
-
bottom: 0%;
|
|
58
|
-
display: inline-block;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar .rdg-editor-container input.editor-main[readonly] {
|
|
62
|
-
background-color: #fff;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-time-picker {
|
|
66
|
-
z-index: 1;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-right-panel-body ul li.highlight {
|
|
70
|
-
margin: 0;
|
|
71
|
-
border: none;
|
|
72
|
-
background-color: #fff;
|
|
73
|
-
font-size: 12px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar {
|
|
77
|
-
box-shadow: none;
|
|
78
|
-
border-radius: 0px;
|
|
79
|
-
border: 1px solid #e9e9e9;
|
|
80
|
-
border-left: none;
|
|
81
|
-
border-right: none;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-date {
|
|
85
|
-
font-size: 14px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-date-panel {
|
|
89
|
-
width: 100%;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-body {
|
|
93
|
-
height: 22rem;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-table tr {
|
|
97
|
-
height: 3rem;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-prev-month-btn,
|
|
101
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-next-month-btn,
|
|
102
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-prev-year-btn,
|
|
103
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-next-year-btn {
|
|
104
|
-
font-size: 30px;
|
|
105
|
-
width: 50px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-header {
|
|
109
|
-
border-bottom: none;
|
|
110
|
-
margin-top: 0.5rem;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-year-select,
|
|
114
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-month-select,
|
|
115
|
-
.dtable-ui.mb-date-editor-picker .rc-calendar-day-select {
|
|
116
|
-
font-size: 16px;
|
|
117
|
-
padding: 5px;
|
|
118
|
-
}
|