dtable-ui-component 7.0.13 → 7.0.15
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/ActionSheet/index.js +58 -49
- package/lib/ActivityIndicator/index.js +17 -16
- package/lib/AsyncUserSelect/index.js +20 -46
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +27 -29
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +16 -13
- package/lib/CheckboxEditor/mb-editor.js +20 -9
- package/lib/CheckboxEditor/pc-editor.js +24 -12
- package/lib/CheckboxFormatter/index.js +5 -4
- package/lib/CollaboratorEditor/index.js +17 -14
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +8 -10
- package/lib/Comment/body/comment.js +19 -11
- package/lib/Comment/body/index.js +8 -8
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +21 -10
- package/lib/Comment/footer/input/index.js +55 -34
- package/lib/Comment/footer/input/participant/index.js +6 -5
- package/lib/Comment/footer/participants/index.js +5 -4
- package/lib/Comment/footer/participants/participant/index.js +3 -1
- package/lib/Comment/footer/participants/participant-select/index.js +26 -10
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +22 -16
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
- package/lib/DTableColorPicker/index.js +53 -67
- package/lib/DTableColorPicker/utils.js +7 -5
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +10 -8
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeSearchInput/index.js +41 -26
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +28 -24
- package/lib/DTableDropdownMenu/index.js +17 -14
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +42 -27
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +114 -64
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
- package/lib/DTableFiltersPopover/widgets/filter-group.js +57 -36
- package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
- package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
- package/lib/DTableIcon/index.js +11 -10
- package/lib/DTableIcon/svg-icon.js +11 -9
- package/lib/DTableModalHeader/index.js +7 -7
- package/lib/DTablePopover/index.js +16 -12
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +20 -11
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +6 -7
- package/lib/DTableSelect/index.js +26 -25
- package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
- package/lib/DTableSelect/utils.js +83 -47
- package/lib/DTableSubDropdownMenu/index.js +16 -12
- package/lib/DTableSubDropdownToggle/index.js +16 -17
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +12 -11
- package/lib/DateEditor/index.js +28 -30
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +46 -27
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +7 -5
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
- package/lib/DepartmentSelectFilter/index.js +13 -8
- package/lib/DepartmentSingleSelectEditor/index.js +16 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +16 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
- package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
- package/lib/DigitalSignEditor/service.js +5 -3
- package/lib/DigitalSignEditor/signature-board/index.js +10 -7
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +6 -5
- package/lib/Drawer/index.js +3 -2
- package/lib/DurationEditor/index.js +31 -21
- package/lib/DurationFormatter/index.js +5 -4
- package/lib/EditEditorButton/index.js +3 -1
- package/lib/EmailFormatter/index.js +4 -3
- package/lib/FieldDisplaySetting/field-item.js +13 -13
- package/lib/FieldDisplaySetting/index.js +20 -20
- package/lib/FileEditor/files-previewer/index.js +16 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +24 -17
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +16 -13
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
- package/lib/FileEditor/pc-editor/index.js +30 -22
- package/lib/FileFormatter/index.js +20 -27
- package/lib/FileItemFormatter/index.js +10 -7
- package/lib/FileUploader/index.js +46 -29
- package/lib/FormulaFormatter/index.js +44 -24
- package/lib/GeolocationEditor/index.js +32 -27
- package/lib/GeolocationEditor/map-editor-utils.js +23 -21
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +28 -22
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
- package/lib/GeolocationEditor/pc-editor/country-editor.js +25 -12
- package/lib/GeolocationEditor/pc-editor/index.js +41 -27
- package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
- package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +13 -5
- package/lib/Icon/index.js +13 -15
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +12 -13
- package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +16 -13
- package/lib/ImageEditor/mb-editor/index.js +20 -28
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +5 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +14 -12
- package/lib/ImagePreviewerLightbox/index.js +15 -19
- package/lib/ImageThumbnail/index.js +15 -12
- package/lib/InputItem/custom-input.js +55 -35
- package/lib/InputItem/custom-keyboard.js +42 -42
- package/lib/InputItem/index.js +82 -63
- package/lib/InputItem/input.js +9 -11
- package/lib/LastModifierFormatter/index.js +8 -6
- package/lib/LinkEditor/index.js +53 -33
- package/lib/LinkEditor/link-editor-option.js +4 -3
- package/lib/LinkEditor/mb-popover/index.js +22 -9
- package/lib/LinkEditor/pc-popover/index.js +13 -7
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +17 -19
- package/lib/List/list-item.js +59 -55
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +9 -8
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +10 -8
- package/lib/MobileFullScreenPage/index.js +12 -14
- package/lib/MobileModal/index.js +7 -8
- package/lib/MobileOperationSheet/index.js +8 -7
- package/lib/MobileSelector/empty/index.js +3 -1
- package/lib/MobileSelector/index.js +7 -5
- package/lib/MobileSelector/option/index.js +5 -3
- package/lib/MobileSelector/options/index.css +0 -4
- package/lib/MobileSelector/options/index.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +28 -30
- package/lib/Modal/prompt.js +14 -14
- package/lib/MultipleSelectEditor/index.js +7 -7
- package/lib/MultipleSelectFormatter/index.js +9 -7
- package/lib/NotificationPopover/index.js +5 -4
- package/lib/NumberEditor/index.js +21 -12
- package/lib/NumberFormatter/index.js +5 -4
- package/lib/PhoneNumberLink/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +35 -33
- package/lib/Popover/index.js +9 -11
- package/lib/Popover/item.js +22 -24
- package/lib/Progress/index.js +18 -17
- package/lib/Radio/Radio.js +17 -15
- package/lib/Radio/RadioItem.js +23 -19
- package/lib/RateFormatter/index.js +15 -15
- package/lib/RoleStatusEditor/index.js +18 -19
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +57 -40
- package/lib/RowExpandDialog/column-content/index.js +10 -6
- package/lib/RowExpandDialog/header/index.js +12 -9
- package/lib/RowExpandDialog/index.js +59 -63
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
- package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- package/lib/RowExpandEditor/date-editor/index.js +7 -6
- package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
- package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
- package/lib/RowExpandEditor/department-editor/index.js +7 -6
- package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
- package/lib/RowExpandEditor/email-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
- package/lib/RowExpandEditor/index.js +16 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
- package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
- package/lib/RowExpandEditor/rate-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
- package/lib/RowExpandEditor/url-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
- package/lib/RowExpandFormatter/email-formatter/index.js +8 -5
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
- package/lib/RowExpandFormatter/index.js +52 -34
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
- package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
- package/lib/RowExpandView/body/index.js +43 -32
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +52 -53
- package/lib/SelectItem/index.js +7 -5
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +12 -10
- package/lib/SimpleLongTextFormatter/index.js +18 -12
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
- package/lib/SingleSelectEditor/index.js +7 -7
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +26 -24
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +13 -10
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +53 -48
- package/lib/Toast/index.js +9 -8
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/formatterConfig/index.js +3 -3
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +16 -13
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +47 -32
- package/lib/toaster/alert.js +8 -7
- package/lib/toaster/toast.js +4 -3
- package/lib/toaster/toastManager.js +13 -13
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/cell.js +11 -8
- package/lib/utils/class.js +3 -3
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +6 -5
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +29 -22
- package/lib/utils/utils.js +6 -2
- package/package.json +2 -2
package/lib/InputItem/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
|
13
11
|
var React = _interopRequireWildcard(require("react"));
|
|
@@ -17,8 +15,8 @@ var _customInput = _interopRequireDefault(require("./custom-input"));
|
|
|
17
15
|
var _input = _interopRequireDefault(require("./input"));
|
|
18
16
|
require("./style/index.css");
|
|
19
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["prefixCls", "prefixListCls", "editable", "style", "clear", "children", "error", "className", "extra", "labelNumber", "type", "onExtraClick", "onErrorClick", "moneyKeyboardAlign", "moneyKeyboardWrapProps", "moneyKeyboardHeader", "onVirtualKeyboardConfirm", "autoAdjustHeight", "disabledKeys"];
|
|
21
18
|
/* tslint:disable:jsx-no-multiline-js */
|
|
19
|
+
|
|
22
20
|
function noop() {}
|
|
23
21
|
function normalizeValue(value) {
|
|
24
22
|
if (typeof value === 'undefined' || value === null) {
|
|
@@ -33,7 +31,9 @@ class InputItem extends React.Component {
|
|
|
33
31
|
_this = this;
|
|
34
32
|
this.onInputChange = e => {
|
|
35
33
|
const el = e.target;
|
|
36
|
-
const
|
|
34
|
+
const {
|
|
35
|
+
value: rawVal
|
|
36
|
+
} = el;
|
|
37
37
|
let prePos = 0;
|
|
38
38
|
try {
|
|
39
39
|
// some input type do not support selection, see https://html.spec.whatwg.org/multipage/input.html#do-not-apply
|
|
@@ -41,9 +41,12 @@ class InputItem extends React.Component {
|
|
|
41
41
|
} catch (error) {
|
|
42
42
|
console.warn('Get selection error:', error);
|
|
43
43
|
}
|
|
44
|
-
const
|
|
45
|
-
preCtrlVal =
|
|
46
|
-
|
|
44
|
+
const {
|
|
45
|
+
value: preCtrlVal = ''
|
|
46
|
+
} = this.state;
|
|
47
|
+
const {
|
|
48
|
+
type
|
|
49
|
+
} = this.props;
|
|
47
50
|
let ctrlValue = rawVal;
|
|
48
51
|
switch (type) {
|
|
49
52
|
case 'bankCard':
|
|
@@ -53,9 +56,9 @@ class InputItem extends React.Component {
|
|
|
53
56
|
ctrlValue = rawVal.replace(/\D/g, '').substring(0, 11);
|
|
54
57
|
const valueLen = ctrlValue.length;
|
|
55
58
|
if (valueLen > 3 && valueLen < 8) {
|
|
56
|
-
ctrlValue =
|
|
59
|
+
ctrlValue = `${ctrlValue.substr(0, 3)} ${ctrlValue.substr(3)}`;
|
|
57
60
|
} else if (valueLen >= 8) {
|
|
58
|
-
ctrlValue =
|
|
61
|
+
ctrlValue = `${ctrlValue.substr(0, 3)} ${ctrlValue.substr(3, 4)} ${ctrlValue.substr(7)}`;
|
|
59
62
|
}
|
|
60
63
|
break;
|
|
61
64
|
case 'number':
|
|
@@ -91,7 +94,9 @@ class InputItem extends React.Component {
|
|
|
91
94
|
this.handleOnChange = function (value) {
|
|
92
95
|
let isMutated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
93
96
|
let adjustPos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
|
|
94
|
-
const
|
|
97
|
+
const {
|
|
98
|
+
onChange
|
|
99
|
+
} = _this.props;
|
|
95
100
|
if (!('value' in _this.props)) {
|
|
96
101
|
_this.setState({
|
|
97
102
|
value
|
|
@@ -215,56 +220,67 @@ class InputItem extends React.Component {
|
|
|
215
220
|
}
|
|
216
221
|
}
|
|
217
222
|
render() {
|
|
218
|
-
const props =
|
|
223
|
+
const props = {
|
|
224
|
+
...this.props
|
|
225
|
+
};
|
|
219
226
|
delete props.updatePlaceholder;
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
227
|
+
const {
|
|
228
|
+
prefixCls,
|
|
229
|
+
prefixListCls,
|
|
230
|
+
editable,
|
|
231
|
+
style,
|
|
232
|
+
clear,
|
|
233
|
+
children,
|
|
234
|
+
error,
|
|
235
|
+
className,
|
|
236
|
+
extra,
|
|
237
|
+
labelNumber,
|
|
238
|
+
type,
|
|
239
|
+
onExtraClick,
|
|
240
|
+
onErrorClick,
|
|
241
|
+
moneyKeyboardAlign,
|
|
242
|
+
moneyKeyboardWrapProps,
|
|
243
|
+
moneyKeyboardHeader,
|
|
244
|
+
onVirtualKeyboardConfirm,
|
|
245
|
+
autoAdjustHeight,
|
|
246
|
+
disabledKeys,
|
|
247
|
+
...restProps
|
|
248
|
+
} = props;
|
|
249
|
+
const {
|
|
250
|
+
name,
|
|
251
|
+
disabled,
|
|
252
|
+
maxLength
|
|
253
|
+
} = restProps;
|
|
254
|
+
const {
|
|
255
|
+
value
|
|
256
|
+
} = this.state;
|
|
244
257
|
|
|
245
258
|
// tslint:disable-next-line:variable-name
|
|
246
259
|
const _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'InputItem', () => require('./locale/zh_CN'));
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
[
|
|
260
|
+
const {
|
|
261
|
+
confirmLabel,
|
|
262
|
+
backspaceLabel,
|
|
263
|
+
cancelKeyboardLabel
|
|
264
|
+
} = _locale;
|
|
265
|
+
const {
|
|
266
|
+
focus,
|
|
267
|
+
placeholder
|
|
268
|
+
} = this.state;
|
|
269
|
+
const wrapCls = (0, _classnames.default)(`${prefixListCls}-item`, `${prefixCls}-item`, `${prefixListCls}-item-middle`, className, {
|
|
270
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
271
|
+
[`${prefixCls}-error`]: error,
|
|
272
|
+
[`${prefixCls}-focus`]: focus,
|
|
273
|
+
[`${prefixCls}-android`]: focus
|
|
258
274
|
});
|
|
259
|
-
const labelCls = (0, _classnames.default)(
|
|
260
|
-
[
|
|
261
|
-
[
|
|
262
|
-
[
|
|
263
|
-
[
|
|
264
|
-
[
|
|
265
|
-
[
|
|
275
|
+
const labelCls = (0, _classnames.default)(`${prefixCls}-label`, {
|
|
276
|
+
[`${prefixCls}-label-2`]: labelNumber === 2,
|
|
277
|
+
[`${prefixCls}-label-3`]: labelNumber === 3,
|
|
278
|
+
[`${prefixCls}-label-4`]: labelNumber === 4,
|
|
279
|
+
[`${prefixCls}-label-5`]: labelNumber === 5,
|
|
280
|
+
[`${prefixCls}-label-6`]: labelNumber === 6,
|
|
281
|
+
[`${prefixCls}-label-7`]: labelNumber === 7
|
|
266
282
|
});
|
|
267
|
-
const controlCls =
|
|
283
|
+
const controlCls = `${prefixCls}-control`;
|
|
268
284
|
let inputType = 'text';
|
|
269
285
|
if (type === 'bankCard' || type === 'phone') {
|
|
270
286
|
inputType = 'tel';
|
|
@@ -290,7 +306,7 @@ class InputItem extends React.Component {
|
|
|
290
306
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
291
307
|
className: wrapCls,
|
|
292
308
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
293
|
-
className:
|
|
309
|
+
className: `${prefixListCls}-line`,
|
|
294
310
|
children: [children ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
295
311
|
className: labelCls,
|
|
296
312
|
children: children
|
|
@@ -318,7 +334,10 @@ class InputItem extends React.Component {
|
|
|
318
334
|
moneyKeyboardHeader: moneyKeyboardHeader,
|
|
319
335
|
autoAdjustHeight: autoAdjustHeight,
|
|
320
336
|
disabledKeys: disabledKeys
|
|
321
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.default,
|
|
337
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.default, {
|
|
338
|
+
...patternProps,
|
|
339
|
+
...restProps,
|
|
340
|
+
...classNameProps,
|
|
322
341
|
value: normalizeValue(value),
|
|
323
342
|
defaultValue: undefined,
|
|
324
343
|
ref: el => this.inputRef = el,
|
|
@@ -332,18 +351,18 @@ class InputItem extends React.Component {
|
|
|
332
351
|
onBlur: this.onInputBlur,
|
|
333
352
|
readOnly: !editable,
|
|
334
353
|
disabled: disabled
|
|
335
|
-
})
|
|
336
|
-
}), clear && editable && !disabled && value &&
|
|
337
|
-
activeClassName:
|
|
354
|
+
})
|
|
355
|
+
}), clear && editable && !disabled && value && `${value}`.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
356
|
+
activeClassName: `${prefixCls}-clear-active`,
|
|
338
357
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
339
|
-
className:
|
|
358
|
+
className: `${prefixCls}-clear`,
|
|
340
359
|
onClick: this.clearInput
|
|
341
360
|
})
|
|
342
361
|
}) : null, error ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
343
|
-
className:
|
|
362
|
+
className: `${prefixCls}-error-extra`,
|
|
344
363
|
onClick: onErrorClick
|
|
345
364
|
}) : null, extra !== '' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
346
|
-
className:
|
|
365
|
+
className: `${prefixCls}-extra`,
|
|
347
366
|
onClick: onExtraClick,
|
|
348
367
|
children: extra
|
|
349
368
|
}) : null]
|
package/lib/InputItem/input.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
8
|
var React = _interopRequireWildcard(require("react"));
|
|
12
9
|
require("./style/index.css");
|
|
13
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
const _excluded = ["onBlur", "onFocus"];
|
|
15
11
|
class Input extends React.Component {
|
|
16
12
|
constructor() {
|
|
17
13
|
super(...arguments);
|
|
@@ -35,15 +31,17 @@ class Input extends React.Component {
|
|
|
35
31
|
};
|
|
36
32
|
}
|
|
37
33
|
render() {
|
|
38
|
-
const
|
|
39
|
-
onBlur
|
|
40
|
-
onFocus
|
|
41
|
-
restProps
|
|
42
|
-
|
|
34
|
+
const {
|
|
35
|
+
onBlur,
|
|
36
|
+
onFocus,
|
|
37
|
+
...restProps
|
|
38
|
+
} = this.props;
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
43
40
|
ref: el => this.inputRef = el,
|
|
44
41
|
onBlur: this.onInputBlur,
|
|
45
|
-
onFocus: this.onInputFocus
|
|
46
|
-
|
|
42
|
+
onFocus: this.onInputFocus,
|
|
43
|
+
...restProps
|
|
44
|
+
});
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
var _default = exports.default = Input;
|
|
@@ -20,9 +20,10 @@ class LastModifierFormatter extends _react.default.PureComponent {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.getCollaborators = () => {
|
|
23
|
-
let
|
|
24
|
-
value
|
|
25
|
-
collaborators
|
|
23
|
+
let {
|
|
24
|
+
value,
|
|
25
|
+
collaborators
|
|
26
|
+
} = this.props;
|
|
26
27
|
if (!Array.isArray(value)) {
|
|
27
28
|
value = [value];
|
|
28
29
|
}
|
|
@@ -42,9 +43,10 @@ class LastModifierFormatter extends _react.default.PureComponent {
|
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
render() {
|
|
45
|
-
const
|
|
46
|
-
containerClassName
|
|
47
|
-
value
|
|
46
|
+
const {
|
|
47
|
+
containerClassName,
|
|
48
|
+
value
|
|
49
|
+
} = this.props;
|
|
48
50
|
const classname = (0, _classnames.default)('dtable-ui cell-formatter-container last-modified-formatter', containerClassName);
|
|
49
51
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
50
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
package/lib/LinkEditor/index.js
CHANGED
|
@@ -25,29 +25,36 @@ class LinkEditor extends _react.default.Component {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
this.getLinkedCellValue = () => {
|
|
28
|
-
let
|
|
29
|
-
row
|
|
30
|
-
column
|
|
31
|
-
linkMetaData
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
let {
|
|
29
|
+
row,
|
|
30
|
+
column,
|
|
31
|
+
linkMetaData
|
|
32
|
+
} = this.props;
|
|
33
|
+
let {
|
|
34
|
+
link_id,
|
|
35
|
+
table_id,
|
|
36
|
+
other_table_id
|
|
37
|
+
} = column.data || {};
|
|
36
38
|
this.linkId = link_id;
|
|
37
39
|
this.tableId = table_id;
|
|
38
40
|
this.otherTableId = other_table_id;
|
|
39
41
|
return linkMetaData.getLinkedCellValue(this.linkId, this.tableId, this.otherTableId, row._id);
|
|
40
42
|
};
|
|
41
43
|
this.formatLinkedValuesToOptions = () => {
|
|
42
|
-
let
|
|
43
|
-
column
|
|
44
|
-
linkMetaData
|
|
45
|
-
|
|
44
|
+
let {
|
|
45
|
+
column,
|
|
46
|
+
linkMetaData
|
|
47
|
+
} = this.props;
|
|
48
|
+
let {
|
|
49
|
+
newValue: rowIds
|
|
50
|
+
} = this.state;
|
|
46
51
|
if (rowIds && Array.isArray(rowIds) && rowIds.length > 0) {
|
|
47
52
|
let linkedRows = linkMetaData.getLinkedRows(this.otherTableId, rowIds);
|
|
48
53
|
let linkedTable = linkMetaData.getLinkedTable(this.otherTableId);
|
|
49
54
|
return linkedRows.map(linkedRow => {
|
|
50
|
-
let
|
|
55
|
+
let {
|
|
56
|
+
display_column_key: displayColumnKey
|
|
57
|
+
} = column.data;
|
|
51
58
|
// format value to display
|
|
52
59
|
let displayValue = this.getDisplayValue(linkedTable, linkedRow, displayColumnKey);
|
|
53
60
|
return {
|
|
@@ -61,8 +68,10 @@ class LinkEditor extends _react.default.Component {
|
|
|
61
68
|
this.getDisplayValue = (linkedTable, linkedRow, displayColumnKey) => {
|
|
62
69
|
let value = linkedRow[displayColumnKey];
|
|
63
70
|
let linkedColumn = linkedTable.columns.find(column => column.key === displayColumnKey);
|
|
64
|
-
let
|
|
65
|
-
|
|
71
|
+
let {
|
|
72
|
+
type,
|
|
73
|
+
data
|
|
74
|
+
} = linkedColumn;
|
|
66
75
|
switch (type) {
|
|
67
76
|
case _dtableUtils.CellType.NUMBER:
|
|
68
77
|
{
|
|
@@ -70,7 +79,9 @@ class LinkEditor extends _react.default.Component {
|
|
|
70
79
|
}
|
|
71
80
|
case _dtableUtils.CellType.DATE:
|
|
72
81
|
{
|
|
73
|
-
let
|
|
82
|
+
let {
|
|
83
|
+
format
|
|
84
|
+
} = data;
|
|
74
85
|
return (0, _dtableUtils.getDateDisplayString)(value, format);
|
|
75
86
|
}
|
|
76
87
|
default:
|
|
@@ -78,10 +89,13 @@ class LinkEditor extends _react.default.Component {
|
|
|
78
89
|
}
|
|
79
90
|
};
|
|
80
91
|
this.getAvailableLinkedOptions = () => {
|
|
81
|
-
let
|
|
82
|
-
column
|
|
83
|
-
linkMetaData
|
|
84
|
-
|
|
92
|
+
let {
|
|
93
|
+
column,
|
|
94
|
+
linkMetaData
|
|
95
|
+
} = this.props;
|
|
96
|
+
let {
|
|
97
|
+
display_column_key: displayColumnKey
|
|
98
|
+
} = column.data;
|
|
85
99
|
let linkedTable = linkMetaData.getLinkedTable(this.otherTableId);
|
|
86
100
|
let availableRows = linkedTable.rows.filter(row => {
|
|
87
101
|
return !!row[displayColumnKey];
|
|
@@ -118,9 +132,10 @@ class LinkEditor extends _react.default.Component {
|
|
|
118
132
|
}
|
|
119
133
|
};
|
|
120
134
|
this.onOptionItemToggle = option => {
|
|
121
|
-
let
|
|
122
|
-
row
|
|
123
|
-
linkMetaData
|
|
135
|
+
let {
|
|
136
|
+
row,
|
|
137
|
+
linkMetaData
|
|
138
|
+
} = this.props;
|
|
124
139
|
let newValue = this.state.newValue.slice();
|
|
125
140
|
let optionIndex = newValue.findIndex(option_id => option_id === option.id);
|
|
126
141
|
if (optionIndex !== -1) {
|
|
@@ -135,9 +150,10 @@ class LinkEditor extends _react.default.Component {
|
|
|
135
150
|
});
|
|
136
151
|
};
|
|
137
152
|
this.onDeleteOption = option => {
|
|
138
|
-
let
|
|
139
|
-
row
|
|
140
|
-
linkMetaData
|
|
153
|
+
let {
|
|
154
|
+
row,
|
|
155
|
+
linkMetaData
|
|
156
|
+
} = this.props;
|
|
141
157
|
let newValue = this.state.newValue.slice();
|
|
142
158
|
let optionIndex = newValue.findIndex(option_id => option_id === option.id);
|
|
143
159
|
newValue.splice(optionIndex, 1);
|
|
@@ -150,9 +166,10 @@ class LinkEditor extends _react.default.Component {
|
|
|
150
166
|
this.caculatePopoverPosition = () => {
|
|
151
167
|
const POPOVER_MAX_HEIGHT = 200;
|
|
152
168
|
let innerHeight = window.innerHeight;
|
|
153
|
-
let
|
|
154
|
-
top
|
|
155
|
-
height
|
|
169
|
+
let {
|
|
170
|
+
top,
|
|
171
|
+
height
|
|
172
|
+
} = this.editor.getClientRects()[0];
|
|
156
173
|
let isBelow = innerHeight - (top + height) > POPOVER_MAX_HEIGHT;
|
|
157
174
|
let position = {
|
|
158
175
|
top: height + 1,
|
|
@@ -194,10 +211,13 @@ class LinkEditor extends _react.default.Component {
|
|
|
194
211
|
document.removeEventListener('mousedown', this.onMouseDown);
|
|
195
212
|
}
|
|
196
213
|
render() {
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
214
|
+
let {
|
|
215
|
+
isReadOnly
|
|
216
|
+
} = this.props;
|
|
217
|
+
let {
|
|
218
|
+
isPopoverShow,
|
|
219
|
+
popoverPosition
|
|
220
|
+
} = this.state;
|
|
201
221
|
let options = this.getAvailableLinkedOptions();
|
|
202
222
|
let selectedOptions = this.formatLinkedValuesToOptions();
|
|
203
223
|
let isShowRemoveIcon = !isReadOnly;
|
|
@@ -54,9 +54,10 @@ class LinkEditorOption extends _react.default.Component {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
let
|
|
58
|
-
option
|
|
59
|
-
isShowRemoveIcon
|
|
57
|
+
let {
|
|
58
|
+
option,
|
|
59
|
+
isShowRemoveIcon
|
|
60
|
+
} = this.props;
|
|
60
61
|
let containerStyle = this.getContainerStyle();
|
|
61
62
|
let optionStyle = this.getOptionStyle();
|
|
62
63
|
let optionNameStyle = this.getOptionNameStyle();
|
|
@@ -25,7 +25,9 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
this.onChangeSearch = event => {
|
|
28
|
-
let
|
|
28
|
+
let {
|
|
29
|
+
searchVal
|
|
30
|
+
} = this.state;
|
|
29
31
|
if (searchVal === event.target.value) {
|
|
30
32
|
return;
|
|
31
33
|
}
|
|
@@ -35,9 +37,10 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
35
37
|
});
|
|
36
38
|
};
|
|
37
39
|
this.getSelectedOptions = () => {
|
|
38
|
-
let
|
|
39
|
-
value
|
|
40
|
-
options
|
|
40
|
+
let {
|
|
41
|
+
value,
|
|
42
|
+
options
|
|
43
|
+
} = this.props;
|
|
41
44
|
if (!Array.isArray(value)) {
|
|
42
45
|
return [];
|
|
43
46
|
}
|
|
@@ -46,8 +49,12 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
46
49
|
});
|
|
47
50
|
};
|
|
48
51
|
this.getFilterOptions = () => {
|
|
49
|
-
let
|
|
50
|
-
|
|
52
|
+
let {
|
|
53
|
+
options
|
|
54
|
+
} = this.props;
|
|
55
|
+
let {
|
|
56
|
+
searchVal
|
|
57
|
+
} = this.state;
|
|
51
58
|
return searchVal ? options.filter(item => item.name.indexOf(searchVal) > -1) : options;
|
|
52
59
|
};
|
|
53
60
|
this.onSelectOption = option => {
|
|
@@ -57,7 +64,9 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
57
64
|
this.props.onOptionItemToggle(option);
|
|
58
65
|
};
|
|
59
66
|
this.renderFilteredOptions = options => {
|
|
60
|
-
let
|
|
67
|
+
let {
|
|
68
|
+
value
|
|
69
|
+
} = this.props;
|
|
61
70
|
return options.map((option, index) => {
|
|
62
71
|
let isSelect = value.some(item => item === option.id);
|
|
63
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -91,8 +100,12 @@ class MBLinkEditorPopover extends _react.default.Component {
|
|
|
91
100
|
window.removeEventListener('popstate', this.handleHistaryBack, false);
|
|
92
101
|
}
|
|
93
102
|
render() {
|
|
94
|
-
const
|
|
95
|
-
|
|
103
|
+
const {
|
|
104
|
+
column
|
|
105
|
+
} = this.props;
|
|
106
|
+
const {
|
|
107
|
+
searchVal
|
|
108
|
+
} = this.state;
|
|
96
109
|
let filterOptions = this.getFilterOptions();
|
|
97
110
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
98
111
|
ref: this.setEditorPopover,
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _lang = require("../../lang");
|
|
11
10
|
require("./index.css");
|
|
@@ -27,7 +26,9 @@ class PCLinkEditorPopover extends _react.default.Component {
|
|
|
27
26
|
this.props.onOptionItemToggle(item);
|
|
28
27
|
};
|
|
29
28
|
this.getFilterOptions = () => {
|
|
30
|
-
let
|
|
29
|
+
let {
|
|
30
|
+
options
|
|
31
|
+
} = this.props;
|
|
31
32
|
let filter = this.state.searchValue.toLowerCase();
|
|
32
33
|
if (!filter) {
|
|
33
34
|
return options;
|
|
@@ -42,11 +43,16 @@ class PCLinkEditorPopover extends _react.default.Component {
|
|
|
42
43
|
}
|
|
43
44
|
render() {
|
|
44
45
|
let options = this.getFilterOptions();
|
|
45
|
-
let
|
|
46
|
-
popoverPosition
|
|
47
|
-
selectedOptions
|
|
48
|
-
|
|
49
|
-
let
|
|
46
|
+
let {
|
|
47
|
+
popoverPosition,
|
|
48
|
+
selectedOptions
|
|
49
|
+
} = this.props;
|
|
50
|
+
let {
|
|
51
|
+
searchValue
|
|
52
|
+
} = this.state;
|
|
53
|
+
let popoverStyle = Object.assign({}, {
|
|
54
|
+
...popoverPosition
|
|
55
|
+
}, {
|
|
50
56
|
position: 'absolute'
|
|
51
57
|
});
|
|
52
58
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|