Skip to content

Commit c116695

Browse files
committed
update old files
1 parent e8f55b9 commit c116695

File tree

2 files changed

+8
-32
lines changed

2 files changed

+8
-32
lines changed

src/common/components/mock-components/front-components/input-shape.tsx

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ export const InputShape = forwardRef<any, ShapeProps>((props, ref) => {
6060
);
6161

6262
const maskPassword = (text: string) => {
63-
const maskSymbol = '';
63+
const maskSymbol = '';
6464
return maskSymbol.repeat(text.length);
6565
};
6666

67+
const finalText = isPassword && !isPlaceholder ? maskPassword(text) : text;
68+
6769
return (
6870
<Group {...commonGroupProps} {...shapeProps}>
6971
<Rect
@@ -81,7 +83,7 @@ export const InputShape = forwardRef<any, ShapeProps>((props, ref) => {
8183
x={INPUT_SHAPE.DEFAULT_PADDING}
8284
y={INPUT_SHAPE.DEFAULT_PADDING + 1}
8385
width={width - INPUT_SHAPE.DEFAULT_PADDING * 2}
84-
text={isPassword ? maskPassword(text) : text}
86+
text={finalText}
8587
fontFamily={INPUT_SHAPE.DEFAULT_FONT_FAMILY}
8688
fontSize={INPUT_SHAPE.DEFAULT_FONT_SIZE}
8789
lineHeight={INPUT_SHAPE.DEFAULT_LINE_HEIGHT}
@@ -99,33 +101,3 @@ export const InputShape = forwardRef<any, ShapeProps>((props, ref) => {
99101
</Group>
100102
);
101103
});
102-
103-
/*
104-
<Group {...commonGroupProps} {...shapeProps}>
105-
<Rect
106-
x={0}
107-
y={0}
108-
width={restrictedWidth}
109-
height={restrictedHeight}
110-
cornerRadius={borderRadius}
111-
stroke={stroke}
112-
dash={strokeStyle}
113-
strokeWidth={INPUT_SHAPE.DEFAULT_STROKE_WIDTH}
114-
fill={fill}
115-
/>
116-
<Text
117-
x={INPUT_SHAPE.DEFAULT_PADDING}
118-
y={INPUT_SHAPE.DEFAULT_PADDING + 1}
119-
width={width - INPUT_SHAPE.DEFAULT_PADDING * 2}
120-
text={text}
121-
fontFamily={INPUT_SHAPE.DEFAULT_FONT_FAMILY}
122-
fontSize={INPUT_SHAPE.DEFAULT_FONT_SIZE}
123-
lineHeight={INPUT_SHAPE.DEFAULT_LINE_HEIGHT}
124-
fill={textColor}
125-
align="left"
126-
ellipsis={true}
127-
wrap="none"
128-
/>
129-
</Group>
130-
131-
*/

src/core/local-disk/shapes-to-document.mapper.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ const AddDefaultValuesForInputPropsPlaceHolderAndPassword = (
5252
...shape,
5353
otherProps: {
5454
...shape.otherProps,
55+
isPassword:
56+
shape.otherProps?.isPassword !== undefined
57+
? shape.otherProps?.isPassword
58+
: false,
5559
isPlaceholder:
5660
// Small update no need to go for 0_3, but input placeHolder needs to have default value
5761
// if undefined

0 commit comments

Comments
 (0)