@defra/forms-model 3.0.571 → 3.0.573
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.
- package/dist/module/form/form-editor/macros/types.js.map +1 -1
 - package/dist/module/form/form-editor/preview/controller/page-controller.js +0 -21
 - package/dist/module/form/form-editor/preview/controller/page-controller.js.map +1 -1
 - package/dist/module/form/form-editor/types.js.map +1 -1
 - package/dist/types/form/form-editor/macros/types.d.ts +0 -4
 - package/dist/types/form/form-editor/macros/types.d.ts.map +1 -1
 - package/dist/types/form/form-editor/preview/controller/page-controller.d.ts +0 -5
 - package/dist/types/form/form-editor/preview/controller/page-controller.d.ts.map +1 -1
 - package/dist/types/form/form-editor/types.d.ts +3 -0
 - package/dist/types/form/form-editor/types.d.ts.map +1 -1
 - package/package.json +1 -1
 - package/src/form/form-editor/macros/types.ts +0 -4
 - package/src/form/form-editor/preview/controller/page-controller.js +0 -27
 - package/src/form/form-editor/types.ts +3 -0
 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/form/form-editor/macros/types.ts"],"sourcesContent":["import { type ComponentType } from '~/src/components/enums.js'\nimport {\n  type DefaultComponent,\n  type GovukFieldset\n} from '~/src/form/form-editor/preview/types.js'\nimport {\n  type DateItem,\n  type GovukField,\n  type ListItemReadonly\n} from '~/src/form/form-editor/types.js'\n\nexport interface AppPreviewErrorPanelMacroErrorTemplate {\n  advancedSettingsErrors: []\n  baseErrors: { template: unknown; type: string }[]\n}\n\nexport interface AppPreviewErrorPanelMacro {\n  errorTemplates: AppPreviewErrorPanelMacroErrorTemplate\n  fieldDetails: {\n    extraFields: GovukField[]\n    basePageFields: GovukField[]\n  }\n  questionType: ComponentType\n}\n\nexport interface AppPreviewPanelTabsMacro {\n  questionType: ComponentType\n  previewPageUrl: string\n  previewErrorsUrl: string\n  errorTemplates: AppPreviewErrorPanelMacroErrorTemplate\n  extraFields: GovukField[]\n  basePageFields: GovukField[]\n}\n\nexport interface SelectAfterInput {\n  afterInput: { html: string }\n}\nexport interface RadioAndCheckboxAfterInputs {\n  afterInputs: { html: string }\n}\n\n// GDS components - Select uses afterInput, while Radio uses afterInputs\nexport type FormGroupAfterInput = SelectAfterInput | RadioAndCheckboxAfterInputs\n\nexport interface QuestionBaseModel {\n  id?: string\n  name?: string\n  content?: string\n  attributes?: Record<string, string>\n  label?: DefaultComponent\n  hint?: DefaultComponent\n  fieldset?: GovukFieldset\n  readonly items?: ListItemReadonly[] | DateItem[]\n  text?: string\n  formGroup?: FormGroupAfterInput\n  type?: 'text' | 'number' | 'boolean'\n  classes?: string\n  previewClasses?: string\n  prefix?: { text: string }\n  suffix?: { text: string }\n}\n\nexport interface AppPreviewPanelMacro extends AppPreviewPanelTabsMacro {\n  model: QuestionBaseModel\n}\n\nexport interface PagePreviewComponent {\n  model: QuestionBaseModel\n  questionType: ComponentType\n}\n\nexport interface PagePreviewPanelMacro {\n  readonly pageTitle: {\n    text: string\n    classes: string\n  }\n  readonly guidance: {\n    text: string\n    classes: string\n  }\n  readonly components: PagePreviewComponent[]\n  readonly sectionTitle?: {\n    text: string\n    classes: string\n  }\n 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/form/form-editor/macros/types.ts"],"sourcesContent":["import { type ComponentType } from '~/src/components/enums.js'\nimport {\n  type DefaultComponent,\n  type GovukFieldset\n} from '~/src/form/form-editor/preview/types.js'\nimport {\n  type DateItem,\n  type GovukField,\n  type ListItemReadonly\n} from '~/src/form/form-editor/types.js'\n\nexport interface AppPreviewErrorPanelMacroErrorTemplate {\n  advancedSettingsErrors: []\n  baseErrors: { template: unknown; type: string }[]\n}\n\nexport interface AppPreviewErrorPanelMacro {\n  errorTemplates: AppPreviewErrorPanelMacroErrorTemplate\n  fieldDetails: {\n    extraFields: GovukField[]\n    basePageFields: GovukField[]\n  }\n  questionType: ComponentType\n}\n\nexport interface AppPreviewPanelTabsMacro {\n  questionType: ComponentType\n  previewPageUrl: string\n  previewErrorsUrl: string\n  errorTemplates: AppPreviewErrorPanelMacroErrorTemplate\n  extraFields: GovukField[]\n  basePageFields: GovukField[]\n}\n\nexport interface SelectAfterInput {\n  afterInput: { html: string }\n}\nexport interface RadioAndCheckboxAfterInputs {\n  afterInputs: { html: string }\n}\n\n// GDS components - Select uses afterInput, while Radio uses afterInputs\nexport type FormGroupAfterInput = SelectAfterInput | RadioAndCheckboxAfterInputs\n\nexport interface QuestionBaseModel {\n  id?: string\n  name?: string\n  content?: string\n  attributes?: Record<string, string>\n  label?: DefaultComponent\n  hint?: DefaultComponent\n  fieldset?: GovukFieldset\n  readonly items?: ListItemReadonly[] | DateItem[]\n  text?: string\n  formGroup?: FormGroupAfterInput\n  type?: 'text' | 'number' | 'boolean'\n  classes?: string\n  previewClasses?: string\n  prefix?: { text: string }\n  suffix?: { text: string }\n}\n\nexport interface AppPreviewPanelMacro extends AppPreviewPanelTabsMacro {\n  model: QuestionBaseModel\n}\n\nexport interface PagePreviewComponent {\n  model: QuestionBaseModel\n  questionType: ComponentType\n}\n\nexport interface PagePreviewPanelMacro {\n  readonly pageTitle: {\n    text: string\n    classes: string\n  }\n  readonly guidance: {\n    text: string\n    classes: string\n  }\n  readonly components: PagePreviewComponent[]\n  readonly sectionTitle?: {\n    text: string\n    classes: string\n  }\n}\n\nexport interface SummaryRowActionItem {\n  href: string\n  text: string\n  visuallyHiddenText: string\n}\n\nexport interface SummaryRow {\n  key: { text: string }\n  value: { text: string }\n  actions: {\n    items: SummaryRowActionItem[]\n  }\n}\n"],"mappings":"","ignoreList":[]}
         
     | 
| 
         @@ -160,27 +160,6 @@ export class PreviewPageController extends PreviewPageControllerBase { 
     | 
|
| 
       160 
160 
     | 
    
         
             
                }
         
     | 
| 
       161 
161 
     | 
    
         
             
                return undefined;
         
     | 
| 
       162 
162 
     | 
    
         
             
              }
         
     | 
| 
       163 
     | 
    
         
            -
              get repeaterButton() {
         
     | 
| 
       164 
     | 
    
         
            -
                if (this.repeaterButtonText === undefined) {
         
     | 
| 
       165 
     | 
    
         
            -
                  return undefined;
         
     | 
| 
       166 
     | 
    
         
            -
                }
         
     | 
| 
       167 
     | 
    
         
            -
                return {
         
     | 
| 
       168 
     | 
    
         
            -
                  classes: this._isHighlighted(PreviewPageControllerBase.HighlightClass.REPEATER),
         
     | 
| 
       169 
     | 
    
         
            -
                  text: this.repeaterButtonText
         
     | 
| 
       170 
     | 
    
         
            -
                };
         
     | 
| 
       171 
     | 
    
         
            -
              }
         
     | 
| 
       172 
     | 
    
         
            -
              get repeaterButtonText() {
         
     | 
| 
       173 
     | 
    
         
            -
                if (!this._isRepeater) {
         
     | 
| 
       174 
     | 
    
         
            -
                  return undefined;
         
     | 
| 
       175 
     | 
    
         
            -
                }
         
     | 
| 
       176 
     | 
    
         
            -
                if (this._sectionTitle === '') {
         
     | 
| 
       177 
     | 
    
         
            -
                  return '[question set name]';
         
     | 
| 
       178 
     | 
    
         
            -
                }
         
     | 
| 
       179 
     | 
    
         
            -
                const [firstToken, ...rest] = this._sectionTitle;
         
     | 
| 
       180 
     | 
    
         
            -
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
         
     | 
| 
       181 
     | 
    
         
            -
                const restOfStr = rest ? rest.join('') : '';
         
     | 
| 
       182 
     | 
    
         
            -
                return firstToken.toLowerCase() + restOfStr;
         
     | 
| 
       183 
     | 
    
         
            -
              }
         
     | 
| 
       184 
163 
     | 
    
         | 
| 
       185 
164 
     | 
    
         
             
              /**
         
     | 
| 
       186 
165 
     | 
    
         
             
               * Helper method to return the guidance or a new one
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"page-controller.js","names":["PreviewPageControllerBase","mapComponentToPreviewQuestion","Markdown","questionRenderer","render","_questionTemplate","_questionBaseModel","PreviewPageController","PATH","_components","constructor","components","elements","definition","renderer","questions","map","firstQuestion","shift","_guidanceComponent","getOrCreateGuidanceComponent","_guidanceText","guidance","constructComponents","_showTitle","addHeading","_sectionTitle","repeatQuestion","_isRepeater","hasRepeater","HighlightClass","#constructComponents","undefined","componentsWithGuidance","_guidanceComponents","component","model","_overrideComponentHeading","questionType","componentType","showLargeTitle","componentsLength","length","_highlighted","_title","trim","question","largeTitle","fieldset","renderInput","legend","classes","label","titleAndFirstTitleSame","_getTitle","_getGuidanceText","repeaterText","_getSectionTitleText","repeaterButton","repeaterButtonText","_isHighlighted","REPEATER","text","firstToken","rest","restOfStr","join","toLowerCase","guidanceComponent","createGuidanceComponent"],"sources":["../../../../../../src/form/form-editor/preview/controller/page-controller.js"],"sourcesContent":["import { PreviewPageControllerBase } from '~/src/form/form-editor/preview/controller/page-controller-base.js'\nimport { mapComponentToPreviewQuestion } from '~/src/form/form-editor/preview/helpers.js'\nimport { Markdown } from '~/src/form/form-editor/preview/markdown.js'\n\n/**\n * @type {QuestionRenderer}\n */\nconst questionRenderer = {\n  /**\n   * @param {string} _questionTemplate\n   * @param {QuestionBaseModel} _questionBaseModel\n   */\n  render(_questionTemplate, _questionBaseModel) {\n    //\n  }\n}\n\nexport class PreviewPageController extends PreviewPageControllerBase {\n  static PATH = PreviewPageControllerBase.PATH\n  /**\n   * @protected\n   * @type {Question[]}\n   */\n  _components = []\n\n  /**\n   * @param {ComponentDef[]} components\n   * @param {PageOverviewElements} elements\n   * @param {FormDefinition} definition\n   * @param {PageRenderer} renderer\n   */\n  constructor(components, elements, definition, renderer) {\n    super(elements, renderer)\n    const questions = components.map(\n      mapComponentToPreviewQuestion(questionRenderer, definition)\n    )\n\n    const firstQuestion = /** @type { Markdown | undefined | Question }  */ (\n      questions.shift()\n    )\n    this._guidanceComponent =\n      PreviewPageController.getOrCreateGuidanceComponent(firstQuestion)\n    this._guidanceText = elements.guidance\n    this._components = this.#constructComponents(firstQuestion, questions)\n    this._showTitle = elements.addHeading\n    this._sectionTitle = elements.repeatQuestion ?? ''\n    this._isRepeater = elements.hasRepeater\n  }\n\n  /**\n   * @type {typeof PreviewPageControllerBase.HighlightClass}\n   */\n  static HighlightClass = PreviewPageControllerBase.HighlightClass\n\n  /**\n   * @param { Question | Markdown | undefined} firstQuestion\n   * @param {Question[]} questions\n   * @returns {Question[]}\n   */\n  #constructComponents(firstQuestion, questions) {\n    return firstQuestion instanceof Markdown || firstQuestion === undefined\n      ? questions\n      : [firstQuestion, ...questions]\n  }\n\n  /**\n   * @returns {PagePreviewComponent[]}\n   */\n  get components() {\n    const componentsWithGuidance = /** @type {Question[]} */ ([\n      ...this._guidanceComponents,\n      ...this._components\n    ])\n\n    return componentsWithGuidance.map((component) => {\n      return {\n        model: this._overrideComponentHeading(component),\n        questionType: component.componentType\n      }\n    })\n  }\n\n  /**\n   * @returns {boolean}\n   */\n  get showLargeTitle() {\n    const componentsLength =\n      this._components.length + this._guidanceComponents.length\n\n    if (componentsLength > 1 || this._highlighted === 'title') {\n      return false\n    }\n    // |_ one component and title not highlighted\n    if (this._title.trim() === this._components[0]?.question?.trim()) {\n      return true\n    }\n    // titles not the same\n\n    return !this._showTitle // add page heading deselected?\n  }\n\n  /**\n   * @param {PreviewComponent} component\n   * @returns {QuestionBaseModel}\n   */\n  _overrideComponentHeading(component) {\n    const largeTitle = this.showLargeTitle\n\n    const fieldset = component.renderInput.fieldset\n      ? {\n          fieldset: {\n            legend: {\n              ...component.renderInput.fieldset.legend,\n              classes: largeTitle\n                ? 'govuk-fieldset__legend--l'\n                : 'govuk-fieldset__legend--m'\n            }\n          }\n        }\n      : {}\n\n    const label = component.renderInput.label\n      ? {\n          label: {\n            ...component.renderInput.label,\n            classes: largeTitle ? 'govuk-label--l' : 'govuk-label--m'\n          }\n        }\n      : {}\n\n    return {\n      ...component.renderInput,\n      ...fieldset,\n      ...label\n    }\n  }\n\n  /**\n   * @returns {boolean}\n   */\n  get titleAndFirstTitleSame() {\n    return (\n      this._components.length > 0 &&\n      this._title.trim() === this._components[0]?.question?.trim() &&\n      this.components.length === 1 &&\n      this._highlighted !== 'title'\n    )\n  }\n\n  /**\n   * @returns {string}\n   * @protected\n   */\n  _getTitle() {\n    if (!this._showTitle || this.titleAndFirstTitleSame) {\n      return ''\n    }\n    return super._getTitle()\n  }\n\n  /**\n   * @returns {string}\n   * @protected\n   */\n  _getGuidanceText() {\n    if (!this._showTitle) {\n      return ''\n    }\n    return super._getGuidanceText()\n  }\n\n  get repeaterText() {\n    if (!this._isRepeater) {\n      return undefined\n    }\n    if (!this._sectionTitle.length) {\n      return 'Question set name'\n    }\n    return this._sectionTitle + ' 1'\n  }\n\n  /**\n   * @returns {string|undefined}\n   * @protected\n   */\n  _getSectionTitleText() {\n    if (this._isRepeater) {\n      return this.repeaterText\n    }\n    return undefined\n  }\n\n  get repeaterButton() {\n    if (this.repeaterButtonText === undefined) {\n      return undefined\n    }\n    return {\n      classes: this._isHighlighted(\n        PreviewPageControllerBase.HighlightClass.REPEATER\n      ),\n      text: this.repeaterButtonText\n    }\n  }\n\n  get repeaterButtonText() {\n    if (!this._isRepeater) {\n      return undefined\n    }\n\n    if (this._sectionTitle === '') {\n      return '[question set name]'\n    }\n\n    const [firstToken, ...rest] = this._sectionTitle\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    const restOfStr = rest ? rest.join('') : ''\n    return firstToken.toLowerCase() + restOfStr\n  }\n\n  /**\n   * Helper method to return the guidance or a new one\n   * @param { Markdown | Question | undefined } guidanceComponent\n   * @returns {Markdown}\n   * @private\n   */\n  static getOrCreateGuidanceComponent(guidanceComponent) {\n    if (guidanceComponent instanceof Markdown) {\n      return guidanceComponent\n    }\n    return PreviewPageControllerBase.createGuidanceComponent()\n  }\n}\n\n/**\n * @import { PageRenderer, PageOverviewElements, QuestionRenderer, QuestionBaseModel } from '~/src/form/form-editor/preview/types.js'\n * @import { Question } from '~/src/form/form-editor/preview/question.js'\n * @import { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\n * @import { FormDefinition } from '~/src/form/form-definition/types.js'\n * @import { ComponentDef } from '~/src/components/types.js'\n * @import { PagePreviewComponent } from '~/src/form/form-editor/macros/types.js'\n */\n"],"mappings":"AAAA,SAASA,yBAAyB;AAClC,SAASC,6BAA6B;AACtC,SAASC,QAAQ;;AAEjB;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG;EACvB;AACF;AACA;AACA;EACEC,MAAMA,CAACC,iBAAiB,EAAEC,kBAAkB,EAAE;IAC5C;EAAA;AAEJ,CAAC;AAED,OAAO,MAAMC,qBAAqB,SAASP,yBAAyB,CAAC;EACnE,OAAOQ,IAAI,GAAGR,yBAAyB,CAACQ,IAAI;EAC5C;AACF;AACA;AACA;EACEC,WAAW,GAAG,EAAE;;EAEhB;AACF;AACA;AACA;AACA;AACA;EACEC,WAAWA,CAACC,UAAU,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAE;IACtD,KAAK,CAACF,QAAQ,EAAEE,QAAQ,CAAC;IACzB,MAAMC,SAAS,GAAGJ,UAAU,CAACK,GAAG,CAC9Bf,6BAA6B,CAACE,gBAAgB,EAAEU,UAAU,CAC5D,CAAC;IAED,MAAMI,aAAa,GAAG;IACpBF,SAAS,CAACG,KAAK,CAAC,CACjB;IACD,IAAI,CAACC,kBAAkB,GACrBZ,qBAAqB,CAACa,4BAA4B,CAACH,aAAa,CAAC;IACnE,IAAI,CAACI,aAAa,GAAGT,QAAQ,CAACU,QAAQ;IACtC,IAAI,CAACb,WAAW,GAAG,IAAI,CAAC,CAACc,mBAAmB,CAACN,aAAa,EAAEF,SAAS,CAAC;IACtE,IAAI,CAACS,UAAU,GAAGZ,QAAQ,CAACa,UAAU;IACrC,IAAI,CAACC,aAAa,GAAGd,QAAQ,CAACe,cAAc,IAAI,EAAE;IAClD,IAAI,CAACC,WAAW,GAAGhB,QAAQ,CAACiB,WAAW;EACzC;;EAEA;AACF;AACA;EACE,OAAOC,cAAc,GAAG9B,yBAAyB,CAAC8B,cAAc;;EAEhE;AACF;AACA;AACA;AACA;EACE,CAACP,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AAa,CAACgB,MAAM,EAAE;MAC9B,OAAO,mBAAmB;IAC5B;IACA,OAAO,IAAI,CAAChB,aAAa,GAAG,IAAI;EAClC;;EAEA;AACF;AACA;AACA;EACE+B,oBAAoBA,CAAA,EAAG;IACrB,IAAI,IAAI,CAAC7B,WAAW,EAAE;MACpB,OAAO,IAAI,CAAC4B,YAAY;IAC1B;IACA,OAAOxB,SAAS;EAClB;EAEA,IAAI0B,cAAcA,CAAA,EAAG;IACnB,IAAI,IAAI,CAACC,kBAAkB,KAAK3B,SAAS,EAAE;MACzC,OAAOA,SAAS;IAClB;IACA,OAAO;MACLmB,OAAO,EAAE,IAAI,CAACS,cAAc,CAC1B5D,yBAAyB,CAAC8B,cAAc,CAAC+B,QAC3C,CAAC;MACDC,IAAI,EAAE,IAAI,CAACH;IACb,CAAC;EACH;EAEA,IAAIA,kBAAkBA,CAAA,EAAG;IACvB,IAAI,CAAC,IAAI,CAAC/B,WAAW,EAAE;MACrB,OAAOI,SAAS;IAClB;IAEA,IAAI,IAAI,CAACN,aAAa,KAAK,EAAE,EAAE;MAC7B,OAAO,qBAAqB;IAC9B;IAEA,MAAM,CAACqC,UAAU,EAAE,GAAGC,IAAI,CAAC,GAAG,IAAI,CAACtC,aAAa;IAChD;IACA,MAAMuC,SAAS,GAAGD,IAAI,GAAGA,IAAI,CAACE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE;IAC3C,OAAOH,UAAU,CAACI,WAAW,CAAC,CAAC,GAAGF,SAAS;EAC7C;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,OAAO7C,4BAA4BA,CAACgD,iBAAiB,EAAE;IACrD,IAAIA,iBAAiB,YAAYlE,QAAQ,EAAE;MACzC,OAAOkE,iBAAiB;IAC1B;IACA,OAAOpE,yBAAyB,CAACqE,uBAAuB,CAAC,CAAC;EAC5D;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
         
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"page-controller.js","names":["PreviewPageControllerBase","mapComponentToPreviewQuestion","Markdown","questionRenderer","render","_questionTemplate","_questionBaseModel","PreviewPageController","PATH","_components","constructor","components","elements","definition","renderer","questions","map","firstQuestion","shift","_guidanceComponent","getOrCreateGuidanceComponent","_guidanceText","guidance","constructComponents","_showTitle","addHeading","_sectionTitle","repeatQuestion","_isRepeater","hasRepeater","HighlightClass","#constructComponents","undefined","componentsWithGuidance","_guidanceComponents","component","model","_overrideComponentHeading","questionType","componentType","showLargeTitle","componentsLength","length","_highlighted","_title","trim","question","largeTitle","fieldset","renderInput","legend","classes","label","titleAndFirstTitleSame","_getTitle","_getGuidanceText","repeaterText","_getSectionTitleText","guidanceComponent","createGuidanceComponent"],"sources":["../../../../../../src/form/form-editor/preview/controller/page-controller.js"],"sourcesContent":["import { PreviewPageControllerBase } from '~/src/form/form-editor/preview/controller/page-controller-base.js'\nimport { mapComponentToPreviewQuestion } from '~/src/form/form-editor/preview/helpers.js'\nimport { Markdown } from '~/src/form/form-editor/preview/markdown.js'\n\n/**\n * @type {QuestionRenderer}\n */\nconst questionRenderer = {\n  /**\n   * @param {string} _questionTemplate\n   * @param {QuestionBaseModel} _questionBaseModel\n   */\n  render(_questionTemplate, _questionBaseModel) {\n    //\n  }\n}\n\nexport class PreviewPageController extends PreviewPageControllerBase {\n  static PATH = PreviewPageControllerBase.PATH\n  /**\n   * @protected\n   * @type {Question[]}\n   */\n  _components = []\n\n  /**\n   * @param {ComponentDef[]} components\n   * @param {PageOverviewElements} elements\n   * @param {FormDefinition} definition\n   * @param {PageRenderer} renderer\n   */\n  constructor(components, elements, definition, renderer) {\n    super(elements, renderer)\n    const questions = components.map(\n      mapComponentToPreviewQuestion(questionRenderer, definition)\n    )\n\n    const firstQuestion = /** @type { Markdown | undefined | Question }  */ (\n      questions.shift()\n    )\n    this._guidanceComponent =\n      PreviewPageController.getOrCreateGuidanceComponent(firstQuestion)\n    this._guidanceText = elements.guidance\n    this._components = this.#constructComponents(firstQuestion, questions)\n    this._showTitle = elements.addHeading\n    this._sectionTitle = elements.repeatQuestion ?? ''\n    this._isRepeater = elements.hasRepeater\n  }\n\n  /**\n   * @type {typeof PreviewPageControllerBase.HighlightClass}\n   */\n  static HighlightClass = PreviewPageControllerBase.HighlightClass\n\n  /**\n   * @param { Question | Markdown | undefined} firstQuestion\n   * @param {Question[]} questions\n   * @returns {Question[]}\n   */\n  #constructComponents(firstQuestion, questions) {\n    return firstQuestion instanceof Markdown || firstQuestion === undefined\n      ? questions\n      : [firstQuestion, ...questions]\n  }\n\n  /**\n   * @returns {PagePreviewComponent[]}\n   */\n  get components() {\n    const componentsWithGuidance = /** @type {Question[]} */ ([\n      ...this._guidanceComponents,\n      ...this._components\n    ])\n\n    return componentsWithGuidance.map((component) => {\n      return {\n        model: this._overrideComponentHeading(component),\n        questionType: component.componentType\n      }\n    })\n  }\n\n  /**\n   * @returns {boolean}\n   */\n  get showLargeTitle() {\n    const componentsLength =\n      this._components.length + this._guidanceComponents.length\n\n    if (componentsLength > 1 || this._highlighted === 'title') {\n      return false\n    }\n    // |_ one component and title not highlighted\n    if (this._title.trim() === this._components[0]?.question?.trim()) {\n      return true\n    }\n    // titles not the same\n\n    return !this._showTitle // add page heading deselected?\n  }\n\n  /**\n   * @param {PreviewComponent} component\n   * @returns {QuestionBaseModel}\n   */\n  _overrideComponentHeading(component) {\n    const largeTitle = this.showLargeTitle\n\n    const fieldset = component.renderInput.fieldset\n      ? {\n          fieldset: {\n            legend: {\n              ...component.renderInput.fieldset.legend,\n              classes: largeTitle\n                ? 'govuk-fieldset__legend--l'\n                : 'govuk-fieldset__legend--m'\n            }\n          }\n        }\n      : {}\n\n    const label = component.renderInput.label\n      ? {\n          label: {\n            ...component.renderInput.label,\n            classes: largeTitle ? 'govuk-label--l' : 'govuk-label--m'\n          }\n        }\n      : {}\n\n    return {\n      ...component.renderInput,\n      ...fieldset,\n      ...label\n    }\n  }\n\n  /**\n   * @returns {boolean}\n   */\n  get titleAndFirstTitleSame() {\n    return (\n      this._components.length > 0 &&\n      this._title.trim() === this._components[0]?.question?.trim() &&\n      this.components.length === 1 &&\n      this._highlighted !== 'title'\n    )\n  }\n\n  /**\n   * @returns {string}\n   * @protected\n   */\n  _getTitle() {\n    if (!this._showTitle || this.titleAndFirstTitleSame) {\n      return ''\n    }\n    return super._getTitle()\n  }\n\n  /**\n   * @returns {string}\n   * @protected\n   */\n  _getGuidanceText() {\n    if (!this._showTitle) {\n      return ''\n    }\n    return super._getGuidanceText()\n  }\n\n  get repeaterText() {\n    if (!this._isRepeater) {\n      return undefined\n    }\n    if (!this._sectionTitle.length) {\n      return 'Question set name'\n    }\n    return this._sectionTitle + ' 1'\n  }\n\n  /**\n   * @returns {string|undefined}\n   * @protected\n   */\n  _getSectionTitleText() {\n    if (this._isRepeater) {\n      return this.repeaterText\n    }\n    return undefined\n  }\n\n  /**\n   * Helper method to return the guidance or a new one\n   * @param { Markdown | Question | undefined } guidanceComponent\n   * @returns {Markdown}\n   * @private\n   */\n  static getOrCreateGuidanceComponent(guidanceComponent) {\n    if (guidanceComponent instanceof Markdown) {\n      return guidanceComponent\n    }\n    return PreviewPageControllerBase.createGuidanceComponent()\n  }\n}\n\n/**\n * @import { PageRenderer, PageOverviewElements, QuestionRenderer, QuestionBaseModel } from '~/src/form/form-editor/preview/types.js'\n * @import { Question } from '~/src/form/form-editor/preview/question.js'\n * @import { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\n * @import { FormDefinition } from '~/src/form/form-definition/types.js'\n * @import { ComponentDef } from '~/src/components/types.js'\n * @import { PagePreviewComponent } from '~/src/form/form-editor/macros/types.js'\n */\n"],"mappings":"AAAA,SAASA,yBAAyB;AAClC,SAASC,6BAA6B;AACtC,SAASC,QAAQ;;AAEjB;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG;EACvB;AACF;AACA;AACA;EACEC,MAAMA,CAACC,iBAAiB,EAAEC,kBAAkB,EAAE;IAC5C;EAAA;AAEJ,CAAC;AA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ACA;EACE,OAAOZ,4BAA4BA,CAACsC,iBAAiB,EAAE;IACrD,IAAIA,iBAAiB,YAAYxD,QAAQ,EAAE;MACzC,OAAOwD,iBAAiB;IAC1B;IACA,OAAO1D,yBAAyB,CAAC2D,uBAAuB,CAAC,CAAC;EAC5D;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-editor/types.ts"],"sourcesContent":["import { type ComponentType } from '~/src/components/enums.js'\nimport { type ComponentDef } from '~/src/components/types.js'\nimport { type DateDirections, type DateUnits } from '~/src/conditions/enums.js'\nimport {\n  type ConditionWrapperV2,\n  type Item\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Interface for `FormEditor` Joi schema\n */\nexport interface FormEditor {\n  /**\n   * The type of the page\n   */\n  pageType: string\n\n  /**\n   * The type of the question\n   */\n  questionType: string | undefined\n\n  /**\n   * The sub-type of written answer\n   */\n  writtenAnswerSub: string\n\n  /**\n   * The sub-type of date\n   */\n  dateSub: string\n\n  /**\n   * The sub-type of location\n   */\n  locationSub: string\n\n  /**\n   * The sub-type of lists\n   */\n  listSub: string\n\n  /**\n   * The name of the question (unique id)\n   */\n  name: string\n\n  /**\n   * The text of the question\n   */\n  question: string\n\n  /**\n   * The hint text of the question\n   */\n  hintText: string\n\n  /**\n   * Denotes if the question is optional\n   */\n  questionOptional: string\n\n  /**\n   * The short description of the question\n   */\n  shortDescription: string\n\n  /**\n   * The value of checkbox to reveal instruction text field\n   */\n  giveInstructions: string\n\n  /**\n   * The instruction text for location components (optional)\n   */\n  instructionText: string\n\n  /**\n   * The value of checkbox to reveal heading and guidance section\n   */\n  pageHeadingAndGuidance: string\n\n  /**\n   * The page heading\n   */\n  pageHeading: string\n\n  /**\n   * The page guidance text\n   */\n  guidanceText: string\n\n  /**\n   * The value of checkbox to reveal repeater section\n   */\n  repeater: string\n\n  /**\n   * The maximum number of repeater items\n   */\n  minItems: number\n\n  /**\n   * The minimum number of repeater items\n   */\n  maxItems: number\n\n  /**\n   * The repeater question set name\n   */\n  questionSetName: string\n\n  /**\n   * The value of radio to reveal declaration text field\n   */\n  needDeclaration: string\n\n  /**\n   * The check answers declaration text\n   */\n  declarationText: string\n\n  /**\n   * The min length a field can have\n   */\n  minLength: string\n\n  /**\n   * The max length a field can have\n   */\n  maxLength: string\n\n  /**\n   * The regex value of a field\n   */\n  regex: string\n\n  /**\n   * The number of rows of a textarea\n   */\n  rows: string\n\n  /**\n   * The classes to be applied to a field\n   */\n  classes: string\n\n  /**\n   * The prefix to be applied to a field\n   */\n  prefix: string\n\n  /**\n   * The suffix to be applied to a field\n   */\n  suffix: string\n\n  /**\n   * The decimal precision of a number field\n   */\n  precision: string\n\n  /**\n   * The lowest number allowed in a field\n   */\n  min: string\n\n  /**\n   * The highest number allowed in a field\n   */\n  max: string\n\n  /**\n   * The maximum days in the future to allow for a date\n   */\n  maxFuture: string\n\n  /**\n   * The maximum days in the past to allow for a date\n   */\n  maxPast: string\n\n  /**\n   * The exact number of files to upload\n   */\n  exactFiles: string\n\n  /**\n   * The minimum number of files to upload\n   */\n  minFiles: string\n\n  /**\n   * The maximum number of files to upload\n   */\n  maxFiles: string\n\n  /**\n   * The type of files for upload\n   */\n  fileTypes: string[]\n\n  /**\n   * The types of document files for upload\n   */\n  documentTypes: string[]\n\n  /**\n   * The types of image files for upload\n   */\n  imageTypes: string[]\n\n  /**\n   * The types of tabular data files for upload\n   */\n  tabularDataTypes: string[]\n\n  /**\n   * The action required from within a sub-section\n   */\n  enhancedAction: string\n\n  /**\n   * Placeholder for inserted section to handle adding/editing radios or checkboxes\n   */\n  radiosOrCheckboxes: string\n\n  /**\n   * The unique id of the radio item\n   */\n  radioId: string\n\n  /**\n   * The display text of the radio item\n   */\n  radioText?: string\n\n  /**\n   * The hint of the radio item\n   */\n  radioHint?: string\n\n  /**\n   * The value of the radio item\n   */\n  radioValue?: string\n\n  /**\n   * The list name to be applied to a field (if applicable)\n   */\n  list: string\n\n  /**\n   * List items in JSON format, such as for radios ro checkboxes\n   */\n  listItemsData: string\n\n  /**\n   * An array of options for autocomplete\n   */\n  autoCompleteOptions: Item[]\n\n  /**\n   * Set to 'true' is Javascript is enabled\n   */\n  jsEnabled: string\n\n  /**\n   * List item id for conditions\n   */\n  itemId: string\n\n  /**\n   * Relative date period for conditions\n   */\n  period: string\n\n  /**\n   * Relative date unit for conditions\n   */\n  unit: DateUnits\n\n  /**\n   * Relative date direction for conditions\n   */\n  direction: DateDirections\n\n  /**\n   * Denotes if page is an Exit Page\n   */\n  exitPage: boolean\n\n  /**\n   * Denotes if the UK address question supports postcode lookup\n   */\n  usePostcodeLookup: string\n}\n\nexport type FormEditorInputPage = Pick<\n  FormEditor,\n  | 'pageType'\n  | 'questionType'\n  | 'writtenAnswerSub'\n  | 'dateSub'\n  | 'locationSub'\n  | 'listSub'\n>\n\nexport type FormEditorInputCheckAnswersSettings = Pick<\n  FormEditor,\n  'needDeclaration' | 'declarationText'\n>\n\nexport type FormEditorInputQuestion = Pick<\n  FormEditor,\n  | 'questionType'\n  | 'name'\n  | 'question'\n  | 'shortDescription'\n  | 'hintText'\n  | 'questionOptional'\n  | 'minLength'\n  | 'maxLength'\n  | 'regex'\n  | 'rows'\n  | 'classes'\n  | 'prefix'\n  | 'suffix'\n  | 'precision'\n  | 'min'\n  | 'max'\n  | 'maxFuture'\n  | 'maxPast'\n  | 'exactFiles'\n  | 'minFiles'\n  | 'maxFiles'\n  | 'fileTypes'\n  | 'documentTypes'\n  | 'imageTypes'\n  | 'tabularDataTypes'\n  | 'autoCompleteOptions'\n  | 'enhancedAction'\n  | 'radioId'\n  | 'radioText'\n  | 'radioHint'\n  | 'radioValue'\n  | 'list'\n  | 'listItemsData'\n  | 'jsEnabled'\n  | 'usePostcodeLookup'\n  | 'giveInstructions'\n  | 'instructionText'\n>\n\nexport type FormEditorInputPageSettings = Pick<\n  FormEditor,\n  | 'pageHeadingAndGuidance'\n  | 'pageHeading'\n  | 'guidanceText'\n  | 'repeater'\n  | 'minItems'\n  | 'maxItems'\n  | 'questionSetName'\n  | 'exitPage'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n  FormEditor,\n  'pageHeading' | 'guidanceText' | 'exitPage'\n>\n\nexport type FormEditorInputQuestionDetails = Pick<\n  FormEditorInputQuestion,\n  | 'question'\n  | 'hintText'\n  | 'shortDescription'\n  | 'questionOptional'\n  | 'questionType'\n  | 'fileTypes'\n  | 'documentTypes'\n  | 'imageTypes'\n  | 'tabularDataTypes'\n  | 'autoCompleteOptions'\n  | 'enhancedAction'\n  | 'radioId'\n  | 'radioText'\n  | 'radioHint'\n  | 'radioValue'\n  | 'listItemsData'\n  | 'jsEnabled'\n>\n\ntype ListValue = string | boolean | number\n\nexport interface ListItem {\n  id?: string\n  text?: string\n  hint?: {\n    text: string\n  }\n  value?: ListValue\n}\n\nexport interface ListLabel {\n  text: string\n  classes: string\n}\n\nexport interface ListElement extends ListItem {\n  readonly id: string\n  text: string\n  value: ListValue\n  label?: ListLabel\n}\n\nexport interface ReadonlyHint {\n  readonly text: string\n}\n\nexport interface ListItemReadonly extends ListElement {\n  readonly text: string\n  readonly hint?: ReadonlyHint\n  readonly value: ListValue\n  readonly label?: ListLabel\n}\n\nexport interface DateItem {\n  name: string\n  classes: string\n}\n\nexport interface ListConflict {\n  conflictItem: {\n    id: string\n    text: string\n  }\n  originalItem?: {\n    id: string\n    text: string\n  }\n  conditionNames: string[]\n  linkableItems: {\n    id?: string\n    text: string\n    value: string | number | boolean\n  }[]\n  closestMatch?: string | number | boolean\n}\n\nexport interface QuestionSessionState {\n  questionType?: ComponentType\n  questionDetails?: Partial<ComponentDef>\n  editRow?: {\n    radioId?: string\n    radioText?: string\n    radioHint?: string\n    radioValue?: ListValue\n    expanded?: boolean\n  }\n  listItems?: ListItem[]\n  isReordering?: boolean\n  lastMovedId?: string\n  lastMoveDirection?: string\n  listConflicts?: ListConflict[]\n}\n\nexport interface ConditionSessionState {\n  id?: string\n  stateId?: string\n  conditionWrapper?: ConditionWrapperV2\n}\n\nexport interface ConditionDetails {\n  pageCondition: string | undefined\n  pageConditionDetails: ConditionWrapperV2 | undefined\n  pageConditionPresentationString: string | null\n}\n\nexport interface GovukFieldItem {\n  text?: string\n  value?: string\n  checked?: boolean\n  hint?: { text?: string; html?: string; classes?: string }\n}\n\nexport interface GovukSummaryListRow {\n  key?: {\n    text?: string\n    classes?: string\n  }\n  value?: {\n    text?: string\n    html?: string\n    classes?: string\n  }\n}\n\nexport interface GovukField {\n  id?: string\n  name?: string\n  idPrefix?: string\n  fieldset?: {\n    legend?: { text?: string; isPageHeading?: boolean; classes?: string }\n  }\n  value?: string | boolean | number | string[] | Item[]\n  classes?: string\n  label?: {\n    text?: string\n    html?: string\n    classes?: string\n    isPageHeading?: boolean\n  }\n  hint?: { text?: string; html?: string; classes?: string }\n  items?: GovukFieldItem[]\n  rows?: number\n  type?: string\n  customTemplate?: string\n}\n\nexport type GovukFieldQuestionOptional = Omit<GovukField, 'name' | 'items'> & {\n  name: 'questionOptional'\n  items: [\n    {\n      text?: string\n      value?: string\n      checked: boolean\n    }\n  ]\n}\n\nexport type GovukFieldUsePostcodeLookup = Omit<GovukField, 'name' | 'items'> & {\n  name: 'usePostcodeLookup'\n  items: [\n    {\n      text?: string\n      value?: string\n      checked: boolean\n    }\n  ]\n}\n\nexport type GovukStringField = Omit<GovukField, 'value'> & { value: string }\n\nexport interface FormEditorGovukField {\n  question?: GovukField\n  hintText?: GovukField\n  instructionText?: GovukField\n  questionOptional?: GovukField\n  shortDescription?: GovukField\n  fileTypes?: GovukField\n  documentTypes?: GovukField\n  imageTypes?: GovukField\n  tabularDataTypes?: GovukField\n  radiosOrCheckboxes?: GovukField\n  autoCompleteOptions?: GovukField\n  usePostcodeLookup?: GovukField\n  errorMessage?: { text: string }\n}\n\nexport type FormEditorGovukFieldBase = Omit<\n  FormEditorGovukField,\n  'errorMessage'\n>\n\nexport type FormEditorGovukFieldBaseKeys = keyof FormEditorGovukFieldBase\n\nexport interface FormEditorCheckbox {\n  text?: string\n  hint?: {\n    text?: string\n  }\n  value?: string\n  divider?: {\n    text?: string\n    hint?: string\n    value?: string\n  }\n}\n\nexport type AdvancedFieldMappingsType = Record<\n  ComponentType,\n  Record<string, string>\n>\n\nexport type HTMLElementOrNull = HTMLElement | null\n\nexport type HTMLInputElementOrNull = HTMLInputElement | null\n\nexport interface ErrorPreviewFieldMappingDef {\n  min?: { fieldName: string; placeholder: string }\n  max?: { fieldName: string; placeholder: string }\n}\n"],"mappings":"","ignoreList":[]}
         
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-editor/types.ts"],"sourcesContent":["import { type ComponentType } from '~/src/components/enums.js'\nimport { type ComponentDef } from '~/src/components/types.js'\nimport { type DateDirections, type DateUnits } from '~/src/conditions/enums.js'\nimport {\n  type ConditionWrapperV2,\n  type Item\n} from '~/src/form/form-definition/types.js'\n\n/**\n * Interface for `FormEditor` Joi schema\n */\nexport interface FormEditor {\n  /**\n   * The type of the page\n   */\n  pageType: string\n\n  /**\n   * The type of the question\n   */\n  questionType: string | undefined\n\n  /**\n   * The sub-type of written answer\n   */\n  writtenAnswerSub: string\n\n  /**\n   * The sub-type of date\n   */\n  dateSub: string\n\n  /**\n   * The sub-type of location\n   */\n  locationSub: string\n\n  /**\n   * The sub-type of lists\n   */\n  listSub: string\n\n  /**\n   * The name of the question (unique id)\n   */\n  name: string\n\n  /**\n   * The text of the question\n   */\n  question: string\n\n  /**\n   * The hint text of the question\n   */\n  hintText: string\n\n  /**\n   * Denotes if the question is optional\n   */\n  questionOptional: string\n\n  /**\n   * The short description of the question\n   */\n  shortDescription: string\n\n  /**\n   * The value of checkbox to reveal instruction text field\n   */\n  giveInstructions: string\n\n  /**\n   * The instruction text for location components (optional)\n   */\n  instructionText: string\n\n  /**\n   * The value of checkbox to reveal heading and guidance section\n   */\n  pageHeadingAndGuidance: string\n\n  /**\n   * The page heading\n   */\n  pageHeading: string\n\n  /**\n   * The page guidance text\n   */\n  guidanceText: string\n\n  /**\n   * The value of checkbox to reveal repeater section\n   */\n  repeater: string\n\n  /**\n   * The maximum number of repeater items\n   */\n  minItems: number\n\n  /**\n   * The minimum number of repeater items\n   */\n  maxItems: number\n\n  /**\n   * The repeater question set name\n   */\n  questionSetName: string\n\n  /**\n   * The value of radio to reveal declaration text field\n   */\n  needDeclaration: string\n\n  /**\n   * The check answers declaration text\n   */\n  declarationText: string\n\n  /**\n   * The min length a field can have\n   */\n  minLength: string\n\n  /**\n   * The max length a field can have\n   */\n  maxLength: string\n\n  /**\n   * The regex value of a field\n   */\n  regex: string\n\n  /**\n   * The number of rows of a textarea\n   */\n  rows: string\n\n  /**\n   * The classes to be applied to a field\n   */\n  classes: string\n\n  /**\n   * The prefix to be applied to a field\n   */\n  prefix: string\n\n  /**\n   * The suffix to be applied to a field\n   */\n  suffix: string\n\n  /**\n   * The decimal precision of a number field\n   */\n  precision: string\n\n  /**\n   * The lowest number allowed in a field\n   */\n  min: string\n\n  /**\n   * The highest number allowed in a field\n   */\n  max: string\n\n  /**\n   * The maximum days in the future to allow for a date\n   */\n  maxFuture: string\n\n  /**\n   * The maximum days in the past to allow for a date\n   */\n  maxPast: string\n\n  /**\n   * The exact number of files to upload\n   */\n  exactFiles: string\n\n  /**\n   * The minimum number of files to upload\n   */\n  minFiles: string\n\n  /**\n   * The maximum number of files to upload\n   */\n  maxFiles: string\n\n  /**\n   * The type of files for upload\n   */\n  fileTypes: string[]\n\n  /**\n   * The types of document files for upload\n   */\n  documentTypes: string[]\n\n  /**\n   * The types of image files for upload\n   */\n  imageTypes: string[]\n\n  /**\n   * The types of tabular data files for upload\n   */\n  tabularDataTypes: string[]\n\n  /**\n   * The action required from within a sub-section\n   */\n  enhancedAction: string\n\n  /**\n   * Placeholder for inserted section to handle adding/editing radios or checkboxes\n   */\n  radiosOrCheckboxes: string\n\n  /**\n   * The unique id of the radio item\n   */\n  radioId: string\n\n  /**\n   * The display text of the radio item\n   */\n  radioText?: string\n\n  /**\n   * The hint of the radio item\n   */\n  radioHint?: string\n\n  /**\n   * The value of the radio item\n   */\n  radioValue?: string\n\n  /**\n   * The list name to be applied to a field (if applicable)\n   */\n  list: string\n\n  /**\n   * List items in JSON format, such as for radios ro checkboxes\n   */\n  listItemsData: string\n\n  /**\n   * An array of options for autocomplete\n   */\n  autoCompleteOptions: Item[]\n\n  /**\n   * Set to 'true' is Javascript is enabled\n   */\n  jsEnabled: string\n\n  /**\n   * List item id for conditions\n   */\n  itemId: string\n\n  /**\n   * Relative date period for conditions\n   */\n  period: string\n\n  /**\n   * Relative date unit for conditions\n   */\n  unit: DateUnits\n\n  /**\n   * Relative date direction for conditions\n   */\n  direction: DateDirections\n\n  /**\n   * Denotes if page is an Exit Page\n   */\n  exitPage: boolean\n\n  /**\n   * Denotes if the UK address question supports postcode lookup\n   */\n  usePostcodeLookup: string\n}\n\nexport type FormEditorInputPage = Pick<\n  FormEditor,\n  | 'pageType'\n  | 'questionType'\n  | 'writtenAnswerSub'\n  | 'dateSub'\n  | 'locationSub'\n  | 'listSub'\n>\n\nexport type FormEditorInputCheckAnswersSettings = Pick<\n  FormEditor,\n  'needDeclaration' | 'declarationText'\n>\n\nexport type FormEditorInputQuestion = Pick<\n  FormEditor,\n  | 'questionType'\n  | 'name'\n  | 'question'\n  | 'shortDescription'\n  | 'hintText'\n  | 'questionOptional'\n  | 'minLength'\n  | 'maxLength'\n  | 'regex'\n  | 'rows'\n  | 'classes'\n  | 'prefix'\n  | 'suffix'\n  | 'precision'\n  | 'min'\n  | 'max'\n  | 'maxFuture'\n  | 'maxPast'\n  | 'exactFiles'\n  | 'minFiles'\n  | 'maxFiles'\n  | 'fileTypes'\n  | 'documentTypes'\n  | 'imageTypes'\n  | 'tabularDataTypes'\n  | 'autoCompleteOptions'\n  | 'enhancedAction'\n  | 'radioId'\n  | 'radioText'\n  | 'radioHint'\n  | 'radioValue'\n  | 'list'\n  | 'listItemsData'\n  | 'jsEnabled'\n  | 'usePostcodeLookup'\n  | 'giveInstructions'\n  | 'instructionText'\n>\n\nexport type FormEditorInputPageSettings = Pick<\n  FormEditor,\n  | 'pageHeadingAndGuidance'\n  | 'pageHeading'\n  | 'guidanceText'\n  | 'repeater'\n  | 'minItems'\n  | 'maxItems'\n  | 'questionSetName'\n  | 'exitPage'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n  FormEditor,\n  'pageHeading' | 'guidanceText' | 'exitPage'\n>\n\nexport type FormEditorInputQuestionDetails = Pick<\n  FormEditorInputQuestion,\n  | 'question'\n  | 'hintText'\n  | 'shortDescription'\n  | 'questionOptional'\n  | 'questionType'\n  | 'fileTypes'\n  | 'documentTypes'\n  | 'imageTypes'\n  | 'tabularDataTypes'\n  | 'autoCompleteOptions'\n  | 'enhancedAction'\n  | 'radioId'\n  | 'radioText'\n  | 'radioHint'\n  | 'radioValue'\n  | 'listItemsData'\n  | 'jsEnabled'\n>\n\ntype ListValue = string | boolean | number\n\nexport interface ListItem {\n  id?: string\n  text?: string\n  hint?: {\n    text: string\n  }\n  value?: ListValue\n}\n\nexport interface ListLabel {\n  text: string\n  classes: string\n}\n\nexport interface ListElement extends ListItem {\n  readonly id: string\n  text: string\n  value: ListValue\n  label?: ListLabel\n}\n\nexport interface ReadonlyHint {\n  readonly text: string\n}\n\nexport interface ListItemReadonly extends ListElement {\n  readonly text: string\n  readonly hint?: ReadonlyHint\n  readonly value: ListValue\n  readonly label?: ListLabel\n}\n\nexport interface DateItem {\n  name: string\n  classes: string\n}\n\nexport interface ListConflict {\n  conflictItem: {\n    id: string\n    text: string\n  }\n  originalItem?: {\n    id: string\n    text: string\n  }\n  conditionNames: string[]\n  linkableItems: {\n    id?: string\n    text: string\n    value: string | number | boolean\n  }[]\n  closestMatch?: string | number | boolean\n}\n\nexport interface QuestionSessionState {\n  questionType?: ComponentType\n  questionDetails?: Partial<ComponentDef>\n  editRow?: {\n    radioId?: string\n    radioText?: string\n    radioHint?: string\n    radioValue?: ListValue\n    expanded?: boolean\n  }\n  listItems?: ListItem[]\n  isReordering?: boolean\n  lastMovedId?: string\n  lastMoveDirection?: string\n  listConflicts?: ListConflict[]\n}\n\nexport interface ConditionSessionState {\n  id?: string\n  stateId?: string\n  conditionWrapper?: ConditionWrapperV2\n}\n\nexport interface ConditionDetails {\n  pageCondition: string | undefined\n  pageConditionDetails: ConditionWrapperV2 | undefined\n  pageConditionPresentationString: string | null\n}\n\nexport interface GovukFieldItem {\n  text?: string\n  value?: string\n  checked?: boolean\n  hint?: { text?: string; html?: string; classes?: string }\n}\n\nexport interface GovukSummaryListRow {\n  key?: {\n    text?: string\n    classes?: string\n  }\n  value?: {\n    text?: string\n    html?: string\n    classes?: string\n  }\n}\n\nexport interface GovukField {\n  id?: string\n  name?: string\n  idPrefix?: string\n  fieldset?: {\n    legend?: { text?: string; isPageHeading?: boolean; classes?: string }\n  }\n  value?: string | boolean | number | string[] | Item[]\n  classes?: string\n  label?: {\n    text?: string\n    html?: string\n    classes?: string\n    isPageHeading?: boolean\n  }\n  hint?: { text?: string; html?: string; classes?: string }\n  items?: GovukFieldItem[]\n  rows?: number\n  type?: string\n  customTemplate?: string\n  formGroup?: {\n    classes?: string\n  }\n}\n\nexport type GovukFieldQuestionOptional = Omit<GovukField, 'name' | 'items'> & {\n  name: 'questionOptional'\n  items: [\n    {\n      text?: string\n      value?: string\n      checked: boolean\n    }\n  ]\n}\n\nexport type GovukFieldUsePostcodeLookup = Omit<GovukField, 'name' | 'items'> & {\n  name: 'usePostcodeLookup'\n  items: [\n    {\n      text?: string\n      value?: string\n      checked: boolean\n    }\n  ]\n}\n\nexport type GovukStringField = Omit<GovukField, 'value'> & { value: string }\n\nexport interface FormEditorGovukField {\n  question?: GovukField\n  hintText?: GovukField\n  instructionText?: GovukField\n  questionOptional?: GovukField\n  shortDescription?: GovukField\n  fileTypes?: GovukField\n  documentTypes?: GovukField\n  imageTypes?: GovukField\n  tabularDataTypes?: GovukField\n  radiosOrCheckboxes?: GovukField\n  autoCompleteOptions?: GovukField\n  usePostcodeLookup?: GovukField\n  errorMessage?: { text: string }\n}\n\nexport type FormEditorGovukFieldBase = Omit<\n  FormEditorGovukField,\n  'errorMessage'\n>\n\nexport type FormEditorGovukFieldBaseKeys = keyof FormEditorGovukFieldBase\n\nexport interface FormEditorCheckbox {\n  text?: string\n  hint?: {\n    text?: string\n  }\n  value?: string\n  divider?: {\n    text?: string\n    hint?: string\n    value?: string\n  }\n}\n\nexport type AdvancedFieldMappingsType = Record<\n  ComponentType,\n  Record<string, string>\n>\n\nexport type HTMLElementOrNull = HTMLElement | null\n\nexport type HTMLInputElementOrNull = HTMLInputElement | null\n\nexport interface ErrorPreviewFieldMappingDef {\n  min?: { fieldName: string; placeholder: string }\n  max?: { fieldName: string; placeholder: string }\n}\n"],"mappings":"","ignoreList":[]}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/macros/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAA;AAExC,MAAM,WAAW,sCAAsC;IACrD,sBAAsB,EAAE,EAAE,CAAA;IAC1B,UAAU,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAClD;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,sCAAsC,CAAA;IACtD,YAAY,EAAE;QACZ,WAAW,EAAE,UAAU,EAAE,CAAA;Q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zB,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1B;AAED,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IACpE,KAAK,EAAE,iBAAiB,CAAA;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,iBAAiB,CAAA;IACxB,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,EAAE;QAClB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,QAAQ,CAAC,QAAQ,EAAE;QACjB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,QAAQ,CAAC,UAAU,EAAE,oBAAoB,EAAE,CAAA;IAC3C,QAAQ,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/macros/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAA;AAExC,MAAM,WAAW,sCAAsC;IACrD,sBAAsB,EAAE,EAAE,CAAA;IAC1B,UAAU,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAClD;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,sCAAsC,CAAA;IACtD,YAAY,EAAE;QACZ,WAAW,EAAE,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AAA;KAAE,CAAA;IACzB,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1B;AAED,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IACpE,KAAK,EAAE,iBAAiB,CAAA;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,iBAAiB,CAAA;IACxB,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,EAAE;QAClB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,QAAQ,CAAC,QAAQ,EAAE;QACjB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,QAAQ,CAAC,UAAU,EAAE,oBAAoB,EAAE,CAAA;IAC3C,QAAQ,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACrB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB,OAAO,EAAE;QACP,KAAK,EAAE,oBAAoB,EAAE,CAAA;KAC9B,CAAA;CACF"}
         
     | 
| 
         @@ -27,11 +27,6 @@ export class PreviewPageController extends PreviewPageControllerBase { 
     | 
|
| 
       27 
27 
     | 
    
         
             
                 */
         
     | 
| 
       28 
28 
     | 
    
         
             
                get titleAndFirstTitleSame(): boolean;
         
     | 
| 
       29 
29 
     | 
    
         
             
                get repeaterText(): string | undefined;
         
     | 
| 
       30 
     | 
    
         
            -
                get repeaterButton(): {
         
     | 
| 
       31 
     | 
    
         
            -
                    classes: string;
         
     | 
| 
       32 
     | 
    
         
            -
                    text: string;
         
     | 
| 
       33 
     | 
    
         
            -
                } | undefined;
         
     | 
| 
       34 
     | 
    
         
            -
                get repeaterButtonText(): string | undefined;
         
     | 
| 
       35 
30 
     | 
    
         
             
                #private;
         
     | 
| 
       36 
31 
     | 
    
         
             
            }
         
     | 
| 
       37 
32 
     | 
    
         
             
            import { PreviewPageControllerBase } from '../../../../form/form-editor/preview/controller/page-controller-base.js';
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"page-controller.d.ts","sourceRoot":"","sources":["../../../../../../src/form/form-editor/preview/controller/page-controller.js"],"names":[],"mappings":"AAiBA; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"page-controller.d.ts","sourceRoot":"","sources":["../../../../../../src/form/form-editor/preview/controller/page-controller.js"],"names":[],"mappings":"AAiBA;IA+KE;;;;;OAKG;IACH,4CAKC;IAlLD;;;;;OAKG;IACH,wBALW,YAAY,EAAE,YACd,oBAAoB,cACpB,cAAc,YACd,YAAY,EAkBtB;IAmCD;;OAEG;IACH,sBAFa,OAAO,CAgBnB;IAED;;;OAGG;IACH,qCAHW,gBAAgB,GACd,iBAAiB,CAgC7B;IAED;;OAEG;IACH,8BAFa,OAAO,CASnB;IAwBD,uCAQC;;CAyBF;0CA5MyC,mEAAmE;sCAiNxE,2CAA2C;uCAFY,yCAAyC;kCAIpG,2BAA2B;0CAJgC,yCAAyC;oCAGlG,qCAAqC;kCAHoB,yCAAyC"}
         
     | 
| 
         @@ -365,6 +365,9 @@ export interface GovukField { 
     | 
|
| 
       365 
365 
     | 
    
         
             
                rows?: number;
         
     | 
| 
       366 
366 
     | 
    
         
             
                type?: string;
         
     | 
| 
       367 
367 
     | 
    
         
             
                customTemplate?: string;
         
     | 
| 
      
 368 
     | 
    
         
            +
                formGroup?: {
         
     | 
| 
      
 369 
     | 
    
         
            +
                    classes?: string;
         
     | 
| 
      
 370 
     | 
    
         
            +
                };
         
     | 
| 
       368 
371 
     | 
    
         
             
            }
         
     | 
| 
       369 
372 
     | 
    
         
             
            export type GovukFieldQuestionOptional = Omit<GovukField, 'name' | 'items'> & {
         
     | 
| 
       370 
373 
     | 
    
         
             
                name: 'questionOptional';
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,IAAI,EACV,MAAM,qCAAqC,CAAA;AAE5C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAEhC;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAA;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAA;IAExB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAA;IAExB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAA;IAExB;;OAEG;IACH,eAAe,EA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E;QACT,MAAM,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,aAAa,CAAC,EAAE,OAAO,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KACtE,CAAA;IACD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,EAAE,CAAA;IACrD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,aAAa,CAAC,EAAE,OAAO,CAAA;KACxB,CAAA;IACD,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACzD,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,IAAI,EACV,MAAM,qCAAqC,CAAA;AAE5C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,YAAY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A;IAC9B,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAChC;AAED,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,oBAAoB,EACpB,cAAc,CACf,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,wBAAwB,CAAA;AAEzE,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAC5C,aAAa,EACb,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CACvB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,IAAI,CAAA;AAElD,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,GAAG,IAAI,CAAA;AAE5D,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;IAChD,GAAG,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD"}
         
     | 
    
        package/package.json
    CHANGED
    
    
| 
         @@ -190,33 +190,6 @@ export class PreviewPageController extends PreviewPageControllerBase { 
     | 
|
| 
       190 
190 
     | 
    
         
             
                return undefined
         
     | 
| 
       191 
191 
     | 
    
         
             
              }
         
     | 
| 
       192 
192 
     | 
    
         | 
| 
       193 
     | 
    
         
            -
              get repeaterButton() {
         
     | 
| 
       194 
     | 
    
         
            -
                if (this.repeaterButtonText === undefined) {
         
     | 
| 
       195 
     | 
    
         
            -
                  return undefined
         
     | 
| 
       196 
     | 
    
         
            -
                }
         
     | 
| 
       197 
     | 
    
         
            -
                return {
         
     | 
| 
       198 
     | 
    
         
            -
                  classes: this._isHighlighted(
         
     | 
| 
       199 
     | 
    
         
            -
                    PreviewPageControllerBase.HighlightClass.REPEATER
         
     | 
| 
       200 
     | 
    
         
            -
                  ),
         
     | 
| 
       201 
     | 
    
         
            -
                  text: this.repeaterButtonText
         
     | 
| 
       202 
     | 
    
         
            -
                }
         
     | 
| 
       203 
     | 
    
         
            -
              }
         
     | 
| 
       204 
     | 
    
         
            -
             
     | 
| 
       205 
     | 
    
         
            -
              get repeaterButtonText() {
         
     | 
| 
       206 
     | 
    
         
            -
                if (!this._isRepeater) {
         
     | 
| 
       207 
     | 
    
         
            -
                  return undefined
         
     | 
| 
       208 
     | 
    
         
            -
                }
         
     | 
| 
       209 
     | 
    
         
            -
             
     | 
| 
       210 
     | 
    
         
            -
                if (this._sectionTitle === '') {
         
     | 
| 
       211 
     | 
    
         
            -
                  return '[question set name]'
         
     | 
| 
       212 
     | 
    
         
            -
                }
         
     | 
| 
       213 
     | 
    
         
            -
             
     | 
| 
       214 
     | 
    
         
            -
                const [firstToken, ...rest] = this._sectionTitle
         
     | 
| 
       215 
     | 
    
         
            -
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
         
     | 
| 
       216 
     | 
    
         
            -
                const restOfStr = rest ? rest.join('') : ''
         
     | 
| 
       217 
     | 
    
         
            -
                return firstToken.toLowerCase() + restOfStr
         
     | 
| 
       218 
     | 
    
         
            -
              }
         
     | 
| 
       219 
     | 
    
         
            -
             
     | 
| 
       220 
193 
     | 
    
         
             
              /**
         
     | 
| 
       221 
194 
     | 
    
         
             
               * Helper method to return the guidance or a new one
         
     | 
| 
       222 
195 
     | 
    
         
             
               * @param { Markdown | Question | undefined } guidanceComponent
         
     |