roamjs-components 0.87.0 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -79,6 +79,6 @@ export declare type ArrayField = PagesField | MultiTextField | CustomField | Blo
|
|
|
79
79
|
export declare type UnionField = ArrayField | TextField | TimeField | NumberField | OauthField | FlagField | SelectField | BlockField;
|
|
80
80
|
export declare type Field<T extends UnionField> = Omit<T, "type"> & {
|
|
81
81
|
title: string;
|
|
82
|
-
description:
|
|
82
|
+
description: React.ReactNode;
|
|
83
83
|
Panel: FieldPanel<T>;
|
|
84
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/ConfigPanels/types.ts"],"names":[],"mappings":"","sourcesContent":["import React from \"react\";\nimport type { InputTextNode } from \"../../types/native\";\nimport type { ExternalLoginOptions } from \"../ExternalLogin\";\n\nexport type OauthField = {\n type: \"oauth\";\n defaultValue?: [];\n options: ExternalLoginOptions;\n};\n\nexport type FieldPanel<T extends UnionField, U = Record<string, unknown>> = ((\n props: {\n order: number;\n uid?: string;\n parentUid: string;\n } & Omit<Field<T>, \"Panel\"> &\n U\n) => React.ReactElement) & { type: T[\"type\"] };\n\nexport type TextField = {\n type: \"text\";\n defaultValue?: string;\n options?: {\n placeholder?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n };\n};\n\nexport type TimeField = {\n type: \"time\";\n defaultValue?: Date;\n};\n\nexport type NumberField = {\n type: \"number\";\n defaultValue?: number;\n};\n\nexport type FlagField = {\n type: \"flag\";\n defaultValue?: boolean;\n disabled?: boolean;\n options?: {\n onChange?: (f: boolean, e: React.FormEvent<HTMLInputElement>) => void;\n };\n};\n\nexport type MultiTextField = {\n type: \"multitext\";\n defaultValue?: string[];\n options?: {\n placeholder?: string;\n };\n};\n\nexport type PagesField = {\n type: \"pages\";\n defaultValue?: string[];\n};\n\nexport type SelectField = {\n type: \"select\";\n defaultValue?: string;\n options: {\n items: string[] | (() => string[]);\n };\n};\n\nexport type BlockField = {\n type: \"block\";\n defaultValue?: InputTextNode;\n};\n\nexport type BlocksField = {\n type: \"blocks\";\n defaultValue?: InputTextNode[];\n};\n\nexport type CustomField = {\n type: \"custom\";\n defaultValue?: InputTextNode[];\n options: {\n component: React.FC<{\n parentUid: string;\n uid: string;\n defaultValue: InputTextNode[];\n title: string;\n }>;\n };\n};\n\nexport type ArrayField =\n | PagesField\n | MultiTextField\n | CustomField\n | BlocksField;\nexport type UnionField =\n | ArrayField\n | TextField\n | TimeField\n | NumberField\n | OauthField\n | FlagField\n | SelectField\n | BlockField;\n\nexport type Field<T extends UnionField> = Omit<T, \"type\"> & {\n title: string;\n description:
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/ConfigPanels/types.ts"],"names":[],"mappings":"","sourcesContent":["import React from \"react\";\nimport type { InputTextNode } from \"../../types/native\";\nimport type { ExternalLoginOptions } from \"../ExternalLogin\";\n\nexport type OauthField = {\n type: \"oauth\";\n defaultValue?: [];\n options: ExternalLoginOptions;\n};\n\nexport type FieldPanel<T extends UnionField, U = Record<string, unknown>> = ((\n props: {\n order: number;\n uid?: string;\n parentUid: string;\n } & Omit<Field<T>, \"Panel\"> &\n U\n) => React.ReactElement) & { type: T[\"type\"] };\n\nexport type TextField = {\n type: \"text\";\n defaultValue?: string;\n options?: {\n placeholder?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n };\n};\n\nexport type TimeField = {\n type: \"time\";\n defaultValue?: Date;\n};\n\nexport type NumberField = {\n type: \"number\";\n defaultValue?: number;\n};\n\nexport type FlagField = {\n type: \"flag\";\n defaultValue?: boolean;\n disabled?: boolean;\n options?: {\n onChange?: (f: boolean, e: React.FormEvent<HTMLInputElement>) => void;\n };\n};\n\nexport type MultiTextField = {\n type: \"multitext\";\n defaultValue?: string[];\n options?: {\n placeholder?: string;\n };\n};\n\nexport type PagesField = {\n type: \"pages\";\n defaultValue?: string[];\n};\n\nexport type SelectField = {\n type: \"select\";\n defaultValue?: string;\n options: {\n items: string[] | (() => string[]);\n };\n};\n\nexport type BlockField = {\n type: \"block\";\n defaultValue?: InputTextNode;\n};\n\nexport type BlocksField = {\n type: \"blocks\";\n defaultValue?: InputTextNode[];\n};\n\nexport type CustomField = {\n type: \"custom\";\n defaultValue?: InputTextNode[];\n options: {\n component: React.FC<{\n parentUid: string;\n uid: string;\n defaultValue: InputTextNode[];\n title: string;\n }>;\n };\n};\n\nexport type ArrayField =\n | PagesField\n | MultiTextField\n | CustomField\n | BlocksField;\nexport type UnionField =\n | ArrayField\n | TextField\n | TimeField\n | NumberField\n | OauthField\n | FlagField\n | SelectField\n | BlockField;\n\nexport type Field<T extends UnionField> = Omit<T, \"type\"> & {\n title: string;\n description: React.ReactNode;\n Panel: FieldPanel<T>;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.js","sourceRoot":"","sources":["../../src/components/Description.tsx"],"names":[],"mappings":";;;AAAA,4CAAkD;AAClD,0DAA0B;AAE1B,MAAM,WAAW,GAAG,CAAC,EACnB,WAAW,GAGZ,EAAsB,EAAE;IACvB,OAAO,CACL,wCACE,KAAK,EAAE;YACL,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,cAAc;YACvB,OAAO,EAAE,GAAG;YACZ,aAAa,EAAE,aAAa;SAC7B;QAED,8BAAC,cAAO,IACN,OAAO,EACL,wCAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,IACpD,WAAW,CACP;YAGT,8BAAC,WAAI,IAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,GAAI,CACjC,CACL,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC","sourcesContent":["import { Tooltip, Icon } from \"@blueprintjs/core\";\nimport React from \"react\";\n\nconst Description = ({\n description,\n}: {\n description:
|
|
1
|
+
{"version":3,"file":"Description.js","sourceRoot":"","sources":["../../src/components/Description.tsx"],"names":[],"mappings":";;;AAAA,4CAAkD;AAClD,0DAA0B;AAE1B,MAAM,WAAW,GAAG,CAAC,EACnB,WAAW,GAGZ,EAAsB,EAAE;IACvB,OAAO,CACL,wCACE,KAAK,EAAE;YACL,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,cAAc;YACvB,OAAO,EAAE,GAAG;YACZ,aAAa,EAAE,aAAa;SAC7B;QAED,8BAAC,cAAO,IACN,OAAO,EACL,wCAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,IACpD,WAAW,CACP;YAGT,8BAAC,WAAI,IAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,GAAI,CACjC,CACL,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC","sourcesContent":["import { Tooltip, Icon } from \"@blueprintjs/core\";\nimport React from \"react\";\n\nconst Description = ({\n description,\n}: {\n description: React.ReactNode;\n}): React.ReactElement => {\n return (\n <span\n style={{\n marginLeft: 12,\n display: \"inline-block\",\n opacity: 0.8,\n verticalAlign: \"text-bottom\",\n }}\n >\n <Tooltip\n content={\n <span style={{ maxWidth: 400, display: \"inline-block\" }}>\n {description}\n </span>\n }\n >\n <Icon icon={\"info-sign\"} iconSize={12} />\n </Tooltip>\n </span>\n );\n};\n\nexport default Description;\n"]}
|
package/package.json
CHANGED