Skip to content

Commit eaa7988

Browse files
committed
remove business function
1 parent e76da86 commit eaa7988

5 files changed

Lines changed: 8 additions & 25 deletions

File tree

src/common/components/mock-components/front-rich-components/input-stepper/input-stepper.tsx renamed to src/common/components/mock-components/front-rich-components/input-stepper.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { forwardRef } from 'react';
22
import { Group, Rect, Text } from 'react-konva';
33
import { ShapeSizeRestrictions } from '@/common/utils/shapes/shape-restrictions';
4-
import { useGroupShapeProps } from '../../mock-components.utils';
4+
import { useGroupShapeProps } from '../mock-components.utils';
55
import { fitSizeToShapeSizeRestrictions } from '@/common/utils/shapes/shape-restrictions';
66
import { ShapeType } from '@/core/model';
7-
import { ShapeProps } from '../../shape.model';
8-
import { useShapeProps } from '../../../shapes/use-shape-props.hook';
9-
import { INPUT_SHAPE } from '../../front-components/shape.const';
10-
import { getTextFieldWidth } from './input-stepper.business';
7+
import { ShapeProps } from '../shape.model';
8+
import { useShapeProps } from '../../shapes/use-shape-props.hook';
9+
import { INPUT_SHAPE } from '../front-components/shape.const';
1110

1211
// Size restrictions (igual patrón que file-tree)
1312
export const inputStepperShapeRestrictions: ShapeSizeRestrictions = {
@@ -50,8 +49,6 @@ export const InputWithStepper = forwardRef<any, ShapeProps>((props, ref) => {
5049

5150
const { width: restrictedWidth } = restrictedSize;
5251

53-
const textFieldWidth = getTextFieldWidth(restrictedWidth);
54-
5552
return (
5653
<Group {...commonGroupProps} {...shapeProps}>
5754
{/* Caja del input */}
@@ -71,12 +68,12 @@ export const InputWithStepper = forwardRef<any, ShapeProps>((props, ref) => {
7168
<Text
7269
x={0}
7370
y={height / 2 - 8} // Centrar verticalmente
74-
width={restrictedWidth - textFieldWidth - 8}
71+
width={restrictedWidth}
7572
text={text}
7673
fontFamily="Arial"
7774
fontSize={16}
7875
fill={textColor}
79-
align="right"
76+
align="left"
8077
wrap="none"
8178
/>
8279

src/common/components/mock-components/front-rich-components/input-stepper/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/common/components/mock-components/front-rich-components/input-stepper/input-stepper.business.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/pods/canvas/model/shape-size.mapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// src/common/shape-utils/shapeSizeMap.ts
22
import { ShapeType, ShapeSizeRestrictions } from '@/core/model';
3-
import { getInputStepperShapeSizeRestrictions } from '@/common/components/mock-components/front-rich-components/input-stepper/input-stepper';
3+
import { getInputStepperShapeSizeRestrictions } from '@/common/components/mock-components/front-rich-components/input-stepper';
44
import {
55
getButtonShapeSizeRestrictions,
66
getCheckboxShapeSizeRestrictions,

src/pods/canvas/shape-renderer/simple-rich-components/input-stepper.renderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InputWithStepper } from '@/common/components/mock-components/front-rich-components/input-stepper/input-stepper';
1+
import { InputWithStepper } from '@/common/components/mock-components/front-rich-components/input-stepper';
22
import { ShapeRendererProps } from '../model';
33
import { ShapeModel } from '@/core/model';
44

0 commit comments

Comments
 (0)