@antscorp/antsomi-ui 1.3.5-beta.382 → 1.3.5-beta.383
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.
|
@@ -6,7 +6,7 @@ import Icon from '@antscorp/icons';
|
|
|
6
6
|
import { Spin } from '../../atoms';
|
|
7
7
|
export const EditableName = React.forwardRef((props, ref) => {
|
|
8
8
|
var _a;
|
|
9
|
-
const { className, isLoading, defaultValue, required, error, value, style, readonly, onBlur, onChange, } = props;
|
|
9
|
+
const { className, isLoading, defaultValue, required, error, value, style, readonly, maxLength, onBlur, onChange, } = props;
|
|
10
10
|
const [inputWidth, setInputWidth] = useState(1);
|
|
11
11
|
const [internalValue, setInternalValue] = useState(value || defaultValue || '');
|
|
12
12
|
const requiredError = useMemo(() => {
|
|
@@ -46,7 +46,7 @@ export const EditableName = React.forwardRef((props, ref) => {
|
|
|
46
46
|
setInputWidth(((_a = spanRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 1);
|
|
47
47
|
setInternalValue(newValue);
|
|
48
48
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
49
|
-
}, onBlur: onBlur, onKeyDown: onKeyDown })),
|
|
49
|
+
}, onBlur: onBlur, onKeyDown: onKeyDown, maxLength: maxLength })),
|
|
50
50
|
isLoading ? (React.createElement(Spin, { indicatorSize: 20, style: { paddingLeft: '5px', marginLeft: '10px', alignSelf: 'center' } })) : null,
|
|
51
51
|
(error || requiredError) && !isLoading ? (React.createElement("div", { className: "suffix-icon-error" },
|
|
52
52
|
React.createElement(Tooltip, { title: error || requiredError },
|
|
@@ -84,7 +84,9 @@ export const HeaderV2 = memo(props => {
|
|
|
84
84
|
iamDomain,
|
|
85
85
|
accountId: userId,
|
|
86
86
|
networkId: portalId,
|
|
87
|
-
|
|
87
|
+
// NOTE: old edit link
|
|
88
|
+
// urlEditProfile: `${permissionDomain}/${portalId}#/account/profile/`,
|
|
89
|
+
urlEditProfile: `${permissionDomain}/${portalId}#/${userId}/permission/account?ui=drawer-detail&accountId=${userId}&tab=settings`,
|
|
88
90
|
// 6006 is storybook port so direct to sandbox page
|
|
89
91
|
urlLogout: urlLogoutProvider || window.location.origin,
|
|
90
92
|
// urlLogout: window.location.origin,
|