linear-react-components-ui 1.1.0 → 1.1.2-beta.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.
package/.gitlab-ci.yml CHANGED
@@ -2,18 +2,25 @@ stages:
2
2
  - lint
3
3
  - tests-units
4
4
 
5
+ cache:
6
+ key:
7
+ files:
8
+ - package-lock.json
9
+ paths:
10
+ - .npm
11
+
5
12
  lint:
6
13
  stage: lint
7
14
  image: node:20.11.0
8
15
  before_script:
9
- - npm install
16
+ - npm ci --legacy-peer-deps --cache .npm --prefer-offline
10
17
  script:
11
- - npm run check:js
18
+ - npm run check:js
12
19
 
13
20
  units:
14
21
  stage: tests-units
15
22
  image: node:20.11.0
16
23
  before_script:
17
- - npm install
24
+ - npm ci --legacy-peer-deps --cache .npm --prefer-offline
18
25
  script:
19
26
  - npm run test
@@ -80,6 +80,14 @@
80
80
  padding-left: 22px;
81
81
  }
82
82
 
83
+ > .errormessages {
84
+ width: 100%;
85
+ color: red;
86
+ font-size: 13px!important;
87
+ line-height: 13px;
88
+ margin-top: 0px;
89
+ }
90
+
83
91
  &.-skeletonized {
84
92
  > .inputcontent {
85
93
  .input {
@@ -75,6 +75,8 @@ $dropdown-width: 38px;
75
75
  text-overflow: ellipsis;
76
76
  background: transparent;
77
77
  border: 0;
78
+ width: 100%;
79
+ text-align: left
78
80
  }
79
81
 
80
82
  .menu>.menuitem>.closepanel {
@@ -121,6 +123,9 @@ $dropdown-width: 38px;
121
123
  float: none;
122
124
  }
123
125
  }
126
+ .toolbar-component {
127
+ width: auto;
128
+ }
124
129
  }
125
130
 
126
131
  >.panel {
@@ -8,6 +8,6 @@ import '../@types/Position.js';
8
8
  * o componente Field dentro do componente Form, pois o mesmo leva em consideração o tipo do
9
9
  * componente para gerar propriedades customizadas.
10
10
  */
11
- declare const CheckBox: ({ name, required, value, label, onChange, autofocus, hint, id, gridLayout, checked, disabled, permissionAttr, tooltip, tooltipPosition, tooltipWidth, skeletonize, targetRef, }: ICheckBoxProps) => JSX.Element | null;
11
+ declare const CheckBox: ({ name, required, value, label, onChange, autofocus, hint, id, gridLayout, checked, disabled, permissionAttr, tooltip, tooltipPosition, tooltipWidth, skeletonize, targetRef, errorMessages, }: ICheckBoxProps) => JSX.Element | null;
12
12
 
13
13
  export { CheckBox as default };
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
- var _gridlayout = _interopRequireDefault(require("../gridlayout"));
9
8
  var _Label = _interopRequireDefault(require("./Label"));
10
- require("../assets/styles/checkbox.scss");
11
- var _permissionValidations = require("../permissionValidations");
12
9
  var _hint = _interopRequireDefault(require("../hint"));
10
+ var _gridlayout = _interopRequireDefault(require("../gridlayout"));
11
+ var helpers = _interopRequireWildcard(require("../inputs/base/helpers"));
12
+ var _permissionValidations = require("../permissionValidations");
13
+ require("../assets/styles/checkbox.scss");
13
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -38,7 +39,8 @@ const CheckBox = _ref => {
38
39
  tooltipPosition = 'top',
39
40
  tooltipWidth = 'auto',
40
41
  skeletonize,
41
- targetRef
42
+ targetRef,
43
+ errorMessages
42
44
  } = _ref;
43
45
  const [isChecked, setIsChecked] = (0, _react.useState)(checked);
44
46
  const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
@@ -101,7 +103,7 @@ const CheckBox = _ref => {
101
103
  visible: !!hint,
102
104
  description: hint,
103
105
  customClass: "hint"
104
- }));
106
+ }), errorMessages && helpers.getErrorMessages(errorMessages));
105
107
  if (onDenied.unvisible) return null;
106
108
  return gridLayout ? /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
107
109
  customClass: "-withinput",
@@ -37,6 +37,7 @@ interface ICheckBoxProps {
37
37
  skeletonize?: boolean;
38
38
  targetRef?: (ref: HTMLInputElement | null) => void;
39
39
  targetSpanRef?: (ref: HTMLSpanElement | null) => void;
40
+ errorMessages?: string[] | undefined;
40
41
  }
41
42
 
42
43
  export type { ChangeEvent, ICheckBoxProps };
@@ -138,6 +138,7 @@ const SimpleSelect = props => {
138
138
  clearSelected();
139
139
  }
140
140
  }
141
+ setDataCombo(dataSourceWithAllOptions);
141
142
  }
142
143
  if (!insideComponent) {
143
144
  setOpened(false);
@@ -1,6 +1,6 @@
1
1
  import { ITableHeaderProps } from './types.js';
2
2
  import 'react';
3
3
 
4
- declare const HeaderColumn: ({ customClass, style, children, textAlign, visible, id, }: ITableHeaderProps) => JSX.Element | null;
4
+ declare const HeaderColumn: ({ customClass, style, children, textAlign, visible, id, rowSpan, colSpan, }: ITableHeaderProps) => JSX.Element | null;
5
5
 
6
6
  export { HeaderColumn as default };
@@ -17,7 +17,9 @@ const HeaderColumn = _ref => {
17
17
  children,
18
18
  textAlign,
19
19
  visible = true,
20
- id
20
+ id,
21
+ rowSpan,
22
+ colSpan
21
23
  } = _ref;
22
24
  const {
23
25
  skeletonize,
@@ -28,6 +30,8 @@ const HeaderColumn = _ref => {
28
30
  if (!visible) return null;
29
31
  return /*#__PURE__*/_react.default.createElement("th", {
30
32
  id: id,
33
+ rowSpan: rowSpan,
34
+ colSpan: colSpan,
31
35
  className: "headercolumn ".concat(customClass, " text-align-").concat(textAlign),
32
36
  style: style
33
37
  }, skeletonize && (skeletonInHeader || !skeletonInRows) && !vertical ? /*#__PURE__*/_react.default.createElement(_skeleton.default, {
@@ -25,6 +25,8 @@ interface ITableHeaderProps extends TableHTMLAttributes<HTMLTableElement> {
25
25
  textAlign?: string;
26
26
  visible?: boolean;
27
27
  id?: string;
28
+ rowSpan?: number;
29
+ colSpan?: number;
28
30
  }
29
31
  interface ITableBodyProps extends TableHTMLAttributes<HTMLTableElement> {
30
32
  children?: ReactNode;
@@ -67,7 +67,7 @@ function TabsProvider(_ref) {
67
67
  updateTabs(tabId);
68
68
  setSelectedTabId(tabId);
69
69
  if (onTabChange) {
70
- onTabChange(String(tabId));
70
+ onTabChange(tabId);
71
71
  }
72
72
  }, [onTabChange, setSelectedTabId, updateTabs]);
73
73
  const removeTab = (0, _react.useCallback)(tabId => {
@@ -23,7 +23,7 @@ interface TabsProviderProps {
23
23
  container: RefObject<HTMLDivElement>;
24
24
  tabsWidth: number | string;
25
25
  selectedTab?: string | number | null;
26
- onTabChange?: (tabId: string) => void;
26
+ onTabChange?: (tabId: string | number) => void;
27
27
  onTabClose?: (tabId: string) => void;
28
28
  firstTabIdent?: boolean;
29
29
  }
@@ -32,12 +32,12 @@ interface ITabsPros {
32
32
  toolbar?: ReactElement;
33
33
  toolBarRef?: (value: HTMLDivElement | null) => void;
34
34
  children?: ReactNode;
35
- selectedTab?: string;
35
+ selectedTab?: string | number;
36
36
  tabMenuSize?: Size;
37
37
  tabMenuAlign?: Position;
38
38
  firstTabIdent?: boolean;
39
39
  tabMenuPosition?: Exclude<Position, 'center'>;
40
- handlerTabClick?: (id?: string) => void;
40
+ handlerTabClick?: (id?: string | number) => void;
41
41
  handlerCloseTab?: (id?: string, idx?: string) => void;
42
42
  customClassForToolBar?: string;
43
43
  tabsWidth?: string | number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.1.0",
3
+ "version": "1.1.2-beta.0",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",
@@ -69,7 +69,7 @@
69
69
  "@testing-library/jest-dom": "5.16.5",
70
70
  "@testing-library/react": "14.1.2",
71
71
  "@testing-library/user-event": "14.4.3",
72
- "@types/lodash": "^4.14.191",
72
+ "@types/lodash": "4.14.191",
73
73
  "@types/node": "17.0.45",
74
74
  "@types/react": "18.0.26",
75
75
  "@types/react-dev-utils": "^9.0.11",
@@ -78,6 +78,8 @@
78
78
  "@types/react-syntax-highlighter": "15.5.6",
79
79
  "@types/react-transition-group": "4.4.5",
80
80
  "@types/uuid": "8.3.4",
81
+ "@typescript-eslint/eslint-plugin": "6.21.0",
82
+ "@typescript-eslint/parser": "6.21.0",
81
83
  "babel-eslint": "7.2.3",
82
84
  "babel-jest": "29.7.0",
83
85
  "babel-loader": "9.1.3",
@@ -103,6 +105,7 @@
103
105
  "react-transition-group": "^4.4.2",
104
106
  "resize-observer-polyfill": "1.5.1",
105
107
  "resolve-url-loader": "5.0.0",
108
+ "sass": "1.74.1",
106
109
  "sass-loader": "14.1.0",
107
110
  "style-loader": "3.3.4",
108
111
  "tsup": "8.0.1",