@isettingkit/business-rules 3.1.2 → 3.2.1

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,11 @@
1
1
  import { IButton } from '@inubekit/inubekit';
2
- import { ICondition as ICondition_2 } from '@isettingkit/input';
3
- import { IDecision } from '@isettingkit/input';
2
+ import { IButtonAppearance } from '@inubekit/inubekit';
4
3
  import { IOption } from '@inubekit/inubekit';
5
- import { IRuleDecision } from '@isettingkit/input';
6
- import { IValue } from '@isettingkit/input';
7
4
  import { JSX } from 'react/jsx-runtime';
8
5
  import { JSX as JSX_2 } from 'react';
6
+ import { NumberSchema } from 'yup';
9
7
  import { ReactPortal } from 'react';
10
- import { ValueDataType } from '@isettingkit/input';
11
- import { ValueHowToSetUp } from '@isettingkit/input';
8
+ import { StringSchema } from 'yup';
12
9
 
13
10
  export declare const BackAndNextButton: (props: IBackAndNextButton) => JSX.Element;
14
11
 
@@ -32,11 +29,48 @@ export declare const BusinessRuleView: (props: IBusinessRuleView) => JSX.Element
32
29
 
33
30
  export declare const BusinessRuleViewNew: (props: IBusinessRuleView_2) => JSX.Element;
34
31
 
32
+ export declare const Checkpicker: (props: ICheckpicker) => JSX.Element;
33
+
34
+ declare interface Condition {
35
+ valueUse: "RANGE" | "LIST_OF_VALUES_MULTI" | "EQUAL" | "GREATER_THAN" | "LESS_THAN";
36
+ listOfPossibleValues?: {
37
+ list?: string[];
38
+ };
39
+ conditionDataType: string;
40
+ decisionDataType?: string;
41
+ howToSetTheCondition: string;
42
+ howToSetTheDecision: string;
43
+ conditionName: string;
44
+ ruleName: string;
45
+ labelName: string;
46
+ placeholder?: string;
47
+ placeholderFrom?: string;
48
+ placeholderTo?: string;
49
+ }
50
+
35
51
  export declare const convertRangeToString: (value: {
36
52
  from: number;
37
53
  to: number;
38
54
  }) => string;
39
55
 
56
+ export declare const currencyFormat: (price: number | string) => string;
57
+
58
+ export declare const DecisionConditionRender: ({ condition, formik, isDecision, }: {
59
+ condition: Condition;
60
+ formik: FormikType;
61
+ isDecision?: boolean;
62
+ }) => JSX.Element | null;
63
+
64
+ export declare const DecisionConditionRenderNew: ({ condition, formik, isDecision, }: {
65
+ condition: IConditionNew;
66
+ formik: IFormikTypeNew;
67
+ isDecision?: boolean;
68
+ }) => JSX.Element | null;
69
+
70
+ export declare const DecisionViewConditionRenderer: (props: IDecisionViewConditionRenderer) => JSX.Element | null;
71
+
72
+ export declare const DecisionViewConditionRendererNew: (props: IDecisionViewConditionRendererNew) => JSX.Element | null;
73
+
40
74
  export declare const DragAndDropBoxes: (props: IDragAndDropBoxes) => JSX.Element;
41
75
 
42
76
  export declare const DraggableList: (props: IDraggableList) => JSX.Element;
@@ -45,6 +79,31 @@ export declare const DropdownMenu: (props: IDropdownMenu) => JSX.Element;
45
79
 
46
80
  export declare const DropdownMenuContainer: (props: IDropdownMenuContainer) => JSX.Element;
47
81
 
82
+ export declare const DynamicField: ({ type, name, label, value, onChange, messageValidate, statusValidate, onBlur, placeholder, }: IDynamicField) => JSX.Element | null;
83
+
84
+ export declare const DynamicFieldNew: (props: IDynamicField_2) => JSX.Element | null;
85
+
86
+ export declare const DynamicViewField: (props: IDynamicViewField) => JSX.Element;
87
+
88
+ export declare const DynamicViewFieldNew: (props: IDynamicViewFieldNew) => JSX.Element;
89
+
90
+ export declare enum EFieldType {
91
+ ALPHABETICAL = "alphabetical",
92
+ CURRENCY = "currency",
93
+ DATE = "date",
94
+ MONETARY = "monetary",
95
+ NUMBER = "number",
96
+ PERCENTAGE = "percentage"
97
+ }
98
+
99
+ export declare enum EFieldTypeNew {
100
+ ALPHABETICAL = "alphabetical",
101
+ CURRENCY = "currency",
102
+ DATE = "date",
103
+ NUMBER = "number",
104
+ PERCENTAGE = "percentage"
105
+ }
106
+
48
107
  export declare enum EValueHowToSetUp {
49
108
  EQUAL = "EqualTo",
50
109
  GREATER_THAN = "GreaterThan",
@@ -67,6 +126,8 @@ export declare const Filter: (props: IFilter) => JSX.Element;
67
126
 
68
127
  export declare const filterByGroup: <T>(obj: Record<string, T[]>, pred: (c: T) => boolean) => Record<string, T[]>;
69
128
 
129
+ export declare const FilterModal: (props: IFilterModal) => ReactPortal;
130
+
70
131
  export declare const flatFromGroups: <T>(obj: Record<string, T[]>) => T[];
71
132
 
72
133
  export declare const formatDecisionForBackend: (props: {
@@ -78,23 +139,23 @@ export declare const formatDecisionForBackend: (props: {
78
139
  value: any;
79
140
  conditionsThatEstablishesTheDecision: any;
80
141
  businessRuleId?: string;
81
- conditionDataType?: ValueDataType[keyof ValueDataType];
142
+ conditionDataType?: "number" | "alphabetical" | "currency" | "date" | "monetary" | "percentage";
82
143
  conditionName?: string;
83
144
  conditionGroups?: ICondition_2[];
84
145
  decision?: IDecision;
85
146
  decisions?: IDecision[];
86
- decisionDataType?: ValueDataType[keyof ValueDataType];
147
+ decisionDataType?: "number" | "alphabetical" | "currency" | "date" | "monetary" | "percentage";
87
148
  descriptionOfChange?: string;
88
149
  descriptionUse?: string;
89
150
  effectiveFrom?: Date | string;
90
- howToSetTheCondition?: ValueHowToSetUp[keyof ValueHowToSetUp];
91
- howToSetTheDecision?: ValueHowToSetUp[keyof ValueHowToSetUp];
151
+ howToSetTheCondition?: "EqualTo" | "GreaterThan" | "LessThan" | "ListOfValues" | "ListOfValuesMulti" | "Range";
152
+ howToSetTheDecision?: "EqualTo" | "GreaterThan" | "LessThan" | "ListOfValues" | "ListOfValuesMulti" | "Range";
92
153
  labelName?: string;
93
154
  placeholder?: string;
94
155
  placeholderFrom?: string;
95
156
  placeholderTo?: string;
96
157
  listOfPossibleValues?: IValue;
97
- ruleDataType?: ValueDataType[keyof ValueDataType];
158
+ ruleDataType?: "number" | "alphabetical" | "currency" | "date" | "monetary" | "percentage";
98
159
  ruleName?: string;
99
160
  timeUnit?: string;
100
161
  transactionOperation?: string;
@@ -102,8 +163,19 @@ export declare const formatDecisionForBackend: (props: {
102
163
  i18nValue?: string | string[] | number | IValue;
103
164
  };
104
165
 
166
+ export declare const formatValue: (value: number | string, type: ITextfieldInputType_4) => string | number;
167
+
105
168
  export declare const FormFilter: (props: IFormFilter) => JSX.Element;
106
169
 
170
+ declare interface FormikType {
171
+ setFieldValue: (field: string, value: any) => void;
172
+ setFieldTouched: (field: string, isTouched: boolean, shouldValidate?: boolean) => void;
173
+ values: Record<string, any>;
174
+ errors: Record<string, any>;
175
+ touched: Record<string, any>;
176
+ handleBlur: () => void;
177
+ }
178
+
107
179
  export declare const getConditionsByGroupNew: (raw: any) => Record<string, any[]>;
108
180
 
109
181
  export declare const groupsRecordToArrayNew: (record: Record<string, any[]>) => {
@@ -184,23 +256,22 @@ declare interface IBusinessRules_3 {
184
256
  controls?: boolean;
185
257
  customTitleContentAddCard?: string;
186
258
  customMessageEmptyDecisions?: string;
187
- decisions?: IRuleDecision[];
259
+ decisions?: IRuleDecisionNew[];
188
260
  editionMode?: "classic" | "versioned";
189
- textValues: IRulesFormTextValues_3;
190
- decisionTemplate: IRuleDecision;
261
+ decisionTemplate: IRuleDecisionNew;
191
262
  isRulesModalOpen: boolean;
192
- selectedDecision: IRuleDecision | null;
263
+ selectedDecision: IRuleDecisionNew | null;
193
264
  loading: boolean;
194
265
  configureDecisionModal: boolean;
195
266
  handleOpenModal?: () => void;
196
267
  handleCloseModal?: () => void;
197
- handleSubmitForm?: (dataDecision: IRuleDecision) => void;
198
- handleOpenRulesModal?: (checkedItems?: IOption[], decision?: IRuleDecision | null) => void;
268
+ handleSubmitForm?: (dataDecision: IRuleDecisionNew) => void;
269
+ handleOpenRulesModal?: (checkedItems?: IOption[], decision?: IRuleDecisionNew | null) => void;
199
270
  handleDelete?: (id: string) => void;
200
271
  terms?: boolean;
201
272
  onRemoveCondition?: (conditionName: string) => void;
202
273
  onRestoreConditions?: (conditionNames: string[]) => void;
203
- baseDecisionTemplate?: IRuleDecision;
274
+ baseDecisionTemplate?: IRuleDecisionNew;
204
275
  shouldRenderEmptyMessage?: boolean;
205
276
  withEditOption?: boolean;
206
277
  configurateDecisionOptions?: IOption[];
@@ -221,9 +292,8 @@ export declare interface IBusinessRuleView {
221
292
  declare interface IBusinessRuleView_2 {
222
293
  cardTitle?: boolean;
223
294
  controls?: boolean;
224
- decision?: IRuleDecision;
295
+ decision?: IRuleDecisionNew;
225
296
  loading?: boolean;
226
- textValues?: IRulesFormTextValues_3;
227
297
  position?: number;
228
298
  isOpen?: boolean;
229
299
  onToggle?: () => void;
@@ -233,6 +303,23 @@ declare interface IBusinessRuleView_2 {
233
303
  withEditOption?: boolean;
234
304
  }
235
305
 
306
+ declare interface ICheckpicker {
307
+ disabled?: boolean;
308
+ fullwidth?: boolean;
309
+ id?: string;
310
+ invalid?: boolean;
311
+ label?: string;
312
+ maxItems?: number;
313
+ message?: string;
314
+ name: string;
315
+ onChange: (name: string, values: string) => void;
316
+ options: IOption[];
317
+ placeholder?: string;
318
+ required?: boolean;
319
+ size?: ICheckpickerSize_3;
320
+ values: string;
321
+ }
322
+
236
323
  export declare interface ICheckpickerField {
237
324
  label?: string;
238
325
  name: string;
@@ -245,12 +332,78 @@ export declare interface ICheckpickerField {
245
332
  invalid?: boolean;
246
333
  }
247
334
 
335
+ declare type ICheckpickerSize = (typeof sizes)[number];
336
+
337
+ declare type ICheckpickerSize_2 = (typeof sizes_2)[number];
338
+
339
+ declare type ICheckpickerSize_3 = (typeof sizes_3)[number];
340
+
248
341
  export declare type IClientLabel = string;
249
342
 
250
343
  export declare interface ICondition<TData> {
251
344
  (data: TData): boolean;
252
345
  }
253
346
 
347
+ declare interface ICondition_2 {
348
+ conditionsThatEstablishesTheDecision?: ICondition_2[];
349
+ conditionDataType: (typeof ValueDataType)[keyof typeof ValueDataType];
350
+ hidden?: boolean;
351
+ conditionName: string;
352
+ listOfPossibleValues?: IValue;
353
+ switchPlaces?: boolean;
354
+ value?: string | string[] | number | IValue | undefined;
355
+ howToSetTheCondition: (typeof ValueHowToSetUp)[keyof typeof ValueHowToSetUp];
356
+ labelName: string;
357
+ descriptionUse?: string;
358
+ i18n?: Partial<Record<string, string>>;
359
+ i18nValue?: string | string[] | number | IValue;
360
+ }
361
+
362
+ declare interface IConditionNew {
363
+ groupKey?: string;
364
+ valueUse: "RANGE" | "LIST_OF_VALUES_MULTI" | "EQUAL" | "GREATER_THAN" | "LESS_THAN";
365
+ listOfPossibleValues?: {
366
+ list?: IOption[];
367
+ };
368
+ conditionDataType: string;
369
+ decisionDataType?: string;
370
+ howToSetTheCondition: string;
371
+ howToSetTheDecision: string;
372
+ conditionName: string;
373
+ ruleName: string;
374
+ labelName: string;
375
+ placeholder?: string;
376
+ placeholderFrom?: string;
377
+ placeholderTo?: string;
378
+ value?: string | string[] | number | IValue | undefined;
379
+ }
380
+
381
+ export declare interface IDecision {
382
+ decisionDataType: (typeof ValueDataType)[keyof typeof ValueDataType];
383
+ validUntil?: Date;
384
+ labelName: string;
385
+ ruleDataType: (typeof ValueDataType)[keyof typeof ValueDataType];
386
+ ruleName: string;
387
+ listOfPossibleValues?: IValue;
388
+ effectiveFrom?: Date;
389
+ value?: string | string[] | number | IValue | undefined;
390
+ howToSetTheDecision: (typeof ValueHowToSetUp)[keyof typeof ValueHowToSetUp];
391
+ descriptionUse?: string;
392
+ }
393
+
394
+ export declare interface IDecisionViewConditionRenderer {
395
+ element: IRuleDecision;
396
+ type?: "decision" | "condition";
397
+ valueData: string | string[] | number | IValue_2 | undefined;
398
+ }
399
+
400
+ export declare interface IDecisionViewConditionRendererNew {
401
+ element: IRuleDecisionNew;
402
+ type?: "decision" | "condition";
403
+ editionMode?: "classic" | "versioned";
404
+ valueData: string | string[] | number | IValue_3 | undefined;
405
+ }
406
+
254
407
  export declare interface IDragAndDropBoxes {
255
408
  group?: string;
256
409
  left: IDragAndDropColumn;
@@ -310,6 +463,35 @@ export declare interface IDropdownMenuGroup {
310
463
  path?: string;
311
464
  }
312
465
 
466
+ declare interface IDynamicField extends IFieldStrategy {
467
+ type: string;
468
+ }
469
+
470
+ declare interface IDynamicField_2 extends IFieldStrategyNew {
471
+ type: string;
472
+ listOfPossibleValues?: {
473
+ list?: IOption[];
474
+ };
475
+ }
476
+
477
+ export declare interface IDynamicViewField {
478
+ label: string;
479
+ labelType?: string;
480
+ type: ITextfieldInputType_5;
481
+ valueInput: number | string;
482
+ }
483
+
484
+ export declare interface IDynamicViewFieldNew {
485
+ label: string;
486
+ labelType?: string;
487
+ type: ITextfieldInputType_7;
488
+ valueInput: number | string;
489
+ stillValid: boolean;
490
+ showModal: boolean;
491
+ handleOnClick: () => void;
492
+ validDate: string;
493
+ }
494
+
313
495
  declare interface IEntriesGridNode<TData, TEntry> extends INodeBase<TData> {
314
496
  entries: IPath<TData>;
315
497
  keyOf: (entry: TEntry) => string;
@@ -319,6 +501,33 @@ declare interface IEntriesGridNode<TData, TEntry> extends INodeBase<TData> {
319
501
  valueOf: (entry: TEntry) => string;
320
502
  }
321
503
 
504
+ export declare interface IFieldStrategy {
505
+ label: string;
506
+ messageValidate?: string;
507
+ name: string;
508
+ onBlur?: () => void;
509
+ onChange: (value?: string | number | any) => void;
510
+ statusValidate?: string | IInputStatus;
511
+ value: string | number;
512
+ placeholder?: string;
513
+ }
514
+
515
+ declare interface IFieldStrategyNew {
516
+ label: string;
517
+ messageValidate?: string;
518
+ name: string;
519
+ placeholder?: string;
520
+ required?: boolean;
521
+ onBlur?: () => void;
522
+ onChange: (name: string, value: string | number) => void;
523
+ statusValidate?: string | IInputStatus;
524
+ value: string | number;
525
+ condition?: boolean;
526
+ listOfPossibleValues?: {
527
+ list?: IOption[];
528
+ };
529
+ }
530
+
322
531
  export declare interface IFilter {
323
532
  appliedFilters?: IFilterTag[];
324
533
  onClear: () => void;
@@ -328,6 +537,23 @@ export declare interface IFilter {
328
537
  titleFilter: string;
329
538
  }
330
539
 
540
+ export declare interface IFilterModal {
541
+ actionButtonLabel: string;
542
+ cancelButtonLabel?: string;
543
+ children: React.ReactNode;
544
+ loading?: boolean;
545
+ onClick: () => void;
546
+ onCloseModal: () => void;
547
+ portalId: string;
548
+ title: string;
549
+ withText?: boolean;
550
+ withDivider?: boolean;
551
+ withCancelButton?: boolean;
552
+ buttonAppearance?: IButtonAppearance;
553
+ withIconTitle?: boolean;
554
+ icon?: React.ReactNode;
555
+ }
556
+
331
557
  export declare interface IFilterTag {
332
558
  icon: JSX_2.Element;
333
559
  label: string;
@@ -343,11 +569,68 @@ export declare interface IFormFilter {
343
569
  noFiltersLabel?: string;
344
570
  }
345
571
 
572
+ declare interface IFormikTypeNew {
573
+ setFieldValue: (field: string, value: any) => void;
574
+ setFieldTouched: (field: string, isTouched: boolean, shouldValidate?: boolean) => void;
575
+ values: Record<string, any>;
576
+ errors: Record<string, any>;
577
+ touched: Record<string, any>;
578
+ handleBlur: () => void;
579
+ submitCount: number;
580
+ }
581
+
346
582
  declare interface IGroupNode<TData> extends INodeBase<TData> {
347
583
  children: Array<TSchemaNode<TData, any>>;
348
584
  type: "group";
349
585
  }
350
586
 
587
+ declare interface IInputRange {
588
+ handleInputChangeFrom: (valueFrom: number | Date) => void;
589
+ handleInputChangeTo: (valueTo: number | Date) => void;
590
+ id: string;
591
+ typeInput: ITextfieldInputType_2;
592
+ label: string;
593
+ required?: boolean;
594
+ valueFrom?: number | Date;
595
+ valueTo?: number | Date;
596
+ messageFrom?: string;
597
+ messageTo?: string;
598
+ statusFrom?: IInputStatus;
599
+ statusTo?: IInputStatus;
600
+ onBlur?: () => void;
601
+ placeholderFrom?: string;
602
+ placeholderTo?: string;
603
+ }
604
+
605
+ declare interface IInputRangeNew {
606
+ condition?: boolean;
607
+ handleInputChangeFrom: (valueFrom: number | Date | string) => void;
608
+ handleInputChangeTo: (valueTo: number | Date | string) => void;
609
+ id: string;
610
+ typeInput: ITextfieldInputType_3;
611
+ label: string;
612
+ required?: boolean;
613
+ valueFrom?: number | Date | string;
614
+ valueTo?: number | Date | string;
615
+ messageFrom?: string;
616
+ messageTo?: string;
617
+ statusFrom?: IInputStatus;
618
+ statusTo?: IInputStatus;
619
+ onBlur?: () => void;
620
+ listOfPossibleValues?: {
621
+ list?: IOption[];
622
+ };
623
+ onBlurFrom?: () => void;
624
+ onBlurTo?: () => void;
625
+ placeholderFrom?: string;
626
+ placeholderTo?: string;
627
+ }
628
+
629
+ export declare interface IInputStatus {
630
+ from?: string | number | Date;
631
+ to?: string | number | Date;
632
+ }
633
+
351
634
  declare interface IJsonNode<TData> extends INodeBase<TData> {
352
635
  type: "json";
353
636
  value: IPath<TData>;
@@ -372,11 +655,56 @@ declare interface IModalRules {
372
655
  description?: string;
373
656
  }
374
657
 
658
+ declare interface IMultipleChoices {
659
+ id: string;
660
+ labelSelect: string;
661
+ labelSelected: string;
662
+ options: IOption[];
663
+ placeholderSelect?: string;
664
+ required?: boolean;
665
+ message?: string;
666
+ onBlur?: () => void;
667
+ values: string;
668
+ onChange: (name: string, value: string) => void;
669
+ size?: ICheckpickerSize;
670
+ }
671
+
672
+ declare interface IMultipleChoicesNew {
673
+ condition?: boolean;
674
+ id: string;
675
+ labelSelect: string;
676
+ labelSelected: string;
677
+ options: IOption[];
678
+ placeholderSelect?: string;
679
+ required?: boolean;
680
+ message?: string;
681
+ onBlur?: () => void;
682
+ values: string;
683
+ onChange: (name: string, value: string) => void;
684
+ size?: ICheckpickerSize_2;
685
+ }
686
+
375
687
  declare interface INodeBase<TData> {
376
688
  id: string;
377
689
  when?: ICondition<TData>;
378
690
  }
379
691
 
692
+ export declare const InputRange: (props: IInputRange) => JSX.Element;
693
+
694
+ export declare const InputRangeNew: (props: IInputRangeNew) => JSX.Element;
695
+
696
+ declare interface IOptionItemChecked {
697
+ id: string;
698
+ label: string;
699
+ checked?: boolean;
700
+ }
701
+
702
+ declare interface IOptionItemChecked_2 {
703
+ id: string;
704
+ label: string;
705
+ checked?: boolean;
706
+ }
707
+
380
708
  export declare type IPath<TData> = string | IPathFn<TData>;
381
709
 
382
710
  declare interface IPathFn<TData> {
@@ -401,6 +729,64 @@ declare interface IRevertSortedData {
401
729
  originalDecision?: IRuleDecision;
402
730
  }
403
731
 
732
+ export declare interface IRuleDecision {
733
+ businessRuleId?: string;
734
+ conditionDataType?: (typeof ValueDataType)[keyof typeof ValueDataType];
735
+ conditionName?: string;
736
+ conditionGroups?: ICondition_2[];
737
+ conditionsThatEstablishesTheDecision?: ICondition_2[];
738
+ decision?: IDecision;
739
+ decisions?: IDecision[];
740
+ decisionDataType?: (typeof ValueDataType)[keyof typeof ValueDataType];
741
+ decisionId?: string;
742
+ descriptionOfChange?: string;
743
+ descriptionUse?: string;
744
+ effectiveFrom?: Date | string;
745
+ howToSetTheCondition?: (typeof ValueHowToSetUp)[keyof typeof ValueHowToSetUp];
746
+ howToSetTheDecision?: (typeof ValueHowToSetUp)[keyof typeof ValueHowToSetUp];
747
+ labelName?: string;
748
+ placeholder?: string;
749
+ placeholderFrom?: string;
750
+ placeholderTo?: string;
751
+ listOfPossibleValues?: IValue;
752
+ ruleDataType?: (typeof ValueDataType)[keyof typeof ValueDataType];
753
+ ruleName?: string;
754
+ timeUnit?: string;
755
+ transactionOperation?: string;
756
+ validUntil?: Date | string;
757
+ value?: string | string[] | number | IValue | undefined;
758
+ i18nValue?: string | string[] | number | IValue;
759
+ }
760
+
761
+ export declare interface IRuleDecisionNew {
762
+ businessRuleId?: string;
763
+ conditionDataType?: EFieldTypeNew;
764
+ conditionName?: string;
765
+ conditionGroups?: ICondition_2[];
766
+ conditionsThatEstablishesTheDecision?: ICondition_2[];
767
+ decision?: IDecision;
768
+ decisions?: IDecision[];
769
+ decisionDataType?: EFieldTypeNew;
770
+ decisionId?: string;
771
+ descriptionOfChange?: string;
772
+ descriptionUse?: string;
773
+ effectiveFrom?: Date | string;
774
+ howToSetTheCondition?: (typeof ValueHowToSetUp)[keyof typeof ValueHowToSetUp];
775
+ howToSetTheDecision?: (typeof ValueHowToSetUp)[keyof typeof ValueHowToSetUp];
776
+ labelName?: string;
777
+ placeholder?: string;
778
+ placeholderFrom?: string;
779
+ placeholderTo?: string;
780
+ listOfPossibleValues?: IValue;
781
+ ruleDataType?: EFieldTypeNew;
782
+ ruleName?: string;
783
+ timeUnit?: string;
784
+ transactionOperation?: string;
785
+ validUntil?: Date | string;
786
+ value?: string | string[] | number | IValue | undefined;
787
+ i18nValue?: string | string[] | number | IValue;
788
+ }
789
+
404
790
  export declare interface IRulesForm {
405
791
  decision: IRuleDecision;
406
792
  onCancel?: () => void;
@@ -444,26 +830,6 @@ declare interface IRulesFormTextValues_2 {
444
830
  termStart: string;
445
831
  }
446
832
 
447
- declare interface IRulesFormTextValues_3 {
448
- cancel: string;
449
- change: string;
450
- changePlaceholder: string;
451
- confirm: string;
452
- criteria: string;
453
- factsThatConditionIt: string;
454
- none: string;
455
- rangeMax: (label: string) => string;
456
- rangeMin: (label: string) => string;
457
- reasonForChange: string;
458
- selectOption: string;
459
- selectOptions: string;
460
- termEnd: string;
461
- terms?: string;
462
- termStart: string;
463
- effectiveFrom?: string;
464
- validUntil?: string;
465
- }
466
-
467
833
  export declare interface IStepSchema<TData> {
468
834
  id: string;
469
835
  name: string;
@@ -473,11 +839,74 @@ export declare interface IStepSchema<TData> {
473
839
  }) => void;
474
840
  }
475
841
 
842
+ export declare type IStrategy = keyof typeof strategies;
843
+
844
+ export declare interface ITextfieldInputType {
845
+ [key: string]: string | number | string[] | {
846
+ from?: number;
847
+ to?: number;
848
+ };
849
+ }
850
+
851
+ declare type ITextfieldInputType_2 = EFieldType;
852
+
853
+ declare type ITextfieldInputType_3 = EFieldTypeNew;
854
+
855
+ declare type ITextfieldInputType_4 = EFieldType | EFieldTypeNew;
856
+
857
+ declare type ITextfieldInputType_5 = EFieldType;
858
+
859
+ declare type ITextfieldInputType_6 = EFieldType;
860
+
861
+ declare type ITextfieldInputType_7 = EFieldTypeNew;
862
+
476
863
  declare interface ITranslateOptions {
477
864
  url: string;
478
865
  apiKey: string;
479
866
  }
480
867
 
868
+ export declare interface IValue {
869
+ from?: number | string | Date;
870
+ labelFrom?: string;
871
+ labelTo?: string;
872
+ list?: string[];
873
+ listSelected?: string[];
874
+ messageFrom?: string;
875
+ messageTo?: string;
876
+ statusFrom?: IInputStatus;
877
+ statusTo?: IInputStatus;
878
+ to?: number | string | Date;
879
+ value?: string | number | string[];
880
+ }
881
+
882
+ declare interface IValue_2 {
883
+ list?: string[];
884
+ listSelected?: string[];
885
+ labelFrom?: string;
886
+ labelTo?: string;
887
+ from?: number | string | Date;
888
+ to?: number | string | Date;
889
+ value?: string | number;
890
+ messageFrom?: string;
891
+ messageTo?: string;
892
+ statusFrom?: IInputStatus;
893
+ statusTo?: IInputStatus;
894
+ }
895
+
896
+ declare interface IValue_3 {
897
+ list?: string[];
898
+ listSelected?: string[];
899
+ labelFrom?: string;
900
+ labelTo?: string;
901
+ from?: number | string | Date;
902
+ to?: number | string | Date;
903
+ value?: string | number;
904
+ messageFrom?: string;
905
+ messageTo?: string;
906
+ statusFrom?: IInputStatus;
907
+ statusTo?: IInputStatus;
908
+ }
909
+
481
910
  declare interface IVerificationEngine<TData> {
482
911
  data: TData;
483
912
  isMobile: boolean;
@@ -490,38 +919,84 @@ export declare interface IVerificationSchema<TData> {
490
919
  steps: IStepSchema<TData>[];
491
920
  }
492
921
 
922
+ export declare interface IViewMultipleChoices {
923
+ id: string;
924
+ label: string;
925
+ options: IOptionItemChecked[];
926
+ }
927
+
928
+ export declare interface IViewMultipleChoicesNew {
929
+ id: string;
930
+ label: string;
931
+ options: IOptionItemChecked_2[];
932
+ stillValid: boolean;
933
+ showModal: boolean;
934
+ handleOnClick: () => void;
935
+ validDate: string;
936
+ }
937
+
938
+ export declare interface IViewRangeField {
939
+ labelFrom?: string;
940
+ labelType?: string;
941
+ typeInput: ITextfieldInputType_6;
942
+ valueFrom?: string | number;
943
+ valueTo?: string | number;
944
+ }
945
+
946
+ export declare interface IViewRangeFieldNew {
947
+ labelFrom?: string;
948
+ labelType?: string;
949
+ typeInput: EFieldTypeNew;
950
+ valueFrom?: string | number;
951
+ valueTo?: string | number;
952
+ stillValid: boolean;
953
+ showModal: boolean;
954
+ handleOnClick: () => void;
955
+ validDate: string;
956
+ }
957
+
493
958
  export declare const mapByGroupNew: (raw: any, mapFn: (condition: any) => any) => Record<string, any[]>;
494
959
 
495
960
  export declare const ModalRules: (props: IModalRules) => ReactPortal;
496
961
 
962
+ export declare const MultipleChoices: (props: IMultipleChoices) => JSX.Element;
963
+
964
+ export declare const MultipleChoicesNew: (props: IMultipleChoicesNew) => JSX.Element;
965
+
497
966
  export declare const normalizeDecisionToNewShape: (decision: any) => any;
498
967
 
499
- export declare const parseRangeFromString: (value: string | number | string[] | IValue | undefined) => string | number | IValue | string[] | {
968
+ export declare const parseCurrencyString: (currencyString: string) => number;
969
+
970
+ export declare const parsePercentageString: (percentageString: string) => number;
971
+
972
+ export declare const parseRangeFromString: (value: string | number | string[] | IValue | undefined) => string | number | string[] | IValue | {
500
973
  from?: number;
501
974
  to?: number;
502
975
  } | undefined;
503
976
 
977
+ export declare const percentageFormat: (percentage: number | string) => string;
978
+
504
979
  export declare const revertSortedDataSampleSwitchPlaces: (props: IRevertSortedData) => {
505
980
  conditionsThatEstablishesTheDecision: ICondition_2[];
506
981
  businessRuleId?: string;
507
- conditionDataType?: ValueDataType[keyof ValueDataType];
982
+ conditionDataType?: "number" | "alphabetical" | "currency" | "date" | "monetary" | "percentage";
508
983
  conditionName?: string;
509
984
  conditionGroups?: ICondition_2[];
510
985
  decision?: IDecision;
511
986
  decisions?: IDecision[];
512
- decisionDataType?: ValueDataType[keyof ValueDataType];
987
+ decisionDataType?: "number" | "alphabetical" | "currency" | "date" | "monetary" | "percentage";
513
988
  decisionId?: string;
514
989
  descriptionOfChange?: string;
515
990
  descriptionUse?: string;
516
991
  effectiveFrom?: Date | string;
517
- howToSetTheCondition?: ValueHowToSetUp[keyof ValueHowToSetUp];
518
- howToSetTheDecision?: ValueHowToSetUp[keyof ValueHowToSetUp];
992
+ howToSetTheCondition?: "EqualTo" | "GreaterThan" | "LessThan" | "ListOfValues" | "ListOfValuesMulti" | "Range";
993
+ howToSetTheDecision?: "EqualTo" | "GreaterThan" | "LessThan" | "ListOfValues" | "ListOfValuesMulti" | "Range";
519
994
  labelName?: string;
520
995
  placeholder?: string;
521
996
  placeholderFrom?: string;
522
997
  placeholderTo?: string;
523
998
  listOfPossibleValues?: IValue;
524
- ruleDataType?: ValueDataType[keyof ValueDataType];
999
+ ruleDataType?: "number" | "alphabetical" | "currency" | "date" | "monetary" | "percentage";
525
1000
  ruleName?: string;
526
1001
  timeUnit?: string;
527
1002
  transactionOperation?: string;
@@ -536,27 +1011,33 @@ export declare const RulesForm: (props: IRulesForm) => JSX.Element;
536
1011
 
537
1012
  export declare const SendButton: (props: IButton) => JSX.Element;
538
1013
 
1014
+ declare const sizes: readonly ["wide", "compact"];
1015
+
1016
+ declare const sizes_2: readonly ["wide", "compact"];
1017
+
1018
+ declare const sizes_3: readonly ["wide", "compact"];
1019
+
539
1020
  export declare const sortDisplayDataSampleSwitchPlaces: (props: IRevertSortedData) => {
540
1021
  businessRuleId?: string;
541
- conditionDataType?: ValueDataType[keyof ValueDataType];
1022
+ conditionDataType?: "number" | "alphabetical" | "currency" | "date" | "monetary" | "percentage";
542
1023
  conditionName?: string;
543
1024
  conditionGroups?: ICondition_2[];
544
1025
  conditionsThatEstablishesTheDecision?: ICondition_2[];
545
1026
  decision?: IDecision;
546
1027
  decisions?: IDecision[];
547
- decisionDataType?: ValueDataType[keyof ValueDataType];
1028
+ decisionDataType?: "number" | "alphabetical" | "currency" | "date" | "monetary" | "percentage";
548
1029
  decisionId?: string;
549
1030
  descriptionOfChange?: string;
550
1031
  descriptionUse?: string;
551
1032
  effectiveFrom?: Date | string;
552
- howToSetTheCondition?: ValueHowToSetUp[keyof ValueHowToSetUp];
553
- howToSetTheDecision?: ValueHowToSetUp[keyof ValueHowToSetUp];
1033
+ howToSetTheCondition?: "EqualTo" | "GreaterThan" | "LessThan" | "ListOfValues" | "ListOfValuesMulti" | "Range";
1034
+ howToSetTheDecision?: "EqualTo" | "GreaterThan" | "LessThan" | "ListOfValues" | "ListOfValuesMulti" | "Range";
554
1035
  labelName?: string;
555
1036
  placeholder?: string;
556
1037
  placeholderFrom?: string;
557
1038
  placeholderTo?: string;
558
1039
  listOfPossibleValues?: IValue;
559
- ruleDataType?: ValueDataType[keyof ValueDataType];
1040
+ ruleDataType?: "number" | "alphabetical" | "currency" | "date" | "monetary" | "percentage";
560
1041
  ruleName?: string;
561
1042
  timeUnit?: string;
562
1043
  transactionOperation?: string;
@@ -567,6 +1048,57 @@ export declare const sortDisplayDataSampleSwitchPlaces: (props: IRevertSortedDat
567
1048
 
568
1049
  export declare const sortDisplayDataSwitchPlaces: (props: IRevertSortedData) => IRuleDecision[] | undefined;
569
1050
 
1051
+ declare const strategies: {
1052
+ LIST_OF_VALUES: ({ condition, formik, }: {
1053
+ condition: Condition;
1054
+ formik: FormikType;
1055
+ }) => JSX.Element;
1056
+ LIST_OF_VALUES_MULTI: ({ condition, formik, }: {
1057
+ condition: Condition;
1058
+ formik: FormikType;
1059
+ }) => JSX.Element;
1060
+ RANGE: ({ condition, formik, }: {
1061
+ condition: Condition;
1062
+ formik: FormikType;
1063
+ }) => JSX.Element;
1064
+ GREATER_THAN: ({ condition, formik, }: {
1065
+ condition: Condition;
1066
+ formik: FormikType;
1067
+ }) => JSX.Element;
1068
+ LESS_THAN: ({ condition, formik, }: {
1069
+ condition: Condition;
1070
+ formik: FormikType;
1071
+ }) => JSX.Element;
1072
+ EQUAL: ({ condition, formik, }: {
1073
+ condition: Condition;
1074
+ formik: FormikType;
1075
+ }) => JSX.Element;
1076
+ DECISION_RANGE: ({ condition, formik, }: {
1077
+ condition: Condition;
1078
+ formik: FormikType;
1079
+ }) => JSX.Element;
1080
+ DECISION_LIST_OF_VALUES: ({ condition, formik, }: {
1081
+ condition: Condition;
1082
+ formik: FormikType;
1083
+ }) => JSX.Element;
1084
+ DECISION_LIST_OF_VALUES_MULTI: ({ condition, formik, }: {
1085
+ condition: Condition;
1086
+ formik: FormikType;
1087
+ }) => JSX.Element;
1088
+ DECISION_EQUAL: ({ condition, formik, }: {
1089
+ condition: Condition;
1090
+ formik: FormikType;
1091
+ }) => JSX.Element;
1092
+ DECISION_GREATER_THAN: ({ condition, formik, }: {
1093
+ condition: Condition;
1094
+ formik: FormikType;
1095
+ }) => JSX.Element;
1096
+ DECISION_LESS_THAN: ({ condition, formik, }: {
1097
+ condition: Condition;
1098
+ formik: FormikType;
1099
+ }) => JSX.Element;
1100
+ };
1101
+
570
1102
  export declare type TLinkItem = {
571
1103
  id: string;
572
1104
  label: string;
@@ -581,6 +1113,48 @@ export declare type TRegistry<TData> = Record<TSchemaNode<TData, any>["type"], I
581
1113
 
582
1114
  export declare type TSchemaNode<TData, TEntry> = IAttributesGridNode<TData> | IEntriesGridNode<TData, TEntry> | IGroupNode<TData> | IJsonNode<TData>;
583
1115
 
1116
+ export declare interface TypeDataOutput {
1117
+ schema: StringSchema | NumberSchema;
1118
+ value: string | number | {
1119
+ from: number;
1120
+ to: number;
1121
+ } | undefined;
1122
+ }
1123
+
1124
+ export declare const useValidUntilManagement: (validUntil: string) => {
1125
+ showModal: boolean;
1126
+ handleOnClick: () => void;
1127
+ stillValid: boolean;
1128
+ };
1129
+
1130
+ export declare const validationStrategies: Record<EFieldTypeNew, (value: string) => boolean>;
1131
+
1132
+ export declare const ValueDataType: {
1133
+ readonly ALPHABETICAL: "alphabetical";
1134
+ readonly CURRENCY: "currency";
1135
+ readonly MONETARY: "monetary";
1136
+ readonly DATE: "date";
1137
+ readonly NUMBER: "number";
1138
+ readonly PERCENTAGE: "percentage";
1139
+ };
1140
+
1141
+ export declare const ValueHowToSetUp: {
1142
+ readonly EQUAL: "EqualTo";
1143
+ readonly GREATER_THAN: "GreaterThan";
1144
+ readonly LESS_THAN: "LessThan";
1145
+ readonly LIST_OF_VALUES: "ListOfValues";
1146
+ readonly LIST_OF_VALUES_MULTI: "ListOfValuesMulti";
1147
+ readonly RANGE: "Range";
1148
+ };
1149
+
584
1150
  export declare function Verification<TData>(props: IVerificationEngine<TData>): JSX.Element;
585
1151
 
1152
+ export declare const ViewMultipleChoices: (props: IViewMultipleChoices) => JSX.Element;
1153
+
1154
+ export declare const ViewMultipleChoicesNew: (props: IViewMultipleChoicesNew) => JSX.Element;
1155
+
1156
+ export declare const ViewRangeField: (props: IViewRangeField) => JSX.Element;
1157
+
1158
+ export declare const ViewRangeFieldNew: (props: IViewRangeFieldNew) => JSX.Element;
1159
+
586
1160
  export { }