linear-react-components-ui 1.0.10-beta.12 → 1.0.10-beta.13

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 (170) hide show
  1. package/lib/alerts/AlertContainer.d.ts +2 -0
  2. package/lib/alerts/AlertProvider.d.ts +2 -0
  3. package/lib/alerts/BaseAlert.d.ts +2 -0
  4. package/lib/alerts/Message.d.ts +2 -0
  5. package/lib/alerts/Message.js +1 -1
  6. package/lib/alerts/helpers.d.ts +2 -0
  7. package/lib/alerts/index.d.ts +2 -0
  8. package/lib/alerts/types.d.ts +3 -1
  9. package/lib/alerts/withAlert.d.ts +2 -0
  10. package/lib/assets/styles/dialog.scss +0 -2
  11. package/lib/assets/styles/drawers.scss +9 -0
  12. package/lib/assets/styles/radio.scss +52 -8
  13. package/lib/assets/styles/table.scss +30 -0
  14. package/lib/assets/styles/tooltip.scss +42 -2
  15. package/lib/buttons/ActivateButton.d.ts +2 -0
  16. package/lib/buttons/AddButton.d.ts +2 -0
  17. package/lib/buttons/Button.d.ts +2 -0
  18. package/lib/buttons/CancelButton.d.ts +2 -0
  19. package/lib/buttons/DangerButton.d.ts +2 -0
  20. package/lib/buttons/DefaultButton.d.ts +2 -0
  21. package/lib/buttons/DefaultButton.js +16 -4
  22. package/lib/buttons/DestroyButton.d.ts +2 -0
  23. package/lib/buttons/EditButton.d.ts +2 -0
  24. package/lib/buttons/InactivateButton.d.ts +2 -0
  25. package/lib/buttons/InfoButton.d.ts +2 -0
  26. package/lib/buttons/PrimaryButton.d.ts +2 -0
  27. package/lib/buttons/RestoreButton.d.ts +2 -0
  28. package/lib/buttons/SaveButton.d.ts +2 -0
  29. package/lib/buttons/SuccessButton.d.ts +2 -0
  30. package/lib/buttons/WarningButton.d.ts +2 -0
  31. package/lib/buttons/index.d.ts +2 -0
  32. package/lib/buttons/split_button/index.d.ts +2 -0
  33. package/lib/buttons/types.d.ts +6 -2
  34. package/lib/dialog/Alert.d.ts +2 -0
  35. package/lib/dialog/Custom.d.ts +2 -0
  36. package/lib/dialog/Custom.js +1 -1
  37. package/lib/dialog/Error.d.ts +2 -0
  38. package/lib/dialog/Information.d.ts +2 -0
  39. package/lib/dialog/Question.d.ts +2 -0
  40. package/lib/dialog/Warning.d.ts +2 -0
  41. package/lib/dialog/base/Content.d.ts +2 -0
  42. package/lib/dialog/base/Footer.d.ts +2 -0
  43. package/lib/dialog/base/Header.d.ts +2 -0
  44. package/lib/dialog/base/index.d.ts +2 -0
  45. package/lib/dialog/base/index.js +5 -2
  46. package/lib/dialog/form/index.d.ts +2 -0
  47. package/lib/dialog/index.d.ts +2 -0
  48. package/lib/dialog/types.d.ts +4 -2
  49. package/lib/drawer/Content.d.ts +2 -0
  50. package/lib/drawer/Drawer.d.ts +3 -1
  51. package/lib/drawer/Drawer.js +25 -2
  52. package/lib/drawer/Header.d.ts +2 -0
  53. package/lib/drawer/helpers.d.ts +2 -0
  54. package/lib/drawer/index.d.ts +2 -0
  55. package/lib/drawer/types.d.ts +4 -1
  56. package/lib/dropdown/Popup.js +7 -0
  57. package/lib/form/Field.js +3 -2
  58. package/lib/form/FieldNumber.d.ts +2 -2
  59. package/lib/form/index.d.ts +2 -1
  60. package/lib/form/index.js +10 -1
  61. package/lib/form/types.d.ts +2 -5
  62. package/lib/form/withFormSecurity.js +2 -1
  63. package/lib/icons/index.d.ts +2 -0
  64. package/lib/icons/types.d.ts +3 -1
  65. package/lib/index.d.ts +3 -1
  66. package/lib/inputs/base/InputTextBase.js +7 -1
  67. package/lib/inputs/inputHOC.d.ts +2 -0
  68. package/lib/inputs/mask/helpers.d.ts +2 -0
  69. package/lib/inputs/mask/imaskHOC.d.ts +2 -0
  70. package/lib/inputs/mask/imaskHOC.js +1 -1
  71. package/lib/inputs/multiSelect/ActionButtons.d.ts +1 -1
  72. package/lib/inputs/multiSelect/ActionButtons.js +4 -1
  73. package/lib/inputs/multiSelect/Dropdown.js +1 -1
  74. package/lib/inputs/multiSelect/helper.d.ts +8 -6
  75. package/lib/inputs/multiSelect/helper.js +7 -1
  76. package/lib/inputs/multiSelect/index.js +5 -2
  77. package/lib/inputs/multiSelect/types.d.ts +11 -3
  78. package/lib/inputs/number/BaseNumber.d.ts +2 -0
  79. package/lib/inputs/number/Currency.d.ts +2 -0
  80. package/lib/inputs/number/Decimal.d.ts +2 -0
  81. package/lib/inputs/number/index.d.ts +2 -0
  82. package/lib/inputs/number/types.d.ts +2 -0
  83. package/lib/inputs/period/index.js +8 -8
  84. package/lib/inputs/period/types.d.ts +2 -2
  85. package/lib/inputs/search/index.d.ts +2 -0
  86. package/lib/inputs/select/ActionButtons.d.ts +2 -0
  87. package/lib/inputs/select/Dropdown.d.ts +2 -0
  88. package/lib/inputs/select/Dropdown.js +1 -1
  89. package/lib/inputs/select/helper.d.ts +6 -9
  90. package/lib/inputs/select/helper.js +16 -2
  91. package/lib/inputs/select/index.js +7 -6
  92. package/lib/inputs/select/multiple/Selecteds.js +1 -1
  93. package/lib/inputs/select/multiple/index.js +13 -10
  94. package/lib/inputs/select/simple/index.js +35 -12
  95. package/lib/inputs/select/types.d.ts +21 -7
  96. package/lib/inputs/types.d.ts +4 -1
  97. package/lib/internals/types.d.ts +1 -0
  98. package/lib/internals/withTooltip.js +13 -6
  99. package/lib/labelMessages/index.d.ts +2 -0
  100. package/lib/labelMessages/index.js +3 -4
  101. package/lib/labelMessages/types.d.ts +3 -1
  102. package/lib/labels/DangerLabel.d.ts +2 -0
  103. package/lib/labels/DefaultLabel.d.ts +2 -0
  104. package/lib/labels/InfoLabel.d.ts +2 -0
  105. package/lib/labels/PrimaryLabel.d.ts +2 -0
  106. package/lib/labels/SuccessLabel.d.ts +2 -0
  107. package/lib/labels/WarningLabel.d.ts +2 -0
  108. package/lib/labels/index.d.ts +2 -0
  109. package/lib/labels/types.d.ts +3 -1
  110. package/lib/list/Header.d.ts +2 -0
  111. package/lib/list/Item.d.ts +2 -0
  112. package/lib/list/helpers.d.ts +2 -0
  113. package/lib/list/index.d.ts +2 -0
  114. package/lib/list/types.d.ts +4 -2
  115. package/lib/menus/float/MenuItem.d.ts +2 -0
  116. package/lib/menus/float/helpers.d.ts +2 -0
  117. package/lib/menus/float/index.d.ts +2 -0
  118. package/lib/menus/float/types.d.ts +3 -1
  119. package/lib/menus/index.d.ts +2 -0
  120. package/lib/menus/sidenav/ExpandMenu.d.ts +2 -0
  121. package/lib/menus/sidenav/MenuLink.d.ts +2 -0
  122. package/lib/menus/sidenav/NavMenuGroup.d.ts +2 -0
  123. package/lib/menus/sidenav/NavMenuItem.d.ts +2 -0
  124. package/lib/menus/sidenav/NavSubMenuItem.d.ts +2 -0
  125. package/lib/menus/sidenav/helpers.d.ts +2 -0
  126. package/lib/menus/sidenav/index.d.ts +2 -0
  127. package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +2 -0
  128. package/lib/menus/sidenav/popup_menu_search/index.d.ts +2 -0
  129. package/lib/menus/sidenav/types.d.ts +4 -2
  130. package/lib/panel/Content.d.ts +3 -1
  131. package/lib/panel/DangerPanel.d.ts +3 -1
  132. package/lib/panel/Default.d.ts +3 -1
  133. package/lib/panel/Header.d.ts +3 -1
  134. package/lib/panel/Header.js +3 -4
  135. package/lib/panel/InfoPanel.d.ts +3 -1
  136. package/lib/panel/PrimaryPanel.d.ts +3 -1
  137. package/lib/panel/SuccessPanel.d.ts +3 -1
  138. package/lib/panel/ToolBar.d.ts +3 -1
  139. package/lib/panel/WarningPanel.d.ts +3 -1
  140. package/lib/panel/helpers.d.ts +3 -1
  141. package/lib/panel/index.d.ts +3 -1
  142. package/lib/panel/types.d.ts +3 -1
  143. package/lib/popover/PopoverText.d.ts +2 -0
  144. package/lib/popover/PopoverTitle.d.ts +2 -0
  145. package/lib/popover/index.d.ts +2 -0
  146. package/lib/popover/index.js +1 -2
  147. package/lib/popover/types.d.ts +3 -1
  148. package/lib/radio/index.d.ts +2 -1
  149. package/lib/radio/index.js +3 -1
  150. package/lib/radio/types.d.ts +2 -0
  151. package/lib/table/Row.js +20 -3
  152. package/lib/table/types.d.ts +5 -0
  153. package/lib/tabs/DropdownItems.d.ts +2 -0
  154. package/lib/tabs/Menu.d.ts +2 -0
  155. package/lib/tabs/MenuItems.d.ts +2 -0
  156. package/lib/tabs/Panel.d.ts +2 -0
  157. package/lib/tabs/index.d.ts +2 -0
  158. package/lib/tabs/tabHelpers.d.ts +2 -0
  159. package/lib/tabs/types.d.ts +3 -1
  160. package/lib/toolbar/ButtonBar.d.ts +2 -0
  161. package/lib/toolbar/LabelBar.d.ts +2 -0
  162. package/lib/toolbar/ToolBarGroup.d.ts +2 -0
  163. package/lib/toolbar/helpers.d.ts +2 -0
  164. package/lib/toolbar/index.d.ts +2 -0
  165. package/lib/toolbar/types.d.ts +4 -2
  166. package/lib/tooltip/index.d.ts +1 -1
  167. package/lib/tooltip/index.js +5 -1
  168. package/lib/tooltip/types.d.ts +1 -0
  169. package/lib/{types-3c6f1c20.d.ts → types-c1d83632.d.ts} +2 -1
  170. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  import { ICommonDialogProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/Align.js';
4
+ import '../@types/Icon.js';
5
+ import '../icons/helper.js';
4
6
 
5
7
  declare const Warning: (props: ICommonDialogProps) => JSX.Element;
6
8
 
@@ -1,6 +1,8 @@
1
1
  import { IContentProps } from '../types.js';
2
2
  import 'react';
3
3
  import '../../@types/Align.js';
4
+ import '../../@types/Icon.js';
5
+ import '../../icons/helper.js';
4
6
 
5
7
  declare const Content: ({ children, styleForContent }: IContentProps) => JSX.Element;
6
8
 
@@ -1,6 +1,8 @@
1
1
  import { IFooterProps } from '../types.js';
2
2
  import 'react';
3
3
  import '../../@types/Align.js';
4
+ import '../../@types/Icon.js';
5
+ import '../../icons/helper.js';
4
6
 
5
7
  declare const Footer: (props: IFooterProps) => JSX.Element;
6
8
 
@@ -1,6 +1,8 @@
1
1
  import { IHeaderProps } from '../types.js';
2
2
  import 'react';
3
3
  import '../../@types/Align.js';
4
+ import '../../@types/Icon.js';
5
+ import '../../icons/helper.js';
4
6
 
5
7
  declare const Header: ({ showCloseButton, handlerClose, title, icon, titleIcon, }: IHeaderProps) => JSX.Element;
6
8
 
@@ -1,6 +1,8 @@
1
1
  import React__default from 'react';
2
2
  import { IBaseProps } from '../types.js';
3
3
  import '../../@types/Align.js';
4
+ import '../../@types/Icon.js';
5
+ import '../../icons/helper.js';
4
6
 
5
7
  declare const BaseDialog: (props: IBaseProps) => React__default.ReactPortal;
6
8
 
@@ -43,6 +43,7 @@ var BaseDialog = function BaseDialog(props) {
43
43
  overlayEl.current = document.createElement('div');
44
44
  overlayEl.current.className = 'modal-overlay';
45
45
  overlayEl.current.dataset.testid = 'modal-overlay';
46
+ overlayEl.current.style.zIndex = "".concat(99998 + document.body.getElementsByClassName('modal-overlay').length);
46
47
  body.appendChild(overlayEl.current);
47
48
  }
48
49
 
@@ -63,8 +64,9 @@ var BaseDialog = function BaseDialog(props) {
63
64
  };
64
65
 
65
66
  var setModalContainer = function setModalContainer() {
67
+ var zIndexDynamicModalContainers = "".concat(99999 + document.body.getElementsByClassName('modalcontainer').length);
66
68
  modalContainerEl.current.className = 'modalcontainer';
67
- if (zIndex) modalContainerEl.current.style.zIndex = zIndex;
69
+ modalContainerEl.current.style.zIndex = zIndex || zIndexDynamicModalContainers;
68
70
  body.appendChild(modalContainerEl.current);
69
71
  modalContainerEl.current.appendChild(dialogEl.current);
70
72
  };
@@ -75,7 +77,8 @@ var BaseDialog = function BaseDialog(props) {
75
77
  };
76
78
 
77
79
  var removeOverlay = function removeOverlay() {
78
- var modalOverlay = document.getElementsByClassName('modal-overlay')[0];
80
+ var countModalOverlays = document.body.getElementsByClassName('modal-overlay').length;
81
+ var modalOverlay = document.getElementsByClassName('modal-overlay')[countModalOverlays - 1];
79
82
  body.removeChild(modalOverlay);
80
83
  };
81
84
 
@@ -1,6 +1,8 @@
1
1
  import { IFormProps } from '../types.js';
2
2
  import 'react';
3
3
  import '../../@types/Align.js';
4
+ import '../../@types/Icon.js';
5
+ import '../../icons/helper.js';
4
6
 
5
7
  declare const _default: (props: IFormProps) => JSX.Element;
6
8
 
@@ -9,3 +9,5 @@ export { default as DialogCustom } from './Custom.js';
9
9
  import 'react';
10
10
  import './types.js';
11
11
  import '../@types/Align.js';
12
+ import '../@types/Icon.js';
13
+ import '../icons/helper.js';
@@ -1,5 +1,7 @@
1
1
  import { ReactNode, CSSProperties, ReactElement } from 'react';
2
2
  import { TextAlign } from '../@types/Align.js';
3
+ import { IconNames } from '../@types/Icon.js';
4
+ import '../icons/helper.js';
3
5
 
4
6
  interface IContentProps {
5
7
  children: ReactNode | ReactNode[];
@@ -13,7 +15,7 @@ interface IHeaderProps {
13
15
  showCloseButton?: boolean;
14
16
  title?: string;
15
17
  icon?: JSX.Element;
16
- titleIcon?: string;
18
+ titleIcon?: IconNames;
17
19
  }
18
20
  interface IBaseProps {
19
21
  wrapperClassName: string;
@@ -64,7 +66,7 @@ interface ICustomProps {
64
66
  text?: string;
65
67
  height?: string;
66
68
  width?: string;
67
- iconName?: string;
69
+ iconName?: IconNames | null;
68
70
  }
69
71
 
70
72
  export { IBaseProps, ICommonDialogProps, IContentProps, ICustomProps, IFooterProps, IFormProps, IHeaderProps, IQuestionProps };
@@ -2,6 +2,8 @@ import { IDrawerProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/PermissionAttr.js';
4
4
  import '../@types/Position.js';
5
+ import '../@types/Icon.js';
6
+ import '../icons/helper.js';
5
7
 
6
8
  declare const Content: ({ children, style }: IDrawerProps) => JSX.Element;
7
9
 
@@ -2,7 +2,9 @@ import React__default from 'react';
2
2
  import { IDrawerProps } from './types.js';
3
3
  import '../@types/PermissionAttr.js';
4
4
  import '../@types/Position.js';
5
+ import '../@types/Icon.js';
6
+ import '../icons/helper.js';
5
7
 
6
- declare const BaseDrawer: ({ position, customClass, children, style, customClassForContent, targetId, closeOnEsc, overlay, permissionAttr, skeletonize, handlerClose, customClassForDrawer, content, title, ...rest }: IDrawerProps) => React__default.ReactPortal;
8
+ declare const BaseDrawer: ({ position, customClass, children, style, customClassForContent, targetId, closeOnEsc, overlay, permissionAttr, skeletonize, handlerClose, customClassForDrawer, content, title, isWaiting, ...rest }: IDrawerProps) => React__default.ReactPortal;
7
9
 
8
10
  export { BaseDrawer as default };
@@ -17,7 +17,9 @@ var _permissionValidations = require("../permissionValidations");
17
17
 
18
18
  var _ = require(".");
19
19
 
20
- var _excluded = ["position", "customClass", "children", "style", "customClassForContent", "targetId", "closeOnEsc", "overlay", "permissionAttr", "skeletonize", "handlerClose", "customClassForDrawer", "content", "title"];
20
+ var _spinner = _interopRequireDefault(require("../spinner"));
21
+
22
+ var _excluded = ["position", "customClass", "children", "style", "customClassForContent", "targetId", "closeOnEsc", "overlay", "permissionAttr", "skeletonize", "handlerClose", "customClassForDrawer", "content", "title", "isWaiting"];
21
23
 
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
@@ -62,6 +64,8 @@ var BaseDrawer = function BaseDrawer(_ref) {
62
64
  customClassForDrawer = _ref$customClassForDr === void 0 ? '' : _ref$customClassForDr,
63
65
  content = _ref.content,
64
66
  title = _ref.title,
67
+ _ref$isWaiting = _ref.isWaiting,
68
+ isWaiting = _ref$isWaiting === void 0 ? false : _ref$isWaiting,
65
69
  rest = _objectWithoutProperties(_ref, _excluded);
66
70
 
67
71
  var headerProps = _extends({}, rest, {
@@ -77,6 +81,24 @@ var BaseDrawer = function BaseDrawer(_ref) {
77
81
  _useState2 = _slicedToArray(_useState, 1),
78
82
  onDenied = _useState2[0];
79
83
 
84
+ var overlayStyle = isWaiting ? {
85
+ opacity: 0.4,
86
+ pointerEvent: 'none',
87
+ placeContent: 'center'
88
+ } : {};
89
+
90
+ var getSpinner = function getSpinner() {
91
+ if (!isWaiting) return null;
92
+ return /*#__PURE__*/_react.default.createElement("div", {
93
+ className: "waitingspinner"
94
+ }, /*#__PURE__*/_react.default.createElement(_spinner.default, {
95
+ style: {
96
+ width: 60
97
+ },
98
+ delayTime: 0
99
+ }));
100
+ };
101
+
80
102
  var setDrawerComponent = function setDrawerComponent(body, randonId) {
81
103
  var componentEl = document.createElement('div');
82
104
  componentEl.className = 'drawer-component';
@@ -149,11 +171,12 @@ var BaseDrawer = function BaseDrawer(_ref) {
149
171
  className: "".concat(position, " ").concat(customClass),
150
172
  style: style
151
173
  }, /*#__PURE__*/_react.default.createElement("div", {
174
+ style: overlayStyle,
152
175
  "data-testid": "drawercontent",
153
176
  className: "drawercontent ".concat(skeletonize ? '-skeletonized' : '', " ").concat(customClassForContent)
154
177
  }, title && /*#__PURE__*/_react.default.createElement(_.DrawerHeader, _extends({}, headerProps, {
155
178
  customClass: customClassForDrawer
156
- })), content ? /*#__PURE__*/_react.default.createElement(_.DrawerContent, null, content) : children)));
179
+ })), content ? /*#__PURE__*/_react.default.createElement(_.DrawerContent, null, content) : children, getSpinner())));
157
180
  };
158
181
 
159
182
  return /*#__PURE__*/_reactDom.default.createPortal(drawerContent(), drawerContainerEl.current);
@@ -2,6 +2,8 @@ import { IDrawerHeaderProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/PermissionAttr.js';
4
4
  import '../@types/Position.js';
5
+ import '../@types/Icon.js';
6
+ import '../icons/helper.js';
5
7
 
6
8
  declare const Header: ({ showCloseButton, title, subTitle, icon, titleIcon, customClass, titleContent, subTitleContent, titleRightContent, }: IDrawerHeaderProps) => JSX.Element;
7
9
 
@@ -2,6 +2,8 @@ import React__default from 'react';
2
2
  import { IDrawerContext } from './types.js';
3
3
  import '../@types/PermissionAttr.js';
4
4
  import '../@types/Position.js';
5
+ import '../@types/Icon.js';
6
+ import '../icons/helper.js';
5
7
 
6
8
  declare const DrawerContext: React__default.Context<IDrawerContext>;
7
9
 
@@ -4,6 +4,8 @@ export { default as DrawerContent } from './Content.js';
4
4
  import 'react';
5
5
  import '../@types/PermissionAttr.js';
6
6
  import '../@types/Position.js';
7
+ import '../@types/Icon.js';
8
+ import '../icons/helper.js';
7
9
 
8
10
  declare const _default: (props: IDrawerProps) => JSX.Element;
9
11
 
@@ -1,6 +1,8 @@
1
1
  import React__default, { ReactNode, ReactElement } from 'react';
2
2
  import { PermissionAttr } from '../@types/PermissionAttr.js';
3
3
  import { Position } from '../@types/Position.js';
4
+ import { IconNames } from '../@types/Icon.js';
5
+ import '../icons/helper.js';
4
6
 
5
7
  interface IDrawerProps extends React__default.HTMLAttributes<HTMLDivElement> {
6
8
  overlay?: boolean;
@@ -17,6 +19,7 @@ interface IDrawerProps extends React__default.HTMLAttributes<HTMLDivElement> {
17
19
  closeOnOutsideClick?: boolean;
18
20
  content?: string;
19
21
  title?: string;
22
+ isWaiting?: boolean;
20
23
  }
21
24
  interface IDrawerHeaderProps extends React__default.HTMLAttributes<HTMLDivElement> {
22
25
  showCloseButton?: boolean;
@@ -27,7 +30,7 @@ interface IDrawerHeaderProps extends React__default.HTMLAttributes<HTMLDivElemen
27
30
  subTitle?: string;
28
31
  subTitleContent?: ReactElement;
29
32
  icon?: ReactElement;
30
- titleIcon?: string;
33
+ titleIcon?: IconNames;
31
34
  }
32
35
  interface IDrawerContext {
33
36
  handlerClose?: () => void;
@@ -65,6 +65,13 @@ var DropdownPopup = function DropdownPopup(_ref2) {
65
65
  isFloatMenu: isFloatMenu,
66
66
  minWidth: minWidth
67
67
  });
68
+
69
+ if (popup && popup.current) {
70
+ var modalContainers = document.body.getElementsByClassName('modalcontainer');
71
+ var lastModalContainer = modalContainers[modalContainers.length - 1];
72
+ popup.current.style.zIndex = "".concat(modalContainers.length ? lastModalContainer.style.zIndex : 99999);
73
+ }
74
+
68
75
  (0, _react.useEffect)(function () {
69
76
  body.appendChild(popup.current);
70
77
  return function () {
package/lib/form/Field.js CHANGED
@@ -36,8 +36,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
36
36
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
37
 
38
38
  var getEvents = function getEvents(_ref) {
39
- var name = _ref.name,
40
- validators = _ref.validators,
39
+ var _ref$validators = _ref.validators,
40
+ validators = _ref$validators === void 0 ? [] : _ref$validators,
41
+ name = _ref.name,
41
42
  _onBlur = _ref.onBlur,
42
43
  handlerFieldValidade = _ref.handlerFieldValidade,
43
44
  validatorFromComponent = _ref.validatorFromComponent,
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import { IFieldNumberProps } from './types.js';
2
+ import { IFieldProps } from './types.js';
3
3
  import '../inputs/select/types.js';
4
4
  import '../@types/Align.js';
5
5
  import '../@types/DataCombo.js';
@@ -7,6 +7,6 @@ import '../@types/PermissionAttr.js';
7
7
  import '../inputs/base/types.js';
8
8
  import '../@types/Period.js';
9
9
 
10
- declare const _default: React__default.ForwardRefExoticComponent<IFieldNumberProps & React__default.RefAttributes<HTMLElement>>;
10
+ declare const _default: React__default.ForwardRefExoticComponent<IFieldProps & React__default.RefAttributes<HTMLElement>>;
11
11
 
12
12
  export { _default as default };
@@ -1,6 +1,7 @@
1
1
  export { default as Field } from './Field.js';
2
2
  export { default as FieldNumber } from './FieldNumber.js';
3
3
  export { default as FieldArray } from './FieldArray.js';
4
+ export { default as FieldPeriod } from './FieldPeriod.js';
4
5
  import { IFormProps } from './types.js';
5
6
  import 'react';
6
7
  import '../inputs/select/types.js';
@@ -10,6 +11,6 @@ import '../@types/PermissionAttr.js';
10
11
  import '../inputs/base/types.js';
11
12
  import '../@types/Period.js';
12
13
 
13
- declare const Form: ({ submitOnPressEnterKey, dataSource, securityBeforeUnload, handlerReset, handlerSubmit, handlerValidates, style, customClass, securityTitle, securityText, onDataChange, onValidateForm, externalFieldErrors, onSubmit, skeletonize, disabled, children, }: IFormProps) => JSX.Element;
14
+ declare const Form: ({ submitOnPressEnterKey, dataSource, securityBeforeUnload, handlerReset, handlerSubmit, handlerValidates, style, customClass, securityTitle, securityText, securityData, onDataChange, onValidateForm, externalFieldErrors, onSubmit, skeletonize, disabled, children, }: IFormProps) => JSX.Element;
14
15
 
15
16
  export { Form as default };
package/lib/form/index.js CHANGED
@@ -23,6 +23,12 @@ Object.defineProperty(exports, "FieldNumber", {
23
23
  return _FieldNumber.default;
24
24
  }
25
25
  });
26
+ Object.defineProperty(exports, "FieldPeriod", {
27
+ enumerable: true,
28
+ get: function get() {
29
+ return _FieldPeriod.default;
30
+ }
31
+ });
26
32
  exports.default = void 0;
27
33
 
28
34
  var _react = _interopRequireWildcard(require("react"));
@@ -37,6 +43,8 @@ var _FieldNumber = _interopRequireDefault(require("./FieldNumber"));
37
43
 
38
44
  var _FieldArray = _interopRequireDefault(require("./FieldArray"));
39
45
 
46
+ var _FieldPeriod = _interopRequireDefault(require("./FieldPeriod"));
47
+
40
48
  require("../assets/styles/form.scss");
41
49
 
42
50
  var _dialog = require("../dialog");
@@ -85,6 +93,7 @@ var Form = function Form(_ref) {
85
93
  customClass = _ref.customClass,
86
94
  securityTitle = _ref.securityTitle,
87
95
  securityText = _ref.securityText,
96
+ securityData = _ref.securityData,
88
97
  onDataChange = _ref.onDataChange,
89
98
  onValidateForm = _ref.onValidateForm,
90
99
  externalFieldErrors = _ref.externalFieldErrors,
@@ -224,7 +233,7 @@ var Form = function Form(_ref) {
224
233
  if (!_lodash.default.isEmpty(context)) {
225
234
  var onChangedData = context.onChangedData;
226
235
 
227
- if (!_lodash.default.isEqual(data, originalData)) {
236
+ if (securityData && !_lodash.default.isEqual(data, securityData)) {
228
237
  onChangedData(true);
229
238
  } else {
230
239
  onChangedData(false);
@@ -32,6 +32,7 @@ interface IFormProps {
32
32
  securityBeforeUnload?: boolean;
33
33
  securityTitle?: string;
34
34
  securityText?: string;
35
+ securityData?: object;
35
36
  externalFieldErrors?: object;
36
37
  skeletonize?: boolean;
37
38
  disabled?: boolean;
@@ -67,10 +68,6 @@ interface IFieldProps extends WithFieldProps {
67
68
  allOptions?: AllOptions;
68
69
  searchNotFoundText?: string;
69
70
  }
70
- interface IFieldNumberProps extends IFieldProps {
71
- min?: number;
72
- max?: number;
73
- }
74
71
  interface CustomEvent {
75
72
  target: {
76
73
  value: string[];
@@ -183,4 +180,4 @@ interface IGetErrorMessagesParams {
183
180
  externalMessagesErrors?: string[];
184
181
  }
185
182
 
186
- export { CustomEvent, CustomKeyboardEvent, FormContextProps, IEventParams, IFieldArrayProps, IFieldNumberProps, IFieldPeriodProps, IFieldProps, IFormProps, IFormSecurityContext, IGetErrorMessagesParams, IWithFieldContext, IWithFormSecurity, OnFielChangeEvent, PeriodChangeEvent, PeriodValidator, Validator, WithFieldProps };
183
+ export { CustomEvent, CustomKeyboardEvent, FormContextProps, IEventParams, IFieldArrayProps, IFieldPeriodProps, IFieldProps, IFormProps, IFormSecurityContext, IGetErrorMessagesParams, IWithFieldContext, IWithFormSecurity, OnFielChangeEvent, PeriodChangeEvent, PeriodValidator, Validator, WithFieldProps };
@@ -69,7 +69,8 @@ var withFormSecurity = function withFormSecurity(WrappedComponent) {
69
69
  showQuestion: showQuestion,
70
70
  onConfirmClick: onConfirmClick,
71
71
  onUnconfirmClick: onUnconfirmClick,
72
- setSecurityBeforeUnload: setSecurityBeforeUnload
72
+ setSecurityBeforeUnload: setSecurityBeforeUnload,
73
+ securityBeforeUnload: securityBeforeUnload.current
73
74
  };
74
75
  return /*#__PURE__*/_react.default.createElement(FormSecurityContext.Provider, {
75
76
  value: contextValues
@@ -2,6 +2,8 @@ import { IIconProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/PointerEvents.js';
4
4
  import '../@types/SizePixels.js';
5
+ import '../@types/Icon.js';
6
+ import './helper.js';
5
7
 
6
8
  declare const Icon: ({ name, onClick, svgStruct, size, style, visible, disabled, customClass, color, pointerEvents, }: IIconProps) => JSX.Element | null;
7
9
 
@@ -1,6 +1,8 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { PointerEvents } from '../@types/PointerEvents.js';
3
3
  import { SizePixels } from '../@types/SizePixels.js';
4
+ import { IconNames } from '../@types/Icon.js';
5
+ import './helper.js';
4
6
 
5
7
  declare type ListIconType = {
6
8
  [name: string]: {
@@ -16,7 +18,7 @@ interface IIconProps {
16
18
  visible?: boolean;
17
19
  disabled?: boolean;
18
20
  pointerEvents?: PointerEvents;
19
- name?: string;
21
+ name?: IconNames;
20
22
  viewBox?: string;
21
23
  svgStruct?: {
22
24
  viewbox: string;
package/lib/index.d.ts CHANGED
@@ -7,10 +7,12 @@ export { default as List } from './list/index.js';
7
7
  export { default as Radio } from './radio/index.js';
8
8
  export { default as Tab } from './tabs/index.js';
9
9
  export { default as Dialog } from './dialog/base/index.js';
10
- import './types-3c6f1c20.js';
10
+ import './types-c1d83632.js';
11
11
  import 'react';
12
12
  import './@types/PermissionAttr.js';
13
13
  import './internals/colorStyles.js';
14
+ import './@types/Icon.js';
15
+ import './icons/helper.js';
14
16
  import './toolbar/ToolBarGroup.js';
15
17
  import './toolbar/types.js';
16
18
  import './@types/ButtonTypes.js';
@@ -90,6 +90,10 @@ var InputTextBase = function InputTextBase(props) {
90
90
  if (handlerSetOnDenied) handlerSetOnDenied(onDenied);
91
91
  }, []);
92
92
 
93
+ var applyTabIndex = function applyTabIndex() {
94
+ return readOnly ? -1 : 0;
95
+ };
96
+
93
97
  var shouldDisable = function shouldDisable() {
94
98
  return disabled || onDenied.disabled;
95
99
  };
@@ -199,7 +203,9 @@ var InputTextBase = function InputTextBase(props) {
199
203
  }, type === 'textarea' ? /*#__PURE__*/_react.default.createElement("textarea", _extends({
200
204
  rows: props.rows,
201
205
  cols: props.cols
202
- }, inputProps())) : /*#__PURE__*/_react.default.createElement("input", inputProps()), children), helpers.getRightElements(errorMessages || [], skeletonize, rightElements)), /*#__PURE__*/_react.default.createElement(_hint.default, {
206
+ }, inputProps())) : /*#__PURE__*/_react.default.createElement("input", _extends({
207
+ tabIndex: applyTabIndex()
208
+ }, inputProps())), children), helpers.getRightElements(errorMessages || [], skeletonize, rightElements)), /*#__PURE__*/_react.default.createElement(_hint.default, {
203
209
  visible: !!hint,
204
210
  customClass: "hint",
205
211
  description: hint
@@ -7,6 +7,8 @@ import '../@types/Align.js';
7
7
  import '../@types/Period.js';
8
8
  import '../drawer/types.js';
9
9
  import '../@types/Position.js';
10
+ import '../@types/Icon.js';
11
+ import '../icons/helper.js';
10
12
 
11
13
  declare const InputHOC: <ComponentProps extends IInputHOCProps>(WrappedComponent: React__default.ComponentType<ComponentProps>) => (props: ComponentProps) => JSX.Element;
12
14
 
@@ -8,6 +8,8 @@ import '../../@types/Align.js';
8
8
  import '../../@types/Period.js';
9
9
  import '../../drawer/types.js';
10
10
  import '../../@types/Position.js';
11
+ import '../../@types/Icon.js';
12
+ import '../../icons/helper.js';
11
13
 
12
14
  declare function extractNonMaskProps(props: IMaskHOCProps, maskProps: AnyMaskedOptions): any;
13
15
  declare function CPFValidation(cpf?: string, returnMessage?: (msg: string) => void): void | "CPF inválido";
@@ -7,6 +7,8 @@ import '../../@types/Align.js';
7
7
  import '../../@types/Period.js';
8
8
  import '../../drawer/types.js';
9
9
  import '../../@types/Position.js';
10
+ import '../../@types/Icon.js';
11
+ import '../../icons/helper.js';
10
12
 
11
13
  declare const IMaskHOC: <ComponentProps extends IMaskHOCProps>(ComposedComponent: React__default.ComponentType<ComponentProps>) => {
12
14
  (props: ComponentProps): JSX.Element;
@@ -207,7 +207,7 @@ var IMaskHOC = function IMaskHOC(ComposedComponent) {
207
207
  onDeniedActions: onDenied,
208
208
  defaultValue: value,
209
209
  onChange: function onChange(e) {
210
- setValue(e.target.value);
210
+ return setValue(e.target.value);
211
211
  },
212
212
  inputRef: function inputRef(el) {
213
213
  elementRef.current = el; // Propagate the input ref for who call it
@@ -6,6 +6,6 @@ import '../../@types/Align.js';
6
6
  import '../../@types/Period.js';
7
7
  import '../../@types/PermissionAttr.js';
8
8
 
9
- declare const ActionButtons: ({ disabled, dropdownOpened, handleOpenClose, handleCheckAll, handleUncheckAll, }: IActionButtonsProps) => JSX.Element;
9
+ declare const ActionButtons: ({ disabled, dropdownOpened, handleOpenClose, handleCheckAll, handleUncheckAll, dropdownAlignButton, }: IActionButtonsProps) => JSX.Element;
10
10
 
11
11
  export { ActionButtons as default };
@@ -24,7 +24,9 @@ var ActionButtons = function ActionButtons(_ref) {
24
24
  dropdownOpened = _ref.dropdownOpened,
25
25
  handleOpenClose = _ref.handleOpenClose,
26
26
  handleCheckAll = _ref.handleCheckAll,
27
- handleUncheckAll = _ref.handleUncheckAll;
27
+ handleUncheckAll = _ref.handleUncheckAll,
28
+ _ref$dropdownAlignBut = _ref.dropdownAlignButton,
29
+ dropdownAlignButton = _ref$dropdownAlignBut === void 0 ? 'left' : _ref$dropdownAlignBut;
28
30
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_buttons.default, {
29
31
  disabled: disabled,
30
32
  size: "small",
@@ -40,6 +42,7 @@ var ActionButtons = function ActionButtons(_ref) {
40
42
  boxShadow: false,
41
43
  customClass: "actionbutton",
42
44
  dropdown: true,
45
+ dropdownAlign: dropdownAlignButton,
43
46
  showIconDropdown: false
44
47
  }, /*#__PURE__*/_react.default.createElement(_list.default, null, /*#__PURE__*/_react.default.createElement(_list.ListItem, {
45
48
  itemId: "1",
@@ -165,7 +165,7 @@ var Dropdown = function Dropdown(props) {
165
165
  }
166
166
  }), /*#__PURE__*/_react.default.createElement("span", {
167
167
  className: "label"
168
- }, item[descriptionKey])));
168
+ }, typeof descriptionKey === 'string' ? item[descriptionKey] : descriptionKey(item))));
169
169
  })));
170
170
  };
171
171
 
@@ -1,9 +1,11 @@
1
- import { DataCombo } from '../../@types/DataCombo.js';
1
+ import { GetFilteredParams } from './types.js';
2
+ import 'react';
3
+ import '../../@types/DataCombo.js';
4
+ import '../base/types.js';
5
+ import '../../@types/Align.js';
6
+ import '../../@types/Period.js';
7
+ import '../../@types/PermissionAttr.js';
2
8
 
3
- declare const getFilteredDataCombo: ({ dataSource, descriptionKey, inputText, }: {
4
- dataSource: DataCombo[];
5
- descriptionKey: string;
6
- inputText: string;
7
- }) => any[];
9
+ declare const getFilteredDataCombo: ({ dataSource, descriptionKey, inputText, }: GetFilteredParams) => any[];
8
10
 
9
11
  export { getFilteredDataCombo as default };
@@ -10,7 +10,13 @@ var getFilteredDataCombo = function getFilteredDataCombo(_ref) {
10
10
  descriptionKey = _ref.descriptionKey,
11
11
  inputText = _ref.inputText;
12
12
  return dataSource.filter(function (item) {
13
- return item[descriptionKey].toLowerCase().indexOf(inputText.toLowerCase()) > -1;
13
+ var _descriptionKey;
14
+
15
+ if (typeof descriptionKey === 'string') {
16
+ return item[descriptionKey].toLowerCase().indexOf(inputText.toLowerCase()) > -1;
17
+ }
18
+
19
+ return ((_descriptionKey = descriptionKey(item)) === null || _descriptionKey === void 0 ? void 0 : _descriptionKey.toLowerCase().indexOf(inputText.toLowerCase())) > -1;
14
20
  });
15
21
  };
16
22
 
@@ -60,7 +60,9 @@ var MultiSelectField = function MultiSelectField(props) {
60
60
  descriptionKey = props.descriptionKey,
61
61
  value = props.value,
62
62
  onBlur = props.onBlur,
63
- gridLayout = props.gridLayout;
63
+ gridLayout = props.gridLayout,
64
+ _props$dropdownAlignB = props.dropdownAlignButton,
65
+ dropdownAlignButton = _props$dropdownAlignB === void 0 ? 'left' : _props$dropdownAlignB;
64
66
  var componentId = "multiSelect-component".concat(_uuid.default.v1());
65
67
 
66
68
  var _useState = (0, _react.useState)(dataSource),
@@ -233,7 +235,7 @@ var MultiSelectField = function MultiSelectField(props) {
233
235
  } else if (selecteds && selecteds.length > 1) {
234
236
  newLabel = 'Múltiplos';
235
237
  } else if (selecteds && selecteds.length === 1) {
236
- newLabel = selecteds[0][descriptionKey];
238
+ newLabel = typeof descriptionKey === 'string' ? selecteds[0][descriptionKey] : descriptionKey(selecteds[0]);
237
239
  } else {
238
240
  newLabel = 'Nenhum selecionado';
239
241
  }
@@ -297,6 +299,7 @@ var MultiSelectField = function MultiSelectField(props) {
297
299
  },
298
300
  handlerSetOnDenied: setOnDeniedValue,
299
301
  rightElements: /*#__PURE__*/_react.default.createElement(_ActionButtons.default, {
302
+ dropdownAlignButton: dropdownAlignButton,
300
303
  disabled: shouldDisabled(),
301
304
  dropdownOpened: opened,
302
305
  handleOpenClose: function handleOpenClose() {