@dilicorp/ui 0.2.34 → 0.2.35

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 (71) hide show
  1. package/dist/atoms/button.js +2 -14
  2. package/dist/atoms/checkbox.js +2 -14
  3. package/dist/atoms/col.js +2 -14
  4. package/dist/atoms/container.js +2 -14
  5. package/dist/atoms/icon.js +3 -15
  6. package/dist/atoms/image.js +2 -13
  7. package/dist/atoms/input.js +2 -14
  8. package/dist/atoms/label.js +2 -14
  9. package/dist/atoms/link.js +3 -14
  10. package/dist/atoms/radio.js +2 -14
  11. package/dist/atoms/row.js +1 -1
  12. package/dist/atoms/skeleton.js +1 -1
  13. package/dist/atoms/switcher.d.ts +7 -0
  14. package/dist/atoms/switcher.js +10 -0
  15. package/dist/atoms/typography.js +2 -14
  16. package/dist/components/accordion/accordion-body.d.ts +1 -1
  17. package/dist/components/accordion/accordion-body.js +1 -1
  18. package/dist/components/accordion/accordion-header.d.ts +1 -1
  19. package/dist/components/accordion/accordion-header.js +1 -1
  20. package/dist/components/accordion/accordion-item.d.ts +1 -1
  21. package/dist/components/accordion/accordion-item.js +1 -1
  22. package/dist/components/accordion/accordion.d.ts +1 -1
  23. package/dist/components/accordion/accordion.js +4 -4
  24. package/dist/components/alert-modal/alert-context-provider.d.ts +17 -0
  25. package/dist/components/alert-modal/alert-context-provider.js +18 -0
  26. package/dist/components/alert-modal/alert-modal-content.d.ts +8 -0
  27. package/dist/components/alert-modal/alert-modal-content.js +57 -0
  28. package/dist/components/alert-modal/alert-modal-provider.d.ts +7 -0
  29. package/dist/components/alert-modal/alert-modal-provider.js +12 -0
  30. package/dist/components/alert-modal/alert-modal-template.d.ts +5 -0
  31. package/dist/components/alert-modal/alert-modal-template.js +16 -0
  32. package/dist/components/alert-template/alert-provider.js +2 -14
  33. package/dist/components/alert-template/alert-template.d.ts +1 -1
  34. package/dist/components/form-builder/components/button.js +2 -13
  35. package/dist/components/form-builder/components/checkbox.js +1 -1
  36. package/dist/components/form-builder/components/datepicker.js +2 -13
  37. package/dist/components/form-builder/components/dropzone.js +7 -3
  38. package/dist/components/form-builder/components/input-currency.js +2 -13
  39. package/dist/components/form-builder/components/input-mask.js +2 -13
  40. package/dist/components/form-builder/components/input-prefix-suffix.js +7 -18
  41. package/dist/components/form-builder/components/input.js +30 -22
  42. package/dist/components/form-builder/components/password.js +2 -13
  43. package/dist/components/form-builder/components/radio.js +1 -1
  44. package/dist/components/form-builder/form-builder-element.js +2 -13
  45. package/dist/components/form-builder/form-builder.js +8 -18
  46. package/dist/components/navbar/navbar.js +6 -3
  47. package/dist/components/page-list/column-management-components/modal-config.js +2 -1
  48. package/dist/components/page-list/filter-components/button-filter-clear.js +1 -1
  49. package/dist/components/page-list/filter-components/filter-form.js +2 -2
  50. package/dist/components/page-list/filters/filter-datepicker.js +1 -1
  51. package/dist/components/page-list/filters/filter-input.js +11 -15
  52. package/dist/components/page-list/page-list-config/page-list-config-column-management.js +1 -1
  53. package/dist/components/page-list/page-list-config/page-list-config-dropdown.js +16 -4
  54. package/dist/components/page-list/page-list-get-filters.js +7 -1
  55. package/dist/components/page-list/page-list.js +2 -2
  56. package/dist/components/page-show/page-show.js +2 -2
  57. package/dist/components/side-navigation-bar/side-navigation-bar-item.js +11 -22
  58. package/dist/components/side-navigation-bar/side-navigation-bar.js +8 -8
  59. package/dist/components/tabs/tabs.js +6 -2
  60. package/dist/css/style.min.css +1 -1
  61. package/dist/index.d.ts +3 -0
  62. package/dist/index.js +3 -0
  63. package/dist/molecules/card-summary/card-summary-container.js +1 -1
  64. package/dist/molecules/dropdown/dropdown-item.js +6 -17
  65. package/dist/molecules/dropdown/dropdown.js +10 -7
  66. package/dist/molecules/paginate.js +1 -1
  67. package/dist/molecules/table-column-management.js +2 -2
  68. package/dist/molecules/table.js +14 -21
  69. package/dist/utils/object-helper.js +1 -1
  70. package/dist/utils/window-helper.js +8 -7
  71. package/package.json +2 -2
@@ -1,17 +1,6 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from 'react';
13
2
  import { InputDatepicker } from '../../../atoms/input-datepicker';
14
3
  export default function DatePicker(props) {
15
- const { name, actions, value, id = name } = props, rest = __rest(props, ["name", "actions", "value", "id"]);
16
- return (React.createElement(InputDatepicker, Object.assign({ value: value || '', name: name, "data-testid": id }, rest, { onChange: actions.setFieldValue })));
4
+ const { name, actions, value, id = name, ...rest } = props;
5
+ return (React.createElement(InputDatepicker, { value: value || '', name: name, "data-testid": id, ...rest, onChange: actions.setFieldValue }));
17
6
  }
@@ -8,10 +8,14 @@ export default function DropZone(props) {
8
8
  dropzoneOptions.onDrop(acceptedFiles, rejectedFiles, event);
9
9
  }
10
10
  }, []);
11
- const { acceptedFiles, fileRejections, getRootProps, getInputProps, isDragActive } = useDropzone(Object.assign(Object.assign({}, dropzoneOptions), { onDrop, multiple: (dropzoneOptions === null || dropzoneOptions === void 0 ? void 0 : dropzoneOptions.multiple) || false }));
11
+ const { acceptedFiles, fileRejections, getRootProps, getInputProps, isDragActive } = useDropzone({
12
+ ...dropzoneOptions,
13
+ onDrop,
14
+ multiple: (dropzoneOptions === null || dropzoneOptions === void 0 ? void 0 : dropzoneOptions.multiple) || false
15
+ });
12
16
  return (React.createElement("div", { className: "dropzone-container" },
13
- React.createElement("div", Object.assign({}, getRootProps({ className: 'dropzone' })),
14
- React.createElement("input", Object.assign({}, getInputProps({ name, id }), { "data-testid": id })),
17
+ React.createElement("div", { ...getRootProps({ className: 'dropzone' }) },
18
+ React.createElement("input", { ...getInputProps({ name, id }), "data-testid": id }),
15
19
  isDragActive
16
20
  ? React.createElement("p", null, textFileSelect)
17
21
  : React.createElement("p", null, textFileSelected)),
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import { FastField, Field } from 'formik';
13
2
  import React from 'react';
14
3
  import numberHelper from '../../../utils/number-helper';
@@ -24,7 +13,7 @@ export const InputCurrency = ({ attrs, handleChange, currency, name }) => {
24
13
  }
25
14
  });
26
15
  };
27
- const { fastField = true } = attrs, restAttrs = __rest(attrs, ["fastField"]);
16
+ const { fastField = true, ...restAttrs } = attrs;
28
17
  const Tag = fastField ? FastField : Field;
29
- return (React.createElement(Tag, { name: name }, ({ field }) => React.createElement("input", Object.assign({}, field, restAttrs, { onChange: handleChangeCurrency, min: "0", maxLength: maxLength }))));
18
+ return (React.createElement(Tag, { name: name }, ({ field }) => React.createElement("input", { ...field, ...restAttrs, onChange: handleChangeCurrency, min: "0", maxLength: maxLength })));
30
19
  };
@@ -1,19 +1,8 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import { FastField, Field } from 'formik';
13
2
  import React from 'react';
14
3
  import ReactInputMask from 'react-input-mask';
15
4
  export const InputMask = ({ attrs, mask, name }) => {
16
- const { fastField = true } = attrs, restAttrs = __rest(attrs, ["fastField"]);
5
+ const { fastField = true, ...restAttrs } = attrs;
17
6
  const Tag = fastField ? FastField : Field;
18
- return (React.createElement(Tag, { name: name }, ({ field }) => React.createElement(ReactInputMask, Object.assign({}, field, restAttrs, { mask: mask }))));
7
+ return (React.createElement(Tag, { name: name }, ({ field }) => React.createElement(ReactInputMask, { ...field, ...restAttrs, mask: mask })));
19
8
  };
@@ -1,28 +1,17 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from 'react';
13
2
  import { FastField, Field } from 'formik';
14
3
  export const InputPrefixSuffix = ({ attrs, suffix, prefix }) => {
15
4
  var _a;
16
- const { fastField = true } = attrs, restAttrs = __rest(attrs, ["fastField"]);
5
+ const { fastField = true, ...restAttrs } = attrs;
17
6
  const Tag = fastField ? FastField : Field;
18
7
  return (React.createElement("div", { className: "position-relative" },
19
8
  prefix && React.createElement("div", { className: "input-prefix" }, typeof prefix === 'string' ? React.createElement("span", null, prefix) : prefix),
20
- React.createElement(Tag, Object.assign({}, restAttrs, { readOnly: true, onFocus: (event) => {
9
+ React.createElement(Tag, { ...restAttrs, readOnly: true, onFocus: (event) => {
21
10
  event.currentTarget.readOnly = false;
22
- } }, ((prefix && typeof prefix === 'string') && {
23
- style: {
24
- paddingLeft: (((_a = prefix === null || prefix === void 0 ? void 0 : prefix.length) !== null && _a !== void 0 ? _a : 0) * 8) + 10
25
- }
26
- }))),
11
+ }, ...((prefix && typeof prefix === 'string') && {
12
+ style: {
13
+ paddingLeft: (((_a = prefix === null || prefix === void 0 ? void 0 : prefix.length) !== null && _a !== void 0 ? _a : 0) * 8) + 10
14
+ }
15
+ }) }),
27
16
  suffix && React.createElement("div", { className: "input-suffix" }, typeof suffix === 'string' ? React.createElement("span", null, suffix) : suffix)));
28
17
  };
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from 'react';
13
2
  import { FastField, Field } from 'formik';
14
3
  import classNames from 'classnames';
@@ -16,7 +5,7 @@ import { InputCurrency } from './input-currency';
16
5
  import { InputMask } from './input-mask';
17
6
  import { InputPrefixSuffix } from './input-prefix-suffix';
18
7
  export default function Input(props) {
19
- const { name, id = name, type = 'text', tabIndex = 0, actions, mask, multiple = false, currency, className, prefix, suffix, fastField = true } = props, elements = __rest(props, ["name", "id", "type", "tabIndex", "actions", "mask", "multiple", "currency", "className", "prefix", "suffix", "fastField"]);
8
+ const { name, id = name, type = 'text', tabIndex = 0, actions, mask, multiple = false, currency, className, prefix, suffix, fastField = true, ...elements } = props;
20
9
  const validOptions = {
21
10
  alt: elements.alt,
22
11
  autoComplete: elements.autoComplete,
@@ -34,12 +23,18 @@ export default function Input(props) {
34
23
  const handleChange = (event) => {
35
24
  if (elements.onChange) {
36
25
  elements.onChange({
37
- currentTarget: Object.assign(Object.assign({}, event.currentTarget), { name })
26
+ currentTarget: {
27
+ ...event.currentTarget,
28
+ name
29
+ }
38
30
  });
39
31
  }
40
32
  if (elements.onBlur) {
41
33
  elements.onBlur({
42
- currentTarget: Object.assign(Object.assign({}, event.currentTarget), { name })
34
+ currentTarget: {
35
+ ...event.currentTarget,
36
+ name
37
+ }
43
38
  });
44
39
  }
45
40
  if (actions.setFieldValue) {
@@ -57,17 +52,30 @@ export default function Input(props) {
57
52
  };
58
53
  const curValue = actions.values[name];
59
54
  const classes = classNames(className, 'form-control');
60
- const attrsInput = Object.assign(Object.assign({}, validOptions), { value: curValue, className: classes, name,
61
- id, 'data-testid': id, type: type === 'number' ? 'text' : type, tabIndex, autoComplete: 'none', onChange: handleChange });
62
- const attrs = Object.assign(Object.assign({}, attrsInput), { fastField });
55
+ const attrsInput = {
56
+ ...validOptions,
57
+ value: curValue,
58
+ className: classes,
59
+ name,
60
+ id,
61
+ 'data-testid': id,
62
+ type: type === 'number' ? 'text' : type,
63
+ tabIndex,
64
+ autoComplete: 'none',
65
+ onChange: handleChange
66
+ };
67
+ const attrs = {
68
+ ...attrsInput,
69
+ fastField
70
+ };
63
71
  if (currency)
64
- return React.createElement(InputCurrency, Object.assign({}, { name, attrs, currency, handleChange }));
72
+ return React.createElement(InputCurrency, { ...{ name, attrs, currency, handleChange } });
65
73
  if (mask)
66
- return React.createElement(InputMask, Object.assign({}, { name, attrs, mask }));
74
+ return React.createElement(InputMask, { ...{ name, attrs, mask } });
67
75
  if (prefix || suffix)
68
- return React.createElement(InputPrefixSuffix, Object.assign({}, { attrs, suffix, prefix }));
76
+ return React.createElement(InputPrefixSuffix, { ...{ attrs, suffix, prefix } });
69
77
  const Tag = fastField ? FastField : Field;
70
- return (React.createElement(Tag, Object.assign({}, attrsInput, { as: multiple ? 'textarea' : 'input', readOnly: true, onFocus: (event) => {
78
+ return (React.createElement(Tag, { ...attrsInput, as: multiple ? 'textarea' : 'input', readOnly: true, onFocus: (event) => {
71
79
  event.currentTarget.readOnly = false;
72
- } })));
80
+ } }));
73
81
  }
@@ -1,18 +1,7 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from 'react';
13
2
  import { Field } from 'formik';
14
3
  export default function Password(props) {
15
- const { name, id = name, tabIndex = 0, actions, labelButton = 'show' } = props, elements = __rest(props, ["name", "id", "tabIndex", "actions", "labelButton"]);
4
+ const { name, id = name, tabIndex = 0, actions, labelButton = 'show', ...elements } = props;
16
5
  const validOptions = {
17
6
  alt: elements.alt,
18
7
  autoComplete: elements.autoComplete,
@@ -42,5 +31,5 @@ export default function Password(props) {
42
31
  };
43
32
  return (React.createElement("div", { className: "position-relative" },
44
33
  React.createElement("div", { role: "button", className: `form-password-button${visible ? ' visible' : ''}`, onClick: handleVisible }, labelButton),
45
- React.createElement(Field, Object.assign({}, validOptions, { type: visible ? 'text' : 'password', className: "form-control", name: name, id: id, "data-testid": id, tabIndex: tabIndex, onChange: handleChange, readOnly: true, autoComplete: "off", onFocus: handleFocus }))));
34
+ React.createElement(Field, { ...validOptions, type: visible ? 'text' : 'password', className: "form-control", name: name, id: id, "data-testid": id, tabIndex: tabIndex, onChange: handleChange, readOnly: true, autoComplete: "off", onFocus: handleFocus })));
46
35
  }
@@ -20,6 +20,6 @@ export default function Radio(props) {
20
20
  };
21
21
  const Tag = fastField ? FastField : Field;
22
22
  return options.map((option, index) => (React.createElement("div", { className: "form-check", key: `${name}-${index}` },
23
- React.createElement(Tag, Object.assign({ value: option.value, name: name, id: `${id}-${index}`, "data-testid": `${id}-${index}` }, isChecked(option), { disabled }, { type: "radio", tabIndex: tabIndex, className: "form-check-input", onChange: handleChange })),
23
+ React.createElement(Tag, { value: option.value, name: name, id: `${id}-${index}`, "data-testid": `${id}-${index}`, ...isChecked(option), ...{ disabled }, type: "radio", tabIndex: tabIndex, className: "form-check-input", onChange: handleChange }),
24
24
  React.createElement("label", { className: "form-check-label", htmlFor: `${id}-${index}` }, option.label))));
25
25
  }
@@ -1,19 +1,8 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from 'react';
13
2
  import { FormBuilderComponentsList } from './form-builder-components-list';
14
3
  import { FormGroup } from './_partials/form-group';
15
4
  export const FormBuilderElement = (props) => {
16
- const { component, value, actions } = props, elements = __rest(props, ["component", "value", "actions"]);
5
+ const { component, value, actions, ...elements } = props;
17
6
  const Component = (component && typeof component === 'object')
18
7
  ? component
19
8
  : (component != null
@@ -22,5 +11,5 @@ export const FormBuilderElement = (props) => {
22
11
  if (!Component)
23
12
  return null;
24
13
  return (React.createElement(FormGroup, { name: props.name, title: props.title, validations: props.validations },
25
- React.createElement(Component, Object.assign({}, elements, { value: value || '', actions: actions }))));
14
+ React.createElement(Component, { ...elements, value: value || '', actions: actions })));
26
15
  };
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from 'react';
13
2
  import { Form, Formik } from 'formik';
14
3
  import { Row, Col, Typography } from '../../';
@@ -16,16 +5,17 @@ import { FormBuilderElement } from './form-builder-element';
16
5
  import { FormBuilderHelper } from './utils/form-builder-helper';
17
6
  export const FormBuilder = (props) => {
18
7
  const { data, onSubmit, className } = props;
19
- const options = Object.assign(Object.assign({ enableReinitialize: true }, FormBuilderHelper.init(data).build()), { onSubmit });
8
+ const options = {
9
+ enableReinitialize: true,
10
+ ...FormBuilderHelper.init(data).build(),
11
+ onSubmit
12
+ };
20
13
  return (React.createElement("div", { className: "w-100" },
21
- React.createElement(Formik, Object.assign({}, options), (actions) => (React.createElement(Form, { className: `form-builder${className ? ' ' + className : ''}` }, data.map(({ name, customComponent: Component, items, classes }, index) => (React.createElement("div", { key: index, className: `so-form-group${(classes === null || classes === void 0 ? void 0 : classes.soFormGroup) ? ' ' + (classes === null || classes === void 0 ? void 0 : classes.soFormGroup) : ''}` },
14
+ React.createElement(Formik, { ...options }, (actions) => (React.createElement(Form, { className: `form-builder${className ? ' ' + className : ''}` }, data.map(({ name, customComponent: Component, items, classes }, index) => (React.createElement("div", { key: index, className: `so-form-group${(classes === null || classes === void 0 ? void 0 : classes.soFormGroup) ? ' ' + (classes === null || classes === void 0 ? void 0 : classes.soFormGroup) : ''}` },
22
15
  name && React.createElement(Typography, { tag: "h2", variant: "h5" }, name),
23
16
  Boolean(Component) && Component,
24
17
  React.createElement(Row, null, items
25
18
  .filter(item => item === null || item === void 0 ? void 0 : item.component)
26
- .map((_a) => {
27
- var { column, columnClassName } = _a, item = __rest(_a, ["column", "columnClassName"]);
28
- return (React.createElement(Col, { key: item.name, size: column !== null && column !== void 0 ? column : 12, className: columnClassName },
29
- React.createElement(FormBuilderElement, Object.assign({}, item, { actions: actions }))));
30
- }))))))))));
19
+ .map(({ column, columnClassName, ...item }) => (React.createElement(Col, { key: item.name, size: column !== null && column !== void 0 ? column : 12, className: columnClassName },
20
+ React.createElement(FormBuilderElement, { ...item, actions: actions })))))))))))));
31
21
  };
@@ -4,15 +4,18 @@ import { Icon } from '../../atoms/icon';
4
4
  import { Image } from '../../atoms/image';
5
5
  export const Navbar = (props) => {
6
6
  const { image, dropdown, showUserIcon = true, items } = props;
7
- const dropdownWithNavItems = Object.assign(Object.assign({}, dropdown), { items: [...(items || []).map(item => ({ separator: true, element: React.createElement("div", { className: "nav-item-mobile" }, item) })), ...dropdown.items] });
7
+ const dropdownWithNavItems = {
8
+ ...dropdown,
9
+ items: [...(items || []).map(item => ({ separator: true, element: React.createElement("div", { className: "nav-item-mobile" }, item) })), ...dropdown.items]
10
+ };
8
11
  return (React.createElement("div", { className: "navbar" },
9
12
  React.createElement("div", { className: "navbar-profile" }, items === null || items === void 0 ? void 0 :
10
13
  items.map((item, index) => React.createElement("div", { key: `nav-bar-item-${index}`, className: "mx-2 d-flex align-items-center justify-content-center" }, item)),
11
14
  image
12
- ? React.createElement(Image, Object.assign({}, image, { circle: true, width: "38px", height: "38px", objectFit: "cover", className: "me-2" }))
15
+ ? React.createElement(Image, { ...image, circle: true, width: "38px", height: "38px", objectFit: "cover", className: "me-2" })
13
16
  : (showUserIcon &&
14
17
  React.createElement("div", { className: "image-profile circle me-2" },
15
18
  React.createElement(Icon, { icon: "faUserAlt" })))),
16
19
  React.createElement("div", { className: "dropdown-seaction" },
17
- React.createElement(Dropdown, Object.assign({}, dropdownWithNavItems)))));
20
+ React.createElement(Dropdown, { ...dropdownWithNavItems }))));
18
21
  };
@@ -8,7 +8,8 @@ export const ModalConfig = ({ title, description = '', items, defaultConfig, can
8
8
  const [columns, setColumns] = React.useState(items);
9
9
  const handleCheckColumn = React.useCallback(id => {
10
10
  setColumns(prev => prev.map(curr => curr.id === id
11
- ? Object.assign(Object.assign({}, curr), { show: !curr.show }) : curr));
11
+ ? { ...curr, show: !curr.show }
12
+ : curr));
12
13
  }, []);
13
14
  const columnsVisible = Array.from(columns.filter(item => item.show));
14
15
  const columnsOrdered = [...columns];
@@ -13,7 +13,7 @@ export const ButtonFilterClear = (props) => {
13
13
  const whiteList = ['tab'];
14
14
  const elements = objectHelper.destruct(search, ...whiteList);
15
15
  navigate({
16
- search: uriHelper.stringify(Object.assign(Object.assign({}, elements), { page: 1 }))
16
+ search: uriHelper.stringify({ ...elements, page: 1 })
17
17
  });
18
18
  }, [search, navigate]);
19
19
  return (React.createElement(Button, { color: color, className: classes, onClick: handleClick, outline: outline },
@@ -13,14 +13,14 @@ export const FilterForm = (props) => {
13
13
  for (let i = 0; i < count; i++) {
14
14
  // @ts-ignore
15
15
  if (whiteList.includes((fields[i]).localName) && fields[i].name) {
16
- Object.assign(elements, {
16
+ Object.assign(elements || {}, {
17
17
  // @ts-ignore
18
18
  [fields[i].name]: fields[i].value
19
19
  });
20
20
  }
21
21
  }
22
22
  navigate({
23
- search: uriHelper.stringify(Object.assign(Object.assign({}, elements), { page: 1 }))
23
+ search: uriHelper.stringify({ ...elements, page: 1 })
24
24
  });
25
25
  } }, children));
26
26
  };
@@ -16,5 +16,5 @@ export const FilterDatepicker = (props) => {
16
16
  Boolean(placeholder) && React.createElement("label", { className: "form-label", htmlFor: name },
17
17
  placeholder,
18
18
  ":"),
19
- React.createElement(InputDatepicker, Object.assign({}, props, { value: value || currentValue || '', id: id, minDate: minDate, maxDate: maxDate, onChange: handleChange, onBlur: handleBlur }))));
19
+ React.createElement(InputDatepicker, { ...props, value: value || currentValue || '', id: id, minDate: minDate, maxDate: maxDate, onChange: handleChange, onBlur: handleBlur })));
20
20
  };
@@ -1,19 +1,8 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from 'react';
13
2
  import classNames from 'classnames';
14
3
  import InputMask from 'react-input-mask';
15
4
  export const FilterInput = (props) => {
16
- const { name, className, id = name, mask, value, placeholder } = props, elements = __rest(props, ["name", "className", "id", "mask", "value", "placeholder"]);
5
+ const { name, className, id = name, mask, value, placeholder, ...elements } = props;
17
6
  const validOptions = {
18
7
  alt: elements.alt,
19
8
  autoComplete: elements.autoComplete,
@@ -25,17 +14,24 @@ export const FilterInput = (props) => {
25
14
  required: elements.required
26
15
  };
27
16
  const classes = classNames(className, 'form-control');
28
- const attrs = Object.assign(Object.assign({}, validOptions), { className: classes, name: name, id: id, defaultValue: value, onChange: props.onChange });
17
+ const attrs = {
18
+ ...validOptions,
19
+ className: classes,
20
+ name: name,
21
+ id: id,
22
+ defaultValue: value,
23
+ onChange: props.onChange
24
+ };
29
25
  if (mask) {
30
26
  return (React.createElement("div", { className: "form-group" },
31
27
  Boolean(placeholder) && React.createElement("label", { className: "form-label", htmlFor: name },
32
28
  placeholder,
33
29
  ":"),
34
- React.createElement(InputMask, Object.assign({ mask: mask }, attrs))));
30
+ React.createElement(InputMask, { mask: mask, ...attrs })));
35
31
  }
36
32
  return (React.createElement("div", { className: "form-group" },
37
33
  Boolean(placeholder) && React.createElement("label", { className: "form-label", htmlFor: name },
38
34
  placeholder,
39
35
  ":"),
40
- React.createElement("input", Object.assign({}, attrs))));
36
+ React.createElement("input", { ...attrs })));
41
37
  };
@@ -16,6 +16,6 @@ export const PageListConfigColumnManagement = ({ columnManagement, onClick }) =>
16
16
  modalActions.open();
17
17
  } }),
18
18
  React.createElement(Alert, { ref: modal, className: "alert-lg" },
19
- React.createElement(ModalConfig, Object.assign({}, columnManagement, { closeFn: modalActions.close, confirmFn: columnManagement.onConfirm })))));
19
+ React.createElement(ModalConfig, { ...columnManagement, closeFn: modalActions.close, confirmFn: columnManagement.onConfirm }))));
20
20
  };
21
21
  PageListConfigColumnManagement.displayName = 'PageListConfigColumnManagement';
@@ -36,15 +36,27 @@ export const PageListConfigDropdown = ({ children, label, color = 'primary', out
36
36
  var _a, _b;
37
37
  if (React.isValidElement(child)) {
38
38
  if ((_a = child.props) === null || _a === void 0 ? void 0 : _a.onClick) {
39
- return (Object.assign(Object.assign({}, child), { props: Object.assign(Object.assign({}, child.props), { onClick: () => {
39
+ return ({
40
+ ...child,
41
+ props: {
42
+ ...child.props,
43
+ onClick: () => {
40
44
  setToggle(false);
41
45
  child.props.onClick();
42
- } }) }));
46
+ }
47
+ }
48
+ });
43
49
  }
44
50
  if (((_b = child.type) === null || _b === void 0 ? void 0 : _b.displayName) === 'PageListConfigColumnManagement') {
45
- return (Object.assign(Object.assign({}, child), { props: Object.assign(Object.assign({}, child.props), { onClick: () => {
51
+ return ({
52
+ ...child,
53
+ props: {
54
+ ...child.props,
55
+ onClick: () => {
46
56
  setToggle(false);
47
- } }) }));
57
+ }
58
+ }
59
+ });
48
60
  }
49
61
  }
50
62
  return child;
@@ -8,7 +8,13 @@ import { ButtonFilters } from './filter-components/button-filters';
8
8
  import { Icon } from '../../atoms/icon';
9
9
  import { Button } from '../../atoms/button';
10
10
  const setValue = (element, value) => {
11
- return Object.assign(Object.assign({}, element), { props: Object.assign(Object.assign({}, element.props), { value: value }) });
11
+ return {
12
+ ...element,
13
+ props: {
14
+ ...element.props,
15
+ value: value
16
+ }
17
+ };
12
18
  };
13
19
  export const PageListGetFilters = (props) => {
14
20
  const { children, numFiltersVisible = 2, filterList, search, filter = {
@@ -34,9 +34,9 @@ export const PageList = (props) => {
34
34
  React.createElement(Col, { className: "ms-auto" },
35
35
  React.createElement("div", { className: "extra-buttons-container" },
36
36
  Boolean(extraButtonsInline.length) &&
37
- extraButtonsInline.map((item, index) => (React.createElement(Button, Object.assign({ outline: true, key: `export-button-${index}` }, item),
37
+ extraButtonsInline.map((item, index) => (React.createElement(Button, { outline: true, key: `export-button-${index}`, ...item },
38
38
  item.label,
39
- item.icon && React.createElement(Icon, Object.assign({}, item.icon))))),
39
+ item.icon && React.createElement(Icon, { ...item.icon })))),
40
40
  Boolean(addButton) && (React.createElement(Button, { tag: Link, href: addButton === null || addButton === void 0 ? void 0 : addButton.uri }, addButton === null || addButton === void 0 ? void 0 :
41
41
  addButton.label,
42
42
  React.createElement(Icon, { icon: "fa-plus", pluxee: true, className: "ms-1" }))),
@@ -11,9 +11,9 @@ export const PageShow = (props) => {
11
11
  React.createElement(Col, { className: "ms-auto" },
12
12
  React.createElement("div", { className: "extra-buttons-container" },
13
13
  Boolean(extraButtonsInline.length) &&
14
- extraButtonsInline.map((item, index) => (React.createElement(Button, Object.assign({ outline: true, key: `export-button-${index}` }, item),
14
+ extraButtonsInline.map((item, index) => (React.createElement(Button, { outline: true, key: `export-button-${index}`, ...item },
15
15
  item.label,
16
- item.icon && React.createElement(Icon, Object.assign({}, item.icon))))),
16
+ item.icon && React.createElement(Icon, { ...item.icon })))),
17
17
  Boolean((Array.isArray(extraButtons) ? extraButtons : extraButtons.items).length) && (React.createElement(Dropdown, { outline: true, color: "secondary", align: "right", label: Array.isArray(extraButtons) ? React.createElement(Icon, { icon: "faEllipsisH" }) : extraButtons.label, items: Array.isArray(extraButtons) ? extraButtons : extraButtons.items })),
18
18
  Boolean(backButton) && (React.createElement(Button, { tag: Link, href: backButton === null || backButton === void 0 ? void 0 : backButton.uri, color: "primary", outline: true },
19
19
  React.createElement(Icon, { icon: "faAngleLeft", className: "me-1" }), backButton === null || backButton === void 0 ? void 0 :
@@ -1,31 +1,20 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React, { useState } from 'react';
13
2
  import { Icon } from '../../atoms/icon';
14
3
  import { Link } from '../../index';
15
4
  const InnerItem = ({ icon, iconSize = 'md', pluxee, label, dataLink }) => {
16
5
  return (React.createElement(React.Fragment, null,
17
6
  icon && React.createElement(Icon, { title: label, icon: icon, pluxee: pluxee, size: iconSize }),
18
- React.createElement("span", { title: label, style: Object.assign({}, (iconSize === 'sm' && { fontSize: 12 })), className: "link-name", "data-link": `${dataLink ? 'link' : 'container'}` }, label)));
7
+ React.createElement("span", { title: label, style: { ...(iconSize === 'sm' && { fontSize: 12 }) }, className: "link-name", "data-link": `${dataLink ? 'link' : 'container'}` }, label)));
19
8
  };
20
9
  export const SideNavigationBarItem = (props) => {
21
10
  var _a;
22
11
  const [submenuOpen, setSubmenuOpen] = useState(false);
23
- const { className = '', items, index, pathname = '' } = props, attrs = __rest(props, ["className", "items", "index", "pathname"]);
12
+ const { className = '', items, index, pathname = '', ...attrs } = props;
24
13
  const sanitizedHref = ((attrs === null || attrs === void 0 ? void 0 : attrs.href) ? (_a = attrs === null || attrs === void 0 ? void 0 : attrs.href) === null || _a === void 0 ? void 0 : _a.split('?')[0] : '/').split('/')[1];
25
14
  const sanitizedPath = pathname === null || pathname === void 0 ? void 0 : pathname.split('/')[1];
26
15
  const isHomePage = ((attrs === null || attrs === void 0 ? void 0 : attrs.href) === '/' && pathname === '/');
27
16
  const isPathActive = sanitizedHref && (sanitizedPath === null || sanitizedPath === void 0 ? void 0 : sanitizedPath.includes(sanitizedHref));
28
- const activeClass = (isHomePage || isPathActive) ? ' active' : '';
17
+ const activeClass = (isHomePage || isPathActive) && !className.includes('subitem') ? ' active' : '';
29
18
  const itemclass = items && items.length > 0 ? ' submenu-li' : ' link-li';
30
19
  const submenuActive = items && items.some(item => {
31
20
  var _a, _b;
@@ -48,16 +37,16 @@ export const SideNavigationBarItem = (props) => {
48
37
  ? React.createElement("div", { className: "sub-menu-container" },
49
38
  React.createElement("div", { onClick: handleSubmenuClick, className: `sub-menu${submenuOpen ? ' open' : ''}` },
50
39
  React.createElement("div", null,
51
- React.createElement(InnerItem, Object.assign({}, props))),
40
+ React.createElement(InnerItem, { ...props })),
52
41
  React.createElement(Icon, { pluxee: true, icon: "fa-chevron-down" })),
53
42
  items && React.createElement(React.Fragment, null,
54
43
  React.createElement("ul", { className: "sub-menu-list" }, items.map((item, i) => {
55
- var _a, _b;
56
- const lastpath = (_a = pathname === null || pathname === void 0 ? void 0 : pathname.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1)[0];
57
- const linkpath = ((item === null || item === void 0 ? void 0 : item.href) ? (_b = item === null || item === void 0 ? void 0 : item.href) === null || _b === void 0 ? void 0 : _b.split('?')[0] : '/').split('/').slice(-1)[0];
58
- const itemclass = lastpath === linkpath ? 'active' : '';
59
- return (React.createElement(SideNavigationBarItem, Object.assign({ key: `side-navigation-bar-item-${index}-${i}`, iconSize: "sm", pathname: pathname, className: itemclass }, Object.assign(Object.assign({}, item), { index: i }), { icon: "fa-circle", pluxee: true })));
44
+ var _a;
45
+ const firstpath = pathname === null || pathname === void 0 ? void 0 : pathname.split('/')[1];
46
+ const linkpath = ((item === null || item === void 0 ? void 0 : item.href) ? (_a = item === null || item === void 0 ? void 0 : item.href) === null || _a === void 0 ? void 0 : _a.split('?')[0] : '/').split('/')[1];
47
+ const itemclass = firstpath === linkpath ? 'subitem active' : 'subitem';
48
+ return (React.createElement(SideNavigationBarItem, { key: `side-navigation-bar-item-${index}-${i}`, iconSize: "sm", pathname: pathname, className: itemclass, ...{ ...item, index: i }, icon: "fa-circle", pluxee: true }));
60
49
  }))))
61
- : React.createElement(Link, Object.assign({}, attrs),
62
- React.createElement(InnerItem, Object.assign({}, props, { dataLink: true })))));
50
+ : React.createElement(Link, { ...attrs },
51
+ React.createElement(InnerItem, { ...props, dataLink: true }))));
63
52
  };
@@ -49,14 +49,14 @@ export const SideNavigationBar = memo((props) => {
49
49
  React.createElement(Icon, { icon: "fa-double-chevron-right", pluxee: true }),
50
50
  " ",
51
51
  React.createElement("span", { className: "link-name" }, menuLabel))),
52
- items.map((item, index) => (React.createElement(SideNavigationBarItem, Object.assign({ pluxee: true, pathname: pathname, key: `side-navigation-bar-item-${index}` }, Object.assign(Object.assign({}, item), { index }))))),
53
- !!(logout === null || logout === void 0 ? void 0 : logout.href) && (React.createElement(SideNavigationBarItem, Object.assign({ pathname: pathname }, {
54
- className: 'link-logout',
55
- icon: 'fa-logout',
56
- pluxee: true,
57
- label: logout.label || 'Logout',
58
- href: logout.href
59
- }))))),
52
+ items.map((item, index) => (React.createElement(SideNavigationBarItem, { pluxee: true, pathname: pathname, key: `side-navigation-bar-item-${index}`, ...{ ...item, index } }))),
53
+ !!(logout === null || logout === void 0 ? void 0 : logout.href) && (React.createElement(SideNavigationBarItem, { pathname: pathname, ...{
54
+ className: 'link-logout',
55
+ icon: 'fa-logout',
56
+ pluxee: true,
57
+ label: logout.label || 'Logout',
58
+ href: logout.href
59
+ } })))),
60
60
  React.createElement("div", { className: "side-bar-mobile-overlay" }),
61
61
  React.createElement("button", { id: "btn-side-bar-mobile-toogle", type: "button", className: "btn btn-sidebar-mobile" },
62
62
  React.createElement(Icon, { icon: "fa-double-chevron-left", pluxee: true }),