intelicoreact 1.8.8 → 1.8.10

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.
Files changed (128) hide show
  1. package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.jsx +18 -1
  2. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.jsx +121 -1
  3. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.jsx +507 -1
  4. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.jsx +46 -1
  5. package/dist/Atomic/FormElements/NumericInput/NumericInput.jsx +337 -1
  6. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.jsx +66 -1
  7. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.jsx +78 -1
  8. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.jsx +54 -1
  9. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.jsx +183 -1
  10. package/dist/Atomic/FormElements/RangeList/RangeList.jsx +181 -1
  11. package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.jsx +41 -1
  12. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.jsx +449 -1
  13. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.jsx +865 -1
  14. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.jsx +37 -1
  15. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.jsx +48 -1
  16. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.jsx +62 -1
  17. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.jsx +175 -1
  18. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.jsx +65 -1
  19. package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.jsx +118 -1
  20. package/dist/Atomic/FormElements/Text/Text.jsx +126 -1
  21. package/dist/Atomic/FormElements/Textarea/Textarea.jsx +61 -1
  22. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.jsx +181 -1
  23. package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.jsx +60 -1
  24. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.jsx +83 -1
  25. package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.jsx +80 -1
  26. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.jsx +103 -1
  27. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.jsx +115 -1
  28. package/dist/Atomic/Layout/Header/Header.jsx +86 -1
  29. package/dist/Atomic/Layout/MainMenu/MainMenu.jsx +164 -1
  30. package/dist/Atomic/UI/AccordionTable/AccordionTable.jsx +250 -1
  31. package/dist/Atomic/UI/AccordionText/AccordionText.jsx +68 -1
  32. package/dist/Atomic/UI/Arrow/Arrow.jsx +134 -1
  33. package/dist/Atomic/UI/Box/Box.jsx +53 -1
  34. package/dist/Atomic/UI/Chart/Chart.jsx +178 -1
  35. package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.jsx +78 -1
  36. package/dist/Atomic/UI/Chart/partial/optionsConstructor.jsx +334 -1
  37. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.jsx +111 -1
  38. package/dist/Atomic/UI/DateTime/DateTime.jsx +57 -1
  39. package/dist/Atomic/UI/DebugContainer/DebugContainer.jsx +44 -1
  40. package/dist/Atomic/UI/DebugContainer/useDebugContainer.jsx +15 -1
  41. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.jsx +223 -1
  42. package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.jsx +75 -1
  43. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.jsx +86 -1
  44. package/dist/Atomic/UI/PieChart/PieChart.jsx +41 -1
  45. package/dist/Atomic/UI/Table/Partials/TdCell.jsx +87 -1
  46. package/dist/Atomic/UI/Table/Partials/TdHeader.jsx +36 -1
  47. package/dist/Atomic/UI/Table/Partials/TdRow.jsx +103 -1
  48. package/dist/Atomic/UI/Table/Partials/TdTitle.jsx +55 -1
  49. package/dist/Atomic/UI/Table/Table.jsx +63 -1
  50. package/dist/Atomic/UI/Table/TdTypes/TdActions.jsx +80 -1
  51. package/dist/Atomic/UI/Table/TdTypes/TdPriority.jsx +26 -1
  52. package/dist/Atomic/UI/Table/TdTypes/TdRange.jsx +13 -1
  53. package/dist/Atomic/UI/Table/TdTypes/TdWeight.jsx +56 -1
  54. package/dist/Atomic/UI/TagList/TagList.jsx +256 -1
  55. package/dist/Atomic/UI/WizardStepper/constructor.jsx +86 -1
  56. package/dist/Classes/RESTAPI/partials/CredentialsProcessing.jsx +254 -1
  57. package/dist/Functions/customEventListener.jsx +96 -1
  58. package/dist/Functions/operations.jsx +138 -1
  59. package/dist/Functions/useFormTools/functions/RenderFields.jsx +108 -1
  60. package/dist/Functions/useFormTools/index.jsx +777 -1
  61. package/dist/Functions/usePasswordChecker.jsx +128 -1
  62. package/dist/Functions/utils.jsx +492 -1
  63. package/dist/Molecular/CustomIcons/components/AffiliateNetworks.jsx +22 -1
  64. package/dist/Molecular/CustomIcons/components/AlertCircle.jsx +24 -1
  65. package/dist/Molecular/CustomIcons/components/AppStore.jsx +30 -1
  66. package/dist/Molecular/CustomIcons/components/Arrow.jsx +33 -1
  67. package/dist/Molecular/CustomIcons/components/ArrowDown.jsx +18 -1
  68. package/dist/Molecular/CustomIcons/components/ArrowLeft.jsx +23 -1
  69. package/dist/Molecular/CustomIcons/components/ArrowRight.jsx +23 -1
  70. package/dist/Molecular/CustomIcons/components/ArrowUp.jsx +18 -1
  71. package/dist/Molecular/CustomIcons/components/Bell.jsx +16 -1
  72. package/dist/Molecular/CustomIcons/components/Button.jsx +13 -1
  73. package/dist/Molecular/CustomIcons/components/Campaigns.jsx +17 -1
  74. package/dist/Molecular/CustomIcons/components/Check.jsx +15 -1
  75. package/dist/Molecular/CustomIcons/components/Check2.jsx +13 -1
  76. package/dist/Molecular/CustomIcons/components/ChevronDown.jsx +13 -1
  77. package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.jsx +12 -1
  78. package/dist/Molecular/CustomIcons/components/ChevronLeft.jsx +12 -1
  79. package/dist/Molecular/CustomIcons/components/ChevronRight.jsx +12 -1
  80. package/dist/Molecular/CustomIcons/components/ChevronUp.jsx +12 -1
  81. package/dist/Molecular/CustomIcons/components/ChevronUpDown.jsx +28 -1
  82. package/dist/Molecular/CustomIcons/components/Close.jsx +15 -1
  83. package/dist/Molecular/CustomIcons/components/ColumnsOrder.jsx +18 -1
  84. package/dist/Molecular/CustomIcons/components/Delete.jsx +17 -1
  85. package/dist/Molecular/CustomIcons/components/Edit.jsx +16 -1
  86. package/dist/Molecular/CustomIcons/components/Email.jsx +32 -1
  87. package/dist/Molecular/CustomIcons/components/FinturfLogo.jsx +19 -1
  88. package/dist/Molecular/CustomIcons/components/FinturfLogo2.jsx +36 -1
  89. package/dist/Molecular/CustomIcons/components/Flows.jsx +16 -1
  90. package/dist/Molecular/CustomIcons/components/Gift.jsx +26 -1
  91. package/dist/Molecular/CustomIcons/components/GoogleAuth.jsx +30 -1
  92. package/dist/Molecular/CustomIcons/components/GooglePlay.jsx +30 -1
  93. package/dist/Molecular/CustomIcons/components/HelpCircle.jsx +20 -1
  94. package/dist/Molecular/CustomIcons/components/HelpCircle2.jsx +21 -1
  95. package/dist/Molecular/CustomIcons/components/HelpCircleFilled.jsx +20 -1
  96. package/dist/Molecular/CustomIcons/components/Home.jsx +17 -1
  97. package/dist/Molecular/CustomIcons/components/Home2.jsx +23 -1
  98. package/dist/Molecular/CustomIcons/components/Key.jsx +24 -1
  99. package/dist/Molecular/CustomIcons/components/Landers.jsx +21 -1
  100. package/dist/Molecular/CustomIcons/components/Lock.jsx +16 -1
  101. package/dist/Molecular/CustomIcons/components/Mail.jsx +27 -1
  102. package/dist/Molecular/CustomIcons/components/Mastercard.jsx +74 -1
  103. package/dist/Molecular/CustomIcons/components/Minus.jsx +26 -1
  104. package/dist/Molecular/CustomIcons/components/Offers.jsx +17 -1
  105. package/dist/Molecular/CustomIcons/components/Pause.jsx +29 -1
  106. package/dist/Molecular/CustomIcons/components/PayPal.jsx +42 -1
  107. package/dist/Molecular/CustomIcons/components/PayPalLightLarge.jsx +29 -1
  108. package/dist/Molecular/CustomIcons/components/Phone.jsx +31 -1
  109. package/dist/Molecular/CustomIcons/components/Play.jsx +26 -1
  110. package/dist/Molecular/CustomIcons/components/Plus.jsx +26 -1
  111. package/dist/Molecular/CustomIcons/components/Profile.jsx +17 -1
  112. package/dist/Molecular/CustomIcons/components/QRCode.jsx +30 -1
  113. package/dist/Molecular/CustomIcons/components/Rectangle.jsx +13 -1
  114. package/dist/Molecular/CustomIcons/components/Revert.jsx +14 -1
  115. package/dist/Molecular/CustomIcons/components/Star.jsx +15 -1
  116. package/dist/Molecular/CustomIcons/components/Star2.jsx +17 -1
  117. package/dist/Molecular/CustomIcons/components/TrafficSources.jsx +15 -1
  118. package/dist/Molecular/CustomIcons/components/Trash.jsx +16 -1
  119. package/dist/Molecular/CustomIcons/components/TrashRed.jsx +16 -1
  120. package/dist/Molecular/CustomIcons/components/Triggers.jsx +16 -1
  121. package/dist/Molecular/CustomIcons/components/User.jsx +26 -1
  122. package/dist/Molecular/CustomIcons/components/Visa.jsx +32 -1
  123. package/dist/Molecular/CustomIcons/components/X.jsx +13 -1
  124. package/dist/Molecular/FormElement/FormElement.jsx +52 -1
  125. package/dist/Molecular/FormWithDependOn/FormWithDependOn.jsx +161 -1
  126. package/dist/Molecular/InputAddress/InputAddress.jsx +641 -1
  127. package/dist/Molecular/InputPassword/InputPassword.jsx +50 -1
  128. package/package.json +1 -1
@@ -1 +1,334 @@
1
- function t(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function n(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{},e=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(i).filter(function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable}))),e.forEach(function(o){t(n,o,i[o])})}return n}function o(t,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);o.push.apply(o,i)}return o})(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}),t}import{FINTURF_TOOLTIP_OPTIONS as i,GRADIENTS_OBJECTS as e}from"./Chart.constants";import r from"./optionsSetters";export var reactChartJsOptionsLayouts={lineIconLayout:{options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!1},y:{display:!1}},elements:{point:{radius:0},line:{tension:.45,borderJoinStyle:"round",borderWidth:2,capBezierPoints:!0}}},redraw:!0,notLibraryOptions:{chartTypeKey:"Line",setCanvasDimensions:{width:"75px",height:"35px"}}},lineLayout:{options:{responsive:!0,elements:{point:{radius:4,pointStyle:"circle",backgroundColor:"#FFFFFF",color:"#FFFFFF"},line:{tension:.45,borderJoinStyle:"round",borderWidth:2,capBezierPoints:!0}}},redraw:!0,notLibraryOptions:{chartTypeKey:"Line"}},barLayout:{options:{responsive:!0,elements:{bar:{borderRadius:10}}},redraw:!0,notLibraryOptions:{chartTypeKey:"Bar"}},emptyLayout:{options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!1},y:{display:!1}},elements:{point:{radius:0},line:{borderWidth:0}}},notLibraryOptions:{chartTypeKey:"Line"}}};var a,s,l,u,p,y,d,c,b,L,f,O,m,h,g,v,C,J,F,w,P,S,D,j,x=["barLayout","lineLayout"].reduce(function(i,e){var r,a,s,l,u,p,y,d,c,b,L,f,O,m,h,g,v;return o(n({},i),t({},e,o(n({},reactChartJsOptionsLayouts[e]),{options:o(n({},reactChartJsOptionsLayouts[e].options),{scales:o(n({},null==(r=reactChartJsOptionsLayouts[e].options)?void 0:r.scales),{x:o(n({},null==(s=reactChartJsOptionsLayouts[e].options)||null==(a=s.scales)?void 0:a.x),{grid:o(n({},null==(p=reactChartJsOptionsLayouts[e].options)||null==(u=p.scales)||null==(l=u.x)?void 0:l.grid),{display:!1,offset:!0}),ticks:o(n({},null==(c=reactChartJsOptionsLayouts[e].options)||null==(d=c.scales)||null==(y=d.y)?void 0:y.ticks),{autoSkipPadding:10,align:"center",color:"#757F8C",lineHeight:18,font:{family:"Sarabun",style:"normal",weight:400,size:8}})}),y:o(n({},null==(L=reactChartJsOptionsLayouts[e].options)||null==(b=L.scales)?void 0:b.y),{min:0,bounds:"data",grid:o(n({},null==(m=reactChartJsOptionsLayouts[e].options)||null==(O=m.scales)||null==(f=O.y)?void 0:f.grid),{borderColor:"#E1E8F1",color:"#E1E8F1",borderDash:[5],drawTicks:!1,z:-1}),ticks:o(n({},null==(v=reactChartJsOptionsLayouts[e].options)||null==(g=v.scales)||null==(h=g.y)?void 0:h.ticks),{autoSkipPadding:10,align:"center",color:"#A0A4B0",lineHeight:18,padding:6,font:{family:"Sarabun",style:"normal",weight:400,size:10}})})})}),notLibraryOptions:o(n({},reactChartJsOptionsLayouts[e].notLibraryOptions),{setCanvasDimensions:{height:"194px"}})})))},{}),k=o(n({},x.barLayout),{options:o(n({},null==(a=x.barLayout)?void 0:a.options),{maintainAspectRatio:!1,elements:o(n({},null==(l=x.barLayout)||null==(s=l.options)?void 0:s.elements),{bar:o(n({},null==(y=x.barLayout)||null==(p=y.options)||null==(u=p.elements)?void 0:u.bar),{borderRadius:4})})}),notLibraryOptions:o(n({},null==(d=x.barLayout)?void 0:d.notLibraryOptions),{changeData:o(n({},null==(b=x.barLayout)||null==(c=b.notLibraryOptions)?void 0:c.changeData),{setMaxBarThickness:16})})}),A=o(n({},x.lineLayout),{options:o(n({},null==(L=x.lineLayout)?void 0:L.options),{maintainAspectRatio:!1,elements:o(n({},null==(f=x.lineLayout.options)?void 0:f.elements),{point:o(n({},null==(m=x.lineLayout.options)||null==(O=m.elements)?void 0:O.point),{radius:2,borderColor:"#32A784",borderWidth:4})})})});export var finturfReactChartJsOptions={finturfChartBar:r(k,{addGradientsSettings:e.finturf.bar,addTooltipOptions:i}),finturfLoadingModeBar:o(n({},k),{options:o(n({},k.options),{animations:o(n({},null==(h=k.options)?void 0:h.animations),{y:o(n({},null==(v=k.options)||null==(g=v.animations)?void 0:g.y),{duration:0})})}),notLibraryOptions:o(n({},k.notLibraryOptions),{changeData:o(n({},null==(C=k.notLibraryOptions)?void 0:C.changeData),{addNotLibraryAnimations:[{type:"runningColumns",duration:600,from:10,to:75,columnsDelayCoef:500}]})})}),finturfChartLine:r(A,{addGradientsSettings:e.finturf.line,addTooltipOptions:i}),finturfLoadingModeLine:o(n({},A),{options:o(n({},A.options),{elements:o(n({},null==(J=A.options)?void 0:J.elements),{point:o(n({},null==(w=A.options)||null==(F=w.elements)?void 0:F.point),{radius:4,borderWidth:1,borderColor:"#E1E8F1"})}),animations:o(n({},null==(P=A.options)?void 0:P.animations),{y:o(n({},null==(D=A.options)||null==(S=D.animations)?void 0:S.y),{duration:0})})}),notLibraryOptions:o(n({},A.notLibraryOptions),{changeData:o(n({},null==(j=A.notLibraryOptions)?void 0:j.changeData),{addNotLibraryAnimations:[{type:"runningColumns",duration:600,columnsDelayCoef:500,isFixExtremeColumns:!0}]})})}),finturfPositiveLineIcon:r(reactChartJsOptionsLayouts.lineIconLayout,{addGradientsSettings:e.finturf.positiveLineIcon}),finturfNegativeLineIcon:r(reactChartJsOptionsLayouts.lineIconLayout,{addGradientsSettings:e.finturf.negativeLineIcon})};export default o(n({},finturfReactChartJsOptions),{emptyLayout:reactChartJsOptionsLayouts.emptyLayout});
1
+ import {
2
+ FINTURF_TOOLTIP_OPTIONS,
3
+ GRADIENTS_OBJECTS,
4
+ } from './Chart.constants';
5
+ import addAdditionalOptions from './optionsSetters';
6
+
7
+ // options constructors for ChartJS
8
+
9
+ export const reactChartJsOptionsLayouts = {
10
+ lineIconLayout: {
11
+ options: {
12
+ responsive: true,
13
+ maintainAspectRatio: false,
14
+ scales: {
15
+ x: { display: false },
16
+ y: { display: false },
17
+ },
18
+ elements: {
19
+ point: { radius: 0 },
20
+ line: {
21
+ tension: 0.45,
22
+ borderJoinStyle: 'round',
23
+ borderWidth: 2,
24
+ capBezierPoints: true,
25
+ },
26
+ },
27
+ },
28
+ redraw: true,
29
+ notLibraryOptions: {
30
+ // Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
31
+ // На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
32
+ // => Файл Chart.js => определение ChartComponent
33
+ chartTypeKey: 'Line',
34
+ setCanvasDimensions: {
35
+ width: '75px',
36
+ height: '35px',
37
+ },
38
+ },
39
+ },
40
+ lineLayout: {
41
+ options: {
42
+ responsive: true,
43
+ elements: {
44
+ point: {
45
+ radius: 4,
46
+ pointStyle: 'circle',
47
+ backgroundColor: '#FFFFFF',
48
+ color: '#FFFFFF',
49
+ },
50
+ line: {
51
+ tension: 0.45,
52
+ borderJoinStyle: 'round',
53
+ borderWidth: 2,
54
+ capBezierPoints: true,
55
+ },
56
+ },
57
+ },
58
+ redraw: true,
59
+ notLibraryOptions: {
60
+ // Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
61
+ // На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
62
+ // => Файл Chart.js => определение ChartComponent
63
+ chartTypeKey: 'Line',
64
+ },
65
+ },
66
+ barLayout: {
67
+ options: {
68
+ responsive: true,
69
+ elements: {
70
+ bar: {
71
+ borderRadius: 10,
72
+ },
73
+ },
74
+ },
75
+ redraw: true,
76
+ notLibraryOptions: {
77
+ // Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
78
+ // На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
79
+ // => Файл Chart.js => определение ChartComponent
80
+ chartTypeKey: 'Bar',
81
+ },
82
+ },
83
+ emptyLayout: {
84
+ options: {
85
+ responsive: true,
86
+ maintainAspectRatio: false,
87
+ scales: {
88
+ x: { display: false },
89
+ y: { display: false },
90
+ },
91
+ elements: {
92
+ point: { radius: 0 },
93
+ line: { borderWidth: 0 },
94
+ },
95
+ },
96
+ notLibraryOptions: {
97
+ // Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
98
+ // На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
99
+ // => Файл Chart.js => определение подкомпонента ChartComponent => строка const Component = ...
100
+ chartTypeKey: 'Line',
101
+ },
102
+ },
103
+ };
104
+
105
+ const finturfChartLayouts = (() => {
106
+ return ['barLayout', 'lineLayout'].reduce(
107
+ (acc, key) => ({
108
+ ...acc,
109
+ [key]: {
110
+ ...reactChartJsOptionsLayouts[key],
111
+
112
+ options: {
113
+ ...reactChartJsOptionsLayouts[key].options,
114
+ scales: {
115
+ ...reactChartJsOptionsLayouts[key].options?.scales,
116
+ x: {
117
+ ...reactChartJsOptionsLayouts[key].options?.scales?.x,
118
+ grid: {
119
+ ...reactChartJsOptionsLayouts[key].options?.scales?.x?.grid,
120
+ display: false,
121
+ offset: true,
122
+ },
123
+ ticks: {
124
+ ...reactChartJsOptionsLayouts[key].options?.scales?.y?.ticks,
125
+ autoSkipPadding: 10,
126
+ align: 'center',
127
+ color: '#757F8C',
128
+ lineHeight: 18,
129
+ font: {
130
+ family: 'Sarabun',
131
+ style: 'normal',
132
+ weight: 400,
133
+ size: 8,
134
+ },
135
+ // callback: (value, index, ticks) => {
136
+ // console.log(value);
137
+ // console.log(index);
138
+ // console.log(ticks);
139
+ // console.log('***********');
140
+ // return value;
141
+ // },
142
+ },
143
+ },
144
+ y: {
145
+ ...reactChartJsOptionsLayouts[key].options?.scales?.y,
146
+ min: 0,
147
+ // grace: '5%',
148
+ bounds: 'data',
149
+ grid: {
150
+ ...reactChartJsOptionsLayouts[key].options?.scales?.y?.grid,
151
+ borderColor: '#E1E8F1',
152
+ color: '#E1E8F1',
153
+ borderDash: [5],
154
+ // borderDashOffset: 12,
155
+ drawTicks: false,
156
+ z: -1,
157
+ },
158
+ ticks: {
159
+ ...reactChartJsOptionsLayouts[key].options?.scales?.y?.ticks,
160
+ autoSkipPadding: 10,
161
+ align: 'center',
162
+ color: '#A0A4B0',
163
+ lineHeight: 18,
164
+ padding: 6,
165
+ font: {
166
+ family: 'Sarabun',
167
+ style: 'normal',
168
+ weight: 400,
169
+ size: 10,
170
+ },
171
+ },
172
+ },
173
+ },
174
+ },
175
+
176
+ notLibraryOptions: {
177
+ ...reactChartJsOptionsLayouts[key].notLibraryOptions,
178
+ setCanvasDimensions: {
179
+ height: '194px',
180
+ },
181
+ },
182
+ },
183
+ }),
184
+ {},
185
+ );
186
+ })();
187
+
188
+ const finturfChartBar = {
189
+ ...finturfChartLayouts.barLayout,
190
+ options: {
191
+ ...finturfChartLayouts.barLayout?.options,
192
+ maintainAspectRatio: false,
193
+ elements: {
194
+ ...finturfChartLayouts.barLayout?.options?.elements,
195
+ bar: {
196
+ ...finturfChartLayouts.barLayout?.options?.elements?.bar,
197
+ borderRadius: 4,
198
+ },
199
+ },
200
+ },
201
+ notLibraryOptions: {
202
+ ...finturfChartLayouts.barLayout?.notLibraryOptions,
203
+ changeData: {
204
+ ...finturfChartLayouts.barLayout?.notLibraryOptions?.changeData,
205
+ setMaxBarThickness: 16,
206
+ },
207
+ },
208
+ };
209
+
210
+ const finturfChartLine = {
211
+ ...finturfChartLayouts.lineLayout,
212
+ options: {
213
+ ...finturfChartLayouts.lineLayout?.options,
214
+ maintainAspectRatio: false,
215
+ elements: {
216
+ ...finturfChartLayouts.lineLayout.options?.elements,
217
+ point: {
218
+ ...finturfChartLayouts.lineLayout.options?.elements?.point,
219
+ radius: 2,
220
+ borderColor: '#32A784',
221
+ borderWidth: 4,
222
+ },
223
+ },
224
+ },
225
+ };
226
+
227
+ export const finturfReactChartJsOptions = {
228
+ finturfChartBar: addAdditionalOptions(finturfChartBar, {
229
+ addGradientsSettings: GRADIENTS_OBJECTS.finturf.bar,
230
+ addTooltipOptions: FINTURF_TOOLTIP_OPTIONS,
231
+ }),
232
+
233
+ finturfLoadingModeBar: {
234
+ ...finturfChartBar,
235
+
236
+ options: {
237
+ ...finturfChartBar.options,
238
+ animations: {
239
+ ...finturfChartBar.options?.animations,
240
+ y: {
241
+ ...finturfChartBar.options?.animations?.y,
242
+ duration: 0,
243
+ },
244
+ },
245
+ },
246
+
247
+ notLibraryOptions: {
248
+ ...finturfChartBar.notLibraryOptions,
249
+ changeData: {
250
+ ...finturfChartBar.notLibraryOptions?.changeData,
251
+ addNotLibraryAnimations: [
252
+ {
253
+ type: 'runningColumns',
254
+ // duration - ms
255
+ duration: 600,
256
+ // default easing - 'linear',
257
+ // easing: 'easeInOutExpo',
258
+ // ToDo - предусмотреть 'auto' и default для from и to
259
+ from: 10,
260
+ to: 75,
261
+ columnsDelayCoef: 500,
262
+ },
263
+ ],
264
+ },
265
+ },
266
+ },
267
+
268
+ finturfChartLine: addAdditionalOptions(finturfChartLine, {
269
+ addGradientsSettings: GRADIENTS_OBJECTS.finturf.line,
270
+ addTooltipOptions: FINTURF_TOOLTIP_OPTIONS,
271
+ // consoleCurrentData: true,
272
+ }),
273
+
274
+ finturfLoadingModeLine: {
275
+ ...finturfChartLine,
276
+
277
+ options: {
278
+ ...finturfChartLine.options,
279
+ elements: {
280
+ ...finturfChartLine.options?.elements,
281
+ point: {
282
+ ...finturfChartLine.options?.elements?.point,
283
+ radius: 4,
284
+ borderWidth: 1,
285
+ borderColor: '#E1E8F1',
286
+ },
287
+ },
288
+ animations: {
289
+ ...finturfChartLine.options?.animations,
290
+ y: {
291
+ ...finturfChartLine.options?.animations?.y,
292
+ duration: 0,
293
+ },
294
+ },
295
+ },
296
+
297
+ notLibraryOptions: {
298
+ ...finturfChartLine.notLibraryOptions,
299
+ changeData: {
300
+ ...finturfChartLine.notLibraryOptions?.changeData,
301
+ addNotLibraryAnimations: [
302
+ {
303
+ type: 'runningColumns',
304
+ // duration - ms
305
+ duration: 600,
306
+ // default easing - 'linear',
307
+ // easing: 'easeInOutExpo',
308
+ columnsDelayCoef: 500,
309
+ isFixExtremeColumns: true,
310
+ },
311
+ ],
312
+ },
313
+ },
314
+ },
315
+
316
+ finturfPositiveLineIcon: addAdditionalOptions(
317
+ reactChartJsOptionsLayouts.lineIconLayout,
318
+ {
319
+ addGradientsSettings: GRADIENTS_OBJECTS.finturf.positiveLineIcon,
320
+ },
321
+ ),
322
+
323
+ finturfNegativeLineIcon: addAdditionalOptions(
324
+ reactChartJsOptionsLayouts.lineIconLayout,
325
+ {
326
+ addGradientsSettings: GRADIENTS_OBJECTS.finturf.negativeLineIcon,
327
+ },
328
+ ),
329
+ };
330
+
331
+ export default {
332
+ ...finturfReactChartJsOptions,
333
+ emptyLayout: reactChartJsOptionsLayouts.emptyLayout,
334
+ };
@@ -1 +1,111 @@
1
- function r(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,i=Array(t);e<t;e++)i[e]=r[e];return i}import{jsx as t,jsxs as e}from"react/jsx-runtime";import i from"classnames";import{useEffect as s,useState as o}from"react";import"./CircleProgressBar.scss";export default function(n){var a,l=n.amount,c=n.totalAmount,d=n.isReverseType,f=n.children,m=n.className,u=n.colors,p=n.isInnerLine,h=n.radius,g=void 0===h?59:h,y=n.strokeWidth,v=n.innerLineStrokeWidth,b=n.testId,x=Math.round(2*Math.PI*g),S=l<c?Math.round(l/c*100):100,k={start:"#6b81dd",finish:"#f06d8d",meter:"#ffcad6"},_=(a=o(d?String(0):x),function(r){if(Array.isArray(r))return r}(a)||function(r,t){var e,i,s=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=s){var o=[],n=!0,a=!1;try{for(s=s.call(r);!(n=(e=s.next()).done)&&(o.push(e.value),o.length!==t);n=!0);}catch(r){a=!0,i=r}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return o}}(a,2)||function(t,e){if(t){if("string"==typeof t)return r(t,2);var i=Object.prototype.toString.call(t).slice(8,-1);if("Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return r(t,e)}}(a,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),A=_[0],j=_[1];return s(function(){j(x-x*S/100)},[S]),e("div",{"data-testid":void 0===b?"circle-progress-bar":b,className:i("limit-progress-bar",{"limit-progress-bar--reverse":d},m),children:[e("svg",{className:"limit-progress-bar__progress",width:"124",height:"124",viewBox:"0 0 124 124",children:[t("defs",{children:d?e("linearGradient",{id:"limit-progress-bar-linear-gradient-reverse",x1:"0",y1:"1",x2:"0",y2:"0",children:[t("stop",{offset:"0",stopColor:u.finish||k.finish}),t("stop",{offset:"1",stopColor:u.start||k.start})]}):e("linearGradient",{id:"limit-progress-bar-linear-gradient",x1:"0",y1:"1",x2:"0",y2:"0",children:[t("stop",{offset:"0",stopColor:u.start||k.start}),t("stop",{offset:"1",stopColor:u.finish||k.finish})]})}),t("circle",{className:"limit-progress-bar__meter",cx:g,cy:g,r:g,stroke:p?u.meter||k.meter:"",strokeWidth:String(void 0===v?2:v)}),t("circle",{className:"limit-progress-bar__value",cx:g,cy:g,r:g,strokeWidth:String(void 0===y?2:y),stroke:"url(#limit-progress-bar-linear-gradient".concat(d?"-reverse":"",")"),style:{strokeDasharray:x,strokeDashoffset:A}})]}),t("div",{className:"limit-progress-bar__content",children:f})]})}
1
+ import cn from 'classnames';
2
+
3
+ import { useEffect, useState } from 'react';
4
+
5
+ import './CircleProgressBar.scss';
6
+
7
+ function CircleProgressBar({
8
+ amount,
9
+ totalAmount,
10
+ isReverseType,
11
+ children,
12
+ className,
13
+ colors,
14
+ isInnerLine,
15
+ radius = 59,
16
+ strokeWidth = 2,
17
+ innerLineStrokeWidth = 2,
18
+ testId = 'circle-progress-bar',
19
+ }) {
20
+ const circumference = Math.round(2 * Math.PI * radius);
21
+ const amountProgress
22
+ = amount < totalAmount ? Math.round((amount / totalAmount) * 100) : 100; // %
23
+ const defaultColors = {
24
+ start: '#6b81dd',
25
+ finish: '#f06d8d',
26
+ meter: '#ffcad6',
27
+ };
28
+
29
+ const [strokeDashoffset, setStrokeDashoffset] = useState(isReverseType ? String(0) : circumference);
30
+
31
+ useEffect(() => {
32
+ setStrokeDashoffset(circumference - (circumference * amountProgress) / 100);
33
+ }, [amountProgress]);
34
+
35
+ return (
36
+ <div
37
+ data-testid={testId}
38
+ className={cn('limit-progress-bar', { 'limit-progress-bar--reverse': isReverseType }, className)}
39
+ >
40
+ <svg
41
+ className="limit-progress-bar__progress"
42
+ width="124"
43
+ height="124"
44
+ viewBox="0 0 124 124"
45
+ >
46
+ <defs>
47
+ {isReverseType
48
+ ? (
49
+ <linearGradient
50
+ id="limit-progress-bar-linear-gradient-reverse"
51
+ x1="0"
52
+ y1="1"
53
+ x2="0"
54
+ y2="0"
55
+ >
56
+ <stop
57
+ offset="0"
58
+ stopColor={colors.finish || defaultColors.finish}
59
+ />
60
+ <stop
61
+ offset="1"
62
+ stopColor={colors.start || defaultColors.start}
63
+ />
64
+ </linearGradient>
65
+ )
66
+ : (
67
+ <linearGradient
68
+ id="limit-progress-bar-linear-gradient"
69
+ x1="0"
70
+ y1="1"
71
+ x2="0"
72
+ y2="0"
73
+ >
74
+ <stop
75
+ offset="0"
76
+ stopColor={colors.start || defaultColors.start}
77
+ />
78
+ <stop
79
+ offset="1"
80
+ stopColor={colors.finish || defaultColors.finish}
81
+ />
82
+ </linearGradient>
83
+ )}
84
+ </defs>
85
+ <circle
86
+ className="limit-progress-bar__meter"
87
+ cx={radius}
88
+ cy={radius}
89
+ r={radius}
90
+ stroke={!isInnerLine ? '' : colors.meter || defaultColors.meter}
91
+ strokeWidth={String(innerLineStrokeWidth)}
92
+ />
93
+ <circle
94
+ className="limit-progress-bar__value"
95
+ cx={radius}
96
+ cy={radius}
97
+ r={radius}
98
+ strokeWidth={String(strokeWidth)}
99
+ stroke={`url(#limit-progress-bar-linear-gradient${isReverseType ? '-reverse' : ''})`}
100
+ style={{
101
+ strokeDasharray: circumference,
102
+ strokeDashoffset,
103
+ }}
104
+ />
105
+ </svg>
106
+ <div className="limit-progress-bar__content">{children}</div>
107
+ </div>
108
+ );
109
+ }
110
+
111
+ export default CircleProgressBar;
@@ -1 +1,57 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import a from"classnames";import r from"moment-timezone";import{useMemo as m}from"react";import"./DateTime.scss";var o="date-time";export default function(i){var s,c,n,d=i.className,l=i.value,u=i.valueFormat,f=i.dateFormat,p=i.timeFormat,v=i.isNoDate,N=i.isNoTime,_=i.testId,b=void 0===_?"date-time":_,j=f||"DD.MM.YYYY",x=p||"HH:mm:ss",D=m(function(){return(u?r(l,u):r(l)).format(j)},[l,u,j]),Y=m(function(){return(u?r(l,u):r(l)).format(x)},[l,u,x]);return e("div",{"data-testid":b,className:a(o,d),children:[!v&&t("span",{"data-testid":"".concat(b,"-date"),className:a("".concat(o,"__date")),children:D}),!N&&t("span",{"data-testid":"".concat(b,"-time"),className:a("".concat(o,"__time"),(s={},c="".concat(o,"_color--pause"),n=!v,c in s?Object.defineProperty(s,c,{value:n,enumerable:!0,configurable:!0,writable:!0}):s[c]=n,s)),children:Y})]})}
1
+ import cn from 'classnames';
2
+
3
+ import moment from 'moment-timezone';
4
+ import { useMemo } from 'react';
5
+
6
+ import './DateTime.scss';
7
+
8
+ const RC = 'date-time';
9
+
10
+ const DEFAULT_DATE_FORMAT = 'DD.MM.YYYY';
11
+ const DEFAULT_TIME_FORMAT = 'HH:mm:ss';
12
+
13
+ function DateTime({
14
+ className,
15
+ value,
16
+ valueFormat,
17
+ dateFormat: inputDateFormat,
18
+ timeFormat: inputTimeFormat,
19
+ isNoDate,
20
+ isNoTime,
21
+ testId = 'date-time',
22
+ }) {
23
+ const dateFormat = inputDateFormat || DEFAULT_DATE_FORMAT;
24
+ const timeFormat = inputTimeFormat || DEFAULT_TIME_FORMAT;
25
+
26
+ const date = useMemo(
27
+ () =>
28
+ (valueFormat ? moment(value, valueFormat) : moment(value)).format(
29
+ dateFormat,
30
+ ),
31
+ [value, valueFormat, dateFormat],
32
+ );
33
+ const time = useMemo(
34
+ () =>
35
+ (valueFormat ? moment(value, valueFormat) : moment(value)).format(
36
+ timeFormat,
37
+ ),
38
+ [value, valueFormat, timeFormat],
39
+ );
40
+
41
+ return (
42
+ <div data-testid={testId} className={cn(RC, className)}>
43
+ {!isNoDate && (
44
+ <span data-testid={`${testId}-date`} className={cn(`${RC}__date`)}>
45
+ {date}
46
+ </span>
47
+ )}
48
+ {!isNoTime && (
49
+ <span data-testid={`${testId}-time`} className={cn(`${RC}__time`, { [`${RC}_color--pause`]: !isNoDate })}>
50
+ {time}
51
+ </span>
52
+ )}
53
+ </div>
54
+ );
55
+ }
56
+
57
+ export default DateTime;
@@ -1 +1,44 @@
1
- function r(r,n){(null==n||n>r.length)&&(n=r.length);for(var t=0,e=Array(n);t<n;t++)e[t]=r[t];return e}import{jsx as n,jsxs as t}from"react/jsx-runtime";import{useState as e}from"react";import{ChevronDown as o,ChevronUp as a}from"react-feather";import"./DebugContainer.scss";export default function(i){var l,c,u,d,s=i.data,f=i.children,m=(l=e(!0),function(r){if(Array.isArray(r))return r}(l)||function(r,n){var t,e,o=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(r);!(i=(t=o.next()).done)&&(a.push(t.value),a.length!==n);i=!0);}catch(r){l=!0,e=r}finally{try{i||null==o.return||o.return()}finally{if(l)throw e}}return a}}(l,2)||function(n,t){if(n){if("string"==typeof n)return r(n,2);var e=Object.prototype.toString.call(n).slice(8,-1);if("Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return r(n,t)}}(l,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=m[0],b=m[1];return t("div",{className:"debug-container",children:[y&&t("div",{className:"debug-container__body",children:[n("h5",{children:"Debug:"}),s&&!!(null==(d=Object)||null==(u=d.keys(s))?void 0:u.length)&&n("div",{className:"debug-container__body-row",children:t("pre",{children:["{\n",null==(c=Object.keys(s))?void 0:c.map(function(r){return" ".concat(r,": ").concat(null==s?void 0:s[r],",\n")}),"}"]})}),f&&n("div",{className:"debug-container__body-row",children:f})]}),n("div",{className:"debug-container__toggler",onClick:function(){return b(function(r){return!r})},children:y?n(a,{}):n(o,{})})]})}
1
+ import { useState } from 'react';
2
+
3
+ import { ChevronDown, ChevronUp } from 'react-feather';
4
+
5
+ import './DebugContainer.scss';
6
+
7
+ function DebugContainer({ data, children }) {
8
+ const [isVisible, setIsVisible] = useState(true);
9
+ const renderData = () => {
10
+ return (
11
+ <pre>
12
+ {'{\n'}
13
+ {Object.keys(data)?.map((key) => {
14
+ return ` ${key}: ${data?.[key]},\n`;
15
+ })}
16
+ {'}'}
17
+ </pre>
18
+ );
19
+ };
20
+
21
+ return (
22
+ <div className="debug-container">
23
+ {isVisible && (
24
+ <div className="debug-container__body">
25
+ <h5>Debug:</h5>
26
+ {data && Boolean(Object?.keys(data)?.length) && (
27
+ <div className="debug-container__body-row">{renderData()}</div>
28
+ )}
29
+ {children && (
30
+ <div className="debug-container__body-row">{children}</div>
31
+ )}
32
+ </div>
33
+ )}
34
+ <div
35
+ className="debug-container__toggler"
36
+ onClick={() => setIsVisible(v => !v)}
37
+ >
38
+ {isVisible ? <ChevronUp /> : <ChevronDown />}
39
+ </div>
40
+ </div>
41
+ );
42
+ }
43
+
44
+ export default DebugContainer;
@@ -1 +1,15 @@
1
- function r(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import n from"./DebugContainer";export default function(){var o,a=(o=e({}),function(r){if(Array.isArray(r))return r}(o)||function(r,t){var e,n,o=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=o){var a=[],u=!0,i=!1;try{for(o=o.call(r);!(u=(e=o.next()).done)&&(a.push(e.value),a.length!==t);u=!0);}catch(r){i=!0,n=r}finally{try{u||null==o.return||o.return()}finally{if(i)throw n}}return a}}(o,2)||function(t,e){if(t){if("string"==typeof t)return r(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}}(o,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=a[0];return{debugData:u,setDebugData:a[1],renderDebugContainer:t(n,{data:u})}}
1
+ import { useState } from 'react';
2
+
3
+ import DebugContainer from './DebugContainer';
4
+
5
+ function useDebugContainer() {
6
+ const [data, setData] = useState({});
7
+
8
+ return {
9
+ debugData: data,
10
+ setDebugData: setData,
11
+ renderDebugContainer: <DebugContainer data={data} />,
12
+ };
13
+ }
14
+
15
+ export default useDebugContainer;