ish-ui 1.0.32 → 1.0.34
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/formFields/EditInPlaceMoneyField.d.ts +0 -2
- package/dist/formFields/EditInPlaceMoneyField.js +2 -1
- package/dist/formFields/EditInPlaceSearchSelect.js +3 -1
- package/dist/model/Fields.d.ts +0 -1
- package/dist/styles/GlobalStylesProvider.js +1 -2
- package/dist/tagsInput/TagInputList.js +8 -3
- package/package.json +1 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EditInPlaceFieldProps } from '../model';
|
|
3
|
-
import { Dispatch } from 'redux';
|
|
4
3
|
interface Props<InputProps, MetaProps> extends EditInPlaceFieldProps<InputProps, MetaProps> {
|
|
5
4
|
currencySymbol: string;
|
|
6
|
-
dispatch?: Dispatch;
|
|
7
5
|
}
|
|
8
6
|
declare function EditInPlaceMoneyField<IP, MP>({ InputProps, currencySymbol, className, ...restProps }: Props<IP, MP>): React.JSX.Element;
|
|
9
7
|
export default EditInPlaceMoneyField;
|
|
@@ -33,6 +33,7 @@ const preformatDisplayValue = value => value || value === 0 ? formatCurrency(val
|
|
|
33
33
|
function EditInPlaceMoneyField(_a) {
|
|
34
34
|
var _b;
|
|
35
35
|
var { InputProps, currencySymbol, className } = _a, restProps = __rest(_a, ["InputProps", "currencySymbol", "className"]);
|
|
36
|
-
return (React.createElement(EditInPlaceField, Object.assign({}, restProps, { preformatDisplayValue: preformatDisplayValue, InputProps: Object.assign(Object.assign({}, InputProps), { startAdornment: React.createElement(InputAdornment, { position: "start", className: (_b = restProps.fieldClasses) === null || _b === void 0 ? void 0 : _b.text },
|
|
36
|
+
return (React.createElement(EditInPlaceField, Object.assign({}, restProps, { preformatDisplayValue: preformatDisplayValue, InputProps: Object.assign(Object.assign({}, InputProps), { startAdornment: React.createElement(InputAdornment, { position: "start", className: (_b = restProps.fieldClasses) === null || _b === void 0 ? void 0 : _b.text },
|
|
37
|
+
React.createElement("span", null, currencySymbol)), inputComponent: NumberFormatCustom }), className: clsx('money', className) })));
|
|
37
38
|
}
|
|
38
39
|
export default EditInPlaceMoneyField;
|
|
@@ -311,7 +311,9 @@ function EditInPlaceSearchSelect({ label, disabled, className, labelAdornment, i
|
|
|
311
311
|
?
|
|
312
312
|
React.createElement(Select, Object.assign({}, InputProps, { inputRef: ref => {
|
|
313
313
|
inputProps.ref.current = ref === null || ref === void 0 ? void 0 : ref.node;
|
|
314
|
-
}, classes: {
|
|
314
|
+
}, classes: {
|
|
315
|
+
select: clsx('cursor-text', fieldClasses.text)
|
|
316
|
+
}, onFocus: edit, value: (returnType === 'object' ? input.value[selectValueMark] : input.value) || '', endAdornment: React.createElement(InputAdornment, { position: "end", className: 'd-none' }, renderIcons), IconComponent: stubComponent }), renderValue)
|
|
315
317
|
: null })));
|
|
316
318
|
}, disableListWrap: true, openOnFocus: true, fullWidth: true }))));
|
|
317
319
|
}
|
package/dist/model/Fields.d.ts
CHANGED
|
@@ -140,8 +140,7 @@ const globalStyles = (theme) => createStyles({
|
|
|
140
140
|
}, '.checkboxWidth': {
|
|
141
141
|
width: '35px'
|
|
142
142
|
}, '.placeholderContent': {
|
|
143
|
-
|
|
144
|
-
fill: theme.palette.divider,
|
|
143
|
+
opacity: 0.15,
|
|
145
144
|
fontWeight: 400,
|
|
146
145
|
}, '.link': {
|
|
147
146
|
color: 'inherit',
|
|
@@ -251,13 +251,18 @@ function TagInputList({ input, tags, placeholder, labelAdornment, meta, label =
|
|
|
251
251
|
}, renderInput: (_a) => {
|
|
252
252
|
var { InputProps, inputProps } = _a, params = __rest(_a, ["InputProps", "inputProps"]);
|
|
253
253
|
return (React.createElement(EditInPlaceFieldBase, Object.assign({}, params, { variant: variant, name: input.name, value: input.value, error: meta.error, invalid: meta === null || meta === void 0 ? void 0 : meta.invalid, label: label, warning: warning, disabled: disabled, fieldClasses: fieldClasses, shrink: Boolean(label || input.value), labelAdornment: labelAdornment, placeholder: placeholder, editIcon: editIcon === undefined ? React.createElement(Edit, null) : editIcon, InputProps: Object.assign(Object.assign({}, InputProps), { onChange: handleInputChange, onFocus,
|
|
254
|
-
onBlur,
|
|
254
|
+
onBlur, classes: {
|
|
255
|
+
underline: fieldClasses.underline,
|
|
256
|
+
input: clsx(disabled && classes.readonly, fieldClasses.text),
|
|
257
|
+
}, inputProps: Object.assign(Object.assign({}, inputProps), { ref: ref => {
|
|
255
258
|
inputProps.ref.current = ref;
|
|
256
259
|
inputNode.current = ref;
|
|
257
|
-
}, value: inputValue }) }), CustomInput: !isEditing
|
|
260
|
+
}, value: inputValue, className: clsx(inputProps.className, fieldClasses.text) }) }), CustomInput: !isEditing
|
|
258
261
|
? React.createElement(Select, { inputRef: ref => {
|
|
259
262
|
inputProps.ref.current = ref === null || ref === void 0 ? void 0 : ref.node;
|
|
260
|
-
}, onFocus: edit, value: "stub", className: classes.inputWrapper, classes: {
|
|
263
|
+
}, onFocus: edit, value: "stub", className: classes.inputWrapper, classes: {
|
|
264
|
+
select: clsx('d-flex flex-wrap cursor-text', fieldClasses.text)
|
|
265
|
+
}, endAdornment: React.createElement(InputAdornment, { position: "end", className: clsx(classes.editIcon, 'invisible') },
|
|
261
266
|
React.createElement(Edit, { className: "test" })), IconComponent: stubComponent },
|
|
262
267
|
React.createElement(MenuItem, { value: "stub" }, InputValueForRender || React.createElement("span", { className: "placeholderContent" }, placeholder)))
|
|
263
268
|
: null })));
|