Skip to content

Commit

Permalink
refactor: update config files to match new pattern names and labels T…
Browse files Browse the repository at this point in the history
…CKT-464
  • Loading branch information
kalasgarov committed Feb 26, 2025
1 parent dd33d55 commit 2433592
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/forms/src/patterns/attachment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const attachmentConfig: PatternConfig<
AttachmentPatternOutput
> = {
displayName: message.patterns.attachment.displayName,
iconPath: 'shortanswer-icon.svg',
iconPath: 'attachment-icon.svg',
initial: {
label: 'File upload',
required: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/src/patterns/date-of-birth/date-of-birth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ export const dateOfBirthConfig: PatternConfig<
DateOfBirthPattern,
DateOfBirthPatternOutput
> = {
displayName: 'Date of Birth',
displayName: 'Date of birth',
iconPath: 'date-icon.svg',
initial: {
label: 'Date of Birth',
label: 'Date of birth',
required: false,
hint: 'For example: January 19 2000',
},
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/src/patterns/email-input/email-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ export const emailInputConfig: PatternConfig<
EmailInputPattern,
EmailInputPatternOutput
> = {
displayName: 'Email Input',
displayName: 'Email',
iconPath: 'email-icon.svg',
initial: {
label: 'Email Input',
label: 'Email',
required: false,
},

Expand Down
4 changes: 2 additions & 2 deletions packages/forms/src/patterns/fieldset/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { type FieldsetPattern, parseConfigData } from './config.js';
import { createPrompt } from './prompt.js';

export const fieldsetConfig: PatternConfig<FieldsetPattern> = {
displayName: 'Fieldset',
iconPath: 'block-icon.svg',
displayName: 'Question set',
iconPath: 'list-icon.svg',
initial: {
legend: 'Default Heading',
patterns: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/patterns/form-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const configSchema = z.object({
export type FormSummaryPattern = Pattern<z.infer<typeof configSchema>>;

export const formSummaryConfig: PatternConfig<FormSummaryPattern> = {
displayName: 'Form summary',
displayName: 'Title',
iconPath: 'block-icon.svg',
initial: {
title: 'Form title',
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/patterns/gender-id/gender-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const genderIdConfig: PatternConfig<
GenderIdPattern,
GenderIdPatternOutput
> = {
displayName: 'Gender Identity',
displayName: 'Gender identity',
iconPath: 'gender-id-icon.svg',
initial: {
label: 'Gender identity',
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/patterns/input/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { type InputPatternOutput, parseUserInput } from './response.js';

export const inputConfig: PatternConfig<InputPattern, InputPatternOutput> = {
displayName: message.patterns.input.displayName,
iconPath: 'shortanswer-icon.svg',
iconPath: 'short-answer-icon.svg',
initial: {
label: message.patterns.input.fieldLabel,
initial: '',
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/patterns/paragraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type ParagraphPattern = Pattern<z.infer<typeof configSchema>>;

export const paragraphConfig: PatternConfig<ParagraphPattern> = {
displayName: 'Paragraph',
iconPath: 'longanswer-icon.svg',
iconPath: 'long-answer-icon.svg',
initial: {
text: 'Paragraph text...',
},
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/src/patterns/phone-number/phone-number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ export const phoneNumberConfig: PatternConfig<
PhoneNumberPattern,
PhoneNumberPatternOutput
> = {
displayName: 'Phone Number',
displayName: 'Phone number',
iconPath: 'phone-icon.svg',
initial: {
label: 'Phone Number',
label: 'Phone number',
required: false,
hint: 'Enter a 10-digit U.S. phone number, e.g., 999-999-9999',
},
Expand Down
6 changes: 3 additions & 3 deletions packages/forms/src/patterns/radio-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ type PatternOutput = z.infer<typeof PatternOutput>;

export const radioGroupConfig: PatternConfig<RadioGroupPattern, PatternOutput> =
{
displayName: 'Radio Buttons',
iconPath: 'singleselect-icon.svg',
displayName: 'Multiple choice',
iconPath: 'radio-options-icon.svg',
initial: {
label: 'Radio group label',
label: 'Multiple choice question label',
options: [
{ id: 'option-1', label: 'Option 1' },
{ id: 'option-2', label: 'Option 2' },
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/src/patterns/repeater/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ interface RepeaterFailure {
type RepeaterResult = RepeaterSuccess | RepeaterFailure;

export const repeaterConfig: PatternConfig<RepeaterPattern> = {
displayName: 'Repeater',
iconPath: 'block-icon.svg',
displayName: 'Repeater question set',
iconPath: 'list-icon.svg',
initial: {
legend: 'Default Heading',
patterns: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export const selectDropdownConfig: PatternConfig<
SelectDropdownPattern,
SelectDropdownPatternOutput
> = {
displayName: 'Select Dropdown',
displayName: 'Dropdown',
iconPath: 'dropdown-icon.svg',
initial: {
label: 'Select-dropdown-label',
label: 'Dropdown-label',
required: false,
options: [
{ value: 'value1', label: 'Option-1' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const createSSNSchema = (data: SocialSecurityNumberPattern['data']) => {
}

if (issues.length > 0) {
let enhancedMessage = 'Social Security Number must ';
let enhancedMessage = 'Social Security number must ';
if (issues.length === 1) {
enhancedMessage += issues[0];
} else if (issues.length === 2) {
Expand Down Expand Up @@ -88,10 +88,10 @@ export const socialSecurityNumberConfig: PatternConfig<
SocialSecurityNumberPattern,
SocialSecurityNumberPatternOutput
> = {
displayName: 'Social Security Number',
displayName: 'Social Security number',
iconPath: 'ssn-icon.svg',
initial: {
label: 'Social Security Number',
label: 'Social Security number',
required: false,
hint: 'For example, 555-11-0000',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/patterns/text-area/text-area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const textAreaConfig: PatternConfig<
TextAreaPatternOutput
> = {
displayName: message.patterns.textarea.displayName,
iconPath: 'longanswer-icon.svg',
iconPath: 'long-answer-icon.svg',
initial: {
label: message.patterns.textarea.fieldLabel,
initial: '',
Expand Down

0 comments on commit 2433592

Please sign in to comment.