@easy-editor/setters 0.0.6 → 0.1.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.
@@ -0,0 +1,12 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface AlignValue {
3
+ horizontal: 'left' | 'center' | 'right' | 'stretch';
4
+ vertical: 'top' | 'center' | 'bottom' | 'stretch';
5
+ }
6
+ export interface AlignSetterProps extends SetterProps<AlignValue> {
7
+ showHorizontal?: boolean;
8
+ showVertical?: boolean;
9
+ mode?: 'flex' | 'text';
10
+ }
11
+ declare const AlignSetter: (props: AlignSetterProps) => import("react").JSX.Element;
12
+ export default AlignSetter;
@@ -0,0 +1,10 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface ArraySetterProps extends SetterProps<unknown[]> {
3
+ itemSetter?: 'string' | 'number';
4
+ maxItems?: number;
5
+ minItems?: number;
6
+ placeholder?: string;
7
+ addButtonText?: string;
8
+ }
9
+ declare const ArraySetter: (props: ArraySetterProps) => import("react").JSX.Element;
10
+ export default ArraySetter;
@@ -0,0 +1,18 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface DataBindingValue {
3
+ type: 'static' | 'datasource';
4
+ staticValue?: unknown;
5
+ datasourceId?: string;
6
+ datasourcePath?: string;
7
+ }
8
+ export interface DataBindingSetterProps extends SetterProps<DataBindingValue> {
9
+ dataType?: 'string' | 'number' | 'boolean' | 'array' | 'object' | 'any';
10
+ showPreview?: boolean;
11
+ staticSetter?: string;
12
+ dataSources?: Array<{
13
+ id: string;
14
+ name: string;
15
+ }>;
16
+ }
17
+ declare const DataBindingSetter: (props: DataBindingSetterProps) => import("react").JSX.Element;
18
+ export default DataBindingSetter;
@@ -0,0 +1,21 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface DataMappingItem {
3
+ targetField: string;
4
+ sourceField: string;
5
+ transform?: string;
6
+ }
7
+ export interface DataMappingValue {
8
+ mappings: DataMappingItem[];
9
+ }
10
+ export interface TargetFieldConfig {
11
+ name: string;
12
+ label: string;
13
+ type: 'string' | 'number' | 'boolean' | 'array';
14
+ required?: boolean;
15
+ }
16
+ export interface DataMappingSetterProps extends SetterProps<DataMappingValue> {
17
+ targetFields: TargetFieldConfig[];
18
+ sourceFields?: string[];
19
+ }
20
+ declare const DataMappingSetter: (props: DataMappingSetterProps) => import("react").JSX.Element;
21
+ export default DataMappingSetter;
@@ -0,0 +1,9 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface IconValue {
3
+ name: string;
4
+ }
5
+ export interface IconSetterProps extends SetterProps<IconValue> {
6
+ recent?: boolean;
7
+ }
8
+ declare const IconSetter: (props: IconSetterProps) => import("react").JSX.Element;
9
+ export default IconSetter;
@@ -0,0 +1,7 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface JsonSetterProps extends SetterProps<unknown> {
3
+ placeholder?: string;
4
+ rows?: number;
5
+ }
6
+ declare const JsonSetter: (props: JsonSetterProps) => import("react").JSX.Element;
7
+ export default JsonSetter;
@@ -0,0 +1,14 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface ObjectField {
3
+ key: string;
4
+ label: string;
5
+ type?: 'string' | 'number';
6
+ placeholder?: string;
7
+ }
8
+ export interface ObjectSetterProps extends SetterProps<Record<string, unknown>> {
9
+ fields?: ObjectField[];
10
+ allowCustomFields?: boolean;
11
+ addFieldText?: string;
12
+ }
13
+ declare const ObjectSetter: (props: ObjectSetterProps) => import("react").JSX.Element;
14
+ export default ObjectSetter;
@@ -0,0 +1,12 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface SegmentedOption {
3
+ label: string;
4
+ value: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface SegmentedSetterProps extends SetterProps<string> {
8
+ options?: SegmentedOption[];
9
+ size?: 'sm' | 'md';
10
+ }
11
+ declare const SegmentedSetter: (props: SegmentedSetterProps) => import("react").JSX.Element;
12
+ export default SegmentedSetter;
@@ -0,0 +1,12 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface SelectOption {
3
+ label: string;
4
+ value: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface SelectSetterProps extends SetterProps<string> {
8
+ options?: SelectOption[];
9
+ placeholder?: string;
10
+ }
11
+ declare const SelectSetter: (props: SelectSetterProps) => import("react").JSX.Element;
12
+ export default SelectSetter;
@@ -0,0 +1,10 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface SliderSetterProps extends SetterProps<number> {
3
+ min?: number;
4
+ max?: number;
5
+ step?: number;
6
+ showValue?: boolean;
7
+ suffix?: string;
8
+ }
9
+ declare const SliderSetter: (props: SliderSetterProps) => import("react").JSX.Element;
10
+ export default SliderSetter;
@@ -0,0 +1,15 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface SpacingValue {
3
+ top: number;
4
+ right: number;
5
+ bottom: number;
6
+ left: number;
7
+ }
8
+ export interface SpacingSetterProps extends SetterProps<SpacingValue> {
9
+ mode?: 'padding' | 'margin';
10
+ linked?: boolean;
11
+ min?: number;
12
+ max?: number;
13
+ }
14
+ declare const SpacingSetter: (props: SpacingSetterProps) => import("react").JSX.Element;
15
+ export default SpacingSetter;
@@ -1,5 +1,8 @@
1
1
  import type { SetterProps } from '@easy-editor/core';
2
2
  export interface SwitchSetterProps extends SetterProps<boolean> {
3
+ mode?: 'switch' | 'checkbox' | 'segmented';
4
+ trueLabel?: string;
5
+ falseLabel?: string;
3
6
  }
4
7
  declare const SwitchSetter: (props: SwitchSetterProps) => import("react").JSX.Element;
5
8
  export default SwitchSetter;
@@ -0,0 +1,8 @@
1
+ import type { SetterProps } from '@easy-editor/core';
2
+ export interface TextAreaSetterProps extends SetterProps<string> {
3
+ placeholder?: string;
4
+ rows?: number;
5
+ maxLength?: number;
6
+ }
7
+ declare const TextAreaSetter: (props: TextAreaSetterProps) => import("react").JSX.Element;
8
+ export default TextAreaSetter;