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.
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.jsx +18 -1
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.jsx +121 -1
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.jsx +507 -1
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.jsx +46 -1
- package/dist/Atomic/FormElements/NumericInput/NumericInput.jsx +337 -1
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.jsx +66 -1
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.jsx +78 -1
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.jsx +54 -1
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.jsx +183 -1
- package/dist/Atomic/FormElements/RangeList/RangeList.jsx +181 -1
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.jsx +41 -1
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.jsx +449 -1
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.jsx +865 -1
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.jsx +37 -1
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.jsx +48 -1
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.jsx +62 -1
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.jsx +175 -1
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.jsx +65 -1
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.jsx +118 -1
- package/dist/Atomic/FormElements/Text/Text.jsx +126 -1
- package/dist/Atomic/FormElements/Textarea/Textarea.jsx +61 -1
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.jsx +181 -1
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.jsx +60 -1
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.jsx +83 -1
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.jsx +80 -1
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.jsx +103 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.jsx +115 -1
- package/dist/Atomic/Layout/Header/Header.jsx +86 -1
- package/dist/Atomic/Layout/MainMenu/MainMenu.jsx +164 -1
- package/dist/Atomic/UI/AccordionTable/AccordionTable.jsx +250 -1
- package/dist/Atomic/UI/AccordionText/AccordionText.jsx +68 -1
- package/dist/Atomic/UI/Arrow/Arrow.jsx +134 -1
- package/dist/Atomic/UI/Box/Box.jsx +53 -1
- package/dist/Atomic/UI/Chart/Chart.jsx +178 -1
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.jsx +78 -1
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.jsx +334 -1
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.jsx +111 -1
- package/dist/Atomic/UI/DateTime/DateTime.jsx +57 -1
- package/dist/Atomic/UI/DebugContainer/DebugContainer.jsx +44 -1
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.jsx +15 -1
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.jsx +223 -1
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.jsx +75 -1
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.jsx +86 -1
- package/dist/Atomic/UI/PieChart/PieChart.jsx +41 -1
- package/dist/Atomic/UI/Table/Partials/TdCell.jsx +87 -1
- package/dist/Atomic/UI/Table/Partials/TdHeader.jsx +36 -1
- package/dist/Atomic/UI/Table/Partials/TdRow.jsx +103 -1
- package/dist/Atomic/UI/Table/Partials/TdTitle.jsx +55 -1
- package/dist/Atomic/UI/Table/Table.jsx +63 -1
- package/dist/Atomic/UI/Table/TdTypes/TdActions.jsx +80 -1
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.jsx +26 -1
- package/dist/Atomic/UI/Table/TdTypes/TdRange.jsx +13 -1
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.jsx +56 -1
- package/dist/Atomic/UI/TagList/TagList.jsx +256 -1
- package/dist/Atomic/UI/WizardStepper/constructor.jsx +86 -1
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.jsx +254 -1
- package/dist/Functions/customEventListener.jsx +96 -1
- package/dist/Functions/operations.jsx +138 -1
- package/dist/Functions/useFormTools/functions/RenderFields.jsx +108 -1
- package/dist/Functions/useFormTools/index.jsx +777 -1
- package/dist/Functions/usePasswordChecker.jsx +128 -1
- package/dist/Functions/utils.jsx +492 -1
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.jsx +22 -1
- package/dist/Molecular/CustomIcons/components/AlertCircle.jsx +24 -1
- package/dist/Molecular/CustomIcons/components/AppStore.jsx +30 -1
- package/dist/Molecular/CustomIcons/components/Arrow.jsx +33 -1
- package/dist/Molecular/CustomIcons/components/ArrowDown.jsx +18 -1
- package/dist/Molecular/CustomIcons/components/ArrowLeft.jsx +23 -1
- package/dist/Molecular/CustomIcons/components/ArrowRight.jsx +23 -1
- package/dist/Molecular/CustomIcons/components/ArrowUp.jsx +18 -1
- package/dist/Molecular/CustomIcons/components/Bell.jsx +16 -1
- package/dist/Molecular/CustomIcons/components/Button.jsx +13 -1
- package/dist/Molecular/CustomIcons/components/Campaigns.jsx +17 -1
- package/dist/Molecular/CustomIcons/components/Check.jsx +15 -1
- package/dist/Molecular/CustomIcons/components/Check2.jsx +13 -1
- package/dist/Molecular/CustomIcons/components/ChevronDown.jsx +13 -1
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.jsx +12 -1
- package/dist/Molecular/CustomIcons/components/ChevronLeft.jsx +12 -1
- package/dist/Molecular/CustomIcons/components/ChevronRight.jsx +12 -1
- package/dist/Molecular/CustomIcons/components/ChevronUp.jsx +12 -1
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.jsx +28 -1
- package/dist/Molecular/CustomIcons/components/Close.jsx +15 -1
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.jsx +18 -1
- package/dist/Molecular/CustomIcons/components/Delete.jsx +17 -1
- package/dist/Molecular/CustomIcons/components/Edit.jsx +16 -1
- package/dist/Molecular/CustomIcons/components/Email.jsx +32 -1
- package/dist/Molecular/CustomIcons/components/FinturfLogo.jsx +19 -1
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.jsx +36 -1
- package/dist/Molecular/CustomIcons/components/Flows.jsx +16 -1
- package/dist/Molecular/CustomIcons/components/Gift.jsx +26 -1
- package/dist/Molecular/CustomIcons/components/GoogleAuth.jsx +30 -1
- package/dist/Molecular/CustomIcons/components/GooglePlay.jsx +30 -1
- package/dist/Molecular/CustomIcons/components/HelpCircle.jsx +20 -1
- package/dist/Molecular/CustomIcons/components/HelpCircle2.jsx +21 -1
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.jsx +20 -1
- package/dist/Molecular/CustomIcons/components/Home.jsx +17 -1
- package/dist/Molecular/CustomIcons/components/Home2.jsx +23 -1
- package/dist/Molecular/CustomIcons/components/Key.jsx +24 -1
- package/dist/Molecular/CustomIcons/components/Landers.jsx +21 -1
- package/dist/Molecular/CustomIcons/components/Lock.jsx +16 -1
- package/dist/Molecular/CustomIcons/components/Mail.jsx +27 -1
- package/dist/Molecular/CustomIcons/components/Mastercard.jsx +74 -1
- package/dist/Molecular/CustomIcons/components/Minus.jsx +26 -1
- package/dist/Molecular/CustomIcons/components/Offers.jsx +17 -1
- package/dist/Molecular/CustomIcons/components/Pause.jsx +29 -1
- package/dist/Molecular/CustomIcons/components/PayPal.jsx +42 -1
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.jsx +29 -1
- package/dist/Molecular/CustomIcons/components/Phone.jsx +31 -1
- package/dist/Molecular/CustomIcons/components/Play.jsx +26 -1
- package/dist/Molecular/CustomIcons/components/Plus.jsx +26 -1
- package/dist/Molecular/CustomIcons/components/Profile.jsx +17 -1
- package/dist/Molecular/CustomIcons/components/QRCode.jsx +30 -1
- package/dist/Molecular/CustomIcons/components/Rectangle.jsx +13 -1
- package/dist/Molecular/CustomIcons/components/Revert.jsx +14 -1
- package/dist/Molecular/CustomIcons/components/Star.jsx +15 -1
- package/dist/Molecular/CustomIcons/components/Star2.jsx +17 -1
- package/dist/Molecular/CustomIcons/components/TrafficSources.jsx +15 -1
- package/dist/Molecular/CustomIcons/components/Trash.jsx +16 -1
- package/dist/Molecular/CustomIcons/components/TrashRed.jsx +16 -1
- package/dist/Molecular/CustomIcons/components/Triggers.jsx +16 -1
- package/dist/Molecular/CustomIcons/components/User.jsx +26 -1
- package/dist/Molecular/CustomIcons/components/Visa.jsx +32 -1
- package/dist/Molecular/CustomIcons/components/X.jsx +13 -1
- package/dist/Molecular/FormElement/FormElement.jsx +52 -1
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.jsx +161 -1
- package/dist/Molecular/InputAddress/InputAddress.jsx +641 -1
- package/dist/Molecular/InputPassword/InputPassword.jsx +50 -1
- package/package.json +1 -1
|
@@ -1 +1,334 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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;
|