@npm_leadtech/legal-lib-components 7.92.0 → 7.93.0
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/src/components/atoms/DocumentStatus/DocumentStatus.styled.js +1 -1
- package/dist/src/components/atoms/DocumentStatus/DocumentStatus.styled.ts +1 -1
- package/dist/src/components/atoms/DocumentStatus/DocumentStatusProps.types.d.ts +1 -1
- package/dist/src/components/atoms/DocumentStatus/DocumentStatusProps.types.ts +1 -1
- package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.js +1 -1
- package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.styled.js +1 -1
- package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.styled.ts +1 -1
- package/dist/src/components/atoms/SignerStatusItem/SignerStatusItem.tsx +1 -1
- package/dist/src/components/atoms/SignerStatusItem/SignerStatusItemProps.types.d.ts +1 -1
- package/dist/src/components/atoms/SignerStatusItem/SignerStatusItemProps.types.ts +1 -1
- package/dist/src/hooks/useIntersectionObserver.d.ts +2 -2
- package/dist/src/hooks/useIntersectionObserver.js +1 -1
- package/dist/src/hooks/useIntersectionObserver.tsx +4 -4
- package/package.json +1 -1
|
@@ -3,4 +3,4 @@ export interface DocumentStatusProps {
|
|
|
3
3
|
type?: DocumentStatusType;
|
|
4
4
|
givenClass?: string;
|
|
5
5
|
}
|
|
6
|
-
export type DocumentStatusType = 'default' | 'in-progress' | 'awaiting' | 'no-response' | 'declined' | '
|
|
6
|
+
export type DocumentStatusType = 'default' | 'in-progress' | 'awaiting' | 'no-response' | 'declined' | 'completed';
|
|
@@ -4,4 +4,4 @@ export interface DocumentStatusProps {
|
|
|
4
4
|
givenClass?: string
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export type DocumentStatusType = 'default' | 'in-progress' | 'awaiting' | 'no-response' | 'declined' | '
|
|
7
|
+
export type DocumentStatusType = 'default' | 'in-progress' | 'awaiting' | 'no-response' | 'declined' | 'completed'
|
|
@@ -5,7 +5,7 @@ import { NewRelease24p } from '../../../../images/componentsSvg/NewRelease24p';
|
|
|
5
5
|
import { Time24px } from '../../../../images/componentsSvg/Time24px';
|
|
6
6
|
import { SignerStatusItemStyled } from './SignerStatusItem.styled';
|
|
7
7
|
const iconByStatus = {
|
|
8
|
-
|
|
8
|
+
completed: _jsx(Done24px, {}),
|
|
9
9
|
'in-progress': _jsx(Time24px, {}),
|
|
10
10
|
declined: _jsx(CloseIcon, {}),
|
|
11
11
|
awaiting: _jsx(Time24px, {}),
|
|
@@ -9,7 +9,7 @@ import { Time24px } from '../../../../images/componentsSvg/Time24px'
|
|
|
9
9
|
import { SignerStatusItemStyled } from './SignerStatusItem.styled'
|
|
10
10
|
|
|
11
11
|
const iconByStatus: Record<SignatureStatus, React.ReactNode> = {
|
|
12
|
-
|
|
12
|
+
completed: <Done24px />,
|
|
13
13
|
'in-progress': <Time24px />,
|
|
14
14
|
declined: <CloseIcon />,
|
|
15
15
|
awaiting: <Time24px />,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SignatureStatus = '
|
|
1
|
+
export type SignatureStatus = 'completed' | 'in-progress' | 'declined' | 'awaiting' | 'no-response';
|
|
2
2
|
export interface SignerStatusItemProps {
|
|
3
3
|
status: SignatureStatus;
|
|
4
4
|
children: React.ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
2
|
interface UseIntersectionObserverParams {
|
|
3
3
|
options?: IntersectionObserverInit;
|
|
4
4
|
defaultIntersecting?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare function useIntersectionObserver<T extends HTMLElement>({ options, defaultIntersecting }?: UseIntersectionObserverParams): [RefObject<T
|
|
6
|
+
export declare function useIntersectionObserver<T extends HTMLElement>({ options, defaultIntersecting }?: UseIntersectionObserverParams): [RefObject<T>, boolean];
|
|
7
7
|
export {};
|
|
@@ -4,7 +4,7 @@ export function useIntersectionObserver({ options = {}, defaultIntersecting = fa
|
|
|
4
4
|
const elementRef = useRef(null);
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
const currentElement = elementRef.current;
|
|
7
|
-
if (
|
|
7
|
+
if (currentElement == null)
|
|
8
8
|
return;
|
|
9
9
|
const observer = new IntersectionObserver((entries) => {
|
|
10
10
|
entries.forEach((entry) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefObject, useEffect, useRef, useState } from 'react'
|
|
1
|
+
import { type RefObject, useEffect, useRef, useState } from 'react'
|
|
2
2
|
|
|
3
3
|
interface UseIntersectionObserverParams {
|
|
4
4
|
options?: IntersectionObserverInit
|
|
@@ -8,13 +8,13 @@ interface UseIntersectionObserverParams {
|
|
|
8
8
|
export function useIntersectionObserver<T extends HTMLElement>({
|
|
9
9
|
options = {},
|
|
10
10
|
defaultIntersecting = false
|
|
11
|
-
}: UseIntersectionObserverParams = {}): [RefObject<T
|
|
11
|
+
}: UseIntersectionObserverParams = {}): [RefObject<T>, boolean] {
|
|
12
12
|
const [isIntersecting, setIsIntersecting] = useState(defaultIntersecting)
|
|
13
|
-
const elementRef = useRef<T>(null)
|
|
13
|
+
const elementRef = useRef<T>(null) as RefObject<T>
|
|
14
14
|
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
const currentElement = elementRef.current
|
|
17
|
-
if (
|
|
17
|
+
if (currentElement == null) return
|
|
18
18
|
|
|
19
19
|
const observer = new IntersectionObserver((entries) => {
|
|
20
20
|
entries.forEach((entry) => {
|