lawgic-dev-kit 0.19.0 → 0.19.2
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/_virtual/index2.js +2 -3
- package/dist/_virtual/index3.js +3 -3
- package/dist/_virtual/index4.js +3 -5
- package/dist/_virtual/index5.js +5 -2
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/atoms/Button/Button.js +9 -8
- package/dist/components/atoms/FilterPill/FilterPill.d.ts +8 -0
- package/dist/components/atoms/FilterPill/index.d.ts +1 -0
- package/dist/components/atoms/IconButton/IconButton.js +11 -10
- package/dist/components/atoms/ProgressBar/ProgressBar.js +3 -2
- package/dist/components/atoms/SectionButton/desktop/SectionButton.js +11 -10
- package/dist/components/atoms/SectionButton/mobile/SectionButton.js +13 -12
- package/dist/components/atoms/SidebarButton/SidebarButton.js +3 -2
- package/dist/components/atoms/Switch/Switch.js +3 -2
- package/dist/components/atoms/TextButton/TextButton.js +1 -0
- package/dist/components/atoms/TextInput/TextInput.js +3 -2
- package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.js +9 -8
- package/dist/components/molecules/AutocompleteInput/AutocompleteInput.js +1 -1
- package/dist/components/molecules/AutocompleteInput/AutocompleteInput.types.d.ts +1 -1
- package/dist/components/molecules/DateInput/DateInput.d.ts +2 -1
- package/dist/components/molecules/DateInput/DateInput.js +40 -29
- package/dist/components/molecules/FiltersMenu/FiltersMenu.d.ts +13 -0
- package/dist/components/molecules/FiltersMenu/index.d.ts +1 -0
- package/dist/components/molecules/PillsContainer/PillsContainer.d.ts +5 -2
- package/dist/components/molecules/PillsContainer/PillsContainer.js +29 -23
- package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.d.ts +2 -1
- package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.js +27 -25
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useFilterToggler.d.ts +5 -0
- package/dist/hooks/useFilterToggler.js +56 -0
- package/dist/index.js +17 -15
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +40 -40
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +3 -3
- package/dist/types/cycles.d.ts +103 -0
- package/dist/types/filters.d.ts +22 -0
- package/dist/utils/cycles.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as r } from "../../_virtual/
|
|
1
|
+
import { __module as r } from "../../_virtual/index2.js";
|
|
2
2
|
import { __require as s } from "./node_modules/react-is/index.js";
|
|
3
3
|
import { __require as t } from "./factoryWithTypeCheckers.js";
|
|
4
4
|
import { __require as p } from "./factoryWithThrowingShims.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index6.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as v } from "../../_virtual/
|
|
2
|
-
import { t as U } from "../../_virtual/
|
|
3
|
-
import oe from "../../_virtual/
|
|
1
|
+
import { p as v } from "../../_virtual/index3.js";
|
|
2
|
+
import { t as U } from "../../_virtual/index4.js";
|
|
3
|
+
import oe from "../../_virtual/index5.js";
|
|
4
4
|
const ce = Object.prototype.toString, he = Error.prototype.toString, fe = RegExp.prototype.toString, de = typeof Symbol < "u" ? Symbol.prototype.toString : () => "", pe = /^Symbol\((.*)\)(.*)$/;
|
|
5
5
|
function me(n) {
|
|
6
6
|
return n != +n ? "NaN" : n === 0 && 1 / n < 0 ? "-0" : "" + n;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { FileStructure } from 'legal-cycle-api-types';
|
|
2
|
+
export type CycleEventLabel = "registration_requested" | "registration_granted" | "use_statement_due" | "renewal_due";
|
|
3
|
+
export interface CycleEvent {
|
|
4
|
+
_id: string;
|
|
5
|
+
label: CycleEventLabel;
|
|
6
|
+
start_date: Date | string;
|
|
7
|
+
end_date: Date | string;
|
|
8
|
+
}
|
|
9
|
+
export interface CycleClient {
|
|
10
|
+
name: string;
|
|
11
|
+
address: string;
|
|
12
|
+
country: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CycleMember {
|
|
15
|
+
_id: string;
|
|
16
|
+
email: string;
|
|
17
|
+
accepted: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface Cycle {
|
|
20
|
+
_id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
country: string;
|
|
23
|
+
client?: CycleClient;
|
|
24
|
+
members: CycleMember[];
|
|
25
|
+
classes?: {
|
|
26
|
+
code: string;
|
|
27
|
+
description: string;
|
|
28
|
+
}[];
|
|
29
|
+
expedient_number: string;
|
|
30
|
+
logo_url?: string;
|
|
31
|
+
files: (string | FileStructure)[];
|
|
32
|
+
gaceta_files: (string | FileStructure)[];
|
|
33
|
+
events: CycleEvent[];
|
|
34
|
+
created_by: string;
|
|
35
|
+
created_at: Date;
|
|
36
|
+
updated_at: Date;
|
|
37
|
+
}
|
|
38
|
+
export type ViewMode = "week" | "month" | "year" | "lustrum" | "decade";
|
|
39
|
+
export interface TimeDivision {
|
|
40
|
+
label: string;
|
|
41
|
+
subLabel: string;
|
|
42
|
+
date: Date;
|
|
43
|
+
key: string;
|
|
44
|
+
}
|
|
45
|
+
export interface CycleTimelineRowProps {
|
|
46
|
+
cycle: Cycle;
|
|
47
|
+
startDate: Date;
|
|
48
|
+
endDate: Date;
|
|
49
|
+
hoveredRowIndex: number | null;
|
|
50
|
+
index: number;
|
|
51
|
+
bottomBorder: boolean;
|
|
52
|
+
onRowHover: (index: number) => void;
|
|
53
|
+
onRowLeave: () => void;
|
|
54
|
+
onOverlayFocus: () => void;
|
|
55
|
+
currentViewMode: string;
|
|
56
|
+
timelineWidth: number;
|
|
57
|
+
getDivisionWidth: () => number;
|
|
58
|
+
onScrollY: (scrollEvent: WheelEvent) => void;
|
|
59
|
+
}
|
|
60
|
+
export interface ScrollInfo {
|
|
61
|
+
scrollLeft: number;
|
|
62
|
+
scrollWidth: number;
|
|
63
|
+
clientWidth: number;
|
|
64
|
+
rightEdgeDistance: number;
|
|
65
|
+
}
|
|
66
|
+
export interface RangeUpdateResult {
|
|
67
|
+
range: {
|
|
68
|
+
start: Date;
|
|
69
|
+
end: Date;
|
|
70
|
+
};
|
|
71
|
+
preserveScrollPosition: boolean;
|
|
72
|
+
addedWidth?: number;
|
|
73
|
+
}
|
|
74
|
+
export interface CycleTimelineProps {
|
|
75
|
+
cycles: Cycle[];
|
|
76
|
+
viewMode?: ViewMode;
|
|
77
|
+
}
|
|
78
|
+
export interface JobStructure<T = {
|
|
79
|
+
lawyer_name: string;
|
|
80
|
+
}> {
|
|
81
|
+
_id: string;
|
|
82
|
+
type: "lawyer_scraping" | "expedient_analysis" | "client_scraping";
|
|
83
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
84
|
+
notified: boolean;
|
|
85
|
+
progress: {
|
|
86
|
+
total: number;
|
|
87
|
+
currentStep: string;
|
|
88
|
+
percentage: number;
|
|
89
|
+
expedients_to_analyze: {
|
|
90
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
91
|
+
name: string;
|
|
92
|
+
}[];
|
|
93
|
+
};
|
|
94
|
+
created_by: string;
|
|
95
|
+
params: T;
|
|
96
|
+
error?: string;
|
|
97
|
+
createdAt: Date;
|
|
98
|
+
updatedAt: Date;
|
|
99
|
+
}
|
|
100
|
+
export type Option = {
|
|
101
|
+
label: string;
|
|
102
|
+
value: unknown;
|
|
103
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
export type FilterFn<T> = (value: unknown, item: T) => boolean;
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
}
|
|
7
|
+
export interface Filter<T> {
|
|
8
|
+
key: keyof T;
|
|
9
|
+
value: unknown;
|
|
10
|
+
label: string;
|
|
11
|
+
type: "text" | "date" | "select";
|
|
12
|
+
icon?: IconProp;
|
|
13
|
+
fn: FilterFn<T>;
|
|
14
|
+
options?: SelectOption[];
|
|
15
|
+
}
|
|
16
|
+
export interface FilterControl<T> {
|
|
17
|
+
addFilter: ({ key, value, label, type, icon, options, }: Omit<Filter<T>, "fn">) => void;
|
|
18
|
+
updateFilter: ({ key, value, }: Omit<Filter<T>, "icon" | "fn" | "options">) => void;
|
|
19
|
+
removeFilter: ({ key }: Pick<Filter<T>, "key">) => void;
|
|
20
|
+
clearFilters: () => void;
|
|
21
|
+
activeFilters: Omit<Filter<T>, "fn">[];
|
|
22
|
+
}
|