ag-common 0.0.607 → 0.0.609

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.
@@ -8,7 +8,7 @@ function redactString(str) {
8
8
  ret = ret.replace(/(\b)grant_type.+?(\b)/gm, repl);
9
9
  ret = ret.replace(/(\b)Bearer .+?(\b)/gm, repl);
10
10
  //jwt (base64 with .s)
11
- ret = ret.replace(/(eyJ[\w-]*\.[\w-]*\.[\w-]*)/gim, '<redacted>');
11
+ ret = ret.replace(/(eyJ[\w-_.]*\.[\w-_.]*\.[\w-_.]*)/gim, '<redacted>');
12
12
  return ret;
13
13
  }
14
14
  exports.redactString = redactString;
@@ -72,23 +72,23 @@ const TextEditStyled = (0, styled_1.default)(TextEdit_1.TextEdit) `
72
72
  background-color: white;
73
73
  `;
74
74
  const SearchBox = (p) => {
75
- var _a, _b;
76
- const ref = (0, react_1.useRef)((_b = (_a = p.textBoxRef) === null || _a === void 0 ? void 0 : _a.current) !== null && _b !== void 0 ? _b : null);
77
75
  (0, react_1.useEffect)(() => {
78
- if (!ref.current || ref.current.getValue() === p.searchText) {
76
+ var _a, _b, _c;
77
+ if (!((_a = p.textBoxRef) === null || _a === void 0 ? void 0 : _a.current) ||
78
+ ((_b = p.textBoxRef) === null || _b === void 0 ? void 0 : _b.current.getValue()) === p.searchText) {
79
79
  return;
80
80
  }
81
- ref.current.setValue(p.searchText);
81
+ (_c = p.textBoxRef) === null || _c === void 0 ? void 0 : _c.current.setValue(p.searchText);
82
82
  p.setSearchText(p.searchText, true);
83
83
  }, [p]);
84
84
  return (react_1.default.createElement(Base, Object.assign({ "data-type": "search", className: p.className }, (0, dom_1.filterDataProps)(p)),
85
- react_1.default.createElement(TextEditStyled, { ref: ref, placeholder: p.placeholderText, defaultEditing: { focus: true }, singleLine: true, leftContent: react_1.default.createElement(MagnifyIcon, { onClick: () => { var _a; return p.setSearchText(((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.getValue()) || '', true); } },
85
+ react_1.default.createElement(TextEditStyled, { ref: p.textBoxRef, placeholder: p.placeholderText, defaultEditing: { focus: true }, singleLine: true, leftContent: react_1.default.createElement(MagnifyIcon, { onClick: () => { var _a, _b; return p.setSearchText(((_b = (_a = p.textBoxRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.getValue()) || '', true); } },
86
86
  react_1.default.createElement(icons_1.Magnify, null)), allowUndo: false, onClickOutsideWithNoValue: null, onSubmit: (v, enterPressed) => (0, debounce_1.debounce)(() => {
87
87
  p.setSearchText(v, enterPressed);
88
88
  }, { key: 'pagesearch', time: 200 }), defaultValue: p.defaultValue }),
89
89
  p.searchText && (react_1.default.createElement(CrossIconStyled, { onClick: () => {
90
- var _a;
91
- (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.setValue('');
90
+ var _a, _b;
91
+ (_b = (_a = p.textBoxRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.setValue('');
92
92
  p.setSearchText('', true);
93
93
  } }))));
94
94
  };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.607",
2
+ "version": "0.0.609",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",