@lax-wp/design-system 0.11.32 → 0.11.34

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.
@@ -1,14 +1,31 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  /**
3
- * Confidence score type
3
+ * Source meta bounding box
4
4
  */
5
- export type ConfidenceScoreType = "low" | "medium" | "high";
6
- export interface BoundingBox {
5
+ export type SourceMetaBBox = {
7
6
  b: number;
8
7
  l: number;
9
8
  r: number;
10
9
  t: number;
11
- }
10
+ };
11
+ /**
12
+ * Source meta item
13
+ */
14
+ export type SourceMetaItem = {
15
+ bbox: SourceMetaBBox;
16
+ confidence_score?: number;
17
+ is_primary?: boolean;
18
+ match_score?: number;
19
+ match_type?: string;
20
+ page_height: number;
21
+ page_width: number;
22
+ source_page: number;
23
+ source_text?: string;
24
+ };
25
+ /**
26
+ * Confidence score type
27
+ */
28
+ export type ConfidenceScoreType = "low" | "medium" | "high";
12
29
  /**
13
30
  * Available label value size options
14
31
  */
@@ -111,10 +128,10 @@ export interface LabelValueProps {
111
128
  confidenceType?: ConfidenceScoreType;
112
129
  /** Optional tooltip content for confidence badge */
113
130
  confidenceTooltip?: ReactNode;
114
- /** Bounding box coordinates for confidence score source */
115
- boundingBox?: BoundingBox[];
131
+ /** Source meta for confidence score */
132
+ sourceMeta?: SourceMetaItem[];
116
133
  /** Handler fired when confidence score badge is clicked */
117
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
134
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
118
135
  /** Delta change value for currency fields */
119
136
  deltaChange?: number;
120
137
  /** Theme mode */
@@ -7,12 +7,23 @@ export type ConfidenceScoreType = "low" | "medium" | "high";
7
7
  /**
8
8
  * Bounding boxes interface
9
9
  */
10
- export interface BoundingBox {
10
+ export type SourceMetaBBox = {
11
11
  b: number;
12
12
  l: number;
13
13
  r: number;
14
14
  t: number;
15
- }
15
+ };
16
+ export type SourceMetaItem = {
17
+ bbox: SourceMetaBBox;
18
+ confidence_score?: number;
19
+ is_primary?: boolean;
20
+ match_score?: number;
21
+ match_type?: string;
22
+ page_height: number;
23
+ page_width: number;
24
+ source_page: number;
25
+ source_text?: string;
26
+ };
16
27
  /**
17
28
  * Risk details interface
18
29
  */
@@ -124,14 +135,14 @@ export type TBaseInputFieldProps = any & {
124
135
  /** Custom risk details card component */
125
136
  RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps>;
126
137
  /** Bounding box for confidence score */
127
- boundingBox?: BoundingBox[];
138
+ sourceMeta?: SourceMetaItem[];
128
139
  /** Handler for adding GTN to document */
129
140
  onAddGTNToDocument?: (keyValuePair: {
130
141
  key: string;
131
142
  value: string;
132
143
  }) => void;
133
144
  /** Callback function for confidence score click */
134
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
145
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
135
146
  /** Input surface style: `'modified'` uses `--Warning-50` background and `--Warning-200` border */
136
147
  inputEmphasis?: BaseInputFieldEmphasis;
137
148
  };
@@ -3,12 +3,23 @@ import type { LabelType } from "../../data-display/label/Label";
3
3
  * Confidence score type
4
4
  */
5
5
  export type ConfidenceScoreType = "low" | "medium" | "high";
6
- export interface BoundingBox {
6
+ export type SourceMetaBBox = {
7
7
  b: number;
8
8
  l: number;
9
9
  r: number;
10
10
  t: number;
11
- }
11
+ };
12
+ export type SourceMetaItem = {
13
+ bbox: SourceMetaBBox;
14
+ confidence_score?: number;
15
+ is_primary?: boolean;
16
+ match_score?: number;
17
+ match_type?: string;
18
+ page_height: number;
19
+ page_width: number;
20
+ source_page: number;
21
+ source_text?: string;
22
+ };
12
23
  /**
13
24
  * Risk details interface for risk analysis integration
14
25
  */
@@ -67,10 +78,10 @@ export interface CurrencyInputFieldProps {
67
78
  confidenceType?: ConfidenceScoreType;
68
79
  /** Optional tooltip content for confidence badge */
69
80
  confidenceTooltip?: React.ReactNode;
70
- /** Bounding box coordinates for confidence score source */
71
- boundingBox?: BoundingBox[];
81
+ /** Source meta for confidence score */
82
+ sourceMeta?: SourceMetaItem[];
72
83
  /** Handler fired when confidence score badge is clicked */
73
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
84
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
74
85
  /** Whether this is a GTN (Global Term Name) field */
75
86
  isGTN?: boolean;
76
87
  /** GTN field name for document integration */
@@ -4,12 +4,23 @@ import type { LabelType } from "../../data-display/label/Label";
4
4
  * Confidence score type
5
5
  */
6
6
  export type ConfidenceScoreType = "low" | "medium" | "high";
7
- export interface BoundingBox {
7
+ export type SourceMetaBBox = {
8
8
  b: number;
9
9
  l: number;
10
10
  r: number;
11
11
  t: number;
12
- }
12
+ };
13
+ export type SourceMetaItem = {
14
+ bbox: SourceMetaBBox;
15
+ confidence_score?: number;
16
+ is_primary?: boolean;
17
+ match_score?: number;
18
+ match_type?: string;
19
+ page_height: number;
20
+ page_width: number;
21
+ source_page: number;
22
+ source_text?: string;
23
+ };
13
24
  export declare const UNIVERSAL_DATE_FORMAT = "MM/DD/YYYY";
14
25
  export declare const UNIVERSAL_DATETIME_FORMAT = "MM/DD/YYYY - hh:mm A";
15
26
  /**
@@ -70,10 +81,10 @@ export interface DateTimeFieldProps extends Omit<DatePickerProps, "onChange" | "
70
81
  confidenceType?: ConfidenceScoreType;
71
82
  /** Optional tooltip content for confidence badge */
72
83
  confidenceTooltip?: React.ReactNode;
73
- /** Bounding box coordinates for confidence score source */
74
- boundingBox?: BoundingBox[];
84
+ /** Source meta for confidence score */
85
+ sourceMeta?: SourceMetaItem[];
75
86
  /** Handler fired when confidence score badge is clicked */
76
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
87
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
77
88
  /** Whether this is a GTN (Global Term Name) field */
78
89
  isGTN?: boolean;
79
90
  /** GTN name for the field */
@@ -4,12 +4,23 @@ import type { LabelType } from "../../data-display/label/Label";
4
4
  * Confidence score type
5
5
  */
6
6
  export type ConfidenceScoreType = "low" | "medium" | "high";
7
- export interface BoundingBox {
7
+ export type SourceMetaBBox = {
8
8
  b: number;
9
9
  l: number;
10
10
  r: number;
11
11
  t: number;
12
- }
12
+ };
13
+ export type SourceMetaItem = {
14
+ bbox: SourceMetaBBox;
15
+ confidence_score?: number;
16
+ is_primary?: boolean;
17
+ match_score?: number;
18
+ match_type?: string;
19
+ page_height: number;
20
+ page_width: number;
21
+ source_page: number;
22
+ source_text?: string;
23
+ };
13
24
  /**
14
25
  * Props for the DynamicDataInput component
15
26
  * Drop-in replacement matching the lax-web-portal API
@@ -55,10 +66,10 @@ export type DynamicDataInputProps = {
55
66
  confidenceType?: ConfidenceScoreType;
56
67
  /** Optional tooltip content for confidence badge */
57
68
  confidenceTooltip?: React.ReactNode;
58
- /** Bounding box coordinates for confidence score source */
59
- boundingBox?: BoundingBox[];
69
+ /** Source meta for confidence score */
70
+ sourceMeta?: SourceMetaItem[];
60
71
  /** Handler fired when confidence score badge is clicked */
61
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
72
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
62
73
  /** Whether the input is disabled */
63
74
  disabled?: boolean;
64
75
  } & Record<string, any>;
@@ -3,12 +3,23 @@ import type { LabelType } from "../../data-display/label/Label";
3
3
  * Confidence score type
4
4
  */
5
5
  export type ConfidenceScoreType = "low" | "medium" | "high";
6
- export interface BoundingBox {
6
+ export type SourceMetaBBox = {
7
7
  b: number;
8
8
  l: number;
9
9
  r: number;
10
10
  t: number;
11
- }
11
+ };
12
+ export type SourceMetaItem = {
13
+ bbox: SourceMetaBBox;
14
+ confidence_score?: number;
15
+ is_primary?: boolean;
16
+ match_score?: number;
17
+ match_type?: string;
18
+ page_height: number;
19
+ page_width: number;
20
+ source_page: number;
21
+ source_text?: string;
22
+ };
12
23
  /**
13
24
  * Risk details interface for risk analysis integration
14
25
  */
@@ -79,10 +90,10 @@ export interface DynamicDataInputFieldProps {
79
90
  confidenceType?: ConfidenceScoreType;
80
91
  /** Optional tooltip content for confidence badge */
81
92
  confidenceTooltip?: React.ReactNode;
82
- /** Bounding box coordinates for confidence score source */
83
- boundingBox?: BoundingBox[];
93
+ /** Source meta for confidence score */
94
+ sourceMeta?: SourceMetaItem[];
84
95
  /** Handler fired when confidence score badge is clicked */
85
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
96
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
86
97
  /** Whether the input is disabled */
87
98
  disabled?: boolean;
88
99
  /** Callback function called when value changes */
@@ -3,12 +3,23 @@ import type { LabelType } from "../../data-display/label/Label";
3
3
  * Confidence score type
4
4
  */
5
5
  export type ConfidenceScoreType = "low" | "medium" | "high";
6
- export interface BoundingBox {
6
+ export type SourceMetaBBox = {
7
7
  b: number;
8
8
  l: number;
9
9
  r: number;
10
10
  t: number;
11
- }
11
+ };
12
+ export type SourceMetaItem = {
13
+ bbox: SourceMetaBBox;
14
+ confidence_score?: number;
15
+ is_primary?: boolean;
16
+ match_score?: number;
17
+ match_type?: string;
18
+ page_height: number;
19
+ page_width: number;
20
+ source_page: number;
21
+ source_text?: string;
22
+ };
12
23
  /**
13
24
  * Risk details interface for risk analysis integration
14
25
  */
@@ -96,10 +107,10 @@ export interface MasterDataInputFieldProps {
96
107
  confidenceType?: ConfidenceScoreType;
97
108
  /** Optional tooltip content for confidence badge */
98
109
  confidenceTooltip?: React.ReactNode;
99
- /** Bounding box coordinates for confidence score source */
100
- boundingBox?: BoundingBox[];
110
+ /** Source meta for confidence score */
111
+ sourceMeta?: SourceMetaItem[];
101
112
  /** Handler fired when confidence score badge is clicked */
102
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
113
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
103
114
  /** Reference data for formula computation */
104
115
  reference?: any;
105
116
  /** Whether the input is disabled */
@@ -3,12 +3,23 @@ import type { LabelType } from "../../data-display/label/Label";
3
3
  * Confidence score type
4
4
  */
5
5
  export type ConfidenceScoreType = "low" | "medium" | "high";
6
- export interface BoundingBox {
6
+ export type SourceMetaBBox = {
7
7
  b: number;
8
8
  l: number;
9
9
  r: number;
10
10
  t: number;
11
- }
11
+ };
12
+ export type SourceMetaItem = {
13
+ bbox: SourceMetaBBox;
14
+ confidence_score?: number;
15
+ is_primary?: boolean;
16
+ match_score?: number;
17
+ match_type?: string;
18
+ page_height: number;
19
+ page_width: number;
20
+ source_page: number;
21
+ source_text?: string;
22
+ };
12
23
  /**
13
24
  * Risk details interface for risk analysis integration
14
25
  */
@@ -77,10 +88,10 @@ export interface PercentageInputFieldProps {
77
88
  confidenceType?: ConfidenceScoreType;
78
89
  /** Optional tooltip content for confidence badge */
79
90
  confidenceTooltip?: React.ReactNode;
80
- /** Bounding box coordinates for confidence score source */
81
- boundingBox?: BoundingBox[];
91
+ /** Source meta for confidence score */
92
+ sourceMeta?: SourceMetaItem[];
82
93
  /** Handler fired when confidence score badge is clicked */
83
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
94
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
84
95
  /** Whether this is a GTN (Global Term Name) field */
85
96
  isGTN?: boolean;
86
97
  /** GTN field name for document integration */
@@ -6,12 +6,23 @@ import type { LabelType } from "../../data-display/label/Label";
6
6
  * Confidence score type
7
7
  */
8
8
  export type ConfidenceScoreType = "low" | "medium" | "high";
9
- export interface BoundingBox {
9
+ export type SourceMetaBBox = {
10
10
  b: number;
11
11
  l: number;
12
12
  r: number;
13
13
  t: number;
14
- }
14
+ };
15
+ export type SourceMetaItem = {
16
+ bbox: SourceMetaBBox;
17
+ confidence_score?: number;
18
+ is_primary?: boolean;
19
+ match_score?: number;
20
+ match_type?: string;
21
+ page_height: number;
22
+ page_width: number;
23
+ source_page: number;
24
+ source_text?: string;
25
+ };
15
26
  /**
16
27
  * Label-value pair for select options
17
28
  */
@@ -87,10 +98,10 @@ export interface SelectFieldProps extends Omit<SelectProps, "onChange"> {
87
98
  confidenceType?: ConfidenceScoreType;
88
99
  /** Optional tooltip content for confidence badge */
89
100
  confidenceTooltip?: React.ReactNode;
90
- /** Bounding box coordinates for confidence score source */
91
- boundingBox?: BoundingBox[];
101
+ /** Source meta for confidence score */
102
+ sourceMeta?: SourceMetaItem[];
92
103
  /** Handler fired when confidence score badge is clicked */
93
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
104
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
94
105
  /** Whether to preserve original case in the label */
95
106
  originalCase?: boolean;
96
107
  /** Whether this is a GTN (Global Technical Name) field */
@@ -4,12 +4,23 @@ import type { LabelType } from "../../data-display/label/Label";
4
4
  * Confidence score type
5
5
  */
6
6
  export type ConfidenceScoreType = "low" | "medium" | "high";
7
- export interface BoundingBox {
7
+ export type SourceMetaBBox = {
8
8
  b: number;
9
9
  l: number;
10
10
  r: number;
11
11
  t: number;
12
- }
12
+ };
13
+ export type SourceMetaItem = {
14
+ bbox: SourceMetaBBox;
15
+ confidence_score?: number;
16
+ is_primary?: boolean;
17
+ match_score?: number;
18
+ match_type?: string;
19
+ page_height: number;
20
+ page_width: number;
21
+ source_page: number;
22
+ source_text?: string;
23
+ };
13
24
  /**
14
25
  * Risk details interface
15
26
  */
@@ -72,10 +83,10 @@ export interface TextAreaFieldProps extends Omit<React.TextareaHTMLAttributes<HT
72
83
  confidenceType?: ConfidenceScoreType;
73
84
  /** Optional tooltip content for confidence badge */
74
85
  confidenceTooltip?: React.ReactNode;
75
- /** Bounding box coordinates for confidence score source */
76
- boundingBox?: BoundingBox[];
86
+ /** Source meta for confidence score */
87
+ sourceMeta?: SourceMetaItem[];
77
88
  /** Handler fired when confidence score badge is clicked */
78
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
89
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
79
90
  /** Whether this is a GTN (Global Term Name) field */
80
91
  isGTN?: boolean;
81
92
  /** GTN field name for document integration */
@@ -6,12 +6,23 @@ export type { LabelType };
6
6
  * Confidence score type
7
7
  */
8
8
  export type ConfidenceScoreType = "low" | "medium" | "high";
9
- export interface BoundingBox {
9
+ export type SourceMetaBBox = {
10
10
  b: number;
11
11
  l: number;
12
12
  r: number;
13
13
  t: number;
14
- }
14
+ };
15
+ export type SourceMetaItem = {
16
+ bbox: SourceMetaBBox;
17
+ confidence_score?: number;
18
+ is_primary?: boolean;
19
+ match_score?: number;
20
+ match_type?: string;
21
+ page_height: number;
22
+ page_width: number;
23
+ source_page: number;
24
+ source_text?: string;
25
+ };
15
26
  /**
16
27
  * Props for the Toggle component
17
28
  */
@@ -50,10 +61,10 @@ export interface ToggleProps {
50
61
  confidenceType?: ConfidenceScoreType;
51
62
  /** Optional tooltip content for confidence badge */
52
63
  confidenceTooltip?: ReactNode;
53
- /** Bounding box coordinates for confidence score source */
54
- boundingBox?: BoundingBox[];
64
+ /** Source meta for confidence score */
65
+ sourceMeta?: SourceMetaItem[];
55
66
  /** Handler fired when confidence score badge is clicked */
56
- onConfidenceScoreClick?: (boundingBox?: BoundingBox[]) => void;
67
+ onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;
57
68
  /** Tooltip text to display */
58
69
  tooltip?: string;
59
70
  /** Additional CSS classes for the toggle input */