dtable-ui-component 6.0.40 → 6.0.42
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/lib/CheckboxFormatter/index.css +1 -1
- package/lib/CheckboxFormatter/index.js +24 -10
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +2 -2
- package/lib/SvgIcon/index.js +20 -15
- package/lib/assets/icons/check.svg +12 -0
- package/lib/assets/icons/cross.svg +13 -0
- package/lib/assets/icons/dot.svg +9 -0
- package/lib/locales/de.json +2 -2
- package/lib/locales/en.json +2 -2
- package/lib/locales/es.json +2 -2
- package/lib/locales/fr.json +2 -2
- package/lib/locales/pt.json +2 -2
- package/lib/locales/ru.json +2 -2
- package/lib/locales/zh-CN.json +2 -2
- package/package.json +1 -1
|
@@ -11,6 +11,29 @@ var _SvgIcon = _interopRequireDefault(require("../SvgIcon"));
|
|
|
11
11
|
var _constants = require("../constants");
|
|
12
12
|
require("./index.css");
|
|
13
13
|
class CheckboxFormatter extends _react.default.PureComponent {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.renderIcon = (symbol, color) => {
|
|
17
|
+
let className = 'dtable-ui-checkbox-check-mark';
|
|
18
|
+
if (symbol.startsWith('dtable-icon')) {
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
20
|
+
className: "dtable-font ".concat(symbol, " ").concat(className || ''),
|
|
21
|
+
style: {
|
|
22
|
+
color
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
className = (0, _classnames.default)(className, {
|
|
27
|
+
'dtable-ui-checkbox-check-svg': !(symbol !== null && symbol !== void 0 && symbol.startsWith('dtable-icon')),
|
|
28
|
+
'scale-icon': _constants.isMobile
|
|
29
|
+
});
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_SvgIcon.default, {
|
|
31
|
+
className: className,
|
|
32
|
+
symbol: symbol,
|
|
33
|
+
color: color
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
}
|
|
14
37
|
render() {
|
|
15
38
|
let {
|
|
16
39
|
value,
|
|
@@ -25,16 +48,7 @@ class CheckboxFormatter extends _react.default.PureComponent {
|
|
|
25
48
|
const classname = (0, _classnames.default)('dtable-ui cell-formatter-container checkbox-formatter d-flex align-items-center justify-content-center', containerClassName);
|
|
26
49
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
27
50
|
className: classname
|
|
28
|
-
}, checkboxStyle.type.
|
|
29
|
-
className: "dtable-font ".concat(checkboxStyle.type, " checkbox-checked-mark"),
|
|
30
|
-
style: {
|
|
31
|
-
color: checkboxStyle.color
|
|
32
|
-
}
|
|
33
|
-
}) : /*#__PURE__*/_react.default.createElement(_SvgIcon.default, {
|
|
34
|
-
className: "dtable-ui-checkbox-check-svg",
|
|
35
|
-
symbol: checkboxStyle.type,
|
|
36
|
-
color: checkboxStyle.color
|
|
37
|
-
}));
|
|
51
|
+
}, this.renderIcon(checkboxStyle.type, checkboxStyle.color));
|
|
38
52
|
}
|
|
39
53
|
}
|
|
40
54
|
CheckboxFormatter.defaultProps = {
|
|
@@ -382,7 +382,7 @@ class MapEditor extends _react.default.Component {
|
|
|
382
382
|
value: lat,
|
|
383
383
|
editable: isEdit,
|
|
384
384
|
onChange: this.handleLatitudeChange,
|
|
385
|
-
placeholder: (0, _lang.getLocale)('
|
|
385
|
+
placeholder: (0, _lang.getLocale)('Latitude')
|
|
386
386
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
387
387
|
className: "view-subtitle"
|
|
388
388
|
}, /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Longitude_abbr'))), /*#__PURE__*/_react.default.createElement(_InputItem.default, {
|
|
@@ -394,7 +394,7 @@ class MapEditor extends _react.default.Component {
|
|
|
394
394
|
value: lng,
|
|
395
395
|
editable: isEdit,
|
|
396
396
|
onChange: this.handleLongitudeChange,
|
|
397
|
-
placeholder: (0, _lang.getLocale)('
|
|
397
|
+
placeholder: (0, _lang.getLocale)('Longitude')
|
|
398
398
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
399
399
|
className: "dtable-ui-mobile-geolocation-map-editor-map"
|
|
400
400
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -444,7 +444,7 @@ class MapEditor extends _react.Component {
|
|
|
444
444
|
onChange: this.onChangeLatitude,
|
|
445
445
|
onKeyDown: this.onKeyDown,
|
|
446
446
|
className: "form-control",
|
|
447
|
-
placeholder: (0, _lang.getLocale)('
|
|
447
|
+
placeholder: (0, _lang.getLocale)('Latitude'),
|
|
448
448
|
autoFocus: true
|
|
449
449
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
450
450
|
className: "dtable-ui-geolocation-map-lng-lat-input-container map-lng-input-container"
|
|
@@ -456,7 +456,7 @@ class MapEditor extends _react.Component {
|
|
|
456
456
|
onChange: this.onChangeLongitude,
|
|
457
457
|
onKeyDown: this.onKeyDown,
|
|
458
458
|
className: "form-control",
|
|
459
|
-
placeholder: (0, _lang.getLocale)('
|
|
459
|
+
placeholder: (0, _lang.getLocale)('Longitude')
|
|
460
460
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
461
461
|
className: this.readOnly ? 'geolocation-map-read-only-container' : 'geolocation-map-container'
|
|
462
462
|
}, this.mapType && isLoading && /*#__PURE__*/_react.default.createElement(_Loading.default, null), !this.mapType && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -441,7 +441,7 @@ class LargeMapEditorDialog extends _react.default.Component {
|
|
|
441
441
|
onChange: this.onChangeLatitude,
|
|
442
442
|
onKeyDown: this.onKeyDown,
|
|
443
443
|
className: "form-control",
|
|
444
|
-
placeholder: (0, _lang.getLocale)('
|
|
444
|
+
placeholder: (0, _lang.getLocale)('Latitude'),
|
|
445
445
|
autoFocus: true
|
|
446
446
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
447
447
|
className: "dtable-ui-geolocation-map-lng-lat-input-container dtable-ui-geolocation-map-lng-input-container"
|
|
@@ -453,7 +453,7 @@ class LargeMapEditorDialog extends _react.default.Component {
|
|
|
453
453
|
onChange: this.onChangeLongitude,
|
|
454
454
|
onKeyDown: this.onKeyDown,
|
|
455
455
|
className: "form-control",
|
|
456
|
-
placeholder: (0, _lang.getLocale)('
|
|
456
|
+
placeholder: (0, _lang.getLocale)('Longitude')
|
|
457
457
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
458
458
|
className: this.readOnly ? 'geolocation-map-read-only-container' : 'geolocation-map-container-large'
|
|
459
459
|
}, this.mapType && isLoading && /*#__PURE__*/_react.default.createElement(_Loading.default, null), !this.mapType && /*#__PURE__*/_react.default.createElement("div", {
|
package/lib/SvgIcon/index.js
CHANGED
|
@@ -6,25 +6,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _constants = require("../constants");
|
|
10
9
|
require("./index.css");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
10
|
+
const iconComponents = {};
|
|
11
|
+
const requireContext = require.context('../assets/icons', false, /\.svg$/);
|
|
12
|
+
requireContext.keys().forEach(path => {
|
|
13
|
+
const iconName = path.replace(/^\.\/(.*?)\.svg$/, '$1').toLowerCase();
|
|
14
|
+
iconComponents[iconName] = requireContext(path).default;
|
|
15
|
+
});
|
|
16
|
+
const SvgIcon = _ref => {
|
|
17
|
+
let {
|
|
14
18
|
className,
|
|
15
19
|
symbol,
|
|
16
20
|
color
|
|
17
|
-
} =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
21
|
+
} = _ref;
|
|
22
|
+
if (!symbol) return null;
|
|
23
|
+
const iconClass = "dtable-ui-multicolor-icon multicolor-icon-".concat(symbol, " ").concat(className || '');
|
|
24
|
+
const props = {
|
|
23
25
|
className: iconClass,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
26
|
+
style: {
|
|
27
|
+
fill: color
|
|
28
|
+
},
|
|
29
|
+
ariaHidden: 'true'
|
|
30
|
+
};
|
|
31
|
+
const IconComponent = iconComponents[symbol];
|
|
32
|
+
if (!IconComponent) return null;
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(IconComponent, props);
|
|
29
34
|
};
|
|
30
35
|
var _default = exports.default = SvgIcon;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
|
5
|
+
<title>check</title>
|
|
6
|
+
<g id="check">
|
|
7
|
+
<g id="路径" transform="translate(0.020249, 4.178564)">
|
|
8
|
+
<path d="M27.9,0.7L12,18.1L4.1,8.9C3.2,7.9,1.8,7.6,0.7,8.6c-1,0.8-0.9,2.5,0,3.6c6.5,7.3,9.8,11,9.8,11
|
|
9
|
+
c1,0.9,1.9,1,2.8,0l17.9-19c1-1,1-2.5,0.2-3.4C30.4-0.4,28.8-0.2,27.9,0.7z"/>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
|
5
|
+
<title>x-check-box</title>
|
|
6
|
+
<g id="x-check-box">
|
|
7
|
+
<g id="fork-number">
|
|
8
|
+
<path id="路径" d="M18.8,16l8.5-8.5c0.8-0.8,0.8-2.1,0-2.8s-2.1-0.8-2.8,0L16,13.2L7.5,4.6c-0.8-0.8-2.1-0.8-2.8,0
|
|
9
|
+
s-0.8,2.1,0,2.8l8.5,8.5l-8.5,8.5c-0.8,0.8-0.8,2.1,0,2.8c0.8,0.7,2.1,0.8,2.8,0l8.5-8.5l8.5,8.5c0.8,0.8,2.1,0.8,2.8,0
|
|
10
|
+
c0.8-0.8,0.8-2.1,0-2.8l0,0L18.8,16z"/>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
|
5
|
+
<title>dot</title>
|
|
6
|
+
<g id="dot">
|
|
7
|
+
<circle id="椭圆形" cx="16" cy="16" r="9"/>
|
|
8
|
+
</g>
|
|
9
|
+
</svg>
|
package/lib/locales/de.json
CHANGED
package/lib/locales/en.json
CHANGED
package/lib/locales/es.json
CHANGED
package/lib/locales/fr.json
CHANGED
package/lib/locales/pt.json
CHANGED
package/lib/locales/ru.json
CHANGED
package/lib/locales/zh-CN.json
CHANGED