Moving RichText group

This commit is contained in:
Harini Janakiraman
2021-09-11 19:35:36 +10:00
parent 28f9293e08
commit a8a197667d
4 changed files with 10 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ import { FieldType } from "constants/fields";
export const SELECTABLE_TYPES = [
FieldType.shortText,
FieldType.longText,
FieldType.richText,
FieldType.email,
FieldType.phone,
@@ -25,14 +26,16 @@ export const SELECTABLE_TYPES = [
FieldType.json,
FieldType.code,
FieldType.richText,
FieldType.color,
FieldType.slider,
];
export const REGEX_EMAIL = /([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)/;
export const REGEX_PHONE = /(([+][(]?[0-9]{1,3}[)]?)|([(]?[0-9]{4}[)]?))\s*[)]?[-\s\.]?[(]?[0-9]{1,3}[)]?([-\s\.]?[0-9]{3})([-\s\.]?[0-9]{3,4})/;
export const REGEX_URL = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/;
export const REGEX_EMAIL =
/([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)/;
export const REGEX_PHONE =
/(([+][(]?[0-9]{1,3}[)]?)|([(]?[0-9]{4}[)]?))\s*[)]?[-\s\.]?[(]?[0-9]{1,3}[)]?([-\s\.]?[0-9]{3})([-\s\.]?[0-9]{3,4})/;
export const REGEX_URL =
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/;
export const REGEX_HTML = /<\/?[a-z][\s\S]*>/;
const inferTypeFromValue = (value: any) => {

View File

@@ -19,7 +19,7 @@ const SideDrawerField = lazy(
export const config: IFieldConfig = {
type: FieldType.richText,
name: "Rich Text",
group: "Code",
group: "Text",
dataType: "string",
initialValue: "",
initializable: true,

View File

@@ -7,6 +7,7 @@ import { IFieldConfig } from "./types";
// Import field configs
import ShortText from "./ShortText";
import LongText from "./LongText";
import RichText from "./RichText";
import Email from "./Email";
import Phone from "./Phone";
import Url from "./Url";
@@ -28,7 +29,6 @@ import ConnectTable from "./ConnectTable";
import ConnectService from "./ConnectService";
import Json from "./Json";
import Code from "./Code";
import RichText from "./RichText";
import Action from "./Action";
import Derivative from "./Derivative";
import Aggregate from "./Aggregate";

View File

@@ -3,6 +3,7 @@ export enum FieldType {
// TEXT
shortText = "SIMPLE_TEXT",
longText = "LONG_TEXT",
richText = "RICH_TEXT",
email = "EMAIL",
phone = "PHONE_NUMBER",
url = "URL",
@@ -30,7 +31,6 @@ export enum FieldType {
// CODE
json = "JSON",
code = "CODE",
richText = "RICH_TEXT",
// CLOUD FUNCTION
action = "ACTION",
derivative = "DERIVATIVE",