@luminati-io/uikit 3.0.23 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +48241 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.js +48185 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/umd/uikit.development.js +59 -42
- package/dist/umd/uikit.development.js.map +1 -1
- package/dist/umd/uikit.production.min.js +1 -1
- package/index.js +6 -0
- package/package.json +21 -4
@@ -24438,7 +24438,7 @@ var buildComponents = function buildComponents(props) {
|
|
24438
24438
|
formatOptionLabel: props.formatOptionLabel
|
24439
24439
|
});
|
24440
24440
|
}
|
24441
|
-
if (props.autosize === false) components.ValueContainer = _value_container__WEBPACK_IMPORTED_MODULE_5__.ValueContainer;
|
24441
|
+
if (props.autosize === false && props.multiselect) components.ValueContainer = _value_container__WEBPACK_IMPORTED_MODULE_5__.ValueContainer;
|
24442
24442
|
return components;
|
24443
24443
|
};
|
24444
24444
|
|
@@ -25158,10 +25158,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
25158
25158
|
/*jslint react:true*/
|
25159
25159
|
var _excluded = ["children", "getValue"];
|
25160
25160
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
25161
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
25162
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
25163
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
25164
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
25165
25161
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
25166
25162
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
25167
25163
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -25184,7 +25180,7 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
|
|
25184
25180
|
var optsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
25185
25181
|
var moreOptRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
25186
25182
|
var opts = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
25187
|
-
return react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);
|
25183
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).filter(isValueChild);
|
25188
25184
|
}, [length]);
|
25189
25185
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(opts),
|
25190
25186
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -25208,16 +25204,14 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
|
|
25208
25204
|
}, 0);
|
25209
25205
|
var moreOptWidth = ((_moreOptRef$current = moreOptRef.current) === null || _moreOptRef$current === void 0 ? void 0 : _moreOptRef$current.offsetWidth) || 0 + _constants__WEBPACK_IMPORTED_MODULE_3__.offset * 2;
|
25210
25206
|
if (inputWidth - moreOptWidth < inputChildrenWidth) {
|
25211
|
-
var _tempOpts;
|
25212
25207
|
var stopWidth = 0;
|
25213
25208
|
inputElements.forEach(function (tag, index) {
|
25214
25209
|
stopWidth += tag.offsetWidth + _constants__WEBPACK_IMPORTED_MODULE_3__.offset * 2;
|
25215
25210
|
if (inputWidth - moreOptWidth >= stopWidth) tempOpts.push(opts[index]);
|
25216
25211
|
});
|
25217
|
-
(_tempOpts = tempOpts).push.apply(_tempOpts, _toConsumableArray(opts.slice(length)));
|
25218
25212
|
} else tempOpts = opts;
|
25219
25213
|
return tempOpts;
|
25220
|
-
}, [optsRef, opts]);
|
25214
|
+
}, [optsRef, opts, length]);
|
25221
25215
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(function () {
|
25222
25216
|
if (recalculationRender && optsRef.current) {
|
25223
25217
|
var visible = calculateVisibleTags();
|
@@ -25235,7 +25229,11 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
|
|
25235
25229
|
setRecalculationRender(true);
|
25236
25230
|
}, [opts]);
|
25237
25231
|
(0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useResize)(handleResize);
|
25238
|
-
|
25232
|
+
|
25233
|
+
// Keep standard placeholder and input from react-select
|
25234
|
+
var childsToRender = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).filter(function (child) {
|
25235
|
+
return !isValueChild(child);
|
25236
|
+
});
|
25239
25237
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(OptsWrapper, {
|
25240
25238
|
ref: optsRef
|
25241
25239
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_select__WEBPACK_IMPORTED_MODULE_5__.c.ValueContainer, rest, visibleOpts, (recalculationRender || hiddenCount > 0) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MoreOpt, {
|
@@ -25243,7 +25241,7 @@ var ValueContainerComponent = function ValueContainerComponent(props) {
|
|
25243
25241
|
ref: moreOptRef,
|
25244
25242
|
inputProps: props,
|
25245
25243
|
count: hiddenCount
|
25246
|
-
})));
|
25244
|
+
}), childsToRender));
|
25247
25245
|
};
|
25248
25246
|
var ValueContainer = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(ValueContainerComponent);
|
25249
25247
|
var MoreOpt = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
|
@@ -25271,6 +25269,10 @@ var Generic = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withC
|
|
25271
25269
|
})(["", ""], function (prop) {
|
25272
25270
|
return prop.$css;
|
25273
25271
|
});
|
25272
|
+
var isValueChild = function isValueChild(child) {
|
25273
|
+
var _child$type;
|
25274
|
+
return ['MultiValue', 'SingleValue'].includes((child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name) || '');
|
25275
|
+
};
|
25274
25276
|
|
25275
25277
|
/***/ }),
|
25276
25278
|
|
@@ -28218,7 +28220,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
28218
28220
|
|
28219
28221
|
|
28220
28222
|
/*jslint react:true*/
|
28223
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
28221
28224
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
28225
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
28226
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
28227
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
28228
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
28229
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
28222
28230
|
|
28223
28231
|
|
28224
28232
|
|
@@ -28226,7 +28234,6 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
28226
28234
|
|
28227
28235
|
|
28228
28236
|
|
28229
|
-
var assign = Object.assign;
|
28230
28237
|
var Cell = function Cell(props) {
|
28231
28238
|
var classNamePrefix = props.classNamePrefix,
|
28232
28239
|
rowDensity = props.rowDensity,
|
@@ -28257,21 +28264,22 @@ var Cell = function Cell(props) {
|
|
28257
28264
|
var doneEditing = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
28258
28265
|
columnDoneEditing(columnId, rowId);
|
28259
28266
|
}, [columnDoneEditing, columnId, rowId]);
|
28260
|
-
var cellProps =
|
28261
|
-
type: type,
|
28262
|
-
rowDensity: rowDensity,
|
28263
|
-
canEdit: canEdit,
|
28264
|
-
isEditing: isEditing
|
28265
|
-
|
28266
|
-
|
28267
|
-
|
28268
|
-
onClick
|
28267
|
+
var cellProps = _objectSpread({
|
28268
|
+
$type: type,
|
28269
|
+
$rowDensity: rowDensity,
|
28270
|
+
$canEdit: canEdit,
|
28271
|
+
$isEditing: isEditing,
|
28272
|
+
$isLastRow: isLastRow
|
28273
|
+
}, cell.getCellProps([getColumnProps(column), getCellProps(cell)]));
|
28274
|
+
if (canEdit) {
|
28275
|
+
cellProps.onClick = function (e) {
|
28269
28276
|
e.stopPropagation();
|
28270
28277
|
startEditing();
|
28271
|
-
}
|
28272
|
-
}
|
28278
|
+
};
|
28279
|
+
}
|
28280
|
+
var className = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.classNames)(null, null, columnClassName, cellClassName, cellProps.className);
|
28273
28281
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledCell, _extends({}, cellProps, {
|
28274
|
-
className:
|
28282
|
+
className: className
|
28275
28283
|
}), cell.render('Cell', {
|
28276
28284
|
row: row,
|
28277
28285
|
isEditing: isEditing,
|
@@ -28284,25 +28292,25 @@ var StyledCell = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.wi
|
|
28284
28292
|
displayName: "StyledCell",
|
28285
28293
|
componentId: "sc-b034il-0"
|
28286
28294
|
})(["padding:5px 15px;overflow-x:clip;", " background-color:", ";border:1px solid ", ";", ":hover &{background-color:", ";border-left-color:", ";border-right-color:", ";}", " ", " &[data-pinned-last]{", "}", ""], function (props) {
|
28287
|
-
return props
|
28295
|
+
return props.$type == 'number' ? 'text-align: right;' : null;
|
28288
28296
|
}, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.white, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.white, _table_row__WEBPACK_IMPORTED_MODULE_6__["default"], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_2, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_2, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_2, function (props) {
|
28289
|
-
if (props
|
28290
|
-
if (props
|
28297
|
+
if (props.$isFooter) return "border-top-color: ".concat(_theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_3, ";");
|
28298
|
+
if (props.$isLastRow) return "border-bottom-color: ".concat(_theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_3, ";");
|
28291
28299
|
}, function (props) {
|
28292
|
-
if (props
|
28300
|
+
if (props.$rowDensity == 'diamond_hand') {
|
28293
28301
|
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["padding-top:11px;padding-bottom:11px;"]);
|
28294
28302
|
}
|
28295
|
-
if (props
|
28303
|
+
if (props.$rowDensity == 'white_spaced') {
|
28296
28304
|
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["padding-top:25px;padding-bottom:25px;"]);
|
28297
28305
|
}
|
28298
28306
|
}, function (props) {
|
28299
|
-
if (props
|
28307
|
+
if (props.$canEdit && props.$isEditing) {
|
28300
28308
|
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["box-shadow:2px 0px 4px -2px rgba(24,39,75,0.12),4px 0px 4px -2px rgba(24,39,75,0.08),inset 0px 0px 0px 3px rgba(0,106,220,0.4);"]);
|
28301
28309
|
}
|
28302
28310
|
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["box-shadow:2px 0px 4px -2px rgba(24,39,75,0.12),4px 0px 4px -2px rgba(24,39,75,0.08);"]);
|
28303
28311
|
}, function (props) {
|
28304
|
-
if (props
|
28305
|
-
if (props
|
28312
|
+
if (props.$canEdit) {
|
28313
|
+
if (props.$isEditing) {
|
28306
28314
|
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["border:1px solid ", " !important;box-shadow:inset 0px 0px 0px 3px rgba(0,106,220,0.4);z-index:", ";"], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.blue_11, _constants__WEBPACK_IMPORTED_MODULE_4__.Z_INDEX.editingCell);
|
28307
28315
|
}
|
28308
28316
|
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["&:hover{border-color:", " !important;}"], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_9);
|
@@ -28905,7 +28913,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
28905
28913
|
|
28906
28914
|
|
28907
28915
|
/*jslint react:true*/
|
28916
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
28908
28917
|
var _excluded = ["key"];
|
28918
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
28919
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
28920
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
28921
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
28922
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
28909
28923
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
28910
28924
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
28911
28925
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
@@ -28955,7 +28969,7 @@ var TableFooter = function TableFooter(props) {
|
|
28955
28969
|
};
|
28956
28970
|
TableFooter.displayName = 'TableFooter';
|
28957
28971
|
var FooterCell = function FooterCell(props) {
|
28958
|
-
var
|
28972
|
+
var footerClassName = props.className,
|
28959
28973
|
column = props.column,
|
28960
28974
|
rowDensity = props.rowDensity;
|
28961
28975
|
var _column$type = column.type,
|
@@ -28964,15 +28978,18 @@ var FooterCell = function FooterCell(props) {
|
|
28964
28978
|
var _useTableContext2 = (0,_context__WEBPACK_IMPORTED_MODULE_3__.useTableContext)(),
|
28965
28979
|
getColumnProps = _useTableContext2.getColumnProps,
|
28966
28980
|
getFooterProps = _useTableContext2.getFooterProps;
|
28967
|
-
var footerProps =
|
28968
|
-
|
28969
|
-
|
28970
|
-
|
28971
|
-
|
28972
|
-
|
28973
|
-
|
28974
|
-
|
28975
|
-
|
28981
|
+
var footerProps = _objectSpread({
|
28982
|
+
$type: type,
|
28983
|
+
$rowDensity: rowDensity,
|
28984
|
+
$isFooter: true
|
28985
|
+
}, column.getFooterProps([getColumnProps(column), getFooterProps(column)]));
|
28986
|
+
var className = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.classNames)(classNamePrefix, {
|
28987
|
+
footer: true
|
28988
|
+
}, footerClassName, footerProps.className);
|
28989
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_cell__WEBPACK_IMPORTED_MODULE_2__.StyledCell, _extends({
|
28990
|
+
role: "cell"
|
28991
|
+
}, footerProps, {
|
28992
|
+
className: className
|
28976
28993
|
}), column.render('Footer'));
|
28977
28994
|
};
|
28978
28995
|
FooterCell.displayName = 'FooterCell';
|