dtable-ui-component 4.4.3-2 → 4.4.3-alpha1

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.
Files changed (149) hide show
  1. package/lib/AutoNumberFormatter/index.js +7 -14
  2. package/lib/ButtonFormatter/index.js +9 -16
  3. package/lib/CTimeFormatter/index.js +9 -16
  4. package/lib/CheckboxEditor/index.js +8 -15
  5. package/lib/CheckboxFormatter/index.js +8 -15
  6. package/lib/CollaboratorEditor/index.js +21 -29
  7. package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.js +25 -32
  8. package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js +18 -25
  9. package/lib/CollaboratorFormatter/index.js +12 -19
  10. package/lib/CollaboratorItem/index.js +10 -17
  11. package/lib/CreatorFormatter/index.js +12 -19
  12. package/lib/DTableCommonAddTool/index.js +6 -13
  13. package/lib/DTableCustomizeCollaboratorSelect/index.js +18 -26
  14. package/lib/DTableCustomizeSelect/index.js +15 -23
  15. package/lib/DTableFiltersPopover/constants/index.js +33 -38
  16. package/lib/DTableFiltersPopover/index.js +31 -38
  17. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +46 -53
  18. package/lib/DTableFiltersPopover/utils/index.js +99 -128
  19. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +26 -34
  20. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +25 -33
  21. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +26 -34
  22. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +26 -34
  23. package/lib/DTableFiltersPopover/widgets/filter-item.js +120 -128
  24. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +18 -26
  25. package/lib/DTableFiltersPopover/widgets/rate-item.js +8 -15
  26. package/lib/DTablePopover/index.js +8 -15
  27. package/lib/DTablePopover/utils.js +2 -9
  28. package/lib/DTableRadio/index.js +10 -17
  29. package/lib/DTableSearchInput/index.js +13 -21
  30. package/lib/DTableSearchInput/utils.js +2 -9
  31. package/lib/DTableSelect/dtable-select-label.js +6 -13
  32. package/lib/DTableSelect/index.js +10 -18
  33. package/lib/DTableSelect/utils.js +10 -20
  34. package/lib/DTableSwitch/index.js +7 -14
  35. package/lib/DateEditor/index.js +22 -30
  36. package/lib/DateEditor/mb-date-editor-popover/index.js +47 -55
  37. package/lib/DateEditor/pc-date-editor-popover.js +20 -27
  38. package/lib/DateFormatter/index.js +9 -16
  39. package/lib/Department-editor/constants.js +1 -7
  40. package/lib/Department-editor/department-multiple-select/index.js +24 -32
  41. package/lib/Department-editor/department-single-select.js +33 -41
  42. package/lib/Department-editor/index.js +14 -22
  43. package/lib/Department-editor/selected-departments/index.js +25 -32
  44. package/lib/Department-editor/utils.js +3 -11
  45. package/lib/DepartmentSingleSelectFormatter/index.js +9 -16
  46. package/lib/DigitalSignFormatter/index.js +15 -23
  47. package/lib/DigitalSignFormatter/utils.js +3 -11
  48. package/lib/DurationFormatter/index.js +9 -16
  49. package/lib/EditEditorButton/index.js +5 -12
  50. package/lib/EmailFormatter/index.js +7 -14
  51. package/lib/FieldDisplaySetting/field-item.js +14 -21
  52. package/lib/FieldDisplaySetting/index.js +19 -27
  53. package/lib/FileEditor/index.js +8 -15
  54. package/lib/FileEditor/pc-files-addition/index.js +0 -1
  55. package/lib/FileEditor/pc-files-addition/pc-file-uploaded-item.js +0 -1
  56. package/lib/FileEditor/pc-files-preview/index.js +0 -1
  57. package/lib/FileEditor/pc-files-preview/pc-file-item-preview.js +0 -1
  58. package/lib/FileFormatter/index.js +11 -19
  59. package/lib/FileItemFormatter/index.js +6 -14
  60. package/lib/FileItemFormatter/utils.js +2 -9
  61. package/lib/FileUploader/index.js +4 -11
  62. package/lib/FormulaFormatter/cell-value-validator.js +18 -24
  63. package/lib/FormulaFormatter/index.js +32 -39
  64. package/lib/FormulaFormatter/utils.js +13 -29
  65. package/lib/GeolocationFormatter/index.js +9 -16
  66. package/lib/HtmlLongTextFormatter/index.js +9 -17
  67. package/lib/HtmlLongTextFormatter/markdown2html.js +47 -0
  68. package/lib/HtmlLongTextFormatter/unified/index.js +400 -0
  69. package/lib/HtmlLongTextFormatter/vfile/core.js +155 -0
  70. package/lib/HtmlLongTextFormatter/vfile/index.js +40 -0
  71. package/lib/ImageFormatter/images-lazy-load.js +9 -16
  72. package/lib/ImageFormatter/index.js +16 -24
  73. package/lib/ImageFormatter/utils.js +2 -9
  74. package/lib/ImagePreviewerLightbox/index.js +12 -19
  75. package/lib/ImagePreviewerLightbox/utils.js +3 -11
  76. package/lib/LastModifierFormatter/index.js +12 -19
  77. package/lib/LinkEditor/index.js +25 -33
  78. package/lib/LinkEditor/link-editor-option.js +8 -15
  79. package/lib/LinkEditor/mb-link-editor-popover/index.js +23 -30
  80. package/lib/LinkEditor/pc-link-editor-popover/index.js +17 -24
  81. package/lib/LinkFormatter/index.js +13 -20
  82. package/lib/Loading/index.js +4 -11
  83. package/lib/LongTextFormatter/index.js +6 -13
  84. package/lib/MBEditorHeader/index.js +7 -14
  85. package/lib/MTimeFormatter/index.js +9 -16
  86. package/lib/ModalPortal/index.js +5 -12
  87. package/lib/MultipleSelectEditor/index.js +17 -25
  88. package/lib/MultipleSelectFormatter/index.js +10 -17
  89. package/lib/NotificationPopover/index.js +16 -24
  90. package/lib/NumberEditor/index.js +18 -25
  91. package/lib/NumberFormatter/index.js +9 -16
  92. package/lib/RateFormatter/index.js +8 -15
  93. package/lib/RoleStatusEditor/index.js +14 -22
  94. package/lib/RowExpandEmailFormatter/index.js +10 -17
  95. package/lib/RowExpandFileFormatter/index.js +8 -16
  96. package/lib/RowExpandFileFormatter/row-expand-file-item-formatter.js +18 -27
  97. package/lib/RowExpandFormatter/index.js +78 -86
  98. package/lib/RowExpandFormulaFormatter/index.js +34 -42
  99. package/lib/RowExpandImageFormatter/index.js +10 -19
  100. package/lib/RowExpandImageFormatter/row-expand-image-item-formatter.js +18 -27
  101. package/lib/RowExpandImageFormatter/utils.js +2 -9
  102. package/lib/RowExpandLinkFormatter/collaborator-item-formatter.js +7 -16
  103. package/lib/RowExpandLinkFormatter/index.js +37 -46
  104. package/lib/RowExpandLinkFormatter/utils.js +6 -17
  105. package/lib/RowExpandLinkFormatter/value-display-utils.js +5 -12
  106. package/lib/RowExpandRateFormatter/index.js +8 -15
  107. package/lib/RowExpandUrlFormatter/index.js +14 -21
  108. package/lib/SelectItem/index.js +4 -12
  109. package/lib/SelectOptionGroup/KeyCodes.js +1 -7
  110. package/lib/SelectOptionGroup/index.js +33 -32
  111. package/lib/SelectOptionGroup/option.js +4 -19
  112. package/lib/SimpleLongTextFormatter/index.js +20 -27
  113. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +1 -7
  114. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +8 -15
  115. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +7 -14
  116. package/lib/SingleSelectEditor/index.js +18 -26
  117. package/lib/SingleSelectFormatter/index.js +9 -16
  118. package/lib/TextEditor/index.js +7 -14
  119. package/lib/TextFormatter/index.js +7 -14
  120. package/lib/UrlFormatter/index.js +7 -14
  121. package/lib/cellFormatterFactory/index.js +4 -11
  122. package/lib/common/ClickOutside.js +4 -12
  123. package/lib/common/delete-tip.js +12 -20
  124. package/lib/common/modal-portal.js +5 -13
  125. package/lib/constants/index.js +9 -28
  126. package/lib/data/dtable-value.js +6 -11
  127. package/lib/formatterConfig/base-formatter-config.js +46 -53
  128. package/lib/formatterConfig/index.js +9 -16
  129. package/lib/hooks/common-hooks.js +4 -11
  130. package/lib/index.js +75 -432
  131. package/lib/lang/index.js +13 -24
  132. package/lib/locals/de.js +1 -7
  133. package/lib/locals/en.js +1 -7
  134. package/lib/locals/fr.js +1 -7
  135. package/lib/locals/zh-CN.js +1 -7
  136. package/lib/select-editor/index.js +4 -27
  137. package/lib/select-editor/mb-select-editor-popover/index.js +33 -41
  138. package/lib/select-editor/pc-select-editor-popover/index.js +19 -26
  139. package/lib/select-editor/select-editor-option.js +8 -15
  140. package/lib/toaster/alert.js +11 -18
  141. package/lib/toaster/index.js +3 -10
  142. package/lib/toaster/toast.js +8 -16
  143. package/lib/toaster/toastManager.js +5 -13
  144. package/lib/toaster/toaster.js +7 -15
  145. package/lib/utils/dayjs.js +4 -11
  146. package/lib/utils/editor-utils.js +5 -15
  147. package/lib/utils/event-bus.js +1 -7
  148. package/lib/utils/utils.js +6 -17
  149. package/package.json +77 -63
@@ -1,42 +1,29 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "FilterItemUtils", {
8
- enumerable: true,
9
- get: function () {
10
- return _filterItemUtils.default;
11
- }
12
- });
13
- exports.isFilterTermArray = exports.isCheckboxColumn = exports.getUpdatedFilterByTermModifier = exports.getUpdatedFilterBySpecialTerm = exports.getUpdatedFilterBySelectSingle = exports.getUpdatedFilterBySelectMultiple = exports.getUpdatedFilterByRate = exports.getUpdatedFilterByPredicate = exports.getUpdatedFilterByNormalTerm = exports.getUpdatedFilterByCreator = exports.getUpdatedFilterByColumn = exports.getUpdatedFilterByCollaborator = exports.getFormulaColumnFilter = exports.getFilterByColumn = exports.getDateColumnFormat = exports.getColumnOptions = exports.getColumnByKey = exports.generateDefaultUser = void 0;
14
- var _dtableUtils = require("dtable-utils");
15
- var _filterItemUtils = _interopRequireDefault(require("./filter-item-utils"));
16
- var _constants = require("../constants");
1
+ import { FILTER_PREDICATE_TYPE, FILTER_COLUMN_OPTIONS, filterTermModifierNotWithin, filterTermModifierIsWithin, CellType, isDateColumn, isNumericColumn, FORMULA_RESULT_TYPE, COLLABORATOR_COLUMN_TYPES, DATE_COLUMN_OPTIONS, FORMULA_COLUMN_TYPES_MAP, DEFAULT_DATE_FORMAT } from 'dtable-utils';
2
+ import FilterItemUtils from './filter-item-utils';
3
+ import { FORMULA_COLUMN_TYPES, SPECIAL_TERM_TYPE, ARRAY_PREDICATE, STRING_PREDICATE, DATE_EMPTY_LABEL_MAP, MULTIPLE_SELECTOR_COLUMNS } from '../constants';
17
4
  const isArrayFilterTermByArrayType = array_type => {
18
- return _dtableUtils.COLLABORATOR_COLUMN_TYPES.includes(array_type) || array_type === _dtableUtils.CellType.SINGLE_SELECT || array_type === _dtableUtils.CellType.MULTIPLE_SELECT;
5
+ return COLLABORATOR_COLUMN_TYPES.includes(array_type) || array_type === CellType.SINGLE_SELECT || array_type === CellType.MULTIPLE_SELECT;
19
6
  };
20
- const isFilterTermArray = (column, filterPredicate) => {
7
+ export const isFilterTermArray = (column, filterPredicate) => {
21
8
  const {
22
9
  type,
23
10
  data
24
11
  } = column;
25
- if (_constants.MULTIPLE_SELECTOR_COLUMNS.includes(type)) {
12
+ if (MULTIPLE_SELECTOR_COLUMNS.includes(type)) {
26
13
  return true;
27
14
  }
28
- if (type === _dtableUtils.CellType.SINGLE_SELECT && [_dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF].includes(filterPredicate)) {
15
+ if (type === CellType.SINGLE_SELECT && [FILTER_PREDICATE_TYPE.IS_ANY_OF, FILTER_PREDICATE_TYPE.IS_NONE_OF].includes(filterPredicate)) {
29
16
  return true;
30
17
  }
31
- if (_constants.FORMULA_COLUMN_TYPES.includes(type)) {
18
+ if (FORMULA_COLUMN_TYPES.includes(type)) {
32
19
  const {
33
20
  result_type,
34
21
  array_type
35
22
  } = data || {};
36
- if (result_type !== _dtableUtils.FORMULA_RESULT_TYPE.ARRAY) return false;
23
+ if (result_type !== FORMULA_RESULT_TYPE.ARRAY) return false;
37
24
  return isArrayFilterTermByArrayType(array_type);
38
25
  }
39
- if (type === _dtableUtils.CellType.LINK) {
26
+ if (type === CellType.LINK) {
40
27
  const {
41
28
  array_type
42
29
  } = data || {};
@@ -44,9 +31,8 @@ const isFilterTermArray = (column, filterPredicate) => {
44
31
  }
45
32
  return false;
46
33
  };
47
- exports.isFilterTermArray = isFilterTermArray;
48
- const getUpdatedFilterByCreator = (filter, collaborator) => {
49
- const multipleSelectType = [_dtableUtils.FILTER_PREDICATE_TYPE.CONTAINS, _dtableUtils.FILTER_PREDICATE_TYPE.NOT_CONTAIN];
34
+ export const getUpdatedFilterByCreator = (filter, collaborator) => {
35
+ const multipleSelectType = [FILTER_PREDICATE_TYPE.CONTAINS, FILTER_PREDICATE_TYPE.NOT_CONTAIN];
50
36
  let {
51
37
  filter_predicate,
52
38
  filter_term: filterTerm
@@ -70,11 +56,10 @@ const getUpdatedFilterByCreator = (filter, collaborator) => {
70
56
  filter_term: filterTerm
71
57
  });
72
58
  };
73
- exports.getUpdatedFilterByCreator = getUpdatedFilterByCreator;
74
- const getUpdatedFilterBySelectSingle = (filter, columnOption) => {
59
+ export const getUpdatedFilterBySelectSingle = (filter, columnOption) => {
75
60
  let new_filter_term;
76
61
  // if predicate is any of / is none of, filter_term is array; else filter_term is string
77
- if (filter.filter_predicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF || filter.filter_predicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF) {
62
+ if (filter.filter_predicate === FILTER_PREDICATE_TYPE.IS_ANY_OF || filter.filter_predicate === FILTER_PREDICATE_TYPE.IS_NONE_OF) {
78
63
  new_filter_term = Array.isArray(filter.filter_term) ? [...filter.filter_term] : [];
79
64
  const index = new_filter_term.indexOf(columnOption.id);
80
65
  if (index === -1) {
@@ -89,8 +74,7 @@ const getUpdatedFilterBySelectSingle = (filter, columnOption) => {
89
74
  filter_term: new_filter_term
90
75
  });
91
76
  };
92
- exports.getUpdatedFilterBySelectSingle = getUpdatedFilterBySelectSingle;
93
- const getUpdatedFilterBySelectMultiple = (filter, columnOption) => {
77
+ export const getUpdatedFilterBySelectMultiple = (filter, columnOption) => {
94
78
  let filterTerm = filter.filter_term ? filter.filter_term : [];
95
79
  let index = filterTerm.indexOf(columnOption.id);
96
80
  if (index > -1) {
@@ -102,8 +86,7 @@ const getUpdatedFilterBySelectMultiple = (filter, columnOption) => {
102
86
  filter_term: filterTerm
103
87
  });
104
88
  };
105
- exports.getUpdatedFilterBySelectMultiple = getUpdatedFilterBySelectMultiple;
106
- const getUpdatedFilterByCollaborator = (filter, collaborator) => {
89
+ export const getUpdatedFilterByCollaborator = (filter, collaborator) => {
107
90
  let filterTerm = filter.filter_term ? filter.filter_term.slice(0) : [];
108
91
  let selectedEmail = collaborator.email;
109
92
  let collaborator_index = filterTerm.indexOf(selectedEmail);
@@ -116,8 +99,7 @@ const getUpdatedFilterByCollaborator = (filter, collaborator) => {
116
99
  filter_term: filterTerm
117
100
  });
118
101
  };
119
- exports.getUpdatedFilterByCollaborator = getUpdatedFilterByCollaborator;
120
- const getUpdatedFilterByRate = (filter, value) => {
102
+ export const getUpdatedFilterByRate = (filter, value) => {
121
103
  if (filter.filter_term === value) {
122
104
  return;
123
105
  }
@@ -125,30 +107,28 @@ const getUpdatedFilterByRate = (filter, value) => {
125
107
  filter_term: value
126
108
  });
127
109
  };
128
- exports.getUpdatedFilterByRate = getUpdatedFilterByRate;
129
- const getColumnOptions = column => {
110
+ export const getColumnOptions = column => {
130
111
  const {
131
112
  type,
132
113
  data
133
114
  } = column;
134
- if (_constants.FORMULA_COLUMN_TYPES.includes(type)) {
115
+ if (FORMULA_COLUMN_TYPES.includes(type)) {
135
116
  return getFormulaColumnFilterOptions(column);
136
117
  }
137
- if (type === _dtableUtils.CellType.LINK) {
118
+ if (type === CellType.LINK) {
138
119
  const {
139
120
  array_type
140
121
  } = data || {};
141
- if (array_type === _dtableUtils.FORMULA_RESULT_TYPE.BOOL) {
142
- return _dtableUtils.FILTER_COLUMN_OPTIONS[_dtableUtils.CellType.CHECKBOX];
122
+ if (array_type === FORMULA_RESULT_TYPE.BOOL) {
123
+ return FILTER_COLUMN_OPTIONS[CellType.CHECKBOX];
143
124
  }
144
- if (array_type === _dtableUtils.FORMULA_RESULT_TYPE.STRING) {
145
- return _dtableUtils.FILTER_COLUMN_OPTIONS[_dtableUtils.CellType.TEXT];
125
+ if (array_type === FORMULA_RESULT_TYPE.STRING) {
126
+ return FILTER_COLUMN_OPTIONS[CellType.TEXT];
146
127
  }
147
128
  return getFilterOptionsByArrayType(array_type);
148
129
  }
149
- return _dtableUtils.FILTER_COLUMN_OPTIONS[type] || {};
130
+ return FILTER_COLUMN_OPTIONS[type] || {};
150
131
  };
151
- exports.getColumnOptions = getColumnOptions;
152
132
  const getFormulaColumnFilterOptions = column => {
153
133
  const {
154
134
  data
@@ -157,54 +137,54 @@ const getFormulaColumnFilterOptions = column => {
157
137
  result_type,
158
138
  array_type
159
139
  } = data || {};
160
- if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.BOOL) {
161
- return _dtableUtils.FILTER_COLUMN_OPTIONS[_dtableUtils.CellType.CHECKBOX];
140
+ if (result_type === FORMULA_RESULT_TYPE.BOOL) {
141
+ return FILTER_COLUMN_OPTIONS[CellType.CHECKBOX];
162
142
  }
163
- if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.STRING) {
164
- return _dtableUtils.FILTER_COLUMN_OPTIONS[_dtableUtils.CellType.TEXT];
143
+ if (result_type === FORMULA_RESULT_TYPE.STRING) {
144
+ return FILTER_COLUMN_OPTIONS[CellType.TEXT];
165
145
  }
166
- if ([_dtableUtils.FORMULA_RESULT_TYPE.NUMBER, _dtableUtils.FORMULA_RESULT_TYPE.DATE].includes(result_type)) {
167
- return _dtableUtils.FILTER_COLUMN_OPTIONS[result_type];
146
+ if ([FORMULA_RESULT_TYPE.NUMBER, FORMULA_RESULT_TYPE.DATE].includes(result_type)) {
147
+ return FILTER_COLUMN_OPTIONS[result_type];
168
148
  }
169
- if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.ARRAY) {
149
+ if (result_type === FORMULA_RESULT_TYPE.ARRAY) {
170
150
  return getFilterOptionsByArrayType(array_type);
171
151
  }
172
- return _dtableUtils.FILTER_COLUMN_OPTIONS[_dtableUtils.CellType.TEXT];
152
+ return FILTER_COLUMN_OPTIONS[CellType.TEXT];
173
153
  };
174
154
  const getFilterOptionsByArrayType = array_type => {
175
155
  if (!array_type) {
176
156
  return {};
177
157
  }
178
158
  let checkType = array_type;
179
- if (_dtableUtils.COLLABORATOR_COLUMN_TYPES.includes(array_type)) {
180
- checkType = _dtableUtils.CellType.COLLABORATOR;
181
- } else if (array_type === _dtableUtils.CellType.SINGLE_SELECT) {
182
- checkType = _dtableUtils.CellType.MULTIPLE_SELECT;
183
- } else if (_dtableUtils.DATE_COLUMN_OPTIONS.includes(array_type)) {
184
- checkType = _dtableUtils.CellType.DATE;
185
- } else if ((0, _dtableUtils.isNumericColumn)({
159
+ if (COLLABORATOR_COLUMN_TYPES.includes(array_type)) {
160
+ checkType = CellType.COLLABORATOR;
161
+ } else if (array_type === CellType.SINGLE_SELECT) {
162
+ checkType = CellType.MULTIPLE_SELECT;
163
+ } else if (DATE_COLUMN_OPTIONS.includes(array_type)) {
164
+ checkType = CellType.DATE;
165
+ } else if (isNumericColumn({
186
166
  type: array_type
187
167
  })) {
188
- checkType = _dtableUtils.CellType.NUMBER;
168
+ checkType = CellType.NUMBER;
189
169
  }
190
170
 
191
171
  // only support: is
192
- if (checkType === _dtableUtils.CellType.CHECKBOX || checkType === _dtableUtils.CellType.BOOL) {
193
- return _dtableUtils.FILTER_COLUMN_OPTIONS[_dtableUtils.CellType.CHECKBOX];
172
+ if (checkType === CellType.CHECKBOX || checkType === CellType.BOOL) {
173
+ return FILTER_COLUMN_OPTIONS[CellType.CHECKBOX];
194
174
  }
195
- let filterOptions = _dtableUtils.FILTER_COLUMN_OPTIONS[checkType] || _dtableUtils.FILTER_COLUMN_OPTIONS[_dtableUtils.CellType.TEXT];
175
+ let filterOptions = FILTER_COLUMN_OPTIONS[checkType] || FILTER_COLUMN_OPTIONS[CellType.TEXT];
196
176
  let {
197
177
  filterPredicateList
198
178
  } = filterOptions;
199
- if (filterPredicateList && !filterPredicateList.includes(_dtableUtils.FILTER_PREDICATE_TYPE.EMPTY)) {
200
- filterPredicateList.push(_dtableUtils.FILTER_PREDICATE_TYPE.EMPTY);
179
+ if (filterPredicateList && !filterPredicateList.includes(FILTER_PREDICATE_TYPE.EMPTY)) {
180
+ filterPredicateList.push(FILTER_PREDICATE_TYPE.EMPTY);
201
181
  }
202
- if (filterPredicateList && !filterPredicateList.includes(_dtableUtils.FILTER_PREDICATE_TYPE.NOT_EMPTY)) {
203
- filterPredicateList.push(_dtableUtils.FILTER_PREDICATE_TYPE.NOT_EMPTY);
182
+ if (filterPredicateList && !filterPredicateList.includes(FILTER_PREDICATE_TYPE.NOT_EMPTY)) {
183
+ filterPredicateList.push(FILTER_PREDICATE_TYPE.NOT_EMPTY);
204
184
  }
205
185
  return filterOptions;
206
186
  };
207
- const getFilterByColumn = function (column, value) {
187
+ export const getFilterByColumn = function (column, value) {
208
188
  let {
209
189
  textDefaultPredicate
210
190
  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
@@ -218,7 +198,7 @@ const getFilterByColumn = function (column, value) {
218
198
  } = getColumnOptions(column, value);
219
199
  if (!filterPredicateList) return;
220
200
  let filterPredicate = filterPredicateList[0];
221
- if (textDefaultPredicate && columnType === _dtableUtils.CellType.TEXT && filterPredicateList.includes(textDefaultPredicate)) {
201
+ if (textDefaultPredicate && columnType === CellType.TEXT && filterPredicateList.includes(textDefaultPredicate)) {
222
202
  filterPredicate = textDefaultPredicate;
223
203
  }
224
204
  let updatedFilter = Object.assign({}, filter, {
@@ -231,12 +211,12 @@ const getFilterByColumn = function (column, value) {
231
211
  updatedFilter.filter_term = '';
232
212
 
233
213
  // checkbox
234
- if (columnType === _dtableUtils.CellType.CHECKBOX) {
214
+ if (columnType === CellType.CHECKBOX) {
235
215
  updatedFilter.filter_term = false;
236
216
  return updatedFilter;
237
217
  }
238
218
  // rate
239
- if (columnType === _dtableUtils.CellType.RATE) {
219
+ if (columnType === CellType.RATE) {
240
220
  const {
241
221
  rate_max_number
242
222
  } = columnData;
@@ -249,14 +229,14 @@ const getFilterByColumn = function (column, value) {
249
229
  return updatedFilter;
250
230
  }
251
231
  // date | ctime | mtime
252
- if ((0, _dtableUtils.isDateColumn)(column)) {
253
- let filterTermModifier = filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_WITHIN ? _dtableUtils.filterTermModifierIsWithin[0] : _dtableUtils.filterTermModifierNotWithin[0];
232
+ if (isDateColumn(column)) {
233
+ let filterTermModifier = filterPredicate === FILTER_PREDICATE_TYPE.IS_WITHIN ? filterTermModifierIsWithin[0] : filterTermModifierNotWithin[0];
254
234
  updatedFilter.filter_term_modifier = filterTermModifier;
255
235
  updatedFilter.filter_term = '';
256
236
  return updatedFilter;
257
237
  }
258
238
  // formula | link-formula
259
- if (_constants.FORMULA_COLUMN_TYPES.includes(columnType)) {
239
+ if (FORMULA_COLUMN_TYPES.includes(columnType)) {
260
240
  const newUpdatedFilter = getFormulaColumnFilter(column, value, filter);
261
241
  if (newUpdatedFilter) {
262
242
  updatedFilter.filter_term = newUpdatedFilter.filter_term;
@@ -264,17 +244,17 @@ const getFilterByColumn = function (column, value) {
264
244
  return updatedFilter;
265
245
  }
266
246
  // link
267
- if (columnType === _dtableUtils.CellType.LINK) {
247
+ if (columnType === CellType.LINK) {
268
248
  let {
269
249
  array_type,
270
250
  array_data
271
251
  } = columnData || {};
272
252
  if (array_type) {
273
- if (array_type === _dtableUtils.FORMULA_RESULT_TYPE.BOOL) {
274
- array_type = _dtableUtils.CellType.CHECKBOX;
253
+ if (array_type === FORMULA_RESULT_TYPE.BOOL) {
254
+ array_type = CellType.CHECKBOX;
275
255
  }
276
- if (array_type === _dtableUtils.FORMULA_RESULT_TYPE.STRING) {
277
- array_type = _dtableUtils.CellType.TEXT;
256
+ if (array_type === FORMULA_RESULT_TYPE.STRING) {
257
+ array_type = CellType.TEXT;
278
258
  }
279
259
  const linkedColumn = {
280
260
  key: column.key,
@@ -290,8 +270,7 @@ const getFilterByColumn = function (column, value) {
290
270
  }
291
271
  return updatedFilter;
292
272
  };
293
- exports.getFilterByColumn = getFilterByColumn;
294
- const getFormulaColumnFilter = (column, value, filter) => {
273
+ export const getFormulaColumnFilter = (column, value, filter) => {
295
274
  const {
296
275
  data
297
276
  } = column;
@@ -300,7 +279,7 @@ const getFormulaColumnFilter = (column, value, filter) => {
300
279
  array_type,
301
280
  array_data
302
281
  } = data || {};
303
- if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.ARRAY) {
282
+ if (result_type === FORMULA_RESULT_TYPE.ARRAY) {
304
283
  const linkedColumn = {
305
284
  key: column.key,
306
285
  type: array_type,
@@ -309,11 +288,11 @@ const getFormulaColumnFilter = (column, value, filter) => {
309
288
  return getFilterByColumn(linkedColumn, value, filter);
310
289
  }
311
290
  // result_type: string | number | bool | date
312
- if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.BOOL) {
313
- array_type = _dtableUtils.CellType.CHECKBOX;
291
+ if (result_type === FORMULA_RESULT_TYPE.BOOL) {
292
+ array_type = CellType.CHECKBOX;
314
293
  }
315
- if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.STRING) {
316
- array_type = _dtableUtils.CellType.TEXT;
294
+ if (result_type === FORMULA_RESULT_TYPE.STRING) {
295
+ array_type = CellType.TEXT;
317
296
  }
318
297
  const linkedColumn = {
319
298
  key: column.key,
@@ -327,33 +306,32 @@ const getFormulaColumnFilter = (column, value, filter) => {
327
306
  // text, long-text, number, single-select, date, ctime, mtime, formula, link, geolocation : string
328
307
  // checkbox : boolean
329
308
  // multiple-select, collaborator, creator, last modifier : array
330
- exports.getFormulaColumnFilter = getFormulaColumnFilter;
331
- const getUpdatedFilterByColumn = (filters, value, filterIndex, column) => {
309
+
310
+ export const getUpdatedFilterByColumn = (filters, value, filterIndex, column) => {
332
311
  const filter = filters[filterIndex];
333
312
  if (filter.column_key === column.key) {
334
313
  return;
335
314
  }
336
315
  return getFilterByColumn(column, value, filter);
337
316
  };
338
- exports.getUpdatedFilterByColumn = getUpdatedFilterByColumn;
339
- const getUpdatedFilterByPredicate = (filter, column, filterPredicate) => {
317
+ export const getUpdatedFilterByPredicate = (filter, column, filterPredicate) => {
340
318
  let updatedFilter = Object.assign({}, filter, {
341
319
  filter_predicate: filterPredicate
342
320
  });
343
321
  let {
344
322
  type: columnType
345
323
  } = column;
346
- if (columnType === _dtableUtils.CellType.CHECKBOX) {
324
+ if (columnType === CellType.CHECKBOX) {
347
325
  updatedFilter.filter_term = false;
348
326
  return updatedFilter;
349
327
  }
350
- if ([_dtableUtils.CellType.SINGLE_SELECT, _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT].includes(columnType)) {
351
- if (_constants.ARRAY_PREDICATE[filterPredicate]) {
352
- if (_constants.ARRAY_PREDICATE[filter.filter_predicate] !== _constants.ARRAY_PREDICATE[filterPredicate]) {
328
+ if ([CellType.SINGLE_SELECT, CellType.DEPARTMENT_SINGLE_SELECT].includes(columnType)) {
329
+ if (ARRAY_PREDICATE[filterPredicate]) {
330
+ if (ARRAY_PREDICATE[filter.filter_predicate] !== ARRAY_PREDICATE[filterPredicate]) {
353
331
  updatedFilter.filter_term = [];
354
332
  }
355
- } else if (_constants.STRING_PREDICATE[filterPredicate]) {
356
- if (_constants.STRING_PREDICATE[filter.filter_predicate] !== _constants.STRING_PREDICATE[filterPredicate]) {
333
+ } else if (STRING_PREDICATE[filterPredicate]) {
334
+ if (STRING_PREDICATE[filter.filter_predicate] !== STRING_PREDICATE[filterPredicate]) {
357
335
  updatedFilter.filter_term = '';
358
336
  }
359
337
  } else {
@@ -361,26 +339,25 @@ const getUpdatedFilterByPredicate = (filter, column, filterPredicate) => {
361
339
  }
362
340
  return updatedFilter;
363
341
  }
364
- if ([_dtableUtils.CellType.CREATOR, _dtableUtils.CellType.LAST_MODIFIER].includes(columnType)) {
365
- if (_constants.STRING_PREDICATE[filter.filter_predicate] !== _constants.STRING_PREDICATE[filterPredicate] || filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.INCLUDE_ME) {
342
+ if ([CellType.CREATOR, CellType.LAST_MODIFIER].includes(columnType)) {
343
+ if (STRING_PREDICATE[filter.filter_predicate] !== STRING_PREDICATE[filterPredicate] || filterPredicate === FILTER_PREDICATE_TYPE.INCLUDE_ME) {
366
344
  updatedFilter.filter_term = [];
367
345
  }
368
346
  }
369
347
  if (isFilterTermArray(column, filterPredicate)) {
370
- if (_constants.DATE_EMPTY_LABEL_MAP[filterPredicate] || filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.INCLUDE_ME) {
348
+ if (DATE_EMPTY_LABEL_MAP[filterPredicate] || filterPredicate === FILTER_PREDICATE_TYPE.INCLUDE_ME) {
371
349
  updatedFilter.filter_term = [];
372
350
  }
373
351
  return updatedFilter;
374
352
  }
375
- if ((0, _dtableUtils.isDateColumn)(column)) {
376
- let filterTermModifier = filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_WITHIN ? _dtableUtils.filterTermModifierIsWithin[0] : _dtableUtils.filterTermModifierNotWithin[0];
353
+ if (isDateColumn(column)) {
354
+ let filterTermModifier = filterPredicate === FILTER_PREDICATE_TYPE.IS_WITHIN ? filterTermModifierIsWithin[0] : filterTermModifierNotWithin[0];
377
355
  updatedFilter.filter_term_modifier = filterTermModifier;
378
356
  return updatedFilter;
379
357
  }
380
358
  return updatedFilter;
381
359
  };
382
- exports.getUpdatedFilterByPredicate = getUpdatedFilterByPredicate;
383
- const getUpdatedFilterByTermModifier = (filters, filterIndex, filterTermModifier) => {
360
+ export const getUpdatedFilterByTermModifier = (filters, filterIndex, filterTermModifier) => {
384
361
  const filter = filters[filterIndex];
385
362
  if (filter.filter_term_modifier === filterTermModifier) {
386
363
  return;
@@ -389,11 +366,10 @@ const getUpdatedFilterByTermModifier = (filters, filterIndex, filterTermModifier
389
366
  filter_term_modifier: filterTermModifier
390
367
  });
391
368
  };
392
- exports.getUpdatedFilterByTermModifier = getUpdatedFilterByTermModifier;
393
- const getUpdatedFilterByNormalTerm = (filters, column, filterIndex, event) => {
369
+ export const getUpdatedFilterByNormalTerm = (filters, column, filterIndex, event) => {
394
370
  const filter = filters[filterIndex];
395
371
  let filterTerm;
396
- if (column.type === _dtableUtils.CellType.CHECKBOX) {
372
+ if (column.type === CellType.CHECKBOX) {
397
373
  filterTerm = event.target.checked;
398
374
  } else {
399
375
  filterTerm = event.target.value;
@@ -405,27 +381,26 @@ const getUpdatedFilterByNormalTerm = (filters, column, filterIndex, event) => {
405
381
  filter_term: filterTerm
406
382
  });
407
383
  };
408
- exports.getUpdatedFilterByNormalTerm = getUpdatedFilterByNormalTerm;
409
- const getUpdatedFilterBySpecialTerm = (filters, filterIndex, type, value) => {
384
+ export const getUpdatedFilterBySpecialTerm = (filters, filterIndex, type, value) => {
410
385
  const filter = filters[filterIndex];
411
386
  switch (type) {
412
- case _constants.SPECIAL_TERM_TYPE.CREATOR:
387
+ case SPECIAL_TERM_TYPE.CREATOR:
413
388
  {
414
389
  return getUpdatedFilterByCreator(filter, value);
415
390
  }
416
- case _constants.SPECIAL_TERM_TYPE.SINGLE_SELECT:
391
+ case SPECIAL_TERM_TYPE.SINGLE_SELECT:
417
392
  {
418
393
  return getUpdatedFilterBySelectSingle(filter, value);
419
394
  }
420
- case _constants.SPECIAL_TERM_TYPE.MULTIPLE_SELECT:
395
+ case SPECIAL_TERM_TYPE.MULTIPLE_SELECT:
421
396
  {
422
397
  return getUpdatedFilterBySelectMultiple(filter, value);
423
398
  }
424
- case _constants.SPECIAL_TERM_TYPE.COLLABORATOR:
399
+ case SPECIAL_TERM_TYPE.COLLABORATOR:
425
400
  {
426
401
  return getUpdatedFilterByCollaborator(filter, value);
427
402
  }
428
- case _constants.SPECIAL_TERM_TYPE.RATE:
403
+ case SPECIAL_TERM_TYPE.RATE:
429
404
  {
430
405
  return getUpdatedFilterByRate(filter, value);
431
406
  }
@@ -435,41 +410,37 @@ const getUpdatedFilterBySpecialTerm = (filters, filterIndex, type, value) => {
435
410
  }
436
411
  }
437
412
  };
438
- exports.getUpdatedFilterBySpecialTerm = getUpdatedFilterBySpecialTerm;
439
- const getColumnByKey = (columns, columnKey) => {
413
+ export const getColumnByKey = (columns, columnKey) => {
440
414
  if (!Array.isArray(columns) || !columnKey) return null;
441
415
  return columns.find(column => column.key === columnKey);
442
416
  };
443
- exports.getColumnByKey = getColumnByKey;
444
- const isCheckboxColumn = column => {
417
+ export const isCheckboxColumn = column => {
445
418
  let {
446
419
  type,
447
420
  data
448
421
  } = column;
449
- if (_dtableUtils.FORMULA_COLUMN_TYPES_MAP[type]) {
422
+ if (FORMULA_COLUMN_TYPES_MAP[type]) {
450
423
  const {
451
424
  result_type,
452
425
  array_type
453
426
  } = data || {};
454
- if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.ARRAY) {
455
- return array_type === _dtableUtils.CellType.CHECKBOX;
427
+ if (result_type === FORMULA_RESULT_TYPE.ARRAY) {
428
+ return array_type === CellType.CHECKBOX;
456
429
  }
457
430
  return false;
458
431
  }
459
- return type === _dtableUtils.CellType.CHECKBOX;
432
+ return type === CellType.CHECKBOX;
460
433
  };
461
- exports.isCheckboxColumn = isCheckboxColumn;
462
- const getDateColumnFormat = column => {
463
- const format = column && column.data && column.data.format ? column.data.format : _dtableUtils.DEFAULT_DATE_FORMAT;
434
+ export const getDateColumnFormat = column => {
435
+ const format = column && column.data && column.data.format ? column.data.format : DEFAULT_DATE_FORMAT;
464
436
  // Old Europe format is D/M/YYYY new format is DD/MM/YYYY
465
437
  return format;
466
438
  };
467
- exports.getDateColumnFormat = getDateColumnFormat;
468
439
  const getMediaUrl = () => {
469
440
  var _window, _window$dtable, _window2, _window2$dtablePlugin;
470
441
  return ((_window = window) === null || _window === void 0 ? void 0 : (_window$dtable = _window.dtable) === null || _window$dtable === void 0 ? void 0 : _window$dtable.mediaUrl) || ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$dtablePlugin = _window2.dtablePluginConfig) === null || _window2$dtablePlugin === void 0 ? void 0 : _window2$dtablePlugin.mediaUrl) || '/media/';
471
442
  };
472
- const generateDefaultUser = name => {
443
+ export const generateDefaultUser = name => {
473
444
  const mediaUrl = getMediaUrl();
474
445
  const defaultAvatarUrl = "".concat(mediaUrl, "avatars/default.png");
475
446
  return {
@@ -478,4 +449,4 @@ const generateDefaultUser = name => {
478
449
  avatar_url: defaultAvatarUrl
479
450
  };
480
451
  };
481
- exports.generateDefaultUser = generateDefaultUser;
452
+ export { FilterItemUtils };
@@ -1,17 +1,9 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _dtableUtils = require("dtable-utils");
11
- var _DTableCustomizeSelect = _interopRequireDefault(require("../../../DTableCustomizeSelect"));
12
- var _lang = require("../../../lang");
13
- require("./index.css");
14
- class CollaboratorFilter extends _react.Component {
1
+ import React, { Component, Fragment } from 'react';
2
+ import { FILTER_PREDICATE_TYPE } from 'dtable-utils';
3
+ import DTableCustomizeSelect from '../../../DTableCustomizeSelect';
4
+ import { getLocale } from '../../../lang';
5
+ import './index.css';
6
+ class CollaboratorFilter extends Component {
15
7
  constructor(props) {
16
8
  super(props);
17
9
  this.createCollaboratorOptions = (filterIndex, collaborators, filterTerm) => {
@@ -22,28 +14,28 @@ class CollaboratorFilter extends _react.Component {
22
14
  filterIndex,
23
15
  columnOption: collaborator
24
16
  },
25
- label: /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
17
+ label: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
26
18
  className: "select-option-name option-collaborator"
27
- }, /*#__PURE__*/_react.default.createElement("div", {
19
+ }, /*#__PURE__*/React.createElement("div", {
28
20
  className: "collaborator-container"
29
- }, /*#__PURE__*/_react.default.createElement("div", {
21
+ }, /*#__PURE__*/React.createElement("div", {
30
22
  className: "collaborator"
31
- }, /*#__PURE__*/_react.default.createElement("span", {
23
+ }, /*#__PURE__*/React.createElement("span", {
32
24
  className: "collaborator-avatar-container"
33
- }, /*#__PURE__*/_react.default.createElement("img", {
25
+ }, /*#__PURE__*/React.createElement("img", {
34
26
  className: "collaborator-avatar",
35
27
  alt: collaborator.name,
36
28
  src: collaborator.avatar_url
37
- })), /*#__PURE__*/_react.default.createElement("span", {
29
+ })), /*#__PURE__*/React.createElement("span", {
38
30
  className: "collaborator-name text-truncate",
39
31
  style: {
40
32
  maxWidth: '200px'
41
33
  },
42
34
  title: collaborator.name,
43
35
  "aria-label": collaborator.name
44
- }, collaborator.name))), /*#__PURE__*/_react.default.createElement("div", {
36
+ }, collaborator.name))), /*#__PURE__*/React.createElement("div", {
45
37
  className: "collaborator-check-icon"
46
- }, isSelected && /*#__PURE__*/_react.default.createElement("i", {
38
+ }, isSelected && /*#__PURE__*/React.createElement("i", {
47
39
  className: "option-edit dtable-font dtable-icon-check-mark"
48
40
  }))))
49
41
  };
@@ -55,7 +47,7 @@ class CollaboratorFilter extends _react.Component {
55
47
  columnOption: collaborator
56
48
  });
57
49
  };
58
- this.supportMultipleSelectOptions = [_dtableUtils.FILTER_PREDICATE_TYPE.HAS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.HAS_ALL_OF, _dtableUtils.FILTER_PREDICATE_TYPE.HAS_NONE_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_EXACTLY];
50
+ this.supportMultipleSelectOptions = [FILTER_PREDICATE_TYPE.HAS_ANY_OF, FILTER_PREDICATE_TYPE.HAS_ALL_OF, FILTER_PREDICATE_TYPE.HAS_NONE_OF, FILTER_PREDICATE_TYPE.IS_EXACTLY];
59
51
  }
60
52
  render() {
61
53
  let {
@@ -69,35 +61,35 @@ class CollaboratorFilter extends _react.Component {
69
61
  let selectedCollaborators = Array.isArray(filterTerm) && filterTerm.length > 0 && filterTerm.map(item => {
70
62
  let collaborator = collaborators.find(c => c.email === item);
71
63
  if (!collaborator) return null;
72
- return /*#__PURE__*/_react.default.createElement("div", {
64
+ return /*#__PURE__*/React.createElement("div", {
73
65
  key: item,
74
66
  className: "collaborator"
75
- }, /*#__PURE__*/_react.default.createElement("span", {
67
+ }, /*#__PURE__*/React.createElement("span", {
76
68
  className: "collaborator-avatar-container"
77
- }, /*#__PURE__*/_react.default.createElement("img", {
69
+ }, /*#__PURE__*/React.createElement("img", {
78
70
  className: "collaborator-avatar",
79
71
  alt: collaborator.name,
80
72
  src: collaborator.avatar_url
81
- })), /*#__PURE__*/_react.default.createElement("span", {
73
+ })), /*#__PURE__*/React.createElement("span", {
82
74
  className: "collaborator-name text-truncate",
83
75
  title: collaborator.name,
84
76
  "aria-label": collaborator.name
85
- }, collaborator.name), /*#__PURE__*/_react.default.createElement("span", {
77
+ }, collaborator.name), /*#__PURE__*/React.createElement("span", {
86
78
  className: "remove-container"
87
- }, /*#__PURE__*/_react.default.createElement("span", {
79
+ }, /*#__PURE__*/React.createElement("span", {
88
80
  className: "remove-icon",
89
81
  onClick: e => {
90
82
  this.onClick(e, collaborator);
91
83
  }
92
- }, /*#__PURE__*/_react.default.createElement("i", {
84
+ }, /*#__PURE__*/React.createElement("i", {
93
85
  className: "dtable-font dtable-icon-fork-number"
94
86
  }))));
95
87
  });
96
88
  let value = selectedCollaborators ? {
97
- label: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, selectedCollaborators)
89
+ label: /*#__PURE__*/React.createElement(React.Fragment, null, selectedCollaborators)
98
90
  } : {};
99
91
  let options = Array.isArray(filterTerm) ? this.createCollaboratorOptions(filterIndex, collaborators, filterTerm) : [];
100
- return /*#__PURE__*/_react.default.createElement(_DTableCustomizeSelect.default, {
92
+ return /*#__PURE__*/React.createElement(DTableCustomizeSelect, {
101
93
  className: "selector-collaborator",
102
94
  value: value,
103
95
  onSelectOption: this.props.onSelectCollaborator,
@@ -106,9 +98,9 @@ class CollaboratorFilter extends _react.Component {
106
98
  isLocked: this.props.isLocked,
107
99
  supportMultipleSelect: isSupportMultipleSelect,
108
100
  searchable: true,
109
- searchPlaceholder: (0, _lang.getLocale)('Find_a_collaborator'),
101
+ searchPlaceholder: getLocale('Find_a_collaborator'),
110
102
  isShowSelected: false
111
103
  });
112
104
  }
113
105
  }
114
- var _default = exports.default = CollaboratorFilter;
106
+ export default CollaboratorFilter;