dtable-ui-component 0.1.74 → 0.1.75-beta3
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/es/AutoNumberFormatter/index.css +1 -0
- package/es/{components/cell-formatter/auto-number-formatter.js → AutoNumberFormatter/index.js} +1 -0
- package/es/ButtonFormatter/index.css +13 -0
- package/es/{components/cell-formatter/button-formatter.js → ButtonFormatter/index.js} +1 -0
- package/es/CTimeFormatter/index.css +1 -0
- package/es/{components/cell-formatter/ctime-formatter.js → CTimeFormatter/index.js} +1 -0
- package/es/CheckboxFormatter/index.css +1 -0
- package/es/{components/cell-formatter/checkbox-formatter.js → CheckboxFormatter/index.js} +1 -0
- package/es/CollaboratorFormatter/index.css +1 -0
- package/es/{components/cell-formatter/collaborator-formatter.js → CollaboratorFormatter/index.js} +3 -2
- package/es/CollaboratorItem/index.css +49 -0
- package/es/CollaboratorItem/index.js +64 -0
- package/es/CreatorFormatter/index.css +1 -0
- package/es/{components/cell-formatter/creator-formatter.js → CreatorFormatter/index.js} +3 -2
- package/es/DateFormatter/index.css +1 -0
- package/es/{components/cell-formatter/date-formatter.js → DateFormatter/index.js} +2 -1
- package/es/DurationFormatter/index.css +1 -0
- package/es/{components/cell-formatter/duration-formatter.js → DurationFormatter/index.js} +2 -1
- package/es/EmailFormatter/index.css +5 -0
- package/es/{components/cell-formatter/email-formatter.js → EmailFormatter/index.js} +1 -0
- package/es/FileFormatter/index.css +29 -0
- package/es/{components/cell-formatter/file-formatter.js → FileFormatter/index.js} +2 -1
- package/es/{components/cell-formatter/widgets/file-item-formatter.js → FileItemFormatter/index.js} +2 -2
- package/es/{components/file-uploader → FileUploader}/index.js +0 -0
- package/es/FormulaFormatter/index.css +19 -0
- package/es/{components/cell-formatter/formula-formatter.js → FormulaFormatter/index.js} +8 -8
- package/es/GeolocationFormatter/index.css +1 -0
- package/es/{components/cell-formatter/geolocation-formatter.js → GeolocationFormatter/index.js} +2 -1
- package/es/{components/common → ImageFormatter}/images-lazy-load.js +2 -2
- package/es/ImageFormatter/index.css +34 -0
- package/es/{components/cell-formatter/image-formatter.js → ImageFormatter/index.js} +4 -3
- package/es/{css/image-previewer-ligntbox.css → ImagePreviewerLightbox/index.css} +0 -0
- package/es/{components/cell-formatter/widgets/image-previewer-lightbox.js → ImagePreviewerLightbox/index.js} +3 -3
- package/es/LastModifierFormatter/index.css +1 -0
- package/es/{components/cell-formatter/last-modifier-formatter.js → LastModifierFormatter/index.js} +5 -4
- package/es/LinkFormatter/index.css +27 -0
- package/es/{components/cell-formatter/link-formatter.js → LinkFormatter/index.js} +2 -2
- package/es/{css/loading.css → Loading/index.css} +0 -0
- package/es/{components/loading.js → Loading/index.js} +1 -1
- package/es/{components/cell-formatter/widgets/long-text-formatter → LongTextFormatter}/html-long-text-formatter.js +1 -1
- package/es/LongTextFormatter/index.css +63 -0
- package/es/{components/cell-formatter/long-text-formatter.js → LongTextFormatter/index.js} +3 -2
- package/es/{components/cell-formatter/widgets/long-text-formatter → LongTextFormatter}/simple-long-text-formatter.js +1 -1
- package/es/MTimeFormatter/index.css +1 -0
- package/es/{components/cell-formatter/mtime-formatter.js → MTimeFormatter/index.js} +1 -0
- package/es/{components/common/modal-portal.js → ModalPortal/index.js} +0 -0
- package/es/MultipleSelectFormatter/index.css +1 -0
- package/es/{components/cell-formatter/multiple-select-formatter.js → MultipleSelectFormatter/index.js} +2 -1
- package/es/NumberFormatter/index.css +1 -0
- package/es/{components/cell-formatter/number-formatter.js → NumberFormatter/index.js} +2 -1
- package/es/RateFormatter/index.css +1 -0
- package/es/{components/cell-formatter/rate-formatter.js → RateFormatter/index.js} +1 -0
- package/es/{components/common/select-item.js → SelectItem/index.js} +0 -0
- package/es/SingleSelectFormatter/index.css +1 -0
- package/es/{components/cell-formatter/single-select-formatter.js → SingleSelectFormatter/index.js} +2 -1
- package/es/TextFormatter/index.css +1 -0
- package/es/{components/cell-formatter/text-formatter.js → TextFormatter/index.js} +1 -0
- package/es/UrlFormatter/index.css +5 -0
- package/es/{components/cell-formatter/url-formatter.js → UrlFormatter/index.js} +1 -0
- package/es/app.js +1 -1
- package/es/{components/cell-factory/cell-formatter-factory.js → cellFormatterFactory/index.js} +3 -3
- package/es/components/cell-editor/checkbox-editor.js +104 -0
- package/es/components/cell-editor/collaborator-editor.js +236 -0
- package/es/components/cell-editor/date-editor.js +151 -0
- package/es/components/cell-editor/index.js +9 -0
- package/es/components/cell-editor/link-editor.js +303 -0
- package/es/components/cell-editor/multiple-select-editor.js +237 -0
- package/es/components/cell-editor/number-editor.js +154 -0
- package/es/components/cell-editor/single-select-editor.js +202 -0
- package/es/components/cell-editor/text-editor.js +122 -0
- package/es/components/cell-editor-dialog/pc-file-editor-dialog.js +46 -0
- package/es/components/cell-editor-dialog/pc-files-addition/index.js +0 -0
- package/es/components/cell-editor-dialog/pc-files-addition/pc-file-uploaded-item.js +0 -0
- package/es/components/cell-editor-dialog/pc-files-preview/index.js +0 -0
- package/es/components/cell-editor-dialog/pc-files-preview/pc-file-item-preview.js +0 -0
- package/es/components/cell-editor-popover/mb-collaborator-editor-popover.js +177 -0
- package/es/components/cell-editor-popover/mb-date-editor-popover.js +245 -0
- package/es/components/cell-editor-popover/mb-link-editor-popover.js +170 -0
- package/es/components/cell-editor-popover/mb-select-editor-popover.js +230 -0
- package/es/components/cell-editor-popover/pc-collaborator-editor-popover.js +109 -0
- package/es/components/cell-editor-popover/pc-date-editor-popover.js +142 -0
- package/es/components/cell-editor-popover/pc-link-editor-popover.js +114 -0
- package/es/components/cell-editor-popover/pc-select-editor-popover.js +143 -0
- package/es/constants/index.js +15 -14
- package/es/css/cell-formatter.css +0 -243
- package/es/formatterConfig/index.js +31 -0
- package/es/index.js +29 -3
- package/es/{components/toast → toaster}/alert.js +0 -0
- package/es/{components/toast → toaster}/index.js +0 -0
- package/es/{components/toast → toaster}/toast.js +0 -0
- package/es/{components/toast → toaster}/toastManager.js +0 -0
- package/es/{components/toast → toaster}/toaster.js +0 -0
- package/es/utils/cell-value-validator.js +1 -2
- package/es/utils/editor-utils.js +71 -0
- package/es/utils/normalize-long-text-value.js +2 -2
- package/es/utils/number-precision.js +1 -0
- package/es/utils/value-format-utils.js +2 -0
- package/lib/AutoNumberFormatter/index.css +1 -0
- package/lib/AutoNumberFormatter/index.js +47 -0
- package/lib/ButtonFormatter/index.css +13 -0
- package/lib/ButtonFormatter/index.js +68 -0
- package/lib/CTimeFormatter/index.css +1 -0
- package/lib/CTimeFormatter/index.js +72 -0
- package/lib/CheckboxFormatter/index.css +1 -0
- package/lib/CheckboxFormatter/index.js +58 -0
- package/lib/CollaboratorFormatter/index.css +1 -0
- package/lib/CollaboratorFormatter/index.js +113 -0
- package/lib/CollaboratorItem/index.css +49 -0
- package/lib/CollaboratorItem/index.js +81 -0
- package/lib/CreatorFormatter/index.css +1 -0
- package/lib/CreatorFormatter/index.js +107 -0
- package/lib/DateFormatter/index.css +1 -0
- package/lib/DateFormatter/index.js +75 -0
- package/lib/DurationFormatter/index.css +1 -0
- package/lib/DurationFormatter/index.js +51 -0
- package/lib/EmailFormatter/index.css +5 -0
- package/lib/EmailFormatter/index.js +47 -0
- package/lib/FileFormatter/index.css +29 -0
- package/lib/FileFormatter/index.js +79 -0
- package/lib/FileItemFormatter/index.js +63 -0
- package/lib/FileUploader/index.js +63 -0
- package/lib/FormulaFormatter/index.css +19 -0
- package/lib/FormulaFormatter/index.js +185 -0
- package/lib/GeolocationFormatter/index.css +1 -0
- package/lib/GeolocationFormatter/index.js +68 -0
- package/lib/ImageFormatter/images-lazy-load.js +158 -0
- package/lib/ImageFormatter/index.css +34 -0
- package/lib/ImageFormatter/index.js +173 -0
- package/lib/ImagePreviewerLightbox/index.css +87 -0
- package/lib/ImagePreviewerLightbox/index.js +152 -0
- package/lib/LastModifierFormatter/index.css +1 -0
- package/lib/LastModifierFormatter/index.js +107 -0
- package/lib/LinkFormatter/index.css +27 -0
- package/lib/LinkFormatter/index.js +165 -0
- package/lib/Loading/index.css +54 -0
- package/lib/Loading/index.js +16 -0
- package/lib/LongTextFormatter/html-long-text-formatter.js +107 -0
- package/lib/LongTextFormatter/index.css +63 -0
- package/lib/LongTextFormatter/index.js +48 -0
- package/lib/LongTextFormatter/simple-long-text-formatter.js +110 -0
- package/lib/MTimeFormatter/index.css +1 -0
- package/lib/MTimeFormatter/index.js +72 -0
- package/lib/ModalPortal/index.js +51 -0
- package/lib/MultipleSelectFormatter/index.css +1 -0
- package/lib/MultipleSelectFormatter/index.js +86 -0
- package/lib/NumberFormatter/index.css +1 -0
- package/lib/NumberFormatter/index.js +62 -0
- package/lib/RateFormatter/index.css +1 -0
- package/lib/RateFormatter/index.js +95 -0
- package/lib/SelectItem/index.js +73 -0
- package/lib/SingleSelectFormatter/index.css +1 -0
- package/lib/SingleSelectFormatter/index.js +86 -0
- package/lib/TextFormatter/index.css +1 -0
- package/lib/TextFormatter/index.js +69 -0
- package/lib/UrlFormatter/index.css +5 -0
- package/lib/UrlFormatter/index.js +47 -0
- package/lib/app.css +20 -0
- package/lib/app.js +96 -0
- package/lib/assets/images/avatar/default_avatar.png +0 -0
- 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/cellFormatterFactory/index.js +28 -0
- package/lib/components/cell-editor/checkbox-editor.js +111 -0
- package/lib/components/cell-editor/collaborator-editor.js +249 -0
- package/lib/components/cell-editor/date-editor.js +171 -0
- package/lib/components/cell-editor/index.js +40 -0
- package/lib/components/cell-editor/link-editor.js +321 -0
- package/lib/components/cell-editor/multiple-select-editor.js +250 -0
- package/lib/components/cell-editor/number-editor.js +162 -0
- package/lib/components/cell-editor/single-select-editor.js +216 -0
- package/lib/components/cell-editor/text-editor.js +129 -0
- package/lib/components/cell-editor-dialog/pc-file-editor-dialog.js +66 -0
- package/lib/components/cell-editor-dialog/pc-files-addition/index.js +1 -0
- package/lib/components/cell-editor-dialog/pc-files-addition/pc-file-uploaded-item.js +1 -0
- package/lib/components/cell-editor-dialog/pc-files-preview/index.js +1 -0
- package/lib/components/cell-editor-dialog/pc-files-preview/pc-file-item-preview.js +1 -0
- package/lib/components/cell-editor-popover/mb-collaborator-editor-popover.js +183 -0
- package/lib/components/cell-editor-popover/mb-date-editor-popover.js +262 -0
- package/lib/components/cell-editor-popover/mb-link-editor-popover.js +176 -0
- package/lib/components/cell-editor-popover/mb-select-editor-popover.js +243 -0
- package/lib/components/cell-editor-popover/pc-collaborator-editor-popover.js +124 -0
- package/lib/components/cell-editor-popover/pc-date-editor-popover.js +156 -0
- package/lib/components/cell-editor-popover/pc-link-editor-popover.js +128 -0
- package/lib/components/cell-editor-popover/pc-select-editor-popover.js +157 -0
- package/lib/components/common/collaborator-item.js +79 -0
- package/lib/components/common/edit-editor-button.js +67 -0
- package/lib/components/common/link-editor-option.js +121 -0
- package/lib/components/common/mobile/mb-editor-header.js +61 -0
- package/lib/components/common/select-editor-option.js +122 -0
- package/lib/constants/cell-types.js +54 -0
- package/lib/constants/index.js +72 -0
- package/lib/css/cell-editor.css +614 -0
- package/lib/css/cell-formatter.css +4 -0
- package/lib/css/custom-rc-calendar.css +118 -0
- package/lib/formatterConfig/index.js +62 -0
- package/lib/index.js +139 -0
- package/lib/lang/index.js +66 -0
- package/lib/locals/de.js +7 -0
- package/lib/locals/en.js +22 -0
- package/lib/locals/fr.js +7 -0
- package/lib/locals/zh-CN.js +22 -0
- package/lib/toaster/alert.js +164 -0
- package/lib/toaster/index.js +12 -0
- package/lib/toaster/toast.js +223 -0
- package/lib/toaster/toastManager.js +189 -0
- package/lib/toaster/toaster.js +92 -0
- package/lib/utils/cell-value-validator.js +35 -0
- package/lib/utils/column-utils.js +15 -0
- package/lib/utils/editor-utils.js +81 -0
- package/lib/utils/markdown2html.js +68 -0
- package/lib/utils/normalize-long-text-value.js +74 -0
- package/lib/utils/number-precision.js +182 -0
- package/lib/utils/unified/index.js +470 -0
- package/lib/utils/utils.js +141 -0
- package/lib/utils/value-format-utils.js +547 -0
- package/lib/utils/vfile/core.js +172 -0
- package/lib/utils/vfile/index.js +48 -0
- package/package.json +5 -3
- package/es/components/cell-formatter/formatter-config.js +0 -31
- package/es/components/cell-formatter/index.js +0 -27
|
@@ -0,0 +1,58 @@
|
|
|
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 _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
|
|
9
|
+
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
var _astroClassname = _interopRequireDefault(require("astro-classname"));
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
var propTypes = {
|
|
21
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool]),
|
|
22
|
+
containerClassName: _propTypes.default.string
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var CheckboxFormatter = /*#__PURE__*/function (_React$PureComponent) {
|
|
26
|
+
(0, _inheritsLoose2.default)(CheckboxFormatter, _React$PureComponent);
|
|
27
|
+
|
|
28
|
+
function CheckboxFormatter() {
|
|
29
|
+
return _React$PureComponent.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var _proto = CheckboxFormatter.prototype;
|
|
33
|
+
|
|
34
|
+
_proto.render = function render() {
|
|
35
|
+
var _this$props = this.props,
|
|
36
|
+
value = _this$props.value,
|
|
37
|
+
containerClassName = _this$props.containerClassName;
|
|
38
|
+
value = value === true ? true : false;
|
|
39
|
+
var classname = (0, _astroClassname.default)('dtable-ui cell-formatter-container checkbox-formatter', containerClassName);
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: classname
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
43
|
+
className: "checkbox",
|
|
44
|
+
type: "checkbox",
|
|
45
|
+
readOnly: true,
|
|
46
|
+
checked: value
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return CheckboxFormatter;
|
|
51
|
+
}(_react.default.PureComponent);
|
|
52
|
+
|
|
53
|
+
(0, _defineProperty2.default)(CheckboxFormatter, "defaultProps", {
|
|
54
|
+
value: false
|
|
55
|
+
});
|
|
56
|
+
CheckboxFormatter.propTypes = propTypes;
|
|
57
|
+
var _default = CheckboxFormatter;
|
|
58
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('../css/cell-formatter.css');
|
|
@@ -0,0 +1,113 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _astroClassname = _interopRequireDefault(require("astro-classname"));
|
|
19
|
+
|
|
20
|
+
var _CollaboratorItem = _interopRequireDefault(require("../CollaboratorItem"));
|
|
21
|
+
|
|
22
|
+
var _default_avatar = _interopRequireDefault(require("../assets/images/avatar/default_avatar.png"));
|
|
23
|
+
|
|
24
|
+
require("./index.css");
|
|
25
|
+
|
|
26
|
+
var propTypes = {
|
|
27
|
+
containerClassName: _propTypes.default.string,
|
|
28
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]).isRequired,
|
|
29
|
+
collaborators: _propTypes.default.arrayOf(_propTypes.default.exact({
|
|
30
|
+
email: _propTypes.default.string.isRequired,
|
|
31
|
+
name: _propTypes.default.string.isRequired,
|
|
32
|
+
contact_email: _propTypes.default.string.isRequired,
|
|
33
|
+
avatar_url: _propTypes.default.string.isRequired
|
|
34
|
+
})),
|
|
35
|
+
enableDeleteCollaborator: _propTypes.default.bool,
|
|
36
|
+
onDeleteCollaborator: _propTypes.default.func
|
|
37
|
+
}; // there will be there conditions
|
|
38
|
+
// 1 value is not exist, typeof value is array, but it's length is 0
|
|
39
|
+
// 2 value is exist, but can't find in collaborators
|
|
40
|
+
// 3 value is exist, typeof value is a string
|
|
41
|
+
// 4 value is exist, typeof value is array
|
|
42
|
+
|
|
43
|
+
var CollaboratorFormatter = /*#__PURE__*/function (_React$PureComponent) {
|
|
44
|
+
(0, _inheritsLoose2.default)(CollaboratorFormatter, _React$PureComponent);
|
|
45
|
+
|
|
46
|
+
function CollaboratorFormatter() {
|
|
47
|
+
var _this;
|
|
48
|
+
|
|
49
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
50
|
+
args[_key] = arguments[_key];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
_this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;
|
|
54
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getCollaborators", function () {
|
|
55
|
+
var _this$props = _this.props,
|
|
56
|
+
value = _this$props.value,
|
|
57
|
+
collaborators = _this$props.collaborators,
|
|
58
|
+
enableDeleteCollaborator = _this$props.enableDeleteCollaborator,
|
|
59
|
+
onDeleteCollaborator = _this$props.onDeleteCollaborator;
|
|
60
|
+
|
|
61
|
+
if (!Array.isArray(value)) {
|
|
62
|
+
value = [value];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return value.map(function (item, index) {
|
|
66
|
+
var collaborator = collaborators.find(function (collaborator) {
|
|
67
|
+
return collaborator.email === item;
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
if (!collaborator) {
|
|
71
|
+
collaborator = {
|
|
72
|
+
name: item,
|
|
73
|
+
avatar_url: _default_avatar.default
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_CollaboratorItem.default, {
|
|
78
|
+
key: index,
|
|
79
|
+
collaborator: collaborator,
|
|
80
|
+
enableDeleteCollaborator: enableDeleteCollaborator,
|
|
81
|
+
onDeleteCollaborator: onDeleteCollaborator
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
return _this;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
var _proto = CollaboratorFormatter.prototype;
|
|
89
|
+
|
|
90
|
+
_proto.render = function render() {
|
|
91
|
+
var _this$props2 = this.props,
|
|
92
|
+
containerClassName = _this$props2.containerClassName,
|
|
93
|
+
value = _this$props2.value;
|
|
94
|
+
var classname = (0, _astroClassname.default)('dtable-ui cell-formatter-container collaborator-formatter', containerClassName);
|
|
95
|
+
|
|
96
|
+
if (!value || Array.isArray(value) && value.length === 0) {
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
className: classname
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
var collaborators = this.getCollaborators();
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
104
|
+
className: classname
|
|
105
|
+
}, collaborators);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
return CollaboratorFormatter;
|
|
109
|
+
}(_react.default.PureComponent);
|
|
110
|
+
|
|
111
|
+
CollaboratorFormatter.propTypes = propTypes;
|
|
112
|
+
var _default = CollaboratorFormatter;
|
|
113
|
+
exports.default = _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.dtable-ui.collaborator-item {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
margin-right: 10px;
|
|
5
|
+
padding: 0 8px 0 2px;
|
|
6
|
+
height: 20px;
|
|
7
|
+
font-size: 13px;
|
|
8
|
+
border-radius: 10px;
|
|
9
|
+
background: #eaeaea;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.dtable-ui.collaborator-item .collaborator-avatar,
|
|
13
|
+
.dtable-ui.collaborator-item .collaborator-name,
|
|
14
|
+
.dtable-ui.collaborator-item .collaborator-remove {
|
|
15
|
+
height: 20px;
|
|
16
|
+
line-height: 20px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dtable-ui.collaborator-item .collaborator-avatar {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
margin: 0 4px 0 2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dtable-ui.collaborator-item .collaborator-avatar img {
|
|
27
|
+
width: 16px;
|
|
28
|
+
height: 16px;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dtable-ui.collaborator-item .collaborator-remove {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
width: 14px;
|
|
35
|
+
margin: 0 -2px 0 2px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dtable-ui.collaborator-item .collaborator-remove .dtable-font {
|
|
39
|
+
display: inline-block;
|
|
40
|
+
font-size: 12px;
|
|
41
|
+
color: #909090;
|
|
42
|
+
transform: scale(.8);
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.dtable-ui.collaborator-item .collaborator-remove .dtable-font:hover {
|
|
47
|
+
color: #666666;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
var propTypes = {
|
|
21
|
+
collaborator: _propTypes.default.shape({
|
|
22
|
+
name: _propTypes.default.string.isRequired,
|
|
23
|
+
avatar_url: _propTypes.default.string.isRequired,
|
|
24
|
+
email: _propTypes.default.string
|
|
25
|
+
}),
|
|
26
|
+
enableDeleteCollaborator: _propTypes.default.bool,
|
|
27
|
+
onDeleteCollaborator: _propTypes.default.func
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var CollaboratorItem = /*#__PURE__*/function (_React$Component) {
|
|
31
|
+
(0, _inheritsLoose2.default)(CollaboratorItem, _React$Component);
|
|
32
|
+
|
|
33
|
+
function CollaboratorItem() {
|
|
34
|
+
var _this;
|
|
35
|
+
|
|
36
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
|
+
args[_key] = arguments[_key];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
41
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onDeleteCollaborator", function () {
|
|
42
|
+
var collaborator = _this.props.collaborator;
|
|
43
|
+
|
|
44
|
+
_this.props.onDeleteCollaborator(collaborator);
|
|
45
|
+
});
|
|
46
|
+
return _this;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var _proto = CollaboratorItem.prototype;
|
|
50
|
+
|
|
51
|
+
_proto.render = function render() {
|
|
52
|
+
var _this$props = this.props,
|
|
53
|
+
collaborator = _this$props.collaborator,
|
|
54
|
+
enableDeleteCollaborator = _this$props.enableDeleteCollaborator;
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
+
className: "dtable-ui collaborator-item"
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
58
|
+
className: "collaborator-avatar"
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
60
|
+
className: "collaborator-avatar-icon",
|
|
61
|
+
alt: collaborator.name,
|
|
62
|
+
src: collaborator.avatar_url
|
|
63
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
64
|
+
className: "collaborator-name"
|
|
65
|
+
}, collaborator.name), enableDeleteCollaborator && /*#__PURE__*/_react.default.createElement("span", {
|
|
66
|
+
className: "collaborator-remove",
|
|
67
|
+
onClick: this.onDeleteCollaborator
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
69
|
+
className: "dtable-font dtable-icon-fork-number"
|
|
70
|
+
})));
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return CollaboratorItem;
|
|
74
|
+
}(_react.default.Component);
|
|
75
|
+
|
|
76
|
+
(0, _defineProperty2.default)(CollaboratorItem, "defaultProps", {
|
|
77
|
+
enableDelete: false
|
|
78
|
+
});
|
|
79
|
+
CollaboratorItem.propTypes = propTypes;
|
|
80
|
+
var _default = CollaboratorItem;
|
|
81
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('../css/cell-formatter.css');
|
|
@@ -0,0 +1,107 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _astroClassname = _interopRequireDefault(require("astro-classname"));
|
|
19
|
+
|
|
20
|
+
var _CollaboratorItem = _interopRequireDefault(require("../CollaboratorItem"));
|
|
21
|
+
|
|
22
|
+
var _default_avatar = _interopRequireDefault(require("../assets/images/avatar/default_avatar.png"));
|
|
23
|
+
|
|
24
|
+
require("./index.css");
|
|
25
|
+
|
|
26
|
+
var propTypes = {
|
|
27
|
+
containerClassName: _propTypes.default.string,
|
|
28
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]).isRequired,
|
|
29
|
+
collaborators: _propTypes.default.arrayOf(_propTypes.default.exact({
|
|
30
|
+
email: _propTypes.default.string.isRequired,
|
|
31
|
+
name: _propTypes.default.string.isRequired,
|
|
32
|
+
contact_email: _propTypes.default.string.isRequired,
|
|
33
|
+
avatar_url: _propTypes.default.string.isRequired
|
|
34
|
+
}))
|
|
35
|
+
}; // there will be there conditions
|
|
36
|
+
// 1 value is not exist, typeof value is array, but it's length is 0
|
|
37
|
+
// 2 value is exist, but can't find in collaborators
|
|
38
|
+
// 3 value is exist, typeof value is a string
|
|
39
|
+
// 4 value is exist, typeof value is array
|
|
40
|
+
|
|
41
|
+
var CreatorFormatter = /*#__PURE__*/function (_React$PureComponent) {
|
|
42
|
+
(0, _inheritsLoose2.default)(CreatorFormatter, _React$PureComponent);
|
|
43
|
+
|
|
44
|
+
function CreatorFormatter() {
|
|
45
|
+
var _this;
|
|
46
|
+
|
|
47
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
|
+
args[_key] = arguments[_key];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;
|
|
52
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getCollaborators", function () {
|
|
53
|
+
var _this$props = _this.props,
|
|
54
|
+
value = _this$props.value,
|
|
55
|
+
collaborators = _this$props.collaborators;
|
|
56
|
+
|
|
57
|
+
if (!Array.isArray(value)) {
|
|
58
|
+
value = [value];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return value.map(function (item, index) {
|
|
62
|
+
var collaborator = collaborators.find(function (collaborator) {
|
|
63
|
+
return collaborator.email === item;
|
|
64
|
+
}); // the collaborator can be not exist, because the row created by third app
|
|
65
|
+
|
|
66
|
+
if (!collaborator) {
|
|
67
|
+
collaborator = {
|
|
68
|
+
name: item,
|
|
69
|
+
avatar_url: _default_avatar.default
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return /*#__PURE__*/_react.default.createElement(_CollaboratorItem.default, {
|
|
74
|
+
key: index,
|
|
75
|
+
collaborator: collaborator
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
return _this;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
var _proto = CreatorFormatter.prototype;
|
|
83
|
+
|
|
84
|
+
_proto.render = function render() {
|
|
85
|
+
var _this$props2 = this.props,
|
|
86
|
+
containerClassName = _this$props2.containerClassName,
|
|
87
|
+
value = _this$props2.value;
|
|
88
|
+
var classname = (0, _astroClassname.default)('dtable-ui cell-formatter-container creator-formatter', containerClassName);
|
|
89
|
+
|
|
90
|
+
if (!value || Array.isArray(value) && value.length === 0) {
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
+
className: classname
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
var collaborators = this.getCollaborators();
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
className: classname
|
|
99
|
+
}, collaborators);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
return CreatorFormatter;
|
|
103
|
+
}(_react.default.PureComponent);
|
|
104
|
+
|
|
105
|
+
CreatorFormatter.propTypes = propTypes;
|
|
106
|
+
var _default = CreatorFormatter;
|
|
107
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('../css/cell-formatter.css');
|
|
@@ -0,0 +1,75 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _astroClassname = _interopRequireDefault(require("astro-classname"));
|
|
19
|
+
|
|
20
|
+
var _valueFormatUtils = require("../utils/value-format-utils");
|
|
21
|
+
|
|
22
|
+
require("./index.css");
|
|
23
|
+
|
|
24
|
+
var propTypes = {
|
|
25
|
+
value: _propTypes.default.string,
|
|
26
|
+
format: _propTypes.default.string,
|
|
27
|
+
containerClassName: _propTypes.default.string
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var DateFormatter = /*#__PURE__*/function (_React$Component) {
|
|
31
|
+
(0, _inheritsLoose2.default)(DateFormatter, _React$Component);
|
|
32
|
+
|
|
33
|
+
function DateFormatter() {
|
|
34
|
+
var _this;
|
|
35
|
+
|
|
36
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
|
+
args[_key] = arguments[_key];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
41
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "formatDate", function (date, format) {
|
|
42
|
+
return (0, _valueFormatUtils.getDateDisplayString)(date, format);
|
|
43
|
+
});
|
|
44
|
+
return _this;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var _proto = DateFormatter.prototype;
|
|
48
|
+
|
|
49
|
+
_proto.render = function render() {
|
|
50
|
+
var _this$props = this.props,
|
|
51
|
+
date = _this$props.value,
|
|
52
|
+
format = _this$props.format,
|
|
53
|
+
containerClassName = _this$props.containerClassName;
|
|
54
|
+
var classname = (0, _astroClassname.default)('dtable-ui cell-formatter-container date-formatter', containerClassName);
|
|
55
|
+
|
|
56
|
+
if (date !== '') {
|
|
57
|
+
date = this.formatDate(date, format);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
className: classname
|
|
62
|
+
}, date);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return DateFormatter;
|
|
66
|
+
}(_react.default.Component);
|
|
67
|
+
|
|
68
|
+
(0, _defineProperty2.default)(DateFormatter, "defaultProps", {
|
|
69
|
+
value: '',
|
|
70
|
+
format: 'YYYY-MM-DD',
|
|
71
|
+
containerClassName: ''
|
|
72
|
+
});
|
|
73
|
+
DateFormatter.propTypes = propTypes;
|
|
74
|
+
var _default = DateFormatter;
|
|
75
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('../css/cell-formatter.css');
|
|
@@ -0,0 +1,51 @@
|
|
|
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 _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _astroClassname = _interopRequireDefault(require("astro-classname"));
|
|
15
|
+
|
|
16
|
+
var _valueFormatUtils = require("../utils/value-format-utils");
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
var propTypes = {
|
|
21
|
+
value: _propTypes.default.number,
|
|
22
|
+
format: _propTypes.default.string,
|
|
23
|
+
containerClassName: _propTypes.default.string
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var DurationFormatter = /*#__PURE__*/function (_React$Component) {
|
|
27
|
+
(0, _inheritsLoose2.default)(DurationFormatter, _React$Component);
|
|
28
|
+
|
|
29
|
+
function DurationFormatter() {
|
|
30
|
+
return _React$Component.apply(this, arguments) || this;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var _proto = DurationFormatter.prototype;
|
|
34
|
+
|
|
35
|
+
_proto.render = function render() {
|
|
36
|
+
var _this$props = this.props,
|
|
37
|
+
value = _this$props.value,
|
|
38
|
+
containerClassName = _this$props.containerClassName,
|
|
39
|
+
format = _this$props.format;
|
|
40
|
+
var classname = (0, _astroClassname.default)('dtable-ui cell-formatter-container duration-formatter', containerClassName);
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
+
className: classname
|
|
43
|
+
}, (0, _valueFormatUtils.getDurationDisplayString)(value, format));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return DurationFormatter;
|
|
47
|
+
}(_react.default.Component);
|
|
48
|
+
|
|
49
|
+
DurationFormatter.propTypes = propTypes;
|
|
50
|
+
var _default = DurationFormatter;
|
|
51
|
+
exports.default = _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _astroClassname = _interopRequireDefault(require("astro-classname"));
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
var propTypes = {
|
|
19
|
+
value: _propTypes.default.string,
|
|
20
|
+
containerClassName: _propTypes.default.string
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var EmailFormatter = /*#__PURE__*/function (_React$Component) {
|
|
24
|
+
(0, _inheritsLoose2.default)(EmailFormatter, _React$Component);
|
|
25
|
+
|
|
26
|
+
function EmailFormatter() {
|
|
27
|
+
return _React$Component.apply(this, arguments) || this;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var _proto = EmailFormatter.prototype;
|
|
31
|
+
|
|
32
|
+
_proto.render = function render() {
|
|
33
|
+
var _this$props = this.props,
|
|
34
|
+
containerClassName = _this$props.containerClassName,
|
|
35
|
+
value = _this$props.value;
|
|
36
|
+
var classname = (0, _astroClassname.default)('dtable-ui cell-formatter-container email-formatter', containerClassName);
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
+
className: classname
|
|
39
|
+
}, value);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return EmailFormatter;
|
|
43
|
+
}(_react.default.Component);
|
|
44
|
+
|
|
45
|
+
EmailFormatter.propTypes = propTypes;
|
|
46
|
+
var _default = EmailFormatter;
|
|
47
|
+
exports.default = _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@import url('../css/cell-formatter.css');
|
|
2
|
+
|
|
3
|
+
.dtable-ui.file-formatter {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.dtable-ui.file-formatter .file-item-icon {
|
|
9
|
+
display: inline-block;
|
|
10
|
+
height: 28px;
|
|
11
|
+
width: 28px;
|
|
12
|
+
border: 1px solid #f0f0f0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dtable-ui.file-formatter .file-item-count {
|
|
16
|
+
display: inline-block;
|
|
17
|
+
padding: 0 3px;
|
|
18
|
+
min-width: 14px;
|
|
19
|
+
line-height: 14px;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
border-radius: 6px;
|
|
22
|
+
text-align: center;
|
|
23
|
+
text-overflow: ellipsis;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
color: #fff;
|
|
26
|
+
background-color: #999;
|
|
27
|
+
-webkit-transform: translate(-50%, 8px) scale(.8);
|
|
28
|
+
transform: translate(-50%, 8px) scale(.8);
|
|
29
|
+
}
|