ag-common 0.0.276 → 0.0.280
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/ui/components/Chevron/index.d.ts +1 -0
- package/dist/ui/components/Confirm/Modal.d.ts +1 -0
- package/dist/ui/components/DropdownList/index.d.ts +1 -0
- package/dist/ui/components/DropdownList/types.d.ts +1 -0
- package/dist/ui/components/HeadersRaw/index.d.ts +1 -0
- package/dist/ui/components/KebabDots/index.d.ts +1 -0
- package/dist/ui/components/Loader/index.d.ts +1 -0
- package/dist/ui/components/LoginButton/index.d.ts +1 -0
- package/dist/ui/components/LogoutButton/index.d.ts +1 -0
- package/dist/ui/components/Modal/index.d.ts +1 -0
- package/dist/ui/components/OpenApiCodeBlock/OpenApiCodeBlock.d.ts +1 -0
- package/dist/ui/components/OpenApiCodeBlock/curl/helpers/body.d.ts +1 -0
- package/dist/ui/components/OpenApiCodeBlock/curl/helpers/security.d.ts +1 -0
- package/dist/ui/components/OpenApiCodeBlock/curl/index.d.ts +1 -0
- package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/call.d.ts +1 -0
- package/dist/ui/components/OpenApiCodeBlock/fetch/helpers/req.d.ts +1 -0
- package/dist/ui/components/OpenApiCodeBlock/fetch/index.d.ts +1 -0
- package/dist/ui/components/OpenApiCodeBlock/helpers/joinJsx.d.ts +1 -0
- package/dist/ui/components/OpenApiCodeBlock/types.d.ts +1 -0
- package/dist/ui/components/Prompt/Modal.d.ts +1 -0
- package/dist/ui/components/Search/Base.d.ts +1 -0
- package/dist/ui/components/Search/Inline.d.ts +1 -0
- package/dist/ui/components/Search/Modal.d.ts +1 -0
- package/dist/ui/components/Search/types.d.ts +1 -0
- package/dist/ui/components/Sidebar/index.d.ts +1 -0
- package/dist/ui/components/SparkLine/index.d.ts +1 -0
- package/dist/ui/components/Table/index.d.ts +1 -0
- package/dist/ui/components/Table/index.js +8 -3
- package/dist/ui/components/TextEdit/CheckboxEdit.d.ts +1 -0
- package/dist/ui/components/TextEdit/ColourEdit.d.ts +1 -0
- package/dist/ui/components/TextEdit/LengthBox.d.ts +1 -0
- package/dist/ui/components/TextEdit/ListboxEdit.d.ts +1 -0
- package/dist/ui/components/TextEdit/RadioGroup.d.ts +1 -0
- package/dist/ui/components/TextEdit/TextEdit.d.ts +1 -0
- package/dist/ui/components/TextEdit/images.d.ts +1 -0
- package/dist/ui/components/Toast/index.d.ts +1 -0
- package/dist/ui/components/UserImage/index.d.ts +1 -0
- package/dist/ui/helpers/useContextMenu.js +3 -1
- package/package.json +7 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const ModalItem: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
3
|
export declare const Modal: ({ open, setOpen, children, position, topPosition, showCloseButton, closeOnMoveMouseOutside, className, closeOnClickOutside, }: {
|
|
3
4
|
open: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const joinJsx: (items: (JSX.Element | undefined)[], sep: JSX.Element[]) => JSX.Element[];
|
|
2
3
|
export declare const joinJsxWithSlash: (items: (JSX.Element | undefined)[]) => JSX.Element[];
|
|
3
4
|
export declare const joinJsxWithComma: (items: (JSX.Element | undefined)[]) => JSX.Element[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ISearchDialog, TSearchModalRes } from './types';
|
|
2
3
|
export declare const SearchBase: <T>({ onSelectItem, onSearchTextChange, placeholderText, closeText, renderItem, displayItems, willDisplayItem, getKeyF, className, texts, }: ISearchDialog<T> & {
|
|
3
4
|
onSearchTextChange?: ((v: string) => void) | undefined;
|
|
@@ -25,15 +25,20 @@ const TableRow = styled_components_1.default.div `
|
|
|
25
25
|
const Group = styled_components_1.default.div `
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-flow: column;
|
|
28
|
+
width: 100%;
|
|
28
29
|
`;
|
|
29
30
|
const GroupTitle = styled_components_1.default.div `
|
|
30
31
|
font-size: 1.5rem;
|
|
31
32
|
`;
|
|
33
|
+
const GroupWrap = styled_components_1.default.div `
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-flow: row;
|
|
36
|
+
`;
|
|
32
37
|
const Table = ({ children, className, headerRow, }) => {
|
|
33
38
|
const grouped = (0, groupBy_1.groupByList)(children, (s) => s.groupTitle);
|
|
34
|
-
return (react_1.default.createElement(Base, { className: className }, grouped.map((group) => (react_1.default.createElement(
|
|
35
|
-
group.key && (react_1.default.createElement(GroupTitle, { key: `
|
|
36
|
-
react_1.default.createElement(Group, { key: `
|
|
39
|
+
return (react_1.default.createElement(Base, { className: className }, grouped.map((group) => (react_1.default.createElement(GroupWrap, { key: 'gk' + group.key },
|
|
40
|
+
group.key && (react_1.default.createElement(GroupTitle, { key: `gt${group.key}` }, group.key)),
|
|
41
|
+
react_1.default.createElement(Group, { key: `g${group.key}` },
|
|
37
42
|
headerRow && (react_1.default.createElement(TableRow, { "data-header": "true", key: `headrow${group.key}` }, headerRow)),
|
|
38
43
|
group.items.map((item) => (react_1.default.createElement(TableRow, { key: item.content.key }, item.content)))))))));
|
|
39
44
|
};
|
|
@@ -6,7 +6,9 @@ const useContextMenu = ({ ref, }) => {
|
|
|
6
6
|
const [xPos, setXPos] = (0, react_1.useState)('0px');
|
|
7
7
|
const [yPos, setYPos] = (0, react_1.useState)('0px');
|
|
8
8
|
const [showMenu, setShowMenu] = (0, react_1.useState)(false);
|
|
9
|
-
const handleContextMenu = (0, react_1.useCallback)(
|
|
9
|
+
const handleContextMenu = (0, react_1.useCallback)(
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
(e) => {
|
|
10
12
|
var _a;
|
|
11
13
|
if (!((_a = ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
12
14
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ag-common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.280",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Andrei Gec <@andreigec> (https://gec.dev/)",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"@storybook/react": "6.5.9",
|
|
43
43
|
"@storybook/theming": "6.5.9",
|
|
44
44
|
"@types/jsonwebtoken": "8.5.8",
|
|
45
|
-
"@types/node": "18.0.
|
|
46
|
-
"@types/react": "
|
|
47
|
-
"@types/react-dom": "
|
|
45
|
+
"@types/node": "18.0.1",
|
|
46
|
+
"@types/react": "18.0.14",
|
|
47
|
+
"@types/react-dom": "18.0.5",
|
|
48
48
|
"@types/styled-components": "5.1.25",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "5.30.
|
|
50
|
-
"@typescript-eslint/parser": "5.30.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "5.30.5",
|
|
50
|
+
"@typescript-eslint/parser": "5.30.5",
|
|
51
51
|
"cross-env": "7.0.3",
|
|
52
|
-
"eslint": "8.
|
|
52
|
+
"eslint": "8.19.0",
|
|
53
53
|
"eslint-config-airbnb-typescript": "17.0.0",
|
|
54
54
|
"eslint-config-prettier": "8.5.0",
|
|
55
55
|
"eslint-plugin-import": "2.26.0",
|