Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dd82d31
chore: scaffold
dinhtungdu Sep 20, 2025
a3b78ca
feat: update field type
dinhtungdu Sep 20, 2025
2ab54e8
feat: update field control
dinhtungdu Sep 20, 2025
161d167
feat: add step support
dinhtungdu Sep 20, 2025
f76354e
feat: update validation
dinhtungdu Sep 20, 2025
754a11b
feat: register new field
dinhtungdu Sep 20, 2025
6b78a80
feat: add suffix and prefix support
dinhtungdu Sep 20, 2025
3000524
feat: update min max of between control
dinhtungdu Sep 20, 2025
429a54b
fix: update custom validation trigger condition
dinhtungdu Sep 20, 2025
209f2cd
test: add number tests
dinhtungdu Sep 21, 2025
b8cb310
fix: between number onChange callback
dinhtungdu Sep 21, 2025
5b37b13
fix: Ensure the value of min max are always different
dinhtungdu Sep 21, 2025
5f3d926
fix: type consistency
dinhtungdu Sep 21, 2025
ce9c026
fix: number validation logic
dinhtungdu Sep 21, 2025
483510e
dev: story
dinhtungdu Sep 20, 2025
7f81c2b
refactor: base integer on number
dinhtungdu Sep 21, 2025
8e20976
docs: update README file
dinhtungdu Sep 21, 2025
b605910
chore: changelog
dinhtungdu Sep 21, 2025
74acb65
chore: restore integer field definition
dinhtungdu Sep 27, 2025
8ce0f13
fix: simplify the number field for the first iteration, remove steps/…
dinhtungdu Sep 27, 2025
9cfddf9
fix: remove unused helper
dinhtungdu Sep 27, 2025
d2c03b7
fix: remove unused types related to number
dinhtungdu Sep 30, 2025
0716841
fix: make the render function respect default decimal number
dinhtungdu Sep 30, 2025
1ccff00
fix: unify validation behavior
dinhtungdu Sep 30, 2025
93c776c
refactor: extract number control into a shared component for number a…
dinhtungdu Sep 30, 2025
157b176
fix: sync the validation with integer
dinhtungdu Sep 30, 2025
17aab3a
Update story components to prevent conflicts with global namespace
oandregal Sep 30, 2025
41af593
fix: update number with element story
dinhtungdu Sep 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update story components to prevent conflicts with global namespace
  • Loading branch information
oandregal committed Sep 30, 2025
commit 17aab3a349f4593aae11bf1c828fcc31fee50573
47 changes: 31 additions & 16 deletions packages/dataviews/src/field-types/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const fields: Field< DataType >[] = [
{ value: 3, label: 'Three' },
],
setValue: ( { value } ) => ( {
integerWithElements: Number( value ),
integerWithElements: parseInt( value, 10 ),
} ),
},
{
Expand Down Expand Up @@ -653,7 +653,7 @@ const FieldTypeStory = ( {
);
};

export const All = ( {
export const AllComponent = ( {
type,
Edit,
}: {
Expand All @@ -662,8 +662,9 @@ export const All = ( {
} ) => {
return <FieldTypeStory fields={ fields } type={ type } Edit={ Edit } />;
};
AllComponent.storyName = 'All types';

export const Text = ( {
export const TextComponent = ( {
type,
Edit,
}: {
Expand All @@ -677,8 +678,9 @@ export const Text = ( {

return <FieldTypeStory fields={ textFields } type={ type } Edit={ Edit } />;
};
TextComponent.storyName = 'text';

export const Integer = ( {
export const IntegerComponent = ( {
type,
Edit,
}: {
Expand All @@ -694,8 +696,9 @@ export const Integer = ( {
<FieldTypeStory fields={ integerFields } type={ type } Edit={ Edit } />
);
};
IntegerComponent.storyName = 'integer';

export const Number = ( {
export const NumberComponent = ( {
type,
Edit,
}: {
Expand All @@ -711,8 +714,9 @@ export const Number = ( {
<FieldTypeStory fields={ numberFields } type={ type } Edit={ Edit } />
);
};
NumberComponent.storyName = 'number';

export const Boolean = ( {
export const BooleanComponent = ( {
type,
Edit,
}: {
Expand All @@ -728,8 +732,9 @@ export const Boolean = ( {
<FieldTypeStory fields={ booleanFields } type={ type } Edit={ Edit } />
);
};
BooleanComponent.storyName = 'boolean';

export const DateTime = ( {
export const DateTimeComponent = ( {
type,
Edit,
}: {
Expand All @@ -745,8 +750,9 @@ export const DateTime = ( {
<FieldTypeStory fields={ dateTimeFields } type={ type } Edit={ Edit } />
);
};
DateTimeComponent.storyName = 'datetime';

export const Date = ( {
export const DateComponent = ( {
type,
Edit,
}: {
Expand All @@ -760,8 +766,9 @@ export const Date = ( {

return <FieldTypeStory fields={ dateFields } type={ type } Edit={ Edit } />;
};
DateComponent.storyName = 'date';

export const Email = ( {
export const EmailComponent = ( {
type,
Edit,
}: {
Expand All @@ -777,8 +784,9 @@ export const Email = ( {
<FieldTypeStory fields={ emailFields } type={ type } Edit={ Edit } />
);
};
EmailComponent.storyName = 'email';

export const Telephone = ( {
export const TelephoneComponent = ( {
type,
Edit,
}: {
Expand All @@ -798,8 +806,9 @@ export const Telephone = ( {
/>
);
};
TelephoneComponent.storyName = 'telephone';

export const Url = ( {
export const UrlComponent = ( {
type,
Edit,
}: {
Expand All @@ -813,8 +822,9 @@ export const Url = ( {

return <FieldTypeStory fields={ urlFields } type={ type } Edit={ Edit } />;
};
UrlComponent.storyName = 'url';

export const Color = ( {
export const ColorComponent = ( {
type,
Edit,
}: {
Expand All @@ -830,8 +840,9 @@ export const Color = ( {
<FieldTypeStory fields={ colorFields } type={ type } Edit={ Edit } />
);
};
ColorComponent.storyName = 'color';

export const Media = ( {
export const MediaComponent = ( {
type,
Edit,
}: {
Expand All @@ -847,8 +858,9 @@ export const Media = ( {
<FieldTypeStory fields={ mediaFields } type={ type } Edit={ Edit } />
);
};
MediaComponent.storyName = 'media';

export const Array = ( {
export const ArrayComponent = ( {
type,
Edit,
}: {
Expand All @@ -868,8 +880,9 @@ export const Array = ( {
/>
);
};
ArrayComponent.storyName = 'array';

export const Password = ( {
export const PasswordComponent = ( {
type,
Edit,
}: {
Expand All @@ -885,8 +898,9 @@ export const Password = ( {
<FieldTypeStory fields={ passwordFields } type={ type } Edit={ Edit } />
);
};
PasswordComponent.storyName = 'password';

export const NoType = ( {
export const NoTypeComponent = ( {
type,
Edit,
}: {
Expand All @@ -902,3 +916,4 @@ export const NoType = ( {
<FieldTypeStory fields={ noTypeFields } type={ type } Edit={ Edit } />
);
};
NoTypeComponent.storyName = 'No type';
Loading