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.
Files changed (177) hide show
  1. package/package.json +1 -1
  2. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.interface.js +0 -4
  3. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.stories.js +0 -89
  4. package/dist/Atomic/FormElements/ActionAlert/ActionAlert.test.js +0 -130
  5. package/dist/Atomic/FormElements/ActionAlert/index.js +0 -17
  6. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.interface.js +0 -4
  7. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.stories.js +0 -81
  8. package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.test.js +0 -104
  9. package/dist/Atomic/FormElements/AdvancedStatus/index.js +0 -17
  10. package/dist/Atomic/FormElements/Calendar/Calendar.props.js +0 -4
  11. package/dist/Atomic/FormElements/Calendar/Calendar.stories.js +0 -108
  12. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.interface.js +0 -4
  13. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +0 -100
  14. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.test.js +0 -143
  15. package/dist/Atomic/FormElements/CheckboxInput/index.js +0 -17
  16. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.interface.js +0 -4
  17. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.stories.js +0 -94
  18. package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.test.js +0 -177
  19. package/dist/Atomic/FormElements/CheckboxesLine/index.js +0 -17
  20. package/dist/Atomic/FormElements/Datepicker/Datepicker.stories.js +0 -51
  21. package/dist/Atomic/FormElements/Dropdown/Dropdown.stories.js +0 -596
  22. package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.stories.js +0 -272
  23. package/dist/Atomic/FormElements/FileLoader/FileLoader.stories.js +0 -182
  24. package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.stories.js +0 -327
  25. package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.stories.js +0 -186
  26. package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.stories.js +0 -84
  27. package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.stories.js +0 -107
  28. package/dist/Atomic/FormElements/Input/Input.stories.js +0 -251
  29. package/dist/Atomic/FormElements/InputCalendar/InputCalendar.stories.js +0 -115
  30. package/dist/Atomic/FormElements/InputColor/InputColor.stories.js +0 -119
  31. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.interface.js +0 -4
  32. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.stories.js +0 -178
  33. package/dist/Atomic/FormElements/InputCurrency/InputCurrency.test.js +0 -129
  34. package/dist/Atomic/FormElements/InputCurrency/index.js +0 -16
  35. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +0 -123
  36. package/dist/Atomic/FormElements/InputLink/InputLink.stories.js +0 -140
  37. package/dist/Atomic/FormElements/InputMask/InputMask.stories.js +0 -303
  38. package/dist/Atomic/FormElements/InputMask2/InputMask2.stories.js +0 -314
  39. package/dist/Atomic/FormElements/InputMask3/InputMask3.stories.js +0 -335
  40. package/dist/Atomic/FormElements/InputWithAction/InputWithAction.stories.js +0 -276
  41. package/dist/Atomic/FormElements/InputsRow/InputsRow.stories.js +0 -56
  42. package/dist/Atomic/FormElements/Label/Label.interface.js +0 -4
  43. package/dist/Atomic/FormElements/Label/Label.stories.js +0 -47
  44. package/dist/Atomic/FormElements/Label/Label.test.js +0 -167
  45. package/dist/Atomic/FormElements/Label/index.js +0 -17
  46. package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.stories.js +0 -172
  47. package/dist/Atomic/FormElements/MultiSelect/MultiSelect.stories.js +0 -121
  48. package/dist/Atomic/FormElements/NumericInput/NumericInput.stories.js +0 -184
  49. package/dist/Atomic/FormElements/RadioGroup/RadioGroup.stories.js +0 -79
  50. package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.stories.js +0 -151
  51. package/dist/Atomic/FormElements/RadioInput/RadioInput.stories.js +0 -67
  52. package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.stories.js +0 -116
  53. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.stories.js +0 -107
  54. package/dist/Atomic/FormElements/RangeInputs/RangeInputs.stories.js +0 -92
  55. package/dist/Atomic/FormElements/RangeList/RangeList.stories.js +0 -169
  56. package/dist/Atomic/FormElements/RangeSlider/RangeSlider.stories.js +0 -401
  57. package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.stories.js +0 -314
  58. package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.stories.js +0 -137
  59. package/dist/Atomic/FormElements/Switcher/Switcher.stories.js +0 -91
  60. package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.stories.js +0 -104
  61. package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.stories.js +0 -96
  62. package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.stories.js +0 -140
  63. package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.stories.js +0 -112
  64. package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.stories.js +0 -145
  65. package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.stories.js +0 -158
  66. package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.stories.js +0 -101
  67. package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.stories.js +0 -131
  68. package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.stories.js +0 -357
  69. package/dist/Atomic/FormElements/Text/Text.stories.js +0 -80
  70. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.stories.js +0 -106
  71. package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.test.js +0 -93
  72. package/dist/Atomic/FormElements/Textarea/Textarea.stories.js +0 -103
  73. package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.stories.js +0 -174
  74. package/dist/Atomic/FormElements/TimeRange/TimeRange.interface.js +0 -4
  75. package/dist/Atomic/FormElements/TimeRange/TimeRange.stories.js +0 -40
  76. package/dist/Atomic/FormElements/TimeRange/TimeRange.test.js +0 -163
  77. package/dist/Atomic/FormElements/TimeRange/index.js +0 -17
  78. package/dist/Atomic/FormElements/UserContacts/UserContact.test.js +0 -381
  79. package/dist/Atomic/FormElements/UserContacts/UserContacts.interface.js +0 -4
  80. package/dist/Atomic/FormElements/UserContacts/UserContacts.stories.js +0 -74
  81. package/dist/Atomic/FormElements/UserContacts/index.js +0 -17
  82. package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.stories.js +0 -193
  83. package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.stories.js +0 -147
  84. package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.stories.js +0 -151
  85. package/dist/Atomic/Layout/Header/Header.stories.js +0 -71
  86. package/dist/Atomic/Layout/MainMenu/MainMenu.stories.js +0 -115
  87. package/dist/Atomic/Layout/Spinner/Spinner.interface.js +0 -4
  88. package/dist/Atomic/Layout/Spinner/Spinner.stories.js +0 -46
  89. package/dist/Atomic/Layout/Spinner/Spinner.test.js +0 -54
  90. package/dist/Atomic/Layout/Spinner/index.js +0 -17
  91. package/dist/Atomic/UI/Accordion/Accordion.interface.js +0 -4
  92. package/dist/Atomic/UI/Accordion/Accordion.stories.js +0 -168
  93. package/dist/Atomic/UI/Accordion/Accordion.test.js +0 -54
  94. package/dist/Atomic/UI/Accordion/AccordionItem.test.js +0 -50
  95. package/dist/Atomic/UI/Accordion/index.js +0 -17
  96. package/dist/Atomic/UI/AccordionTable/AccordionTable.stories.js +0 -268
  97. package/dist/Atomic/UI/AccordionText/AccordionText.stories.js +0 -125
  98. package/dist/Atomic/UI/AdvancedTag/AdvancedTags.stories.js +0 -115
  99. package/dist/Atomic/UI/Alert/Alert.stories.js +0 -81
  100. package/dist/Atomic/UI/Arrow/Arrow.stories.js +0 -62
  101. package/dist/Atomic/UI/Box/Box.stories.js +0 -114
  102. package/dist/Atomic/UI/Button/Button.stories.js +0 -105
  103. package/dist/Atomic/UI/Button/Button.test.js +0 -147
  104. package/dist/Atomic/UI/ButtonsBar/ButtonsBar.stories.js +0 -129
  105. package/dist/Atomic/UI/Chart/Chart.stories.js +0 -93
  106. package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.stories.js +0 -85
  107. package/dist/Atomic/UI/DateTime/DateTime.stories.js +0 -50
  108. package/dist/Atomic/UI/DoubleString/DoubleString.stories.js +0 -79
  109. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.interface.js +0 -4
  110. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.stories.js +0 -98
  111. package/dist/Atomic/UI/DynamicIcon/DynamicIcon.test.js +0 -51
  112. package/dist/Atomic/UI/DynamicIcon/index.js +0 -17
  113. package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.stories.js +0 -98
  114. package/dist/Atomic/UI/Hint/Hint.stories.js +0 -101
  115. package/dist/Atomic/UI/Hint/index.js +0 -16
  116. package/dist/Atomic/UI/Modal/Modal.interface.js +0 -4
  117. package/dist/Atomic/UI/Modal/Modal.stories.js +0 -370
  118. package/dist/Atomic/UI/Modal/ModalHOC.stories.js +0 -191
  119. package/dist/Atomic/UI/Modal/ModalHOC.test.js +0 -187
  120. package/dist/Atomic/UI/Modal/index.js +0 -26
  121. package/dist/Atomic/UI/Modal/partials/ModalFooter.test.js +0 -118
  122. package/dist/Atomic/UI/Modal/partials/ModalTitle.test.js +0 -126
  123. package/dist/Atomic/UI/Modal/partials/useMobileModal.test.js +0 -133
  124. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.interface.js +0 -4
  125. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.stories.js +0 -513
  126. package/dist/Atomic/UI/MonoAccordion/MonoAccordion.test.js +0 -84
  127. package/dist/Atomic/UI/MonoAccordion/index.js +0 -17
  128. package/dist/Atomic/UI/NavLine/NavLine.interface.js +0 -4
  129. package/dist/Atomic/UI/NavLine/NavLine.stories.js +0 -434
  130. package/dist/Atomic/UI/NavLine/NavLine.test.js +0 -311
  131. package/dist/Atomic/UI/NavLine/index.js +0 -17
  132. package/dist/Atomic/UI/PageTitle/PageTitle.interface.js +0 -4
  133. package/dist/Atomic/UI/PageTitle/PageTitle.stories.js +0 -62
  134. package/dist/Atomic/UI/PageTitle/PageTitle.test.js +0 -181
  135. package/dist/Atomic/UI/PageTitle/index.js +0 -17
  136. package/dist/Atomic/UI/PieChart/PieChar.interface.js +0 -4
  137. package/dist/Atomic/UI/PieChart/PieChart.stories.js +0 -82
  138. package/dist/Atomic/UI/PieChart/PieChart.test.js +0 -142
  139. package/dist/Atomic/UI/PieChart/index.js +0 -26
  140. package/dist/Atomic/UI/Price/Price.interface.js +0 -4
  141. package/dist/Atomic/UI/Price/Price.stories.js +0 -52
  142. package/dist/Atomic/UI/Price/Price.test.js +0 -83
  143. package/dist/Atomic/UI/Price/index.js +0 -17
  144. package/dist/Atomic/UI/PriceRange/PriceRange.interface.js +0 -4
  145. package/dist/Atomic/UI/PriceRange/PriceRange.stories.js +0 -51
  146. package/dist/Atomic/UI/PriceRange/PriceRange.test.js +0 -72
  147. package/dist/Atomic/UI/PriceRange/index.js +0 -17
  148. package/dist/Atomic/UI/ProgressLine/ProgressLine.interface.js +0 -4
  149. package/dist/Atomic/UI/ProgressLine/ProgressLine.stories.js +0 -163
  150. package/dist/Atomic/UI/ProgressLine/ProgressLine.test.js +0 -60
  151. package/dist/Atomic/UI/ProgressLine/index.js +0 -17
  152. package/dist/Atomic/UI/Status/Status.interface.js +0 -4
  153. package/dist/Atomic/UI/Status/Status.stories.js +0 -79
  154. package/dist/Atomic/UI/Status/Status.test.js +0 -103
  155. package/dist/Atomic/UI/Status/index.js +0 -17
  156. package/dist/Atomic/UI/Table/Table.stories.js +0 -250
  157. package/dist/Atomic/UI/Tag/Tag.interface.js +0 -4
  158. package/dist/Atomic/UI/Tag/Tag.stories.js +0 -108
  159. package/dist/Atomic/UI/Tag/Tag.test.js +0 -75
  160. package/dist/Atomic/UI/Tag/index.js +0 -17
  161. package/dist/Atomic/UI/TagList/TagList.stories.js +0 -169
  162. package/dist/Atomic/UI/UserBox/UserBox.interface.js +0 -4
  163. package/dist/Atomic/UI/UserBox/UserBox.stories.js +0 -57
  164. package/dist/Atomic/UI/UserBox/UserBox.test.js +0 -136
  165. package/dist/Atomic/UI/UserBox/index.js +0 -17
  166. package/dist/Atomic/UI/WizardStepper/WizardStepper.stories.js +0 -70
  167. package/dist/Functions/useIsMobile/index.js +0 -17
  168. package/dist/Functions/useIsMobile/useIsMobile.js +0 -33
  169. package/dist/Functions/useIsMobile/useIsMobile.test.js +0 -104
  170. package/dist/Functions/useKeyPress/useHandleKeyPress.test.js +0 -96
  171. package/dist/Functions/useKeyPress/useKeyPress.test.js +0 -87
  172. package/dist/Molecular/FormElement/FormElement.stories.js +0 -92
  173. package/dist/Molecular/FormWithDependOn/FormWithDependOn.stories.js +0 -301
  174. package/dist/Molecular/InputAddress/InputAddress.stories.js +0 -541
  175. package/dist/Molecular/InputPassword/InputPassword.stories.js +0 -86
  176. package/dist/types/base.interface.js +0 -4
  177. package/dist/types/base.types.js +0 -4
@@ -1,147 +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
- WidgetPseudoTableTemplate: function() {
13
- return WidgetPseudoTableTemplate;
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 _reactfeather = require("react-feather");
22
- const _WidgetPseudoTable = /*#__PURE__*/ _interop_require_default(require("./WidgetPseudoTable"));
23
- const _Input = /*#__PURE__*/ _interop_require_default(require("../Input/Input"));
24
- const _constructor = /*#__PURE__*/ _interop_require_default(require("./partial/constructor"));
25
- require("./partial/AnyOuterClass.scss");
26
- function _interop_require_default(obj) {
27
- return obj && obj.__esModule ? obj : {
28
- default: obj
29
- };
30
- }
31
- function _getRequireWildcardCache(nodeInterop) {
32
- if (typeof WeakMap !== "function") return null;
33
- var cacheBabelInterop = new WeakMap();
34
- var cacheNodeInterop = new WeakMap();
35
- return (_getRequireWildcardCache = function(nodeInterop) {
36
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
37
- })(nodeInterop);
38
- }
39
- function _interop_require_wildcard(obj, nodeInterop) {
40
- if (!nodeInterop && obj && obj.__esModule) {
41
- return obj;
42
- }
43
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
44
- return {
45
- default: obj
46
- };
47
- }
48
- var cache = _getRequireWildcardCache(nodeInterop);
49
- if (cache && cache.has(obj)) {
50
- return cache.get(obj);
51
- }
52
- var newObj = {
53
- __proto__: null
54
- };
55
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
56
- for(var key in obj){
57
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
58
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
59
- if (desc && (desc.get || desc.set)) {
60
- Object.defineProperty(newObj, key, desc);
61
- } else {
62
- newObj[key] = obj[key];
63
- }
64
- }
65
- }
66
- newObj.default = obj;
67
- if (cache) {
68
- cache.set(obj, newObj);
69
- }
70
- return newObj;
71
- }
72
- // import '../../../../../scss//main.scss';
73
- global.lng = 'en';
74
- const _default = {
75
- title: 'Form Elements/WidgetPseudoTable',
76
- component: _WidgetPseudoTable.default
77
- };
78
- const rows = [
79
- {
80
- id: 1,
81
- label: 'Test Llender 1',
82
- key2: 0,
83
- key3: 0
84
- },
85
- {
86
- id: 2,
87
- label: 'Test Llender 2',
88
- key2: 0,
89
- key3: 0
90
- },
91
- {
92
- id: 3,
93
- label: 'Test Llender 3',
94
- key2: 0,
95
- key3: 0
96
- }
97
- ];
98
- const RenderField = ({ field, onChange })=>{
99
- const { key, value, label, rowData, disabled, itemClassName: className, testId } = field || {};
100
- switch(field.type){
101
- case 'input':
102
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Input.default, {
103
- ...field,
104
- className: className,
105
- value: value,
106
- onChange: (val)=>onChange(key, val),
107
- disabled: disabled,
108
- testId: testId
109
- });
110
- default:
111
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
112
- className: field.itemClassName,
113
- testId: testId,
114
- children: rowData.label
115
- });
116
- }
117
- };
118
- const Template = (args)=>{
119
- const { isIncludeOuterStyles, ...restArgs } = args;
120
- const [data, setData] = (0, _react.useState)(rows);
121
- const handle = {
122
- change: (newValue, propKey, rowId)=>setData((state)=>state.map((row)=>row.id === rowId ? {
123
- ...row,
124
- [propKey]: newValue
125
- } : row))
126
- };
127
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_WidgetPseudoTable.default, {
128
- ...restArgs,
129
- className: isIncludeOuterStyles ? 'any-outer-class__widget-pseudo-table' : null,
130
- rightHeaderContent: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
131
- className: "delete-icon",
132
- size: 16,
133
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.Trash2, {})
134
- }),
135
- CellComponent: RenderField,
136
- onChange: handle.change,
137
- rows: data
138
- });
139
- };
140
- const WidgetPseudoTableTemplate = Template.bind({});
141
- WidgetPseudoTableTemplate.args = {
142
- isIncludeOuterStyles: false,
143
- isNotRenderThead: false,
144
- isNoHeader: false,
145
- title: 'Test',
146
- columns: _constructor.default
147
- };
@@ -1,151 +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
- WidgetWithSwitchableRowsTemplate: function() {
13
- return WidgetWithSwitchableRowsTemplate;
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 _reactfeather = require("react-feather");
22
- const _WidgetWithSwitchableRows = /*#__PURE__*/ _interop_require_default(require("./WidgetWithSwitchableRows"));
23
- const _Input = /*#__PURE__*/ _interop_require_default(require("../Input/Input"));
24
- const _Switcher = /*#__PURE__*/ _interop_require_default(require("../Switcher/Switcher"));
25
- const _constructor = /*#__PURE__*/ _interop_require_default(require("./partial/constructor"));
26
- require("./partial/AnyOuterClass.scss");
27
- function _interop_require_default(obj) {
28
- return obj && obj.__esModule ? obj : {
29
- default: obj
30
- };
31
- }
32
- function _getRequireWildcardCache(nodeInterop) {
33
- if (typeof WeakMap !== "function") return null;
34
- var cacheBabelInterop = new WeakMap();
35
- var cacheNodeInterop = new WeakMap();
36
- return (_getRequireWildcardCache = function(nodeInterop) {
37
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
38
- })(nodeInterop);
39
- }
40
- function _interop_require_wildcard(obj, nodeInterop) {
41
- if (!nodeInterop && obj && obj.__esModule) {
42
- return obj;
43
- }
44
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
45
- return {
46
- default: obj
47
- };
48
- }
49
- var cache = _getRequireWildcardCache(nodeInterop);
50
- if (cache && cache.has(obj)) {
51
- return cache.get(obj);
52
- }
53
- var newObj = {
54
- __proto__: null
55
- };
56
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
57
- for(var key in obj){
58
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
59
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
60
- if (desc && (desc.get || desc.set)) {
61
- Object.defineProperty(newObj, key, desc);
62
- } else {
63
- newObj[key] = obj[key];
64
- }
65
- }
66
- }
67
- newObj.default = obj;
68
- if (cache) {
69
- cache.set(obj, newObj);
70
- }
71
- return newObj;
72
- }
73
- // import '../../../../../scss//main.scss';
74
- global.lng = 'en';
75
- const _default = {
76
- title: 'Form Elements/WidgetWithSwitchableRows',
77
- component: _WidgetWithSwitchableRows.default
78
- };
79
- const rows = [
80
- {
81
- id: 1,
82
- isActive: true,
83
- label: 'Test Llender 1',
84
- key1: 0,
85
- key2: 0
86
- },
87
- {
88
- id: 2,
89
- isActive: true,
90
- label: 'Test Llender 2',
91
- key1: 0,
92
- key2: 0
93
- },
94
- {
95
- id: 3,
96
- isActive: true,
97
- label: 'Test Llender 3',
98
- key1: 0,
99
- key2: 0
100
- }
101
- ];
102
- const RenderField = ({ field, onChange })=>{
103
- const { key, value, label, rowData, disabled, itemClassName: className, testId } = field || {};
104
- switch(field.type){
105
- case 'switcher':
106
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Switcher.default, {
107
- ...field,
108
- className: className,
109
- isActive: value,
110
- onChange: onChange,
111
- label: label,
112
- testid: `switchable-row-${testId}-switcher`,
113
- disabled: disabled
114
- });
115
- default:
116
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Input.default, {
117
- ...field,
118
- className: className,
119
- value: value,
120
- onChange: onChange,
121
- disabled: disabled,
122
- testId: testId
123
- });
124
- }
125
- };
126
- const Template = (args)=>{
127
- const { isIncludeOuterStyles, ...restArgs } = args;
128
- const [data, setData] = (0, _react.useState)(rows);
129
- const handle = {
130
- change: (props, newValue, propKey, rowId)=>console.log(props)
131
- };
132
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_WidgetWithSwitchableRows.default, {
133
- ...restArgs,
134
- className: isIncludeOuterStyles ? 'any-outer-class__widget-with-switchable-rows' : null,
135
- rightHeaderContent: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
136
- className: "delete-icon",
137
- size: 16,
138
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.Trash2, {})
139
- }),
140
- CellComponent: RenderField,
141
- onChange: handle.change,
142
- rows: data
143
- });
144
- };
145
- const WidgetWithSwitchableRowsTemplate = Template.bind({});
146
- WidgetWithSwitchableRowsTemplate.args = {
147
- isIncludeOuterStyles: false,
148
- title: 'Test',
149
- columns: _constructor.default,
150
- isNoHeader: false
151
- };
@@ -1,71 +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
- HeaderTemplate: function() {
13
- return HeaderTemplate;
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 _Header = /*#__PURE__*/ _interop_require_default(require("./Header"));
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: 'Layout/Header',
31
- component: _Header.default,
32
- argTypes: {
33
- name: {
34
- description: 'user name. string. optional'
35
- },
36
- surname: {
37
- description: 'user surname. string. optional'
38
- },
39
- status: {
40
- control: {
41
- type: 'select',
42
- options: [
43
- 'admin',
44
- 'user'
45
- ]
46
- },
47
- description: 'user role. string. optional'
48
- },
49
- img: {
50
- description: 'user image. string/url. optional'
51
- },
52
- hintText: {
53
- description: 'text for hint. string. optional'
54
- },
55
- hintLabel: {
56
- description: 'label for hint. string. optional'
57
- }
58
- }
59
- };
60
- const Template = (args)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_Header.default, {
61
- ...args
62
- });
63
- const HeaderTemplate = Template.bind({});
64
- HeaderTemplate.args = {
65
- name: 'Jesse',
66
- surname: 'James',
67
- status: 'admin',
68
- img: 'http://mediad.publicbroadcasting.net/p/shared/npr/styles/x_large/nprshared/201805/212379250.jpg',
69
- hintText: 'Hint text',
70
- hintLabel: 'Help'
71
- };
@@ -1,115 +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
- MainMenuTemplate: function() {
13
- return MainMenuTemplate;
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 _MainMenu = /*#__PURE__*/ _interop_require_default(require("./MainMenu"));
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: 'Layout/MainMenu',
31
- component: _MainMenu.default,
32
- argTypes: {
33
- items: {
34
- description: 'object'
35
- },
36
- className: {
37
- description: 'string. optional'
38
- }
39
- }
40
- };
41
- const Template = (args)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_MainMenu.default, {
42
- ...args
43
- });
44
- const MainMenuTemplate = Template.bind({});
45
- MainMenuTemplate.args = {
46
- items: {
47
- main: [
48
- {
49
- title: 'Dashboard',
50
- icon: 'Airplay',
51
- className: 'color--green-haze main-menu__icon'
52
- },
53
- {
54
- title: 'Consumers',
55
- icon: 'User',
56
- className: 'color--primary main-menu__icon'
57
- }
58
- ],
59
- mainMenu: [
60
- {
61
- title: 'Ticket Desk',
62
- icon: 'Tag',
63
- className: 'color--froly',
64
- children: []
65
- },
66
- {
67
- title: 'Accounting',
68
- icon: 'DollarSign',
69
- className: 'color--sea-buckthorn',
70
- children: []
71
- },
72
- {
73
- title: 'Users',
74
- icon: 'Users',
75
- className: 'color--gray-gull',
76
- children: []
77
- },
78
- {
79
- title: 'Settings',
80
- icon: 'Sliders',
81
- className: 'color--primary'
82
- }
83
- ],
84
- partners: [
85
- {
86
- title: 'Merchants',
87
- icon: 'ShoppingBag',
88
- className: 'color--froly'
89
- },
90
- {
91
- title: 'Lenders',
92
- icon: 'Briefcase',
93
- className: 'color--green-haze'
94
- },
95
- {
96
- title: 'Lender Ping Tree',
97
- icon: 'Shuffle',
98
- className: 'color--primary'
99
- }
100
- ],
101
- other: [
102
- {
103
- title: 'Reports',
104
- icon: 'PieChart',
105
- className: 'color--gray-gull'
106
- },
107
- {
108
- title: 'Tools',
109
- icon: 'Tool',
110
- className: 'color--sea-buckthorn'
111
- }
112
- ]
113
- },
114
- className: ''
115
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
@@ -1,46 +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
- SpinnerTemplate: function() {
13
- return SpinnerTemplate;
14
- },
15
- default: function() {
16
- return _default;
17
- }
18
- });
19
- const _jsxruntime = require("react/jsx-runtime");
20
- const _Spinner = /*#__PURE__*/ _interop_require_default(require("./Spinner"));
21
- require("../../../../../scss/main.scss");
22
- function _interop_require_default(obj) {
23
- return obj && obj.__esModule ? obj : {
24
- default: obj
25
- };
26
- }
27
- const _default = {
28
- title: 'Layout/Spinner',
29
- component: _Spinner.default,
30
- argTypes: {
31
- size: {
32
- description: '[small]'
33
- }
34
- },
35
- args: {
36
- size: 'small',
37
- className: '',
38
- testId: 'loader-box'
39
- }
40
- };
41
- function Template(args) {
42
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
43
- ...args
44
- });
45
- }
46
- const SpinnerTemplate = Template.bind({});
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- const _jsxruntime = require("react/jsx-runtime");
6
- const _react = require("@testing-library/react");
7
- const _Spinner = /*#__PURE__*/ _interop_require_default(require("./Spinner"));
8
- function _interop_require_default(obj) {
9
- return obj && obj.__esModule ? obj : {
10
- default: obj
11
- };
12
- }
13
- describe('spinner', ()=>{
14
- const defaultProps = {
15
- size: null,
16
- className: '',
17
- testId: 'loader-box'
18
- };
19
- it('renders with default props', ()=>{
20
- (0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
21
- ...defaultProps
22
- }));
23
- expect(_react.screen.getByTestId('loader-box')).toBeInTheDocument();
24
- });
25
- it('renders with custom className', ()=>{
26
- (0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
27
- ...defaultProps,
28
- className: "custom-class"
29
- }));
30
- expect(_react.screen.getByTestId('loader-box')).toHaveClass('custom-class');
31
- });
32
- it('applies correct class for non-small size', ()=>{
33
- // @ts-ignore
34
- (0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
35
- ...defaultProps,
36
- size: "large"
37
- }));
38
- expect(_react.screen.getByTestId('loader-box')).toHaveClass('j5');
39
- });
40
- it('applies correct class for small size', ()=>{
41
- (0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
42
- ...defaultProps,
43
- size: "small"
44
- }));
45
- expect(_react.screen.getByTestId('loader-box')).toHaveClass('j8');
46
- });
47
- it('applies correct class for lds-ring based on size', ()=>{
48
- (0, _react.render)(/*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
49
- ...defaultProps,
50
- size: "small"
51
- }));
52
- expect(_react.screen.getByTestId('loader-box').querySelector('.lds-ring')).toHaveClass('lds-ring_small');
53
- });
54
- });
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- const _Spinner = /*#__PURE__*/ _interop_require_default(require("./Spinner"));
12
- function _interop_require_default(obj) {
13
- return obj && obj.__esModule ? obj : {
14
- default: obj
15
- };
16
- }
17
- const _default = _Spinner.default;
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });