UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

113 lines 3.13 kB
import { ValidatorFn } from '@angular/forms'; export interface TenantPropertyDefinition { id: string; defaultValue: number | string | boolean | null; type: 'text' | 'checkbox' | 'number' | 'select'; label: string; validators: ValidatorFn[]; placeholder?: string; } /** * Define all hardTyped tenant form fields, checkboxes and select elements. * * while still benefiting from hard typing, thanks to "satisfies" keyword */ declare const tenantPropertiesDefinitions: { tenantID: { id: string; validators: any[]; defaultValue: any; type: "text"; label: "ID"; }; domain: { id: string; validators: ValidatorFn[]; defaultValue: any; type: "text"; label: "Domain/URL"; placeholder: "e.g. my-tenant`used in URL`"; }; companyName: { id: string; validators: ValidatorFn[]; defaultValue: any; type: "text"; label: "Name"; placeholder: "e.g. Company A"; }; contactName: { id: string; validators: ValidatorFn[]; defaultValue: any; type: "text"; label: "Contact name"; placeholder: "e.g. Joe Doe`LOCALIZE`"; }; contactPhone: { id: string; validators: ValidatorFn[]; defaultValue: any; type: "text"; label: "Contact phone"; placeholder: "e.g. +49 9 876 543 210`LOCALIZE`"; }; administratorEmail: { id: string; validators: ValidatorFn[]; defaultValue: any; type: "text"; label: "Administrator's email"; placeholder: "e.g. joe.doe@example.com`LOCALIZE`"; }; administratorUsername: { id: string; validators: ValidatorFn[]; defaultValue: any; type: "text"; label: "Administrator's username"; placeholder: "e.g. joe`LOCALIZE`"; }; externalReference: { id: string; validators: any[]; defaultValue: any; type: "text"; label: "External reference"; placeholder: "e.g. REF12345`reference number`"; }; sendPasswordResetEmail: { id: string; validators: any[]; defaultValue: true; type: "checkbox"; label: "Send password reset link as email"; }; tenantPolicy: { id: string; validators: any[]; defaultValue: any; type: "select"; label: "Tenant policy"; }; allowCreateTenants: { id: string; validators: any[]; defaultValue: any; type: "checkbox"; label: "Allow creation of subtenants"; }; gainsightEnabled: { id: string; validators: any[]; defaultValue: false; type: "checkbox"; label: "Enable Gainsight product experience tracking"; }; }; type TenantPropertiesKeys = keyof typeof tenantPropertiesDefinitions; export declare const tenantFormInputsDefinitions: { [K in TenantPropertiesKeys]: TenantPropertyDefinition; }; export {}; //# sourceMappingURL=tenant-form-inputs-definitions.d.ts.map