@defra/forms-model 3.0.165 → 3.0.167

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.
@@ -1,4 +1,4 @@
1
- import { ComponentTypes } from "../components/index.js";
1
+ import { ComponentTypes } from "../components/component-types.js";
2
2
  export class ConditionField {
3
3
  name;
4
4
  type;
@@ -1 +1 @@
1
- {"version":3,"file":"condition-field.js","names":["ComponentTypes","ConditionField","name","type","display","constructor","Error","find","componentType","from","obj"],"sources":["../../../src/conditions/condition-field.ts"],"sourcesContent":["import { ComponentTypes } from '~/src/components/index.js'\nimport { type ComponentType } from '~/src/components/types.js'\n\nexport class ConditionField {\n name: string\n type: ComponentType\n display: string\n\n constructor(name: string, type: ComponentType, display: string) {\n if (!name || typeof name !== 'string') {\n throw Error(`name ${name} is not valid`)\n }\n\n if (!ComponentTypes.find((componentType) => componentType.type === type)) {\n throw Error(`type ${type} is not valid`)\n }\n\n if (!display || typeof display !== 'string') {\n throw Error(`display ${display} is not valid`)\n }\n\n this.name = name\n this.type = type\n this.display = display\n }\n\n static from(obj: { name: string; type: ComponentType; display: string }) {\n return new ConditionField(obj.name, obj.type, obj.display)\n }\n}\n"],"mappings":"AAAA,SAASA,cAAc;AAGvB,OAAO,MAAMC,cAAc,CAAC;EAC1BC,IAAI;EACJC,IAAI;EACJC,OAAO;EAEPC,WAAWA,CAACH,IAAY,EAAEC,IAAmB,EAAEC,OAAe,EAAE;IAC9D,IAAI,CAACF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;MACrC,MAAMI,KAAK,CAAC,QAAQJ,IAAI,eAAe,CAAC;IAC1C;IAEA,IAAI,CAACF,cAAc,CAACO,IAAI,CAAEC,aAAa,IAAKA,aAAa,CAACL,IAAI,KAAKA,IAAI,CAAC,EAAE;MACxE,MAAMG,KAAK,CAAC,QAAQH,IAAI,eAAe,CAAC;IAC1C;IAEA,IAAI,CAACC,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;MAC3C,MAAME,KAAK,CAAC,WAAWF,OAAO,eAAe,CAAC;IAChD;IAEA,IAAI,CAACF,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,OAAO,GAAGA,OAAO;EACxB;EAEA,OAAOK,IAAIA,CAACC,GAA2D,EAAE;IACvE,OAAO,IAAIT,cAAc,CAACS,GAAG,CAACR,IAAI,EAAEQ,GAAG,CAACP,IAAI,EAAEO,GAAG,CAACN,OAAO,CAAC;EAC5D;AACF","ignoreList":[]}
1
+ {"version":3,"file":"condition-field.js","names":["ComponentTypes","ConditionField","name","type","display","constructor","Error","find","componentType","from","obj"],"sources":["../../../src/conditions/condition-field.ts"],"sourcesContent":["import { ComponentTypes } from '~/src/components/component-types.js'\nimport { type ComponentType } from '~/src/components/types.js'\n\nexport class ConditionField {\n name: string\n type: ComponentType\n display: string\n\n constructor(name: string, type: ComponentType, display: string) {\n if (!name || typeof name !== 'string') {\n throw Error(`name ${name} is not valid`)\n }\n\n if (!ComponentTypes.find((componentType) => componentType.type === type)) {\n throw Error(`type ${type} is not valid`)\n }\n\n if (!display || typeof display !== 'string') {\n throw Error(`display ${display} is not valid`)\n }\n\n this.name = name\n this.type = type\n this.display = display\n }\n\n static from(obj: { name: string; type: ComponentType; display: string }) {\n return new ConditionField(obj.name, obj.type, obj.display)\n }\n}\n"],"mappings":"AAAA,SAASA,cAAc;AAGvB,OAAO,MAAMC,cAAc,CAAC;EAC1BC,IAAI;EACJC,IAAI;EACJC,OAAO;EAEPC,WAAWA,CAACH,IAAY,EAAEC,IAAmB,EAAEC,OAAe,EAAE;IAC9D,IAAI,CAACF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;MACrC,MAAMI,KAAK,CAAC,QAAQJ,IAAI,eAAe,CAAC;IAC1C;IAEA,IAAI,CAACF,cAAc,CAACO,IAAI,CAAEC,aAAa,IAAKA,aAAa,CAACL,IAAI,KAAKA,IAAI,CAAC,EAAE;MACxE,MAAMG,KAAK,CAAC,QAAQH,IAAI,eAAe,CAAC;IAC1C;IAEA,IAAI,CAACC,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;MAC3C,MAAME,KAAK,CAAC,WAAWF,OAAO,eAAe,CAAC;IAChD;IAEA,IAAI,CAACF,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,OAAO,GAAGA,OAAO;EACxB;EAEA,OAAOK,IAAIA,CAACC,GAA2D,EAAE;IACvE,OAAO,IAAIT,cAAc,CAACS,GAAG,CAACR,IAAI,EAAEQ,GAAG,CAACP,IAAI,EAAEO,GAAG,CAACN,OAAO,CAAC;EAC5D;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"conditions-wrapper.js","names":["ConditionsModel","ConditionsWrapper","name","displayName","value","constructor","rawData","expression","from","toExpression","clone"],"sources":["../../../src/data-model/conditions-wrapper.ts"],"sourcesContent":["import { ConditionsModel } from '~/src/conditions/condition-model.js'\nimport {\n type ConditionRawData,\n type ConditionWrapperValue\n} from '~/src/form/types.js'\n\nexport class ConditionsWrapper {\n name: string\n displayName: string\n value: ConditionWrapperValue\n\n constructor(rawData: ConditionRawData) {\n const { name, displayName, value } = rawData\n this.displayName = displayName || name\n this.value = value\n this.name = name\n }\n\n get expression() {\n if (typeof this.value === 'string') {\n // Previously conditions were defined as strings, e.g: \"section.age < 18\"\n // keep this so application can support legacy forms exports.\n return this.value\n }\n\n return ConditionsModel.from(this.value).toExpression()\n }\n\n clone(): ConditionsWrapper {\n return new ConditionsWrapper(this)\n }\n}\n"],"mappings":"AAAA,SAASA,eAAe;AAMxB,OAAO,MAAMC,iBAAiB,CAAC;EAC7BC,IAAI;EACJC,WAAW;EACXC,KAAK;EAELC,WAAWA,CAACC,OAAyB,EAAE;IACrC,MAAM;MAAEJ,IAAI;MAAEC,WAAW;MAAEC;IAAM,CAAC,GAAGE,OAAO;IAC5C,IAAI,CAACH,WAAW,GAAGA,WAAW,IAAID,IAAI;IACtC,IAAI,CAACE,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACF,IAAI,GAAGA,IAAI;EAClB;EAEA,IAAIK,UAAUA,CAAA,EAAG;IACf,IAAI,OAAO,IAAI,CAACH,KAAK,KAAK,QAAQ,EAAE;MAClC;MACA;MACA,OAAO,IAAI,CAACA,KAAK;IACnB;IAEA,OAAOJ,eAAe,CAACQ,IAAI,CAAC,IAAI,CAACJ,KAAK,CAAC,CAACK,YAAY,CAAC,CAAC;EACxD;EAEAC,KAAKA,CAAA,EAAsB;IACzB,OAAO,IAAIT,iBAAiB,CAAC,IAAI,CAAC;EACpC;AACF","ignoreList":[]}
1
+ {"version":3,"file":"conditions-wrapper.js","names":["ConditionsModel","ConditionsWrapper","name","displayName","value","constructor","rawData","expression","from","toExpression","clone"],"sources":["../../../src/data-model/conditions-wrapper.ts"],"sourcesContent":["import { ConditionsModel } from '~/src/conditions/condition-model.js'\nimport {\n type ConditionRawData,\n type ConditionWrapperValue\n} from '~/src/form/form-definition/types.js'\n\nexport class ConditionsWrapper {\n name: string\n displayName: string\n value: ConditionWrapperValue\n\n constructor(rawData: ConditionRawData) {\n const { name, displayName, value } = rawData\n this.displayName = displayName || name\n this.value = value\n this.name = name\n }\n\n get expression() {\n if (typeof this.value === 'string') {\n // Previously conditions were defined as strings, e.g: \"section.age < 18\"\n // keep this so application can support legacy forms exports.\n return this.value\n }\n\n return ConditionsModel.from(this.value).toExpression()\n }\n\n clone(): ConditionsWrapper {\n return new ConditionsWrapper(this)\n }\n}\n"],"mappings":"AAAA,SAASA,eAAe;AAMxB,OAAO,MAAMC,iBAAiB,CAAC;EAC7BC,IAAI;EACJC,WAAW;EACXC,KAAK;EAELC,WAAWA,CAACC,OAAyB,EAAE;IACrC,MAAM;MAAEJ,IAAI;MAAEC,WAAW;MAAEC;IAAM,CAAC,GAAGE,OAAO;IAC5C,IAAI,CAACH,WAAW,GAAGA,WAAW,IAAID,IAAI;IACtC,IAAI,CAACE,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACF,IAAI,GAAGA,IAAI;EAClB;EAEA,IAAIK,UAAUA,CAAA,EAAG;IACf,IAAI,OAAO,IAAI,CAACH,KAAK,KAAK,QAAQ,EAAE;MAClC;MACA;MACA,OAAO,IAAI,CAACA,KAAK;IACnB;IAEA,OAAOJ,eAAe,CAACQ,IAAI,CAAC,IAAI,CAACJ,KAAK,CAAC,CAACK,YAAY,CAAC,CAAC;EACxD;EAEAC,KAAKA,CAAA,EAAsB;IACzB,OAAO,IAAIT,iBAAiB,CAAC,IAAI,CAAC;EACpC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"input-wrapper.js","names":["clone","InputWrapper","name","undefined","title","type","propertyPath","parentItemName","page","constructor","rawData","options","Object","assign","myPage","components","ignoreSection","section","displayName","titleWithContext"],"sources":["../../../src/data-model/input-wrapper.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\nimport { type Page } from '~/src/form/types.js'\nimport { clone } from '~/src/utils/helpers.js'\n\nexport class InputWrapper {\n name: string | undefined = undefined\n title: string | undefined = undefined\n type: string | undefined = undefined\n propertyPath: string | undefined\n #parentItemName: string | undefined\n page: Page\n\n constructor(\n rawData: ComponentDef,\n page: Page,\n options: { ignoreSection?: boolean; parentItemName?: string }\n ) {\n Object.assign(this, rawData)\n const myPage = clone(page)\n\n delete myPage.components\n\n this.page = myPage\n this.propertyPath =\n !options.ignoreSection && page.section\n ? `${page.section}.${this.name}`\n : this.name\n this.#parentItemName = options.parentItemName\n }\n\n get displayName(): string | undefined {\n const titleWithContext = this.#parentItemName\n ? `${this.title} under ${this.#parentItemName}`\n : this.title\n\n return this.page.section\n ? `${titleWithContext} in ${this.page.section}`\n : titleWithContext\n }\n}\n"],"mappings":"AAEA,SAASA,KAAK;AAEd,OAAO,MAAMC,YAAY,CAAC;EACxBC,IAAI,GAAuBC,SAAS;EACpCC,KAAK,GAAuBD,SAAS;EACrCE,IAAI,GAAuBF,SAAS;EACpCG,YAAY;EACZ,CAACC,cAAc;EACfC,IAAI;EAEJC,WAAWA,CACTC,OAAqB,EACrBF,IAAU,EACVG,OAA6D,EAC7D;IACAC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEH,OAAO,CAAC;IAC5B,MAAMI,MAAM,GAAGd,KAAK,CAACQ,IAAI,CAAC;IAE1B,OAAOM,MAAM,CAACC,UAAU;IAExB,IAAI,CAACP,IAAI,GAAGM,MAAM;IAClB,IAAI,CAACR,YAAY,GACf,CAACK,OAAO,CAACK,aAAa,IAAIR,IAAI,CAACS,OAAO,GAClC,GAAGT,IAAI,CAACS,OAAO,IAAI,IAAI,CAACf,IAAI,EAAE,GAC9B,IAAI,CAACA,IAAI;IACf,IAAI,CAAC,CAACK,cAAc,GAAGI,OAAO,CAACJ,cAAc;EAC/C;EAEA,IAAIW,WAAWA,CAAA,EAAuB;IACpC,MAAMC,gBAAgB,GAAG,IAAI,CAAC,CAACZ,cAAc,GACzC,GAAG,IAAI,CAACH,KAAK,UAAU,IAAI,CAAC,CAACG,cAAc,EAAE,GAC7C,IAAI,CAACH,KAAK;IAEd,OAAO,IAAI,CAACI,IAAI,CAACS,OAAO,GACpB,GAAGE,gBAAgB,OAAO,IAAI,CAACX,IAAI,CAACS,OAAO,EAAE,GAC7CE,gBAAgB;EACtB;AACF","ignoreList":[]}
1
+ {"version":3,"file":"input-wrapper.js","names":["clone","InputWrapper","name","undefined","title","type","propertyPath","parentItemName","page","constructor","rawData","options","Object","assign","myPage","components","ignoreSection","section","displayName","titleWithContext"],"sources":["../../../src/data-model/input-wrapper.ts"],"sourcesContent":["import { type ComponentDef } from '~/src/components/types.js'\nimport { type Page } from '~/src/form/form-definition/types.js'\nimport { clone } from '~/src/utils/helpers.js'\n\nexport class InputWrapper {\n name: string | undefined = undefined\n title: string | undefined = undefined\n type: string | undefined = undefined\n propertyPath: string | undefined\n #parentItemName: string | undefined\n page: Page\n\n constructor(\n rawData: ComponentDef,\n page: Page,\n options: { ignoreSection?: boolean; parentItemName?: string }\n ) {\n Object.assign(this, rawData)\n const myPage = clone(page)\n\n delete myPage.components\n\n this.page = myPage\n this.propertyPath =\n !options.ignoreSection && page.section\n ? `${page.section}.${this.name}`\n : this.name\n this.#parentItemName = options.parentItemName\n }\n\n get displayName(): string | undefined {\n const titleWithContext = this.#parentItemName\n ? `${this.title} under ${this.#parentItemName}`\n : this.title\n\n return this.page.section\n ? `${titleWithContext} in ${this.page.section}`\n : titleWithContext\n }\n}\n"],"mappings":"AAEA,SAASA,KAAK;AAEd,OAAO,MAAMC,YAAY,CAAC;EACxBC,IAAI,GAAuBC,SAAS;EACpCC,KAAK,GAAuBD,SAAS;EACrCE,IAAI,GAAuBF,SAAS;EACpCG,YAAY;EACZ,CAACC,cAAc;EACfC,IAAI;EAEJC,WAAWA,CACTC,OAAqB,EACrBF,IAAU,EACVG,OAA6D,EAC7D;IACAC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEH,OAAO,CAAC;IAC5B,MAAMI,MAAM,GAAGd,KAAK,CAACQ,IAAI,CAAC;IAE1B,OAAOM,MAAM,CAACC,UAAU;IAExB,IAAI,CAACP,IAAI,GAAGM,MAAM;IAClB,IAAI,CAACR,YAAY,GACf,CAACK,OAAO,CAACK,aAAa,IAAIR,IAAI,CAACS,OAAO,GAClC,GAAGT,IAAI,CAACS,OAAO,IAAI,IAAI,CAACf,IAAI,EAAE,GAC9B,IAAI,CAACA,IAAI;IACf,IAAI,CAAC,CAACK,cAAc,GAAGI,OAAO,CAACJ,cAAc;EAC/C;EAEA,IAAIW,WAAWA,CAAA,EAAuB;IACpC,MAAMC,gBAAgB,GAAG,IAAI,CAAC,CAACZ,cAAc,GACzC,GAAG,IAAI,CAACH,KAAK,UAAU,IAAI,CAAC,CAACG,cAAc,EAAE,GAC7C,IAAI,CAACH,KAAK;IAEd,OAAO,IAAI,CAACI,IAAI,CAACS,OAAO,GACpB,GAAGE,gBAAgB,OAAO,IAAI,CAACX,IAAI,CAACS,OAAO,EAAE,GAC7CE,gBAAgB;EACtB;AACF","ignoreList":[]}
@@ -1,5 +1,7 @@
1
1
  export * from "./data-model/index.js";
2
- export * from "./form/index.js";
2
+ export * from "./form/form-configuration/index.js";
3
+ export * from "./form/form-definition/index.js";
4
+ export * from "./form/form-metadata/index.js";
3
5
  export * from "./components/index.js";
4
6
  export * from "./conditions/index.js";
5
7
  export * from "./utils/helpers.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/data-model/index.js'\nexport * from '~/src/form/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/utils/helpers.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/data-model/index.js'\nexport * from '~/src/form/form-configuration/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/utils/helpers.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { type ConditionRawData, type ConditionWrapperValue } from '../form/types.js';
1
+ import { type ConditionRawData, type ConditionWrapperValue } from '../form/form-definition/types.js';
2
2
  export declare class ConditionsWrapper {
3
3
  name: string;
4
4
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"conditions-wrapper.d.ts","sourceRoot":"","sources":["../../../src/data-model/conditions-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAA;AAE5B,qBAAa,iBAAiB;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,qBAAqB,CAAA;gBAEhB,OAAO,EAAE,gBAAgB;IAOrC,IAAI,UAAU,WAQb;IAED,KAAK,IAAI,iBAAiB;CAG3B"}
1
+ {"version":3,"file":"conditions-wrapper.d.ts","sourceRoot":"","sources":["../../../src/data-model/conditions-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,qCAAqC,CAAA;AAE5C,qBAAa,iBAAiB;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,qBAAqB,CAAA;gBAEhB,OAAO,EAAE,gBAAgB;IAOrC,IAAI,UAAU,WAQb;IAED,KAAK,IAAI,iBAAiB;CAG3B"}
@@ -1,5 +1,5 @@
1
1
  import { type ComponentDef } from '../components/types.js';
2
- import { type Page } from '../form/types.js';
2
+ import { type Page } from '../form/form-definition/types.js';
3
3
  export declare class InputWrapper {
4
4
  #private;
5
5
  name: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"input-wrapper.d.ts","sourceRoot":"","sources":["../../../src/data-model/input-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAG/C,qBAAa,YAAY;;IACvB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAY;IACpC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAY;IACrC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAY;IACpC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAEhC,IAAI,EAAE,IAAI,CAAA;gBAGR,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE;IAe/D,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAQpC;CACF"}
1
+ {"version":3,"file":"input-wrapper.d.ts","sourceRoot":"","sources":["../../../src/data-model/input-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,qCAAqC,CAAA;AAG/D,qBAAa,YAAY;;IACvB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAY;IACpC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAY;IACrC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAY;IACpC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAEhC,IAAI,EAAE,IAAI,CAAA;gBAGR,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE;IAe/D,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAQpC;CACF"}
@@ -1,9 +1,12 @@
1
1
  export * from './data-model/index.js';
2
- export * from './form/index.js';
2
+ export * from './form/form-configuration/index.js';
3
+ export * from './form/form-definition/index.js';
4
+ export * from './form/form-metadata/index.js';
3
5
  export * from './components/index.js';
4
6
  export * from './conditions/index.js';
5
7
  export * from './utils/helpers.js';
6
8
  export type * from './components/types.js';
7
9
  export type * from './conditions/types.js';
8
- export type * from './form/types.js';
10
+ export type * from './form/form-definition/types.js';
11
+ export type * from './form/form-metadata/types.js';
9
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,wCAAwC,CAAA;AACtD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,mCAAmC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/forms-model",
3
- "version": "3.0.165",
3
+ "version": "3.0.167",
4
4
  "description": "A hapi plugin providing the model for Defra forms",
5
5
  "homepage": "https://github.com/DEFRA/forms-designer/tree/main/model#readme",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- import { ComponentTypes } from '~/src/components/index.js'
1
+ import { ComponentTypes } from '~/src/components/component-types.js'
2
2
  import { type ComponentType } from '~/src/components/types.js'
3
3
 
4
4
  export class ConditionField {
@@ -2,7 +2,7 @@ import { ConditionsModel } from '~/src/conditions/condition-model.js'
2
2
  import {
3
3
  type ConditionRawData,
4
4
  type ConditionWrapperValue
5
- } from '~/src/form/types.js'
5
+ } from '~/src/form/form-definition/types.js'
6
6
 
7
7
  export class ConditionsWrapper {
8
8
  name: string
@@ -1,5 +1,5 @@
1
1
  import { type ComponentDef } from '~/src/components/types.js'
2
- import { type Page } from '~/src/form/types.js'
2
+ import { type Page } from '~/src/form/form-definition/types.js'
3
3
  import { clone } from '~/src/utils/helpers.js'
4
4
 
5
5
  export class InputWrapper {
package/src/index.ts CHANGED
@@ -1,8 +1,11 @@
1
1
  export * from '~/src/data-model/index.js'
2
- export * from '~/src/form/index.js'
2
+ export * from '~/src/form/form-configuration/index.js'
3
+ export * from '~/src/form/form-definition/index.js'
4
+ export * from '~/src/form/form-metadata/index.js'
3
5
  export * from '~/src/components/index.js'
4
6
  export * from '~/src/conditions/index.js'
5
7
  export * from '~/src/utils/helpers.js'
6
8
  export type * from '~/src/components/types.js'
7
9
  export type * from '~/src/conditions/types.js'
8
- export type * from '~/src/form/types.js'
10
+ export type * from '~/src/form/form-definition/types.js'
11
+ export type * from '~/src/form/form-metadata/types.js'
@@ -1,4 +0,0 @@
1
- export * from "./form-configuration/index.js";
2
- export * from "./form-definition/index.js";
3
- export * from "./form-metadata/index.js";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/form/index.ts"],"sourcesContent":["export * from '~/src/form/form-configuration/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-metadata/index.js'\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/form/types.ts"],"sourcesContent":["export type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- export * from '../form/form-configuration/index.js';
2
- export * from '../form/form-definition/index.js';
3
- export * from '../form/form-metadata/index.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAA;AACtD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA"}
@@ -1,3 +0,0 @@
1
- export type * from '../form/form-definition/types.js';
2
- export type * from '../form/form-metadata/types.js';
3
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/form/types.ts"],"names":[],"mappings":"AAAA,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,mCAAmC,CAAA"}
package/src/form/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from '~/src/form/form-configuration/index.js'
2
- export * from '~/src/form/form-definition/index.js'
3
- export * from '~/src/form/form-metadata/index.js'
package/src/form/types.ts DELETED
@@ -1,2 +0,0 @@
1
- export type * from '~/src/form/form-definition/types.js'
2
- export type * from '~/src/form/form-metadata/types.js'