scorer-ui-kit 1.7.23 → 1.7.25

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.
@@ -46,6 +46,7 @@ export interface ICustomDrawer {
46
46
  status?: IStatusDot;
47
47
  counter?: number;
48
48
  width?: string;
49
+ maxCounter?: number;
49
50
  }
50
51
  export interface IUserDrawerFooter {
51
52
  icon?: string;
@@ -4,6 +4,7 @@ interface IStatusIcon {
4
4
  icon: string;
5
5
  status?: IStatusDot;
6
6
  counter?: number;
7
+ maxCounter?: number;
7
8
  }
8
9
  declare const StatusIcon: React.FC<IStatusIcon>;
9
10
  export default StatusIcon;
@@ -7,13 +7,15 @@ interface LineUIProps {
7
7
  w: number;
8
8
  }) => void;
9
9
  onLineMoveEnd?: () => void;
10
- onLineClick?: () => void;
10
+ onLineClick?: (lineSetId: number) => void;
11
11
  onLoaded?: (metadata: {
12
12
  height: number;
13
13
  width: number;
14
14
  }) => void;
15
15
  options?: LineUIOptions;
16
16
  videoOptions?: LineUIVideoOptions;
17
+ lineClickSensingBorder?: string;
18
+ hasClickSensingBorder?: boolean;
17
19
  }
18
20
  declare const LineUI: React.FC<LineUIProps>;
19
21
  export default LineUI;
package/dist/index.js CHANGED
@@ -5470,15 +5470,18 @@ var TopLine$1 = styled__default.div(_templateObject2$A || (_templateObject2$A =
5470
5470
  });
5471
5471
  var InnerBox = styled__default.div(_templateObject3$v || (_templateObject3$v = _taggedTemplateLiteralLoose(["\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n box-shadow: 0 4px 9px 0 hsla(204, 22%, 67%, 0.07);\n border-right: solid 1px hsl(207, 16%, 86%);\n border-bottom: solid 1px hsl(207, 16%, 86%);\n border-left: solid 1px hsl(207, 16%, 86%);\n background-color: hsl(200, 23%, 97%);\n"])));
5472
5472
  var StyledFilterOption = styled__default(FilterOption)(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n letter-spacing: 0.2px;\n"])));
5473
- var OptionList = styled__default.div(_templateObject5$m || (_templateObject5$m = _taggedTemplateLiteralLoose(["\n max-height: 162px;\n min-height: 40px;\n position: relative;\n overflow-y: scroll;\n ::-webkit-scrollbar { /* Hide scrollbar for Chrome, Safari and Opera */\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n\n ", " {\n height: 35px;\n padding-left: 10px;\n }\n"])), StyledFilterOption);
5473
+ var OptionList = styled__default.div(_templateObject5$m || (_templateObject5$m = _taggedTemplateLiteralLoose(["\n max-height: ", ";\n min-height: 40px;\n position: relative;\n overflow-y: auto;\n margin-right: 2px;\n \n /* Firefox supports the scrollbar-width property */\n scrollbar-width: thin;\n\n /* Customize the scrollbar width for Chrome and Safari */\n ::-webkit-scrollbar {\n width: 2px;\n }\n\n ::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background: #44444499;\n }\n\n ", " {\n height: 35px;\n padding-left: 10px;\n }\n"])), function (_ref2) {
5474
+ var moreItem = _ref2.moreItem;
5475
+ return moreItem ? '168px' : '175px';
5476
+ }, StyledFilterOption);
5474
5477
  var ResultsContainer = styled__default.div(_templateObject6$k || (_templateObject6$k = _taggedTemplateLiteralLoose(["\n border-top: 1px solid hsl(0, 0%, 91%);\n padding-bottom: 8px;\n"])));
5475
- var ResultCounter = styled__default.div(_templateObject7$j || (_templateObject7$j = _taggedTemplateLiteralLoose(["\n opacity: 0.75;\n font-family: ", ";\n color: hsl(0, 0%, 55%);\n font-size: 12px;\n font-style: italic;\n font-weight: 300;\n display: flex;\n align-items: center;\n justify-content: left;\n padding-left: 9px;\n height: 30px;\n margin-bottom: 6px;\n border-bottom: 1px solid hsl(0, 0%, 91%);\n"])), function (_ref2) {
5476
- var theme = _ref2.theme;
5478
+ var ResultCounter = styled__default.div(_templateObject7$j || (_templateObject7$j = _taggedTemplateLiteralLoose(["\n opacity: 0.75;\n font-family: ", ";\n color: hsl(0, 0%, 55%);\n font-size: 12px;\n font-style: italic;\n font-weight: 300;\n display: flex;\n align-items: center;\n justify-content: left;\n padding-left: 9px;\n height: 30px;\n margin-bottom: 6px;\n border-bottom: 1px solid hsl(0, 0%, 91%);\n"])), function (_ref3) {
5479
+ var theme = _ref3.theme;
5477
5480
  return theme.fontFamily.data;
5478
5481
  });
5479
5482
  var SearchWrapper = styled__default.div(_templateObject8$h || (_templateObject8$h = _taggedTemplateLiteralLoose(["\n height: 41px;\n display: flex;\n align-items: center;\n"])));
5480
5483
  var EmptyResultText = styled__default.div(_templateObject9$g || (_templateObject9$g = _taggedTemplateLiteralLoose(["\n display: block;\n color: hsl(0, 0%, 56%);\n margin-left: 12px;\n user-select: none;\n pointer-events: none;\n height: 35px;\n display: flex;\n align-items: center;\n font-size: 12px;\n"])));
5481
- var Gradient = styled__default.div(_templateObject10$d || (_templateObject10$d = _taggedTemplateLiteralLoose(["\n position: absolute;\n right: 0px;\n bottom: 9px;\n height: 25px;\n background-image: linear-gradient(to bottom, rgba(246, 247, 249, 0) 1%, #F6F7F9 120%);\n width: 100%;\n"])));
5484
+ var Gradient = styled__default.div(_templateObject10$d || (_templateObject10$d = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 1px;\n height: 15px;\n background-image: linear-gradient(to bottom, transparent, #e5e5e5);\n width: 99%;\n left: 50%;\n transform: translateX(-50%);\n pointer-events: none;\n"])));
5482
5485
 
5483
5486
  var isValueSelected = function isValueSelected(item, selected) {
5484
5487
  var isItemSelected = false;
@@ -5604,29 +5607,29 @@ var getResultText = function getResultText(template, visible, total) {
5604
5607
  return newMessage.replace('[VISIBLE]', "" + visible);
5605
5608
  };
5606
5609
 
5607
- var FilterDropdown = function FilterDropdown(_ref3) {
5608
- var buttonIcon = _ref3.buttonIcon,
5609
- buttonText = _ref3.buttonText,
5610
- list = _ref3.list,
5611
- _ref3$selected = _ref3.selected,
5612
- selected = _ref3$selected === void 0 ? null : _ref3$selected,
5613
- _ref3$disabled = _ref3.disabled,
5614
- disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
5615
- _ref3$isLoading = _ref3.isLoading,
5616
- isLoading = _ref3$isLoading === void 0 ? false : _ref3$isLoading,
5617
- loadingText = _ref3.loadingText,
5618
- _ref3$optionType = _ref3.optionType,
5619
- optionType = _ref3$optionType === void 0 ? 'text' : _ref3$optionType,
5620
- hasOptionsFilter = _ref3.hasOptionsFilter,
5621
- searchPlaceholder = _ref3.searchPlaceholder,
5622
- _ref3$maxDisplayedIte = _ref3.maxDisplayedItems,
5623
- maxDisplayedItems = _ref3$maxDisplayedIte === void 0 ? 5 : _ref3$maxDisplayedIte,
5624
- _ref3$searchResultTex = _ref3.searchResultText,
5625
- searchResultText = _ref3$searchResultTex === void 0 ? 'Showing [VISIBLE] of [TOTAL]' : _ref3$searchResultTex,
5626
- emptyResultText = _ref3.emptyResultText,
5627
- _ref3$onSelect = _ref3.onSelect,
5628
- onSelect = _ref3$onSelect === void 0 ? function () {} : _ref3$onSelect,
5629
- props = _objectWithoutPropertiesLoose(_ref3, _excluded$o);
5610
+ var FilterDropdown = function FilterDropdown(_ref4) {
5611
+ var buttonIcon = _ref4.buttonIcon,
5612
+ buttonText = _ref4.buttonText,
5613
+ list = _ref4.list,
5614
+ _ref4$selected = _ref4.selected,
5615
+ selected = _ref4$selected === void 0 ? null : _ref4$selected,
5616
+ _ref4$disabled = _ref4.disabled,
5617
+ disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
5618
+ _ref4$isLoading = _ref4.isLoading,
5619
+ isLoading = _ref4$isLoading === void 0 ? false : _ref4$isLoading,
5620
+ loadingText = _ref4.loadingText,
5621
+ _ref4$optionType = _ref4.optionType,
5622
+ optionType = _ref4$optionType === void 0 ? 'text' : _ref4$optionType,
5623
+ hasOptionsFilter = _ref4.hasOptionsFilter,
5624
+ searchPlaceholder = _ref4.searchPlaceholder,
5625
+ _ref4$maxDisplayedIte = _ref4.maxDisplayedItems,
5626
+ maxDisplayedItems = _ref4$maxDisplayedIte === void 0 ? 5 : _ref4$maxDisplayedIte,
5627
+ _ref4$searchResultTex = _ref4.searchResultText,
5628
+ searchResultText = _ref4$searchResultTex === void 0 ? 'Showing [VISIBLE] of [TOTAL]' : _ref4$searchResultTex,
5629
+ emptyResultText = _ref4.emptyResultText,
5630
+ _ref4$onSelect = _ref4.onSelect,
5631
+ onSelect = _ref4$onSelect === void 0 ? function () {} : _ref4$onSelect,
5632
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded$o);
5630
5633
 
5631
5634
  var _useState = React.useState(selectedOrderList(list, maxDisplayedItems, selected)),
5632
5635
  visibleList = _useState[0],
@@ -5691,7 +5694,9 @@ var FilterDropdown = function FilterDropdown(_ref3) {
5691
5694
  noBackground: true
5692
5695
  })), isLoading || !list ? React__default.createElement(LoadingBox, Object.assign({}, {
5693
5696
  loadingText: loadingText
5694
- })) : React__default.createElement(ResultsContainer, null, hasOptionsFilter && React__default.createElement(ResultCounter, null, getResultText(searchResultText, visibleList.length, list.length)), React__default.createElement(OptionList, null, visibleList.length > 0 ? visibleList.map(function (item, index) {
5697
+ })) : React__default.createElement(ResultsContainer, null, hasOptionsFilter && React__default.createElement(ResultCounter, null, getResultText(searchResultText, visibleList.length, list.length)), React__default.createElement(OptionList, {
5698
+ moreItem: list.length > 5
5699
+ }, visibleList.length > 0 ? visibleList.map(function (item, index) {
5695
5700
  var value = item.value;
5696
5701
  var text = item.text;
5697
5702
  return React__default.createElement(StyledFilterOption, Object.assign({
@@ -6784,7 +6789,7 @@ var FilterBar = function FilterBar(_ref5) {
6784
6789
 
6785
6790
  var _templateObject$I, _templateObject2$G, _templateObject3$B, _templateObject4$v, _templateObject5$r;
6786
6791
  var Container$v = styled__default.div(_templateObject$I || (_templateObject$I = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-block;\n"])));
6787
- var StatusCounter = styled__default.div(_templateObject2$G || (_templateObject2$G = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 14px;;\n top: -12px;\n border-radius: 50%;\n height: 14px;\n min-width: 14px;\n padding: 2px;\n font-size: 10px;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n ", "\n background-color: ", ";\n"])), function (_ref) {
6792
+ var StatusCounter = styled__default.div(_templateObject2$G || (_templateObject2$G = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 14px;;\n top: -12px;\n border-radius: 4px;\n height: 14px;\n min-width: 14px;\n padding: 2px;\n font-size: 10px;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n ", "\n background-color: ", ";\n"])), function (_ref) {
6788
6793
  var animation = _ref.theme.animation;
6789
6794
  return styled.css(_templateObject3$B || (_templateObject3$B = _taggedTemplateLiteralLoose(["\n transition: background-color ", " ", ";\n "])), animation.speed.slow, animation.easing.primary.easeInOut);
6790
6795
  }, function (_ref2) {
@@ -6804,12 +6809,14 @@ var StatusDot = styled__default.div(_templateObject4$v || (_templateObject4$v =
6804
6809
  var StatusIcon = function StatusIcon(_ref5) {
6805
6810
  var icon = _ref5.icon,
6806
6811
  status = _ref5.status,
6807
- counter = _ref5.counter;
6812
+ counter = _ref5.counter,
6813
+ _ref5$maxCounter = _ref5.maxCounter,
6814
+ maxCounter = _ref5$maxCounter === void 0 ? 999 : _ref5$maxCounter;
6808
6815
  return React__default.createElement(Container$v, null, status && counter === undefined ? React__default.createElement(StatusDot, {
6809
6816
  color: status
6810
6817
  }) : counter === undefined ? null : React__default.createElement(StatusCounter, {
6811
6818
  color: status
6812
- }, counter), React__default.createElement(Icon, {
6819
+ }, counter > maxCounter ? maxCounter + "+" : counter), React__default.createElement(Icon, {
6813
6820
  icon: icon,
6814
6821
  size: 18,
6815
6822
  color: 'dimmed'
@@ -8438,6 +8445,10 @@ var LineUI$1 = function LineUI(_ref) {
8438
8445
  onLineClick = _ref$onLineClick === void 0 ? function () {} : _ref$onLineClick,
8439
8446
  _ref$onLoaded = _ref.onLoaded,
8440
8447
  onLoaded = _ref$onLoaded === void 0 ? function () {} : _ref$onLoaded,
8448
+ _ref$lineClickSensing = _ref.lineClickSensingBorder,
8449
+ lineClickSensingBorder = _ref$lineClickSensing === void 0 ? '65' : _ref$lineClickSensing,
8450
+ _ref$hasClickSensingB = _ref.hasClickSensingBorder,
8451
+ hasClickSensingBorder = _ref$hasClickSensingB === void 0 ? true : _ref$hasClickSensingB,
8441
8452
  videoOptions = _ref.videoOptions,
8442
8453
  _ref$options = _ref.options;
8443
8454
  _ref$options = _ref$options === void 0 ? {} : _ref$options;
@@ -8615,6 +8626,8 @@ var LineUI$1 = function LineUI(_ref) {
8615
8626
  }, state.map(function (lineSet, index) {
8616
8627
  return React__default.createElement(LineSet, {
8617
8628
  key: index,
8629
+ hasClickSensingBorder: hasClickSensingBorder,
8630
+ lineClickSensingBorder: lineClickSensingBorder,
8618
8631
  onLineMoveEnd: onLineMoveEnd,
8619
8632
  onLineClick: onLineClick,
8620
8633
  lineSetId: index,