@pingux/astro 2.136.0 → 2.136.1-alpha.0
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.
@@ -36,7 +36,7 @@ var _table2 = require("@react-stately/table");
|
|
36
36
|
var _ = require("../..");
|
37
37
|
var _hooks = require("../../hooks");
|
38
38
|
var _react2 = require("@emotion/react");
|
39
|
-
var _excluded = ["caption", "selectionMode", "selectionBehavior", "tableBodyProps", "
|
39
|
+
var _excluded = ["caption", "selectionMode", "selectionBehavior", "tableBodyProps", "hasSelectionCheckboxes", "isStickyHeader"],
|
40
40
|
_excluded2 = ["type", "children", "hasCaption", "className", "isSticky"];
|
41
41
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
42
42
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -48,7 +48,7 @@ var TableBase = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
48
48
|
selectionMode = props.selectionMode,
|
49
49
|
selectionBehavior = props.selectionBehavior,
|
50
50
|
tableBodyProps = props.tableBodyProps,
|
51
|
-
|
51
|
+
hasSelectionCheckboxes = props.hasSelectionCheckboxes,
|
52
52
|
_props$isStickyHeader = props.isStickyHeader,
|
53
53
|
isStickyHeader = _props$isStickyHeader === void 0 ? false : _props$isStickyHeader,
|
54
54
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
@@ -57,7 +57,7 @@ var TableBase = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
57
57
|
tableWidth = _useState2[0],
|
58
58
|
setTableWidth = _useState2[1];
|
59
59
|
var state = (0, _table2.useTableState)(_objectSpread(_objectSpread({}, props), {}, {
|
60
|
-
showSelectionCheckboxes:
|
60
|
+
showSelectionCheckboxes: hasSelectionCheckboxes || selectionMode === 'multiple' && selectionBehavior !== 'replace'
|
61
61
|
}));
|
62
62
|
var tableRef = (0, _hooks.useLocalOrForwardRef)(ref);
|
63
63
|
var bodyRef = (0, _react.useRef)(null);
|
@@ -13,7 +13,7 @@ export interface TableBaseProps<T extends object> extends TableProps<T>, Omit<Ba
|
|
13
13
|
'aria-label'?: string;
|
14
14
|
selectionMode?: 'none' | 'single' | 'multiple';
|
15
15
|
selectionBehavior?: 'replace' | 'toggle';
|
16
|
-
|
16
|
+
hasSelectionCheckboxes?: boolean;
|
17
17
|
'data-testid'?: string;
|
18
18
|
caption?: ReactNode | string;
|
19
19
|
tableBodyProps?: Record<string, unknown>;
|
@@ -10,7 +10,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
10
10
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
11
11
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
12
12
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
13
|
-
var _excluded = ["caption", "selectionMode", "selectionBehavior", "tableBodyProps", "
|
13
|
+
var _excluded = ["caption", "selectionMode", "selectionBehavior", "tableBodyProps", "hasSelectionCheckboxes", "isStickyHeader"],
|
14
14
|
_excluded2 = ["type", "children", "hasCaption", "className", "isSticky"];
|
15
15
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
16
16
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
@@ -32,7 +32,7 @@ var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
32
32
|
selectionMode = props.selectionMode,
|
33
33
|
selectionBehavior = props.selectionBehavior,
|
34
34
|
tableBodyProps = props.tableBodyProps,
|
35
|
-
|
35
|
+
hasSelectionCheckboxes = props.hasSelectionCheckboxes,
|
36
36
|
_props$isStickyHeader = props.isStickyHeader,
|
37
37
|
isStickyHeader = _props$isStickyHeader === void 0 ? false : _props$isStickyHeader,
|
38
38
|
others = _objectWithoutProperties(props, _excluded);
|
@@ -41,7 +41,7 @@ var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
41
41
|
tableWidth = _useState2[0],
|
42
42
|
setTableWidth = _useState2[1];
|
43
43
|
var state = useTableState(_objectSpread(_objectSpread({}, props), {}, {
|
44
|
-
showSelectionCheckboxes:
|
44
|
+
showSelectionCheckboxes: hasSelectionCheckboxes || selectionMode === 'multiple' && selectionBehavior !== 'replace'
|
45
45
|
}));
|
46
46
|
var tableRef = useLocalOrForwardRef(ref);
|
47
47
|
var bodyRef = useRef(null);
|