@rocket.chat/fuselage 0.31.6-dev.3 → 0.31.6
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/LICENSE +21 -0
- package/dist/components/Button/ActionButton.d.ts.map +1 -1
- package/dist/components/Message/MessageStatusIndicator/MessageStatusIndicator.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -2
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFiltered.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectFiltered.d.ts.map +1 -1
- package/dist/components/MultiSelect/SelectedOptions.d.ts.map +1 -1
- package/dist/components/Options/Option/Option.d.ts +1 -1
- package/dist/components/Options/Option/Option.d.ts.map +1 -1
- package/dist/components/Options/Option/index.d.ts +17 -0
- package/dist/components/Options/Option/index.d.ts.map +1 -1
- package/dist/components/Options/Options.d.ts +2 -2
- package/dist/components/Options/Options.d.ts.map +1 -1
- package/dist/components/OptionsPaginated/OptionsPaginated.d.ts +1 -1
- package/dist/components/OptionsPaginated/OptionsPaginated.d.ts.map +1 -1
- package/dist/components/{SelectPaginated → PaginatedSelect}/PaginatedMultiSelect.d.ts +0 -0
- package/dist/components/{SelectPaginated → PaginatedSelect}/PaginatedMultiSelect.d.ts.map +1 -1
- package/dist/components/{SelectPaginated → PaginatedSelect}/PaginatedSelect.d.ts +1 -1
- package/dist/components/PaginatedSelect/PaginatedSelect.d.ts.map +1 -0
- package/dist/components/PaginatedSelect/PaginatedSelectAddon.d.ts +7 -0
- package/dist/components/PaginatedSelect/PaginatedSelectAddon.d.ts.map +1 -0
- package/dist/components/PaginatedSelect/PaginatedSelectFiltered.d.ts +7 -0
- package/dist/components/PaginatedSelect/PaginatedSelectFiltered.d.ts.map +1 -0
- package/dist/components/PaginatedSelect/PaginatedSelectFocus.d.ts +7 -0
- package/dist/components/PaginatedSelect/PaginatedSelectFocus.d.ts.map +1 -0
- package/dist/components/PaginatedSelect/PaginatedSelectWrapper.d.ts +7 -0
- package/dist/components/PaginatedSelect/PaginatedSelectWrapper.d.ts.map +1 -0
- package/dist/components/PaginatedSelect/index.d.ts +3 -0
- package/dist/components/PaginatedSelect/index.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/fuselage.development.js +928 -879
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +1 -1
- package/package.json +17 -17
- package/CHANGELOG.md +0 -705
- package/dist/components/SelectPaginated/PaginatedSelect.d.ts.map +0 -1
- package/dist/components/SelectPaginated/PaginatedSelectFiltered.d.ts +0 -5
- package/dist/components/SelectPaginated/PaginatedSelectFiltered.d.ts.map +0 -1
- package/dist/components/SelectPaginated/hugeList.d.ts +0 -5
- package/dist/components/SelectPaginated/hugeList.d.ts.map +0 -1
- package/dist/components/SelectPaginated/index.d.ts +0 -4
- package/dist/components/SelectPaginated/index.d.ts.map +0 -1
|
@@ -3050,7 +3050,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3050
3050
|
/* harmony import */ var _PositionAnimated__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../PositionAnimated */ "./src/components/PositionAnimated/index.ts");
|
|
3051
3051
|
|
|
3052
3052
|
|
|
3053
|
-
var _jsxFileName = "/
|
|
3053
|
+
var _jsxFileName = "/home/runner/work/Rocket.Chat.Fuselage/Rocket.Chat.Fuselage/packages/fuselage/src/components/AutoComplete/AutoComplete.js",
|
|
3054
3054
|
_this = undefined;
|
|
3055
3055
|
|
|
3056
3056
|
|
|
@@ -3077,13 +3077,13 @@ var Addon = function Addon(props) {
|
|
|
3077
3077
|
}));
|
|
3078
3078
|
};
|
|
3079
3079
|
|
|
3080
|
-
var SelectedOptions = /*#__PURE__*/(
|
|
3080
|
+
var SelectedOptions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().memo(function (props) {
|
|
3081
3081
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Chip__WEBPACK_IMPORTED_MODULE_5__["default"], Object.assign({}, props, {
|
|
3082
|
-
__self:
|
|
3082
|
+
__self: _this,
|
|
3083
3083
|
__source: {
|
|
3084
3084
|
fileName: _jsxFileName,
|
|
3085
|
-
lineNumber:
|
|
3086
|
-
columnNumber:
|
|
3085
|
+
lineNumber: 18,
|
|
3086
|
+
columnNumber: 47
|
|
3087
3087
|
}
|
|
3088
3088
|
}));
|
|
3089
3089
|
});
|
|
@@ -3184,7 +3184,7 @@ function AutoComplete(_ref) {
|
|
|
3184
3184
|
__self: this,
|
|
3185
3185
|
__source: {
|
|
3186
3186
|
fileName: _jsxFileName,
|
|
3187
|
-
lineNumber:
|
|
3187
|
+
lineNumber: 66,
|
|
3188
3188
|
columnNumber: 5
|
|
3189
3189
|
}
|
|
3190
3190
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_4__.Box, {
|
|
@@ -3197,7 +3197,7 @@ function AutoComplete(_ref) {
|
|
|
3197
3197
|
__self: this,
|
|
3198
3198
|
__source: {
|
|
3199
3199
|
fileName: _jsxFileName,
|
|
3200
|
-
lineNumber:
|
|
3200
|
+
lineNumber: 76,
|
|
3201
3201
|
columnNumber: 7
|
|
3202
3202
|
}
|
|
3203
3203
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Margins__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
@@ -3205,7 +3205,7 @@ function AutoComplete(_ref) {
|
|
|
3205
3205
|
__self: this,
|
|
3206
3206
|
__source: {
|
|
3207
3207
|
fileName: _jsxFileName,
|
|
3208
|
-
lineNumber:
|
|
3208
|
+
lineNumber: 84,
|
|
3209
3209
|
columnNumber: 9
|
|
3210
3210
|
}
|
|
3211
3211
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_7__.InputBox.Input, {
|
|
@@ -3223,7 +3223,7 @@ function AutoComplete(_ref) {
|
|
|
3223
3223
|
__self: this,
|
|
3224
3224
|
__source: {
|
|
3225
3225
|
fileName: _jsxFileName,
|
|
3226
|
-
lineNumber:
|
|
3226
|
+
lineNumber: 85,
|
|
3227
3227
|
columnNumber: 11
|
|
3228
3228
|
}
|
|
3229
3229
|
}), selected && optionsAreVisible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_3__["default"].HIDDEN && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(RenderSelected, {
|
|
@@ -3234,7 +3234,7 @@ function AutoComplete(_ref) {
|
|
|
3234
3234
|
__self: this,
|
|
3235
3235
|
__source: {
|
|
3236
3236
|
fileName: _jsxFileName,
|
|
3237
|
-
lineNumber:
|
|
3237
|
+
lineNumber: 103,
|
|
3238
3238
|
columnNumber: 13
|
|
3239
3239
|
}
|
|
3240
3240
|
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Addon, {
|
|
@@ -3244,14 +3244,14 @@ function AutoComplete(_ref) {
|
|
|
3244
3244
|
__self: this,
|
|
3245
3245
|
__source: {
|
|
3246
3246
|
fileName: _jsxFileName,
|
|
3247
|
-
lineNumber:
|
|
3247
|
+
lineNumber: 114,
|
|
3248
3248
|
columnNumber: 11
|
|
3249
3249
|
}
|
|
3250
3250
|
}),
|
|
3251
3251
|
__self: this,
|
|
3252
3252
|
__source: {
|
|
3253
3253
|
fileName: _jsxFileName,
|
|
3254
|
-
lineNumber:
|
|
3254
|
+
lineNumber: 112,
|
|
3255
3255
|
columnNumber: 7
|
|
3256
3256
|
}
|
|
3257
3257
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_PositionAnimated__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
|
@@ -3260,7 +3260,7 @@ function AutoComplete(_ref) {
|
|
|
3260
3260
|
__self: this,
|
|
3261
3261
|
__source: {
|
|
3262
3262
|
fileName: _jsxFileName,
|
|
3263
|
-
lineNumber:
|
|
3263
|
+
lineNumber: 124,
|
|
3264
3264
|
columnNumber: 7
|
|
3265
3265
|
}
|
|
3266
3266
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Options__WEBPACK_IMPORTED_MODULE_9__.Options, {
|
|
@@ -3275,7 +3275,7 @@ function AutoComplete(_ref) {
|
|
|
3275
3275
|
__self: this,
|
|
3276
3276
|
__source: {
|
|
3277
3277
|
fileName: _jsxFileName,
|
|
3278
|
-
lineNumber:
|
|
3278
|
+
lineNumber: 125,
|
|
3279
3279
|
columnNumber: 9
|
|
3280
3280
|
}
|
|
3281
3281
|
})));
|
|
@@ -3305,7 +3305,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3305
3305
|
/* harmony import */ var _stylingProps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stylingProps */ "./src/components/Box/stylingProps.js");
|
|
3306
3306
|
|
|
3307
3307
|
var _excluded = ["is", "children"];
|
|
3308
|
-
var _jsxFileName = "/
|
|
3308
|
+
var _jsxFileName = "/home/runner/work/Rocket.Chat.Fuselage/Rocket.Chat.Fuselage/packages/fuselage/src/components/Box/index.js";
|
|
3309
3309
|
|
|
3310
3310
|
|
|
3311
3311
|
|
|
@@ -5851,7 +5851,7 @@ var getSize = function (_a) {
|
|
|
5851
5851
|
}
|
|
5852
5852
|
return 'x20';
|
|
5853
5853
|
};
|
|
5854
|
-
var ActionButton = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function
|
|
5854
|
+
var ActionButton = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_a, ref) {
|
|
5855
5855
|
var icon = _a.icon, children = _a.children, props = __rest(_a, ["icon", "children"]);
|
|
5856
5856
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__.Button, __assign({ ref: ref, square: true, flexShrink: 0 }, props),
|
|
5857
5857
|
children,
|
|
@@ -9089,9 +9089,7 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
9089
9089
|
};
|
|
9090
9090
|
|
|
9091
9091
|
|
|
9092
|
-
var MessageStatusIndicator = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function
|
|
9093
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", __assign({ ref: ref, className: 'rcx-message-status-indicator' }, props)));
|
|
9094
|
-
});
|
|
9092
|
+
var MessageStatusIndicator = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", __assign({ ref: ref, className: 'rcx-message-status-indicator' }, props))); });
|
|
9095
9093
|
|
|
9096
9094
|
|
|
9097
9095
|
/***/ }),
|
|
@@ -10116,7 +10114,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
10116
10114
|
};
|
|
10117
10115
|
|
|
10118
10116
|
|
|
10119
|
-
var Modal = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function
|
|
10117
|
+
var Modal = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_a, ref) {
|
|
10120
10118
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
10121
10119
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ is: 'dialog', "rcx-modal": true }, props),
|
|
10122
10120
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { ref: ref, "rcx-modal__inner": true, elevation: '2' }, children)));
|
|
@@ -10579,20 +10577,16 @@ var prevent = function (e) {
|
|
|
10579
10577
|
e.stopPropagation();
|
|
10580
10578
|
e.nativeEvent.stopImmediatePropagation();
|
|
10581
10579
|
};
|
|
10582
|
-
var
|
|
10583
|
-
var
|
|
10584
|
-
return !filter || label.toLowerCase().includes(filter.toLowerCase());
|
|
10585
|
-
};
|
|
10586
|
-
var MultiSelect = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function MultiSelect(_a, ref) {
|
|
10587
|
-
var value = _a.value, filter = _a.filter, _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.optionsFilter, optionsFilter = _c === void 0 ? defaultFilter : _c, error = _a.error, disabled = _a.disabled, _d = _a.anchor, Anchor = _d === void 0 ? _MultiSelectAnchor__WEBPACK_IMPORTED_MODULE_11__["default"] : _d, _e = _a.onChange, onChange = _e === void 0 ? function () { } : _e, _f = _a.getLabel, getLabel = _f === void 0 ? function (_a) {
|
|
10580
|
+
var MultiSelect = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_a, ref) {
|
|
10581
|
+
var value = _a.value, filter = _a.filter, _b = _a.options, options = _b === void 0 ? [] : _b, error = _a.error, disabled = _a.disabled, _c = _a.anchor, Anchor = _c === void 0 ? _MultiSelectAnchor__WEBPACK_IMPORTED_MODULE_11__["default"] : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, _e = _a.getLabel, getLabel = _e === void 0 ? function (_a) {
|
|
10588
10582
|
var _b = _a === void 0 ? ['', ''] : _a, _c = __read(_b, 2), label = _c[1];
|
|
10589
10583
|
return label;
|
|
10590
|
-
} :
|
|
10584
|
+
} : _e, _f = _a.getValue, getValue = _f === void 0 ? function (_a) {
|
|
10591
10585
|
var _b = __read(_a, 1), value = _b[0];
|
|
10592
10586
|
return value;
|
|
10593
|
-
} :
|
|
10594
|
-
var
|
|
10595
|
-
var
|
|
10587
|
+
} : _f, placeholder = _a.placeholder, _g = _a.renderOptions, _Options = _g === void 0 ? _Options__WEBPACK_IMPORTED_MODULE_8__.Options : _g, renderItem = _a.renderItem, customEmpty = _a.customEmpty, RenderSelected = _a.renderSelected, addonIcon = _a.addonIcon, props = __rest(_a, ["value", "filter", "options", "error", "disabled", "anchor", "onChange", "getLabel", "getValue", "placeholder", "renderOptions", "renderItem", "customEmpty", "renderSelected", "addonIcon"]);
|
|
10588
|
+
var _h = __read((0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(value || []), 2), internalValue = _h[0], setInternalValue = _h[1];
|
|
10589
|
+
var _j = __read((0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(), 2), currentOptionValue = _j[0], setCurrentOption = _j[1];
|
|
10596
10590
|
var option = options.find(function (option) { return getValue(option) === currentOptionValue; });
|
|
10597
10591
|
var index = options.findIndex(function (option) { return getValue(option) === currentOptionValue; });
|
|
10598
10592
|
var internalChanged = function (_a) {
|
|
@@ -10615,14 +10609,18 @@ var MultiSelect = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function Mul
|
|
|
10615
10609
|
}
|
|
10616
10610
|
return [value, label];
|
|
10617
10611
|
};
|
|
10612
|
+
var applyFilter = function (_a) {
|
|
10613
|
+
var _b = __read(_a, 2), option = _b[1];
|
|
10614
|
+
return !filter || option.toLowerCase().includes(filter.toLowerCase());
|
|
10615
|
+
};
|
|
10618
10616
|
var filteredOptions = options
|
|
10619
|
-
.filter(
|
|
10617
|
+
.filter(applyFilter)
|
|
10620
10618
|
.map(mapOptions);
|
|
10621
|
-
var
|
|
10619
|
+
var _k = __read((0,_Options__WEBPACK_IMPORTED_MODULE_8__.useCursor)(index, filteredOptions, internalChanged), 5), cursor = _k[0], handleKeyDown = _k[1], handleKeyUp = _k[2], reset = _k[3], _l = __read(_k[4], 3), visible = _l[0], hide = _l[1], show = _l[2];
|
|
10622
10620
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(reset, [filter]);
|
|
10623
10621
|
var innerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
10624
10622
|
var anchorRef = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMergedRefs)(ref, innerRef);
|
|
10625
|
-
var
|
|
10623
|
+
var _m = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useResizeObserver)(), containerRef = _m.ref, borderBoxSize = _m.borderBoxSize;
|
|
10626
10624
|
var renderAnchor = function (params) {
|
|
10627
10625
|
if ((0,_helpers_isForwardRefType__WEBPACK_IMPORTED_MODULE_2__.isForwardRefType)(Anchor)) {
|
|
10628
10626
|
return react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Anchor, __assign({}, params));
|
|
@@ -10660,9 +10658,6 @@ var MultiSelect = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function Mul
|
|
|
10660
10658
|
var _b = __read(_a, 1), val = _b[0];
|
|
10661
10659
|
return val === value;
|
|
10662
10660
|
});
|
|
10663
|
-
if (!currentOption) {
|
|
10664
|
-
return null;
|
|
10665
|
-
}
|
|
10666
10661
|
return RenderSelected ? (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(RenderSelected, { role: 'option', value: value, key: value, label: getLabel(currentOption), onMouseDown: function (e) {
|
|
10667
10662
|
prevent(e);
|
|
10668
10663
|
internalChanged(currentOption);
|
|
@@ -10773,13 +10768,9 @@ var __read = (undefined && undefined.__read) || function (o, n) {
|
|
|
10773
10768
|
|
|
10774
10769
|
|
|
10775
10770
|
var MultiSelectFiltered = function (_a) {
|
|
10776
|
-
var options = _a.options, placeholder = _a.placeholder, propFilter = _a.filter, propSetFilter = _a.setFilter,
|
|
10771
|
+
var options = _a.options, placeholder = _a.placeholder, propFilter = _a.filter, propSetFilter = _a.setFilter, props = __rest(_a, ["options", "placeholder", "filter", "setFilter"]);
|
|
10777
10772
|
var _b = __read((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''), 2), filter = _b[0], setFilter = _b[1];
|
|
10778
|
-
|
|
10779
|
-
onChange(params);
|
|
10780
|
-
setFilter('');
|
|
10781
|
-
};
|
|
10782
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_MultiSelect__WEBPACK_IMPORTED_MODULE_1__.MultiSelect, __assign({}, props, { filter: propFilter || filter, options: options, anchor: function (params) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_MultiSelectFilteredAnchor__WEBPACK_IMPORTED_MODULE_2__["default"], __assign({ placeholder: placeholder, filter: propFilter || filter, onChangeFilter: propSetFilter || setFilter }, params))); }, onChange: handleChange })));
|
|
10773
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_MultiSelect__WEBPACK_IMPORTED_MODULE_1__.MultiSelect, __assign({}, props, { filter: propFilter || filter, options: options, anchor: function (params) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_MultiSelectFilteredAnchor__WEBPACK_IMPORTED_MODULE_2__["default"], __assign({ placeholder: placeholder, filter: propFilter || filter, onChangeFilter: propSetFilter || setFilter }, params))); } })));
|
|
10783
10774
|
};
|
|
10784
10775
|
|
|
10785
10776
|
|
|
@@ -10861,9 +10852,7 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
10861
10852
|
};
|
|
10862
10853
|
|
|
10863
10854
|
|
|
10864
|
-
var SelectedOptions = (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function
|
|
10865
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Chip__WEBPACK_IMPORTED_MODULE_1__["default"], __assign({}, props));
|
|
10866
|
-
});
|
|
10855
|
+
var SelectedOptions = (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function (props) { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Chip__WEBPACK_IMPORTED_MODULE_1__["default"], __assign({}, props)); });
|
|
10867
10856
|
|
|
10868
10857
|
|
|
10869
10858
|
/***/ }),
|
|
@@ -11028,7 +11017,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
11028
11017
|
|
|
11029
11018
|
|
|
11030
11019
|
|
|
11031
|
-
var Option = (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function
|
|
11020
|
+
var Option = (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function (_a) {
|
|
11032
11021
|
var _b = _a.is, Tag = _b === void 0 ? 'li' : _b, id = _a.id, children = _a.children, label = _a.label, focus = _a.focus, selected = _a.selected, className = _a.className, ref = _a.ref, icon = _a.icon, avatar = _a.avatar, title = _a.title, onClick = _a.onClick, variant = _a.variant, options = __rest(_a, ["is", "id", "children", "label", "focus", "selected", "className", "ref", "icon", "avatar", "title", "onClick", "variant"]);
|
|
11033
11022
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Tag, __assign({ key: id, id: id, ref: ref, "aria-selected": selected, title: title, onClick: onClick }, options, { className: [
|
|
11034
11023
|
'rcx-option',
|
|
@@ -11465,11 +11454,11 @@ var prevent = function (e) {
|
|
|
11465
11454
|
e.preventDefault();
|
|
11466
11455
|
e.stopPropagation();
|
|
11467
11456
|
};
|
|
11468
|
-
var Empty = (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function
|
|
11457
|
+
var Empty = (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function (_a) {
|
|
11469
11458
|
var customEmpty = _a.customEmpty;
|
|
11470
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Option__WEBPACK_IMPORTED_MODULE_4__["default"], { label: customEmpty || 'Empty' });
|
|
11459
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Option__WEBPACK_IMPORTED_MODULE_4__["default"], { label: customEmpty || 'Empty' }));
|
|
11471
11460
|
});
|
|
11472
|
-
var Options = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function
|
|
11461
|
+
var Options = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_a, ref) {
|
|
11473
11462
|
var _b, _c;
|
|
11474
11463
|
var _d = _a.maxHeight, maxHeight = _d === void 0 ? '144px' : _d, multiple = _a.multiple, _e = _a.renderEmpty, EmptyComponent = _e === void 0 ? Empty : _e, options = _a.options, cursor = _a.cursor, _f = _a.renderItem, OptionComponent = _f === void 0 ? _Option__WEBPACK_IMPORTED_MODULE_4__["default"] : _f, onSelect = _a.onSelect, customEmpty = _a.customEmpty, props = __rest(_a, ["maxHeight", "multiple", "renderEmpty", "options", "cursor", "renderItem", "onSelect", "customEmpty"]);
|
|
11475
11464
|
var liRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
@@ -11819,15 +11808,13 @@ var prevent = function (e) {
|
|
|
11819
11808
|
e.preventDefault();
|
|
11820
11809
|
e.stopPropagation();
|
|
11821
11810
|
};
|
|
11822
|
-
var Empty = (0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(function
|
|
11823
|
-
return react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Options_Option__WEBPACK_IMPORTED_MODULE_5__["default"], { label: 'Empty' });
|
|
11824
|
-
});
|
|
11811
|
+
var Empty = (0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(function () { return react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Options_Option__WEBPACK_IMPORTED_MODULE_5__["default"], { label: 'Empty' }); });
|
|
11825
11812
|
var CheckOption = (0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(function CheckOption(_a) {
|
|
11826
11813
|
var selected = _a.selected, label = _a.children, options = __rest(_a, ["selected", "children"]);
|
|
11827
11814
|
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Options_Option__WEBPACK_IMPORTED_MODULE_5__["default"], __assign({ label: label, selected: selected }, options),
|
|
11828
11815
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_CheckBox__WEBPACK_IMPORTED_MODULE_4__.CheckBox, { checked: selected })));
|
|
11829
11816
|
});
|
|
11830
|
-
var OptionsPaginated = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function
|
|
11817
|
+
var OptionsPaginated = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_a, ref) {
|
|
11831
11818
|
var title = _a.title, multiple = _a.multiple, _b = _a.renderEmpty, EmptyComponent = _b === void 0 ? Empty : _b, options = _a.options, cursor = _a.cursor, _c = _a.renderItem, OptionComponent = _c === void 0 ? _Options_Option__WEBPACK_IMPORTED_MODULE_5__["default"] : _c, onSelect = _a.onSelect, endReached = _a.endReached, props = __rest(_a, ["title", "multiple", "renderEmpty", "options", "cursor", "renderItem", "onSelect", "endReached"]);
|
|
11832
11819
|
var OptionsComponentWithData = function (_a) {
|
|
11833
11820
|
var index = _a.index, data = _a.data;
|
|
@@ -11875,21 +11862,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11875
11862
|
|
|
11876
11863
|
/***/ }),
|
|
11877
11864
|
|
|
11878
|
-
/***/ "./src/components/
|
|
11879
|
-
|
|
11880
|
-
!*** ./src/components/
|
|
11881
|
-
|
|
11865
|
+
/***/ "./src/components/PaginatedSelect/PaginatedMultiSelect.tsx":
|
|
11866
|
+
/*!*****************************************************************!*\
|
|
11867
|
+
!*** ./src/components/PaginatedSelect/PaginatedMultiSelect.tsx ***!
|
|
11868
|
+
\*****************************************************************/
|
|
11882
11869
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
11883
11870
|
|
|
11884
11871
|
"use strict";
|
|
11885
11872
|
__webpack_require__.r(__webpack_exports__);
|
|
11886
11873
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11887
|
-
/* harmony export */ "
|
|
11874
|
+
/* harmony export */ "PaginatedMultiSelect": function() { return /* binding */ PaginatedMultiSelect; },
|
|
11875
|
+
/* harmony export */ "PaginatedMultiSelectFiltered": function() { return /* binding */ PaginatedMultiSelectFiltered; }
|
|
11888
11876
|
/* harmony export */ });
|
|
11889
|
-
/* harmony import */ var
|
|
11890
|
-
/* harmony import */ var
|
|
11891
|
-
/* harmony import */ var
|
|
11892
|
-
/* harmony import */ var
|
|
11877
|
+
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
11878
|
+
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__);
|
|
11879
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
11880
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
11881
|
+
/* harmony import */ var _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../AnimatedVisibility */ "./src/components/AnimatedVisibility/index.ts");
|
|
11882
|
+
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
11883
|
+
/* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Chip */ "./src/components/Chip/index.ts");
|
|
11884
|
+
/* harmony import */ var _Flex__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Flex */ "./src/components/Flex/index.ts");
|
|
11885
|
+
/* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
11886
|
+
/* harmony import */ var _InputBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
11887
|
+
/* harmony import */ var _Margins__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Margins */ "./src/components/Margins/index.ts");
|
|
11888
|
+
/* harmony import */ var _Options_useVisible__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Options/useVisible */ "./src/components/Options/useVisible.ts");
|
|
11889
|
+
/* harmony import */ var _OptionsPaginated__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../OptionsPaginated */ "./src/components/OptionsPaginated/index.ts");
|
|
11890
|
+
/* harmony import */ var _Position__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Position */ "./src/components/Position/index.ts");
|
|
11891
|
+
/* harmony import */ var _Select_SelectAddon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Select/SelectAddon */ "./src/components/Select/SelectAddon.tsx");
|
|
11892
|
+
/* harmony import */ var _Select_SelectFocus__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Select/SelectFocus */ "./src/components/Select/SelectFocus.tsx");
|
|
11893
11893
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
11894
11894
|
__assign = Object.assign || function(t) {
|
|
11895
11895
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -11912,102 +11912,149 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
11912
11912
|
}
|
|
11913
11913
|
return t;
|
|
11914
11914
|
};
|
|
11915
|
+
var __read = (undefined && undefined.__read) || function (o, n) {
|
|
11916
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
11917
|
+
if (!m) return o;
|
|
11918
|
+
var i = m.call(o), r, ar = [], e;
|
|
11919
|
+
try {
|
|
11920
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
11921
|
+
}
|
|
11922
|
+
catch (error) { e = { error: error }; }
|
|
11923
|
+
finally {
|
|
11924
|
+
try {
|
|
11925
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
11926
|
+
}
|
|
11927
|
+
finally { if (e) throw e.error; }
|
|
11928
|
+
}
|
|
11929
|
+
return ar;
|
|
11930
|
+
};
|
|
11931
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
|
|
11932
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
11933
|
+
to[j] = from[i];
|
|
11934
|
+
return to;
|
|
11935
|
+
};
|
|
11936
|
+
// @ts-nocheck
|
|
11915
11937
|
|
|
11916
11938
|
|
|
11917
11939
|
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11940
|
+
|
|
11941
|
+
|
|
11942
|
+
|
|
11943
|
+
|
|
11944
|
+
|
|
11945
|
+
|
|
11946
|
+
|
|
11947
|
+
|
|
11948
|
+
|
|
11949
|
+
|
|
11950
|
+
|
|
11951
|
+
var SelectedOptions = (0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(function (props) { return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Chip__WEBPACK_IMPORTED_MODULE_4__["default"], __assign({ maxWidth: '150px', withTruncatedText: true }, props))); });
|
|
11952
|
+
var prevent = function (e) {
|
|
11953
|
+
e.preventDefault();
|
|
11954
|
+
e.stopPropagation();
|
|
11955
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
11922
11956
|
};
|
|
11923
|
-
var
|
|
11924
|
-
var
|
|
11925
|
-
var
|
|
11926
|
-
var
|
|
11927
|
-
var
|
|
11928
|
-
var
|
|
11929
|
-
|
|
11930
|
-
if (
|
|
11931
|
-
|
|
11932
|
-
|
|
11957
|
+
var PaginatedMultiSelect = function (_a) {
|
|
11958
|
+
var withTitle = _a.withTitle, value = _a.value, filter = _a.filter, _b = _a.options, options = _b === void 0 ? [] : _b, error = _a.error, disabled = _a.disabled, _c = _a.anchor, Anchor = _c === void 0 ? _Select_SelectFocus__WEBPACK_IMPORTED_MODULE_13__["default"] : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, placeholder = _a.placeholder, _e = _a.renderOptions, _Options = _e === void 0 ? _OptionsPaginated__WEBPACK_IMPORTED_MODULE_10__.OptionsPaginated : _e, endReached = _a.endReached, props = __rest(_a, ["withTitle", "value", "filter", "options", "error", "disabled", "anchor", "onChange", "placeholder", "renderOptions", "endReached"]);
|
|
11959
|
+
var _f = __read((0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(value || []), 2), internalValue = _f[0], setInternalValue = _f[1];
|
|
11960
|
+
var currentValue = value !== undefined ? value : internalValue;
|
|
11961
|
+
var option = options.find(function (option) { return option.value === currentValue; });
|
|
11962
|
+
var internalChanged = function (_a) {
|
|
11963
|
+
var _b = __read(_a, 1), value = _b[0];
|
|
11964
|
+
if (currentValue.some(function (item) { return item.value === value.value; })) {
|
|
11965
|
+
var newValue_1 = currentValue.filter(function (item) { return item.value !== value.value; });
|
|
11966
|
+
setInternalValue(newValue_1);
|
|
11967
|
+
return onChange(newValue_1);
|
|
11933
11968
|
}
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11969
|
+
var newValue = __spreadArray(__spreadArray([], __read(currentValue)), [value]);
|
|
11970
|
+
setInternalValue(newValue);
|
|
11971
|
+
return onChange(newValue);
|
|
11972
|
+
};
|
|
11973
|
+
var _g = __read((0,_Options_useVisible__WEBPACK_IMPORTED_MODULE_9__.useVisible)(), 3), visible = _g[0], hide = _g[1], show = _g[2];
|
|
11974
|
+
var ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
11975
|
+
var _h = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useResizeObserver)(), containerRef = _h.ref, borderBoxSize = _h.borderBoxSize;
|
|
11976
|
+
var handleClick = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function () {
|
|
11977
|
+
if (visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__["default"].VISIBLE) {
|
|
11978
|
+
return hide();
|
|
11937
11979
|
}
|
|
11938
|
-
if (
|
|
11939
|
-
|
|
11940
|
-
return
|
|
11980
|
+
if (ref && ref.current) {
|
|
11981
|
+
ref.current.focus();
|
|
11982
|
+
return show();
|
|
11941
11983
|
}
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
'
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11984
|
+
});
|
|
11985
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_3__.Box, __assign({ is: 'div', "rcx-select": true, className: [error && 'invalid', disabled && 'disabled'], ref: containerRef, onClick: handleClick, disabled: disabled }, props),
|
|
11986
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Flex__WEBPACK_IMPORTED_MODULE_5__["default"].Item, { grow: 1 },
|
|
11987
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Margins__WEBPACK_IMPORTED_MODULE_8__["default"], { inline: 'x4' },
|
|
11988
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Flex__WEBPACK_IMPORTED_MODULE_5__["default"].Container, null,
|
|
11989
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_3__.Box, { is: 'div' },
|
|
11990
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_3__.Box, { is: 'div', display: 'flex', alignItems: 'center', flexWrap: 'wrap', margin: '-x8', role: 'listbox' },
|
|
11991
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Margins__WEBPACK_IMPORTED_MODULE_8__["default"], { all: 'x4' },
|
|
11992
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Anchor, { disabled: disabled, ref: ref, "aria-haspopup": 'listbox', onClick: show, onBlur: hide, order: 1, "rcx-input-box--undecorated": true, children: !value ? option || placeholder : null }),
|
|
11993
|
+
currentValue.map(function (value, index) {
|
|
11994
|
+
var _a, _b;
|
|
11995
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(SelectedOptions, __assign({}, (withTitle && {
|
|
11996
|
+
title: value.label ||
|
|
11997
|
+
((_a = options.find(function (val) {
|
|
11998
|
+
return val.value === value;
|
|
11999
|
+
})) === null || _a === void 0 ? void 0 : _a.label),
|
|
12000
|
+
}), { tabIndex: -1, role: 'option', key: index, onMouseDown: function (e) {
|
|
12001
|
+
prevent(e);
|
|
12002
|
+
internalChanged([value]);
|
|
12003
|
+
return false;
|
|
12004
|
+
}, children: value.label ||
|
|
12005
|
+
((_b = options.find(function (val) {
|
|
12006
|
+
return val.value === value;
|
|
12007
|
+
})) === null || _b === void 0 ? void 0 : _b.label) })));
|
|
12008
|
+
}))))))),
|
|
12009
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Flex__WEBPACK_IMPORTED_MODULE_5__["default"].Item, { grow: 0, shrink: 0 },
|
|
12010
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Margins__WEBPACK_IMPORTED_MODULE_8__["default"], { inline: 'x4' },
|
|
12011
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Select_SelectAddon__WEBPACK_IMPORTED_MODULE_12__["default"], { children: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_6__.Icon, { name: visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__["default"].VISIBLE
|
|
12012
|
+
? 'cross'
|
|
12013
|
+
: 'chevron-down', size: 'x20' }) }))),
|
|
12014
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__["default"], { visibility: visible },
|
|
12015
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Position__WEBPACK_IMPORTED_MODULE_11__["default"], { anchor: containerRef },
|
|
12016
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Options, __assign({}, (withTitle && { title: withTitle }), { width: borderBoxSize.inlineSize, onMouseDown: prevent, multiple: true, filter: filter, role: 'listbox', options: options, onSelect: internalChanged, endReached: endReached }))))));
|
|
12017
|
+
};
|
|
12018
|
+
var PaginatedMultiSelectFiltered = function (_a) {
|
|
12019
|
+
var filter = _a.filter, setFilter = _a.setFilter, options = _a.options, placeholder = _a.placeholder, props = __rest(_a, ["filter", "setFilter", "options", "placeholder"]);
|
|
12020
|
+
var anchor = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_a, ref) {
|
|
12021
|
+
var _children = _a.children, filter = _a.filter, props = __rest(_a, ["children", "filter"]);
|
|
12022
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Flex__WEBPACK_IMPORTED_MODULE_5__["default"].Item, { grow: 1 },
|
|
12023
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_7__.InputBox.Input, __assign({ ref: ref, placeholder: placeholder, value: filter, onInput: function (e) {
|
|
12024
|
+
return setFilter &&
|
|
12025
|
+
setFilter(e.currentTarget.value);
|
|
12026
|
+
} }, props, { "rcx-input-box--undecorated": true }))));
|
|
12027
|
+
}), []);
|
|
12028
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(PaginatedMultiSelect, __assign({ filter: filter, options: options }, props, { anchor: anchor })));
|
|
11975
12029
|
};
|
|
11976
12030
|
|
|
11977
12031
|
|
|
11978
12032
|
/***/ }),
|
|
11979
12033
|
|
|
11980
|
-
/***/ "./src/components/
|
|
11981
|
-
|
|
11982
|
-
!*** ./src/components/
|
|
11983
|
-
|
|
12034
|
+
/***/ "./src/components/PaginatedSelect/PaginatedSelect.tsx":
|
|
12035
|
+
/*!************************************************************!*\
|
|
12036
|
+
!*** ./src/components/PaginatedSelect/PaginatedSelect.tsx ***!
|
|
12037
|
+
\************************************************************/
|
|
11984
12038
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
11985
12039
|
|
|
11986
12040
|
"use strict";
|
|
11987
12041
|
__webpack_require__.r(__webpack_exports__);
|
|
11988
12042
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11989
|
-
/* harmony export */ "
|
|
12043
|
+
/* harmony export */ "PaginatedSelect": function() { return /* binding */ PaginatedSelect; }
|
|
11990
12044
|
/* harmony export */ });
|
|
11991
|
-
/* harmony import */ var _Pagination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pagination */ "./src/components/Pagination/Pagination.tsx");
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
/***/ }),
|
|
11996
|
-
|
|
11997
|
-
/***/ "./src/components/PasswordInput/PasswordInput.tsx":
|
|
11998
|
-
/*!********************************************************!*\
|
|
11999
|
-
!*** ./src/components/PasswordInput/PasswordInput.tsx ***!
|
|
12000
|
-
\********************************************************/
|
|
12001
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12002
|
-
|
|
12003
|
-
"use strict";
|
|
12004
|
-
__webpack_require__.r(__webpack_exports__);
|
|
12005
12045
|
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
12006
12046
|
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__);
|
|
12007
12047
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
12008
12048
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
12009
|
-
/* harmony import */ var
|
|
12010
|
-
/* harmony import */ var
|
|
12049
|
+
/* harmony import */ var _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../AnimatedVisibility */ "./src/components/AnimatedVisibility/index.ts");
|
|
12050
|
+
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
12051
|
+
/* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
12052
|
+
/* harmony import */ var _Options_useVisible__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Options/useVisible */ "./src/components/Options/useVisible.ts");
|
|
12053
|
+
/* harmony import */ var _OptionsPaginated__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../OptionsPaginated */ "./src/components/OptionsPaginated/index.ts");
|
|
12054
|
+
/* harmony import */ var _PositionAnimated__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../PositionAnimated */ "./src/components/PositionAnimated/index.ts");
|
|
12055
|
+
/* harmony import */ var _PaginatedSelectAddon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PaginatedSelectAddon */ "./src/components/PaginatedSelect/PaginatedSelectAddon.tsx");
|
|
12056
|
+
/* harmony import */ var _PaginatedSelectFocus__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./PaginatedSelectFocus */ "./src/components/PaginatedSelect/PaginatedSelectFocus.tsx");
|
|
12057
|
+
/* harmony import */ var _PaginatedSelectWrapper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./PaginatedSelectWrapper */ "./src/components/PaginatedSelect/PaginatedSelectWrapper.tsx");
|
|
12011
12058
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12012
12059
|
__assign = Object.assign || function(t) {
|
|
12013
12060
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12019,6 +12066,17 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
12019
12066
|
};
|
|
12020
12067
|
return __assign.apply(this, arguments);
|
|
12021
12068
|
};
|
|
12069
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
12070
|
+
var t = {};
|
|
12071
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
12072
|
+
t[p] = s[p];
|
|
12073
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
12074
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
12075
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
12076
|
+
t[p[i]] = s[p[i]];
|
|
12077
|
+
}
|
|
12078
|
+
return t;
|
|
12079
|
+
};
|
|
12022
12080
|
var __read = (undefined && undefined.__read) || function (o, n) {
|
|
12023
12081
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
12024
12082
|
if (!m) return o;
|
|
@@ -12035,53 +12093,84 @@ var __read = (undefined && undefined.__read) || function (o, n) {
|
|
|
12035
12093
|
}
|
|
12036
12094
|
return ar;
|
|
12037
12095
|
};
|
|
12096
|
+
// @ts-nocheck
|
|
12097
|
+
|
|
12038
12098
|
|
|
12039
12099
|
|
|
12040
12100
|
|
|
12041
12101
|
|
|
12042
|
-
var PasswordInput = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function PasswordInput(props, ref) {
|
|
12043
|
-
var _a = __read((0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useToggle)(true), 2), hidden = _a[0], toggle = _a[1];
|
|
12044
|
-
var handleAddonClick = function () {
|
|
12045
|
-
toggle();
|
|
12046
|
-
};
|
|
12047
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_3__.InputBox, __assign({ type: hidden ? 'password' : 'text', addon: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_2__.Icon, { name: hidden ? 'eye-off' : 'eye', size: 20, onClick: handleAddonClick }), ref: ref }, props)));
|
|
12048
|
-
});
|
|
12049
|
-
/* harmony default export */ __webpack_exports__["default"] = (PasswordInput);
|
|
12050
12102
|
|
|
12051
12103
|
|
|
12052
|
-
/***/ }),
|
|
12053
12104
|
|
|
12054
|
-
/***/ "./src/components/PasswordInput/index.ts":
|
|
12055
|
-
/*!***********************************************!*\
|
|
12056
|
-
!*** ./src/components/PasswordInput/index.ts ***!
|
|
12057
|
-
\***********************************************/
|
|
12058
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12059
12105
|
|
|
12060
|
-
"use strict";
|
|
12061
|
-
__webpack_require__.r(__webpack_exports__);
|
|
12062
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12063
|
-
/* harmony export */ "default": function() { return /* reexport safe */ _PasswordInput__WEBPACK_IMPORTED_MODULE_0__["default"]; }
|
|
12064
|
-
/* harmony export */ });
|
|
12065
|
-
/* harmony import */ var _PasswordInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PasswordInput */ "./src/components/PasswordInput/PasswordInput.tsx");
|
|
12066
12106
|
|
|
12067
12107
|
|
|
12108
|
+
var prevent = function (e) {
|
|
12109
|
+
e.preventDefault();
|
|
12110
|
+
e.stopPropagation();
|
|
12111
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
12112
|
+
};
|
|
12113
|
+
var useDidUpdate = function (func) {
|
|
12114
|
+
var didMount = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
|
|
12115
|
+
var fn = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(func);
|
|
12116
|
+
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
12117
|
+
if (didMount.current) {
|
|
12118
|
+
fn();
|
|
12119
|
+
}
|
|
12120
|
+
didMount.current = true;
|
|
12121
|
+
}, [fn]);
|
|
12122
|
+
};
|
|
12123
|
+
var PaginatedSelect = function (_a) {
|
|
12124
|
+
var value = _a.value, withTitle = _a.withTitle, filter = _a.filter, _setFilter = _a.setFilter, error = _a.error, disabled = _a.disabled, _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.anchor, Anchor = _c === void 0 ? _PaginatedSelectFocus__WEBPACK_IMPORTED_MODULE_9__["default"] : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, _e = _a.placeholder, placeholder = _e === void 0 ? '' : _e, _f = _a.renderOptions, _Options = _f === void 0 ? _OptionsPaginated__WEBPACK_IMPORTED_MODULE_6__.OptionsPaginated : _f, endReached = _a.endReached, props = __rest(_a, ["value", "withTitle", "filter", "setFilter", "error", "disabled", "options", "anchor", "onChange", "placeholder", "renderOptions", "endReached"]);
|
|
12125
|
+
var _g = __read((0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(value), 2), internalValue = _g[0], setInternalValue = _g[1];
|
|
12126
|
+
var currentValue = value !== undefined ? value : internalValue;
|
|
12127
|
+
var option = options.find(function (option) { return (option === null || option === void 0 ? void 0 : option.value) === currentValue; });
|
|
12128
|
+
var _h = __read((0,_Options_useVisible__WEBPACK_IMPORTED_MODULE_5__.useVisible)(), 3), visible = _h[0], hide = _h[1], show = _h[2];
|
|
12129
|
+
var internalChangedByClick = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function (_a) {
|
|
12130
|
+
var _b = __read(_a, 1), value = _b[0];
|
|
12131
|
+
setInternalValue(value);
|
|
12132
|
+
onChange(value);
|
|
12133
|
+
hide();
|
|
12134
|
+
});
|
|
12135
|
+
var ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
12136
|
+
var _j = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useResizeObserver)(), containerRef = _j.ref, borderBoxSize = _j.borderBoxSize;
|
|
12137
|
+
useDidUpdate([filter, internalValue]);
|
|
12138
|
+
var valueLabel = option === null || option === void 0 ? void 0 : option.label;
|
|
12139
|
+
var visibleText = (filter === undefined || visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__["default"].HIDDEN) &&
|
|
12140
|
+
(valueLabel || placeholder || typeof placeholder === 'string');
|
|
12141
|
+
var handleClick = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function () {
|
|
12142
|
+
if (visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__["default"].VISIBLE) {
|
|
12143
|
+
return hide();
|
|
12144
|
+
}
|
|
12145
|
+
if (ref && ref.current) {
|
|
12146
|
+
ref.current.focus();
|
|
12147
|
+
return show();
|
|
12148
|
+
}
|
|
12149
|
+
});
|
|
12150
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_3__.Box, __assign({ "rcx-select": true, disabled: disabled, ref: containerRef, onClick: handleClick, className: (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () { return [error && 'invalid', disabled && 'disabled']; }, [error, disabled]) }, props),
|
|
12151
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_PaginatedSelectWrapper__WEBPACK_IMPORTED_MODULE_10__["default"], { display: 'flex', mi: 'neg-x4', "rcx-select__wrapper--hidden": !!visibleText },
|
|
12152
|
+
visibleText && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_3__.Box, { flexGrow: 1, is: 'span', mi: 'x4', "rcx-select__item": true, fontScale: 'p2m', color: valueLabel ? 'default' : 'hint' }, visibleText)),
|
|
12153
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Anchor, { disabled: disabled, "rcx-input-box--undecorated": true, filter: filter, ref: ref, "aria-haspopup": 'listbox', onClick: show, onBlur: hide }),
|
|
12154
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_PaginatedSelectAddon__WEBPACK_IMPORTED_MODULE_8__["default"], { mi: 'x4' },
|
|
12155
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_4__.Icon, { name: visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__["default"].VISIBLE ? 'cross' : 'chevron-down', size: 'x20' }))),
|
|
12156
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_PositionAnimated__WEBPACK_IMPORTED_MODULE_7__["default"], { visible: visible, anchor: containerRef },
|
|
12157
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Options, __assign({}, (withTitle && { title: withTitle }), { width: borderBoxSize.inlineSize, role: 'listbox', filter: filter, options: options, onSelect: internalChangedByClick, endReached: endReached, onMouseDown: prevent })))));
|
|
12158
|
+
};
|
|
12159
|
+
|
|
12068
12160
|
|
|
12069
12161
|
/***/ }),
|
|
12070
12162
|
|
|
12071
|
-
/***/ "./src/components/
|
|
12072
|
-
|
|
12073
|
-
!*** ./src/components/
|
|
12074
|
-
|
|
12163
|
+
/***/ "./src/components/PaginatedSelect/PaginatedSelectAddon.tsx":
|
|
12164
|
+
/*!*****************************************************************!*\
|
|
12165
|
+
!*** ./src/components/PaginatedSelect/PaginatedSelectAddon.tsx ***!
|
|
12166
|
+
\*****************************************************************/
|
|
12075
12167
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12076
12168
|
|
|
12077
12169
|
"use strict";
|
|
12078
12170
|
__webpack_require__.r(__webpack_exports__);
|
|
12079
|
-
/* harmony import */ var
|
|
12080
|
-
/* harmony import */ var
|
|
12081
|
-
/* harmony import */ var
|
|
12082
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
12083
|
-
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
|
|
12084
|
-
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
|
|
12171
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12172
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12173
|
+
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
12085
12174
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12086
12175
|
__assign = Object.assign || function(t) {
|
|
12087
12176
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12093,71 +12182,33 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
12093
12182
|
};
|
|
12094
12183
|
return __assign.apply(this, arguments);
|
|
12095
12184
|
};
|
|
12096
|
-
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
12097
|
-
var t = {};
|
|
12098
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
12099
|
-
t[p] = s[p];
|
|
12100
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
12101
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
12102
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
12103
|
-
t[p[i]] = s[p[i]];
|
|
12104
|
-
}
|
|
12105
|
-
return t;
|
|
12106
|
-
};
|
|
12107
12185
|
|
|
12108
12186
|
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
var _b = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.usePosition)(anchor, target, (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () { return ({ placement: placement, margin: margin }); }, [placement, margin])) || {}, positionStyle = _b.style, positionPlacement = _b.placement;
|
|
12114
|
-
var style = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () { return (__assign({ position: 'fixed' }, positionStyle)); }, [positionStyle]);
|
|
12115
|
-
var portalContainer = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
|
12116
|
-
var element = document.createElement('div');
|
|
12117
|
-
document.body.appendChild(element);
|
|
12118
|
-
return element;
|
|
12119
|
-
}, []);
|
|
12120
|
-
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
12121
|
-
return function () {
|
|
12122
|
-
document.body.removeChild(portalContainer);
|
|
12123
|
-
};
|
|
12124
|
-
}, [portalContainer]);
|
|
12125
|
-
return (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.createPortal)((0,react__WEBPACK_IMPORTED_MODULE_1__.cloneElement)(children, __assign(__assign({ ref: target, style: style }, props), { placement: positionPlacement })), portalContainer);
|
|
12126
|
-
};
|
|
12127
|
-
/* harmony default export */ __webpack_exports__["default"] = (Position);
|
|
12187
|
+
var PaginatedSelectAddon = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function PaginatedSelectAddon(props, ref) {
|
|
12188
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ is: 'div', "rcx-select__addon": true, ref: ref }, props));
|
|
12189
|
+
});
|
|
12190
|
+
/* harmony default export */ __webpack_exports__["default"] = (PaginatedSelectAddon);
|
|
12128
12191
|
|
|
12129
12192
|
|
|
12130
12193
|
/***/ }),
|
|
12131
12194
|
|
|
12132
|
-
/***/ "./src/components/
|
|
12133
|
-
|
|
12134
|
-
!*** ./src/components/
|
|
12135
|
-
|
|
12195
|
+
/***/ "./src/components/PaginatedSelect/PaginatedSelectFiltered.tsx":
|
|
12196
|
+
/*!********************************************************************!*\
|
|
12197
|
+
!*** ./src/components/PaginatedSelect/PaginatedSelectFiltered.tsx ***!
|
|
12198
|
+
\********************************************************************/
|
|
12136
12199
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12137
12200
|
|
|
12138
12201
|
"use strict";
|
|
12139
12202
|
__webpack_require__.r(__webpack_exports__);
|
|
12140
12203
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12141
|
-
/* harmony export */ "
|
|
12204
|
+
/* harmony export */ "PaginatedSelectFiltered": function() { return /* binding */ PaginatedSelectFiltered; }
|
|
12142
12205
|
/* harmony export */ });
|
|
12143
|
-
/* harmony import */ var
|
|
12144
|
-
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
/***/ "./src/components/PositionAnimated/PositionAnimated.tsx":
|
|
12150
|
-
/*!**************************************************************!*\
|
|
12151
|
-
!*** ./src/components/PositionAnimated/PositionAnimated.tsx ***!
|
|
12152
|
-
\**************************************************************/
|
|
12153
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12154
|
-
|
|
12155
|
-
"use strict";
|
|
12156
|
-
__webpack_require__.r(__webpack_exports__);
|
|
12157
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12158
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12159
|
-
/* harmony import */ var _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AnimatedVisibility */ "./src/components/AnimatedVisibility/index.ts");
|
|
12160
|
-
/* harmony import */ var _Position__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Position */ "./src/components/Position/index.ts");
|
|
12206
|
+
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
12207
|
+
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__);
|
|
12208
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
12209
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
12210
|
+
/* harmony import */ var _InputBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
12211
|
+
/* harmony import */ var _PaginatedSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PaginatedSelect */ "./src/components/PaginatedSelect/PaginatedSelect.tsx");
|
|
12161
12212
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12162
12213
|
__assign = Object.assign || function(t) {
|
|
12163
12214
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12183,44 +12234,63 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
12183
12234
|
|
|
12184
12235
|
|
|
12185
12236
|
|
|
12186
|
-
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12237
|
+
|
|
12238
|
+
var PaginatedSelectFiltered = function (_a) {
|
|
12239
|
+
var filter = _a.filter, setFilter = _a.setFilter, options = _a.options, placeholder = _a.placeholder, props = __rest(_a, ["filter", "setFilter", "options", "placeholder"]);
|
|
12240
|
+
var anchor = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
|
12241
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_a, ref) {
|
|
12242
|
+
var filter = _a.filter, _onChange = _a.onChange, props = __rest(_a, ["filter", "onChange"]);
|
|
12243
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_2__.InputBox.Input, __assign({ mi: 'x4', flexGrow: 1, className: 'rcx-select__focus', ref: ref, placeholder: placeholder, value: filter, onChange: (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function (e) {
|
|
12244
|
+
setFilter(e.currentTarget.value);
|
|
12245
|
+
}) }, props, { "rcx-input-box--undecorated": true })));
|
|
12246
|
+
});
|
|
12247
|
+
}, [placeholder, setFilter]);
|
|
12248
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_PaginatedSelect__WEBPACK_IMPORTED_MODULE_3__.PaginatedSelect, __assign({ placeholder: undefined, filter: filter, options: options }, props, { anchor: anchor })));
|
|
12190
12249
|
};
|
|
12191
|
-
/* harmony default export */ __webpack_exports__["default"] = (PositionAnimated);
|
|
12192
12250
|
|
|
12193
12251
|
|
|
12194
12252
|
/***/ }),
|
|
12195
12253
|
|
|
12196
|
-
/***/ "./src/components/
|
|
12197
|
-
|
|
12198
|
-
!*** ./src/components/
|
|
12199
|
-
|
|
12254
|
+
/***/ "./src/components/PaginatedSelect/PaginatedSelectFocus.tsx":
|
|
12255
|
+
/*!*****************************************************************!*\
|
|
12256
|
+
!*** ./src/components/PaginatedSelect/PaginatedSelectFocus.tsx ***!
|
|
12257
|
+
\*****************************************************************/
|
|
12200
12258
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12201
12259
|
|
|
12202
12260
|
"use strict";
|
|
12203
12261
|
__webpack_require__.r(__webpack_exports__);
|
|
12204
|
-
/* harmony
|
|
12205
|
-
/* harmony
|
|
12206
|
-
/* harmony
|
|
12207
|
-
|
|
12262
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12263
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12264
|
+
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
12265
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
12266
|
+
__assign = Object.assign || function(t) {
|
|
12267
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
12268
|
+
s = arguments[i];
|
|
12269
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
12270
|
+
t[p] = s[p];
|
|
12271
|
+
}
|
|
12272
|
+
return t;
|
|
12273
|
+
};
|
|
12274
|
+
return __assign.apply(this, arguments);
|
|
12275
|
+
};
|
|
12276
|
+
|
|
12208
12277
|
|
|
12278
|
+
var PaginatedSelectFocus = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function PaginatedSelectFocus(props, ref) {
|
|
12279
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ ref: ref, fontScale: 'p2m', color: 'hint', "rcx-select__focus": true, is: 'button', type: 'button' }, props)));
|
|
12280
|
+
});
|
|
12281
|
+
/* harmony default export */ __webpack_exports__["default"] = (PaginatedSelectFocus);
|
|
12209
12282
|
|
|
12210
12283
|
|
|
12211
12284
|
/***/ }),
|
|
12212
12285
|
|
|
12213
|
-
/***/ "./src/components/
|
|
12214
|
-
|
|
12215
|
-
!*** ./src/components/
|
|
12216
|
-
|
|
12286
|
+
/***/ "./src/components/PaginatedSelect/PaginatedSelectWrapper.tsx":
|
|
12287
|
+
/*!*******************************************************************!*\
|
|
12288
|
+
!*** ./src/components/PaginatedSelect/PaginatedSelectWrapper.tsx ***!
|
|
12289
|
+
\*******************************************************************/
|
|
12217
12290
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12218
12291
|
|
|
12219
12292
|
"use strict";
|
|
12220
12293
|
__webpack_require__.r(__webpack_exports__);
|
|
12221
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12222
|
-
/* harmony export */ "ProgressBar": function() { return /* binding */ ProgressBar; }
|
|
12223
|
-
/* harmony export */ });
|
|
12224
12294
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12225
12295
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12226
12296
|
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
@@ -12235,72 +12305,51 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
12235
12305
|
};
|
|
12236
12306
|
return __assign.apply(this, arguments);
|
|
12237
12307
|
};
|
|
12238
|
-
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
12239
|
-
var t = {};
|
|
12240
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
12241
|
-
t[p] = s[p];
|
|
12242
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
12243
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
12244
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
12245
|
-
t[p[i]] = s[p[i]];
|
|
12246
|
-
}
|
|
12247
|
-
return t;
|
|
12248
|
-
};
|
|
12249
12308
|
|
|
12250
12309
|
|
|
12251
|
-
var
|
|
12252
|
-
return
|
|
12253
|
-
};
|
|
12254
|
-
var getColor = function (percentage, error) {
|
|
12255
|
-
if (error) {
|
|
12256
|
-
return 'danger-200';
|
|
12257
|
-
}
|
|
12258
|
-
if (percentage >= 100) {
|
|
12259
|
-
return 'success-200';
|
|
12260
|
-
}
|
|
12261
|
-
return 'primary-200';
|
|
12262
|
-
};
|
|
12263
|
-
var ProgressBar = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function ProgressBar(_a, ref) {
|
|
12264
|
-
var barColor = _a.barColor, percentage = _a.percentage, error = _a.error, _b = _a.animated, animated = _b === void 0 ? true : _b, props = __rest(_a, ["barColor", "percentage", "error", "animated"]);
|
|
12265
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ ref: ref, "rcx-progress-bar": true, title: error || undefined }, props),
|
|
12266
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { bg: barColor || getColor(percentage, error), "rcx-progress-bar__fill": true, "rcx-progress-bar__fill-complete": animated && percentage >= 100, width: getWidth(percentage) })));
|
|
12310
|
+
var PaginatedSelectWrapper = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function PaginatedSelectWrapper(props, ref) {
|
|
12311
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ is: 'div', "rcx-select__wrapper": true, ref: ref }, props));
|
|
12267
12312
|
});
|
|
12313
|
+
/* harmony default export */ __webpack_exports__["default"] = (PaginatedSelectWrapper);
|
|
12268
12314
|
|
|
12269
12315
|
|
|
12270
12316
|
/***/ }),
|
|
12271
12317
|
|
|
12272
|
-
/***/ "./src/components/
|
|
12273
|
-
|
|
12274
|
-
!*** ./src/components/
|
|
12275
|
-
|
|
12318
|
+
/***/ "./src/components/PaginatedSelect/index.ts":
|
|
12319
|
+
/*!*************************************************!*\
|
|
12320
|
+
!*** ./src/components/PaginatedSelect/index.ts ***!
|
|
12321
|
+
\*************************************************/
|
|
12276
12322
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12277
12323
|
|
|
12278
12324
|
"use strict";
|
|
12279
12325
|
__webpack_require__.r(__webpack_exports__);
|
|
12280
12326
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12281
|
-
/* harmony export */ "
|
|
12327
|
+
/* harmony export */ "PaginatedSelectFiltered": function() { return /* reexport safe */ _PaginatedSelectFiltered__WEBPACK_IMPORTED_MODULE_0__.PaginatedSelectFiltered; },
|
|
12328
|
+
/* harmony export */ "PaginatedMultiSelectFiltered": function() { return /* reexport safe */ _PaginatedMultiSelect__WEBPACK_IMPORTED_MODULE_1__.PaginatedMultiSelectFiltered; }
|
|
12282
12329
|
/* harmony export */ });
|
|
12283
|
-
/* harmony import */ var
|
|
12330
|
+
/* harmony import */ var _PaginatedSelectFiltered__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PaginatedSelectFiltered */ "./src/components/PaginatedSelect/PaginatedSelectFiltered.tsx");
|
|
12331
|
+
/* harmony import */ var _PaginatedMultiSelect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PaginatedMultiSelect */ "./src/components/PaginatedSelect/PaginatedMultiSelect.tsx");
|
|
12332
|
+
|
|
12284
12333
|
|
|
12285
12334
|
|
|
12286
12335
|
|
|
12287
12336
|
/***/ }),
|
|
12288
12337
|
|
|
12289
|
-
/***/ "./src/components/
|
|
12290
|
-
|
|
12291
|
-
!*** ./src/components/
|
|
12292
|
-
|
|
12338
|
+
/***/ "./src/components/Pagination/Pagination.tsx":
|
|
12339
|
+
/*!**************************************************!*\
|
|
12340
|
+
!*** ./src/components/Pagination/Pagination.tsx ***!
|
|
12341
|
+
\**************************************************/
|
|
12293
12342
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12294
12343
|
|
|
12295
12344
|
"use strict";
|
|
12296
12345
|
__webpack_require__.r(__webpack_exports__);
|
|
12297
12346
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12298
|
-
/* harmony export */ "
|
|
12347
|
+
/* harmony export */ "Pagination": function() { return /* binding */ Pagination; }
|
|
12299
12348
|
/* harmony export */ });
|
|
12300
12349
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12301
12350
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12302
12351
|
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
12303
|
-
/* harmony import */ var
|
|
12352
|
+
/* harmony import */ var _Chevron__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Chevron */ "./src/components/Chevron/index.tsx");
|
|
12304
12353
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12305
12354
|
__assign = Object.assign || function(t) {
|
|
12306
12355
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12326,142 +12375,99 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
12326
12375
|
|
|
12327
12376
|
|
|
12328
12377
|
|
|
12329
|
-
var
|
|
12330
|
-
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'i', "rcx-radio-button__fake": true, "aria-hidden": 'true' })));
|
|
12334
|
-
});
|
|
12335
|
-
|
|
12336
|
-
|
|
12337
|
-
/***/ }),
|
|
12338
|
-
|
|
12339
|
-
/***/ "./src/components/RadioButton/index.ts":
|
|
12340
|
-
/*!*********************************************!*\
|
|
12341
|
-
!*** ./src/components/RadioButton/index.ts ***!
|
|
12342
|
-
\*********************************************/
|
|
12343
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12344
|
-
|
|
12345
|
-
"use strict";
|
|
12346
|
-
__webpack_require__.r(__webpack_exports__);
|
|
12347
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12348
|
-
/* harmony export */ "RadioButton": function() { return /* reexport safe */ _RadioButton__WEBPACK_IMPORTED_MODULE_0__.RadioButton; }
|
|
12349
|
-
/* harmony export */ });
|
|
12350
|
-
/* harmony import */ var _RadioButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RadioButton */ "./src/components/RadioButton/RadioButton.tsx");
|
|
12351
|
-
|
|
12352
|
-
|
|
12353
|
-
|
|
12354
|
-
/***/ }),
|
|
12355
|
-
|
|
12356
|
-
/***/ "./src/components/Scrollable/Scrollable.tsx":
|
|
12357
|
-
/*!**************************************************!*\
|
|
12358
|
-
!*** ./src/components/Scrollable/Scrollable.tsx ***!
|
|
12359
|
-
\**************************************************/
|
|
12360
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12361
|
-
|
|
12362
|
-
"use strict";
|
|
12363
|
-
__webpack_require__.r(__webpack_exports__);
|
|
12364
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12365
|
-
/* harmony export */ "Scrollable": function() { return /* binding */ Scrollable; }
|
|
12366
|
-
/* harmony export */ });
|
|
12367
|
-
/* harmony import */ var _rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rocket.chat/css-in-js */ "../css-in-js/dist/index.module.js");
|
|
12368
|
-
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
12369
|
-
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_1__);
|
|
12370
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
12371
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
12372
|
-
/* harmony import */ var _helpers_appendClassName__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../helpers/appendClassName */ "./src/helpers/appendClassName.ts");
|
|
12373
|
-
/* harmony import */ var _hooks_useStyle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../hooks/useStyle */ "./src/hooks/useStyle.ts");
|
|
12374
|
-
/* harmony import */ var _Box_BoxTransforms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Box/BoxTransforms */ "./src/components/Box/BoxTransforms.ts");
|
|
12375
|
-
var __makeTemplateObject = (undefined && undefined.__makeTemplateObject) || function (cooked, raw) {
|
|
12376
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
12377
|
-
return cooked;
|
|
12378
|
-
};
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
var getTouchingEdges = function (element) { return ({
|
|
12386
|
-
top: !element.scrollTop,
|
|
12387
|
-
bottom: !(element.scrollTop + element.clientHeight - element.scrollHeight),
|
|
12388
|
-
left: !element.scrollLeft,
|
|
12389
|
-
right: !(element.scrollLeft + element.clientWidth - element.scrollWidth),
|
|
12390
|
-
}); };
|
|
12391
|
-
var pollTouchingEdges = function (element, touchingEdgesRef, onScrollContent) {
|
|
12392
|
-
var touchingEdges = touchingEdgesRef.current;
|
|
12393
|
-
var newTouchingEdges = getTouchingEdges(element);
|
|
12394
|
-
var dirty = touchingEdges &&
|
|
12395
|
-
(touchingEdges.top !== newTouchingEdges.top ||
|
|
12396
|
-
touchingEdges.bottom !== newTouchingEdges.bottom ||
|
|
12397
|
-
touchingEdges.left !== newTouchingEdges.left ||
|
|
12398
|
-
touchingEdges.right !== newTouchingEdges.right);
|
|
12399
|
-
if (dirty) {
|
|
12400
|
-
touchingEdgesRef.current = newTouchingEdges;
|
|
12401
|
-
onScrollContent && onScrollContent(newTouchingEdges);
|
|
12402
|
-
}
|
|
12378
|
+
var defaultItemsPerPageLabel = function () { return 'Items per page:'; };
|
|
12379
|
+
var defaultShowingResultsLabel = function (_a) {
|
|
12380
|
+
var count = _a.count, current = _a.current, itemsPerPage = _a.itemsPerPage;
|
|
12381
|
+
return "Showing results " + (current + 1) + " - " + Math.min(current + itemsPerPage, count) + " of " + count;
|
|
12403
12382
|
};
|
|
12404
|
-
var
|
|
12405
|
-
var
|
|
12406
|
-
var
|
|
12407
|
-
var
|
|
12408
|
-
var
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12383
|
+
var Pagination = function (_a) {
|
|
12384
|
+
var count = _a.count, _b = _a.current, current = _b === void 0 ? 0 : _b, _c = _a.itemsPerPage, itemsPerPage = _c === void 0 ? 25 : _c, _d = _a.itemsPerPageLabel, itemsPerPageLabel = _d === void 0 ? defaultItemsPerPageLabel : _d, _e = _a.showingResultsLabel, showingResultsLabel = _e === void 0 ? defaultShowingResultsLabel : _e, onSetItemsPerPage = _a.onSetItemsPerPage, onSetCurrent = _a.onSetCurrent, divider = _a.divider, props = __rest(_a, ["count", "current", "itemsPerPage", "itemsPerPageLabel", "showingResultsLabel", "onSetItemsPerPage", "onSetCurrent", "divider"]);
|
|
12385
|
+
var itemsPerPageOptions = [25, 50, 100].filter(function (i) { return i <= count; });
|
|
12386
|
+
var hasItemsPerPageSelection = itemsPerPageOptions.length > 1;
|
|
12387
|
+
var currentPage = Math.floor(current / itemsPerPage);
|
|
12388
|
+
var pages = Math.ceil(count / itemsPerPage);
|
|
12389
|
+
var displayedPages = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
12390
|
+
if (pages <= 7) {
|
|
12391
|
+
// 0 1 2 3 4 5 6
|
|
12392
|
+
return Array.from({ length: pages }, function (_, i) { return i; });
|
|
12412
12393
|
}
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
pollTouchingEdges(element, touchingEdgesRef, onScrollContent);
|
|
12417
|
-
}, 200);
|
|
12418
|
-
});
|
|
12419
|
-
var className = (0,_hooks_useStyle__WEBPACK_IMPORTED_MODULE_4__.useStyle)((0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: relative;\n\n &::-webkit-scrollbar {\n width: ", "rem;\n height: ", "rem;\n }\n\n &::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.05);\n background-color: var(\n --rcx-theme-scrollbar-thumb-color,\n rgba(0, 0, 0, 0.05)\n );\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.15);\n background-color: var(\n --rcx-theme-scrollbar-thumb-hover-color,\n rgba(0, 0, 0, 0.15)\n );\n }\n\n ", "\n ", "\n "], ["\n position: relative;\n\n &::-webkit-scrollbar {\n width: ", "rem;\n height: ", "rem;\n }\n\n &::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.05);\n background-color: var(\n --rcx-theme-scrollbar-thumb-color,\n rgba(0, 0, 0, 0.05)\n );\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.15);\n background-color: var(\n --rcx-theme-scrollbar-thumb-hover-color,\n rgba(0, 0, 0, 0.15)\n );\n }\n\n ", "\n ", "\n "])), 4 / 16, 4 / 16, (horizontal && (0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow-x: auto !important;\n "], ["\n overflow-x: auto !important;\n "])))) ||
|
|
12420
|
-
(vertical && (0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n overflow-y: auto !important;\n "], ["\n overflow-y: auto !important;\n "])))) || (0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n overflow: auto !important;\n "], ["\n overflow: auto !important;\n "]))), smooth && (0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n scroll-behavior: smooth !important;\n "], ["\n scroll-behavior: smooth !important;\n "])))), null);
|
|
12421
|
-
var transformFn = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (props) {
|
|
12422
|
-
props.className =
|
|
12423
|
-
className && (0,_helpers_appendClassName__WEBPACK_IMPORTED_MODULE_3__.appendClassName)(props.className, className);
|
|
12424
|
-
if (onScrollContent !== undefined && props.onScroll === undefined) {
|
|
12425
|
-
props.onScroll = handleScroll;
|
|
12394
|
+
if (currentPage < 5) {
|
|
12395
|
+
// 0 1 2 3 4 ... N
|
|
12396
|
+
return [0, 1, 2, 3, 4, '⋯', pages - 1];
|
|
12426
12397
|
}
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12398
|
+
if (currentPage > pages - 5) {
|
|
12399
|
+
// 0 ... N-4 N-3 N-2 N-1 N
|
|
12400
|
+
return [0, '⋯', pages - 5, pages - 4, pages - 3, pages - 2, pages - 1];
|
|
12401
|
+
}
|
|
12402
|
+
// 0 ... x-1 x x-2 ... N
|
|
12403
|
+
return [
|
|
12404
|
+
0,
|
|
12405
|
+
'⋯',
|
|
12406
|
+
currentPage - 1,
|
|
12407
|
+
currentPage,
|
|
12408
|
+
currentPage + 1,
|
|
12409
|
+
'⋯',
|
|
12410
|
+
pages - 1,
|
|
12411
|
+
];
|
|
12412
|
+
}, [pages, currentPage]);
|
|
12413
|
+
var renderingContext = { count: count, pages: pages, current: current, currentPage: currentPage, itemsPerPage: itemsPerPage };
|
|
12414
|
+
var handleSetItemsPerPageLinkClick = function (itemsPerPageOption) { return function () {
|
|
12415
|
+
onSetItemsPerPage === null || onSetItemsPerPage === void 0 ? void 0 : onSetItemsPerPage(itemsPerPageOption);
|
|
12416
|
+
}; };
|
|
12417
|
+
var handleSetPageLinkClick = function (page) { return function () {
|
|
12418
|
+
onSetCurrent === null || onSetCurrent === void 0 ? void 0 : onSetCurrent(page * itemsPerPage);
|
|
12419
|
+
}; };
|
|
12420
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ is: 'nav', "rcx-pagination": true, "rcx-pagination--divider": divider }, props),
|
|
12421
|
+
hasItemsPerPageSelection && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { "rcx-pagination__left": true },
|
|
12422
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'span', "rcx-pagination__label": true }, itemsPerPageLabel(renderingContext)),
|
|
12423
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'ol', "rcx-pagination__list": true }, itemsPerPageOptions.map(function (itemsPerPageOption) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { key: itemsPerPageOption, is: 'li', "rcx-pagination__list-item": true },
|
|
12424
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'button', "rcx-pagination__link": true, tabIndex: itemsPerPage === itemsPerPageOption ? -1 : 0, disabled: itemsPerPage === itemsPerPageOption, onClick: handleSetItemsPerPageLinkClick(itemsPerPageOption) }, itemsPerPageOption))); })))),
|
|
12425
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { "rcx-pagination__right": true },
|
|
12426
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'span', "rcx-pagination__label": true }, showingResultsLabel(renderingContext)),
|
|
12427
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'ol', "rcx-pagination__list": true },
|
|
12428
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'li', "rcx-pagination__list-item": true },
|
|
12429
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'button', "rcx-pagination__back": true, disabled: currentPage === 0, onClick: handleSetPageLinkClick(currentPage - 1) },
|
|
12430
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Chevron__WEBPACK_IMPORTED_MODULE_2__.Chevron, { left: true, size: 'x16' }))),
|
|
12431
|
+
displayedPages.map(function (page, i) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { key: i, is: 'li', "rcx-pagination__list-item": true }, page === '⋯' ? ('⋯') : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'button', "rcx-pagination__link": true, disabled: currentPage === page, onClick: handleSetPageLinkClick(page) }, page + 1)))); }),
|
|
12432
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'li', "rcx-pagination__list-item": true },
|
|
12433
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'button', "rcx-pagination__forward": true, disabled: currentPage === pages - 1, onClick: handleSetPageLinkClick(currentPage + 1) },
|
|
12434
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Chevron__WEBPACK_IMPORTED_MODULE_2__.Chevron, { right: true, size: 'x16' })))))));
|
|
12430
12435
|
};
|
|
12431
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
12432
12436
|
|
|
12433
12437
|
|
|
12434
12438
|
/***/ }),
|
|
12435
12439
|
|
|
12436
|
-
/***/ "./src/components/
|
|
12440
|
+
/***/ "./src/components/Pagination/index.ts":
|
|
12437
12441
|
/*!********************************************!*\
|
|
12438
|
-
!*** ./src/components/
|
|
12442
|
+
!*** ./src/components/Pagination/index.ts ***!
|
|
12439
12443
|
\********************************************/
|
|
12440
12444
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12441
12445
|
|
|
12442
12446
|
"use strict";
|
|
12443
12447
|
__webpack_require__.r(__webpack_exports__);
|
|
12444
|
-
/* harmony
|
|
12448
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12449
|
+
/* harmony export */ "Pagination": function() { return /* reexport safe */ _Pagination__WEBPACK_IMPORTED_MODULE_0__.Pagination; }
|
|
12450
|
+
/* harmony export */ });
|
|
12451
|
+
/* harmony import */ var _Pagination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pagination */ "./src/components/Pagination/Pagination.tsx");
|
|
12445
12452
|
|
|
12446
|
-
/* harmony default export */ __webpack_exports__["default"] = (_Scrollable__WEBPACK_IMPORTED_MODULE_0__.Scrollable);
|
|
12447
12453
|
|
|
12448
12454
|
|
|
12449
12455
|
/***/ }),
|
|
12450
12456
|
|
|
12451
|
-
/***/ "./src/components/
|
|
12452
|
-
|
|
12453
|
-
!*** ./src/components/
|
|
12454
|
-
|
|
12457
|
+
/***/ "./src/components/PasswordInput/PasswordInput.tsx":
|
|
12458
|
+
/*!********************************************************!*\
|
|
12459
|
+
!*** ./src/components/PasswordInput/PasswordInput.tsx ***!
|
|
12460
|
+
\********************************************************/
|
|
12455
12461
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12456
12462
|
|
|
12457
12463
|
"use strict";
|
|
12458
12464
|
__webpack_require__.r(__webpack_exports__);
|
|
12459
|
-
/* harmony
|
|
12460
|
-
/* harmony
|
|
12461
|
-
/* harmony
|
|
12462
|
-
/* harmony import */ var
|
|
12463
|
-
/* harmony import */ var
|
|
12464
|
-
/* harmony import */ var
|
|
12465
|
+
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
12466
|
+
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__);
|
|
12467
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
12468
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
12469
|
+
/* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
12470
|
+
/* harmony import */ var _InputBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
12465
12471
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12466
12472
|
__assign = Object.assign || function(t) {
|
|
12467
12473
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12473,56 +12479,69 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
12473
12479
|
};
|
|
12474
12480
|
return __assign.apply(this, arguments);
|
|
12475
12481
|
};
|
|
12482
|
+
var __read = (undefined && undefined.__read) || function (o, n) {
|
|
12483
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
12484
|
+
if (!m) return o;
|
|
12485
|
+
var i = m.call(o), r, ar = [], e;
|
|
12486
|
+
try {
|
|
12487
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
12488
|
+
}
|
|
12489
|
+
catch (error) { e = { error: error }; }
|
|
12490
|
+
finally {
|
|
12491
|
+
try {
|
|
12492
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12493
|
+
}
|
|
12494
|
+
finally { if (e) throw e.error; }
|
|
12495
|
+
}
|
|
12496
|
+
return ar;
|
|
12497
|
+
};
|
|
12476
12498
|
|
|
12477
12499
|
|
|
12478
|
-
|
|
12479
|
-
|
|
12500
|
+
|
|
12501
|
+
|
|
12502
|
+
var PasswordInput = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function PasswordInput(props, ref) {
|
|
12503
|
+
var _a = __read((0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useToggle)(true), 2), hidden = _a[0], toggle = _a[1];
|
|
12504
|
+
var handleAddonClick = function () {
|
|
12505
|
+
toggle();
|
|
12506
|
+
};
|
|
12507
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_3__.InputBox, __assign({ type: hidden ? 'password' : 'text', addon: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_2__.Icon, { name: hidden ? 'eye-off' : 'eye', size: 20, onClick: handleAddonClick }), ref: ref }, props)));
|
|
12480
12508
|
});
|
|
12509
|
+
/* harmony default export */ __webpack_exports__["default"] = (PasswordInput);
|
|
12481
12510
|
|
|
12482
12511
|
|
|
12483
12512
|
/***/ }),
|
|
12484
12513
|
|
|
12485
|
-
/***/ "./src/components/
|
|
12486
|
-
|
|
12487
|
-
!*** ./src/components/
|
|
12488
|
-
|
|
12514
|
+
/***/ "./src/components/PasswordInput/index.ts":
|
|
12515
|
+
/*!***********************************************!*\
|
|
12516
|
+
!*** ./src/components/PasswordInput/index.ts ***!
|
|
12517
|
+
\***********************************************/
|
|
12489
12518
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12490
12519
|
|
|
12491
12520
|
"use strict";
|
|
12492
12521
|
__webpack_require__.r(__webpack_exports__);
|
|
12493
12522
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12494
|
-
/* harmony export */ "
|
|
12523
|
+
/* harmony export */ "default": function() { return /* reexport safe */ _PasswordInput__WEBPACK_IMPORTED_MODULE_0__["default"]; }
|
|
12495
12524
|
/* harmony export */ });
|
|
12496
|
-
/* harmony import */ var
|
|
12525
|
+
/* harmony import */ var _PasswordInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PasswordInput */ "./src/components/PasswordInput/PasswordInput.tsx");
|
|
12497
12526
|
|
|
12498
12527
|
|
|
12499
12528
|
|
|
12500
12529
|
/***/ }),
|
|
12501
12530
|
|
|
12502
|
-
/***/ "./src/components/
|
|
12503
|
-
|
|
12504
|
-
!*** ./src/components/
|
|
12505
|
-
|
|
12531
|
+
/***/ "./src/components/Position/Position.tsx":
|
|
12532
|
+
/*!**********************************************!*\
|
|
12533
|
+
!*** ./src/components/Position/Position.tsx ***!
|
|
12534
|
+
\**********************************************/
|
|
12506
12535
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12507
12536
|
|
|
12508
12537
|
"use strict";
|
|
12509
12538
|
__webpack_require__.r(__webpack_exports__);
|
|
12510
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12511
|
-
/* harmony export */ "Select": function() { return /* binding */ Select; }
|
|
12512
|
-
/* harmony export */ });
|
|
12513
12539
|
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
12514
12540
|
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__);
|
|
12515
12541
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
12516
12542
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
12517
|
-
/* harmony import */ var
|
|
12518
|
-
/* harmony import */ var
|
|
12519
|
-
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
12520
|
-
/* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
12521
|
-
/* harmony import */ var _Margins__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Margins */ "./src/components/Margins/index.ts");
|
|
12522
|
-
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Options */ "./src/components/Options/index.ts");
|
|
12523
|
-
/* harmony import */ var _PositionAnimated__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../PositionAnimated */ "./src/components/PositionAnimated/index.ts");
|
|
12524
|
-
/* harmony import */ var _SelectAddon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./SelectAddon */ "./src/components/Select/SelectAddon.tsx");
|
|
12525
|
-
/* harmony import */ var _SelectFocus__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SelectFocus */ "./src/components/Select/SelectFocus.tsx");
|
|
12543
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
|
|
12544
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
|
|
12526
12545
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12527
12546
|
__assign = Object.assign || function(t) {
|
|
12528
12547
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12545,142 +12564,60 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
12545
12564
|
}
|
|
12546
12565
|
return t;
|
|
12547
12566
|
};
|
|
12548
|
-
var __read = (undefined && undefined.__read) || function (o, n) {
|
|
12549
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
12550
|
-
if (!m) return o;
|
|
12551
|
-
var i = m.call(o), r, ar = [], e;
|
|
12552
|
-
try {
|
|
12553
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
12554
|
-
}
|
|
12555
|
-
catch (error) { e = { error: error }; }
|
|
12556
|
-
finally {
|
|
12557
|
-
try {
|
|
12558
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12559
|
-
}
|
|
12560
|
-
finally { if (e) throw e.error; }
|
|
12561
|
-
}
|
|
12562
|
-
return ar;
|
|
12563
|
-
};
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
12567
|
|
|
12570
12568
|
|
|
12571
12569
|
|
|
12570
|
+
var Position = function (_a) {
|
|
12571
|
+
var anchor = _a.anchor, children = _a.children, placement = _a.placement, margin = _a.margin, _className = _a.className, props = __rest(_a, ["anchor", "children", "placement", "margin", "className"]);
|
|
12572
|
+
var target = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
12573
|
+
var _b = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.usePosition)(anchor, target, (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () { return ({ placement: placement, margin: margin }); }, [placement, margin])) || {}, positionStyle = _b.style, positionPlacement = _b.placement;
|
|
12574
|
+
var style = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () { return (__assign({ position: 'fixed' }, positionStyle)); }, [positionStyle]);
|
|
12575
|
+
var portalContainer = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
|
12576
|
+
var element = document.createElement('div');
|
|
12577
|
+
document.body.appendChild(element);
|
|
12578
|
+
return element;
|
|
12579
|
+
}, []);
|
|
12580
|
+
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
12581
|
+
return function () {
|
|
12582
|
+
document.body.removeChild(portalContainer);
|
|
12583
|
+
};
|
|
12584
|
+
}, [portalContainer]);
|
|
12585
|
+
return (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.createPortal)((0,react__WEBPACK_IMPORTED_MODULE_1__.cloneElement)(children, __assign(__assign({ ref: target, style: style }, props), { placement: positionPlacement })), portalContainer);
|
|
12586
|
+
};
|
|
12587
|
+
/* harmony default export */ __webpack_exports__["default"] = (Position);
|
|
12572
12588
|
|
|
12573
12589
|
|
|
12590
|
+
/***/ }),
|
|
12591
|
+
|
|
12592
|
+
/***/ "./src/components/Position/index.ts":
|
|
12593
|
+
/*!******************************************!*\
|
|
12594
|
+
!*** ./src/components/Position/index.ts ***!
|
|
12595
|
+
\******************************************/
|
|
12596
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12597
|
+
|
|
12598
|
+
"use strict";
|
|
12599
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12600
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12601
|
+
/* harmony export */ "default": function() { return /* reexport safe */ _Position__WEBPACK_IMPORTED_MODULE_0__["default"]; }
|
|
12602
|
+
/* harmony export */ });
|
|
12603
|
+
/* harmony import */ var _Position__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Position */ "./src/components/Position/Position.tsx");
|
|
12574
12604
|
|
|
12575
|
-
var Wrapper = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function Wrapper(props, ref) {
|
|
12576
|
-
return react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_4__.Box, __assign({ is: 'div', "rcx-select__wrapper": true, ref: ref }, props));
|
|
12577
|
-
});
|
|
12578
|
-
var useDidUpdate = function (func, deps) {
|
|
12579
|
-
var didMount = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
|
|
12580
|
-
var fn = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(func);
|
|
12581
|
-
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
12582
|
-
if (didMount.current) {
|
|
12583
|
-
fn();
|
|
12584
|
-
}
|
|
12585
|
-
didMount.current = true;
|
|
12586
|
-
}, deps || []);
|
|
12587
|
-
};
|
|
12588
|
-
var Select = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function Select(_a, ref) {
|
|
12589
|
-
var value = _a.value, filter = _a.filter, error = _a.error, disabled = _a.disabled, _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.anchor, Anchor = _c === void 0 ? _SelectFocus__WEBPACK_IMPORTED_MODULE_10__["default"] : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, _e = _a.getValue, getValue = _e === void 0 ? function (_a) {
|
|
12590
|
-
var _b = _a === void 0 ? ['', ''] : _a, _c = __read(_b, 1), value = _c[0];
|
|
12591
|
-
return value;
|
|
12592
|
-
} : _e, _f = _a.getLabel, getLabel = _f === void 0 ? function (_a) {
|
|
12593
|
-
var _b = _a === void 0 ? ['', ''] : _a, _c = __read(_b, 2), _ = _c[0], label = _c[1];
|
|
12594
|
-
return label;
|
|
12595
|
-
} : _f, _g = _a.placeholder, placeholder = _g === void 0 ? '' : _g, renderItem = _a.renderItem, RenderSelected = _a.renderSelected, _h = _a.renderOptions, _Options = _h === void 0 ? _Options__WEBPACK_IMPORTED_MODULE_7__.Options : _h, addonIcon = _a.addonIcon, customEmpty = _a.customEmpty, props = __rest(_a, ["value", "filter", "error", "disabled", "options", "anchor", "onChange", "getValue", "getLabel", "placeholder", "renderItem", "renderSelected", "renderOptions", "addonIcon", "customEmpty"]);
|
|
12596
|
-
var _j = __read((0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(value || ''), 2), internalValue = _j[0], setInternalValue = _j[1];
|
|
12597
|
-
var internalChangedByKeyboard = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function (_a) {
|
|
12598
|
-
var _b = __read(_a, 1), value = _b[0];
|
|
12599
|
-
setInternalValue(value);
|
|
12600
|
-
onChange(value);
|
|
12601
|
-
});
|
|
12602
|
-
var option = options.find(function (option) { return getValue(option) === internalValue; });
|
|
12603
|
-
var index = options.indexOf(option);
|
|
12604
|
-
var filteredOptions = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
|
12605
|
-
var mapOptions = function (_a) {
|
|
12606
|
-
var _b = __read(_a, 2), value = _b[0], label = _b[1];
|
|
12607
|
-
if (internalValue === value) {
|
|
12608
|
-
return [value, label, true];
|
|
12609
|
-
}
|
|
12610
|
-
return [value, label];
|
|
12611
|
-
};
|
|
12612
|
-
var applyFilter = function (_a) {
|
|
12613
|
-
var _b = __read(_a, 2), option = _b[1];
|
|
12614
|
-
return !filter || ~option.toLowerCase().indexOf(filter.toLowerCase());
|
|
12615
|
-
};
|
|
12616
|
-
return options.filter(applyFilter).map(mapOptions);
|
|
12617
|
-
}, [options, internalValue, filter]);
|
|
12618
|
-
var _k = __read((0,_Options__WEBPACK_IMPORTED_MODULE_7__.useCursor)(index, filteredOptions, internalChangedByKeyboard), 5), cursor = _k[0], handleKeyDown = _k[1], handleKeyUp = _k[2], reset = _k[3], _l = __read(_k[4], 3), visible = _l[0], hide = _l[1], show = _l[2];
|
|
12619
|
-
var internalChangedByClick = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function (_a) {
|
|
12620
|
-
var _b = __read(_a, 1), value = _b[0];
|
|
12621
|
-
setInternalValue(value);
|
|
12622
|
-
onChange(value);
|
|
12623
|
-
hide();
|
|
12624
|
-
});
|
|
12625
|
-
var innerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
12626
|
-
var anchorRef = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMergedRefs)(ref, innerRef);
|
|
12627
|
-
var renderAnchor = function (params) {
|
|
12628
|
-
if ((0,_helpers_isForwardRefType__WEBPACK_IMPORTED_MODULE_2__.isForwardRefType)(Anchor)) {
|
|
12629
|
-
return react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Anchor, __assign({}, params));
|
|
12630
|
-
}
|
|
12631
|
-
if (typeof Anchor === 'function') {
|
|
12632
|
-
return Anchor(params);
|
|
12633
|
-
}
|
|
12634
|
-
return null;
|
|
12635
|
-
};
|
|
12636
|
-
var _m = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useResizeObserver)(), containerRef = _m.ref, borderBoxSize = _m.borderBoxSize;
|
|
12637
|
-
useDidUpdate(reset, [filter, internalValue]);
|
|
12638
|
-
var valueLabel = getLabel(option);
|
|
12639
|
-
var visibleText = (filter === undefined || visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_3__["default"].HIDDEN) &&
|
|
12640
|
-
(valueLabel || placeholder || typeof placeholder === 'string');
|
|
12641
|
-
var handleClick = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function () {
|
|
12642
|
-
var _a;
|
|
12643
|
-
if (visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_3__["default"].VISIBLE) {
|
|
12644
|
-
return hide();
|
|
12645
|
-
}
|
|
12646
|
-
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
12647
|
-
return show();
|
|
12648
|
-
});
|
|
12649
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_4__.Box, __assign({ "rcx-select": true, disabled: disabled, ref: containerRef, onClick: handleClick, className: (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () { return [error && 'invalid', disabled && 'disabled']; }, [error, disabled]) }, props),
|
|
12650
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Wrapper, { display: 'flex', mi: 'neg-x4', "rcx-select__wrapper--hidden": !!visibleText },
|
|
12651
|
-
visibleText &&
|
|
12652
|
-
(RenderSelected ? (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(RenderSelected, { role: 'option', value: getValue(option), label: valueLabel, key: getValue(option), onClick: internalChangedByClick })) : (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_4__.Box, { flexGrow: 1, is: 'span', mi: 'x4', "rcx-select__item": true, fontScale: 'p2', color: valueLabel ? 'default' : 'hint' }, visibleText))),
|
|
12653
|
-
renderAnchor({
|
|
12654
|
-
ref: anchorRef,
|
|
12655
|
-
children: !value ? option || placeholder : null,
|
|
12656
|
-
disabled: disabled !== null && disabled !== void 0 ? disabled : false,
|
|
12657
|
-
onClick: show,
|
|
12658
|
-
onBlur: hide,
|
|
12659
|
-
onKeyDown: handleKeyDown,
|
|
12660
|
-
onKeyUp: handleKeyUp,
|
|
12661
|
-
}),
|
|
12662
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Margins__WEBPACK_IMPORTED_MODULE_6__["default"], { inline: 'x4' },
|
|
12663
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_SelectAddon__WEBPACK_IMPORTED_MODULE_9__["default"], { children: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_5__.Icon, { name: visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_3__["default"].VISIBLE
|
|
12664
|
-
? 'cross'
|
|
12665
|
-
: addonIcon || 'chevron-down', size: 'x20' }) }))),
|
|
12666
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_PositionAnimated__WEBPACK_IMPORTED_MODULE_8__["default"], { visible: visible, anchor: containerRef },
|
|
12667
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Options, { width: borderBoxSize.inlineSize, role: 'listbox', filter: filter, options: filteredOptions, onSelect: internalChangedByClick, renderItem: renderItem, cursor: cursor, customEmpty: customEmpty }))));
|
|
12668
|
-
});
|
|
12669
12605
|
|
|
12670
12606
|
|
|
12671
12607
|
/***/ }),
|
|
12672
12608
|
|
|
12673
|
-
/***/ "./src/components/
|
|
12674
|
-
|
|
12675
|
-
!*** ./src/components/
|
|
12676
|
-
|
|
12609
|
+
/***/ "./src/components/PositionAnimated/PositionAnimated.tsx":
|
|
12610
|
+
/*!**************************************************************!*\
|
|
12611
|
+
!*** ./src/components/PositionAnimated/PositionAnimated.tsx ***!
|
|
12612
|
+
\**************************************************************/
|
|
12677
12613
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12678
12614
|
|
|
12679
12615
|
"use strict";
|
|
12680
12616
|
__webpack_require__.r(__webpack_exports__);
|
|
12681
12617
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12682
12618
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12683
|
-
/* harmony import */ var
|
|
12619
|
+
/* harmony import */ var _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AnimatedVisibility */ "./src/components/AnimatedVisibility/index.ts");
|
|
12620
|
+
/* harmony import */ var _Position__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Position */ "./src/components/Position/index.ts");
|
|
12684
12621
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12685
12622
|
__assign = Object.assign || function(t) {
|
|
12686
12623
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12692,31 +12629,61 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
12692
12629
|
};
|
|
12693
12630
|
return __assign.apply(this, arguments);
|
|
12694
12631
|
};
|
|
12632
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
12633
|
+
var t = {};
|
|
12634
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
12635
|
+
t[p] = s[p];
|
|
12636
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
12637
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
12638
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
12639
|
+
t[p[i]] = s[p[i]];
|
|
12640
|
+
}
|
|
12641
|
+
return t;
|
|
12642
|
+
};
|
|
12695
12643
|
|
|
12696
12644
|
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12645
|
+
|
|
12646
|
+
var PositionAnimated = function (_a) {
|
|
12647
|
+
var _width = _a.width, visible = _a.visible, children = _a.children, props = __rest(_a, ["width", "visible", "children"]);
|
|
12648
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AnimatedVisibility__WEBPACK_IMPORTED_MODULE_1__["default"], { visibility: visible },
|
|
12649
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Position__WEBPACK_IMPORTED_MODULE_2__["default"], __assign({}, props), children)));
|
|
12650
|
+
};
|
|
12651
|
+
/* harmony default export */ __webpack_exports__["default"] = (PositionAnimated);
|
|
12701
12652
|
|
|
12702
12653
|
|
|
12703
12654
|
/***/ }),
|
|
12704
12655
|
|
|
12705
|
-
/***/ "./src/components/
|
|
12656
|
+
/***/ "./src/components/PositionAnimated/index.ts":
|
|
12706
12657
|
/*!**************************************************!*\
|
|
12707
|
-
!*** ./src/components/
|
|
12658
|
+
!*** ./src/components/PositionAnimated/index.ts ***!
|
|
12708
12659
|
\**************************************************/
|
|
12709
12660
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12710
12661
|
|
|
12711
12662
|
"use strict";
|
|
12712
12663
|
__webpack_require__.r(__webpack_exports__);
|
|
12713
12664
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12714
|
-
/* harmony export */ "
|
|
12665
|
+
/* harmony export */ "default": function() { return /* reexport safe */ _PositionAnimated__WEBPACK_IMPORTED_MODULE_0__["default"]; }
|
|
12666
|
+
/* harmony export */ });
|
|
12667
|
+
/* harmony import */ var _PositionAnimated__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PositionAnimated */ "./src/components/PositionAnimated/PositionAnimated.tsx");
|
|
12668
|
+
|
|
12669
|
+
|
|
12670
|
+
|
|
12671
|
+
/***/ }),
|
|
12672
|
+
|
|
12673
|
+
/***/ "./src/components/ProgressBar/ProgressBar.tsx":
|
|
12674
|
+
/*!****************************************************!*\
|
|
12675
|
+
!*** ./src/components/ProgressBar/ProgressBar.tsx ***!
|
|
12676
|
+
\****************************************************/
|
|
12677
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12678
|
+
|
|
12679
|
+
"use strict";
|
|
12680
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12681
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12682
|
+
/* harmony export */ "ProgressBar": function() { return /* binding */ ProgressBar; }
|
|
12715
12683
|
/* harmony export */ });
|
|
12716
12684
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12717
12685
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12718
|
-
/* harmony import */ var
|
|
12719
|
-
/* harmony import */ var _SelectFilteredAnchor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SelectFilteredAnchor */ "./src/components/Select/SelectFilteredAnchor.tsx");
|
|
12686
|
+
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
12720
12687
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12721
12688
|
__assign = Object.assign || function(t) {
|
|
12722
12689
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12739,45 +12706,61 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
12739
12706
|
}
|
|
12740
12707
|
return t;
|
|
12741
12708
|
};
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12709
|
+
|
|
12710
|
+
|
|
12711
|
+
var getWidth = function (percentage) {
|
|
12712
|
+
return Math.min(Math.max(0, percentage), 100).toFixed(1) + "%";
|
|
12713
|
+
};
|
|
12714
|
+
var getColor = function (percentage, error) {
|
|
12715
|
+
if (error) {
|
|
12716
|
+
return 'danger-200';
|
|
12748
12717
|
}
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
try {
|
|
12752
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12753
|
-
}
|
|
12754
|
-
finally { if (e) throw e.error; }
|
|
12718
|
+
if (percentage >= 100) {
|
|
12719
|
+
return 'success-200';
|
|
12755
12720
|
}
|
|
12756
|
-
return
|
|
12721
|
+
return 'primary-200';
|
|
12757
12722
|
};
|
|
12723
|
+
var ProgressBar = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function ProgressBar(_a, ref) {
|
|
12724
|
+
var barColor = _a.barColor, percentage = _a.percentage, error = _a.error, _b = _a.animated, animated = _b === void 0 ? true : _b, props = __rest(_a, ["barColor", "percentage", "error", "animated"]);
|
|
12725
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ ref: ref, "rcx-progress-bar": true, title: error || undefined }, props),
|
|
12726
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { bg: barColor || getColor(percentage, error), "rcx-progress-bar__fill": true, "rcx-progress-bar__fill-complete": animated && percentage >= 100, width: getWidth(percentage) })));
|
|
12727
|
+
});
|
|
12758
12728
|
|
|
12759
12729
|
|
|
12730
|
+
/***/ }),
|
|
12731
|
+
|
|
12732
|
+
/***/ "./src/components/ProgressBar/index.tsx":
|
|
12733
|
+
/*!**********************************************!*\
|
|
12734
|
+
!*** ./src/components/ProgressBar/index.tsx ***!
|
|
12735
|
+
\**********************************************/
|
|
12736
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12737
|
+
|
|
12738
|
+
"use strict";
|
|
12739
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12740
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12741
|
+
/* harmony export */ "ProgressBar": function() { return /* reexport safe */ _ProgressBar__WEBPACK_IMPORTED_MODULE_0__.ProgressBar; }
|
|
12742
|
+
/* harmony export */ });
|
|
12743
|
+
/* harmony import */ var _ProgressBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ProgressBar */ "./src/components/ProgressBar/ProgressBar.tsx");
|
|
12760
12744
|
|
|
12761
|
-
var SelectFiltered = function (_a) {
|
|
12762
|
-
var options = _a.options, placeholder = _a.placeholder, propFilter = _a.filter, propSetFilter = _a.setFilter, props = __rest(_a, ["options", "placeholder", "filter", "setFilter"]);
|
|
12763
|
-
var _b = __read((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''), 2), filter = _b[0], setFilter = _b[1];
|
|
12764
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__.Select, __assign({ placeholder: placeholder, filter: propFilter || filter, options: options }, props, { anchor: function (params) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_SelectFilteredAnchor__WEBPACK_IMPORTED_MODULE_2__["default"], __assign({ placeholder: placeholder, filter: propFilter || filter, onChangeFilter: propSetFilter || setFilter }, params))); } })));
|
|
12765
|
-
};
|
|
12766
12745
|
|
|
12767
12746
|
|
|
12768
12747
|
/***/ }),
|
|
12769
12748
|
|
|
12770
|
-
/***/ "./src/components/
|
|
12771
|
-
|
|
12772
|
-
!*** ./src/components/
|
|
12773
|
-
|
|
12749
|
+
/***/ "./src/components/RadioButton/RadioButton.tsx":
|
|
12750
|
+
/*!****************************************************!*\
|
|
12751
|
+
!*** ./src/components/RadioButton/RadioButton.tsx ***!
|
|
12752
|
+
\****************************************************/
|
|
12774
12753
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12775
12754
|
|
|
12776
12755
|
"use strict";
|
|
12777
12756
|
__webpack_require__.r(__webpack_exports__);
|
|
12757
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12758
|
+
/* harmony export */ "RadioButton": function() { return /* binding */ RadioButton; }
|
|
12759
|
+
/* harmony export */ });
|
|
12778
12760
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12779
12761
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12780
|
-
/* harmony import */ var
|
|
12762
|
+
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
12763
|
+
/* harmony import */ var _Label__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Label */ "./src/components/Label/index.tsx");
|
|
12781
12764
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12782
12765
|
__assign = Object.assign || function(t) {
|
|
12783
12766
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12802,84 +12785,143 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
12802
12785
|
};
|
|
12803
12786
|
|
|
12804
12787
|
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12788
|
+
|
|
12789
|
+
var RadioButton = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function RadioButton(_a, ref) {
|
|
12790
|
+
var autoComplete = _a.autoComplete, checked = _a.checked, defaultChecked = _a.defaultChecked, disabled = _a.disabled, form = _a.form, id = _a.id, name = _a.name, required = _a.required, tabIndex = _a.tabIndex, value = _a.value, qa = _a.qa, dataQa = _a["data-qa"], onChange = _a.onChange, onInput = _a.onInput, onInvalid = _a.onInvalid, props = __rest(_a, ["autoComplete", "checked", "defaultChecked", "disabled", "form", "id", "name", "required", "tabIndex", "value", "qa", 'data-qa', "onChange", "onInput", "onInvalid"]);
|
|
12791
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ is: _Label__WEBPACK_IMPORTED_MODULE_2__.Label, "rcx-radio-button": true }, props),
|
|
12792
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'input', "rcx-radio-button__input": true, autoComplete: autoComplete, checked: checked, defaultChecked: defaultChecked, disabled: disabled, form: form, id: id, name: name, required: required, tabIndex: tabIndex, type: 'radio', value: value, "data-qa": dataQa || qa, ref: ref, onChange: onChange, onInput: onInput, onInvalid: onInvalid }),
|
|
12793
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { is: 'i', "rcx-radio-button__fake": true, "aria-hidden": 'true' })));
|
|
12810
12794
|
});
|
|
12811
|
-
/* harmony default export */ __webpack_exports__["default"] = (SelectFilteredAnchor);
|
|
12812
12795
|
|
|
12813
12796
|
|
|
12814
12797
|
/***/ }),
|
|
12815
12798
|
|
|
12816
|
-
/***/ "./src/components/
|
|
12817
|
-
|
|
12818
|
-
!*** ./src/components/
|
|
12819
|
-
|
|
12799
|
+
/***/ "./src/components/RadioButton/index.ts":
|
|
12800
|
+
/*!*********************************************!*\
|
|
12801
|
+
!*** ./src/components/RadioButton/index.ts ***!
|
|
12802
|
+
\*********************************************/
|
|
12820
12803
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12821
12804
|
|
|
12822
12805
|
"use strict";
|
|
12823
12806
|
__webpack_require__.r(__webpack_exports__);
|
|
12824
|
-
/* harmony
|
|
12825
|
-
/* harmony
|
|
12826
|
-
/* harmony
|
|
12827
|
-
var
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
12807
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12808
|
+
/* harmony export */ "RadioButton": function() { return /* reexport safe */ _RadioButton__WEBPACK_IMPORTED_MODULE_0__.RadioButton; }
|
|
12809
|
+
/* harmony export */ });
|
|
12810
|
+
/* harmony import */ var _RadioButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RadioButton */ "./src/components/RadioButton/RadioButton.tsx");
|
|
12811
|
+
|
|
12812
|
+
|
|
12813
|
+
|
|
12814
|
+
/***/ }),
|
|
12815
|
+
|
|
12816
|
+
/***/ "./src/components/Scrollable/Scrollable.tsx":
|
|
12817
|
+
/*!**************************************************!*\
|
|
12818
|
+
!*** ./src/components/Scrollable/Scrollable.tsx ***!
|
|
12819
|
+
\**************************************************/
|
|
12820
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12821
|
+
|
|
12822
|
+
"use strict";
|
|
12823
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12824
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12825
|
+
/* harmony export */ "Scrollable": function() { return /* binding */ Scrollable; }
|
|
12826
|
+
/* harmony export */ });
|
|
12827
|
+
/* harmony import */ var _rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rocket.chat/css-in-js */ "../css-in-js/dist/index.module.js");
|
|
12828
|
+
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
12829
|
+
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_1__);
|
|
12830
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
12831
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
12832
|
+
/* harmony import */ var _helpers_appendClassName__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../helpers/appendClassName */ "./src/helpers/appendClassName.ts");
|
|
12833
|
+
/* harmony import */ var _hooks_useStyle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../hooks/useStyle */ "./src/hooks/useStyle.ts");
|
|
12834
|
+
/* harmony import */ var _Box_BoxTransforms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Box/BoxTransforms */ "./src/components/Box/BoxTransforms.ts");
|
|
12835
|
+
var __makeTemplateObject = (undefined && undefined.__makeTemplateObject) || function (cooked, raw) {
|
|
12836
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
12837
|
+
return cooked;
|
|
12837
12838
|
};
|
|
12838
12839
|
|
|
12839
12840
|
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12841
|
+
|
|
12842
|
+
|
|
12843
|
+
|
|
12844
|
+
|
|
12845
|
+
var getTouchingEdges = function (element) { return ({
|
|
12846
|
+
top: !element.scrollTop,
|
|
12847
|
+
bottom: !(element.scrollTop + element.clientHeight - element.scrollHeight),
|
|
12848
|
+
left: !element.scrollLeft,
|
|
12849
|
+
right: !(element.scrollLeft + element.clientWidth - element.scrollWidth),
|
|
12850
|
+
}); };
|
|
12851
|
+
var pollTouchingEdges = function (element, touchingEdgesRef, onScrollContent) {
|
|
12852
|
+
var touchingEdges = touchingEdgesRef.current;
|
|
12853
|
+
var newTouchingEdges = getTouchingEdges(element);
|
|
12854
|
+
var dirty = touchingEdges &&
|
|
12855
|
+
(touchingEdges.top !== newTouchingEdges.top ||
|
|
12856
|
+
touchingEdges.bottom !== newTouchingEdges.bottom ||
|
|
12857
|
+
touchingEdges.left !== newTouchingEdges.left ||
|
|
12858
|
+
touchingEdges.right !== newTouchingEdges.right);
|
|
12859
|
+
if (dirty) {
|
|
12860
|
+
touchingEdgesRef.current = newTouchingEdges;
|
|
12861
|
+
onScrollContent && onScrollContent(newTouchingEdges);
|
|
12862
|
+
}
|
|
12863
|
+
};
|
|
12864
|
+
var Scrollable = function (_a) {
|
|
12865
|
+
var children = _a.children, horizontal = _a.horizontal, vertical = _a.vertical, smooth = _a.smooth, onScrollContent = _a.onScrollContent;
|
|
12866
|
+
var scrollTimeoutRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
|
|
12867
|
+
var touchingEdgesRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)({});
|
|
12868
|
+
var handleScroll = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_1__.useMutableCallback)(function (event) {
|
|
12869
|
+
var element = event.currentTarget;
|
|
12870
|
+
if (!scrollTimeoutRef.current) {
|
|
12871
|
+
pollTouchingEdges(element, touchingEdgesRef, onScrollContent);
|
|
12872
|
+
}
|
|
12873
|
+
scrollTimeoutRef.current && clearTimeout(scrollTimeoutRef.current);
|
|
12874
|
+
scrollTimeoutRef.current = setTimeout(function () {
|
|
12875
|
+
scrollTimeoutRef.current = undefined;
|
|
12876
|
+
pollTouchingEdges(element, touchingEdgesRef, onScrollContent);
|
|
12877
|
+
}, 200);
|
|
12878
|
+
});
|
|
12879
|
+
var className = (0,_hooks_useStyle__WEBPACK_IMPORTED_MODULE_4__.useStyle)((0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: relative;\n\n &::-webkit-scrollbar {\n width: ", "rem;\n height: ", "rem;\n }\n\n &::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.05);\n background-color: var(\n --rcx-theme-scrollbar-thumb-color,\n rgba(0, 0, 0, 0.05)\n );\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.15);\n background-color: var(\n --rcx-theme-scrollbar-thumb-hover-color,\n rgba(0, 0, 0, 0.15)\n );\n }\n\n ", "\n ", "\n "], ["\n position: relative;\n\n &::-webkit-scrollbar {\n width: ", "rem;\n height: ", "rem;\n }\n\n &::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.05);\n background-color: var(\n --rcx-theme-scrollbar-thumb-color,\n rgba(0, 0, 0, 0.05)\n );\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.15);\n background-color: var(\n --rcx-theme-scrollbar-thumb-hover-color,\n rgba(0, 0, 0, 0.15)\n );\n }\n\n ", "\n ", "\n "])), 4 / 16, 4 / 16, (horizontal && (0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow-x: auto !important;\n "], ["\n overflow-x: auto !important;\n "])))) ||
|
|
12880
|
+
(vertical && (0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n overflow-y: auto !important;\n "], ["\n overflow-y: auto !important;\n "])))) || (0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n overflow: auto !important;\n "], ["\n overflow: auto !important;\n "]))), smooth && (0,_rocket_chat_css_in_js__WEBPACK_IMPORTED_MODULE_0__.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n scroll-behavior: smooth !important;\n "], ["\n scroll-behavior: smooth !important;\n "])))), null);
|
|
12881
|
+
var transformFn = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (props) {
|
|
12882
|
+
props.className =
|
|
12883
|
+
className && (0,_helpers_appendClassName__WEBPACK_IMPORTED_MODULE_3__.appendClassName)(props.className, className);
|
|
12884
|
+
if (onScrollContent !== undefined && props.onScroll === undefined) {
|
|
12885
|
+
props.onScroll = handleScroll;
|
|
12886
|
+
}
|
|
12887
|
+
return props;
|
|
12888
|
+
}, [className, handleScroll, onScrollContent]);
|
|
12889
|
+
return (react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Box_BoxTransforms__WEBPACK_IMPORTED_MODULE_5__.BoxTransforms.Provider, { children: children, value: (0,_Box_BoxTransforms__WEBPACK_IMPORTED_MODULE_5__.useComposedBoxTransform)(transformFn) }));
|
|
12890
|
+
};
|
|
12891
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
12844
12892
|
|
|
12845
12893
|
|
|
12846
12894
|
/***/ }),
|
|
12847
12895
|
|
|
12848
|
-
/***/ "./src/components/
|
|
12849
|
-
|
|
12850
|
-
!*** ./src/components/
|
|
12851
|
-
|
|
12896
|
+
/***/ "./src/components/Scrollable/index.ts":
|
|
12897
|
+
/*!********************************************!*\
|
|
12898
|
+
!*** ./src/components/Scrollable/index.ts ***!
|
|
12899
|
+
\********************************************/
|
|
12852
12900
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12853
12901
|
|
|
12854
12902
|
"use strict";
|
|
12855
12903
|
__webpack_require__.r(__webpack_exports__);
|
|
12856
|
-
/* harmony
|
|
12857
|
-
/* harmony export */ "Select": function() { return /* reexport safe */ _Select__WEBPACK_IMPORTED_MODULE_0__.Select; },
|
|
12858
|
-
/* harmony export */ "SelectFiltered": function() { return /* reexport safe */ _SelectFiltered__WEBPACK_IMPORTED_MODULE_1__.SelectFiltered; }
|
|
12859
|
-
/* harmony export */ });
|
|
12860
|
-
/* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Select */ "./src/components/Select/Select.tsx");
|
|
12861
|
-
/* harmony import */ var _SelectFiltered__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SelectFiltered */ "./src/components/Select/SelectFiltered.tsx");
|
|
12862
|
-
|
|
12904
|
+
/* harmony import */ var _Scrollable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Scrollable */ "./src/components/Scrollable/Scrollable.tsx");
|
|
12863
12905
|
|
|
12906
|
+
/* harmony default export */ __webpack_exports__["default"] = (_Scrollable__WEBPACK_IMPORTED_MODULE_0__.Scrollable);
|
|
12864
12907
|
|
|
12865
12908
|
|
|
12866
12909
|
/***/ }),
|
|
12867
12910
|
|
|
12868
|
-
/***/ "./src/components/
|
|
12911
|
+
/***/ "./src/components/SearchInput/SearchInput.tsx":
|
|
12869
12912
|
/*!****************************************************!*\
|
|
12870
|
-
!*** ./src/components/
|
|
12913
|
+
!*** ./src/components/SearchInput/SearchInput.tsx ***!
|
|
12871
12914
|
\****************************************************/
|
|
12872
12915
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12873
12916
|
|
|
12874
12917
|
"use strict";
|
|
12875
12918
|
__webpack_require__.r(__webpack_exports__);
|
|
12876
12919
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12877
|
-
/* harmony export */ "
|
|
12920
|
+
/* harmony export */ "SearchInput": function() { return /* binding */ SearchInput; }
|
|
12878
12921
|
/* harmony export */ });
|
|
12879
12922
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12880
12923
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12881
|
-
/* harmony import */ var
|
|
12882
|
-
/* harmony import */ var _InputBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
12924
|
+
/* harmony import */ var _InputBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
12883
12925
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12884
12926
|
__assign = Object.assign || function(t) {
|
|
12885
12927
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -12891,103 +12933,56 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
12891
12933
|
};
|
|
12892
12934
|
return __assign.apply(this, arguments);
|
|
12893
12935
|
};
|
|
12894
|
-
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
12895
|
-
var t = {};
|
|
12896
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
12897
|
-
t[p] = s[p];
|
|
12898
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
12899
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
12900
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
12901
|
-
t[p[i]] = s[p[i]];
|
|
12902
|
-
}
|
|
12903
|
-
return t;
|
|
12904
|
-
};
|
|
12905
|
-
var __read = (undefined && undefined.__read) || function (o, n) {
|
|
12906
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
12907
|
-
if (!m) return o;
|
|
12908
|
-
var i = m.call(o), r, ar = [], e;
|
|
12909
|
-
try {
|
|
12910
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
12911
|
-
}
|
|
12912
|
-
catch (error) { e = { error: error }; }
|
|
12913
|
-
finally {
|
|
12914
|
-
try {
|
|
12915
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12916
|
-
}
|
|
12917
|
-
finally { if (e) throw e.error; }
|
|
12918
|
-
}
|
|
12919
|
-
return ar;
|
|
12920
|
-
};
|
|
12921
12936
|
|
|
12922
12937
|
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
var children = _a.children, multiple = _a.multiple, placeholder = _a.placeholder, onChange = _a.onChange, props = __rest(_a, ["children", "multiple", "placeholder", "onChange"]);
|
|
12926
|
-
var _b = __read((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!props.value && !props.defaultValue), 2), isPlaceholderVisible = _b[0], setPlaceholderVisible = _b[1];
|
|
12927
|
-
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {
|
|
12928
|
-
setPlaceholderVisible(!event.currentTarget.value);
|
|
12929
|
-
onChange === null || onChange === void 0 ? void 0 : onChange.call(event.currentTarget, event);
|
|
12930
|
-
}, [onChange]);
|
|
12931
|
-
if (multiple) {
|
|
12932
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_2__.InputBox, __assign({ children: children }, props, { multiple: true, type: 'select', onChange: handleChange })));
|
|
12933
|
-
}
|
|
12934
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_2__.InputBox, __assign({ placeholderVisible: isPlaceholderVisible ? !!placeholder : undefined, ref: ref }, props, { addon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_1__.Icon, { name: 'chevron-down', size: 'x20' }), type: 'select', onChange: handleChange }),
|
|
12935
|
-
placeholder && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_2__.InputBox.Placeholder, { value: '' }, placeholder)),
|
|
12936
|
-
children));
|
|
12938
|
+
var SearchInput = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function SearchInput(props, ref) {
|
|
12939
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_1__.InputBox, __assign({ type: 'search', ref: ref }, props));
|
|
12937
12940
|
});
|
|
12938
12941
|
|
|
12939
12942
|
|
|
12940
12943
|
/***/ }),
|
|
12941
12944
|
|
|
12942
|
-
/***/ "./src/components/
|
|
12943
|
-
|
|
12944
|
-
!*** ./src/components/
|
|
12945
|
-
|
|
12945
|
+
/***/ "./src/components/SearchInput/index.tsx":
|
|
12946
|
+
/*!**********************************************!*\
|
|
12947
|
+
!*** ./src/components/SearchInput/index.tsx ***!
|
|
12948
|
+
\**********************************************/
|
|
12946
12949
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12947
12950
|
|
|
12948
12951
|
"use strict";
|
|
12949
12952
|
__webpack_require__.r(__webpack_exports__);
|
|
12950
12953
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12951
|
-
/* harmony export */ "
|
|
12952
|
-
/* harmony export */ "SelectInputOption": function() { return /* binding */ SelectInputOption; }
|
|
12954
|
+
/* harmony export */ "SearchInput": function() { return /* reexport safe */ _SearchInput__WEBPACK_IMPORTED_MODULE_0__.SearchInput; }
|
|
12953
12955
|
/* harmony export */ });
|
|
12954
|
-
/* harmony import */ var
|
|
12955
|
-
/* harmony import */ var _SelectInput__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SelectInput */ "./src/components/SelectInput/SelectInput.tsx");
|
|
12956
|
-
|
|
12956
|
+
/* harmony import */ var _SearchInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SearchInput */ "./src/components/SearchInput/SearchInput.tsx");
|
|
12957
12957
|
|
|
12958
|
-
var SelectInputOption = _InputBox_Option__WEBPACK_IMPORTED_MODULE_0__.Option;
|
|
12959
12958
|
|
|
12960
12959
|
|
|
12961
12960
|
/***/ }),
|
|
12962
12961
|
|
|
12963
|
-
/***/ "./src/components/
|
|
12964
|
-
|
|
12965
|
-
!*** ./src/components/
|
|
12966
|
-
|
|
12962
|
+
/***/ "./src/components/Select/Select.tsx":
|
|
12963
|
+
/*!******************************************!*\
|
|
12964
|
+
!*** ./src/components/Select/Select.tsx ***!
|
|
12965
|
+
\******************************************/
|
|
12967
12966
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12968
12967
|
|
|
12969
12968
|
"use strict";
|
|
12970
12969
|
__webpack_require__.r(__webpack_exports__);
|
|
12971
12970
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12972
|
-
/* harmony export */ "
|
|
12973
|
-
/* harmony export */ "PaginatedMultiSelectFiltered": function() { return /* binding */ PaginatedMultiSelectFiltered; }
|
|
12971
|
+
/* harmony export */ "Select": function() { return /* binding */ Select; }
|
|
12974
12972
|
/* harmony export */ });
|
|
12975
12973
|
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
|
|
12976
12974
|
/* harmony import */ var _rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__);
|
|
12977
12975
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
12978
12976
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
12979
|
-
/* harmony import */ var
|
|
12980
|
-
/* harmony import */ var
|
|
12981
|
-
/* harmony import */ var
|
|
12982
|
-
/* harmony import */ var
|
|
12983
|
-
/* harmony import */ var
|
|
12984
|
-
/* harmony import */ var
|
|
12985
|
-
/* harmony import */ var
|
|
12986
|
-
/* harmony import */ var
|
|
12987
|
-
/* harmony import */ var
|
|
12988
|
-
/* harmony import */ var _Position__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Position */ "./src/components/Position/index.ts");
|
|
12989
|
-
/* harmony import */ var _Select_SelectAddon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Select/SelectAddon */ "./src/components/Select/SelectAddon.tsx");
|
|
12990
|
-
/* harmony import */ var _Select_SelectFocus__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Select/SelectFocus */ "./src/components/Select/SelectFocus.tsx");
|
|
12977
|
+
/* harmony import */ var _helpers_isForwardRefType__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../helpers/isForwardRefType */ "./src/helpers/isForwardRefType.ts");
|
|
12978
|
+
/* harmony import */ var _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../AnimatedVisibility */ "./src/components/AnimatedVisibility/index.ts");
|
|
12979
|
+
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
12980
|
+
/* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
12981
|
+
/* harmony import */ var _Margins__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Margins */ "./src/components/Margins/index.ts");
|
|
12982
|
+
/* harmony import */ var _Options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Options */ "./src/components/Options/index.ts");
|
|
12983
|
+
/* harmony import */ var _PositionAnimated__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../PositionAnimated */ "./src/components/PositionAnimated/index.ts");
|
|
12984
|
+
/* harmony import */ var _SelectAddon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./SelectAddon */ "./src/components/Select/SelectAddon.tsx");
|
|
12985
|
+
/* harmony import */ var _SelectFocus__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SelectFocus */ "./src/components/Select/SelectFocus.tsx");
|
|
12991
12986
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
12992
12987
|
__assign = Object.assign || function(t) {
|
|
12993
12988
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -13026,12 +13021,6 @@ var __read = (undefined && undefined.__read) || function (o, n) {
|
|
|
13026
13021
|
}
|
|
13027
13022
|
return ar;
|
|
13028
13023
|
};
|
|
13029
|
-
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
|
|
13030
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
13031
|
-
to[j] = from[i];
|
|
13032
|
-
return to;
|
|
13033
|
-
};
|
|
13034
|
-
// @ts-nocheck
|
|
13035
13024
|
|
|
13036
13025
|
|
|
13037
13026
|
|
|
@@ -13043,115 +13032,149 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
|
13043
13032
|
|
|
13044
13033
|
|
|
13045
13034
|
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
var
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13035
|
+
var Wrapper = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) { return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_4__.Box, __assign({ is: 'div', "rcx-select__wrapper": true, ref: ref }, props))); });
|
|
13036
|
+
var useDidUpdate = function (func, deps) {
|
|
13037
|
+
var didMount = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
|
|
13038
|
+
var fn = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(func);
|
|
13039
|
+
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
13040
|
+
if (didMount.current) {
|
|
13041
|
+
fn();
|
|
13042
|
+
}
|
|
13043
|
+
didMount.current = true;
|
|
13044
|
+
}, deps || []);
|
|
13056
13045
|
};
|
|
13057
|
-
var
|
|
13058
|
-
var
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13046
|
+
var Select = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_a, ref) {
|
|
13047
|
+
var value = _a.value, filter = _a.filter, error = _a.error, disabled = _a.disabled, _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.anchor, Anchor = _c === void 0 ? _SelectFocus__WEBPACK_IMPORTED_MODULE_10__["default"] : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, _e = _a.getValue, getValue = _e === void 0 ? function (_a) {
|
|
13048
|
+
var _b = _a === void 0 ? ['', ''] : _a, _c = __read(_b, 1), value = _c[0];
|
|
13049
|
+
return value;
|
|
13050
|
+
} : _e, _f = _a.getLabel, getLabel = _f === void 0 ? function (_a) {
|
|
13051
|
+
var _b = _a === void 0 ? ['', ''] : _a, _c = __read(_b, 2), _ = _c[0], label = _c[1];
|
|
13052
|
+
return label;
|
|
13053
|
+
} : _f, _g = _a.placeholder, placeholder = _g === void 0 ? '' : _g, renderItem = _a.renderItem, RenderSelected = _a.renderSelected, _h = _a.renderOptions, _Options = _h === void 0 ? _Options__WEBPACK_IMPORTED_MODULE_7__.Options : _h, addonIcon = _a.addonIcon, customEmpty = _a.customEmpty, props = __rest(_a, ["value", "filter", "error", "disabled", "options", "anchor", "onChange", "getValue", "getLabel", "placeholder", "renderItem", "renderSelected", "renderOptions", "addonIcon", "customEmpty"]);
|
|
13054
|
+
var _j = __read((0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(value || ''), 2), internalValue = _j[0], setInternalValue = _j[1];
|
|
13055
|
+
var internalChangedByKeyboard = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function (_a) {
|
|
13063
13056
|
var _b = __read(_a, 1), value = _b[0];
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13057
|
+
setInternalValue(value);
|
|
13058
|
+
onChange(value);
|
|
13059
|
+
});
|
|
13060
|
+
var option = options.find(function (option) { return getValue(option) === internalValue; });
|
|
13061
|
+
var index = options.indexOf(option);
|
|
13062
|
+
var filteredOptions = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
|
13063
|
+
var mapOptions = function (_a) {
|
|
13064
|
+
var _b = __read(_a, 2), value = _b[0], label = _b[1];
|
|
13065
|
+
if (internalValue === value) {
|
|
13066
|
+
return [value, label, true];
|
|
13067
|
+
}
|
|
13068
|
+
return [value, label];
|
|
13069
|
+
};
|
|
13070
|
+
var applyFilter = function (_a) {
|
|
13071
|
+
var _b = __read(_a, 2), option = _b[1];
|
|
13072
|
+
return !filter || ~option.toLowerCase().indexOf(filter.toLowerCase());
|
|
13073
|
+
};
|
|
13074
|
+
return options.filter(applyFilter).map(mapOptions);
|
|
13075
|
+
}, [options, internalValue, filter]);
|
|
13076
|
+
var _k = __read((0,_Options__WEBPACK_IMPORTED_MODULE_7__.useCursor)(index, filteredOptions, internalChangedByKeyboard), 5), cursor = _k[0], handleKeyDown = _k[1], handleKeyUp = _k[2], reset = _k[3], _l = __read(_k[4], 3), visible = _l[0], hide = _l[1], show = _l[2];
|
|
13077
|
+
var internalChangedByClick = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function (_a) {
|
|
13078
|
+
var _b = __read(_a, 1), value = _b[0];
|
|
13079
|
+
setInternalValue(value);
|
|
13080
|
+
onChange(value);
|
|
13081
|
+
hide();
|
|
13082
|
+
});
|
|
13083
|
+
var innerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
13084
|
+
var anchorRef = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMergedRefs)(ref, innerRef);
|
|
13085
|
+
var renderAnchor = function (params) {
|
|
13086
|
+
if ((0,_helpers_isForwardRefType__WEBPACK_IMPORTED_MODULE_2__.isForwardRefType)(Anchor)) {
|
|
13087
|
+
return react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Anchor, __assign({}, params));
|
|
13068
13088
|
}
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13089
|
+
if (typeof Anchor === 'function') {
|
|
13090
|
+
return Anchor(params);
|
|
13091
|
+
}
|
|
13092
|
+
return null;
|
|
13072
13093
|
};
|
|
13073
|
-
var
|
|
13074
|
-
|
|
13075
|
-
var
|
|
13094
|
+
var _m = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useResizeObserver)(), containerRef = _m.ref, borderBoxSize = _m.borderBoxSize;
|
|
13095
|
+
useDidUpdate(reset, [filter, internalValue]);
|
|
13096
|
+
var valueLabel = getLabel(option);
|
|
13097
|
+
var visibleText = (filter === undefined || visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_3__["default"].HIDDEN) &&
|
|
13098
|
+
(valueLabel || placeholder || typeof placeholder === 'string');
|
|
13076
13099
|
var handleClick = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function () {
|
|
13077
|
-
|
|
13100
|
+
var _a;
|
|
13101
|
+
if (visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_3__["default"].VISIBLE) {
|
|
13078
13102
|
return hide();
|
|
13079
13103
|
}
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
return show();
|
|
13083
|
-
}
|
|
13104
|
+
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
13105
|
+
return show();
|
|
13084
13106
|
});
|
|
13085
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
13086
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
13087
|
-
|
|
13088
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
var
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13107
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_4__.Box, __assign({ "rcx-select": true, disabled: disabled, ref: containerRef, onClick: handleClick, className: (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () { return [error && 'invalid', disabled && 'disabled']; }, [error, disabled]) }, props),
|
|
13108
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Wrapper, { display: 'flex', mi: 'neg-x4', "rcx-select__wrapper--hidden": !!visibleText },
|
|
13109
|
+
visibleText &&
|
|
13110
|
+
(RenderSelected ? (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(RenderSelected, { role: 'option', value: getValue(option), label: valueLabel, key: getValue(option), onClick: internalChangedByClick })) : (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_4__.Box, { flexGrow: 1, is: 'span', mi: 'x4', "rcx-select__item": true, fontScale: 'p2', color: valueLabel ? 'default' : 'hint' }, visibleText))),
|
|
13111
|
+
renderAnchor({
|
|
13112
|
+
ref: anchorRef,
|
|
13113
|
+
children: !value ? option || placeholder : null,
|
|
13114
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : false,
|
|
13115
|
+
onClick: show,
|
|
13116
|
+
onBlur: hide,
|
|
13117
|
+
onKeyDown: handleKeyDown,
|
|
13118
|
+
onKeyUp: handleKeyUp,
|
|
13119
|
+
}),
|
|
13120
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Margins__WEBPACK_IMPORTED_MODULE_6__["default"], { inline: 'x4' },
|
|
13121
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_SelectAddon__WEBPACK_IMPORTED_MODULE_9__["default"], { children: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_5__.Icon, { name: visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_3__["default"].VISIBLE
|
|
13122
|
+
? 'cross'
|
|
13123
|
+
: addonIcon || 'chevron-down', size: 'x20' }) }))),
|
|
13124
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_PositionAnimated__WEBPACK_IMPORTED_MODULE_8__["default"], { visible: visible, anchor: containerRef },
|
|
13125
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Options, { width: borderBoxSize.inlineSize, role: 'listbox', filter: filter, options: filteredOptions, onSelect: internalChangedByClick, renderItem: renderItem, cursor: cursor, customEmpty: customEmpty }))));
|
|
13126
|
+
});
|
|
13127
|
+
|
|
13128
|
+
|
|
13129
|
+
/***/ }),
|
|
13130
|
+
|
|
13131
|
+
/***/ "./src/components/Select/SelectAddon.tsx":
|
|
13132
|
+
/*!***********************************************!*\
|
|
13133
|
+
!*** ./src/components/Select/SelectAddon.tsx ***!
|
|
13134
|
+
\***********************************************/
|
|
13135
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
13136
|
+
|
|
13137
|
+
"use strict";
|
|
13138
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13139
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
13140
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
13141
|
+
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
13142
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
13143
|
+
__assign = Object.assign || function(t) {
|
|
13144
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
13145
|
+
s = arguments[i];
|
|
13146
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
13147
|
+
t[p] = s[p];
|
|
13148
|
+
}
|
|
13149
|
+
return t;
|
|
13150
|
+
};
|
|
13151
|
+
return __assign.apply(this, arguments);
|
|
13129
13152
|
};
|
|
13130
13153
|
|
|
13131
13154
|
|
|
13155
|
+
var SelectAddon = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function SelectAddon(props, ref) {
|
|
13156
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ is: 'div', "rcx-select__addon": true, ref: ref }, props));
|
|
13157
|
+
});
|
|
13158
|
+
/* harmony default export */ __webpack_exports__["default"] = (SelectAddon);
|
|
13159
|
+
|
|
13160
|
+
|
|
13132
13161
|
/***/ }),
|
|
13133
13162
|
|
|
13134
|
-
/***/ "./src/components/
|
|
13135
|
-
|
|
13136
|
-
!*** ./src/components/
|
|
13137
|
-
|
|
13163
|
+
/***/ "./src/components/Select/SelectFiltered.tsx":
|
|
13164
|
+
/*!**************************************************!*\
|
|
13165
|
+
!*** ./src/components/Select/SelectFiltered.tsx ***!
|
|
13166
|
+
\**************************************************/
|
|
13138
13167
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
13139
13168
|
|
|
13140
13169
|
"use strict";
|
|
13141
13170
|
__webpack_require__.r(__webpack_exports__);
|
|
13142
13171
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13143
|
-
/* harmony export */ "
|
|
13172
|
+
/* harmony export */ "SelectFiltered": function() { return /* binding */ SelectFiltered; }
|
|
13144
13173
|
/* harmony export */ });
|
|
13145
|
-
/* harmony import */ var
|
|
13146
|
-
/* harmony import */ var
|
|
13147
|
-
/* harmony import */ var
|
|
13148
|
-
/* harmony import */ var
|
|
13149
|
-
/* harmony import */ var _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../AnimatedVisibility */ "./src/components/AnimatedVisibility/index.ts");
|
|
13150
|
-
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
13151
|
-
/* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
13152
|
-
/* harmony import */ var _Options_useVisible__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Options/useVisible */ "./src/components/Options/useVisible.ts");
|
|
13153
|
-
/* harmony import */ var _OptionsPaginated__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../OptionsPaginated */ "./src/components/OptionsPaginated/index.ts");
|
|
13154
|
-
/* harmony import */ var _PositionAnimated__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../PositionAnimated */ "./src/components/PositionAnimated/index.ts");
|
|
13174
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
13175
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
13176
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! . */ "./src/components/Select/index.ts");
|
|
13177
|
+
/* harmony import */ var _SelectFilteredAnchor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SelectFilteredAnchor */ "./src/components/Select/SelectFilteredAnchor.tsx");
|
|
13155
13178
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
13156
13179
|
__assign = Object.assign || function(t) {
|
|
13157
13180
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -13190,97 +13213,131 @@ var __read = (undefined && undefined.__read) || function (o, n) {
|
|
|
13190
13213
|
}
|
|
13191
13214
|
return ar;
|
|
13192
13215
|
};
|
|
13193
|
-
// @ts-nocheck
|
|
13194
|
-
|
|
13195
13216
|
|
|
13196
13217
|
|
|
13197
13218
|
|
|
13219
|
+
var SelectFiltered = function (_a) {
|
|
13220
|
+
var options = _a.options, placeholder = _a.placeholder, propFilter = _a.filter, propSetFilter = _a.setFilter, props = __rest(_a, ["options", "placeholder", "filter", "setFilter"]);
|
|
13221
|
+
var _b = __read((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''), 2), filter = _b[0], setFilter = _b[1];
|
|
13222
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__.Select, __assign({ placeholder: placeholder, filter: propFilter || filter, options: options }, props, { anchor: function (params) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_SelectFilteredAnchor__WEBPACK_IMPORTED_MODULE_2__["default"], __assign({ placeholder: placeholder, filter: propFilter || filter, onChangeFilter: propSetFilter || setFilter }, params))); } })));
|
|
13223
|
+
};
|
|
13198
13224
|
|
|
13199
13225
|
|
|
13226
|
+
/***/ }),
|
|
13200
13227
|
|
|
13228
|
+
/***/ "./src/components/Select/SelectFilteredAnchor.tsx":
|
|
13229
|
+
/*!********************************************************!*\
|
|
13230
|
+
!*** ./src/components/Select/SelectFilteredAnchor.tsx ***!
|
|
13231
|
+
\********************************************************/
|
|
13232
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
13201
13233
|
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
var
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
var
|
|
13212
|
-
|
|
13213
|
-
e.stopPropagation();
|
|
13214
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
13215
|
-
};
|
|
13216
|
-
var useDidUpdate = function (func) {
|
|
13217
|
-
var didMount = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
|
|
13218
|
-
var fn = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(func);
|
|
13219
|
-
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
13220
|
-
if (didMount.current) {
|
|
13221
|
-
fn();
|
|
13234
|
+
"use strict";
|
|
13235
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13236
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
13237
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
13238
|
+
/* harmony import */ var _InputBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
13239
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
13240
|
+
__assign = Object.assign || function(t) {
|
|
13241
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
13242
|
+
s = arguments[i];
|
|
13243
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
13244
|
+
t[p] = s[p];
|
|
13222
13245
|
}
|
|
13223
|
-
|
|
13224
|
-
}
|
|
13246
|
+
return t;
|
|
13247
|
+
};
|
|
13248
|
+
return __assign.apply(this, arguments);
|
|
13225
13249
|
};
|
|
13226
|
-
var
|
|
13227
|
-
var
|
|
13228
|
-
var
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
setInternalValue(value);
|
|
13235
|
-
onChange(value);
|
|
13236
|
-
hide();
|
|
13237
|
-
});
|
|
13238
|
-
var ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
13239
|
-
var _j = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useResizeObserver)(), containerRef = _j.ref, borderBoxSize = _j.borderBoxSize;
|
|
13240
|
-
useDidUpdate([filter, internalValue]);
|
|
13241
|
-
var valueLabel = option === null || option === void 0 ? void 0 : option.label;
|
|
13242
|
-
var visibleText = (filter === undefined || visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__["default"].HIDDEN) &&
|
|
13243
|
-
(valueLabel || placeholder || typeof placeholder === 'string');
|
|
13244
|
-
var handleClick = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.useMutableCallback)(function () {
|
|
13245
|
-
if (visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__["default"].VISIBLE) {
|
|
13246
|
-
return hide();
|
|
13250
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
13251
|
+
var t = {};
|
|
13252
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13253
|
+
t[p] = s[p];
|
|
13254
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
13255
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
13256
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
13257
|
+
t[p[i]] = s[p[i]];
|
|
13247
13258
|
}
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13259
|
+
return t;
|
|
13260
|
+
};
|
|
13261
|
+
|
|
13262
|
+
|
|
13263
|
+
var SelectFilteredAnchor = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function SelectFilteredAnchor(_a, ref) {
|
|
13264
|
+
var _children = _a.children, filter = _a.filter, onChangeFilter = _a.onChangeFilter, placeholder = _a.placeholder, props = __rest(_a, ["children", "filter", "onChangeFilter", "placeholder"]);
|
|
13265
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_1__.InputBox.Input, __assign({ mi: 'x4', flexGrow: 1, className: 'rcx-select__focus', ref: ref, placeholder: placeholder, value: filter, onInput: function (e) {
|
|
13266
|
+
return onChangeFilter(e.currentTarget.value);
|
|
13267
|
+
} }, props, { "rcx-input-box--undecorated": true })));
|
|
13268
|
+
});
|
|
13269
|
+
/* harmony default export */ __webpack_exports__["default"] = (SelectFilteredAnchor);
|
|
13270
|
+
|
|
13271
|
+
|
|
13272
|
+
/***/ }),
|
|
13273
|
+
|
|
13274
|
+
/***/ "./src/components/Select/SelectFocus.tsx":
|
|
13275
|
+
/*!***********************************************!*\
|
|
13276
|
+
!*** ./src/components/Select/SelectFocus.tsx ***!
|
|
13277
|
+
\***********************************************/
|
|
13278
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
13279
|
+
|
|
13280
|
+
"use strict";
|
|
13281
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13282
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
13283
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
13284
|
+
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
13285
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
13286
|
+
__assign = Object.assign || function(t) {
|
|
13287
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
13288
|
+
s = arguments[i];
|
|
13289
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
13290
|
+
t[p] = s[p];
|
|
13251
13291
|
}
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
visibleText && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_3__.Box, { flexGrow: 1, is: 'span', mi: 'x4', "rcx-select__item": true, fontScale: 'p2m', color: valueLabel ? 'default' : 'hint' }, visibleText)),
|
|
13256
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Anchor, { disabled: disabled, "rcx-input-box--undecorated": true, filter: filter, ref: ref, "aria-haspopup": 'listbox', onClick: show, onBlur: hide }),
|
|
13257
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Addon, { mi: 'x4', children: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_4__.Icon, { name: visible === _AnimatedVisibility__WEBPACK_IMPORTED_MODULE_2__["default"].VISIBLE
|
|
13258
|
-
? 'cross'
|
|
13259
|
-
: 'chevron-down', size: 'x20' }) })),
|
|
13260
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_PositionAnimated__WEBPACK_IMPORTED_MODULE_7__["default"], { visible: visible, anchor: containerRef },
|
|
13261
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_Options, __assign({}, (withTitle && { title: withTitle }), { width: borderBoxSize.inlineSize, role: 'listbox', filter: filter, options: options, onSelect: internalChangedByClick, endReached: endReached, onMouseDown: prevent })))));
|
|
13292
|
+
return t;
|
|
13293
|
+
};
|
|
13294
|
+
return __assign.apply(this, arguments);
|
|
13262
13295
|
};
|
|
13263
13296
|
|
|
13264
13297
|
|
|
13298
|
+
var SelectFocus = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function SelectFocus(props, ref) {
|
|
13299
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ ref: ref, fontScale: 'p2m', color: 'hint', "rcx-select__focus": true, is: 'button', type: 'button' }, props)));
|
|
13300
|
+
});
|
|
13301
|
+
/* harmony default export */ __webpack_exports__["default"] = (SelectFocus);
|
|
13302
|
+
|
|
13303
|
+
|
|
13265
13304
|
/***/ }),
|
|
13266
13305
|
|
|
13267
|
-
/***/ "./src/components/
|
|
13268
|
-
|
|
13269
|
-
!*** ./src/components/
|
|
13270
|
-
|
|
13306
|
+
/***/ "./src/components/Select/index.ts":
|
|
13307
|
+
/*!****************************************!*\
|
|
13308
|
+
!*** ./src/components/Select/index.ts ***!
|
|
13309
|
+
\****************************************/
|
|
13271
13310
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
13272
13311
|
|
|
13273
13312
|
"use strict";
|
|
13274
13313
|
__webpack_require__.r(__webpack_exports__);
|
|
13275
13314
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13276
|
-
/* harmony export */ "
|
|
13315
|
+
/* harmony export */ "Select": function() { return /* reexport safe */ _Select__WEBPACK_IMPORTED_MODULE_0__.Select; },
|
|
13316
|
+
/* harmony export */ "SelectFiltered": function() { return /* reexport safe */ _SelectFiltered__WEBPACK_IMPORTED_MODULE_1__.SelectFiltered; }
|
|
13277
13317
|
/* harmony export */ });
|
|
13278
|
-
/* harmony import */ var
|
|
13279
|
-
/* harmony import */ var
|
|
13280
|
-
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13318
|
+
/* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Select */ "./src/components/Select/Select.tsx");
|
|
13319
|
+
/* harmony import */ var _SelectFiltered__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SelectFiltered */ "./src/components/Select/SelectFiltered.tsx");
|
|
13320
|
+
|
|
13321
|
+
|
|
13322
|
+
|
|
13323
|
+
|
|
13324
|
+
/***/ }),
|
|
13325
|
+
|
|
13326
|
+
/***/ "./src/components/SelectInput/SelectInput.tsx":
|
|
13327
|
+
/*!****************************************************!*\
|
|
13328
|
+
!*** ./src/components/SelectInput/SelectInput.tsx ***!
|
|
13329
|
+
\****************************************************/
|
|
13330
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
13331
|
+
|
|
13332
|
+
"use strict";
|
|
13333
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13334
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13335
|
+
/* harmony export */ "SelectInput": function() { return /* binding */ SelectInput; }
|
|
13336
|
+
/* harmony export */ });
|
|
13337
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
13338
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
13339
|
+
/* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
13340
|
+
/* harmony import */ var _InputBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../InputBox */ "./src/components/InputBox/index.ts");
|
|
13284
13341
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
13285
13342
|
__assign = Object.assign || function(t) {
|
|
13286
13343
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -13322,45 +13379,41 @@ var __read = (undefined && undefined.__read) || function (o, n) {
|
|
|
13322
13379
|
|
|
13323
13380
|
|
|
13324
13381
|
|
|
13325
|
-
|
|
13326
|
-
var
|
|
13327
|
-
var
|
|
13328
|
-
|
|
13329
|
-
|
|
13330
|
-
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
};
|
|
13382
|
+
var SelectInput = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function SelectInput(_a, ref) {
|
|
13383
|
+
var children = _a.children, multiple = _a.multiple, placeholder = _a.placeholder, onChange = _a.onChange, props = __rest(_a, ["children", "multiple", "placeholder", "onChange"]);
|
|
13384
|
+
var _b = __read((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!props.value && !props.defaultValue), 2), isPlaceholderVisible = _b[0], setPlaceholderVisible = _b[1];
|
|
13385
|
+
var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {
|
|
13386
|
+
setPlaceholderVisible(!event.currentTarget.value);
|
|
13387
|
+
onChange === null || onChange === void 0 ? void 0 : onChange.call(event.currentTarget, event);
|
|
13388
|
+
}, [onChange]);
|
|
13389
|
+
if (multiple) {
|
|
13390
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_2__.InputBox, __assign({ children: children }, props, { multiple: true, type: 'select', onChange: handleChange })));
|
|
13391
|
+
}
|
|
13392
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_2__.InputBox, __assign({ placeholderVisible: isPlaceholderVisible ? !!placeholder : undefined, ref: ref }, props, { addon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_1__.Icon, { name: 'chevron-down', size: 'x20' }), type: 'select', onChange: handleChange }),
|
|
13393
|
+
placeholder && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_InputBox__WEBPACK_IMPORTED_MODULE_2__.InputBox.Placeholder, { value: '' }, placeholder)),
|
|
13394
|
+
children));
|
|
13395
|
+
});
|
|
13340
13396
|
|
|
13341
13397
|
|
|
13342
13398
|
/***/ }),
|
|
13343
13399
|
|
|
13344
|
-
/***/ "./src/components/
|
|
13345
|
-
|
|
13346
|
-
!*** ./src/components/
|
|
13347
|
-
|
|
13400
|
+
/***/ "./src/components/SelectInput/index.ts":
|
|
13401
|
+
/*!*********************************************!*\
|
|
13402
|
+
!*** ./src/components/SelectInput/index.ts ***!
|
|
13403
|
+
\*********************************************/
|
|
13348
13404
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
13349
13405
|
|
|
13350
13406
|
"use strict";
|
|
13351
13407
|
__webpack_require__.r(__webpack_exports__);
|
|
13352
13408
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13353
|
-
/* harmony export */ "
|
|
13354
|
-
/* harmony export */ "
|
|
13355
|
-
/* harmony export */ "PaginatedMultiSelect": function() { return /* reexport safe */ _PaginatedMultiSelect__WEBPACK_IMPORTED_MODULE_2__.PaginatedMultiSelect; },
|
|
13356
|
-
/* harmony export */ "PaginatedMultiSelectFiltered": function() { return /* reexport safe */ _PaginatedMultiSelect__WEBPACK_IMPORTED_MODULE_2__.PaginatedMultiSelectFiltered; }
|
|
13409
|
+
/* harmony export */ "SelectInput": function() { return /* reexport safe */ _SelectInput__WEBPACK_IMPORTED_MODULE_1__.SelectInput; },
|
|
13410
|
+
/* harmony export */ "SelectInputOption": function() { return /* binding */ SelectInputOption; }
|
|
13357
13411
|
/* harmony export */ });
|
|
13358
|
-
/* harmony import */ var
|
|
13359
|
-
/* harmony import */ var
|
|
13360
|
-
/* harmony import */ var _PaginatedMultiSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PaginatedMultiSelect */ "./src/components/SelectPaginated/PaginatedMultiSelect.tsx");
|
|
13361
|
-
|
|
13412
|
+
/* harmony import */ var _InputBox_Option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../InputBox/Option */ "./src/components/InputBox/Option.tsx");
|
|
13413
|
+
/* harmony import */ var _SelectInput__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SelectInput */ "./src/components/SelectInput/SelectInput.tsx");
|
|
13362
13414
|
|
|
13363
13415
|
|
|
13416
|
+
var SelectInputOption = _InputBox_Option__WEBPACK_IMPORTED_MODULE_0__.Option;
|
|
13364
13417
|
|
|
13365
13418
|
|
|
13366
13419
|
/***/ }),
|
|
@@ -15428,10 +15481,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15428
15481
|
/* harmony export */ "SearchInput": function() { return /* reexport safe */ _SearchInput__WEBPACK_IMPORTED_MODULE_41__.SearchInput; },
|
|
15429
15482
|
/* harmony export */ "Select": function() { return /* reexport safe */ _Select__WEBPACK_IMPORTED_MODULE_42__.Select; },
|
|
15430
15483
|
/* harmony export */ "SelectFiltered": function() { return /* reexport safe */ _Select__WEBPACK_IMPORTED_MODULE_42__.SelectFiltered; },
|
|
15431
|
-
/* harmony export */ "
|
|
15432
|
-
/* harmony export */ "
|
|
15433
|
-
/* harmony export */ "PaginatedSelect": function() { return /* reexport safe */ _SelectPaginated__WEBPACK_IMPORTED_MODULE_43__.PaginatedSelect; },
|
|
15434
|
-
/* harmony export */ "PaginatedSelectFiltered": function() { return /* reexport safe */ _SelectPaginated__WEBPACK_IMPORTED_MODULE_43__.PaginatedSelectFiltered; },
|
|
15484
|
+
/* harmony export */ "PaginatedMultiSelectFiltered": function() { return /* reexport safe */ _PaginatedSelect__WEBPACK_IMPORTED_MODULE_43__.PaginatedMultiSelectFiltered; },
|
|
15485
|
+
/* harmony export */ "PaginatedSelectFiltered": function() { return /* reexport safe */ _PaginatedSelect__WEBPACK_IMPORTED_MODULE_43__.PaginatedSelectFiltered; },
|
|
15435
15486
|
/* harmony export */ "SelectInput": function() { return /* reexport safe */ _SelectInput__WEBPACK_IMPORTED_MODULE_44__.SelectInput; },
|
|
15436
15487
|
/* harmony export */ "SelectInputOption": function() { return /* reexport safe */ _SelectInput__WEBPACK_IMPORTED_MODULE_44__.SelectInputOption; },
|
|
15437
15488
|
/* harmony export */ "Sidebar": function() { return /* reexport safe */ _Sidebar__WEBPACK_IMPORTED_MODULE_45__["default"]; },
|
|
@@ -15533,7 +15584,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15533
15584
|
/* harmony import */ var _Scrollable__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Scrollable */ "./src/components/Scrollable/index.ts");
|
|
15534
15585
|
/* harmony import */ var _SearchInput__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./SearchInput */ "./src/components/SearchInput/index.tsx");
|
|
15535
15586
|
/* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Select */ "./src/components/Select/index.ts");
|
|
15536
|
-
/* harmony import */ var
|
|
15587
|
+
/* harmony import */ var _PaginatedSelect__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./PaginatedSelect */ "./src/components/PaginatedSelect/index.ts");
|
|
15537
15588
|
/* harmony import */ var _SelectInput__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./SelectInput */ "./src/components/SelectInput/index.ts");
|
|
15538
15589
|
/* harmony import */ var _Sidebar__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Sidebar */ "./src/components/Sidebar/index.tsx");
|
|
15539
15590
|
/* harmony import */ var _Skeleton__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Skeleton */ "./src/components/Skeleton/index.tsx");
|
|
@@ -16194,9 +16245,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16194
16245
|
/* harmony export */ "OptionSkeleton": function() { return /* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.OptionSkeleton; },
|
|
16195
16246
|
/* harmony export */ "OptionTitle": function() { return /* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.OptionTitle; },
|
|
16196
16247
|
/* harmony export */ "Options": function() { return /* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.Options; },
|
|
16197
|
-
/* harmony export */ "PaginatedMultiSelect": function() { return /* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PaginatedMultiSelect; },
|
|
16198
16248
|
/* harmony export */ "PaginatedMultiSelectFiltered": function() { return /* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PaginatedMultiSelectFiltered; },
|
|
16199
|
-
/* harmony export */ "PaginatedSelect": function() { return /* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PaginatedSelect; },
|
|
16200
16249
|
/* harmony export */ "PaginatedSelectFiltered": function() { return /* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PaginatedSelectFiltered; },
|
|
16201
16250
|
/* harmony export */ "Pagination": function() { return /* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.Pagination; },
|
|
16202
16251
|
/* harmony export */ "PasswordInput": function() { return /* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.PasswordInput; },
|
|
@@ -16293,7 +16342,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16293
16342
|
|
|
16294
16343
|
|
|
16295
16344
|
if (true) {
|
|
16296
|
-
console.log("fuselage: " + "0.31.
|
|
16345
|
+
console.log("fuselage: " + "0.31.6");
|
|
16297
16346
|
}
|
|
16298
16347
|
|
|
16299
16348
|
|