ab-ui-library 1.51.3 → 1.53.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.
@@ -64,7 +64,8 @@ var FileUpload = function FileUpload(props) {
64
64
  onError = props.onError,
65
65
  fileAllowedSize = props.fileAllowedSize,
66
66
  _props$mode = props.mode,
67
- mode = _props$mode === void 0 ? FileUploadMode.attach : _props$mode;
67
+ mode = _props$mode === void 0 ? FileUploadMode.attach : _props$mode,
68
+ dataId = props.dataId;
68
69
  var files = value || uploadedFiles || [];
69
70
  var fileInputRef = useRef(null);
70
71
  var _useState = useState(false),
@@ -143,7 +144,8 @@ var FileUpload = function FileUpload(props) {
143
144
  className: "hide",
144
145
  ref: fileInputRef,
145
146
  accept: allowedTypes,
146
- onChange: handleChange
147
+ onChange: handleChange,
148
+ "data-id": dataId ? "".concat(dataId, "-input") : ''
147
149
  }), mode === FileUploadMode.edit && /*#__PURE__*/React.createElement("div", {
148
150
  className: "edit__icon",
149
151
  onMouseEnter: onMouseEnterOrLeave,
@@ -163,7 +165,8 @@ var FileUpload = function FileUpload(props) {
163
165
  Component: IconAttach
164
166
  },
165
167
  onClick: onUploadClick,
166
- buttonText: buttonText
168
+ buttonText: buttonText,
169
+ "data-id": dataId ? "".concat(dataId, "-btn") : ''
167
170
  }), /*#__PURE__*/React.createElement(UploadItems, {
168
171
  handleFileClick: handleFileClick,
169
172
  onRemove: handleFileRemove,
@@ -208,6 +208,7 @@ var InputPassword = /*#__PURE__*/React.forwardRef(function (props, ref) {
208
208
  size: 'small',
209
209
  className: 'pl-4',
210
210
  key: rule.label,
211
+ dataId: (rule === null || rule === void 0 ? void 0 : rule.dataId) || '',
211
212
  type: getTextType(password, validationResults[rule.label], isFocused)
212
213
  }, rule.label));
213
214
  }), hasError && validations !== null && validations !== void 0 && validations.length ? /*#__PURE__*/React.createElement(Divider, {
@@ -47,6 +47,7 @@ export interface InputCustomProps extends IFormCompProps, Omit<InputHTMLAttribut
47
47
  interface IPasswordValidationRule {
48
48
  label: string;
49
49
  test: (password: string) => boolean;
50
+ dataId?: string;
50
51
  }
51
52
  export interface InputPasswordsProps extends InputCustomProps {
52
53
  validations: IPasswordValidationRule[];
@@ -75,7 +75,8 @@ var ModalConfirmation = function ModalConfirmation(props) {
75
75
  _props$closeOnOutside = props.closeOnOutsideClick,
76
76
  closeOnOutsideClick = _props$closeOnOutside === void 0 ? true : _props$closeOnOutside,
77
77
  iconProps = props.iconProps,
78
- subtitle = props.subtitle;
78
+ subtitle = props.subtitle,
79
+ children = props.children;
79
80
  var _useState = useState(null),
80
81
  _useState2 = _slicedToArray(_useState, 2),
81
82
  containerRef = _useState2[0],
@@ -111,7 +112,9 @@ var ModalConfirmation = function ModalConfirmation(props) {
111
112
  dataId: dataIdPrefix ? "".concat(dataIdPrefix, "-modal-title") : ''
112
113
  }, title) : null, subtitle ? /*#__PURE__*/React.createElement(Text, {
113
114
  className: 'mt-12'
114
- }, subtitle) : null, buttonProps ? /*#__PURE__*/React.createElement("div", {
115
+ }, subtitle) : null, children ? /*#__PURE__*/React.createElement("div", {
116
+ className: 'mt-32'
117
+ }, children) : null, buttonProps ? /*#__PURE__*/React.createElement("div", {
115
118
  className: "modal__footer mt-32 ".concat(isFooterInline ? 'modal__footer-inline' : 'modal__footer-block')
116
119
  }, buttonProps !== null && buttonProps !== void 0 && buttonProps.cancel ? /*#__PURE__*/React.createElement(Button, _extends({
117
120
  type: "secondary",
@@ -42,4 +42,5 @@ export interface TModalConfirmationPropTypes {
42
42
  isFooterInline?: boolean;
43
43
  iconProps?: ISVGIconProps;
44
44
  className?: string;
45
+ children?: ReactNode;
45
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ab-ui-library",
3
- "version": "1.51.3",
3
+ "version": "1.53.0",
4
4
  "description": "UI library for AM",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",