@dilicorp/ui 0.0.82 → 0.0.83
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/dist/components/form-builder/components/button.d.ts.map +1 -1
- package/dist/components/form-builder/components/button.js +2 -2
- package/dist/components/form-builder/components/checkbox.d.ts.map +1 -1
- package/dist/components/form-builder/components/checkbox.js +1 -1
- package/dist/components/form-builder/components/datepicker.d.ts.map +1 -1
- package/dist/components/form-builder/components/datepicker.js +2 -2
- package/dist/components/form-builder/components/dropzone.js +1 -1
- package/dist/components/form-builder/components/input.js +2 -3
- package/dist/components/form-builder/components/password.d.ts.map +1 -1
- package/dist/components/form-builder/components/password.js +1 -1
- package/dist/components/form-builder/components/radio.d.ts.map +1 -1
- package/dist/components/form-builder/components/radio.js +1 -1
- package/dist/components/form-builder/components/select.d.ts.map +1 -1
- package/dist/components/form-builder/components/select.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAGpC,aAAK,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG;IACrD,IAAI,CAAC,EAAE,QAAQ,GAAC,OAAO,GAAC,QAAQ,CAAA;IAChC,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,SAAS,GAAC,WAAW,GAAC,SAAS,GAAC,QAAQ,GAAC,SAAS,GAAC,MAAM,CAAA;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAGpC,aAAK,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG;IACrD,IAAI,CAAC,EAAE,QAAQ,GAAC,OAAO,GAAC,QAAQ,CAAA;IAChC,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,SAAS,GAAC,WAAW,GAAC,SAAS,GAAC,QAAQ,GAAC,SAAS,GAAC,MAAM,CAAA;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAE,KAAK,EAAE,KAAK,eA4B1C"}
|
|
@@ -12,9 +12,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { Button } from '../../../atoms/button';
|
|
14
14
|
export default function Input(props) {
|
|
15
|
-
const { type = 'button', actions, color = 'primary', label, labelLoading = label, className } = props, elements = __rest(props, ["type", "actions", "color", "label", "labelLoading", "className"]);
|
|
15
|
+
const { type = 'button', actions, color = 'primary', label, labelLoading = label, className, id } = props, elements = __rest(props, ["type", "actions", "color", "label", "labelLoading", "className", "id"]);
|
|
16
16
|
return (React.createElement("div", null,
|
|
17
|
-
React.createElement(Button, Object.assign({}, elements, { className: className, type: type, color: color }), actions.isSubmitting
|
|
17
|
+
React.createElement(Button, Object.assign({}, elements, { className: className, type: type, color: color }, (id && { 'data-testid': id })), actions.isSubmitting
|
|
18
18
|
? labelLoading
|
|
19
19
|
: label)));
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAa,WAAW,EAAE,MAAM,QAAQ,CAAA;AAE/C,aAAK,MAAM,GAAG;IACZ,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;CACrB,CAAA;AAED,aAAK,KAAK,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAa,WAAW,EAAE,MAAM,QAAQ,CAAA;AAE/C,aAAK,MAAM,GAAG;IACZ,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;CACrB,CAAA;AAED,aAAK,KAAK,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,KAAK,EAAE,KAAK,wBAsC7C"}
|
|
@@ -12,6 +12,6 @@ export default function Checkbox(props) {
|
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
14
|
return options.map((option, index) => (React.createElement("div", { className: "form-check", key: `${name}-${index}` },
|
|
15
|
-
React.createElement(FastField, Object.assign({ value: option.value, name: name, id: `${id}-${index}` }, isChecked(option), { disabled }, { className: "form-check-input", type: "checkbox", tabIndex: tabIndex })),
|
|
15
|
+
React.createElement(FastField, Object.assign({ value: option.value, name: name, id: `${id}-${index}`, "data-testid": `${id}-${index}` }, isChecked(option), { disabled }, { className: "form-check-input", type: "checkbox", tabIndex: tabIndex })),
|
|
16
16
|
React.createElement("label", { className: "form-check-label", htmlFor: `${id}-${index}` }, option.label))));
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datepicker.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/datepicker.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAmB,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAEvF,aAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,GAAG;IACpD,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"datepicker.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/datepicker.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAmB,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAEvF,aAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,GAAG;IACpD,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAE,KAAK,EAAE,KAAK,eAkB/C"}
|
|
@@ -12,6 +12,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { InputDatepicker } from '../../../atoms/input-datepicker';
|
|
14
14
|
export default function DatePicker(props) {
|
|
15
|
-
const { name, actions, value } = props, rest = __rest(props, ["name", "actions", "value"]);
|
|
16
|
-
return (React.createElement(InputDatepicker, Object.assign({ value: value || '', name: name }, rest, { onChange: actions.setFieldValue })));
|
|
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 })));
|
|
17
17
|
}
|
|
@@ -11,7 +11,7 @@ export default function DropZone(props) {
|
|
|
11
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 }));
|
|
12
12
|
return (React.createElement("div", { className: "dropzone-container" },
|
|
13
13
|
React.createElement("div", Object.assign({}, getRootProps({ className: 'dropzone' })),
|
|
14
|
-
React.createElement("input", Object.assign({}, getInputProps({ name, id }))),
|
|
14
|
+
React.createElement("input", Object.assign({}, getInputProps({ name, id }), { "data-testid": id })),
|
|
15
15
|
isDragActive
|
|
16
16
|
? React.createElement("p", null, textFileSelect)
|
|
17
17
|
: React.createElement("p", null, textFileSelected)),
|
|
@@ -16,7 +16,7 @@ import { InputCurrency } from './input-currency';
|
|
|
16
16
|
import { InputMask } from './input-mask';
|
|
17
17
|
import { InputPrefixSuffix } from './input-prefix-suffix';
|
|
18
18
|
export default function Input(props) {
|
|
19
|
-
const { name, id = name, type = 'text', tabIndex = 0, actions,
|
|
19
|
+
const { name, id = name, type = 'text', tabIndex = 0, actions, mask, multiple = false, currency, className, prefix, suffix } = props, elements = __rest(props, ["name", "id", "type", "tabIndex", "actions", "mask", "multiple", "currency", "className", "prefix", "suffix"]);
|
|
20
20
|
const validOptions = {
|
|
21
21
|
alt: elements.alt,
|
|
22
22
|
autoComplete: elements.autoComplete,
|
|
@@ -49,8 +49,7 @@ export default function Input(props) {
|
|
|
49
49
|
const curValue = actions.values[name];
|
|
50
50
|
const classes = classNames(className, 'form-control');
|
|
51
51
|
const attrs = Object.assign(Object.assign({}, validOptions), { value: curValue, className: classes, name,
|
|
52
|
-
id,
|
|
53
|
-
type,
|
|
52
|
+
id, 'data-testid': id, type,
|
|
54
53
|
tabIndex, autoComplete: 'none', onChange: handleChange });
|
|
55
54
|
if (currency)
|
|
56
55
|
return React.createElement(InputCurrency, Object.assign({}, { name, attrs, currency, handleChange }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/password.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAS,WAAW,EAAE,MAAM,QAAQ,CAAA;AAE3C,aAAK,KAAK,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/password.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAS,WAAW,EAAE,MAAM,QAAQ,CAAA;AAE3C,aAAK,KAAK,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAE,KAAK,EAAE,KAAK,eAgE7C"}
|
|
@@ -42,5 +42,5 @@ export default function Password(props) {
|
|
|
42
42
|
};
|
|
43
43
|
return (React.createElement("div", { className: "position-relative" },
|
|
44
44
|
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, tabIndex: tabIndex, onChange: handleChange, readOnly: true, autoComplete: "off", onFocus: handleFocus }))));
|
|
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 }))));
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAa,WAAW,EAAE,MAAM,QAAQ,CAAA;AAE/C,aAAK,MAAM,GAAG;IACZ,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;CACrB,CAAA;AAED,aAAK,KAAK,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAa,WAAW,EAAE,MAAM,QAAQ,CAAA;AAE/C,aAAK,MAAM,GAAG;IACZ,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;CACrB,CAAA;AAED,aAAK,KAAK,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAE,KAAK,EAAE,KAAK,wBA+C1C"}
|
|
@@ -19,6 +19,6 @@ export default function Radio(props) {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
return options.map((option, index) => (React.createElement("div", { className: "form-check", key: `${name}-${index}` },
|
|
22
|
-
React.createElement(FastField, Object.assign({ value: option.value, name: name, id: `${id}-${index}` }, isChecked(option), { disabled }, { type: "radio", tabIndex: tabIndex, className: "form-check-input", onChange: handleChange })),
|
|
22
|
+
React.createElement(FastField, 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
23
|
React.createElement("label", { className: "form-check-label", htmlFor: `${id}-${index}` }, option.label))));
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/select.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAGpC,aAAK,MAAM,GAAG;IACZ,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;CACrB,CAAA;AAED,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,GAAG,CAAA;CACf,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/components/form-builder/components/select.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAGpC,aAAK,MAAM,GAAG;IACZ,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,GAAC,MAAM,CAAA;CACrB,CAAA;AAED,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,GAAG,CAAA;CACf,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAE,KAAK,EAAE,KAAK,eAwD3C"}
|
|
@@ -21,5 +21,5 @@ export default function Select(props) {
|
|
|
21
21
|
actions.setFieldValue(name, JSON.stringify(newValue));
|
|
22
22
|
setValue(newValue);
|
|
23
23
|
}, []);
|
|
24
|
-
return (React.createElement(ReactSelect, { placeholder: placeholder, className: "form-builder-select", classNamePrefix: "form-builder", options: options, name: name, id: id, defaultValue: currValue, value: currValue, isDisabled: isDisabled, isLoading: isLoading, isClearable: isClearable, isSearchable: isSearchable, isMulti: isMulti, onChange: handleChange }));
|
|
24
|
+
return (React.createElement(ReactSelect, { placeholder: placeholder, className: "form-builder-select", classNamePrefix: "form-builder", options: options, name: name, id: id, "data-testid": id, defaultValue: currValue, value: currValue, isDisabled: isDisabled, isLoading: isLoading, isClearable: isClearable, isSearchable: isSearchable, isMulti: isMulti, onChange: handleChange }));
|
|
25
25
|
}
|