@tsed/react-formio 1.11.0 → 1.12.0

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 (148) hide show
  1. package/.env +2 -1
  2. package/craco.config.js +11 -1
  3. package/dist/components/alert/alert.component.spec.d.ts +1 -0
  4. package/dist/components/alert/alert.stories.d.ts +15 -0
  5. package/dist/components/card/card.component.d.ts +2 -1
  6. package/dist/components/form-action/formAction.stories.d.ts +90 -414
  7. package/dist/components/input-text/inputText.component.d.ts +1 -1
  8. package/dist/components/input-text/inputText.component.spec.d.ts +1 -0
  9. package/dist/components/loader/loader.component.d.ts +3 -3
  10. package/dist/components/loader/loader.stories.d.ts +15 -0
  11. package/dist/components/pagination/pagination.component.spec.d.ts +1 -0
  12. package/dist/components/pagination/pagination.stories.d.ts +0 -27
  13. package/dist/components/select/select.component.spec.d.ts +1 -0
  14. package/dist/components/tabs/tabs.component.spec.d.ts +1 -0
  15. package/dist/index.js +64 -32
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.modern.js +62 -33
  18. package/dist/index.modern.js.map +1 -1
  19. package/jest.config.js +1 -1
  20. package/package.json +5 -9
  21. package/readme.md +74 -79
  22. package/src/components/__fixtures__/form-schema.json +10 -42
  23. package/src/components/__fixtures__/form.fixture.json +1 -1
  24. package/src/components/actions-table/actionsTable.component.spec.tsx +4 -13
  25. package/src/components/actions-table/actionsTable.component.tsx +3 -11
  26. package/src/components/alert/alert.component.spec.tsx +97 -0
  27. package/src/components/alert/alert.component.tsx +2 -8
  28. package/src/components/alert/alert.stories.tsx +17 -0
  29. package/src/components/card/card.component.tsx +2 -5
  30. package/src/components/form/form.component.tsx +1 -7
  31. package/src/components/form/useForm.hook.ts +4 -13
  32. package/src/components/form-access/formAccess.component.tsx +19 -82
  33. package/src/components/form-access/formAccess.schema.ts +7 -23
  34. package/src/components/form-access/formAccess.stories.tsx +2 -9
  35. package/src/components/form-access/formAccess.utils.spec.ts +4 -22
  36. package/src/components/form-access/formAccess.utils.ts +7 -29
  37. package/src/components/form-action/formAction.component.tsx +3 -19
  38. package/src/components/form-action/formAction.stories.tsx +251 -672
  39. package/src/components/form-builder/formBuilder.component.tsx +4 -13
  40. package/src/components/form-builder/formBuilder.stories.tsx +12 -24
  41. package/src/components/form-control/formControl.component.tsx +2 -8
  42. package/src/components/form-edit/formCtas.component.tsx +5 -23
  43. package/src/components/form-edit/formEdit.component.tsx +2 -20
  44. package/src/components/form-edit/formEdit.reducer.ts +2 -8
  45. package/src/components/form-edit/formEdit.stories.tsx +3 -15
  46. package/src/components/form-edit/formParameters.component.tsx +3 -20
  47. package/src/components/form-edit/useFormEdit.hook.ts +2 -9
  48. package/src/components/form-settings/formSettings.component.spec.tsx +2 -9
  49. package/src/components/form-settings/formSettings.component.tsx +6 -34
  50. package/src/components/form-settings/formSettings.stories.tsx +1 -6
  51. package/src/components/form-settings/formSettings.utils.spec.ts +1 -4
  52. package/src/components/form-settings/formSettings.utils.ts +2 -7
  53. package/src/components/forms-table/components/formCell.component.tsx +2 -6
  54. package/src/components/forms-table/formsTable.component.tsx +2 -7
  55. package/src/components/input-tags/inputTags.component.tsx +10 -34
  56. package/src/components/input-tags/inputTags.stories.tsx +4 -14
  57. package/src/components/input-text/inputText.component.spec.tsx +56 -0
  58. package/src/components/input-text/inputText.component.tsx +4 -5
  59. package/src/components/input-text/inputText.stories.tsx +6 -26
  60. package/src/components/loader/loader.component.spec.tsx +7 -6
  61. package/src/components/loader/loader.component.tsx +4 -13
  62. package/src/components/loader/loader.stories.tsx +17 -0
  63. package/src/components/modal/modal.component.spec.tsx +8 -14
  64. package/src/components/modal/modal.component.tsx +6 -27
  65. package/src/components/modal/modal.stories.tsx +1 -5
  66. package/src/components/modal/removeModal.component.tsx +4 -22
  67. package/src/components/pagination/pagination.component.spec.tsx +111 -0
  68. package/src/components/pagination/pagination.component.tsx +10 -42
  69. package/src/components/pagination/pagination.stories.tsx +9 -29
  70. package/src/components/react-component/reactComponent.component.tsx +3 -11
  71. package/src/components/select/select.component.spec.tsx +86 -0
  72. package/src/components/select/select.component.tsx +11 -15
  73. package/src/components/select/select.stories.tsx +6 -26
  74. package/src/components/submissions-table/submissionsTable.component.tsx +1 -3
  75. package/src/components/submissions-table/submissionsTable.stories.tsx +1 -1
  76. package/src/components/table/components/defaultArrowSort.component.tsx +1 -10
  77. package/src/components/table/components/defaultCell.component.tsx +1 -4
  78. package/src/components/table/components/defaultCellHeader.component.tsx +4 -14
  79. package/src/components/table/components/defaultCellOperations.component.tsx +14 -25
  80. package/src/components/table/components/defaultOperationButton.component.tsx +2 -10
  81. package/src/components/table/filters/defaultColumnFilter.component.spec.tsx +1 -1
  82. package/src/components/table/filters/selectColumnFilter.component.spec.tsx +2 -10
  83. package/src/components/table/filters/selectColumnFilter.component.tsx +2 -6
  84. package/src/components/table/table.component.tsx +13 -53
  85. package/src/components/table/table.stories.tsx +1 -1
  86. package/src/components/table/utils/getPageNumbers.ts +3 -11
  87. package/src/components/table/utils/mapFormToColumns.tsx +14 -22
  88. package/src/components/table/utils/useOperations.hook.tsx +2 -12
  89. package/src/components/tabs/tabs.component.spec.tsx +86 -0
  90. package/src/components/tabs/tabs.component.stories.tsx +2 -9
  91. package/src/components/tabs/tabs.component.tsx +9 -43
  92. package/src/interfaces/Operation.ts +1 -4
  93. package/src/react-table.d.ts +9 -28
  94. package/src/stores/action/action.actions.ts +31 -33
  95. package/src/stores/action/action.reducers.spec.ts +1 -8
  96. package/src/stores/action/action.reducers.ts +1 -8
  97. package/src/stores/action/action.selectors.ts +1 -2
  98. package/src/stores/action-info/action-info.actions.spec.ts +1 -5
  99. package/src/stores/action-info/action-info.actions.ts +16 -19
  100. package/src/stores/action-info/action-info.reducers.spec.ts +1 -6
  101. package/src/stores/action-info/action-info.reducers.ts +1 -6
  102. package/src/stores/action-info/action-info.selectors.ts +1 -4
  103. package/src/stores/actions/actions.actions.spec.ts +1 -6
  104. package/src/stores/actions/actions.actions.ts +16 -19
  105. package/src/stores/actions/actions.reducers.spec.ts +1 -6
  106. package/src/stores/actions/actions.reducers.ts +1 -6
  107. package/src/stores/actions/actions.selectors.ts +2 -4
  108. package/src/stores/auth/auth.reducers.ts +1 -4
  109. package/src/stores/auth/auth.selectors.spec.ts +1 -5
  110. package/src/stores/auth/auth.selectors.ts +3 -6
  111. package/src/stores/auth/auth.utils.tsx +2 -8
  112. package/src/stores/auth/getAccess.action.spec.ts +11 -54
  113. package/src/stores/auth/getAccess.action.ts +1 -6
  114. package/src/stores/auth/initAuth.action.ts +15 -17
  115. package/src/stores/form/form.actions.spec.ts +8 -39
  116. package/src/stores/form/form.actions.ts +55 -64
  117. package/src/stores/form/form.reducers.spec.ts +1 -7
  118. package/src/stores/form/form.reducers.ts +1 -8
  119. package/src/stores/form/form.selectors.ts +1 -2
  120. package/src/stores/forms/forms.actions.spec.ts +5 -18
  121. package/src/stores/forms/forms.actions.ts +17 -21
  122. package/src/stores/forms/forms.reducers.spec.ts +1 -6
  123. package/src/stores/forms/forms.reducers.ts +2 -13
  124. package/src/stores/forms/forms.selectors.ts +2 -4
  125. package/src/stores/index.spec.ts +6 -9
  126. package/src/stores/root/root.selectors.spec.ts +1 -6
  127. package/src/stores/root/root.selectors.ts +6 -24
  128. package/src/stores/submission/submission.actions.spec.ts +11 -33
  129. package/src/stores/submission/submission.actions.ts +57 -66
  130. package/src/stores/submission/submission.reducers.spec.ts +17 -27
  131. package/src/stores/submission/submission.reducers.ts +1 -4
  132. package/src/stores/submission/submission.selectors.ts +1 -4
  133. package/src/stores/submissions/submissions.actions.spec.ts +5 -18
  134. package/src/stores/submissions/submissions.actions.ts +17 -26
  135. package/src/stores/submissions/submissions.reducers.spec.ts +3 -12
  136. package/src/stores/submissions/submissions.reducers.ts +3 -17
  137. package/src/stores/submissions/submissions.selectors.spec.ts +1 -4
  138. package/src/stores/submissions/submissions.selectors.ts +2 -4
  139. package/src/utils/getEventValue.ts +1 -4
  140. package/src/utils/iconClass.ts +2 -10
  141. package/src/utils/mapPagination.ts +1 -6
  142. package/src/utils/mapRequestParams.ts +2 -12
  143. package/src/utils/url.test.ts +4 -12
  144. package/src/utils/url.ts +2 -7
  145. package/tsconfig.json +4 -12
  146. package/tsconfig.test.json +1 -1
  147. package/.eslintrc +0 -47
  148. package/.prettierrc +0 -10
@@ -3,33 +3,6 @@ import { Pagination } from "./pagination.component";
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: typeof Pagination;
6
- argTypes: {
7
- pageSizes: {
8
- control: {
9
- type: string;
10
- };
11
- };
12
- pageCount: {
13
- control: {
14
- type: string;
15
- };
16
- };
17
- pageIndex: {
18
- control: {
19
- type: string;
20
- };
21
- };
22
- canPreviousPage: {
23
- control: {
24
- type: string;
25
- };
26
- };
27
- canNextPage: {
28
- control: {
29
- type: string;
30
- };
31
- };
32
- };
33
6
  parameters: {};
34
7
  };
35
8
  export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js CHANGED
@@ -130,6 +130,9 @@ function _defineProperties(target, props) {
130
130
  function _createClass(Constructor, protoProps, staticProps) {
131
131
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
132
132
  if (staticProps) _defineProperties(Constructor, staticProps);
133
+ Object.defineProperty(Constructor, "prototype", {
134
+ writable: false
135
+ });
133
136
  return Constructor;
134
137
  }
135
138
 
@@ -1725,8 +1728,7 @@ function Select(_ref) {
1725
1728
  _onChange = _ref.onChange,
1726
1729
  required = _ref.required,
1727
1730
  value = _ref.value,
1728
- _ref$choices = _ref.choices,
1729
- choices = _ref$choices === void 0 ? [] : _ref$choices,
1731
+ choices = _ref.choices,
1730
1732
  description = _ref.description,
1731
1733
  placeholder = _ref.placeholder,
1732
1734
  prefix = _ref.prefix,
@@ -1857,6 +1859,7 @@ function PaginationButton(props) {
1857
1859
  otherProps = _objectWithoutPropertiesLoose(props, ["component", "children", "disabled", "active"]);
1858
1860
 
1859
1861
  return React__default['default'].createElement(Component, Object.assign({}, otherProps, {
1862
+ "data-testid": 'pagination-button',
1860
1863
  disabled: disabled,
1861
1864
  className: classnames("page-link", disabled ? "disabled" : "", active ? "" : "", props.className)
1862
1865
  }), children);
@@ -1872,7 +1875,8 @@ function Pagination(props) {
1872
1875
  nextPage = props.nextPage,
1873
1876
  canNextPage = props.canNextPage,
1874
1877
  pageCount = props.pageCount,
1875
- pageIndex = props.pageIndex,
1878
+ _props$pageIndex = props.pageIndex,
1879
+ pageIndex = _props$pageIndex === void 0 ? 1 : _props$pageIndex,
1876
1880
  pageOptions = props.pageOptions,
1877
1881
  pageSize = props.pageSize,
1878
1882
  setPageSize = props.setPageSize,
@@ -1999,7 +2003,8 @@ function InputText(_ref) {
1999
2003
  suffix = _ref.suffix,
2000
2004
  description = _ref.description,
2001
2005
  className = _ref.className,
2002
- props = _objectWithoutPropertiesLoose(_ref, ["name", "value", "label", "onChange", "required", "size", "type", "prefix", "suffix", "description", "className"]);
2006
+ placeholder = _ref.placeholder,
2007
+ props = _objectWithoutPropertiesLoose(_ref, ["name", "value", "label", "onChange", "required", "size", "type", "prefix", "suffix", "description", "className", "placeholder"]);
2003
2008
 
2004
2009
  var _useState = React.useState(value),
2005
2010
  localValue = _useState[0],
@@ -2026,7 +2031,8 @@ function InputText(_ref) {
2026
2031
  className: classnames("form-control", size && "form-control-" + size),
2027
2032
  id: name,
2028
2033
  required: required,
2029
- value: localValue || "",
2034
+ value: localValue || placeholder || "",
2035
+ placeholder: placeholder,
2030
2036
  onChange: function onChange(event) {
2031
2037
  var value = getEventValue(event);
2032
2038
  setValue(value);
@@ -3190,7 +3196,8 @@ var FormBuilder = /*#__PURE__*/function (_React$Component) {
3190
3196
  var _this$builderRef;
3191
3197
 
3192
3198
  (_this$builderRef = this.builderRef) == null ? void 0 : _this$builderRef.destroy();
3193
- };
3199
+ } // eslint-disable-next-line react/no-deprecated
3200
+ ;
3194
3201
 
3195
3202
  _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
3196
3203
  try {
@@ -3984,9 +3991,10 @@ var moment = createCommonjsModule(function (module, exports) {
3984
3991
 
3985
3992
  function map(arr, fn) {
3986
3993
  var res = [],
3987
- i;
3994
+ i,
3995
+ arrLen = arr.length;
3988
3996
 
3989
- for (i = 0; i < arr.length; ++i) {
3997
+ for (i = 0; i < arrLen; ++i) {
3990
3998
  res.push(fn(arr[i], i));
3991
3999
  }
3992
4000
 
@@ -4105,7 +4113,10 @@ var moment = createCommonjsModule(function (module, exports) {
4105
4113
  updateInProgress = false;
4106
4114
 
4107
4115
  function copyConfig(to, from) {
4108
- var i, prop, val;
4116
+ var i,
4117
+ prop,
4118
+ val,
4119
+ momentPropertiesLen = momentProperties.length;
4109
4120
 
4110
4121
  if (!isUndefined(from._isAMomentObject)) {
4111
4122
  to._isAMomentObject = from._isAMomentObject;
@@ -4147,8 +4158,8 @@ var moment = createCommonjsModule(function (module, exports) {
4147
4158
  to._locale = from._locale;
4148
4159
  }
4149
4160
 
4150
- if (momentProperties.length > 0) {
4151
- for (i = 0; i < momentProperties.length; i++) {
4161
+ if (momentPropertiesLen > 0) {
4162
+ for (i = 0; i < momentPropertiesLen; i++) {
4152
4163
  prop = momentProperties[i];
4153
4164
  val = from[prop];
4154
4165
 
@@ -4200,9 +4211,10 @@ var moment = createCommonjsModule(function (module, exports) {
4200
4211
  var args = [],
4201
4212
  arg,
4202
4213
  i,
4203
- key;
4214
+ key,
4215
+ argLen = arguments.length;
4204
4216
 
4205
- for (i = 0; i < arguments.length; i++) {
4217
+ for (i = 0; i < argLen; i++) {
4206
4218
  arg = '';
4207
4219
 
4208
4220
  if (typeof arguments[i] === 'object') {
@@ -4632,9 +4644,10 @@ var moment = createCommonjsModule(function (module, exports) {
4632
4644
  if (typeof units === 'object') {
4633
4645
  units = normalizeObjectUnits(units);
4634
4646
  var prioritized = getPrioritizedUnits(units),
4635
- i;
4647
+ i,
4648
+ prioritizedLen = prioritized.length;
4636
4649
 
4637
- for (i = 0; i < prioritized.length; i++) {
4650
+ for (i = 0; i < prioritizedLen; i++) {
4638
4651
  this[prioritized[i].unit](units[prioritized[i].unit]);
4639
4652
  }
4640
4653
  } else {
@@ -4715,7 +4728,8 @@ var moment = createCommonjsModule(function (module, exports) {
4715
4728
 
4716
4729
  function addParseToken(token, callback) {
4717
4730
  var i,
4718
- func = callback;
4731
+ func = callback,
4732
+ tokenLen;
4719
4733
 
4720
4734
  if (typeof token === 'string') {
4721
4735
  token = [token];
@@ -4727,7 +4741,9 @@ var moment = createCommonjsModule(function (module, exports) {
4727
4741
  };
4728
4742
  }
4729
4743
 
4730
- for (i = 0; i < token.length; i++) {
4744
+ tokenLen = token.length;
4745
+
4746
+ for (i = 0; i < tokenLen; i++) {
4731
4747
  tokens[token[i]] = func;
4732
4748
  }
4733
4749
  }
@@ -5813,11 +5829,16 @@ var moment = createCommonjsModule(function (module, exports) {
5813
5829
  return globalLocale;
5814
5830
  }
5815
5831
 
5832
+ function isLocaleNameSane(name) {
5833
+ // Prevent names that look like filesystem paths, i.e contain '/' or '\'
5834
+ return name.match('^[^/\\\\]*$') != null;
5835
+ }
5836
+
5816
5837
  function loadLocale(name) {
5817
5838
  var oldLocale = null,
5818
5839
  aliasedRequire; // TODO: Find a better way to register and load all the locales in Node
5819
5840
 
5820
- if (locales[name] === undefined && 'object' !== 'undefined' && module && module.exports) {
5841
+ if (locales[name] === undefined && 'object' !== 'undefined' && module && module.exports && isLocaleNameSane(name)) {
5821
5842
  try {
5822
5843
  oldLocale = globalLocale._abbr;
5823
5844
  aliasedRequire = commonjsRequire;
@@ -6049,12 +6070,14 @@ var moment = createCommonjsModule(function (module, exports) {
6049
6070
  allowTime,
6050
6071
  dateFormat,
6051
6072
  timeFormat,
6052
- tzFormat;
6073
+ tzFormat,
6074
+ isoDatesLen = isoDates.length,
6075
+ isoTimesLen = isoTimes.length;
6053
6076
 
6054
6077
  if (match) {
6055
6078
  getParsingFlags(config).iso = true;
6056
6079
 
6057
- for (i = 0, l = isoDates.length; i < l; i++) {
6080
+ for (i = 0, l = isoDatesLen; i < l; i++) {
6058
6081
  if (isoDates[i][1].exec(match[1])) {
6059
6082
  dateFormat = isoDates[i][0];
6060
6083
  allowTime = isoDates[i][2] !== false;
@@ -6068,7 +6091,7 @@ var moment = createCommonjsModule(function (module, exports) {
6068
6091
  }
6069
6092
 
6070
6093
  if (match[3]) {
6071
- for (i = 0, l = isoTimes.length; i < l; i++) {
6094
+ for (i = 0, l = isoTimesLen; i < l; i++) {
6072
6095
  if (isoTimes[i][1].exec(match[3])) {
6073
6096
  // match[2] should be 'T' or space
6074
6097
  timeFormat = (match[2] || ' ') + isoTimes[i][0];
@@ -6404,10 +6427,12 @@ var moment = createCommonjsModule(function (module, exports) {
6404
6427
  skipped,
6405
6428
  stringLength = string.length,
6406
6429
  totalParsedInputLength = 0,
6407
- era;
6430
+ era,
6431
+ tokenLen;
6408
6432
  tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
6433
+ tokenLen = tokens.length;
6409
6434
 
6410
- for (i = 0; i < tokens.length; i++) {
6435
+ for (i = 0; i < tokenLen; i++) {
6411
6436
  token = tokens[i];
6412
6437
  parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
6413
6438
 
@@ -6500,15 +6525,16 @@ var moment = createCommonjsModule(function (module, exports) {
6500
6525
  i,
6501
6526
  currentScore,
6502
6527
  validFormatFound,
6503
- bestFormatIsValid = false;
6528
+ bestFormatIsValid = false,
6529
+ configfLen = config._f.length;
6504
6530
 
6505
- if (config._f.length === 0) {
6531
+ if (configfLen === 0) {
6506
6532
  getParsingFlags(config).invalidFormat = true;
6507
6533
  config._d = new Date(NaN);
6508
6534
  return;
6509
6535
  }
6510
6536
 
6511
- for (i = 0; i < config._f.length; i++) {
6537
+ for (i = 0; i < configfLen; i++) {
6512
6538
  currentScore = 0;
6513
6539
  validFormatFound = false;
6514
6540
  tempConfig = copyConfig({}, config);
@@ -6730,7 +6756,8 @@ var moment = createCommonjsModule(function (module, exports) {
6730
6756
  function isDurationValid(m) {
6731
6757
  var key,
6732
6758
  unitHasDecimal = false,
6733
- i;
6759
+ i,
6760
+ orderLen = ordering.length;
6734
6761
 
6735
6762
  for (key in m) {
6736
6763
  if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
@@ -6738,7 +6765,7 @@ var moment = createCommonjsModule(function (module, exports) {
6738
6765
  }
6739
6766
  }
6740
6767
 
6741
- for (i = 0; i < ordering.length; ++i) {
6768
+ for (i = 0; i < orderLen; ++i) {
6742
6769
  if (m[ordering[i]]) {
6743
6770
  if (unitHasDecimal) {
6744
6771
  return false; // only allow non-integers for smallest unit
@@ -7226,9 +7253,10 @@ var moment = createCommonjsModule(function (module, exports) {
7226
7253
  propertyTest = false,
7227
7254
  properties = ['years', 'year', 'y', 'months', 'month', 'M', 'days', 'day', 'd', 'dates', 'date', 'D', 'hours', 'hour', 'h', 'minutes', 'minute', 'm', 'seconds', 'second', 's', 'milliseconds', 'millisecond', 'ms'],
7228
7255
  i,
7229
- property;
7256
+ property,
7257
+ propertyLen = properties.length;
7230
7258
 
7231
- for (i = 0; i < properties.length; i += 1) {
7259
+ for (i = 0; i < propertyLen; i += 1) {
7232
7260
  property = properties[i];
7233
7261
  propertyTest = propertyTest || hasOwnProp(input, property);
7234
7262
  }
@@ -8970,7 +8998,7 @@ var moment = createCommonjsModule(function (module, exports) {
8970
8998
  config._d = new Date(toInt(input));
8971
8999
  }); //! moment.js
8972
9000
 
8973
- hooks.version = '2.29.1';
9001
+ hooks.version = '2.29.3';
8974
9002
  setHookCallback(createLocal);
8975
9003
  hooks.fn = proto;
8976
9004
  hooks.min = min;
@@ -9584,8 +9612,10 @@ function ButtonTab(_ref) {
9584
9612
  className = _ref.className,
9585
9613
  after = _ref.after;
9586
9614
  return React__default['default'].createElement("div", {
9615
+ title: 'button-wrapper',
9587
9616
  className: classnames("tw-tabs__button-wrapper", isActive ? "-active" : "", back ? "-back" : "", className)
9588
9617
  }, React__default['default'].createElement("button", {
9618
+ title: 'button-tab',
9589
9619
  className: classnames("tw-tabs__button", reverse ? "-reverse" : "", isActive ? "-active" : "", back ? "-back" : ""),
9590
9620
  onClick: onClick
9591
9621
  }, icon && React__default['default'].createElement("i", {
@@ -9615,6 +9645,7 @@ function Tabs(_ref2) {
9615
9645
  additionalProps = _objectWithoutPropertiesLoose(_ref2, ["style", "current", "items", "children", "HeaderChildren", "AddButton", "Button", "className", "onClick", "i18n"]);
9616
9646
 
9617
9647
  return React__default['default'].createElement("div", {
9648
+ "data-testid": 'tabs-comp',
9618
9649
  className: "tw-tabs " + className,
9619
9650
  style: style
9620
9651
  }, React__default['default'].createElement("div", null, React__default['default'].createElement("nav", {
@@ -9640,6 +9671,7 @@ function Tabs(_ref2) {
9640
9671
  })))), HeaderChildren && React__default['default'].createElement(HeaderChildren, Object.assign({}, additionalProps, {
9641
9672
  current: current
9642
9673
  }))), React__default['default'].createElement("div", {
9674
+ title: "tab-body",
9643
9675
  className: "tw-tabs__body"
9644
9676
  }, children));
9645
9677
  }
@@ -9667,7 +9699,7 @@ function Loader(_ref) {
9667
9699
  }
9668
9700
  Loader.propTypes = {
9669
9701
  isActive: PropTypes__default['default'].bool,
9670
- icon: PropTypes__default['default'].bool,
9702
+ icon: PropTypes__default['default'].string,
9671
9703
  color: PropTypes__default['default'].string,
9672
9704
  className: PropTypes__default['default'].string
9673
9705
  };