intelicoreact 1.5.40 → 1.5.41
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/package.json +1 -1
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.interface.js +0 -4
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.stories.js +0 -89
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.test.js +0 -130
- package/dist/Atomic/FormElements/ActionAlert/index.js +0 -17
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.interface.js +0 -4
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.stories.js +0 -81
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.test.js +0 -104
- package/dist/Atomic/FormElements/AdvancedStatus/index.js +0 -17
- package/dist/Atomic/FormElements/Calendar/Calendar.props.js +0 -4
- package/dist/Atomic/FormElements/Calendar/Calendar.stories.js +0 -108
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.interface.js +0 -4
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +0 -100
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.test.js +0 -143
- package/dist/Atomic/FormElements/CheckboxInput/index.js +0 -17
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.interface.js +0 -4
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.stories.js +0 -94
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.test.js +0 -177
- package/dist/Atomic/FormElements/CheckboxesLine/index.js +0 -17
- package/dist/Atomic/FormElements/Datepicker/Datepicker.stories.js +0 -51
- package/dist/Atomic/FormElements/Dropdown/Dropdown.stories.js +0 -596
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.stories.js +0 -272
- package/dist/Atomic/FormElements/FileLoader/FileLoader.stories.js +0 -182
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.stories.js +0 -327
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.stories.js +0 -186
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.stories.js +0 -84
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.stories.js +0 -107
- package/dist/Atomic/FormElements/Input/Input.stories.js +0 -251
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.stories.js +0 -115
- package/dist/Atomic/FormElements/InputColor/InputColor.stories.js +0 -119
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.interface.js +0 -4
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.stories.js +0 -178
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.test.js +0 -129
- package/dist/Atomic/FormElements/InputCurrency/index.js +0 -16
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +0 -123
- package/dist/Atomic/FormElements/InputLink/InputLink.stories.js +0 -140
- package/dist/Atomic/FormElements/InputMask/InputMask.stories.js +0 -303
- package/dist/Atomic/FormElements/InputMask2/InputMask2.stories.js +0 -314
- package/dist/Atomic/FormElements/InputMask3/InputMask3.stories.js +0 -335
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.stories.js +0 -276
- package/dist/Atomic/FormElements/InputsRow/InputsRow.stories.js +0 -56
- package/dist/Atomic/FormElements/Label/Label.interface.js +0 -4
- package/dist/Atomic/FormElements/Label/Label.stories.js +0 -47
- package/dist/Atomic/FormElements/Label/Label.test.js +0 -167
- package/dist/Atomic/FormElements/Label/index.js +0 -17
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.stories.js +0 -172
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.stories.js +0 -121
- package/dist/Atomic/FormElements/NumericInput/NumericInput.stories.js +0 -184
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.stories.js +0 -79
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.stories.js +0 -151
- package/dist/Atomic/FormElements/RadioInput/RadioInput.stories.js +0 -67
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.stories.js +0 -116
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.stories.js +0 -107
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.stories.js +0 -92
- package/dist/Atomic/FormElements/RangeList/RangeList.stories.js +0 -169
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.stories.js +0 -401
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.stories.js +0 -314
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.stories.js +0 -137
- package/dist/Atomic/FormElements/Switcher/Switcher.stories.js +0 -91
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.stories.js +0 -104
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.stories.js +0 -96
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.stories.js +0 -140
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.stories.js +0 -112
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.stories.js +0 -145
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.stories.js +0 -158
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.stories.js +0 -101
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.stories.js +0 -131
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.stories.js +0 -357
- package/dist/Atomic/FormElements/Text/Text.stories.js +0 -80
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.stories.js +0 -106
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.test.js +0 -93
- package/dist/Atomic/FormElements/Textarea/Textarea.stories.js +0 -103
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.stories.js +0 -174
- package/dist/Atomic/FormElements/TimeRange/TimeRange.interface.js +0 -4
- package/dist/Atomic/FormElements/TimeRange/TimeRange.stories.js +0 -40
- package/dist/Atomic/FormElements/TimeRange/TimeRange.test.js +0 -163
- package/dist/Atomic/FormElements/TimeRange/index.js +0 -17
- package/dist/Atomic/FormElements/UserContacts/UserContact.test.js +0 -381
- package/dist/Atomic/FormElements/UserContacts/UserContacts.interface.js +0 -4
- package/dist/Atomic/FormElements/UserContacts/UserContacts.stories.js +0 -74
- package/dist/Atomic/FormElements/UserContacts/index.js +0 -17
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.stories.js +0 -193
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.stories.js +0 -147
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.stories.js +0 -151
- package/dist/Atomic/Layout/Header/Header.stories.js +0 -71
- package/dist/Atomic/Layout/MainMenu/MainMenu.stories.js +0 -115
- package/dist/Atomic/Layout/Spinner/Spinner.interface.js +0 -4
- package/dist/Atomic/Layout/Spinner/Spinner.stories.js +0 -46
- package/dist/Atomic/Layout/Spinner/Spinner.test.js +0 -54
- package/dist/Atomic/Layout/Spinner/index.js +0 -17
- package/dist/Atomic/UI/Accordion/Accordion.interface.js +0 -4
- package/dist/Atomic/UI/Accordion/Accordion.stories.js +0 -168
- package/dist/Atomic/UI/Accordion/Accordion.test.js +0 -54
- package/dist/Atomic/UI/Accordion/AccordionItem.test.js +0 -50
- package/dist/Atomic/UI/Accordion/index.js +0 -17
- package/dist/Atomic/UI/AccordionTable/AccordionTable.stories.js +0 -268
- package/dist/Atomic/UI/AccordionText/AccordionText.stories.js +0 -125
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.stories.js +0 -115
- package/dist/Atomic/UI/Alert/Alert.stories.js +0 -81
- package/dist/Atomic/UI/Arrow/Arrow.stories.js +0 -62
- package/dist/Atomic/UI/Box/Box.stories.js +0 -114
- package/dist/Atomic/UI/Button/Button.stories.js +0 -105
- package/dist/Atomic/UI/Button/Button.test.js +0 -147
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.stories.js +0 -129
- package/dist/Atomic/UI/Chart/Chart.stories.js +0 -93
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.stories.js +0 -85
- package/dist/Atomic/UI/DateTime/DateTime.stories.js +0 -50
- package/dist/Atomic/UI/DoubleString/DoubleString.stories.js +0 -79
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.interface.js +0 -4
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.stories.js +0 -98
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.test.js +0 -51
- package/dist/Atomic/UI/DynamicIcon/index.js +0 -17
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.stories.js +0 -98
- package/dist/Atomic/UI/Hint/Hint.stories.js +0 -101
- package/dist/Atomic/UI/Hint/index.js +0 -16
- package/dist/Atomic/UI/Modal/Modal.interface.js +0 -4
- package/dist/Atomic/UI/Modal/Modal.stories.js +0 -370
- package/dist/Atomic/UI/Modal/ModalHOC.stories.js +0 -191
- package/dist/Atomic/UI/Modal/ModalHOC.test.js +0 -187
- package/dist/Atomic/UI/Modal/index.js +0 -26
- package/dist/Atomic/UI/Modal/partials/ModalFooter.test.js +0 -118
- package/dist/Atomic/UI/Modal/partials/ModalTitle.test.js +0 -126
- package/dist/Atomic/UI/Modal/partials/useMobileModal.test.js +0 -133
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.interface.js +0 -4
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.stories.js +0 -513
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.test.js +0 -84
- package/dist/Atomic/UI/MonoAccordion/index.js +0 -17
- package/dist/Atomic/UI/NavLine/NavLine.interface.js +0 -4
- package/dist/Atomic/UI/NavLine/NavLine.stories.js +0 -434
- package/dist/Atomic/UI/NavLine/NavLine.test.js +0 -311
- package/dist/Atomic/UI/NavLine/index.js +0 -17
- package/dist/Atomic/UI/PageTitle/PageTitle.interface.js +0 -4
- package/dist/Atomic/UI/PageTitle/PageTitle.stories.js +0 -62
- package/dist/Atomic/UI/PageTitle/PageTitle.test.js +0 -181
- package/dist/Atomic/UI/PageTitle/index.js +0 -17
- package/dist/Atomic/UI/PieChart/PieChar.interface.js +0 -4
- package/dist/Atomic/UI/PieChart/PieChart.stories.js +0 -82
- package/dist/Atomic/UI/PieChart/PieChart.test.js +0 -142
- package/dist/Atomic/UI/PieChart/index.js +0 -26
- package/dist/Atomic/UI/Price/Price.interface.js +0 -4
- package/dist/Atomic/UI/Price/Price.stories.js +0 -52
- package/dist/Atomic/UI/Price/Price.test.js +0 -83
- package/dist/Atomic/UI/Price/index.js +0 -17
- package/dist/Atomic/UI/PriceRange/PriceRange.interface.js +0 -4
- package/dist/Atomic/UI/PriceRange/PriceRange.stories.js +0 -51
- package/dist/Atomic/UI/PriceRange/PriceRange.test.js +0 -72
- package/dist/Atomic/UI/PriceRange/index.js +0 -17
- package/dist/Atomic/UI/ProgressLine/ProgressLine.interface.js +0 -4
- package/dist/Atomic/UI/ProgressLine/ProgressLine.stories.js +0 -163
- package/dist/Atomic/UI/ProgressLine/ProgressLine.test.js +0 -60
- package/dist/Atomic/UI/ProgressLine/index.js +0 -17
- package/dist/Atomic/UI/Status/Status.interface.js +0 -4
- package/dist/Atomic/UI/Status/Status.stories.js +0 -79
- package/dist/Atomic/UI/Status/Status.test.js +0 -103
- package/dist/Atomic/UI/Status/index.js +0 -17
- package/dist/Atomic/UI/Table/Table.stories.js +0 -250
- package/dist/Atomic/UI/Tag/Tag.interface.js +0 -4
- package/dist/Atomic/UI/Tag/Tag.stories.js +0 -108
- package/dist/Atomic/UI/Tag/Tag.test.js +0 -75
- package/dist/Atomic/UI/Tag/index.js +0 -17
- package/dist/Atomic/UI/TagList/TagList.stories.js +0 -169
- package/dist/Atomic/UI/UserBox/UserBox.interface.js +0 -4
- package/dist/Atomic/UI/UserBox/UserBox.stories.js +0 -57
- package/dist/Atomic/UI/UserBox/UserBox.test.js +0 -136
- package/dist/Atomic/UI/UserBox/index.js +0 -17
- package/dist/Atomic/UI/WizardStepper/WizardStepper.stories.js +0 -70
- package/dist/Functions/useIsMobile/index.js +0 -17
- package/dist/Functions/useIsMobile/useIsMobile.js +0 -33
- package/dist/Functions/useIsMobile/useIsMobile.test.js +0 -104
- package/dist/Functions/useKeyPress/useHandleKeyPress.test.js +0 -96
- package/dist/Functions/useKeyPress/useKeyPress.test.js +0 -87
- package/dist/Molecular/FormElement/FormElement.stories.js +0 -92
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.stories.js +0 -301
- package/dist/Molecular/InputAddress/InputAddress.stories.js +0 -541
- package/dist/Molecular/InputPassword/InputPassword.stories.js +0 -86
- package/dist/types/base.interface.js +0 -4
- package/dist/types/base.types.js +0 -4
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
FileLoaderDescriptionTemplate: function() {
|
|
13
|
-
return FileLoaderDescriptionTemplate;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
21
|
-
const _FileLoaderDescription = /*#__PURE__*/ _interop_require_default(require("./FileLoaderDescription"));
|
|
22
|
-
require("../../../../../scss/main.scss");
|
|
23
|
-
function _interop_require_default(obj) {
|
|
24
|
-
return obj && obj.__esModule ? obj : {
|
|
25
|
-
default: obj
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
29
|
-
if (typeof WeakMap !== "function") return null;
|
|
30
|
-
var cacheBabelInterop = new WeakMap();
|
|
31
|
-
var cacheNodeInterop = new WeakMap();
|
|
32
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
33
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
34
|
-
})(nodeInterop);
|
|
35
|
-
}
|
|
36
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
37
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
38
|
-
return obj;
|
|
39
|
-
}
|
|
40
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
41
|
-
return {
|
|
42
|
-
default: obj
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
46
|
-
if (cache && cache.has(obj)) {
|
|
47
|
-
return cache.get(obj);
|
|
48
|
-
}
|
|
49
|
-
var newObj = {
|
|
50
|
-
__proto__: null
|
|
51
|
-
};
|
|
52
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
53
|
-
for(var key in obj){
|
|
54
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
55
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
56
|
-
if (desc && (desc.get || desc.set)) {
|
|
57
|
-
Object.defineProperty(newObj, key, desc);
|
|
58
|
-
} else {
|
|
59
|
-
newObj[key] = obj[key];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
newObj.default = obj;
|
|
64
|
-
if (cache) {
|
|
65
|
-
cache.set(obj, newObj);
|
|
66
|
-
}
|
|
67
|
-
return newObj;
|
|
68
|
-
}
|
|
69
|
-
global.lng = 'en';
|
|
70
|
-
const _default = {
|
|
71
|
-
title: 'Form Elements/FileLoaderDescription',
|
|
72
|
-
component: _FileLoaderDescription.default,
|
|
73
|
-
argTypes: {
|
|
74
|
-
accordionListContent: {
|
|
75
|
-
control: {
|
|
76
|
-
type: 'object'
|
|
77
|
-
},
|
|
78
|
-
description: 'The content of the accordion list'
|
|
79
|
-
},
|
|
80
|
-
accordionTitle: {
|
|
81
|
-
control: {
|
|
82
|
-
type: 'text'
|
|
83
|
-
},
|
|
84
|
-
description: 'The title of the accordion'
|
|
85
|
-
},
|
|
86
|
-
filesDescription: {
|
|
87
|
-
control: {
|
|
88
|
-
type: 'text'
|
|
89
|
-
},
|
|
90
|
-
description: 'Description of the accepted file formats and size limits'
|
|
91
|
-
},
|
|
92
|
-
documentName: {
|
|
93
|
-
control: {
|
|
94
|
-
type: 'text'
|
|
95
|
-
},
|
|
96
|
-
description: 'The name of the document'
|
|
97
|
-
},
|
|
98
|
-
onChange: {
|
|
99
|
-
action: 'onChange',
|
|
100
|
-
description: 'Callback function triggered on file change'
|
|
101
|
-
},
|
|
102
|
-
testId: {
|
|
103
|
-
control: {
|
|
104
|
-
type: 'text'
|
|
105
|
-
},
|
|
106
|
-
description: 'Test ID for the component'
|
|
107
|
-
},
|
|
108
|
-
className: {
|
|
109
|
-
control: {
|
|
110
|
-
type: 'text'
|
|
111
|
-
},
|
|
112
|
-
description: 'CSS class for custom styling'
|
|
113
|
-
},
|
|
114
|
-
files: {
|
|
115
|
-
control: {
|
|
116
|
-
type: 'object'
|
|
117
|
-
},
|
|
118
|
-
description: 'The files to be uploaded'
|
|
119
|
-
},
|
|
120
|
-
maxFilesCount: {
|
|
121
|
-
control: {
|
|
122
|
-
type: 'number'
|
|
123
|
-
},
|
|
124
|
-
description: 'Files quantity for upload'
|
|
125
|
-
},
|
|
126
|
-
isWithoutAccordion: {
|
|
127
|
-
control: {
|
|
128
|
-
type: 'boolean'
|
|
129
|
-
},
|
|
130
|
-
description: 'If true accordion doesn\'t rendered'
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
135
|
-
const ACCEPT_EXTENSIONS_DEFAULT = ".jpg, .jpeg, .png, .pdf, .JPG, .JPEG, .PNG, .PDF";
|
|
136
|
-
const mock = [
|
|
137
|
-
{
|
|
138
|
-
id: '1',
|
|
139
|
-
value: "image1.png",
|
|
140
|
-
base64: "cscdcscsdc",
|
|
141
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
142
|
-
error: "",
|
|
143
|
-
isRequired: false,
|
|
144
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: '2',
|
|
148
|
-
value: "image2.png",
|
|
149
|
-
base64: "cscdcscsdc",
|
|
150
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
151
|
-
error: "",
|
|
152
|
-
isRequired: false,
|
|
153
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
id: '3',
|
|
157
|
-
value: "image3.png",
|
|
158
|
-
base64: "cscdcscsdc",
|
|
159
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
160
|
-
error: "",
|
|
161
|
-
isRequired: false,
|
|
162
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
id: '4',
|
|
166
|
-
value: "image4.png",
|
|
167
|
-
base64: "cscdcscsdc",
|
|
168
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
169
|
-
error: "",
|
|
170
|
-
isRequired: false,
|
|
171
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
id: '5',
|
|
175
|
-
value: "image5.png",
|
|
176
|
-
base64: "cscdcscsdc",
|
|
177
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
178
|
-
error: "",
|
|
179
|
-
isRequired: false,
|
|
180
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
id: '6',
|
|
184
|
-
value: "image6.png",
|
|
185
|
-
base64: "cscdcscsdc",
|
|
186
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
187
|
-
error: "",
|
|
188
|
-
isRequired: false,
|
|
189
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
id: '7',
|
|
193
|
-
value: "image7.png",
|
|
194
|
-
base64: "cscdcscsdc",
|
|
195
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
196
|
-
error: "",
|
|
197
|
-
isRequired: false,
|
|
198
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
id: '8',
|
|
202
|
-
value: "image8.png",
|
|
203
|
-
base64: "cscdcscsdc",
|
|
204
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
205
|
-
error: "",
|
|
206
|
-
isRequired: false,
|
|
207
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
id: '9',
|
|
211
|
-
value: "image9.png",
|
|
212
|
-
base64: "cscdcscsdc",
|
|
213
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
214
|
-
error: "",
|
|
215
|
-
isRequired: false,
|
|
216
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
id: '10',
|
|
220
|
-
value: "image10.png",
|
|
221
|
-
base64: "cscdcscsdc",
|
|
222
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
223
|
-
error: "",
|
|
224
|
-
isRequired: false,
|
|
225
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
id: '11',
|
|
229
|
-
value: "image11.png",
|
|
230
|
-
base64: "cscdcscsdc",
|
|
231
|
-
maxItemSizeBytes: MAX_FILE_SIZE,
|
|
232
|
-
error: "",
|
|
233
|
-
isRequired: false,
|
|
234
|
-
accept: ACCEPT_EXTENSIONS_DEFAULT
|
|
235
|
-
}
|
|
236
|
-
];
|
|
237
|
-
const Template = (args)=>{
|
|
238
|
-
const [files, setFiles] = (0, _react.useState)(mock);
|
|
239
|
-
const [error, setError] = (0, _react.useState)(null);
|
|
240
|
-
const handleChange = (newFiles)=>{
|
|
241
|
-
setFiles(newFiles);
|
|
242
|
-
};
|
|
243
|
-
const setOuterError = ()=>{
|
|
244
|
-
const errorValue = true;
|
|
245
|
-
// const errorValue = 'Error !!!';
|
|
246
|
-
setError(errorValue);
|
|
247
|
-
};
|
|
248
|
-
const changeInitFields = ()=>{
|
|
249
|
-
const deductible = (Array.isArray(files) ? files : []).length > 2 ? 2 : 1;
|
|
250
|
-
if (files.length) {
|
|
251
|
-
setFiles((state)=>state.slice(0, state.length - deductible));
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
255
|
-
children: [
|
|
256
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FileLoaderDescription.default, {
|
|
257
|
-
...args,
|
|
258
|
-
files: files,
|
|
259
|
-
onChange: handleChange,
|
|
260
|
-
error: error
|
|
261
|
-
}),
|
|
262
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("br", {}),
|
|
263
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("br", {}),
|
|
264
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("br", {}),
|
|
265
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
|
266
|
-
style: {
|
|
267
|
-
padding: '8px',
|
|
268
|
-
border: '1px solid black'
|
|
269
|
-
},
|
|
270
|
-
onClick: setOuterError,
|
|
271
|
-
children: "Set outer error"
|
|
272
|
-
}),
|
|
273
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("br", {}),
|
|
274
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("br", {}),
|
|
275
|
-
!!files.length && /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
|
276
|
-
style: {
|
|
277
|
-
padding: '8px',
|
|
278
|
-
border: '1px solid black'
|
|
279
|
-
},
|
|
280
|
-
onClick: changeInitFields,
|
|
281
|
-
children: "Change init fields"
|
|
282
|
-
})
|
|
283
|
-
]
|
|
284
|
-
});
|
|
285
|
-
};
|
|
286
|
-
const FileLoaderDescriptionTemplate = Template.bind({});
|
|
287
|
-
FileLoaderDescriptionTemplate.args = {
|
|
288
|
-
accordionListContent: [
|
|
289
|
-
{
|
|
290
|
-
title: 'W2 Income',
|
|
291
|
-
description: 'Most recent paystub(s) covering 30 days OR most recent bank statement reflecting employer deposit(s)'
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
title: 'Self-Employment/Contract Income',
|
|
295
|
-
description: 'Most recent 1099(s) OR most recent tax returns'
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
title: 'Retirement income',
|
|
299
|
-
description: 'Most recent Award letter OR 1099(s) OR W2(s)'
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
title: 'Social Security/Disability income',
|
|
303
|
-
description: 'Most recent award Letter OR most recent bank statement'
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
title: 'Rental Income',
|
|
307
|
-
description: 'Executed Lease Agreement OR most recent tax returns'
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
title: 'Alimony /Child Support/Separate Maintenance',
|
|
311
|
-
description: '6 bank statements reflecting deposits'
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
title: 'Investment income',
|
|
315
|
-
description: 'Most Recent 1099(s) OR Tax Returns'
|
|
316
|
-
}
|
|
317
|
-
],
|
|
318
|
-
accordionTitle: 'There is a list of documents that we accept:',
|
|
319
|
-
filesDescription: 'Documents must be less than 10MB and must be in PDF, JPG, JPEG or PNG format.',
|
|
320
|
-
documentName: 'Document name',
|
|
321
|
-
testId: 'file-loader-description',
|
|
322
|
-
className: '',
|
|
323
|
-
maxFilesCount: undefined,
|
|
324
|
-
// maxFilesCount: 5,
|
|
325
|
-
// maxFilesCount: null,
|
|
326
|
-
isWithoutAccordion: false
|
|
327
|
-
};
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
FileLoaderLocalTemplate: function() {
|
|
13
|
-
return FileLoaderLocalTemplate;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
21
|
-
const _utils = require("../../../Functions/utils");
|
|
22
|
-
const _FileLoaderLocal = /*#__PURE__*/ _interop_require_default(require("./FileLoaderLocal"));
|
|
23
|
-
require("../../../../../scss/main.scss");
|
|
24
|
-
function _interop_require_default(obj) {
|
|
25
|
-
return obj && obj.__esModule ? obj : {
|
|
26
|
-
default: obj
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
30
|
-
if (typeof WeakMap !== "function") return null;
|
|
31
|
-
var cacheBabelInterop = new WeakMap();
|
|
32
|
-
var cacheNodeInterop = new WeakMap();
|
|
33
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
34
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
35
|
-
})(nodeInterop);
|
|
36
|
-
}
|
|
37
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
38
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
42
|
-
return {
|
|
43
|
-
default: obj
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
47
|
-
if (cache && cache.has(obj)) {
|
|
48
|
-
return cache.get(obj);
|
|
49
|
-
}
|
|
50
|
-
var newObj = {
|
|
51
|
-
__proto__: null
|
|
52
|
-
};
|
|
53
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
54
|
-
for(var key in obj){
|
|
55
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
56
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
57
|
-
if (desc && (desc.get || desc.set)) {
|
|
58
|
-
Object.defineProperty(newObj, key, desc);
|
|
59
|
-
} else {
|
|
60
|
-
newObj[key] = obj[key];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
newObj.default = obj;
|
|
65
|
-
if (cache) {
|
|
66
|
-
cache.set(obj, newObj);
|
|
67
|
-
}
|
|
68
|
-
return newObj;
|
|
69
|
-
}
|
|
70
|
-
global.lng = "en";
|
|
71
|
-
const _default = {
|
|
72
|
-
title: "Form Elements/FileLoaderLocal",
|
|
73
|
-
component: _FileLoaderLocal.default,
|
|
74
|
-
argTypes: {
|
|
75
|
-
maxItemSizeBytes: {
|
|
76
|
-
description: "number in bytes"
|
|
77
|
-
},
|
|
78
|
-
accept: {
|
|
79
|
-
description: "string of extensions - .jpg, .jpeg, .png .pdf"
|
|
80
|
-
},
|
|
81
|
-
titleDescription: {
|
|
82
|
-
description: "string"
|
|
83
|
-
},
|
|
84
|
-
attributesOfNativeInput: {
|
|
85
|
-
description: "Object. Optional. This is list of attributes to add in native input"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
const Template = (args)=>{
|
|
90
|
-
const [fields, setFields] = (0, _react.useState)([
|
|
91
|
-
args
|
|
92
|
-
]);
|
|
93
|
-
const uploadFieldTemplate = {
|
|
94
|
-
id: fields.at(-1).id + 1,
|
|
95
|
-
isRequired: false,
|
|
96
|
-
value: "",
|
|
97
|
-
base64: "",
|
|
98
|
-
maxItemSizeBytes: 1048576,
|
|
99
|
-
error: "",
|
|
100
|
-
accept: ".jpg, .jpeg, .png, .pdf, .JPG, .JPEG, .PNG, .PDF",
|
|
101
|
-
titleDescription: "lorem ipsum"
|
|
102
|
-
};
|
|
103
|
-
const buttonStyles = {
|
|
104
|
-
marginTop: "50px",
|
|
105
|
-
marginRight: "10px",
|
|
106
|
-
border: "solid 1px black",
|
|
107
|
-
padding: "5px"
|
|
108
|
-
};
|
|
109
|
-
(0, _react.useEffect)(()=>{
|
|
110
|
-
if (fields.every((item)=>item.value) && fields.length < 10) {
|
|
111
|
-
setFields([
|
|
112
|
-
...fields,
|
|
113
|
-
uploadFieldTemplate
|
|
114
|
-
]);
|
|
115
|
-
}
|
|
116
|
-
}, [
|
|
117
|
-
fields
|
|
118
|
-
]);
|
|
119
|
-
const handle = {
|
|
120
|
-
change: ({ e, name, id, error, valueExtension, file })=>{
|
|
121
|
-
const changedField = fields.find((item)=>item.id === id);
|
|
122
|
-
if (error) {
|
|
123
|
-
changedField.value = name;
|
|
124
|
-
changedField.error = error;
|
|
125
|
-
setFields([
|
|
126
|
-
...fields
|
|
127
|
-
]);
|
|
128
|
-
} else if (name && !error) {
|
|
129
|
-
(0, _utils.getBase64)(file).then((result)=>{
|
|
130
|
-
changedField.value = name;
|
|
131
|
-
changedField.base64 = result;
|
|
132
|
-
changedField.error = "";
|
|
133
|
-
setFields([
|
|
134
|
-
...fields
|
|
135
|
-
]);
|
|
136
|
-
}).catch((e)=>console.error(e));
|
|
137
|
-
} else {
|
|
138
|
-
const filteredFields = fields.filter((item)=>item.id !== id);
|
|
139
|
-
setFields([
|
|
140
|
-
...filteredFields
|
|
141
|
-
]);
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
reset: ()=>setFields([
|
|
145
|
-
args
|
|
146
|
-
])
|
|
147
|
-
};
|
|
148
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
149
|
-
children: [
|
|
150
|
-
fields.map((field)=>{
|
|
151
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
152
|
-
className: "mb10",
|
|
153
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FileLoaderLocal.default, {
|
|
154
|
-
fieldKey: field.id,
|
|
155
|
-
id: field.id,
|
|
156
|
-
error: field.error,
|
|
157
|
-
label: "Upload document",
|
|
158
|
-
accept: field.accept,
|
|
159
|
-
value: field.value,
|
|
160
|
-
maxItemSizeBytes: field.maxItemSizeBytes,
|
|
161
|
-
onChange: (value)=>handle.change(value, field.id),
|
|
162
|
-
isRequired: fields.length <= 1,
|
|
163
|
-
isNoTrashIcon: false,
|
|
164
|
-
titleDescription: field.titleDescription,
|
|
165
|
-
testId: "intelicoReact"
|
|
166
|
-
})
|
|
167
|
-
}, field.id);
|
|
168
|
-
}),
|
|
169
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
|
170
|
-
style: buttonStyles,
|
|
171
|
-
onClick: ()=>handle.reset(),
|
|
172
|
-
children: "Reset"
|
|
173
|
-
})
|
|
174
|
-
]
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
const FileLoaderLocalTemplate = Template.bind({});
|
|
178
|
-
FileLoaderLocalTemplate.args = {
|
|
179
|
-
id: 1,
|
|
180
|
-
value: "",
|
|
181
|
-
error: "",
|
|
182
|
-
isRequired: false,
|
|
183
|
-
maxItemSizeBytes: 1048576,
|
|
184
|
-
accept: ".jpg, .jpeg, .png, .pdf, .JPG, .JPEG, .PNG, .PDF",
|
|
185
|
-
titleDescription: "lorem ipsum"
|
|
186
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
FileLoaderLocalTemplate: function() {
|
|
13
|
-
return FileLoaderLocalTemplate;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
-
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
21
|
-
const _FileLoaderLocalGroup = /*#__PURE__*/ _interop_require_default(require("./FileLoaderLocalGroup"));
|
|
22
|
-
require("../../../../../scss/main.scss");
|
|
23
|
-
function _interop_require_default(obj) {
|
|
24
|
-
return obj && obj.__esModule ? obj : {
|
|
25
|
-
default: obj
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
global.lng = "en";
|
|
29
|
-
const _default = {
|
|
30
|
-
title: "Form Elements/FileLoaderLocalGroup",
|
|
31
|
-
component: _FileLoaderLocalGroup.default,
|
|
32
|
-
argTypes: {
|
|
33
|
-
isSingleGroup: {
|
|
34
|
-
description: "boolean - if true, then each group can only have one file"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const Template = (args)=>{
|
|
39
|
-
const mockGroups = [
|
|
40
|
-
{
|
|
41
|
-
groupId: "1",
|
|
42
|
-
groupTitleDescription: "group 1",
|
|
43
|
-
accept: ".jpg, .jpeg, .png, .pdf, .JPG, .JPEG, .PNG, .PDF"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
groupId: "2",
|
|
47
|
-
groupTitleDescription: "group 2",
|
|
48
|
-
accept: ".jpg, .pdf",
|
|
49
|
-
alertText: "lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, voluptatum."
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
groupId: "3",
|
|
53
|
-
groupTitleDescription: "group 3",
|
|
54
|
-
accept: ".html, .pdf"
|
|
55
|
-
}
|
|
56
|
-
];
|
|
57
|
-
const handleChange = (props)=>{
|
|
58
|
-
console.log(props, "props");
|
|
59
|
-
};
|
|
60
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
61
|
-
className: "mb10",
|
|
62
|
-
children: [
|
|
63
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FileLoaderLocalGroup.default, {
|
|
64
|
-
isSingleGroup: true,
|
|
65
|
-
onChange: handleChange,
|
|
66
|
-
className: "file-group",
|
|
67
|
-
groupsArray: mockGroups,
|
|
68
|
-
testId: "file-group",
|
|
69
|
-
...args
|
|
70
|
-
}),
|
|
71
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FileLoaderLocalGroup.default, {
|
|
72
|
-
isSingleGroup: true,
|
|
73
|
-
onChange: handleChange,
|
|
74
|
-
className: "file-group",
|
|
75
|
-
groupsArray: mockGroups,
|
|
76
|
-
testId: "file-group",
|
|
77
|
-
...args
|
|
78
|
-
})
|
|
79
|
-
]
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
const FileLoaderLocalTemplate = Template.bind({});
|
|
83
|
-
FileLoaderLocalTemplate.args = {
|
|
84
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
FormattedRawSSNTemplate: function() {
|
|
13
|
-
return FormattedRawSSNTemplate;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
21
|
-
const _FormattedRawSSN = /*#__PURE__*/ _interop_require_default(require("./FormattedRawSSN"));
|
|
22
|
-
require("../../../../../scss/main.scss");
|
|
23
|
-
function _interop_require_default(obj) {
|
|
24
|
-
return obj && obj.__esModule ? obj : {
|
|
25
|
-
default: obj
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
29
|
-
if (typeof WeakMap !== "function") return null;
|
|
30
|
-
var cacheBabelInterop = new WeakMap();
|
|
31
|
-
var cacheNodeInterop = new WeakMap();
|
|
32
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
33
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
34
|
-
})(nodeInterop);
|
|
35
|
-
}
|
|
36
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
37
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
38
|
-
return obj;
|
|
39
|
-
}
|
|
40
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
41
|
-
return {
|
|
42
|
-
default: obj
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
46
|
-
if (cache && cache.has(obj)) {
|
|
47
|
-
return cache.get(obj);
|
|
48
|
-
}
|
|
49
|
-
var newObj = {
|
|
50
|
-
__proto__: null
|
|
51
|
-
};
|
|
52
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
53
|
-
for(var key in obj){
|
|
54
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
55
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
56
|
-
if (desc && (desc.get || desc.set)) {
|
|
57
|
-
Object.defineProperty(newObj, key, desc);
|
|
58
|
-
} else {
|
|
59
|
-
newObj[key] = obj[key];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
newObj.default = obj;
|
|
64
|
-
if (cache) {
|
|
65
|
-
cache.set(obj, newObj);
|
|
66
|
-
}
|
|
67
|
-
return newObj;
|
|
68
|
-
}
|
|
69
|
-
global.lng = 'en';
|
|
70
|
-
const _default = {
|
|
71
|
-
title: 'Form Elements/FormattedRawSSN',
|
|
72
|
-
component: _FormattedRawSSN.default,
|
|
73
|
-
argTypes: {
|
|
74
|
-
onChange: {
|
|
75
|
-
action: 'onChange'
|
|
76
|
-
},
|
|
77
|
-
isHiddenDefault: {
|
|
78
|
-
control: 'boolean'
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const Template = (args)=>{
|
|
83
|
-
const { value: initialValue, ...restArgs } = args;
|
|
84
|
-
const [value, setValue] = (0, _react.useState)(initialValue || '');
|
|
85
|
-
const onChange = (newValue)=>{
|
|
86
|
-
setValue(newValue);
|
|
87
|
-
console.log(newValue);
|
|
88
|
-
};
|
|
89
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FormattedRawSSN.default, {
|
|
90
|
-
...restArgs,
|
|
91
|
-
value: value,
|
|
92
|
-
onChange: onChange
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
const FormattedRawSSNTemplate = Template.bind({});
|
|
96
|
-
FormattedRawSSNTemplate.args = {
|
|
97
|
-
value: '012345678',
|
|
98
|
-
fullSnnMask: 'DDD-DD-DDDD',
|
|
99
|
-
significantChars: [
|
|
100
|
-
'D'
|
|
101
|
-
],
|
|
102
|
-
maskChar: '*',
|
|
103
|
-
isHiddenDefault: true,
|
|
104
|
-
maxLen: 5,
|
|
105
|
-
countOfFirstDigitsToHide: 5,
|
|
106
|
-
postfix: '-1111'
|
|
107
|
-
};
|