create.config.ts 908 Bytes
import {
  TenantAttributesFieldsEnum,
  TenantAttributesFieldsNameEnum,
} from '../../../enum/formField/enrichment';
import { FormSchema, useComponentRegister } from '/@/components/Form';
import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration';

useComponentRegister('AttributeConfiguration', AttributeConfiguration);

export const formSchemas: FormSchema[] = [
  {
    field: TenantAttributesFieldsEnum.TELEMETRY,
    component: 'Checkbox',
    label: '',
    renderComponentContent: () => {
      return {
        default: () => TenantAttributesFieldsNameEnum.TELEMETRY,
      };
    },
  },
  {
    field: TenantAttributesFieldsEnum.ATTR_MAPING,
    component: 'AttributeConfiguration',
    label: TenantAttributesFieldsNameEnum.ATTR_MAPING,
    slot: TenantAttributesFieldsEnum.ATTR_MAPING,
    valueField: 'value',
    changeEvent: 'update:value',
  },
];