@teselagen/ui 0.8.6-beta.24 → 0.8.6-beta.26
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/DataTable/utils/formatPasteData.d.ts +11 -5
- package/DataTable/utils/getAllRows.d.ts +4 -1
- package/DataTable/utils/getCellCopyText.d.ts +1 -1
- package/DataTable/utils/getCellInfo.d.ts +20 -15
- package/DataTable/utils/getFieldPathToField.d.ts +5 -1
- package/DataTable/utils/getIdOrCodeOrIndex.d.ts +2 -1
- package/DataTable/utils/getLastSelectedEntity.d.ts +7 -1
- package/DataTable/utils/getNewEntToSelect.d.ts +7 -6
- package/DataTable/utils/getRowCopyText.d.ts +1 -1
- package/DataTable/utils/initializeHasuraWhereAndFilter.d.ts +22 -1
- package/DataTable/utils/types/Entity.d.ts +5 -0
- package/DataTable/utils/types/Field.d.ts +4 -0
- package/DataTable/utils/types/OrderBy.d.ts +11 -0
- package/DataTable/utils/types/Schema.d.ts +4 -0
- package/DataTable/utils/utils.d.ts +16 -5
- package/MenuBar/index.d.ts +3 -1
- package/Timeline/TimelineEvent.d.ts +7 -4
- package/Timeline/index.d.ts +5 -1
- package/index.cjs.js +1638 -1806
- package/index.d.ts +0 -1
- package/index.es.js +1638 -1806
- package/package.json +3 -3
- package/src/DataTable/utils/formatPasteData.ts +34 -0
- package/src/DataTable/utils/getAllRows.ts +11 -0
- package/src/DataTable/utils/getCellCopyText.ts +7 -0
- package/src/DataTable/utils/getCellInfo.ts +46 -0
- package/src/DataTable/utils/getFieldPathToField.ts +10 -0
- package/src/DataTable/utils/getIdOrCodeOrIndex.ts +14 -0
- package/src/DataTable/utils/getLastSelectedEntity.ts +15 -0
- package/src/DataTable/utils/getNewEntToSelect.ts +32 -0
- package/src/DataTable/utils/initializeHasuraWhereAndFilter.ts +35 -0
- package/src/DataTable/utils/types/Entity.ts +7 -0
- package/src/DataTable/utils/types/Field.ts +4 -0
- package/src/DataTable/utils/types/OrderBy.ts +15 -0
- package/src/DataTable/utils/types/Schema.ts +5 -0
- package/src/DataTable/utils/utils.ts +39 -0
- package/src/Timeline/TimelineEvent.tsx +36 -0
- package/src/Timeline/index.tsx +21 -0
- package/src/index.js +0 -1
- package/src/utils/browserUtils.ts +3 -0
- package/src/utils/determineBlackOrWhiteTextColor.ts +11 -0
- package/src/utils/getTextFromEl.ts +45 -0
- package/src/utils/handlerHelpers.ts +32 -0
- package/src/utils/hooks/index.ts +1 -0
- package/src/utils/hooks/useDeepEqualMemo.ts +10 -0
- package/src/utils/hooks/useStableReference.ts +9 -0
- package/src/utils/hotkeyUtils.tsx +155 -0
- package/src/utils/isBeingCalledExcessively.ts +37 -0
- package/utils/browserUtils.d.ts +1 -1
- package/utils/determineBlackOrWhiteTextColor.d.ts +1 -1
- package/utils/getTextFromEl.d.ts +8 -1
- package/utils/handlerHelpers.d.ts +7 -7
- package/utils/hooks/useDeepEqualMemo.d.ts +1 -2
- package/utils/hooks/useStableReference.d.ts +1 -1
- package/utils/hotkeyUtils.d.ts +21 -4
- package/utils/isBeingCalledExcessively.d.ts +3 -3
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import { Schema } from './types/Schema';
|
|
2
|
+
type GenericSelectValue = {
|
|
3
|
+
__strVal: string;
|
|
4
|
+
__genSelCol: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const formatPasteData: ({ schema, newVal, path }: {
|
|
7
|
+
schema: Schema;
|
|
8
|
+
newVal: GenericSelectValue | string | number | boolean | null | undefined;
|
|
9
|
+
path: string;
|
|
10
|
+
}) => string | number | boolean | null | undefined;
|
|
11
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const getCellCopyText: (cellWrapper: HTMLElement | null) => (string | null | undefined)[];
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
import { Entity } from './types/Entity';
|
|
2
|
+
export declare const getCellInfo: <T extends Entity>({ columnIndex, columnPath, rowId, schema, entities, rowIndex, isEntityDisabled, entity }: {
|
|
3
|
+
columnIndex: number;
|
|
4
|
+
columnPath: string;
|
|
5
|
+
rowId: string | number;
|
|
6
|
+
schema: {
|
|
7
|
+
fields: {
|
|
8
|
+
path: string;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
entities: T[];
|
|
12
|
+
rowIndex: number;
|
|
13
|
+
isEntityDisabled: (entity: T) => boolean;
|
|
14
|
+
entity: T;
|
|
15
|
+
}) => {
|
|
11
16
|
cellId: string;
|
|
12
|
-
cellIdAbove:
|
|
13
|
-
cellIdToRight:
|
|
14
|
-
cellIdBelow:
|
|
15
|
-
cellIdToLeft:
|
|
16
|
-
rowDisabled:
|
|
17
|
+
cellIdAbove: string | 0;
|
|
18
|
+
cellIdToRight: string;
|
|
19
|
+
cellIdBelow: string | 0;
|
|
20
|
+
cellIdToLeft: string;
|
|
21
|
+
rowDisabled: boolean;
|
|
17
22
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Entity } from './types/Entity';
|
|
2
|
+
export declare const getIdOrCodeOrIndex: (record: Entity, rowIndex?: number) => string | number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Entity } from './types/Entity';
|
|
2
|
+
export declare const getNewEntToSelect: ({ type, lastSelectedIndex, entities, isEntityDisabled }: {
|
|
3
|
+
type: "up" | "down";
|
|
4
|
+
lastSelectedIndex: number;
|
|
5
|
+
entities: Entity[];
|
|
6
|
+
isEntityDisabled?: (entity: Entity) => boolean;
|
|
7
|
+
}) => Entity | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function getRowCopyText(rowEl: any, { specificColumn }?: {}): (string |
|
|
1
|
+
export function getRowCopyText(rowEl: any, { specificColumn }?: {}): (string | (string | null | undefined)[])[];
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
type Filter = {
|
|
2
|
+
[key: string]: {
|
|
3
|
+
_eq: string | number | boolean;
|
|
4
|
+
} | {
|
|
5
|
+
_in: (string | number | boolean)[];
|
|
6
|
+
} | {
|
|
7
|
+
_gt: number;
|
|
8
|
+
} | {
|
|
9
|
+
_lt: number;
|
|
10
|
+
} | {
|
|
11
|
+
_gte: number;
|
|
12
|
+
} | {
|
|
13
|
+
_lte: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
type Where = {
|
|
17
|
+
_and?: Filter[];
|
|
18
|
+
_or?: Filter[];
|
|
19
|
+
};
|
|
20
|
+
type CurrentParams = object;
|
|
21
|
+
export declare function initializeHasuraWhereAndFilter(additionalFilter: ((where: Where, currentParams: CurrentParams) => Filter | void) | Filter | undefined | null, where: Where | undefined, currentParams: CurrentParams): void;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type OrderByClause<T = {
|
|
2
|
+
id: string;
|
|
3
|
+
}> = {
|
|
4
|
+
path?: string;
|
|
5
|
+
direction?: "asc" | "desc";
|
|
6
|
+
type?: string;
|
|
7
|
+
sortFn?: ((record: T) => unknown) | string | Array<((record: T) => unknown) | string>;
|
|
8
|
+
getValueToFilterOn?: (record: T) => unknown;
|
|
9
|
+
};
|
|
10
|
+
export type OrderBy = OrderByClause | OrderByClause[] | Record<string, "asc" | "desc">;
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Entity } from './types/Entity';
|
|
2
|
+
import { Field } from './types/Field';
|
|
3
|
+
export declare const getFieldPathToIndex: (schema: {
|
|
4
|
+
fields: Field[];
|
|
5
|
+
}) => {
|
|
6
|
+
[path: string]: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const defaultParsePaste: (str: string) => string[][];
|
|
9
|
+
export declare const getEntityIdToEntity: (entities: Entity[]) => {
|
|
10
|
+
[id: string]: {
|
|
11
|
+
e: Entity;
|
|
12
|
+
i: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const getNumberStrAtEnd: (str: string) => string | null | undefined;
|
|
16
|
+
export declare const stripNumberAtEnd: (str: string) => string;
|
package/MenuBar/index.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ declare class MenuBar extends React.Component<any, any, any> {
|
|
|
6
6
|
style: {};
|
|
7
7
|
};
|
|
8
8
|
constructor(props: any);
|
|
9
|
-
hotkeyEnabler: ({ children }?: {
|
|
9
|
+
hotkeyEnabler: ({ children }?: {
|
|
10
|
+
children?: React.ReactElement;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
state: {
|
|
11
13
|
isOpen: boolean;
|
|
12
14
|
openIndex: null;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { default as React } from '../../../../node_modules/react';
|
|
2
|
+
import { default as dayjs } from 'dayjs';
|
|
3
|
+
interface TimelineEventProps {
|
|
4
|
+
date: string | number | Date | dayjs.Dayjs;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare function TimelineEvent({ date, children }: TimelineEventProps): import("react/jsx-runtime").JSX.Element;
|
|
1
8
|
export default TimelineEvent;
|
|
2
|
-
declare function TimelineEvent({ date, children }: {
|
|
3
|
-
date: any;
|
|
4
|
-
children: any;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
package/Timeline/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { ReactNode, FC } from '../../../../node_modules/react';
|
|
2
|
+
interface TimelineProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const Timeline: FC<TimelineProps>;
|
|
1
6
|
export { default as TimelineEvent } from './TimelineEvent';
|
|
2
7
|
export default Timeline;
|
|
3
|
-
declare function Timeline(props: any): import("react/jsx-runtime").JSX.Element;
|