{"version":3,"file":"nullMatchers.cjs","sources":["../../../../../src/transformations/matchers/valueMatchers/nullMatchers.ts"],"sourcesContent":["import { Field } from '../../../types/dataFrame';\nimport { ValueMatcherInfo } from '../../../types/transformations';\nimport { ValueMatcherID } from '../ids';\n\nimport { ValueMatcherOptions } from './types';\n\nconst isNullValueMatcher: ValueMatcherInfo<ValueMatcherOptions> = {\n  id: ValueMatcherID.isNull,\n  name: 'Is null',\n  description: 'Match where value for given field is null.',\n  get: () => {\n    return (valueIndex: number, field: Field) => {\n      const value = field.values[valueIndex];\n      return value == null;\n    };\n  },\n  getOptionsDisplayText: () => {\n    return `Matches all rows where field is null.`;\n  },\n  isApplicable: () => true,\n  getDefaultOptions: () => ({}),\n};\n\nconst isNotNullValueMatcher: ValueMatcherInfo<ValueMatcherOptions> = {\n  id: ValueMatcherID.isNotNull,\n  name: 'Is not null',\n  description: 'Match where value for given field is not null.',\n  get: () => {\n    return (valueIndex: number, field: Field) => {\n      const value = field.values[valueIndex];\n      return value != null;\n    };\n  },\n  getOptionsDisplayText: () => {\n    return `Matches all rows where field is not null.`;\n  },\n  isApplicable: () => true,\n  getDefaultOptions: () => ({}),\n};\n\nexport const getNullValueMatchers = (): ValueMatcherInfo[] => [isNullValueMatcher, isNotNullValueMatcher];\n"],"names":["ValueMatcherID"],"mappings":";;;;;;;AAMA,MAAM,kBAAA,GAA4D;AAAA,EAChE,IAAIA,kBAAA,CAAe,MAAA;AAAA,EACnB,IAAA,EAAM,SAAA;AAAA,EACN,WAAA,EAAa,4CAAA;AAAA,EACb,KAAK,MAAM;AACT,IAAA,OAAO,CAAC,YAAoB,KAAA,KAAiB;AAC3C,MAAA,MAAM,KAAA,GAAQ,KAAA,CAAM,MAAA,CAAO,UAAU,CAAA;AACrC,MAAA,OAAO,KAAA,IAAS,IAAA;AAAA,IAClB,CAAA;AAAA,EACF,CAAA;AAAA,EACA,uBAAuB,MAAM;AAC3B,IAAA,OAAO,CAAA,qCAAA,CAAA;AAAA,EACT,CAAA;AAAA,EACA,cAAc,MAAM,IAAA;AAAA,EACpB,iBAAA,EAAmB,OAAO,EAAC;AAC7B,CAAA;AAEA,MAAM,qBAAA,GAA+D;AAAA,EACnE,IAAIA,kBAAA,CAAe,SAAA;AAAA,EACnB,IAAA,EAAM,aAAA;AAAA,EACN,WAAA,EAAa,gDAAA;AAAA,EACb,KAAK,MAAM;AACT,IAAA,OAAO,CAAC,YAAoB,KAAA,KAAiB;AAC3C,MAAA,MAAM,KAAA,GAAQ,KAAA,CAAM,MAAA,CAAO,UAAU,CAAA;AACrC,MAAA,OAAO,KAAA,IAAS,IAAA;AAAA,IAClB,CAAA;AAAA,EACF,CAAA;AAAA,EACA,uBAAuB,MAAM;AAC3B,IAAA,OAAO,CAAA,yCAAA,CAAA;AAAA,EACT,CAAA;AAAA,EACA,cAAc,MAAM,IAAA;AAAA,EACpB,iBAAA,EAAmB,OAAO,EAAC;AAC7B,CAAA;AAEO,MAAM,oBAAA,GAAuB,MAA0B,CAAC,kBAAA,EAAoB,qBAAqB;;;;"}