ish-ui 1.0.38 → 1.0.40
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.
|
@@ -98,12 +98,12 @@ const EditInPlaceFieldBase = ({ value, invalid, className, inline, label, fieldC
|
|
|
98
98
|
} }, (InputProps === null || InputProps === void 0 ? void 0 : InputProps.inputProps) || {}), classes: {
|
|
99
99
|
root: clsx(fieldClasses.text, inline && classes.inlineInput),
|
|
100
100
|
underline: fieldClasses.underline
|
|
101
|
-
}, disabled: disabled, endAdornment: !disabled &&
|
|
101
|
+
}, disabled: disabled, endAdornment: InputProps.endAdornment || (!disabled &&
|
|
102
102
|
React.createElement(InputAdornment, { position: "end", onClick: onAdornmentClick, className: clsx(endAdornmentClass, {
|
|
103
103
|
['fsInherit']: inline,
|
|
104
104
|
['d-none']: (rightAligned || inline),
|
|
105
105
|
['invisible']: variant !== 'outlined' && !(rightAligned || inline)
|
|
106
|
-
}) }, editIcon), id: `input-${name}`, name: name })),
|
|
106
|
+
}) }, editIcon)), id: `input-${name}`, name: name })),
|
|
107
107
|
React.createElement(FormHelperText, { classes: {
|
|
108
108
|
root: clsx(rightAligned && 'text-end'),
|
|
109
109
|
error: 'shakingError'
|
|
@@ -298,7 +298,7 @@ function EditInPlaceSearchSelect({ label, disabled, className, labelAdornment, i
|
|
|
298
298
|
groupUl: 'm-0'
|
|
299
299
|
}, groupBy: categoryKey && (option => option[categoryKey]), renderOption: renderOption, getOptionLabel: getOptionLabel, filterOptions: filterItems, ListboxComponent: inline || categoryKey ? null : ListBoxAdapter, PopperComponent: categoryKey ? null : PopperAdapter, renderInput: (_a) => {
|
|
300
300
|
var { InputLabelProps, InputProps, inputProps } = _a, params = __rest(_a, ["InputLabelProps", "InputProps", "inputProps"]);
|
|
301
|
-
return (React.createElement(EditInPlaceFieldBase, Object.assign({}, params, { variant: variant, name: input.name, value: displayedValue, error: error, invalid: hasError || invalid, inline: inline, label: label, warning: warning, fieldClasses: fieldClasses, rightAligned: rightAligned, shrink: Boolean(label || input.value), labelAdornment: labelAdornment, placeholder: renderedPlaceholder, editIcon: !hideEditIcon && renderIcons, InputProps: Object.assign(Object.assign({}, InputProps), { onChange: handleInputChange, onFocus: edit, onClick: onEditButtonFocus, onBlur,
|
|
301
|
+
return (React.createElement(EditInPlaceFieldBase, Object.assign({}, params, { variant: variant, name: input.name, value: displayedValue, error: error, invalid: hasError || invalid, inline: inline, label: label, warning: warning, fieldClasses: fieldClasses, rightAligned: rightAligned, shrink: Boolean(label || input.value), labelAdornment: labelAdornment, placeholder: renderedPlaceholder, editIcon: !hideEditIcon && renderIcons, InputProps: Object.assign(Object.assign({}, InputProps), { endAdornment: null, onChange: handleInputChange, onFocus: edit, onClick: onEditButtonFocus, onBlur,
|
|
302
302
|
disableUnderline, classes: {
|
|
303
303
|
underline: fieldClasses.underline,
|
|
304
304
|
input: clsx(disabled && classes.readonly, fieldClasses.text),
|
|
@@ -4,3 +4,6 @@ export type StringKeyObject<V = any> = {
|
|
|
4
4
|
export type StringKeyAndValueObject = StringKeyObject<string>;
|
|
5
5
|
export type StringValueType<T extends ReadonlyArray<unknown>> = T extends ReadonlyArray<infer ElementType> ? ElementType : never;
|
|
6
6
|
export type ArgumentTypes<F extends Function> = F extends (...args: infer A) => any ? A : never;
|
|
7
|
+
export type Mutable<T> = {
|
|
8
|
+
-readonly [P in keyof T]: T[P];
|
|
9
|
+
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { SelectItemDefault } from '../../model';
|
|
1
2
|
export declare const getHighlightedPartLabel: (label: string, highlighted: string, options?: any) => any;
|
|
3
|
+
export declare const sortDefaultSelectItems: (a: SelectItemDefault, b: SelectItemDefault) => 1 | -1;
|
|
4
|
+
export declare const mapSelectItems: (i: any) => SelectItemDefault;
|
|
2
5
|
export * from './PhoneMasks';
|
|
@@ -7,4 +7,6 @@ export const getHighlightedPartLabel = (label, highlighted, options) => {
|
|
|
7
7
|
const result = parts.map((part, index) => (React.createElement("span", { key: index }, part.highlight ? React.createElement("strong", null, part.text) : part.text)));
|
|
8
8
|
return options ? (React.createElement("div", Object.assign({}, options || {}), result)) : result;
|
|
9
9
|
};
|
|
10
|
+
export const sortDefaultSelectItems = (a, b) => (a.label[0].toLowerCase() > b.label[0].toLowerCase() ? 1 : -1);
|
|
11
|
+
export const mapSelectItems = (i) => ({ label: i, value: i });
|
|
10
12
|
export * from './PhoneMasks';
|