tenjin-ui-kit 0.3.67 → 0.3.70

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.
Files changed (140) hide show
  1. package/.dockerignore +6 -0
  2. package/.storybook/main.js +16 -0
  3. package/.storybook/preview.js +11 -0
  4. package/Dockerfile +17 -0
  5. package/Jenkinsfile +66 -0
  6. package/build/asset-manifest.json +16 -0
  7. package/build/favicon.ico +0 -0
  8. package/build/index.html +1 -0
  9. package/build/logo192.png +0 -0
  10. package/build/logo512.png +0 -0
  11. package/build/manifest.json +25 -0
  12. package/build/robots.txt +3 -0
  13. package/build/static/css/main.522396f6.css +2 -0
  14. package/build/static/css/main.522396f6.css.map +1 -0
  15. package/build/static/js/787.18cf14d0.chunk.js +2 -0
  16. package/build/static/js/787.18cf14d0.chunk.js.map +1 -0
  17. package/build/static/js/main.d71fecac.js +3 -0
  18. package/build/static/js/main.d71fecac.js.LICENSE.txt +50 -0
  19. package/build/static/js/main.d71fecac.js.map +1 -0
  20. package/build/static/media/logo.6ce24c58023cc2f8fd88fe9d219db6c6.svg +1 -0
  21. package/build/tenjinLogo.png +0 -0
  22. package/{components → dist/components}/button/index.js +8 -3
  23. package/{components → dist/components}/filter/ValueSelector.js +60 -5
  24. package/{components → dist/components}/filter/index.js +6 -4
  25. package/package.json +3 -2
  26. package/public/favicon.ico +0 -0
  27. package/public/index.html +43 -0
  28. package/public/logo192.png +0 -0
  29. package/public/logo512.png +0 -0
  30. package/public/manifest.json +25 -0
  31. package/public/robots.txt +3 -0
  32. package/public/tenjinLogo.png +0 -0
  33. /package/{assets → dist/assets}/images/MicrosoftTeams-image (1).png +0 -0
  34. /package/{assets → dist/assets}/images/tenjin-4.0-logo.png +0 -0
  35. /package/{common → dist/common}/hooks/apiHooks.js +0 -0
  36. /package/{common → dist/common}/hooks/newApiHook.js +0 -0
  37. /package/{common → dist/common}/utils/security/index.js +0 -0
  38. /package/{common → dist/common}/utils/security/securityConfig.js +0 -0
  39. /package/{components → dist/components}/Canvas.js +0 -0
  40. /package/{components → dist/components}/DragBox/index.js +0 -0
  41. /package/{components → dist/components}/InputWithChip/index.js +0 -0
  42. /package/{components → dist/components}/RightContext/index.css +0 -0
  43. /package/{components → dist/components}/RightContext/index.js +0 -0
  44. /package/{components → dist/components}/WorkFlow.js +0 -0
  45. /package/{components → dist/components}/WorkFlowBuilder.js +0 -0
  46. /package/{components → dist/components}/alert/Style.js +0 -0
  47. /package/{components → dist/components}/alert/index.js +0 -0
  48. /package/{components → dist/components}/attachment/index.js +0 -0
  49. /package/{components → dist/components}/authenticationProvider/AuthError.js +0 -0
  50. /package/{components → dist/components}/authenticationProvider/AuthLoader.js +0 -0
  51. /package/{components → dist/components}/authenticationProvider/index.js +0 -0
  52. /package/{components → dist/components}/avatar/index.js +0 -0
  53. /package/{components → dist/components}/avatar/styles.js +0 -0
  54. /package/{components → dist/components}/breadCrumbs/index.js +0 -0
  55. /package/{components → dist/components}/breadCrumbs/style.js +0 -0
  56. /package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +0 -0
  57. /package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +0 -0
  58. /package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +0 -0
  59. /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +0 -0
  60. /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +0 -0
  61. /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +0 -0
  62. /package/{components → dist/components}/browsingTestCaseLayout/index.js +0 -0
  63. /package/{components → dist/components}/browsingTestCaseLayout/style.css +0 -0
  64. /package/{components → dist/components}/chatBotModal/index.js +0 -0
  65. /package/{components → dist/components}/checkBox/index.js +0 -0
  66. /package/{components → dist/components}/combobox/index.js +0 -0
  67. /package/{components → dist/components}/divider/index.js +0 -0
  68. /package/{components → dist/components}/editableField/index.js +0 -0
  69. /package/{components → dist/components}/error/index.js +0 -0
  70. /package/{components → dist/components}/errorBoundary/Error.jpg +0 -0
  71. /package/{components → dist/components}/errorBoundary/index.js +0 -0
  72. /package/{components → dist/components}/fileUploader/index.js +0 -0
  73. /package/{components → dist/components}/fileUploader/style.js +0 -0
  74. /package/{components → dist/components}/iconButton/index.js +0 -0
  75. /package/{components → dist/components}/iconButton/style.js +0 -0
  76. /package/{components → dist/components}/input/index.js +0 -0
  77. /package/{components → dist/components}/layout/index.js +0 -0
  78. /package/{components → dist/components}/layout/main/index.js +0 -0
  79. /package/{components → dist/components}/layout/main/style.js +0 -0
  80. /package/{components → dist/components}/layout/pageContent/index.js +0 -0
  81. /package/{components → dist/components}/layout/sidebar/FlatMenu.js +0 -0
  82. /package/{components → dist/components}/layout/sidebar/GroupedIconMenu.js +0 -0
  83. /package/{components → dist/components}/layout/sidebar/GroupedMenu.js +0 -0
  84. /package/{components → dist/components}/layout/sidebar/ProjectMenu.js +0 -0
  85. /package/{components → dist/components}/layout/sidebar/index.js +0 -0
  86. /package/{components → dist/components}/layout/sidebar/style.js +0 -0
  87. /package/{components → dist/components}/layout/topBar/ProjectTopbar.js +0 -0
  88. /package/{components → dist/components}/layout/topBar/UserAvatar.js +0 -0
  89. /package/{components → dist/components}/layout/topBar/index.js +0 -0
  90. /package/{components → dist/components}/loader/index.js +0 -0
  91. /package/{components → dist/components}/menu/index.js +0 -0
  92. /package/{components → dist/components}/modal/Modal.js +0 -0
  93. /package/{components → dist/components}/modal/index.js +0 -0
  94. /package/{components → dist/components}/modal/style.js +0 -0
  95. /package/{components → dist/components}/optionMenu/index.js +0 -0
  96. /package/{components → dist/components}/pagination/index.js +0 -0
  97. /package/{components → dist/components}/pagination/style.js +0 -0
  98. /package/{components → dist/components}/paginationUpdated/index.js +0 -0
  99. /package/{components → dist/components}/paper/index.js +0 -0
  100. /package/{components → dist/components}/paper/style.js +0 -0
  101. /package/{components → dist/components}/reactSelect/index.js +0 -0
  102. /package/{components → dist/components}/reactSelect/style.js +0 -0
  103. /package/{components → dist/components}/richTextEditor/index.js +0 -0
  104. /package/{components → dist/components}/richTextEditor/style.js +0 -0
  105. /package/{components → dist/components}/select/GroupedSelect.js +0 -0
  106. /package/{components → dist/components}/select/SimpleSelect.js +0 -0
  107. /package/{components → dist/components}/select/index.js +0 -0
  108. /package/{components → dist/components}/simpleSelect/index.js +0 -0
  109. /package/{components → dist/components}/sort/index.js +0 -0
  110. /package/{components → dist/components}/switch/index.js +0 -0
  111. /package/{components → dist/components}/switch/style.js +0 -0
  112. /package/{components → dist/components}/switch/switch.js +0 -0
  113. /package/{components → dist/components}/table/ReactTable.js +0 -0
  114. /package/{components → dist/components}/table/SimpleTable.js +0 -0
  115. /package/{components → dist/components}/table/index.js +0 -0
  116. /package/{components → dist/components}/text/index.js +0 -0
  117. /package/{components → dist/components}/timeStamp/index.js +0 -0
  118. /package/{components → dist/components}/timeStamp/style.js +0 -0
  119. /package/{components → dist/components}/topBar/index.js +0 -0
  120. /package/{components → dist/components}/tree/index.js +0 -0
  121. /package/{components → dist/components}/tree/style.js +0 -0
  122. /package/{components → dist/components}/valuePicker/ValueSelector.js +0 -0
  123. /package/{components → dist/components}/valuePicker/index.js +0 -0
  124. /package/{components → dist/components}/wrapperLayout/layout/index.js +0 -0
  125. /package/{components → dist/components}/wrapperLayout/layout/style.js +0 -0
  126. /package/{components → dist/components}/wrapperLayout/main/index.js +0 -0
  127. /package/{components → dist/components}/wrapperLayout/main/pageContainer/index.js +0 -0
  128. /package/{components → dist/components}/wrapperLayout/main/sideBar/index.js +0 -0
  129. /package/{components → dist/components}/wrapperLayout/main/sideBar/style.js +0 -0
  130. /package/{components → dist/components}/wrapperLayout/topBar/UserAvatar.js +0 -0
  131. /package/{components → dist/components}/wrapperLayout/topBar/avatar.js +0 -0
  132. /package/{components → dist/components}/wrapperLayout/topBar/index.js +0 -0
  133. /package/{components → dist/components}/wrapperLayout/topBar/menuIcon.js +0 -0
  134. /package/{components → dist/components}/wrapperLayout/topBar/style.js +0 -0
  135. /package/{http → dist/http}/index.js +0 -0
  136. /package/{index.js → dist/index.js} +0 -0
  137. /package/{templates → dist/templates}/listPage/index.js +0 -0
  138. /package/{themes → dist/themes}/default.js +0 -0
  139. /package/{themes → dist/themes}/defaultSmall.js +0 -0
  140. /package/{themes → dist/themes}/responsiveTheme.js +0 -0
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
Binary file
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ 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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -7,10 +8,12 @@ exports.default = exports.ButtonLoader = void 0;
7
8
  var _material = require("@mui/material");
8
9
  var _styles = require("@mui/material/styles");
9
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
- var _react = _interopRequireDefault(require("react"));
11
+ var _react = _interopRequireWildcard(require("react"));
11
12
  var _Menu = _interopRequireDefault(require("@mui/material/Menu"));
12
13
  var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
13
14
  var _excluded = ["loading"];
15
+ 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); }
16
+ 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; }
14
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
18
  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); }
16
19
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -21,7 +24,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
21
24
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
25
  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; }
23
26
  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; }
24
- var Button = function Button(props) {
27
+ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
25
28
  var loading = props.loading,
26
29
  loadingText = props.loadingText,
27
30
  children = props.children,
@@ -64,6 +67,7 @@ var Button = function Button(props) {
64
67
  alignItems: "center"
65
68
  }
66
69
  }, /*#__PURE__*/_react.default.createElement(_material.Button, _extends({
70
+ ref: ref,
67
71
  size: "small",
68
72
  "aria-controls": open ? "basic-menu" : undefined,
69
73
  "aria-haspopup": "true",
@@ -91,6 +95,7 @@ var Button = function Button(props) {
91
95
  key: item.item
92
96
  }, item.item);
93
97
  })))) : /*#__PURE__*/_react.default.createElement(_material.Button, _extends({
98
+ ref: ref,
94
99
  onClick: handleClick
95
100
  }, props, {
96
101
  sx: fixedWidth && {
@@ -103,7 +108,7 @@ var Button = function Button(props) {
103
108
  }), loadingText && {
104
109
  loadingText: loadingText
105
110
  }) : children));
106
- };
111
+ });
107
112
  var ButtonLoader = function ButtonLoader(_ref) {
108
113
  var buttonColor = _ref.buttonColor,
109
114
  size = _ref.size,
@@ -53,7 +53,9 @@ var ValueSelector = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
53
53
  fetchData = _ref.fetchData,
54
54
  showClearItems = _ref.showClearItems,
55
55
  showAvatar = _ref.showAvatar,
56
- setSearch = _ref.setSearch;
56
+ setSearch = _ref.setSearch,
57
+ inputRef = _ref.inputRef,
58
+ searchText = _ref.searchText;
57
59
  var theme = (0, _material.useTheme)();
58
60
  var _useState = (0, _react.useState)(false),
59
61
  _useState2 = _slicedToArray(_useState, 2),
@@ -76,25 +78,59 @@ var ValueSelector = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
76
78
  activeIndex = _useState10[0],
77
79
  setActiveIndex = _useState10[1];
78
80
  var itemRefs = (0, _react.useRef)([]);
81
+ var clearBtnRef = (0, _react.useRef)(null);
82
+ var _useState11 = (0, _react.useState)(false),
83
+ _useState12 = _slicedToArray(_useState11, 2),
84
+ clearFocused = _useState12[0],
85
+ setClearFocused = _useState12[1];
79
86
  (0, _react.useImperativeHandle)(ref, function () {
80
87
  return {
81
88
  handleKeyDown: function handleKeyDown(e) {
89
+ if (e.key === "Tab") {
90
+ e.preventDefault();
91
+ e.stopPropagation();
92
+ if (clearFocused) {
93
+ setClearFocused(false);
94
+ requestAnimationFrame(function () {
95
+ var _inputRef$current;
96
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
97
+ });
98
+ return;
99
+ }
100
+ setClearFocused(true);
101
+ setActiveIndex(-1);
102
+ return;
103
+ }
82
104
  if (!["ArrowDown", "ArrowUp", "Enter"].includes(e.key)) return;
83
105
  if (e.key === "ArrowDown") {
84
106
  e.preventDefault();
107
+ if (clearFocused) {
108
+ setClearFocused(false);
109
+ setActiveIndex(0);
110
+ return;
111
+ }
85
112
  setActiveIndex(function (prev) {
86
113
  if (filteredLocalOptions.length === 0) return -1;
87
114
  return prev < filteredLocalOptions.length - 1 ? prev + 1 : 0;
88
115
  });
89
116
  } else if (e.key === "ArrowUp") {
90
117
  e.preventDefault();
118
+ if (clearFocused) {
119
+ setClearFocused(false);
120
+ setActiveIndex(0);
121
+ return;
122
+ }
91
123
  setActiveIndex(function (prev) {
92
124
  if (filteredLocalOptions.length === 0) return -1;
93
125
  return prev > 0 ? prev - 1 : filteredLocalOptions.length - 1;
94
126
  });
95
127
  } else if (e.key === "Enter") {
128
+ e.preventDefault();
129
+ if (clearFocused) {
130
+ handleClearSelection();
131
+ return;
132
+ }
96
133
  if (activeIndex >= 0 && activeIndex < filteredLocalOptions.length) {
97
- e.preventDefault();
98
134
  handleSelection(filteredLocalOptions[activeIndex]);
99
135
  }
100
136
  }
@@ -221,6 +257,25 @@ var ValueSelector = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
221
257
  setLocalOptions(newOptions);
222
258
  setSearch("");
223
259
  };
260
+ (0, _react.useEffect)(function () {
261
+ var clearFocus = function clearFocus() {
262
+ setClearFocused(false);
263
+ };
264
+ window.addEventListener("mousedown", clearFocus);
265
+ return function () {
266
+ window.removeEventListener("mousedown", clearFocus);
267
+ };
268
+ }, []);
269
+ (0, _react.useEffect)(function () {
270
+ if (searchText) {
271
+ setFilteredLocalOptions(localOptions.filter(function (o) {
272
+ var _o$displayKey;
273
+ return (_o$displayKey = o[displayKey]) === null || _o$displayKey === void 0 ? void 0 : _o$displayKey.toLowerCase().includes(searchText.toLowerCase());
274
+ }));
275
+ } else {
276
+ setFilteredLocalOptions(localOptions);
277
+ }
278
+ }, [localOptions, searchText]);
224
279
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.List, {
225
280
  dense: true,
226
281
  disablePadding: true,
@@ -317,9 +372,9 @@ var ValueSelector = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
317
372
  variant: "text",
318
373
  style: {
319
374
  cursor: "pointer",
320
- justifySelf: "end"
321
-
322
- // paddingTop: "0.5rem",
375
+ justifySelf: "end",
376
+ border: clearFocused ? "2px solid ".concat(theme.palette.primary.main) : "2px solid transparent",
377
+ borderRadius: 4
323
378
  }
324
379
  }, /*#__PURE__*/_react.default.createElement(_material.Box, {
325
380
  sx: {
@@ -75,8 +75,9 @@ var Filter = function Filter(_ref) {
75
75
  filter = _useState8[0],
76
76
  setFilter = _useState8[1];
77
77
  var valueSelectorRef = (0, _react.useRef)(null);
78
+ var inputRef = (0, _react.useRef)(null);
78
79
  var handleKeyDown = function handleKeyDown(e) {
79
- if (["ArrowDown", "ArrowUp", "Enter"].includes(e.key)) {
80
+ if (["ArrowDown", "ArrowUp", "Enter", "Tab"].includes(e.key)) {
80
81
  e.stopPropagation();
81
82
  }
82
83
  if (valueSelectorRef.current) {
@@ -144,6 +145,7 @@ var Filter = function Filter(_ref) {
144
145
  paddingTop: 1.5,
145
146
  paddingBottom: 1.5
146
147
  }, /*#__PURE__*/_react.default.createElement(_material.TextField, {
148
+ inputRef: inputRef,
147
149
  fullWidth: true,
148
150
  autoFocus: true,
149
151
  value: filter,
@@ -196,10 +198,10 @@ var Filter = function Filter(_ref) {
196
198
  height: 10
197
199
  })) : /*#__PURE__*/_react.default.createElement(_ValueSelector.default, {
198
200
  ref: valueSelectorRef,
201
+ inputRef: inputRef,
199
202
  key: JSON.stringify(filter),
200
- options: filter ? options.filter(function (data) {
201
- return "".concat(data.id).concat(data.name).trim().toLowerCase().includes(filter.trim().toLowerCase());
202
- }) : options,
203
+ options: options,
204
+ searchText: filter,
203
205
  defaultSelectedOptionIds: selectedValues ? selectedValues.map(function (s) {
204
206
  return s[valueKey];
205
207
  }) : defaultSelectedOptions.map(function (s) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tenjin-ui-kit",
3
- "version": "0.3.67",
3
+ "version": "0.3.70",
4
4
  "repository": {
5
5
  "url": "git+https://gitlab.com/yethi/react/tenjin-ui-kit.git"
6
6
  },
@@ -107,7 +107,8 @@
107
107
  "react-dom": "^18.2.0",
108
108
  "react-router-dom": "^6.6.1",
109
109
  "rimraf": "^3.0.2",
110
- "webpack": "^5.75.0"
110
+ "webpack": "^5.75.0",
111
+ "@mui/lab": "5.0.0-alpha.116"
111
112
  },
112
113
  "peerDependencies": {
113
114
  "@emotion/react": "^11.10.5",
Binary file
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <meta
9
+ name="description"
10
+ content="Web site created using create-react-app"
11
+ />
12
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
+ <!--
14
+ manifest.json provides metadata used when your web app is installed on a
15
+ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
+ -->
17
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
+ <!--
19
+ Notice the use of %PUBLIC_URL% in the tags above.
20
+ It will be replaced with the URL of the `public` folder during the build.
21
+ Only files inside the `public` folder can be referenced from the HTML.
22
+
23
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
+ work correctly both with client-side routing and a non-root public URL.
25
+ Learn how to configure a non-root public URL by running `npm run build`.
26
+ -->
27
+ <title>React App</title>
28
+ </head>
29
+ <body>
30
+ <noscript>You need to enable JavaScript to run this app.</noscript>
31
+ <div id="root"></div>
32
+ <!--
33
+ This HTML file is a template.
34
+ If you open it directly in the browser, you will see an empty page.
35
+
36
+ You can add webfonts, meta tags, or analytics to this file.
37
+ The build step will place the bundled scripts into the <body> tag.
38
+
39
+ To begin the development, run `npm start` or `yarn start`.
40
+ To create a production bundle, use `npm run build` or `yarn build`.
41
+ -->
42
+ </body>
43
+ </html>
Binary file
Binary file
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
Binary file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes