{"version":3,"file":"standardTransformersRegistry.cjs","sources":["../../../src/transformations/standardTransformersRegistry.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { DataFrame } from '../types/dataFrame';\nimport { DataTransformerInfo } from '../types/transformations';\nimport { Registry, RegistryItem } from '../utils/Registry';\n\nexport interface TransformerUIProps<T> {\n  /**\n   * Transformer configuration, persisted on panel's model\n   */\n  options: T;\n  /**\n   * Pre-transform data frames\n   */\n  input: DataFrame[];\n  onChange: (options: T) => void;\n}\n\nexport interface TransformerRegistryItem<TOptions = any> extends RegistryItem {\n  /**\n   * Object describing transformer configuration\n   */\n  transformation: DataTransformerInfo<TOptions>;\n\n  /** Markdown with more detailed description and help */\n  help?: string;\n\n  /**\n   * React component used as UI for the transformer\n   */\n  editor: React.ComponentType<TransformerUIProps<TOptions>>;\n\n  /**\n   * Set of categories associated with the transformer\n   */\n  categories?: Set<TransformerCategory>;\n\n  /**\n   * Set of tags associated with the transformer for improved transformation search\n   */\n  tags?: Set<string>;\n\n  /**\n   * Image representing the transformer, for dark themes\n   */\n  imageDark: string;\n\n  /**\n   * Image representing the transformer, for light themes\n   */\n  imageLight: string;\n}\n\nexport enum TransformerCategory {\n  Combine = 'combine',\n  CalculateNewFields = 'calculateNewFields',\n  CreateNewVisualization = 'createNewVisualization',\n  Filter = 'filter',\n  PerformSpatialOperations = 'performSpatialOperations',\n  Reformat = 'reformat',\n  ReorderAndRename = 'reorderAndRename',\n}\n\n/**\n * Registry of transformation options that can be driven by\n * stored configuration files.\n */\nexport const standardTransformersRegistry = new Registry<TransformerRegistryItem>();\n"],"names":["TransformerCategory","Registry"],"mappings":";;;;;;;AAqDO,IAAK,mBAAA,qBAAAA,oBAAAA,KAAL;AACL,EAAAA,qBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,qBAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,qBAAA,wBAAA,CAAA,GAAyB,wBAAA;AACzB,EAAAA,qBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,qBAAA,0BAAA,CAAA,GAA2B,0BAAA;AAC3B,EAAAA,qBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,qBAAA,kBAAA,CAAA,GAAmB,kBAAA;AAPT,EAAA,OAAAA,oBAAAA;AAAA,CAAA,EAAA,mBAAA,IAAA,EAAA;AAcL,MAAM,4BAAA,GAA+B,IAAIC,iBAAA;;;;;"}