Module: decorators

Methods

(static) addDeprecationWarnings()

Add deprecation warnings for deprecated legacy data model properties.

This method may be removed in a future version whence all deprecations are removed.

This:

(static) addFriendlierDrillDownMapKeys()

This:

(static) injectCode(dataModel)

Inject fallback methods into data model when not implemented by data model.

This:
Parameters:
Name Type Description
dataModel DataModel

(static) injectDefaulthooks(dataModel)

This:
Parameters:
Name Type Description
dataModel DataModel

(static) injectPolyfills(dataModel)

Injects missing utility functions into the data model.

Typically, data models are extended from datasaur-base which supplies the utility functions. However, extending from datasaur-base is not a requirement and for those data models that do not, the necessary utility functions are injected here.

The only utility function so injected at this time is install, which is used by:

  • injectCode to:
    • Inject fallbacks for missing non-essential data model methods
    • Bind the data model's dispatchEvent method to the grid instance
  • injectDefaulthooks to:
    • Inject a default for the getCell hook
    • Inject a default for the getCellEditorAt hook
This:
Parameters:
Name Type Description
dataModel DataModel