dtable-ui-component 6.0.29-beta11 → 6.0.29-beta2
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/CheckboxEditor/index.js +118 -24
- package/lib/CheckboxFormatter/index.css +1 -1
- package/lib/CheckboxFormatter/index.js +25 -10
- package/lib/CollaboratorEditor/index.js +11 -23
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +85 -0
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +148 -0
- package/lib/DTableCommonAddTool/index.js +3 -1
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +6 -6
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +6 -6
- package/lib/DateEditor/index.js +95 -69
- package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +118 -0
- package/lib/DateEditor/mb-date-editor-popover/index.css +45 -0
- package/lib/DateEditor/mb-date-editor-popover/index.js +226 -0
- package/lib/DateEditor/{pc-editor.js → pc-date-editor-popover.js} +9 -9
- package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.js +6 -6
- package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/department-single-select.js +7 -7
- package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.css +3 -10
- package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.js +25 -8
- package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.css +1 -0
- package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.js +3 -3
- package/lib/DigitalSignEditor/index.js +171 -24
- package/lib/FileEditor/addition-previewer/index.css +1 -0
- package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
- package/lib/FileEditor/addition-previewer/local-file-addition/index.css +1 -0
- package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/local-file-addition/index.js +4 -4
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/dropdown-menu.js +1 -1
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.js +1 -1
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.css +2 -0
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.js +2 -2
- package/lib/FileEditor/files-previewer/index.js +268 -26
- package/lib/FileEditor/index.css +5 -0
- package/lib/FileEditor/index.js +265 -26
- package/lib/FormulaFormatter/index.css +5 -5
- package/lib/GeolocationEditor/{pc-editor/country-editor.js → country-editor.js} +50 -5
- package/lib/GeolocationEditor/{pc-editor/index.css → index.css} +4 -3
- package/lib/GeolocationEditor/index.js +230 -90
- package/lib/GeolocationEditor/{pc-editor/location-editor.js → location-editor.js} +41 -8
- package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/index.js +6 -6
- package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/map-editor-utils.js +2 -6
- package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/index.js +7 -7
- package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{pc-editor/province-city-editor.js → province-city-editor.js} +38 -7
- package/lib/GeolocationEditor/{pc-editor/province-editor.js → province-editor.js} +31 -7
- package/lib/GeolocationEditor/{pc-editor/selector-header-item.js → selector-header-item.js} +1 -1
- package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.js +1 -1
- package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
- package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.js +4 -4
- package/lib/ImageEditor/images-previewer/image-preview/index.js +3 -3
- package/lib/ImageEditor/images-previewer/index.js +4 -9
- package/lib/ImageEditor/index.css +16 -17
- package/lib/ImageEditor/index.js +185 -26
- package/lib/ImageThumbnail/index.js +1 -2
- package/lib/LinkEditor/index.js +5 -5
- package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.css +1 -1
- package/lib/MultipleSelectEditor/index.js +14 -9
- package/lib/RowExpandDialog/column-content/index.js +2 -2
- package/lib/RowExpandDialog/index.js +0 -2
- package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.js +4 -6
- package/lib/RowExpandEditor/{checkbox-editor/pc-editor.js → RowExpandCheckboxEditor/index.js} +13 -9
- package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.css +1 -1
- package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.js +7 -6
- package/lib/RowExpandEditor/{date-editor/pc-editor.js → RowExpandDateEditor/index.js} +2 -2
- package/lib/RowExpandEditor/{department-editor/pc-editor.js → RowExpandDepartmentEditor/index.js} +49 -44
- package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.css +1 -1
- package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.js +11 -11
- package/lib/RowExpandEditor/{duration-editor/pc-editor.js → RowExpandDurationEditor/index.js} +2 -2
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +2 -0
- package/lib/RowExpandEditor/{email-editor/pc-editor → RowExpandEmailEditor}/index.js +3 -3
- package/lib/RowExpandEditor/RowExpandFileEditor/index.css +1 -0
- package/lib/RowExpandEditor/{file-editor/pc-editor → RowExpandFileEditor}/index.js +9 -9
- package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.js +11 -10
- package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.js +9 -9
- package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.js +7 -7
- package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.css +1 -1
- package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.js +6 -6
- package/lib/RowExpandEditor/{number-editor/pc-editor.js → RowExpandNumberEditor/index.js} +2 -2
- package/lib/RowExpandEditor/RowExpandRateEditor/index.css +13 -0
- package/lib/RowExpandEditor/{rate-editor/pc-editor.js → RowExpandRateEditor/index.js} +3 -2
- package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.js +17 -17
- package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.js +7 -7
- package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.js +6 -6
- package/lib/RowExpandEditor/constants.js +34 -34
- package/lib/RowExpandFormatter/{department-formatter/pc-formatter.js → RowExpandDepartmentFormatter/index.js} +2 -2
- package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.css +4 -4
- package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +5 -0
- package/lib/RowExpandFormatter/constants.js +17 -17
- package/lib/RowExpandFormatter/index.css +18 -33
- package/lib/RowExpandFormatter/index.js +1 -1
- package/lib/SelectItem/index.js +33 -57
- package/lib/SingleSelectEditor/index.js +14 -9
- 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/constants/index.js +2 -3
- package/lib/css/mb-cell-editor.css +1 -1
- package/lib/index.js +6 -69
- package/lib/locales/de.json +1 -3
- package/lib/locales/en.json +1 -3
- package/lib/locales/es.json +1 -3
- package/lib/locales/fr.json +1 -3
- package/lib/locales/pt.json +1 -3
- package/lib/locales/ru.json +1 -3
- package/lib/locales/zh-CN.json +1 -3
- package/lib/select-editor/index.js +20 -27
- package/lib/select-editor/mb-select-editor/index.css +127 -0
- package/lib/select-editor/mb-select-editor/index.js +197 -0
- package/lib/select-editor/{pc-editor → pc-select-editor}/index.css +1 -1
- package/lib/select-editor/{pc-editor → pc-select-editor}/index.js +7 -7
- package/lib/select-editor/select-editor-option.js +84 -0
- package/lib/utils/editor-utils.js +2 -6
- package/lib/utils/get-event-transfer.js +1 -2
- package/lib/utils/utils.js +2 -11
- package/package.json +2 -2
- package/lib/BodyPortal/index.js +0 -29
- package/lib/CheckboxEditor/mb-editor.js +0 -99
- package/lib/CheckboxEditor/pc-editor.js +0 -118
- package/lib/CollaboratorEditor/mb-editor/index.css +0 -41
- package/lib/CollaboratorEditor/mb-editor/index.js +0 -88
- package/lib/DateEditor/mb-editor/custom-rc-calendar.css +0 -118
- package/lib/DateEditor/mb-editor/index.css +0 -39
- package/lib/DateEditor/mb-editor/index.js +0 -215
- package/lib/DepartmentSingleSelectEditor/index.js +0 -34
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.css +0 -4
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +0 -227
- package/lib/DigitalSignEditor/mb-editor/index.css +0 -35
- package/lib/DigitalSignEditor/mb-editor/index.js +0 -144
- package/lib/DigitalSignEditor/pc-editor/index.js +0 -181
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +0 -122
- package/lib/FileEditor/files-previewer/mb-previewer/index.css +0 -39
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +0 -64
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +0 -276
- package/lib/FileEditor/mb-editor/index.css +0 -10
- package/lib/FileEditor/mb-editor/index.js +0 -136
- package/lib/FileEditor/pc-editor/addition-previewer/index.css +0 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.css +0 -1
- package/lib/FileEditor/pc-editor/index.css +0 -5
- package/lib/FileEditor/pc-editor/index.js +0 -274
- package/lib/GeolocationEditor/mb-editor/country-editor.js +0 -79
- package/lib/GeolocationEditor/mb-editor/index.css +0 -11
- package/lib/GeolocationEditor/mb-editor/index.js +0 -125
- package/lib/GeolocationEditor/mb-editor/location-editor.js +0 -101
- package/lib/GeolocationEditor/mb-editor/map-editor/index.css +0 -11
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +0 -474
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.css +0 -158
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +0 -530
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +0 -77
- package/lib/GeolocationEditor/mb-editor/province-editor.js +0 -76
- package/lib/GeolocationEditor/pc-editor/index.js +0 -247
- package/lib/ImageEditor/mb-editor/index.css +0 -29
- package/lib/ImageEditor/mb-editor/index.js +0 -136
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +0 -140
- package/lib/ImageEditor/pc-editor/index.css +0 -24
- package/lib/ImageEditor/pc-editor/index.js +0 -194
- package/lib/MobileFullScreenPage/body/index.css +0 -9
- package/lib/MobileFullScreenPage/body/index.js +0 -23
- package/lib/MobileFullScreenPage/header/index.css +0 -39
- package/lib/MobileFullScreenPage/header/index.js +0 -38
- package/lib/MobileFullScreenPage/index.css +0 -13
- package/lib/MobileFullScreenPage/index.js +0 -73
- package/lib/MobileModal/index.js +0 -41
- package/lib/MobileOperationSheet/index.css +0 -27
- package/lib/MobileOperationSheet/index.js +0 -92
- package/lib/MobileSelector/empty/index.css +0 -3
- package/lib/MobileSelector/empty/index.js +0 -23
- package/lib/MobileSelector/index.css +0 -32
- package/lib/MobileSelector/index.js +0 -57
- package/lib/MobileSelector/option/index.css +0 -28
- package/lib/MobileSelector/option/index.js +0 -36
- package/lib/MobileSelector/options/index.css +0 -8
- package/lib/MobileSelector/options/index.js +0 -18
- package/lib/MobileSelector/search/index.css +0 -7
- package/lib/MobileSelector/search/index.js +0 -26
- package/lib/MobileUpload/index.css +0 -1
- package/lib/MobileUpload/index.js +0 -160
- package/lib/RowExpand/index.js +0 -24
- package/lib/RowExpandEditor/add-btn/index.js +0 -24
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.css +0 -3
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +0 -19
- package/lib/RowExpandEditor/checkbox-editor/index.js +0 -25
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.css +0 -6
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +0 -36
- package/lib/RowExpandEditor/collaborator-editor/index.js +0 -24
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.css +0 -9
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +0 -163
- package/lib/RowExpandEditor/date-editor/index.js +0 -24
- package/lib/RowExpandEditor/date-editor/mb-editor.js +0 -82
- package/lib/RowExpandEditor/department-editor/index.js +0 -24
- package/lib/RowExpandEditor/department-editor/mb-editor.js +0 -65
- package/lib/RowExpandEditor/digital-sign-editor/index.js +0 -24
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.css +0 -1
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +0 -130
- package/lib/RowExpandEditor/duration-editor/index.js +0 -24
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +0 -71
- package/lib/RowExpandEditor/email-editor/index.js +0 -24
- package/lib/RowExpandEditor/email-editor/mb-editor/index.css +0 -1
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +0 -84
- package/lib/RowExpandEditor/email-editor/pc-editor/index.css +0 -1
- package/lib/RowExpandEditor/file-editor/index.js +0 -24
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +0 -114
- package/lib/RowExpandEditor/file-editor/pc-editor/index.css +0 -1
- package/lib/RowExpandEditor/geolocation-editor/index.js +0 -24
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +0 -100
- package/lib/RowExpandEditor/image-editor/index.js +0 -24
- package/lib/RowExpandEditor/image-editor/mb-editor/index.css +0 -30
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +0 -109
- package/lib/RowExpandEditor/long-text-editor/index.js +0 -24
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.css +0 -10
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +0 -80
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.css +0 -3
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +0 -91
- package/lib/RowExpandEditor/multiple-select-editor/index.js +0 -24
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +0 -154
- package/lib/RowExpandEditor/number-editor/index.js +0 -24
- package/lib/RowExpandEditor/number-editor/mb-editor/index.css +0 -3
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +0 -76
- package/lib/RowExpandEditor/rate-editor/index.css +0 -34
- package/lib/RowExpandEditor/rate-editor/index.js +0 -25
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +0 -92
- package/lib/RowExpandEditor/right-angle/index.css +0 -6
- package/lib/RowExpandEditor/right-angle/index.js +0 -17
- package/lib/RowExpandEditor/single-select-editor/index.js +0 -24
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.css +0 -8
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +0 -134
- package/lib/RowExpandEditor/text-editor/index.js +0 -24
- package/lib/RowExpandEditor/text-editor/mb-editor/index.css +0 -14
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +0 -37
- package/lib/RowExpandEditor/url-editor/index.js +0 -24
- package/lib/RowExpandEditor/url-editor/mb-editor/index.css +0 -17
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +0 -87
- package/lib/RowExpandFormatter/department-formatter/index.js +0 -19
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +0 -20
- package/lib/RowExpandFormatter/rate-formatter/index.css +0 -5
- package/lib/RowExpandView/body/index.css +0 -173
- package/lib/RowExpandView/body/index.js +0 -111
- package/lib/RowExpandView/column-content/index.css +0 -27
- package/lib/RowExpandView/column-content/index.js +0 -25
- package/lib/RowExpandView/index.css +0 -3
- package/lib/RowExpandView/index.js +0 -178
- package/lib/select-editor/mb-editor/index.css +0 -1
- package/lib/select-editor/mb-editor/index.js +0 -105
- /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.css +0 -0
- /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.js +0 -0
- /package/lib/{constants/departments.js → Department-editor/constants.js} +0 -0
- /package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.css +0 -0
- /package/lib/{utils/departments.js → Department-editor/utils.js} +0 -0
- /package/lib/DigitalSignEditor/{pc-editor/index.css → index.css} +0 -0
- /package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{pc-editor/parse-geolocation.js → parse-geolocation.js} +0 -0
- /package/lib/GeolocationEditor/{pc-editor/selector-list.js → selector-list.js} +0 -0
- /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.css +0 -0
- /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.css +0 -0
- /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.css +0 -0
- /package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.js +0 -0
- /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.css +0 -0
- /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.js +0 -0
- /package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.css +0 -0
- /package/lib/RowExpandEditor/{checkbox-editor → RowExpandCheckboxEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.css +0 -0
- /package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/row-expand-file-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{formula-formatter → RowExpandFormulaFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/row-expand-image-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/collaborator-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/value-display-utils.js +0 -0
- /package/lib/RowExpandFormatter/{rate-formatter → RowExpandRateFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.js +0 -0
|
@@ -8,13 +8,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactstrap = require("reactstrap");
|
|
11
|
-
var _DTableCustomFooter = _interopRequireDefault(require("
|
|
11
|
+
var _DTableCustomFooter = _interopRequireDefault(require("../DTableCustomFooter"));
|
|
12
12
|
var _selectorList = _interopRequireDefault(require("./selector-list"));
|
|
13
13
|
var _selectorHeaderItem = _interopRequireDefault(require("./selector-header-item"));
|
|
14
|
-
var _Loading = _interopRequireDefault(require("
|
|
14
|
+
var _Loading = _interopRequireDefault(require("../Loading"));
|
|
15
15
|
var _parseGeolocation = _interopRequireDefault(require("./parse-geolocation"));
|
|
16
|
-
var _constants = require("
|
|
17
|
-
var _lang = require("
|
|
16
|
+
var _constants = require("../constants");
|
|
17
|
+
var _lang = require("../lang");
|
|
18
18
|
class ProvinceCityEditor extends _react.Component {
|
|
19
19
|
constructor(props) {
|
|
20
20
|
super(props);
|
|
@@ -50,6 +50,21 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
50
50
|
selectedItem: 'city'
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
+
this.getLocationData = () => {
|
|
54
|
+
const {
|
|
55
|
+
mediaUrl
|
|
56
|
+
} = window.dtable;
|
|
57
|
+
|
|
58
|
+
// get locations from server
|
|
59
|
+
return fetch("".concat(mediaUrl, "geo-data/cn-location.json")).then(res => {
|
|
60
|
+
return res.json();
|
|
61
|
+
}).catch(() => {
|
|
62
|
+
// get locations from local
|
|
63
|
+
return fetch('./geo-data/cn-location.json').then(res => {
|
|
64
|
+
return res.json();
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
};
|
|
53
68
|
this.onToggleSelector = () => {
|
|
54
69
|
this.setState({
|
|
55
70
|
isShowSelector: !this.state.isShowSelector,
|
|
@@ -159,8 +174,24 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
159
174
|
this.isComposing = false;
|
|
160
175
|
}
|
|
161
176
|
componentDidMount() {
|
|
162
|
-
|
|
163
|
-
this.
|
|
177
|
+
if (!window.app.location) {
|
|
178
|
+
this.getLocationData().then(data => {
|
|
179
|
+
this.locations = data;
|
|
180
|
+
window.app.location = data;
|
|
181
|
+
const {
|
|
182
|
+
selectedProvince,
|
|
183
|
+
selectedCity,
|
|
184
|
+
selectedItem
|
|
185
|
+
} = this.initLocationSelecting(this.value);
|
|
186
|
+
this.setState({
|
|
187
|
+
isLoadingData: false,
|
|
188
|
+
selectedProvince,
|
|
189
|
+
selectedCity,
|
|
190
|
+
selectedItem
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
} else {
|
|
194
|
+
this.locations = window.app.location;
|
|
164
195
|
const {
|
|
165
196
|
selectedProvince,
|
|
166
197
|
selectedCity,
|
|
@@ -172,7 +203,7 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
172
203
|
selectedCity,
|
|
173
204
|
selectedItem
|
|
174
205
|
});
|
|
175
|
-
}
|
|
206
|
+
}
|
|
176
207
|
}
|
|
177
208
|
render() {
|
|
178
209
|
const {
|
|
@@ -7,13 +7,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _DTableSearchInput = _interopRequireDefault(require("
|
|
11
|
-
var _constants = require("
|
|
12
|
-
var _Loading = _interopRequireDefault(require("
|
|
13
|
-
var _lang = require("
|
|
10
|
+
var _DTableSearchInput = _interopRequireDefault(require("../DTableSearchInput"));
|
|
11
|
+
var _constants = require("../constants");
|
|
12
|
+
var _Loading = _interopRequireDefault(require("../Loading"));
|
|
13
|
+
var _lang = require("../lang");
|
|
14
14
|
class ProvinceEditor extends _react.Component {
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
17
|
+
this.getLocationData = () => {
|
|
18
|
+
// mediaUrl
|
|
19
|
+
const {
|
|
20
|
+
mediaUrl
|
|
21
|
+
} = window.dtable;
|
|
22
|
+
// get locations from server
|
|
23
|
+
return fetch("".concat(mediaUrl, "geo-data/cn-location.json")).then(res => {
|
|
24
|
+
return res.json();
|
|
25
|
+
}).catch(() => {
|
|
26
|
+
// get locations from local
|
|
27
|
+
return fetch('./geo-data/cn-location.json').then(res => {
|
|
28
|
+
return res.json();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
};
|
|
17
32
|
this.onHotKey = e => {
|
|
18
33
|
if (e.keyCode === _constants.KeyCodes.Enter) {
|
|
19
34
|
this.onEnter(e);
|
|
@@ -164,13 +179,22 @@ class ProvinceEditor extends _react.Component {
|
|
|
164
179
|
this.itemHeight = 30;
|
|
165
180
|
}
|
|
166
181
|
componentDidMount() {
|
|
167
|
-
|
|
168
|
-
this.
|
|
182
|
+
if (!window.app.location) {
|
|
183
|
+
this.getLocationData().then(data => {
|
|
184
|
+
this.locations = data;
|
|
185
|
+
window.app.location = data;
|
|
186
|
+
this.filteredProvince = this.locations.children;
|
|
187
|
+
this.setState({
|
|
188
|
+
isLoadingData: false
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
} else {
|
|
192
|
+
this.locations = window.app.location;
|
|
169
193
|
this.filteredProvince = this.locations.children;
|
|
170
194
|
this.setState({
|
|
171
195
|
isLoadingData: false
|
|
172
196
|
});
|
|
173
|
-
}
|
|
197
|
+
}
|
|
174
198
|
document.addEventListener('keydown', this.onHotKey, true);
|
|
175
199
|
}
|
|
176
200
|
componentWillUnmount() {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _lang = require("
|
|
9
|
+
var _lang = require("../lang");
|
|
10
10
|
class SelectorHeaderItem extends _react.default.Component {
|
|
11
11
|
render() {
|
|
12
12
|
const {
|
package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.js
RENAMED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactstrap = require("reactstrap");
|
|
10
|
-
var _lang = require("
|
|
10
|
+
var _lang = require("../../../lang");
|
|
11
11
|
require("./index.css");
|
|
12
12
|
class ImageLink extends _react.default.Component {
|
|
13
13
|
constructor(props) {
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _localImageAddition = _interopRequireDefault(require("./local-image-addition"));
|
|
10
10
|
var _imageLink = _interopRequireDefault(require("./image-link"));
|
|
11
|
-
var _lang = require("
|
|
11
|
+
var _lang = require("../../lang");
|
|
12
12
|
require("./index.css");
|
|
13
13
|
class AdditionPreviewer extends _react.default.Component {
|
|
14
14
|
constructor(props) {
|
|
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactstrap = require("reactstrap");
|
|
11
|
-
var _UploadProgress = _interopRequireDefault(require("
|
|
12
|
-
var _url = require("
|
|
13
|
-
var _FileUploader = _interopRequireDefault(require("
|
|
14
|
-
var _lang = require("
|
|
11
|
+
var _UploadProgress = _interopRequireDefault(require("../../../UploadProgress"));
|
|
12
|
+
var _url = require("../../../utils/url");
|
|
13
|
+
var _FileUploader = _interopRequireDefault(require("../../../FileUploader"));
|
|
14
|
+
var _lang = require("../../../lang");
|
|
15
15
|
require("./index.css");
|
|
16
16
|
class LocalImageAddition extends _react.default.Component {
|
|
17
17
|
constructor(props) {
|
|
@@ -85,7 +85,7 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
85
85
|
};
|
|
86
86
|
this.canDownLoad = props.canDownLoad;
|
|
87
87
|
const offsetWidth = document.body.offsetWidth;
|
|
88
|
-
this.containerSize = offsetWidth <
|
|
88
|
+
this.containerSize = offsetWidth < 767.8 ? (offsetWidth - 55) / 2 + 'px' : (offsetWidth - 80) / 3 + 'px';
|
|
89
89
|
this.position = {};
|
|
90
90
|
const {
|
|
91
91
|
mediaUrl
|
|
@@ -122,7 +122,7 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
122
122
|
imageItemUrl
|
|
123
123
|
} = this.props;
|
|
124
124
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
-
style:
|
|
125
|
+
style: window.isMobile ? {
|
|
126
126
|
width: this.containerSize,
|
|
127
127
|
height: this.containerSize
|
|
128
128
|
} : {},
|
|
@@ -134,7 +134,7 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
134
134
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
135
135
|
src: this.state.imageThumbnailUrl,
|
|
136
136
|
alt: ""
|
|
137
|
-
}), enterImageItemIndex === itemIndex && this.renderImageIcons()),
|
|
137
|
+
}), enterImageItemIndex === itemIndex && this.renderImageIcons()), enterImageItemIndex === itemIndex && /*#__PURE__*/_react.default.createElement(_reactstrap.Tooltip, {
|
|
138
138
|
placement: "bottom",
|
|
139
139
|
isOpen: this.state.isTooltipOpen,
|
|
140
140
|
toggle: this.toggle,
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
9
|
var _ImagePreviewerLightbox = _interopRequireDefault(require("../../ImagePreviewerLightbox"));
|
|
11
10
|
var _imagePreview = _interopRequireDefault(require("./image-preview"));
|
|
12
11
|
var _DTableCommonAddTool = _interopRequireDefault(require("../../DTableCommonAddTool"));
|
|
@@ -91,13 +90,13 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
91
90
|
};
|
|
92
91
|
}
|
|
93
92
|
componentDidMount() {
|
|
94
|
-
if (
|
|
93
|
+
if (window.isMobile) {
|
|
95
94
|
window.history.pushState(null, null, '#');
|
|
96
95
|
window.addEventListener('popstate', this.handleHistoryBack, false);
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
componentWillUnmount() {
|
|
100
|
-
if (
|
|
99
|
+
if (window.isMobile) {
|
|
101
100
|
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
102
101
|
}
|
|
103
102
|
}
|
|
@@ -106,13 +105,9 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
106
105
|
value
|
|
107
106
|
} = this.props;
|
|
108
107
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
-
className:
|
|
110
|
-
'mt-0': value.length === 0 && _constants.isMobile
|
|
111
|
-
})
|
|
108
|
+
className: "dtable-ui-image-previewer-container"
|
|
112
109
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
-
className:
|
|
114
|
-
'd-none': value.length === 0 && _constants.isMobile
|
|
115
|
-
})
|
|
110
|
+
className: "dtable-ui-image-previewer-wrapper ".concat(value.length === 0 && window.isMobile ? 'd-none' : '')
|
|
116
111
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
117
112
|
className: "dtable-ui-image-previewer-content"
|
|
118
113
|
}, value.length > 0 && value.map((imageItemUrl, index) => {
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
.dtable-ui-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
.dtable-ui-image-editor-dialog {
|
|
2
|
+
max-width: 620px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dtable-ui-image-editor-modal {
|
|
6
|
+
width: 620px;
|
|
7
|
+
max-height: 620px;
|
|
7
8
|
overflow: hidden;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
.dtable-ui-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
.dtable-ui-image-editor-container {
|
|
12
|
+
width: 100%;
|
|
13
|
+
background-color: #fff;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
.dtable-ui-
|
|
16
|
-
flex: 1;
|
|
16
|
+
.dtable-ui-image-addition-container {
|
|
17
17
|
display: flex;
|
|
18
|
-
|
|
19
|
-
align-items: flex-start;
|
|
20
|
-
margin: 0 10px;
|
|
18
|
+
flex-direction: row;
|
|
21
19
|
}
|
|
22
20
|
|
|
23
|
-
.dtable-ui-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
.dtable-ui-image-editor-dialog .dtable-icon-return {
|
|
22
|
+
color: #666666;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
}
|
package/lib/ImageEditor/index.js
CHANGED
|
@@ -1,35 +1,194 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
var _react =
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactstrap = require("reactstrap");
|
|
10
|
+
var _imagesPreviewer = _interopRequireDefault(require("./images-previewer"));
|
|
11
|
+
var _additionPreviewer = _interopRequireDefault(require("./addition-previewer"));
|
|
12
|
+
var _constants = require("../constants");
|
|
13
|
+
var _DTableModalHeader = _interopRequireDefault(require("../DTableModalHeader"));
|
|
14
|
+
var _lang = require("../lang");
|
|
15
|
+
var _constants2 = require("./constants");
|
|
13
16
|
require("./index.css");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
17
|
+
class ImageEditor extends _react.default.Component {
|
|
18
|
+
constructor(props) {
|
|
19
|
+
var _this;
|
|
20
|
+
super(props);
|
|
21
|
+
_this = this;
|
|
22
|
+
this.getValue = () => {
|
|
23
|
+
return this.state.value;
|
|
24
|
+
};
|
|
25
|
+
this.getEditorView = () => {
|
|
26
|
+
const {
|
|
27
|
+
isInModal,
|
|
28
|
+
value
|
|
29
|
+
} = this.props;
|
|
30
|
+
return !value || value.length === 0 || isInModal ? _constants.FILE_EDITOR_STATUS.ADDITION : _constants.FILE_EDITOR_STATUS.PREVIEWER;
|
|
31
|
+
};
|
|
32
|
+
this.deleteImage = function (index) {
|
|
33
|
+
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
34
|
+
let uploadLocalImageValue = _this.state.uploadLocalImageValue.slice(0);
|
|
35
|
+
let value = _this.state.value.slice(0);
|
|
36
|
+
if (_this.state.editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER) {
|
|
37
|
+
value.splice(index, 1);
|
|
38
|
+
} else {
|
|
39
|
+
if (type === 'localPicture') {
|
|
40
|
+
uploadLocalImageValue.splice(index, 1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
_this.setState({
|
|
44
|
+
uploadLocalImageValue: uploadLocalImageValue,
|
|
45
|
+
isUpdated: true,
|
|
46
|
+
value: value
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
this.resetAdditionImage = () => {
|
|
50
|
+
this.setState({
|
|
51
|
+
uploadLocalImageValue: [],
|
|
52
|
+
imageLinkValue: []
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
this.toggle = e => {
|
|
56
|
+
e.stopPropagation();
|
|
57
|
+
if (this.state.isOpen && this.state.isUpdated) {
|
|
58
|
+
if (this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION) {
|
|
59
|
+
let {
|
|
60
|
+
value,
|
|
61
|
+
uploadLocalImageValue
|
|
62
|
+
} = this.state;
|
|
63
|
+
let newValue = value.concat(uploadLocalImageValue);
|
|
64
|
+
this.setState({
|
|
65
|
+
value: newValue
|
|
66
|
+
}, () => {
|
|
67
|
+
this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onCommit();
|
|
68
|
+
});
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onCommit();
|
|
72
|
+
}
|
|
73
|
+
if (this.props.isInModal) {
|
|
74
|
+
this.props.onToggle();
|
|
75
|
+
}
|
|
76
|
+
const nextIsOpen = !this.state.isOpen;
|
|
77
|
+
this.setState({
|
|
78
|
+
isOpen: nextIsOpen
|
|
79
|
+
}, () => {
|
|
80
|
+
if (!nextIsOpen) {
|
|
81
|
+
this.props.onCommitCancel && this.props.onCommitCancel();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
this.closeEditor = () => {
|
|
86
|
+
this.setState({
|
|
87
|
+
isOpen: false
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
this.togglePreviewer = type => {
|
|
91
|
+
this.setState({
|
|
92
|
+
editorView: type
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
this.fileUploadCompleted = fileMessage => {
|
|
96
|
+
let uploadLocalImageValue = this.state.uploadLocalImageValue.slice(0);
|
|
97
|
+
const imageUrl = fileMessage.url;
|
|
98
|
+
uploadLocalImageValue.push(imageUrl);
|
|
99
|
+
this.setState({
|
|
100
|
+
uploadLocalImageValue: uploadLocalImageValue,
|
|
101
|
+
isUpdated: true
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
this.addUploadedFile = fileMessageList => {
|
|
105
|
+
let uploadLocalImageValue = this.state.uploadLocalImageValue.slice(0);
|
|
106
|
+
// eslint-disable-next-line no-unused-vars
|
|
107
|
+
for (let fileMessage of fileMessageList) {
|
|
108
|
+
uploadLocalImageValue.push(fileMessage.url);
|
|
109
|
+
}
|
|
110
|
+
this.setState({
|
|
111
|
+
uploadLocalImageValue: uploadLocalImageValue,
|
|
112
|
+
isUpdated: true
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
this.renderHeader = () => {
|
|
116
|
+
let {
|
|
117
|
+
editorView
|
|
118
|
+
} = this.state;
|
|
119
|
+
if (this.props.isInModal) {
|
|
120
|
+
return /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Add_images'));
|
|
121
|
+
}
|
|
122
|
+
if (editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER) {
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('All_images'));
|
|
124
|
+
}
|
|
125
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
+
onClick: this.showImageListPreviewer
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
128
|
+
"aria-hidden": "true",
|
|
129
|
+
className: "dtable-font dtable-icon-return mr-2"
|
|
130
|
+
}), /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Add_images')));
|
|
131
|
+
};
|
|
132
|
+
this.showImageListPreviewer = () => {
|
|
133
|
+
let {
|
|
134
|
+
value,
|
|
135
|
+
uploadLocalImageValue,
|
|
136
|
+
imageLinkValue
|
|
137
|
+
} = this.state;
|
|
138
|
+
let newValue = value.concat(uploadLocalImageValue, imageLinkValue);
|
|
139
|
+
this.setState({
|
|
140
|
+
value: newValue
|
|
141
|
+
});
|
|
142
|
+
this.togglePreviewer(_constants.FILE_EDITOR_STATUS.PREVIEWER);
|
|
143
|
+
};
|
|
144
|
+
this.saveImageLink = imageUrl => {
|
|
145
|
+
this.setState({
|
|
146
|
+
imageLinkValue: imageUrl,
|
|
147
|
+
isUpdated: true
|
|
148
|
+
});
|
|
149
|
+
this.showImageListPreviewer();
|
|
150
|
+
};
|
|
151
|
+
this.uploadFile = (file, callback) => {
|
|
152
|
+
return this.props.uploadFile(file, _constants2.IMAGES_FOLDER, callback);
|
|
153
|
+
};
|
|
154
|
+
this.state = {
|
|
155
|
+
value: props.value || [],
|
|
156
|
+
editorView: this.getEditorView(),
|
|
157
|
+
isOpen: true,
|
|
158
|
+
isShowFileChooser: false,
|
|
159
|
+
uploadLocalImageValue: [],
|
|
160
|
+
imageLinkValue: [],
|
|
161
|
+
isUpdated: false
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
render() {
|
|
165
|
+
return /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
|
|
166
|
+
className: "dtable-ui-image-editor-dialog",
|
|
167
|
+
contentClassName: "dtable-ui-image-editor-modal",
|
|
168
|
+
isOpen: this.state.isOpen,
|
|
169
|
+
toggle: this.toggle
|
|
170
|
+
}, /*#__PURE__*/_react.default.createElement(_DTableModalHeader.default, {
|
|
171
|
+
toggle: this.toggle
|
|
172
|
+
}, this.renderHeader()), /*#__PURE__*/_react.default.createElement(_reactstrap.ModalBody, {
|
|
173
|
+
className: "p-0"
|
|
174
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
175
|
+
className: "dtable-ui-image-editor-container"
|
|
176
|
+
}, this.state.editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER && /*#__PURE__*/_react.default.createElement(_imagesPreviewer.default, {
|
|
177
|
+
value: this.state.value,
|
|
178
|
+
togglePreviewer: this.togglePreviewer,
|
|
179
|
+
deleteImage: this.deleteImage,
|
|
180
|
+
resetAdditionImage: this.resetAdditionImage
|
|
181
|
+
}), this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION && /*#__PURE__*/_react.default.createElement(_additionPreviewer.default, {
|
|
182
|
+
deleteImage: this.deleteImage,
|
|
183
|
+
handleFilesChange: this.handleFilesChange,
|
|
184
|
+
uploadLocalImageValue: this.state.uploadLocalImageValue,
|
|
185
|
+
togglePreviewer: this.togglePreviewer,
|
|
186
|
+
saveImageLink: this.saveImageLink,
|
|
187
|
+
fileUploadCompleted: this.fileUploadCompleted,
|
|
188
|
+
addUploadedFile: this.addUploadedFile,
|
|
189
|
+
showImageListPreviewer: this.showImageListPreviewer,
|
|
190
|
+
uploadFile: this.uploadFile
|
|
191
|
+
}))));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
35
194
|
var _default = exports.default = ImageEditor;
|
|
@@ -11,7 +11,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
var _DeleteTip = _interopRequireDefault(require("../DeleteTip"));
|
|
12
12
|
var _url = require("../utils/url");
|
|
13
13
|
var _lang = require("../lang");
|
|
14
|
-
var _constants = require("../constants");
|
|
15
14
|
require("./index.css");
|
|
16
15
|
class ImageThumbnail extends _react.default.Component {
|
|
17
16
|
constructor(props) {
|
|
@@ -122,7 +121,7 @@ class ImageThumbnail extends _react.default.Component {
|
|
|
122
121
|
toggle: this.closeTip,
|
|
123
122
|
handleDelete: this.deleteImage,
|
|
124
123
|
deleteTip: this.props.deleteTip || (0, _lang.getLocale)('Are_you_sure_you_want_to_delete_this_image')
|
|
125
|
-
}),
|
|
124
|
+
}), this.ref && /*#__PURE__*/_react.default.createElement(_reactstrap.Tooltip, {
|
|
126
125
|
placement: "bottom",
|
|
127
126
|
isOpen: this.state.isTooltipOpen,
|
|
128
127
|
toggle: this.toggle,
|
package/lib/LinkEditor/index.js
CHANGED
|
@@ -12,8 +12,8 @@ var _dtableUtils = require("dtable-utils");
|
|
|
12
12
|
var _lang = require("../lang");
|
|
13
13
|
var _EditEditorButton = _interopRequireDefault(require("../EditEditorButton"));
|
|
14
14
|
var _linkEditorOption = _interopRequireDefault(require("./link-editor-option"));
|
|
15
|
-
var
|
|
16
|
-
var
|
|
15
|
+
var _pcLinkEditorPopover = _interopRequireDefault(require("./pc-link-editor-popover"));
|
|
16
|
+
var _mbLinkEditorPopover = _interopRequireDefault(require("./mb-link-editor-popover"));
|
|
17
17
|
require("./index.css");
|
|
18
18
|
class LinkEditor extends _react.default.Component {
|
|
19
19
|
constructor(props) {
|
|
@@ -238,14 +238,14 @@ class LinkEditor extends _react.default.Component {
|
|
|
238
238
|
});
|
|
239
239
|
})), isPopoverShow && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
240
240
|
query: "(min-width: 768px)"
|
|
241
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
241
|
+
}, /*#__PURE__*/_react.default.createElement(_pcLinkEditorPopover.default, {
|
|
242
242
|
popoverPosition: popoverPosition,
|
|
243
243
|
options: options,
|
|
244
244
|
selectedOptions: selectedOptions,
|
|
245
245
|
onOptionItemToggle: this.onOptionItemToggle
|
|
246
246
|
})), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
247
|
-
query: "(max-width:
|
|
248
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
247
|
+
query: "(max-width: 767.8px)"
|
|
248
|
+
}, /*#__PURE__*/_react.default.createElement(_mbLinkEditorPopover.default, {
|
|
249
249
|
isReadOnly: this.props.isReadOnly,
|
|
250
250
|
value: this.state.newValue,
|
|
251
251
|
column: this.props.column,
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
var _react =
|
|
10
|
-
var
|
|
11
|
-
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
10
|
+
var _selectEditor = require("../select-editor");
|
|
11
|
+
const MultipleSelectEditor = _ref => {
|
|
12
12
|
let {
|
|
13
13
|
value: oldValue,
|
|
14
14
|
...props
|
|
15
15
|
} = _ref;
|
|
16
16
|
const value = oldValue ? Array.isArray(oldValue) ? oldValue : [oldValue] : [];
|
|
17
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
18
|
+
query: "(min-width: 768px)"
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement(_selectEditor.PCSelectEditor, Object.assign({}, props, {
|
|
20
|
+
value: value
|
|
21
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
22
|
+
query: "(max-width: 767.8px)"
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement(_selectEditor.MBSelectEditor, Object.assign({}, props, {
|
|
24
|
+
value: value
|
|
25
|
+
}))));
|
|
26
|
+
};
|
|
22
27
|
var _default = exports.default = MultipleSelectEditor;
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _reactstrap = require("reactstrap");
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
11
|
require("./index.css");
|
|
12
|
-
const
|
|
12
|
+
const RowContent = _ref => {
|
|
13
13
|
let {
|
|
14
14
|
column,
|
|
15
15
|
children
|
|
@@ -47,4 +47,4 @@ const ColumnContent = _ref => {
|
|
|
47
47
|
className: "d-flex align-items-center dtable-ui-row-expand-column-content-value"
|
|
48
48
|
}, children));
|
|
49
49
|
};
|
|
50
|
-
var _default = exports.default =
|
|
50
|
+
var _default = exports.default = RowContent;
|
|
@@ -235,6 +235,4 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
235
235
|
color: "primary"
|
|
236
236
|
}, (0, _lang.getLocale)('Submit'))))));
|
|
237
237
|
});
|
|
238
|
-
RowExpandDialog.Header = _header.default;
|
|
239
|
-
RowExpandDialog.Body = _body.default;
|
|
240
238
|
var _default = exports.default = RowExpandDialog;
|