ag-common 0.0.380 → 0.0.382
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.
- package/dist/api/helpers/validations.js +1 -0
- package/dist/ui/components/InfiniteScroll/index.d.ts +15 -0
- package/dist/ui/components/InfiniteScroll/index.js +85 -0
- package/dist/ui/components/Search/Base.d.ts +6 -4
- package/dist/ui/components/Search/Base.js +13 -53
- package/dist/ui/components/Search/SearchBox.d.ts +9 -0
- package/dist/ui/components/Search/SearchBox.js +84 -0
- package/dist/ui/components/Search/index.d.ts +2 -0
- package/dist/ui/components/Search/index.js +2 -0
- package/dist/ui/components/TextEdit/TextEdit.js +12 -3
- package/dist/ui/components/index.d.ts +1 -0
- package/dist/ui/components/index.js +1 -0
- package/dist/ui/icons/Magnify.d.ts +4 -1
- package/dist/ui/icons/Magnify.js +3 -2
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.getAndValidateToken = void 0;
|
|
16
16
|
/* eslint-disable import/no-unresolved */
|
|
17
17
|
const jsonwebtoken_1 = require("jsonwebtoken");
|
|
18
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
18
19
|
const jwks_rsa_1 = __importDefault(require("jwks-rsa"));
|
|
19
20
|
const log_1 = require("../../common/helpers/log");
|
|
20
21
|
const api_1 = require("./api");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IInfiniteScroll {
|
|
3
|
+
children: any[];
|
|
4
|
+
className?: string;
|
|
5
|
+
startIndex?: number;
|
|
6
|
+
onScroll?: (e: {
|
|
7
|
+
scrollTop: number;
|
|
8
|
+
isDown: boolean;
|
|
9
|
+
}) => void;
|
|
10
|
+
/** how many to initially show, and to add per scroll. default 10 */
|
|
11
|
+
incrementNumber?: number;
|
|
12
|
+
/** if true, can only scroll by button press. default false */
|
|
13
|
+
scrollDisabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const InfiniteScroll: (p: IInfiniteScroll) => JSX.Element;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.InfiniteScroll = void 0;
|
|
30
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
|
+
const debounce_1 = require("../../helpers/debounce");
|
|
33
|
+
const dom_1 = require("../../helpers/dom");
|
|
34
|
+
const Base = styled_1.default.div `
|
|
35
|
+
overflow-y: auto;
|
|
36
|
+
height: 100%;
|
|
37
|
+
width: 100%;
|
|
38
|
+
`;
|
|
39
|
+
//if we see this, then we havent shown user enough items - allow click to load more
|
|
40
|
+
const LoadMore = styled_1.default.div `
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
text-decoration: underline;
|
|
43
|
+
`;
|
|
44
|
+
const InfiniteScroll = (p) => {
|
|
45
|
+
var _a;
|
|
46
|
+
const { incrementNumber = 10, scrollDisabled = false } = p;
|
|
47
|
+
const ref = (0, react_1.createRef)();
|
|
48
|
+
const [startIndex] = (0, react_1.useState)((_a = p.startIndex) !== null && _a !== void 0 ? _a : 0);
|
|
49
|
+
const [endIndex, setEndIndex] = (0, react_1.useState)((startIndex !== null && startIndex !== void 0 ? startIndex : 0) + incrementNumber);
|
|
50
|
+
const [startScrollTop, setStartScrollTop] = (0, react_1.useState)(0);
|
|
51
|
+
const handleScrollTop = (e) => {
|
|
52
|
+
const { scrollTop, clientHeight, scrollHeight } = e.currentTarget;
|
|
53
|
+
const hasReachedEnd = scrollTop + clientHeight === scrollHeight;
|
|
54
|
+
if (hasReachedEnd) {
|
|
55
|
+
setEndIndex(endIndex + incrementNumber);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
(0, react_1.useEffect)(() => {
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
60
|
+
setStartScrollTop(ref.current.scrollTop);
|
|
61
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62
|
+
}, []);
|
|
63
|
+
const sliced = p.children.slice(0, endIndex);
|
|
64
|
+
const lastDisplayIndex = Math.min(p.children.length, endIndex);
|
|
65
|
+
return (react_1.default.createElement(Base, Object.assign({ ref: ref, className: p.className, onScroll: (e) => {
|
|
66
|
+
if (scrollDisabled) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const { scrollTop } = e.currentTarget;
|
|
70
|
+
handleScrollTop(e);
|
|
71
|
+
//
|
|
72
|
+
(0, debounce_1.debounce)(() => {
|
|
73
|
+
var _a;
|
|
74
|
+
setStartScrollTop(scrollTop);
|
|
75
|
+
(_a = p === null || p === void 0 ? void 0 : p.onScroll) === null || _a === void 0 ? void 0 : _a.call(p, { scrollTop, isDown: startScrollTop < scrollTop });
|
|
76
|
+
}, {
|
|
77
|
+
key: 'in-scr',
|
|
78
|
+
time: 50,
|
|
79
|
+
});
|
|
80
|
+
} }, (0, dom_1.filterDataProps)(p)),
|
|
81
|
+
sliced,
|
|
82
|
+
`Showing ${lastDisplayIndex} of ${p.children.length} results`,
|
|
83
|
+
lastDisplayIndex < p.children.length && (react_1.default.createElement(LoadMore, { onClick: () => setEndIndex(endIndex + incrementNumber) }, "Load More?"))));
|
|
84
|
+
};
|
|
85
|
+
exports.InfiniteScroll = InfiniteScroll;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ISearchDialog, TSearchModalRes } from './types';
|
|
3
|
-
|
|
4
|
-
onSearchTextChange?: (
|
|
5
|
-
onSelectItem?: (
|
|
6
|
-
}
|
|
3
|
+
type ISearchBase<T> = ISearchDialog<T> & {
|
|
4
|
+
onSearchTextChange?: (v: string) => void;
|
|
5
|
+
onSelectItem?: (v: TSearchModalRes<T>) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const SearchBase: <T>(p: ISearchBase<T>) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -30,38 +30,14 @@ exports.SearchBase = void 0;
|
|
|
30
30
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
const common_1 = require("../../../common");
|
|
33
|
-
const helpers_1 = require("../../helpers");
|
|
34
|
-
const CrossIcon_1 = require("../../icons/CrossIcon");
|
|
35
|
-
const Magnify_1 = require("../../icons/Magnify");
|
|
36
33
|
const styles_1 = require("../../styles");
|
|
37
|
-
const
|
|
34
|
+
const SearchBox_1 = require("./SearchBox");
|
|
38
35
|
const Base = styled_1.default.div `
|
|
39
36
|
display: flex;
|
|
40
37
|
flex-flow: column;
|
|
41
38
|
flex-grow: 1;
|
|
42
39
|
width: 100%;
|
|
43
40
|
`;
|
|
44
|
-
const SearchBox = styled_1.default.div `
|
|
45
|
-
padding: 1rem;
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-flow: row;
|
|
48
|
-
justify-content: center;
|
|
49
|
-
align-items: center;
|
|
50
|
-
width: calc(100% - 2rem);
|
|
51
|
-
margin: auto;
|
|
52
|
-
|
|
53
|
-
@media ${styles_1.smallScreen} {
|
|
54
|
-
margin: 0;
|
|
55
|
-
padding: 0;
|
|
56
|
-
padding-top: 0.5rem;
|
|
57
|
-
width: 100%;
|
|
58
|
-
}
|
|
59
|
-
`;
|
|
60
|
-
const Icon = styled_1.default.div `
|
|
61
|
-
width: 1.5rem;
|
|
62
|
-
height: 1.5rem;
|
|
63
|
-
margin-right: 0.5rem;
|
|
64
|
-
`;
|
|
65
41
|
const Content = styled_1.default.div `
|
|
66
42
|
width: calc(100% - 2rem);
|
|
67
43
|
margin: auto;
|
|
@@ -87,43 +63,27 @@ const Row = styled_1.default.div `
|
|
|
87
63
|
width: 100%;
|
|
88
64
|
cursor: pointer;
|
|
89
65
|
`;
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
right: 2rem;
|
|
95
|
-
}
|
|
96
|
-
`;
|
|
97
|
-
const SearchBase = ({ onSelectItem, onSearchTextChange, placeholderText, renderItem, displayItems, willDisplayItem, getKeyF, className, texts, maxDisplayItems = 20, defaultValue, }) => {
|
|
98
|
-
var _a, _b;
|
|
99
|
-
const [searchText, setSearchText] = (0, react_1.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
|
66
|
+
const SearchBase = (p) => {
|
|
67
|
+
var _a, _b, _c, _d;
|
|
68
|
+
const { maxDisplayItems = 20 } = p;
|
|
69
|
+
const [searchText, setSearchText] = (0, react_1.useState)((_a = p.defaultValue) !== null && _a !== void 0 ? _a : '');
|
|
100
70
|
const resWrap = (foundItem) => {
|
|
71
|
+
var _a, _b;
|
|
101
72
|
if (!foundItem) {
|
|
102
|
-
onSelectItem === null ||
|
|
73
|
+
(_a = p.onSelectItem) === null || _a === void 0 ? void 0 : _a.call(p, undefined);
|
|
103
74
|
}
|
|
104
75
|
else {
|
|
105
|
-
onSelectItem === null ||
|
|
76
|
+
(_b = p.onSelectItem) === null || _b === void 0 ? void 0 : _b.call(p, { foundItem, searchText });
|
|
106
77
|
}
|
|
107
78
|
};
|
|
108
|
-
const filteredItemsRaw = displayItems.filter((i) => willDisplayItem(searchText, i));
|
|
79
|
+
const filteredItemsRaw = p.displayItems.filter((i) => p.willDisplayItem(searchText, i));
|
|
109
80
|
const { part: filteredItems } = (0, common_1.take)(filteredItemsRaw, maxDisplayItems);
|
|
110
|
-
const showText = (
|
|
81
|
+
const showText = (_d = (_c = (_b = p.texts) === null || _b === void 0 ? void 0 : _b.totalItems) === null || _c === void 0 ? void 0 : _c.call(_b, filteredItems.length, p.displayItems.length)) !== null && _d !== void 0 ? _d : `Showing ${filteredItems.length} out of ${p.displayItems.length} total
|
|
111
82
|
items`;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
react_1.default.createElement(SearchBox, { "data-type": "search" },
|
|
115
|
-
react_1.default.createElement(TextEdit_1.TextEdit, { ref: textEditRef, placeholder: placeholderText, defaultEditing: { focus: true }, singleLine: true, leftContent: react_1.default.createElement(Icon, null, Magnify_1.Magnify), noGrow: true, allowUndo: false, onEscape: () => resWrap(undefined), onClickOutsideWithNoValue: null, onSubmit: (v) => (0, helpers_1.debounce)(() => {
|
|
116
|
-
setSearchText(v);
|
|
117
|
-
onSearchTextChange === null || onSearchTextChange === void 0 ? void 0 : onSearchTextChange(v);
|
|
118
|
-
}, { key: 'pagesearch', time: 200 }), defaultValue: defaultValue }),
|
|
119
|
-
searchText && (react_1.default.createElement(CrossIconStyled, { onClick: () => {
|
|
120
|
-
var _a;
|
|
121
|
-
(_a = textEditRef.current) === null || _a === void 0 ? void 0 : _a.setValue('');
|
|
122
|
-
setSearchText('');
|
|
123
|
-
onSearchTextChange === null || onSearchTextChange === void 0 ? void 0 : onSearchTextChange('');
|
|
124
|
-
} }))),
|
|
83
|
+
return (react_1.default.createElement(Base, { className: p.className },
|
|
84
|
+
react_1.default.createElement(SearchBox_1.SearchBox, Object.assign({}, p, { searchText: searchText, setSearchText: setSearchText, onClear: () => resWrap(undefined) })),
|
|
125
85
|
react_1.default.createElement(Content, { "data-hasitems": !!filteredItems.length, "data-type": "content" },
|
|
126
|
-
filteredItems.map((item, index) => (react_1.default.createElement(Row, { key: getKeyF(item), onClick: () => resWrap(item) }, renderItem({ searchText, item, index })))),
|
|
86
|
+
filteredItems.map((item, index) => (react_1.default.createElement(Row, { key: p.getKeyF(item), onClick: () => resWrap(item) }, p.renderItem({ searchText, item, index })))),
|
|
127
87
|
searchText && react_1.default.createElement(Row, null, showText))));
|
|
128
88
|
};
|
|
129
89
|
exports.SearchBase = SearchBase;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SearchBox: (p: {
|
|
3
|
+
placeholderText?: string | undefined;
|
|
4
|
+
onClear?: (() => void) | undefined;
|
|
5
|
+
searchText: string;
|
|
6
|
+
setSearchText: (s: string) => void;
|
|
7
|
+
onSearchTextChange?: ((v: string) => void) | undefined;
|
|
8
|
+
defaultValue?: string | undefined;
|
|
9
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.SearchBox = void 0;
|
|
30
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
|
+
const helpers_1 = require("../../helpers");
|
|
33
|
+
const icons_1 = require("../../icons");
|
|
34
|
+
const styles_1 = require("../../styles");
|
|
35
|
+
const TextEdit_1 = require("../TextEdit");
|
|
36
|
+
const Base = styled_1.default.div `
|
|
37
|
+
padding: 1rem;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-flow: row;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
align-items: center;
|
|
42
|
+
width: calc(100% - 2rem);
|
|
43
|
+
margin: auto;
|
|
44
|
+
|
|
45
|
+
@media ${styles_1.smallScreen} {
|
|
46
|
+
margin: 0;
|
|
47
|
+
padding: 0;
|
|
48
|
+
padding-top: 0.5rem;
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
const Icon = styled_1.default.div `
|
|
53
|
+
width: 1.5rem;
|
|
54
|
+
height: 1.5rem;
|
|
55
|
+
margin-right: 0.5rem;
|
|
56
|
+
`;
|
|
57
|
+
const CrossIconStyled = (0, styled_1.default)(icons_1.CrossIcon) `
|
|
58
|
+
position: absolute;
|
|
59
|
+
right: 1rem;
|
|
60
|
+
@media ${styles_1.bigScreen} {
|
|
61
|
+
right: 2rem;
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
const SearchBox = (p) => {
|
|
65
|
+
const textEditRef = (0, react_1.createRef)();
|
|
66
|
+
(0, react_1.useEffect)(() => {
|
|
67
|
+
var _a;
|
|
68
|
+
(_a = textEditRef.current) === null || _a === void 0 ? void 0 : _a.setValue(p.searchText);
|
|
69
|
+
}, [p.searchText, textEditRef]);
|
|
70
|
+
return (react_1.default.createElement(Base, { "data-type": "search" },
|
|
71
|
+
react_1.default.createElement(TextEdit_1.TextEdit, { ref: textEditRef, placeholder: p.placeholderText, defaultEditing: { focus: true }, singleLine: true, leftContent: react_1.default.createElement(Icon, null,
|
|
72
|
+
react_1.default.createElement(icons_1.Magnify, null)), noGrow: true, allowUndo: false, onEscape: () => { var _a; return (_a = p.onClear) === null || _a === void 0 ? void 0 : _a.call(p); }, onClickOutsideWithNoValue: null, onSubmit: (v) => (0, helpers_1.debounce)(() => {
|
|
73
|
+
var _a;
|
|
74
|
+
p.setSearchText(v);
|
|
75
|
+
(_a = p.onSearchTextChange) === null || _a === void 0 ? void 0 : _a.call(p, v);
|
|
76
|
+
}, { key: 'pagesearch', time: 200 }), defaultValue: p.defaultValue }),
|
|
77
|
+
p.searchText && (react_1.default.createElement(CrossIconStyled, { onClick: () => {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
(_a = textEditRef.current) === null || _a === void 0 ? void 0 : _a.setValue('');
|
|
80
|
+
p.setSearchText('');
|
|
81
|
+
(_b = p.onSearchTextChange) === null || _b === void 0 ? void 0 : _b.call(p, '');
|
|
82
|
+
} }))));
|
|
83
|
+
};
|
|
84
|
+
exports.SearchBox = SearchBox;
|
|
@@ -14,7 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Base"), exports);
|
|
17
18
|
__exportStar(require("./Dialog"), exports);
|
|
18
19
|
__exportStar(require("./Inline"), exports);
|
|
19
20
|
__exportStar(require("./Modal"), exports);
|
|
21
|
+
__exportStar(require("./SearchBox"), exports);
|
|
20
22
|
__exportStar(require("./types"), exports);
|
|
@@ -97,7 +97,12 @@ exports.TextEdit = (0, react_2.forwardRef)((p, ref) => {
|
|
|
97
97
|
const [editing, setEditingRaw] = (0, react_2.useState)(!!defaultEditing);
|
|
98
98
|
const valueChange = value !== defaultValue;
|
|
99
99
|
(0, react_2.useImperativeHandle)(ref, () => ({
|
|
100
|
-
setValue
|
|
100
|
+
setValue: (v) => {
|
|
101
|
+
if (v === value) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
setValue(v);
|
|
105
|
+
},
|
|
101
106
|
}));
|
|
102
107
|
(0, useOnClickOutside_1.useOnClickOutside)({
|
|
103
108
|
disabled: onClickOutsideWithNoValue === null || disableEdit,
|
|
@@ -145,12 +150,16 @@ exports.TextEdit = (0, react_2.forwardRef)((p, ref) => {
|
|
|
145
150
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
146
151
|
ref: ref, tabIndex: -1, "data-nogrow": noGrow }, (0, dom_1.filterDataProps)(p)),
|
|
147
152
|
leftContent || null,
|
|
148
|
-
react_2.default.createElement(Comp, { tabIndex: editing ? 0 : undefined, "data-editing": "true", "data-valuechange": valueChange.toString(),
|
|
153
|
+
react_2.default.createElement(Comp, { tabIndex: editing ? 0 : undefined, "data-editing": "true", "data-valuechange": valueChange.toString(),
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
155
|
+
ref: taref, "data-type": "text", value: value, onChange: (v) => {
|
|
149
156
|
setValue(v.currentTarget.value);
|
|
150
157
|
if (!allowUndo) {
|
|
151
158
|
onSubmit(v.currentTarget.value, false);
|
|
152
159
|
}
|
|
153
|
-
}, placeholder: placeholder, rows: singleLine ? 1 : undefined, maxLength: maxLength,
|
|
160
|
+
}, placeholder: placeholder, rows: singleLine ? 1 : undefined, maxLength: maxLength,
|
|
161
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
162
|
+
onKeyDown: (e) => {
|
|
154
163
|
if ((onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e)) === false) {
|
|
155
164
|
e.preventDefault();
|
|
156
165
|
return;
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./HeadersRaw"), exports);
|
|
|
27
27
|
__exportStar(require("./HorizontalScrollBar"), exports);
|
|
28
28
|
__exportStar(require("./Icon"), exports);
|
|
29
29
|
__exportStar(require("./Image"), exports);
|
|
30
|
+
__exportStar(require("./InfiniteScroll"), exports);
|
|
30
31
|
__exportStar(require("./KebabDots"), exports);
|
|
31
32
|
__exportStar(require("./Loader"), exports);
|
|
32
33
|
__exportStar(require("./Modal"), exports);
|
package/dist/ui/icons/Magnify.js
CHANGED
|
@@ -5,5 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Magnify = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
|
|
9
|
-
react_1.default.createElement("path", { fill: "none", stroke:
|
|
8
|
+
const Magnify = ({ colour = '#000', }) => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 490 490" },
|
|
9
|
+
react_1.default.createElement("path", { fill: "none", stroke: colour, strokeWidth: "36", strokeLinecap: "round", d: "M280 278a153 153 0 1 0-2 2l170 170m-91-117 110 110-26 26-110-110" })));
|
|
10
|
+
exports.Magnify = Magnify;
|