Skip to content

Releases: cognitoforms/model.js

Release 0.9.0

Choose a tag to compare

@mattheyan mattheyan released this 19 Apr 21:12

Fixed

  • Check isList when determining whether to create a list-length or string-length rule.
  • typing: Allow message and error functions to return null or undefined.
  • Avoid incorrect TS error because $namespace option is an object that does not already contain the model's types.

Changed

  • Add TEntity generic type arguments to various types
  • Rename ValueType -> ValueConstructor
  • Removed EntityType type alias (use EntityConstructor or EntityConstructorForType instead)

Added

  • Add generic types: EntityOfType, ObjectMetaOfType, TypeOfType, etc.
  • Add Model.create method with better type checking and inferencing.

Release 0.8.45

Choose a tag to compare

@mattheyan mattheyan released this 21 Nov 14:20

Changed

  • Use Object.defineProperty for fields of Entity and ObjectMeta.

Release 0.8.44

Choose a tag to compare

@mattheyan mattheyan released this 12 Jun 12:43

Fixed

  • Ignore undefined or invalid value for reference property in initial entity state

Release 0.8.43

Choose a tag to compare

@mattheyan mattheyan released this 09 Jun 13:18

Changed

  • Support passing additional args to all change events
  • Allow "setting" list properties via the property.value() method
  • Get rid of special case for list property default rules to run on init new
  • Get rid of unused event tracking code in the updateArray function

Fixed

  • Dont' ignore null value for reference property in initial entity state
  • Improve type checking of property options (i.e. identifier option)
  • Remove duplicate exports of 'initilization-context'
  • Always set pending init to true when a non-constant property initializes without an initializer,
    and ensure that it is consistently set to false when the property is set, the array is modified,
    or the property is included in the entity's initial state

Added

  • Added ES module build output

Release 0.8.42

Choose a tag to compare

@tskimmett tskimmett released this 26 Jan 16:31

Fixed

  • error: "Cannot read properties of null (reading 'ready')" when using async resolver and initializers

Release 0.8.41

Choose a tag to compare

@tskimmett tskimmett released this 03 Jan 20:43

Changed

  • change property initialization to use update after establishing a default property value

Release 0.8.40

Choose a tag to compare

@tskimmett tskimmett released this 14 Dec 15:34

Fixed

  • condition not applied to correct targets involving nested properties

Release 0.8.39

Choose a tag to compare

@tskimmett tskimmett released this 29 Nov 14:43

Added

  • init model extension option - used to control initialization of property

Changed

  • run set function on property init

Release 0.8.38

Choose a tag to compare

@mattheyan mattheyan released this 28 Nov 15:19

Fixed

  • Ensure that a change to a calculation triggers default calculations that depend on it

Release 0.8.37

Choose a tag to compare

@tskimmett tskimmett released this 11 Nov 15:23

Fixed

  • raise property change when default calculation rule runs for list