widenarrow-ui 1.0.50 → 1.0.51

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.
@@ -14,9 +14,7 @@ export interface PaginationProps {
14
14
  previousPageTitle?: string;
15
15
  firstPageTitle?: string;
16
16
  lastPageTitle?: string;
17
- pageSizeTitleCallback?: (args: {
18
- pageSize: number;
19
- }) => string;
17
+ pageSizeTitle?: string;
20
18
  tableIntervalTitleCallback?: (args: {
21
19
  start: number;
22
20
  end: number;
package/lib/index.d.ts CHANGED
@@ -519,9 +519,7 @@ interface PaginationProps {
519
519
  previousPageTitle?: string;
520
520
  firstPageTitle?: string;
521
521
  lastPageTitle?: string;
522
- pageSizeTitleCallback?: (args: {
523
- pageSize: number;
524
- }) => string;
522
+ pageSizeTitle?: string;
525
523
  tableIntervalTitleCallback?: (args: {
526
524
  start: number;
527
525
  end: number;
package/lib/index.esm.js CHANGED
@@ -2001,15 +2001,17 @@ var s$n = classNames.bind(styles$n);
2001
2001
  */
2002
2002
  var mergeClassNames = function (_a) {
2003
2003
  var _b;
2004
- var mainClassName = _a.mainClassName, withEllipsis = _a.withEllipsis, className = _a.className, textAlign = _a.textAlign, marginX = _a.marginX, marginTop = _a.marginTop, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, marginRight = _a.marginRight, paddingX = _a.paddingX, paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, withNoWordBreak = _a.withNoWordBreak, withWordBreak = _a.withWordBreak, withAnimation = _a.withAnimation, withBorderBottom = _a.withBorderBottom, color = _a.color, disabled = _a.disabled, fontWeight = _a.fontWeight, fontSize = _a.fontSize, fontStyle = _a.fontStyle, meta = _a.meta, error = _a.error;
2004
+ var mainClassName = _a.mainClassName, withEllipsis = _a.withEllipsis, className = _a.className, textAlign = _a.textAlign, margin = _a.margin, marginX = _a.marginX, marginTop = _a.marginTop, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, marginRight = _a.marginRight, padding = _a.padding, paddingX = _a.paddingX, paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, withNoWordBreak = _a.withNoWordBreak, withWordBreak = _a.withWordBreak, withAnimation = _a.withAnimation, withBorderBottom = _a.withBorderBottom, color = _a.color, disabled = _a.disabled, fontWeight = _a.fontWeight, fontSize = _a.fontSize, fontStyle = _a.fontStyle, meta = _a.meta, error = _a.error;
2005
2005
  return s$n((_b = {},
2006
2006
  _b[mainClassName] = mainClassName,
2007
2007
  _b[className] = className,
2008
+ _b["margin_".concat(margin)] = is(String, margin),
2008
2009
  _b["marginX_".concat(marginX)] = is(String, marginX),
2009
2010
  _b["marginTop_".concat(marginTop)] = is(String, marginTop),
2010
2011
  _b["marginBottom_".concat(marginBottom)] = is(String, marginBottom),
2011
2012
  _b["marginRight_".concat(marginRight)] = is(String, marginRight),
2012
2013
  _b["marginLeft_".concat(marginLeft)] = is(String, marginLeft),
2014
+ _b["padding_".concat(padding)] = is(String, padding),
2013
2015
  _b["paddingX_".concat(paddingX)] = is(String, paddingX),
2014
2016
  _b["paddingTop_".concat(paddingTop)] = is(String, paddingTop),
2015
2017
  _b["paddingBottom_".concat(paddingBottom)] = is(String, paddingBottom),
@@ -2608,7 +2610,7 @@ var styles$b = {"body":"Pagination-module_WRLv5h","container":"Pagination-module
2608
2610
  var s$b = classNames.bind(styles$b);
2609
2611
  var Pagination = function (_a) {
2610
2612
  var _b;
2611
- var className = _a.className, pagination = _a.pagination, slim = _a.slim, onChange = _a.onChange, _c = _a.buttonType, buttonType = _c === void 0 ? HierarchyTypes.SECONDARY : _c, _d = _a.pageSizeOptions, pageSizeOptions = _d === void 0 ? [10, 20, 30, 40, 50, 80, 100] : _d, firstPageTitle = _a.firstPageTitle, previousPageTitle = _a.previousPageTitle, nextPageTitle = _a.nextPageTitle, lastPageTitle = _a.lastPageTitle, pageSizeTitleCallback = _a.pageSizeTitleCallback, tableIntervalTitleCallback = _a.tableIntervalTitleCallback, withTablePagination = _a.withTablePagination, withFastForwardButtons = _a.withFastForwardButtons, withPageSizeChange = _a.withPageSizeChange;
2613
+ var className = _a.className, pagination = _a.pagination, slim = _a.slim, onChange = _a.onChange, _c = _a.buttonType, buttonType = _c === void 0 ? HierarchyTypes.SECONDARY : _c, _d = _a.pageSizeOptions, pageSizeOptions = _d === void 0 ? [10, 20, 30, 40, 50, 80, 100] : _d, firstPageTitle = _a.firstPageTitle, previousPageTitle = _a.previousPageTitle, nextPageTitle = _a.nextPageTitle, lastPageTitle = _a.lastPageTitle, pageSizeTitle = _a.pageSizeTitle, tableIntervalTitleCallback = _a.tableIntervalTitleCallback, withTablePagination = _a.withTablePagination, withFastForwardButtons = _a.withFastForwardButtons, withPageSizeChange = _a.withPageSizeChange;
2612
2614
  if (!pagination) {
2613
2615
  return null;
2614
2616
  }
@@ -2663,10 +2665,10 @@ var Pagination = function (_a) {
2663
2665
  }, children: pageObject.page }) }, "".concat(pageObject.type, "-").concat(index)));
2664
2666
  }), nextPageButton, lastPageButton] }));
2665
2667
  };
2666
- var sizeTitle = pageSizeTitleCallback ? pageSizeTitleCallback({ pageSize: pagination.pageSize }) : "Page size: ".concat(pagination.pageSize);
2668
+ var sizeTitle = pageSizeTitle ? pageSizeTitle : "Page size: ".concat(pagination.pageSize);
2667
2669
  var pageSizeMarkup = function () {
2668
2670
  return withPageSizeChange ? (jsxs(Fragment, { children: [jsx(Separator, { marginX: '15' }), jsx(DropDown, { buttonComponent: jsx(InlineButton, { type: buttonType, text: sizeTitle }), title: sizeTitle, children: pageSizeOptions
2669
- .filter(function (pageSize) { return pageSize < pagination.numberOfHits; })
2671
+ // .filter((pageSize) => pageSize < pagination.numberOfHits)
2670
2672
  .map(function (pageSize) { return (jsx(DropDownItem, { text: pageSize.toString(), onClickCallback: function () { return onChange(__assign(__assign({}, pagination), { pageSize: pageSize })); }, active: pagination.pageSize === pageSize, closeDropDownOnClick: true, withEllipsis: true })); }) })] })) : null;
2671
2673
  };
2672
2674
  return (jsxs(Box, { alignItems: 'center', children: [paginationMarkup(), pageSizeMarkup()] }));