@isettingkit/business-rules 1.0.19 → 1.0.21

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.
@@ -3,23 +3,34 @@ import { IDecision } from '@isettingkit/input';
3
3
  import { IOption } from '@inubekit/inubekit';
4
4
  import { IRuleDecision } from '@isettingkit/input';
5
5
  import { IValue } from '@isettingkit/input';
6
- import { JSX as JSX_2 } from 'react/jsx-runtime';
6
+ import { JSX } from 'react/jsx-runtime';
7
+ import { JSX as JSX_2 } from 'react';
7
8
  import { ReactPortal } from 'react';
8
9
  import { ValueDataType } from '@isettingkit/input';
9
10
  import { ValueHowToSetUp } from '@isettingkit/input';
10
11
 
11
- export declare const BusinessRuleCard: (props: IBusinessRuleCard) => JSX_2.Element;
12
+ export declare const BusinessRuleCard: (props: IBusinessRuleCard) => JSX.Element;
12
13
 
13
- export declare const BusinessRules: (props: IBusinessRules) => JSX_2.Element;
14
+ export declare const BusinessRuleCardNew: (props: IBusinessRuleCard) => JSX.Element;
14
15
 
15
- export declare const BusinessRuleView: (props: IBusinessRuleView) => JSX_2.Element;
16
+ export declare const BusinessRules: (props: IBusinessRules) => JSX.Element;
17
+
18
+ export declare const BusinessRulesNew: (props: IBusinessRules_2) => JSX.Element;
19
+
20
+ export declare const BusinessRuleView: (props: IBusinessRuleView) => JSX.Element;
21
+
22
+ export declare const BusinessRuleViewNew: (props: IBusinessRuleView_2) => JSX.Element;
16
23
 
17
24
  export declare const convertRangeToString: (value: {
18
25
  from: number;
19
26
  to: number;
20
27
  }) => string;
21
28
 
22
- export declare const Filter: (props: IFilter) => JSX_2.Element;
29
+ export declare const DropdownMenu: (props: IDropdownMenu) => JSX.Element;
30
+
31
+ export declare const DropdownMenuContainer: (props: IDropdownMenuContainer) => JSX.Element;
32
+
33
+ export declare const Filter: (props: IFilter) => JSX.Element;
23
34
 
24
35
  export declare const FilterModal: (props: IFilterModal) => ReactPortal;
25
36
 
@@ -50,7 +61,7 @@ export declare const formatDecisionForBackend: (props: {
50
61
  validUntil?: Date | string;
51
62
  };
52
63
 
53
- export declare const FormFilter: (props: IFormFilter) => JSX_2.Element;
64
+ export declare const FormFilter: (props: IFormFilter) => JSX.Element;
54
65
 
55
66
  export declare interface IBusinessRuleCard {
56
67
  children: React.ReactNode;
@@ -77,10 +88,39 @@ declare interface IBusinessRules {
77
88
  terms?: boolean;
78
89
  }
79
90
 
91
+ declare interface IBusinessRules_2 {
92
+ controls?: boolean;
93
+ customTitleContentAddCard?: string;
94
+ customMessageEmptyDecisions?: string;
95
+ decisions?: IRuleDecision[];
96
+ textValues: IRulesFormTextValues_2;
97
+ decisionTemplate: IRuleDecision;
98
+ isModalOpen: boolean;
99
+ selectedDecision: IRuleDecision | null;
100
+ loading: boolean;
101
+ handleOpenModal?: (decision?: IRuleDecision | null) => void;
102
+ handleCloseModal?: () => void;
103
+ handleSubmitForm?: (dataDecision: IRuleDecision) => void;
104
+ handleDelete?: (id: string) => void;
105
+ terms?: boolean;
106
+ }
107
+
80
108
  export declare interface IBusinessRuleView {
81
109
  decision?: IRuleDecision;
82
110
  loading?: boolean;
83
111
  textValues?: IRulesFormTextValues;
112
+ position?: number;
113
+ isOpen?: boolean;
114
+ onToggle?: (isOpen: boolean) => void;
115
+ }
116
+
117
+ declare interface IBusinessRuleView_2 {
118
+ decision?: IRuleDecision;
119
+ loading?: boolean;
120
+ textValues?: IRulesFormTextValues_2;
121
+ position?: number;
122
+ isOpen?: boolean;
123
+ onToggle?: () => void;
84
124
  }
85
125
 
86
126
  export declare interface ICheckpickerField {
@@ -95,6 +135,26 @@ export declare interface ICheckpickerField {
95
135
  invalid?: boolean;
96
136
  }
97
137
 
138
+ export declare interface IDropdownMenu {
139
+ isOpen: boolean;
140
+ links: TLinkItem[];
141
+ onClick: () => void;
142
+ title: string;
143
+ activeId?: string;
144
+ }
145
+
146
+ export declare interface IDropdownMenuContainer {
147
+ collapseOnNavigate?: boolean;
148
+ defaultOpenId?: string | null;
149
+ groups: IDropdownMenuGroup[];
150
+ }
151
+
152
+ export declare interface IDropdownMenuGroup {
153
+ id: string;
154
+ title: string;
155
+ links: TLinkItem[];
156
+ }
157
+
98
158
  export declare interface IFilter {
99
159
  appliedFilters?: IFilterTag[];
100
160
  onClear: () => void;
@@ -116,7 +176,7 @@ export declare interface IFilterModal {
116
176
  }
117
177
 
118
178
  export declare interface IFilterTag {
119
- icon: JSX.Element;
179
+ icon: JSX_2.Element;
120
180
  label: string;
121
181
  onClose?: (e?: React.MouseEvent<Element, MouseEvent>) => void;
122
182
  }
@@ -124,7 +184,7 @@ export declare interface IFilterTag {
124
184
  export declare interface IFormFilter {
125
185
  appliedFilters?: IFilterTag[];
126
186
  fields: Array<ICheckpickerField & {
127
- icon?: JSX.Element;
187
+ icon?: JSX_2.Element;
128
188
  }>;
129
189
  onChange: (name: string, values: string) => void;
130
190
  noFiltersLabel?: string;
@@ -170,6 +230,26 @@ declare interface IRulesFormTextValues {
170
230
  termStart: string;
171
231
  }
172
232
 
233
+ declare interface IRulesFormTextValues_2 {
234
+ cancel: string;
235
+ change: string;
236
+ changePlaceholder: string;
237
+ confirm: string;
238
+ criteria: string;
239
+ factsThatConditionIt: string;
240
+ none: string;
241
+ rangeMax: (label: string) => string;
242
+ rangeMin: (label: string) => string;
243
+ reasonForChange: string;
244
+ selectOption: string;
245
+ selectOptions: string;
246
+ termEnd: string;
247
+ terms?: string;
248
+ termStart: string;
249
+ effectiveFrom?: string;
250
+ validUntil?: string;
251
+ }
252
+
173
253
  declare interface ITranslateOptions {
174
254
  url: string;
175
255
  apiKey: string;
@@ -207,7 +287,7 @@ export declare const revertSortedDataSampleSwitchPlaces: (props: IRevertSortedDa
207
287
 
208
288
  export declare const revertSortedDataSwitchPlaces: (props: IRevertSortedData) => IRuleDecision[] | undefined;
209
289
 
210
- export declare const RulesForm: (props: IRulesForm) => JSX_2.Element;
290
+ export declare const RulesForm: (props: IRulesForm) => JSX.Element;
211
291
 
212
292
  export declare const sortDisplayDataSampleSwitchPlaces: (props: IRevertSortedData) => {
213
293
  businessRuleId?: string;
@@ -234,6 +314,12 @@ export declare const sortDisplayDataSampleSwitchPlaces: (props: IRevertSortedDat
234
314
 
235
315
  export declare const sortDisplayDataSwitchPlaces: (props: IRevertSortedData) => IRuleDecision[] | undefined;
236
316
 
317
+ export declare type TLinkItem = {
318
+ id: string;
319
+ label: string;
320
+ path: string;
321
+ };
322
+
237
323
  export declare const translateObject: (data: Record<string, any>, targetLang: string, options: ITranslateOptions) => Promise<Record<string, any>>;
238
324
 
239
325
  export declare const translateText: (text: string, targetLang: string, { url, apiKey }: ITranslateOptions) => Promise<string>;