@isettingkit/business-rules 1.0.18 → 1.0.20
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/index.es.d.ts +102 -9
- package/dist/index.es.js +1318 -724
- package/package.json +13 -15
package/dist/index.es.d.ts
CHANGED
|
@@ -3,22 +3,61 @@ 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
|
|
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) =>
|
|
12
|
+
export declare const BusinessRuleCard: (props: IBusinessRuleCard) => JSX.Element;
|
|
12
13
|
|
|
13
|
-
export declare const
|
|
14
|
+
export declare const BusinessRuleCardNew: (props: IBusinessRuleCard) => JSX.Element;
|
|
14
15
|
|
|
15
|
-
export declare const
|
|
16
|
+
export declare const BusinessRules: (props: IBusinessRules) => JSX.Element;
|
|
16
17
|
|
|
17
|
-
export declare const
|
|
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;
|
|
23
|
+
|
|
24
|
+
export declare const convertRangeToString: (value: {
|
|
25
|
+
from: number;
|
|
26
|
+
to: number;
|
|
27
|
+
}) => string;
|
|
28
|
+
|
|
29
|
+
export declare const Filter: (props: IFilter) => JSX.Element;
|
|
18
30
|
|
|
19
31
|
export declare const FilterModal: (props: IFilterModal) => ReactPortal;
|
|
20
32
|
|
|
21
|
-
export declare const
|
|
33
|
+
export declare const formatDecisionForBackend: (props: {
|
|
34
|
+
decision: IRuleDecision;
|
|
35
|
+
fallbackId: string;
|
|
36
|
+
template: IRuleDecision;
|
|
37
|
+
}) => {
|
|
38
|
+
decisionId: string;
|
|
39
|
+
value: any;
|
|
40
|
+
conditionsThatEstablishesTheDecision: any;
|
|
41
|
+
businessRuleId?: string;
|
|
42
|
+
conditionDataType?: ValueDataType[keyof ValueDataType];
|
|
43
|
+
conditionName?: string;
|
|
44
|
+
decision?: IDecision;
|
|
45
|
+
decisions?: IDecision[];
|
|
46
|
+
decisionDataType?: ValueDataType[keyof ValueDataType];
|
|
47
|
+
descriptionOfChange?: string;
|
|
48
|
+
descriptionUse?: string;
|
|
49
|
+
effectiveFrom?: Date | string;
|
|
50
|
+
howToSetTheCondition?: ValueHowToSetUp[keyof ValueHowToSetUp];
|
|
51
|
+
howToSetTheDecision?: ValueHowToSetUp[keyof ValueHowToSetUp];
|
|
52
|
+
labelName?: string;
|
|
53
|
+
listOfPossibleValues?: IValue;
|
|
54
|
+
ruleDataType?: ValueDataType[keyof ValueDataType];
|
|
55
|
+
ruleName?: string;
|
|
56
|
+
transactionOperation?: string;
|
|
57
|
+
validUntil?: Date | string;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export declare const FormFilter: (props: IFormFilter) => JSX.Element;
|
|
22
61
|
|
|
23
62
|
export declare interface IBusinessRuleCard {
|
|
24
63
|
children: React.ReactNode;
|
|
@@ -45,10 +84,39 @@ declare interface IBusinessRules {
|
|
|
45
84
|
terms?: boolean;
|
|
46
85
|
}
|
|
47
86
|
|
|
87
|
+
declare interface IBusinessRules_2 {
|
|
88
|
+
controls?: boolean;
|
|
89
|
+
customTitleContentAddCard?: string;
|
|
90
|
+
customMessageEmptyDecisions?: string;
|
|
91
|
+
decisions?: IRuleDecision[];
|
|
92
|
+
textValues: IRulesFormTextValues_2;
|
|
93
|
+
decisionTemplate: IRuleDecision;
|
|
94
|
+
isModalOpen: boolean;
|
|
95
|
+
selectedDecision: IRuleDecision | null;
|
|
96
|
+
loading: boolean;
|
|
97
|
+
handleOpenModal?: (decision?: IRuleDecision | null) => void;
|
|
98
|
+
handleCloseModal?: () => void;
|
|
99
|
+
handleSubmitForm?: (dataDecision: IRuleDecision) => void;
|
|
100
|
+
handleDelete?: (id: string) => void;
|
|
101
|
+
terms?: boolean;
|
|
102
|
+
}
|
|
103
|
+
|
|
48
104
|
export declare interface IBusinessRuleView {
|
|
49
105
|
decision?: IRuleDecision;
|
|
50
106
|
loading?: boolean;
|
|
51
107
|
textValues?: IRulesFormTextValues;
|
|
108
|
+
position?: number;
|
|
109
|
+
isOpen?: boolean;
|
|
110
|
+
onToggle?: (isOpen: boolean) => void;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare interface IBusinessRuleView_2 {
|
|
114
|
+
decision?: IRuleDecision;
|
|
115
|
+
loading?: boolean;
|
|
116
|
+
textValues?: IRulesFormTextValues_2;
|
|
117
|
+
position?: number;
|
|
118
|
+
isOpen?: boolean;
|
|
119
|
+
onToggle?: () => void;
|
|
52
120
|
}
|
|
53
121
|
|
|
54
122
|
export declare interface ICheckpickerField {
|
|
@@ -84,7 +152,7 @@ export declare interface IFilterModal {
|
|
|
84
152
|
}
|
|
85
153
|
|
|
86
154
|
export declare interface IFilterTag {
|
|
87
|
-
icon:
|
|
155
|
+
icon: JSX_2.Element;
|
|
88
156
|
label: string;
|
|
89
157
|
onClose?: (e?: React.MouseEvent<Element, MouseEvent>) => void;
|
|
90
158
|
}
|
|
@@ -92,7 +160,7 @@ export declare interface IFilterTag {
|
|
|
92
160
|
export declare interface IFormFilter {
|
|
93
161
|
appliedFilters?: IFilterTag[];
|
|
94
162
|
fields: Array<ICheckpickerField & {
|
|
95
|
-
icon?:
|
|
163
|
+
icon?: JSX_2.Element;
|
|
96
164
|
}>;
|
|
97
165
|
onChange: (name: string, values: string) => void;
|
|
98
166
|
noFiltersLabel?: string;
|
|
@@ -138,6 +206,26 @@ declare interface IRulesFormTextValues {
|
|
|
138
206
|
termStart: string;
|
|
139
207
|
}
|
|
140
208
|
|
|
209
|
+
declare interface IRulesFormTextValues_2 {
|
|
210
|
+
cancel: string;
|
|
211
|
+
change: string;
|
|
212
|
+
changePlaceholder: string;
|
|
213
|
+
confirm: string;
|
|
214
|
+
criteria: string;
|
|
215
|
+
factsThatConditionIt: string;
|
|
216
|
+
none: string;
|
|
217
|
+
rangeMax: (label: string) => string;
|
|
218
|
+
rangeMin: (label: string) => string;
|
|
219
|
+
reasonForChange: string;
|
|
220
|
+
selectOption: string;
|
|
221
|
+
selectOptions: string;
|
|
222
|
+
termEnd: string;
|
|
223
|
+
terms?: string;
|
|
224
|
+
termStart: string;
|
|
225
|
+
effectiveFrom?: string;
|
|
226
|
+
validUntil?: string;
|
|
227
|
+
}
|
|
228
|
+
|
|
141
229
|
declare interface ITranslateOptions {
|
|
142
230
|
url: string;
|
|
143
231
|
apiKey: string;
|
|
@@ -145,6 +233,11 @@ declare interface ITranslateOptions {
|
|
|
145
233
|
|
|
146
234
|
export declare const ModalRules: (props: IModalRules) => ReactPortal;
|
|
147
235
|
|
|
236
|
+
export declare const parseRangeFromString: (value: string | number | string[] | IValue | undefined) => string | number | IValue | string[] | {
|
|
237
|
+
from?: number;
|
|
238
|
+
to?: number;
|
|
239
|
+
} | undefined;
|
|
240
|
+
|
|
148
241
|
export declare const revertSortedDataSampleSwitchPlaces: (props: IRevertSortedData) => {
|
|
149
242
|
conditionsThatEstablishesTheDecision: ICondition[];
|
|
150
243
|
businessRuleId?: string;
|
|
@@ -170,7 +263,7 @@ export declare const revertSortedDataSampleSwitchPlaces: (props: IRevertSortedDa
|
|
|
170
263
|
|
|
171
264
|
export declare const revertSortedDataSwitchPlaces: (props: IRevertSortedData) => IRuleDecision[] | undefined;
|
|
172
265
|
|
|
173
|
-
export declare const RulesForm: (props: IRulesForm) =>
|
|
266
|
+
export declare const RulesForm: (props: IRulesForm) => JSX.Element;
|
|
174
267
|
|
|
175
268
|
export declare const sortDisplayDataSampleSwitchPlaces: (props: IRevertSortedData) => {
|
|
176
269
|
businessRuleId?: string;
|