@defra/forms-model 3.0.490 → 3.0.492
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/__stubs__/preview.js +6 -7
- package/dist/module/form/form-editor/__stubs__/preview.js.map +1 -1
- package/dist/module/form/form-editor/preview/component-elements.js +2 -10
- package/dist/module/form/form-editor/preview/component-elements.js.map +1 -1
- package/dist/module/form/form-editor/preview/content.js +2 -3
- package/dist/module/form/form-editor/preview/content.js.map +1 -1
- package/dist/module/form/form-editor/preview/controller/page-controller.js +91 -6
- package/dist/module/form/form-editor/preview/controller/page-controller.js.map +1 -1
- package/dist/module/form/form-editor/preview/helpers.js +5 -6
- package/dist/module/form/form-editor/preview/helpers.js.map +1 -1
- package/dist/module/form/form-editor/preview/list.js +2 -3
- package/dist/module/form/form-editor/preview/list.js.map +1 -1
- package/dist/module/form/form-editor/preview/preview.js +3 -8
- package/dist/module/form/form-editor/preview/preview.js.map +1 -1
- package/dist/module/form/form-editor/preview/question.js +2 -2
- package/dist/module/form/form-editor/preview/question.js.map +1 -1
- package/dist/module/form/form-editor/preview/types.js.map +1 -1
- package/dist/module/form/form-editor/types.js.map +1 -1
- package/dist/module/stubs.js +3 -0
- package/dist/module/stubs.js.map +1 -1
- package/dist/types/form/form-editor/__stubs__/preview.d.ts +4 -3
- package/dist/types/form/form-editor/__stubs__/preview.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/component-elements.d.ts +1 -7
- package/dist/types/form/form-editor/preview/component-elements.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/content.d.ts +1 -2
- package/dist/types/form/form-editor/preview/content.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/controller/page-controller.d.ts +27 -0
- package/dist/types/form/form-editor/preview/controller/page-controller.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/helpers.d.ts +1 -2
- package/dist/types/form/form-editor/preview/helpers.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/list.d.ts +1 -2
- package/dist/types/form/form-editor/preview/list.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/preview.d.ts +4 -5
- package/dist/types/form/form-editor/preview/preview.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/question.d.ts +1 -1
- package/dist/types/form/form-editor/preview/question.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/types.d.ts +13 -4
- package/dist/types/form/form-editor/preview/types.d.ts.map +1 -1
- package/dist/types/form/form-editor/types.d.ts +0 -1
- package/dist/types/form/form-editor/types.d.ts.map +1 -1
- package/dist/types/stubs.d.ts +3 -0
- package/dist/types/stubs.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/form/form-editor/__stubs__/preview.js +6 -14
- package/src/form/form-editor/preview/component-elements.js +2 -10
- package/src/form/form-editor/preview/content.js +2 -3
- package/src/form/form-editor/preview/controller/page-controller.js +109 -10
- package/src/form/form-editor/preview/helpers.js +5 -10
- package/src/form/form-editor/preview/list.js +2 -3
- package/src/form/form-editor/preview/preview.js +3 -11
- package/src/form/form-editor/preview/question.js +2 -2
- package/src/form/form-editor/preview/types.ts +18 -4
- package/src/form/form-editor/types.ts +0 -1
- package/src/stubs.ts +3 -0
@@ -48,7 +48,6 @@ export class PreviewComponent {
|
|
48
48
|
* @type {boolean}
|
49
49
|
* @protected
|
50
50
|
*/
|
51
|
-
_largeTitle = true;
|
52
51
|
|
53
52
|
/**
|
54
53
|
* @param {QuestionElements} htmlElements
|
@@ -57,8 +56,7 @@ export class PreviewComponent {
|
|
57
56
|
constructor(htmlElements, questionRenderer) {
|
58
57
|
const {
|
59
58
|
question,
|
60
|
-
optional
|
61
|
-
largeTitle
|
59
|
+
optional
|
62
60
|
} = htmlElements.values;
|
63
61
|
|
64
62
|
/**
|
@@ -82,7 +80,6 @@ export class PreviewComponent {
|
|
82
80
|
* @protected
|
83
81
|
*/
|
84
82
|
this._questionRenderer = questionRenderer;
|
85
|
-
this._largeTitle = largeTitle;
|
86
83
|
}
|
87
84
|
|
88
85
|
/**
|
@@ -103,10 +100,9 @@ export class PreviewComponent {
|
|
103
100
|
* @type {DefaultComponent}
|
104
101
|
*/
|
105
102
|
get label() {
|
106
|
-
const titleClass = this._largeTitle ? 'govuk-label--l' : 'govuk-label--m';
|
107
103
|
return {
|
108
104
|
text: this.titleText,
|
109
|
-
classes:
|
105
|
+
classes: 'govuk-label--l' + this.getHighlight('question')
|
110
106
|
};
|
111
107
|
}
|
112
108
|
|
@@ -115,11 +111,10 @@ export class PreviewComponent {
|
|
115
111
|
* @type {GovukFieldset}
|
116
112
|
*/
|
117
113
|
get fieldSet() {
|
118
|
-
const titleClass = this._largeTitle ? 'govuk-fieldset__legend--l' : 'govuk-fieldset__legend--m';
|
119
114
|
return {
|
120
115
|
legend: {
|
121
116
|
text: this.titleText,
|
122
|
-
classes:
|
117
|
+
classes: 'govuk-fieldset__legend--l' + this.getHighlight('question')
|
123
118
|
}
|
124
119
|
};
|
125
120
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"preview.js","names":["ComponentType","HIGHLIGHT_CLASS","PreviewComponent","PATH","componentType","Details","_questionTemplate","_highlight","_fieldName","_questionRenderer","_htmlElements","_highlighted","
|
1
|
+
{"version":3,"file":"preview.js","names":["ComponentType","HIGHLIGHT_CLASS","PreviewComponent","PATH","componentType","Details","_questionTemplate","_highlight","_fieldName","_questionRenderer","_htmlElements","_highlighted","constructor","htmlElements","questionRenderer","question","optional","values","_question","_optional","getHighlight","element","titleText","optionalText","label","text","classes","fieldSet","legend","customRenderFields","_renderInput","id","name","renderInput","render","value","highlight","highlightContent","unHighlightContent"],"sources":["../../../../../src/form/form-editor/preview/preview.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { HIGHLIGHT_CLASS } from '~/src/form/form-editor/preview/constants.js'\n\n/**\n * @abstract\n */\nexport class PreviewComponent {\n static PATH = 'preview-components/'\n /**\n * @abstract\n * @type {ComponentType}\n */\n componentType = ComponentType.Details\n /**\n * @abstract\n * @type {string}\n * @protected\n */\n _questionTemplate = ''\n /**\n * @type { string|null }\n * @protected\n */\n _highlight = null\n /**\n * @abstract\n * @type {string}\n * @protected\n */\n _fieldName = ''\n /**\n * @type {QuestionRenderer}\n * @protected\n */\n _questionRenderer\n\n /**\n * @type {QuestionElements}\n * @protected\n */\n _htmlElements\n /**\n * @type {boolean}\n * @protected\n */\n _highlighted = false\n /**\n * @type {boolean}\n * @protected\n */\n\n /**\n * @param {QuestionElements} htmlElements\n * @param {QuestionRenderer} questionRenderer\n */\n constructor(htmlElements, questionRenderer) {\n const { question, optional } = htmlElements.values\n\n /**\n * @type {QuestionElements}\n * @protected\n */\n this._htmlElements = htmlElements\n /**\n * @type {string}\n * @private\n */\n this._question = question\n /**\n * @type {boolean}\n * @private\n */\n this._optional = optional\n /**\n *\n * @type {QuestionRenderer}\n * @protected\n */\n this._questionRenderer = questionRenderer\n }\n\n /**\n * @param {string} element\n * @returns {string}\n * @protected\n */\n getHighlight(element) {\n return this._highlight === element ? ' highlight' : ''\n }\n\n get titleText() {\n const optionalText = this._optional ? ' (optional)' : ''\n return (!this._question ? 'Question' : this._question) + optionalText\n }\n\n /**\n * @protected\n * @type {DefaultComponent}\n */\n get label() {\n return {\n text: this.titleText,\n classes: 'govuk-label--l' + this.getHighlight('question')\n }\n }\n\n /**\n * @protected\n * @type {GovukFieldset}\n */\n get fieldSet() {\n return {\n legend: {\n text: this.titleText,\n classes: 'govuk-fieldset__legend--l' + this.getHighlight('question')\n }\n }\n }\n\n /**\n * @returns {Partial<QuestionBaseModel>}\n */\n get customRenderFields() {\n return {}\n }\n\n /**\n *\n * @returns {QuestionBaseModel}\n * @protected\n */\n _renderInput() {\n return {\n id: this._fieldName,\n name: this._fieldName,\n classes: this._highlighted ? HIGHLIGHT_CLASS : ''\n }\n }\n\n /**\n * @type {QuestionBaseModel}\n */\n get renderInput() {\n return {\n ...this._renderInput(),\n ...this.customRenderFields\n }\n }\n\n render() {\n this._questionRenderer.render(this._questionTemplate, this.renderInput)\n }\n\n /**\n * @type {string}\n */\n get question() {\n return this._question\n }\n\n /**\n * @param {string} value\n */\n set question(value) {\n this._question = value\n this.render()\n }\n\n get optional() {\n return this._optional\n }\n\n /**\n * @param {boolean} value\n */\n set optional(value) {\n this._optional = value\n this.render()\n }\n\n /**\n * @type {string | null}\n */\n get highlight() {\n return this._highlight\n }\n\n /**\n * @param {string | null} value\n */\n set highlight(value) {\n this._highlight = value\n this.render()\n }\n\n /**\n * no render\n */\n highlightContent() {\n this._highlighted = true\n }\n\n /**\n * no render\n */\n unHighlightContent() {\n this._highlighted = false\n }\n}\n\n/**\n * @import { ListenerRow, BaseSettings, QuestionElements, QuestionBaseModel, GovukFieldset, DefaultComponent, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { FormComponentsDef, ContentComponentsDef, ComponentDef } from '~/src/components/types.js'\n * @import { ListElement, ListItemReadonly } from '~/src/form/form-editor/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,eAAe;;AAExB;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,CAAC;EAC5B,OAAOC,IAAI,GAAG,qBAAqB;EACnC;AACF;AACA;AACA;EACEC,aAAa,GAAGJ,aAAa,CAACK,OAAO;EACrC;AACF;AACA;AACA;AACA;EACEC,iBAAiB,GAAG,EAAE;EACtB;AACF;AACA;AACA;EACEC,UAAU,GAAG,IAAI;EACjB;AACF;AACA;AACA;AACA;EACEC,UAAU,GAAG,EAAE;EACf;AACF;AACA;AACA;EACEC,iBAAiB;;EAEjB;AACF;AACA;AACA;EACEC,aAAa;EACb;AACF;AACA;AACA;EACEC,YAAY,GAAG,KAAK;EACpB;AACF;AACA;AACA;;EAEE;AACF;AACA;AACA;EACEC,WAAWA,CAACC,YAAY,EAAEC,gBAAgB,EAAE;IAC1C,MAAM;MAAEC,QAAQ;MAAEC;IAAS,CAAC,GAAGH,YAAY,CAACI,MAAM;;IAElD;AACJ;AACA;AACA;IACI,IAAI,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ACF;AACA;EACE,IAAIgC,WAAWA,CAAA,EAAG;IAChB,OAAO;MACL,GAAG,IAAI,CAACH,YAAY,CAAC,CAAC;MACtB,GAAG,IAAI,CAACD;IACV,CAAC;EACH;EAEAK,MAAMA,CAAA,EAAG;IACP,IAAI,CAACzB,iBAAiB,CAACyB,MAAM,CAAC,IAAI,CAAC5B,iBAAiB,EAAE,IAAI,CAAC2B,WAAW,CAAC;EACzE;;EAEA;AACF;AACA;EACE,IAAIlB,QAAQA,CAAA,EAAG;IACb,OAAO,IAAI,CAACG,SAAS;EACvB;;EAEA;AACF;AACA;EACE,IAAIH,QAAQA,CAACoB,KAAK,EAAE;IAClB,IAAI,CAACjB,SAAS,GAAGiB,KAAK;IACtB,IAAI,CAACD,MAAM,CAAC,CAAC;EACf;EAEA,IAAIlB,QAAQA,CAAA,EAAG;IACb,OAAO,IAAI,CAACG,SAAS;EACvB;;EAEA;AACF;AACA;EACE,IAAIH,QAAQA,CAACmB,KAAK,EAAE;IAClB,IAAI,CAAChB,SAAS,GAAGgB,KAAK;IACtB,IAAI,CAACD,MAAM,CAAC,CAAC;EACf;;EAEA;AACF;AACA;EACE,IAAIE,SAASA,CAAA,EAAG;IACd,OAAO,IAAI,CAAC7B,UAAU;EACxB;;EAEA;AACF;AACA;EACE,IAAI6B,SAASA,CAACD,KAAK,EAAE;IACnB,IAAI,CAAC5B,UAAU,GAAG4B,KAAK;IACvB,IAAI,CAACD,MAAM,CAAC,CAAC;EACf;;EAEA;AACF;AACA;EACEG,gBAAgBA,CAAA,EAAG;IACjB,IAAI,CAAC1B,YAAY,GAAG,IAAI;EAC1B;;EAEA;AACF;AACA;EACE2B,kBAAkBA,CAAA,EAAG;IACnB,IAAI,CAAC3B,YAAY,GAAG,KAAK;EAC3B;AACF;;AAEA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
@@ -14,8 +14,8 @@ export class QuestionComponentElements extends ComponentElements {
|
|
14
14
|
/**
|
15
15
|
* @param {FormComponentsDef} component
|
16
16
|
*/
|
17
|
-
constructor(component
|
18
|
-
super(component
|
17
|
+
constructor(component) {
|
18
|
+
super(component);
|
19
19
|
this._component = component;
|
20
20
|
}
|
21
21
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"question.js","names":["ComponentType","ComponentElements","PreviewComponent","QuestionComponentElements","_component","constructor","component","
|
1
|
+
{"version":3,"file":"question.js","names":["ComponentType","ComponentElements","PreviewComponent","QuestionComponentElements","_component","constructor","component","_getValues","hintText","hint","shortDesc","shortDescription","Question","componentType","TextField","_questionTemplate","PATH","_fieldName","htmlElements","questionRenderer","values","_hintText","text","_highlight","length","classes","getHighlight","_renderInput","label","value","render"],"sources":["../../../../../src/form/form-editor/preview/question.js"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { ComponentElements } from '~/src/form/form-editor/preview/component-elements.js'\nimport { PreviewComponent } from '~/src/form/form-editor/preview/preview.js'\n\n/**\n * @implements {QuestionElements}\n */\nexport class QuestionComponentElements extends ComponentElements {\n /**\n * @type {FormComponentsDef}\n * @protected\n */\n _component\n /**\n * @param {FormComponentsDef} component\n */\n constructor(component) {\n super(component)\n this._component = component\n }\n\n /**\n * @protected\n * @returns {BaseSettings}\n */\n _getValues() {\n return {\n ...super._getValues(),\n hintText: this._component.hint ?? '',\n shortDesc: this._component.shortDescription ?? ''\n }\n }\n}\n\n/**\n * @class Question\n * @classdesc\n * A data object that has access to the underlying data via the QuestionElements object interface\n * and the templating mechanism to render the HTML for the data.\n *\n * It does not have access to the DOM, but has access to QuestionElements.setPreviewHTML to update\n * the HTML. Question classes should only be responsible for data and rendering as are reused in the\n * server side.\n */\nexport class Question extends PreviewComponent {\n /**\n * @type {ComponentType}\n */\n componentType = ComponentType.TextField\n\n /**\n * @type {string}\n * @protected\n */\n _questionTemplate = PreviewComponent.PATH + 'textfield.njk'\n /**\n * @type {string}\n * @protected\n */\n _fieldName = 'inputField'\n\n /**\n * @param {QuestionElements} htmlElements\n * @param {QuestionRenderer} questionRenderer\n */\n constructor(htmlElements, questionRenderer) {\n super(htmlElements, questionRenderer)\n const { hintText } = htmlElements.values\n /**\n * @type {string}\n * @private\n */\n this._hintText = hintText\n }\n\n /**\n * @type {DefaultComponent}\n * @protected\n */\n get hint() {\n const text =\n this._highlight === 'hintText' && !this._hintText.length\n ? 'Hint text'\n : this._hintText\n\n return {\n text,\n classes: this.getHighlight('hintText')\n }\n }\n\n /**\n * @returns {QuestionBaseModel}\n * @protected\n */\n _renderInput() {\n return { ...super._renderInput(), label: this.label, hint: this.hint }\n }\n\n /**\n * @type {string}\n */\n get hintText() {\n return this._hintText\n }\n\n /**\n * @param {string} value\n */\n set hintText(value) {\n this._hintText = value\n this.render()\n }\n}\n\n/**\n * @import { ListenerRow, BaseSettings, QuestionElements, QuestionBaseModel, GovukFieldset, DefaultComponent, QuestionRenderer } from '~/src/form/form-editor/preview/types.js'\n * @import { FormComponentsDef, ContentComponentsDef, ComponentDef } from '~/src/components/types.js'\n * @import { ListElement, ListItemReadonly } from '~/src/form/form-editor/types.js'\n */\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;;AAEzB;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,SAASF,iBAAiB,CAAC;EAC/D;AACF;AACA;AACA;EACEG,UAAU;EACV;AACF;AACA;EACEC,WAAWA,CAACC,SAAS,EAAE;IACrB,KAAK,CAACA,SAAS,CAAC;IAChB,IAAI,CAACF,UAAU,GAAGE,SAAS;EAC7B;;EAEA;AACF;AACA;AACA;EACEC,UAAUA,CAAA,EAAG;IACX,OAAO;MACL,GAAG,KAAK,CAACA,UAAU,CAAC,CAAC;MACrBC,QAAQ,EAAE,IAAI,CAACJ,UAAU,CAACK,IAAI,IAAI,EAAE;MACpCC,SAAS,EAAE,IAAI,CAACN,UAAU,CAACO,gBAAgB,IAAI;IACjD,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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[],"sources":["../../../../../src/form/form-editor/preview/types.ts"],"sourcesContent":["import {\n type PagePreviewPanelMacro,\n type QuestionBaseModel\n} from '~/src/form/form-editor/macros/types.js'\nimport { type AutocompleteQuestion } from '~/src/form/form-editor/preview/autocomplete.js'\nimport { type DateInputQuestion } from '~/src/form/form-editor/preview/date-input.js'\nimport { type EmailAddressQuestion } from '~/src/form/form-editor/preview/email-address.js'\nimport { type ListSortableQuestion } from '~/src/form/form-editor/preview/list-sortable.js'\nimport { type LongAnswerQuestion } from '~/src/form/form-editor/preview/long-answer.js'\nimport { type PhoneNumberQuestion } from '~/src/form/form-editor/preview/phone-number.js'\nimport { type Question } from '~/src/form/form-editor/preview/question.js'\nimport { type RadioSortableQuestion } from '~/src/form/form-editor/preview/radio-sortable.js'\nimport { type SelectSortableQuestion } from '~/src/form/form-editor/preview/select-sortable.js'\nimport { type ShortAnswerQuestion } from '~/src/form/form-editor/preview/short-answer.js'\nimport { type UkAddressQuestion } from '~/src/form/form-editor/preview/uk-address.js'\nimport { type ListElement } from '~/src/form/form-editor/types.js'\nexport { type QuestionBaseModel } from '~/src/form/form-editor/macros/types.js'\nexport interface BaseSettings {\n
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/form/form-editor/preview/types.ts"],"sourcesContent":["import {\n type PagePreviewPanelMacro,\n type QuestionBaseModel\n} from '~/src/form/form-editor/macros/types.js'\nimport { type AutocompleteQuestion } from '~/src/form/form-editor/preview/autocomplete.js'\nimport { type DateInputQuestion } from '~/src/form/form-editor/preview/date-input.js'\nimport { type EmailAddressQuestion } from '~/src/form/form-editor/preview/email-address.js'\nimport { type ListSortableQuestion } from '~/src/form/form-editor/preview/list-sortable.js'\nimport { type LongAnswerQuestion } from '~/src/form/form-editor/preview/long-answer.js'\nimport { type PhoneNumberQuestion } from '~/src/form/form-editor/preview/phone-number.js'\nimport { type Question } from '~/src/form/form-editor/preview/question.js'\nimport { type RadioSortableQuestion } from '~/src/form/form-editor/preview/radio-sortable.js'\nimport { type SelectSortableQuestion } from '~/src/form/form-editor/preview/select-sortable.js'\nimport { type ShortAnswerQuestion } from '~/src/form/form-editor/preview/short-answer.js'\nimport { type UkAddressQuestion } from '~/src/form/form-editor/preview/uk-address.js'\nimport { type ListElement } from '~/src/form/form-editor/types.js'\nexport { type QuestionBaseModel } from '~/src/form/form-editor/macros/types.js'\nexport interface BaseSettings {\n question: string\n hintText: string\n optional: boolean\n shortDesc: string\n items: ListElement[]\n content: string\n}\n\nexport interface DefaultComponent {\n id?: string\n text: string\n classes: string\n}\n\nexport interface GovukFieldset {\n legend: DefaultComponent\n}\n\nexport type ListenerRow = [\n HTMLInputElement | null,\n (target: HTMLInputElement, e: Event) => void,\n keyof HTMLElementEventMap\n]\n\nexport interface DomElementsBase {\n readonly values?: BaseSettings\n autocompleteOptions?: string\n setPreviewHTML(value: string): void\n setPreviewDOM(element: HTMLElement): void\n}\n\nexport interface QuestionElements extends DomElementsBase {\n readonly values: BaseSettings\n}\n\nexport interface AutocompleteElements extends QuestionElements {\n autocompleteOptions: string\n}\n\nexport interface QuestionRenderContext {\n model: QuestionBaseModel\n}\n\nexport interface PageRenderContext {\n params: PagePreviewPanelMacro\n}\n\nexport type RenderContext = QuestionRenderContext | PageRenderContext\n\nexport interface HTMLBuilder {\n buildHTML(questionTemplate: string, renderContext: RenderContext): string\n}\n\nexport interface QuestionRenderer {\n render(questionTemplate: string, questionBaseModel: QuestionBaseModel): void\n}\n\nexport interface PageRenderer {\n render(pageTemplate: string, pagePreview: PagePreviewPanelMacro): void\n}\n\nexport type Renderer = QuestionRenderer | PageRenderer\n\nexport interface ListElements extends QuestionElements {\n afterInputsHTML: string\n}\n\nexport interface PageOverviewElements {\n heading: string\n guidance: string\n addHeading: boolean\n}\n\nexport type PreviewQuestion =\n | DateInputQuestion\n | EmailAddressQuestion\n | ListSortableQuestion\n | LongAnswerQuestion\n | PhoneNumberQuestion\n | Question\n | RadioSortableQuestion\n | SelectSortableQuestion\n | ShortAnswerQuestion\n | UkAddressQuestion\n | AutocompleteQuestion\n"],"mappings":"","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 {\n type ConditionWrapperV2,\n type DateDirections,\n type DateUnits,\n type Item\n} from '~/src/index.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 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 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\nexport type FormEditorInputPage = Pick<\n FormEditor,\n 'pageType' | 'questionType' | 'writtenAnswerSub' | 'dateSub' | '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>\n\nexport type FormEditorInputPageSettings = Pick<\n FormEditor,\n | 'pageHeadingAndGuidance'\n | 'pageHeading'\n | 'guidanceText'\n | 'repeater'\n | 'minItems'\n | 'maxItems'\n | 'questionSetName'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n FormEditor,\n 'pageHeading' | 'guidanceText'\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 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}\n\nexport interface ConditionSessionState {\n id?: string\n stateId?: string\n conditionWrapper?: ConditionWrapperV2\n
|
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 {\n type ConditionWrapperV2,\n type DateDirections,\n type DateUnits,\n type Item\n} from '~/src/index.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 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 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\nexport type FormEditorInputPage = Pick<\n FormEditor,\n 'pageType' | 'questionType' | 'writtenAnswerSub' | 'dateSub' | '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>\n\nexport type FormEditorInputPageSettings = Pick<\n FormEditor,\n | 'pageHeadingAndGuidance'\n | 'pageHeading'\n | 'guidanceText'\n | 'repeater'\n | 'minItems'\n | 'maxItems'\n | 'questionSetName'\n>\n\nexport type FormEditorInputGuidancePage = Pick<\n FormEditor,\n 'pageHeading' | 'guidanceText'\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 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}\n\nexport interface ConditionSessionState {\n id?: string\n stateId?: string\n conditionWrapper?: ConditionWrapperV2\n}\n\nexport interface GovukFieldItem {\n text?: string\n value?: string\n checked?: boolean\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 GovukStringField = Omit<GovukField, 'value'> & { value: string }\n\nexport interface FormEditorGovukField {\n question?: GovukField\n hintText?: 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 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":[]}
|
package/dist/module/stubs.js
CHANGED
@@ -11,4 +11,7 @@ export { buildFileUploadPage } from "./__stubs__/pages.js";
|
|
11
11
|
export { buildSummaryPage } from "./__stubs__/pages.js";
|
12
12
|
export { buildQuestionPage } from "./__stubs__/pages.js";
|
13
13
|
export { buildMarkdownComponent } from "./__stubs__/components.js";
|
14
|
+
export { QuestionRendererStub } from "./form/form-editor/__stubs__/preview.js";
|
15
|
+
export { PageRendererStub } from "./form/form-editor/__stubs__/preview.js";
|
16
|
+
export { QuestionPreviewElements } from "./form/form-editor/__stubs__/preview.js";
|
14
17
|
//# sourceMappingURL=stubs.js.map
|
package/dist/module/stubs.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stubs.js","names":["buildList","buildListItem","buildCheckboxComponent","buildRadioComponent","buildAutoCompleteComponent","buildFileUploadComponent","buildTextFieldComponent","buildRepeaterPage","buildFileUploadPage","buildSummaryPage","buildQuestionPage","buildMarkdownComponent"],"sources":["../../src/stubs.ts"],"sourcesContent":["export * from '~/src/__stubs__/form-definition.js'\nexport { buildList } from '~/src/__stubs__/components.js'\nexport { buildListItem } from '~/src/__stubs__/components.js'\nexport { buildCheckboxComponent } from '~/src/__stubs__/components.js'\nexport { buildRadioComponent } from '~/src/__stubs__/components.js'\nexport { buildAutoCompleteComponent } from '~/src/__stubs__/components.js'\nexport { buildFileUploadComponent } from '~/src/__stubs__/components.js'\nexport { buildTextFieldComponent } from '~/src/__stubs__/components.js'\nexport { buildRepeaterPage } from '~/src/__stubs__/pages.js'\nexport { buildFileUploadPage } from '~/src/__stubs__/pages.js'\nexport { buildSummaryPage } from '~/src/__stubs__/pages.js'\nexport { buildQuestionPage } from '~/src/__stubs__/pages.js'\nexport { buildMarkdownComponent } from '~/src/__stubs__/components.js'\n"],"mappings":"AAAA;AACA,SAASA,SAAS;AAClB,SAASC,aAAa;AACtB,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,0BAA0B;AACnC,SAASC,wBAAwB;AACjC,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAC1B,SAASC,mBAAmB;AAC5B,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;AAC1B,SAASC,sBAAsB","ignoreList":[]}
|
1
|
+
{"version":3,"file":"stubs.js","names":["buildList","buildListItem","buildCheckboxComponent","buildRadioComponent","buildAutoCompleteComponent","buildFileUploadComponent","buildTextFieldComponent","buildRepeaterPage","buildFileUploadPage","buildSummaryPage","buildQuestionPage","buildMarkdownComponent","QuestionRendererStub","PageRendererStub","QuestionPreviewElements"],"sources":["../../src/stubs.ts"],"sourcesContent":["export * from '~/src/__stubs__/form-definition.js'\nexport { buildList } from '~/src/__stubs__/components.js'\nexport { buildListItem } from '~/src/__stubs__/components.js'\nexport { buildCheckboxComponent } from '~/src/__stubs__/components.js'\nexport { buildRadioComponent } from '~/src/__stubs__/components.js'\nexport { buildAutoCompleteComponent } from '~/src/__stubs__/components.js'\nexport { buildFileUploadComponent } from '~/src/__stubs__/components.js'\nexport { buildTextFieldComponent } from '~/src/__stubs__/components.js'\nexport { buildRepeaterPage } from '~/src/__stubs__/pages.js'\nexport { buildFileUploadPage } from '~/src/__stubs__/pages.js'\nexport { buildSummaryPage } from '~/src/__stubs__/pages.js'\nexport { buildQuestionPage } from '~/src/__stubs__/pages.js'\nexport { buildMarkdownComponent } from '~/src/__stubs__/components.js'\nexport { QuestionRendererStub } from '~/src/form/form-editor/__stubs__/preview.js'\nexport { PageRendererStub } from '~/src/form/form-editor/__stubs__/preview.js'\nexport { QuestionPreviewElements } from '~/src/form/form-editor/__stubs__/preview.js'\n"],"mappings":"AAAA;AACA,SAASA,SAAS;AAClB,SAASC,aAAa;AACtB,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,0BAA0B;AACnC,SAASC,wBAAwB;AACjC,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAC1B,SAASC,mBAAmB;AAC5B,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;AAC1B,SAASC,sBAAsB;AAC/B,SAASC,oBAAoB;AAC7B,SAASC,gBAAgB;AACzB,SAASC,uBAAuB","ignoreList":[]}
|
@@ -59,7 +59,7 @@ export class QuestionPreviewElements implements ListElements {
|
|
59
59
|
/**
|
60
60
|
* @param {BaseSettings} baseSettings
|
61
61
|
*/
|
62
|
-
constructor({ question, hintText, optional, shortDesc, items, content
|
62
|
+
constructor({ question, hintText, optional, shortDesc, items, content }: BaseSettings);
|
63
63
|
/**
|
64
64
|
* @protected
|
65
65
|
*/
|
@@ -84,7 +84,6 @@ export class QuestionPreviewElements implements ListElements {
|
|
84
84
|
* @private
|
85
85
|
*/
|
86
86
|
private _items;
|
87
|
-
_largeTitle: boolean;
|
88
87
|
afterInputsHTML: string;
|
89
88
|
/**
|
90
89
|
* @returns {BaseSettings}
|
@@ -118,10 +117,12 @@ export class PagePreviewElements implements PageOverviewElements {
|
|
118
117
|
/**
|
119
118
|
* @param {string} heading
|
120
119
|
* @param {string} guidance
|
120
|
+
* @param {boolean} [addHeading]
|
121
121
|
*/
|
122
|
-
constructor(heading: string, guidance?: string);
|
122
|
+
constructor(heading: string, guidance?: string, addHeading?: boolean);
|
123
123
|
guidance: string;
|
124
124
|
heading: string;
|
125
|
+
addHeading: boolean;
|
125
126
|
}
|
126
127
|
export const baseElements: BaseSettings;
|
127
128
|
export namespace listElementsStub {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/__stubs__/preview.js"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/__stubs__/preview.js"],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AAW,QAIrB;CACF;AAED;;GAEG;AACH;IACE;;OAEG;IACH,kDAFW,YAAY,GAAG;QAAC,mBAAmB,EAAE,MAAM,CAAA;KAAC,EAKtD;IADC,4BAA8C;CAEjD;AAED;;GAEG;AACH;IAKE;;;;OAIG;IACH,qBAJW,MAAM,aACN,MAAM,eACN,OAAO,EAMjB;IAbD,iBAAQ;IACR,gBAAO;IACP,oBAAU;CAYX;AAED,2BAAuC,YAAY,CAQjD;;;;;;;;kCA+D8K,yCAAyC;uCAAzC,yCAAyC;yBArPhM,4CAA4C;sCAqP2G,yCAAyC;mCAAzC,yCAAyC;kCAAzC,yCAAyC;2CAD/K,wCAAwC;kCAC8F,yCAAyC;0CAAzC,yCAAyC;0CAAzC,yCAAyC;AA7DzN,uBAAgB,sCAAsC,CAAA;AACtD,uBAAgB,sCAAsC,CAAA;AACtD,uBAAgB,sCAAsC,CAAA;AACtD,uBAAgB,sCAAsC,CAAA;AAEtD,gCAAoC,YAAY,CA4B9C"}
|
@@ -4,19 +4,13 @@
|
|
4
4
|
export class ComponentElements implements QuestionElements {
|
5
5
|
/**
|
6
6
|
* @param {ComponentDef} component
|
7
|
-
* @param {boolean} [largeTitle]
|
8
7
|
*/
|
9
|
-
constructor(component: ComponentDef
|
8
|
+
constructor(component: ComponentDef);
|
10
9
|
/**
|
11
10
|
* @type {ComponentDef}
|
12
11
|
* @protected
|
13
12
|
*/
|
14
13
|
protected _component: ComponentDef;
|
15
|
-
/**
|
16
|
-
* @type {boolean}
|
17
|
-
* @private
|
18
|
-
*/
|
19
|
-
private _largeTitle;
|
20
14
|
/**
|
21
15
|
* @protected
|
22
16
|
* @returns {BaseSettings}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component-elements.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/component-elements.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;
|
1
|
+
{"version":3,"file":"component-elements.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/component-elements.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;IAME;;OAEG;IACH,uBAFW,YAAY,EAItB;IAVD;;;OAGG;IACH,sBAHU,YAAY,CAGZ;IAQV;;;OAGG;IACH,wBAFa,YAAY,CAaxB;IAED;;OAEG;IACH,cAFa,YAAY,CAKxB;IAED;;OAEG;IACH,wBAFW,WAAW,QAIrB;IAED;;OAEG;IACH,uBAFW,MAAM,QAIhB;CACF;sCAGqI,yCAAyC;kCACrG,2BAA2B;kCADiC,yCAAyC"}
|
@@ -4,9 +4,8 @@
|
|
4
4
|
export class ContentElements extends ComponentElements implements QuestionElements {
|
5
5
|
/**
|
6
6
|
* @param {Exclude<ContentComponentsDef, ListComponent>} component
|
7
|
-
* @param {boolean} largeTitle
|
8
7
|
*/
|
9
|
-
constructor(component: Exclude<ContentComponentsDef, ListComponent
|
8
|
+
constructor(component: Exclude<ContentComponentsDef, ListComponent>);
|
10
9
|
/**
|
11
10
|
* @type {Exclude<ContentComponentsDef, ListComponent>}
|
12
11
|
* @protected
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/content.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IAME
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/content.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IAME;;OAEG;IACH,uBAFW,OAAO,CAAC,oBAAoB,EAAE,aAAa,CAAC,EAKtD;IAXD;;;OAGG;IACH,sBAHU,OAAO,CAAC,oBAAoB,EAAE,aAAa,CAAC,CAG5C;CAmBX;AAED;;;;;GAKG;AACH;IACE;;;OAGG;IACH,oBAHU,MAAM,CAGR;IAwBR;;;OAGG;IACH,6BAHW,MAAM,QAKhB;IASD,mBANa,MAAM,EASlB;IAVD;;OAEG;IACH,eAFa,MAAM,CAIlB;CAMF;sCAGqI,yCAAyC;kCAzF7I,sDAAsD;0CA0FC,2BAA2B;mCAA3B,2BAA2B;iCAzFnF,2CAA2C"}
|
@@ -13,6 +13,7 @@ export class PagePreviewElements implements PageOverviewElements {
|
|
13
13
|
private _page;
|
14
14
|
get heading(): string;
|
15
15
|
get guidance(): string;
|
16
|
+
get addHeading(): boolean;
|
16
17
|
}
|
17
18
|
/**
|
18
19
|
* @implements {PagePreviewPanelMacro}
|
@@ -70,6 +71,11 @@ export class PreviewPageController implements PagePreviewPanelMacro {
|
|
70
71
|
* @protected
|
71
72
|
*/
|
72
73
|
protected _guidanceComponent: Markdown;
|
74
|
+
/**
|
75
|
+
* @type {boolean}
|
76
|
+
* @private
|
77
|
+
*/
|
78
|
+
private _showTitle;
|
73
79
|
/**
|
74
80
|
* @returns {Markdown[]}
|
75
81
|
* @private
|
@@ -79,8 +85,23 @@ export class PreviewPageController implements PagePreviewPanelMacro {
|
|
79
85
|
* @returns {PagePreviewComponent[]}
|
80
86
|
*/
|
81
87
|
get components(): PagePreviewComponent[];
|
88
|
+
/**
|
89
|
+
* @returns {boolean}
|
90
|
+
*/
|
91
|
+
get showLargeTitle(): boolean;
|
92
|
+
/**
|
93
|
+
* @param {PreviewComponent} component
|
94
|
+
* @returns {QuestionBaseModel}
|
95
|
+
*/
|
96
|
+
_overrideComponentHeading(component: PreviewComponent): QuestionBaseModel;
|
82
97
|
set guidanceText(text: string);
|
83
98
|
get guidanceText(): string;
|
99
|
+
/**
|
100
|
+
*
|
101
|
+
* @param {boolean} showTitle
|
102
|
+
*/
|
103
|
+
set showTitle(showTitle: boolean);
|
104
|
+
get showTitle(): boolean;
|
84
105
|
get guidance(): {
|
85
106
|
text: string;
|
86
107
|
classes: string;
|
@@ -93,6 +114,10 @@ export class PreviewPageController implements PagePreviewPanelMacro {
|
|
93
114
|
classes: string;
|
94
115
|
};
|
95
116
|
render(): void;
|
117
|
+
/**
|
118
|
+
* @returns {boolean}
|
119
|
+
*/
|
120
|
+
get titleAndFirstTitleSame(): boolean;
|
96
121
|
/**
|
97
122
|
* @param {string} value
|
98
123
|
*/
|
@@ -116,6 +141,8 @@ import type { PagePreviewPanelMacro } from '../../../../form/form-editor/macros/
|
|
116
141
|
import type { Question } from '../../../../form/form-editor/preview/question.js';
|
117
142
|
import { Markdown } from '../../../../form/form-editor/preview/markdown.js';
|
118
143
|
import type { PagePreviewComponent } from '../../../../form/form-editor/macros/types.js';
|
144
|
+
import type { PreviewComponent } from '../../../../form/form-editor/preview/preview.js';
|
145
|
+
import type { QuestionBaseModel } from '../../../../form/form-editor/preview/types.js';
|
119
146
|
import type { ComponentDef } from '../../../../components/types.js';
|
120
147
|
import type { FormDefinition } from '../../../../form/form-definition/types.js';
|
121
148
|
import type { PageRenderer } from '../../../../form/form-editor/preview/types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"page-controller.d.ts","sourceRoot":"","sources":["../../../../../../src/form/form-editor/preview/controller/page-controller.js"],"names":[],"mappings":"AAmBA;;GAEG;AACH;
|
1
|
+
{"version":3,"file":"page-controller.d.ts","sourceRoot":"","sources":["../../../../../../src/form/form-editor/preview/controller/page-controller.js"],"names":[],"mappings":"AAmBA;;GAEG;AACH;IAOE;;OAEG;IACH,kBAFW,IAAI,EAId;IAXD;;;OAGG;IACH,cAAK;IASL,sBAEC;IAED,uBAUC;IAED,0BAEC;CACF;AAED;;GAEG;AACH;IACE,oBAAoC;IA2PpC;;;;OAIG;IACH,kCAFa,QAAQ,CAepB;IAED;;;;;OAKG;IACH,4CAKC;IA5OD;;;;;OAKG;IACH,wBALW,YAAY,EAAE,YACd,oBAAoB,cACpB,cAAc,YACd,YAAY,EAkBtB;IAnED;;;OAGG;IACH,yBAHU,MAAM,CAGkD;IAClE;;;OAGG;IACH,uBAFU,QAAQ,EAAE,CAEJ;IAUhB;;;OAGG;IACH,wBAHW,SAAS,GAAG,OAAO,GAAG,UAAU,CAGnB;IACxB;;;OAGG;IACH,sBAAkB;IAClB;;;OAGG;IACH,uBAAgE;IAChE;;;;OAIG;IACH,8BAHU,QAAQ,CAGA;IAClB;;;OAGG;IACH,mBAAiB;IAoCjB;;;OAGG;IACH,kCAQC;IAED;;OAEG;IACH,kBAFa,oBAAoB,EAAE,CAclC;IAED;;OAEG;IACH,sBAFa,OAAO,CAgBnB;IAED;;;OAGG;IACH,qCAHW,gBAAgB,GACd,iBAAiB,CAgC7B;IAED,+BAIC;IAED,2BAKC;IAED;;;OAGG;IACH,yBAFW,OAAO,EAKjB;IAED,iBAPW,OAAO,CASjB;IAED;;;MAKC;IAED;;OAEG;IACH,iBAFa;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAO7C;IAED,eAEC;IAED;;OAEG;IACH,8BAFa,OAAO,CASnB;IAeD;;OAEG;IACH,iBAFW,MAAM,EAKhB;IAnBD;;OAEG;IACH,aAFa,MAAM,CAUlB;IAUD,uBAEC;IAmCD,0BAGC;IAED;;OAEG;IACH,iCAFW,OAAO,GAAC,UAAU,QAK5B;IAED,uBAKC;;CACF;0CAG2F,yCAAyC;0BAG5F,qCAAqC;2CAEd,wCAAwC;8BAJ3E,4CAA4C;yBA5WhD,4CAA4C;0CAgXL,wCAAwC;sCAHnE,2CAA2C;uCAFY,yCAAyC;kCAIjF,2BAA2B;oCADtC,qCAAqC;kCAHc,yCAAyC"}
|
@@ -1,10 +1,9 @@
|
|
1
1
|
/**
|
2
2
|
* @param {QuestionRenderer} questionRenderer
|
3
3
|
* @param {FormDefinition} definition
|
4
|
-
* @param {boolean} hasTitle
|
5
4
|
* @returns {(component: ComponentDef) => Question}
|
6
5
|
*/
|
7
|
-
export function mapComponentToPreviewQuestion(questionRenderer: QuestionRenderer, definition: FormDefinition
|
6
|
+
export function mapComponentToPreviewQuestion(questionRenderer: QuestionRenderer, definition: FormDefinition): (component: ComponentDef) => Question;
|
8
7
|
import type { QuestionRenderer } from '../../../form/form-editor/preview/types.js';
|
9
8
|
import type { FormDefinition } from '../../../form/form-definition/types.js';
|
10
9
|
import type { ComponentDef } from '../../../components/types.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/helpers.js"],"names":[],"mappings":"AAsDA
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/helpers.js"],"names":[],"mappings":"AAsDA;;;;GAIG;AACH,gEAJW,gBAAgB,cAChB,cAAc,GACZ,CAAC,SAAS,EAAE,YAAY,KAAK,QAAQ,CA6BjD;sCAGsD,yCAAyC;oCAGvD,qCAAqC;kCAC1B,2BAA2B;8BAHlD,4CAA4C"}
|
@@ -21,9 +21,8 @@ export class ListComponentElements extends QuestionComponentElements implements
|
|
21
21
|
/**
|
22
22
|
* @param {SelectionComponentsDef} component
|
23
23
|
* @param {List} list
|
24
|
-
* @param {boolean} largeTitle
|
25
24
|
*/
|
26
|
-
constructor(component: SelectionComponentsDef, list: List
|
25
|
+
constructor(component: SelectionComponentsDef, list: List);
|
27
26
|
/**
|
28
27
|
* @type {List}
|
29
28
|
* @protected
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/list.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH,4CAHW,WAAW,GACT,CAAC,MAAM,EAAE,WAAW,CAAC,CAIjC;AAED;;;;GAIG;AACH,gDAHY,WAAW,EAAE,GAAE,SAAS,GACvB,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAKpC;AAED;;;GAGG;AACH,4CAHW,IAAI,GACF,WAAW,CAavB;AAED;;GAEG;AACH;IAOE
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/list.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH,4CAHW,WAAW,GACT,CAAC,MAAM,EAAE,WAAW,CAAC,CAIjC;AAED;;;;GAIG;AACH,gDAHY,WAAW,EAAE,GAAE,SAAS,GACvB,GAAG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,yCAAyC;sCAAzC,yCAAyC;mCAAzC,yCAAyC;sCAH3G,iCAAiC;sCAGiC,yCAAyC"}
|
@@ -3,6 +3,10 @@
|
|
3
3
|
*/
|
4
4
|
export class PreviewComponent {
|
5
5
|
static PATH: string;
|
6
|
+
/**
|
7
|
+
* @type {boolean}
|
8
|
+
* @protected
|
9
|
+
*/
|
6
10
|
/**
|
7
11
|
* @param {QuestionElements} htmlElements
|
8
12
|
* @param {QuestionRenderer} questionRenderer
|
@@ -45,11 +49,6 @@ export class PreviewComponent {
|
|
45
49
|
* @protected
|
46
50
|
*/
|
47
51
|
protected _highlighted: boolean;
|
48
|
-
/**
|
49
|
-
* @type {boolean}
|
50
|
-
* @protected
|
51
|
-
*/
|
52
|
-
protected _largeTitle: boolean;
|
53
52
|
/**
|
54
53
|
* @type {string}
|
55
54
|
* @private
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/preview.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IACE,oBAAmC;
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/preview.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IACE,oBAAmC;IAuCnC;;;OAGG;IAEH;;;OAGG;IACH,0BAHW,gBAAgB,oBAChB,gBAAgB,EA0B1B;IAvED;;;OAGG;IACH,eAFU,aAAa,CAEc;IACrC;;;;OAIG;IACH,6BAHU,MAAM,CAGM;IACtB;;;OAGG;IACH,sBAHW,MAAM,GAAC,IAAI,CAGL;IACjB;;;;OAIG;IACH,sBAHU,MAAM,CAGD;IACf;;;OAGG;IACH,6BAHU,gBAAgB,CAGT;IAEjB;;;OAGG;IACH,yBAHU,gBAAgB,CAGb;IACb;;;OAGG;IACH,wBAHU,OAAO,CAGG;IAkBlB;;;OAGG;IACH,kBAAyB;IACzB;;;OAGG;IACH,kBAAyB;IAS3B;;;;OAIG;IACH,gCAJW,MAAM,GACJ,MAAM,CAKlB;IAED,wBAGC;IAED;;;OAGG;IACH,uBAFU,gBAAgB,CAOzB;IAED;;;OAGG;IACH,0BAFU,aAAa,CAStB;IAED;;OAEG;IACH,0BAFa,OAAO,CAAC,iBAAiB,CAAC,CAItC;IAED;;;;OAIG;IACH,0BAHa,iBAAiB,CAS7B;IAED;;OAEG;IACH,mBAFU,iBAAiB,CAO1B;IAED,eAEC;IASD;;OAEG;IACH,oBAFW,MAAM,EAKhB;IAbD;;OAEG;IACH,gBAFU,MAAM,CAIf;IAcD;;OAEG;IACH,oBAFW,OAAO,EAKjB;IAVD,gBAKW,OAAO,CAHjB;IAiBD;;OAEG;IACH,qBAFW,MAAM,GAAG,IAAI,EAKvB;IAbD;;OAEG;IACH,iBAFU,MAAM,GAAG,IAAI,CAItB;IAUD;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,2BAEC;CACF;8BAhN6B,2BAA2B;sCAmN6E,yCAAyC;sCAAzC,yCAAyC;sCAAzC,yCAAyC;mCAAzC,yCAAyC;uCAAzC,yCAAyC"}
|
@@ -5,7 +5,7 @@ export class QuestionComponentElements extends ComponentElements implements Ques
|
|
5
5
|
/**
|
6
6
|
* @param {FormComponentsDef} component
|
7
7
|
*/
|
8
|
-
constructor(component: FormComponentsDef
|
8
|
+
constructor(component: FormComponentsDef);
|
9
9
|
/**
|
10
10
|
* @type {FormComponentsDef}
|
11
11
|
* @protected
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/question.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IAME;;OAEG;IACH,uBAFW,iBAAiB,
|
1
|
+
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/question.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IAME;;OAEG;IACH,uBAFW,iBAAiB,EAK3B;IAXD;;;OAGG;IACH,sBAHU,iBAAiB,CAGjB;CAoBX;AAED;;;;;;;;;GASG;AACH;IAwBI;;;OAGG;IACH,kBAAyB;IAG3B;;;OAGG;IACH,sBAHU,gBAAgB,CAazB;IAiBD;;OAEG;IACH,oBAFW,MAAM,EAKhB;IAbD;;OAEG;IACH,gBAFU,MAAM,CAIf;CASF;sCAGqI,yCAAyC;kCAnH7I,sDAAsD;uCAoHd,2BAA2B;iCAnHpE,2CAA2C;sCAkH0D,yCAAyC"}
|
@@ -13,7 +13,6 @@ import { type UkAddressQuestion } from '../../../form/form-editor/preview/uk-add
|
|
13
13
|
import { type ListElement } from '../../../form/form-editor/types.js';
|
14
14
|
export { type QuestionBaseModel } from '../../../form/form-editor/macros/types.js';
|
15
15
|
export interface BaseSettings {
|
16
|
-
largeTitle: boolean;
|
17
16
|
question: string;
|
18
17
|
hintText: string;
|
19
18
|
optional: boolean;
|
@@ -34,17 +33,25 @@ export type ListenerRow = [
|
|
34
33
|
(target: HTMLInputElement, e: Event) => void,
|
35
34
|
keyof HTMLElementEventMap
|
36
35
|
];
|
37
|
-
export interface
|
38
|
-
readonly values
|
36
|
+
export interface DomElementsBase {
|
37
|
+
readonly values?: BaseSettings;
|
38
|
+
autocompleteOptions?: string;
|
39
39
|
setPreviewHTML(value: string): void;
|
40
40
|
setPreviewDOM(element: HTMLElement): void;
|
41
41
|
}
|
42
|
+
export interface QuestionElements extends DomElementsBase {
|
43
|
+
readonly values: BaseSettings;
|
44
|
+
}
|
42
45
|
export interface AutocompleteElements extends QuestionElements {
|
43
46
|
autocompleteOptions: string;
|
44
47
|
}
|
45
|
-
export interface
|
48
|
+
export interface QuestionRenderContext {
|
46
49
|
model: QuestionBaseModel;
|
47
50
|
}
|
51
|
+
export interface PageRenderContext {
|
52
|
+
params: PagePreviewPanelMacro;
|
53
|
+
}
|
54
|
+
export type RenderContext = QuestionRenderContext | PageRenderContext;
|
48
55
|
export interface HTMLBuilder {
|
49
56
|
buildHTML(questionTemplate: string, renderContext: RenderContext): string;
|
50
57
|
}
|
@@ -54,12 +61,14 @@ export interface QuestionRenderer {
|
|
54
61
|
export interface PageRenderer {
|
55
62
|
render(pageTemplate: string, pagePreview: PagePreviewPanelMacro): void;
|
56
63
|
}
|
64
|
+
export type Renderer = QuestionRenderer | PageRenderer;
|
57
65
|
export interface ListElements extends QuestionElements {
|
58
66
|
afterInputsHTML: string;
|
59
67
|
}
|
60
68
|
export interface PageOverviewElements {
|
61
69
|
heading: string;
|
62
70
|
guidance: string;
|
71
|
+
addHeading: boolean;
|
63
72
|
}
|
64
73
|
export type PreviewQuestion = DateInputQuestion | EmailAddressQuestion | ListSortableQuestion | LongAnswerQuestion | PhoneNumberQuestion | Question | RadioSortableQuestion | SelectSortableQuestion | ShortAnswerQuestion | UkAddressQuestion | AutocompleteQuestion;
|
65
74
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-editor/preview/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACvB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,gDAAgD,CAAA;AAC1F,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AACrF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,iDAAiD,CAAA;AAC3F,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,iDAAiD,CAAA;AAC3F,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,+CAA+C,CAAA;AACvF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AACzF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4CAA4C,CAAA;AAC1E,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,kDAAkD,CAAA;AAC7F,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,mDAAmD,CAAA;AAC/F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B;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/dist/types/stubs.d.ts
CHANGED
@@ -11,4 +11,7 @@ export { buildFileUploadPage } from './__stubs__/pages.js';
|
|
11
11
|
export { buildSummaryPage } from './__stubs__/pages.js';
|
12
12
|
export { buildQuestionPage } from './__stubs__/pages.js';
|
13
13
|
export { buildMarkdownComponent } from './__stubs__/components.js';
|
14
|
+
export { QuestionRendererStub } from './form/form-editor/__stubs__/preview.js';
|
15
|
+
export { PageRendererStub } from './form/form-editor/__stubs__/preview.js';
|
16
|
+
export { QuestionPreviewElements } from './form/form-editor/__stubs__/preview.js';
|
14
17
|
//# sourceMappingURL=stubs.d.ts.map
|