@oneclick.dev/cms-kit 0.0.121 → 0.0.123
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.
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.ts +1 -1
- package/dist/charts.js +1 -1
- package/dist/cms-kit.cjs +1 -1
- package/dist/cms-kit.js +1 -1
- package/dist/components.cjs +81 -60
- package/dist/components.css +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +93 -68
- package/dist/composables-8bnxjg0G.cjs +1 -0
- package/dist/composables-DQepEP7n.js +1 -0
- package/dist/flow-builder.cjs +1 -1
- package/dist/flow-builder.d.ts +1 -1
- package/dist/flow-builder.js +1 -1
- package/dist/index-Bv9gy746.js +82 -0
- package/dist/index-Cb1ikz7J.cjs +82 -0
- package/dist/index-DPMTYxRM.cjs +1 -0
- package/dist/index-IJyvgbJH.cjs +1 -0
- package/dist/index-YMaY4uuk.js +1 -0
- package/dist/index-lmHRQuzf.js +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +564 -4
- package/package.json +56 -57
- package/dist/chart-CAmUIEtB.js +0 -82
- package/dist/chart-DJkKL3jS.cjs +0 -82
- package/dist/chunk-DY6MoR0Z.cjs +0 -1
- package/dist/chunk-DpHrC4oO.js +0 -1
- package/dist/components/ui/chart/ChartContainer.vue.d.ts +0 -25
- package/dist/components/ui/chart/ChartLegendContent.vue.d.ts +0 -12
- package/dist/components/ui/chart/ChartStyle.vue.d.ts +0 -7
- package/dist/components/ui/chart/ChartTooltipContent.vue.d.ts +0 -32
- package/dist/components/ui/flow-builder/components/nodes/NodeContextMenu.vue.d.ts +0 -32
- package/dist/components/ui/flow-builder/components/toolbars/DefaultToolbar.vue.d.ts +0 -43
- package/dist/composables/index.d.ts +0 -2
- package/dist/composables/useCms.d.ts +0 -4
- package/dist/composables-B025TiVC.js +0 -1
- package/dist/composables-DSF8jtq1.cjs +0 -1
- package/dist/dist-CJX2bd1a.cjs +0 -1
- package/dist/dist-CL6Px27r.js +0 -1
- package/dist/flow-builder-BsoABRwv.cjs +0 -1
- package/dist/flow-builder-D_IHjMdV.js +0 -1
- package/dist/lib/composables.d.ts +0 -312
- package/dist/lib/interpolation.d.ts +0 -14
- package/dist/lib/postMessageAwait.d.ts +0 -1
- package/dist/lib/utils.d.ts +0 -16
- package/dist/types/custom-modules.d.ts +0 -117
- package/dist/types/index.d.ts +0 -2
- package/dist/types/integrations.d.ts +0 -21
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
export interface ModuleMetadata {
|
|
2
|
-
name: string;
|
|
3
|
-
description: string;
|
|
4
|
-
icon?: string;
|
|
5
|
-
version?: string;
|
|
6
|
-
author?: string;
|
|
7
|
-
tags?: string[];
|
|
8
|
-
}
|
|
9
|
-
export type SettingType = 'checkbox' | 'input' | 'textarea' | 'select' | 'radio' | 'number' | 'color' | 'resource' | 'mediaSource' | 'dataQuery' | 'flow' | 'form';
|
|
10
|
-
export interface BaseSetting<T> {
|
|
11
|
-
label: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
type: SettingType;
|
|
14
|
-
default?: T;
|
|
15
|
-
required?: boolean;
|
|
16
|
-
valuesFrom?: string;
|
|
17
|
-
visibility?: {
|
|
18
|
-
dependsOn: string[];
|
|
19
|
-
visibleWhen: Record<string, (val: any) => boolean>;
|
|
20
|
-
enabledWhen?: Record<string, (val: any) => boolean>;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export interface SelectSetting extends BaseSetting<string> {
|
|
24
|
-
type: 'select' | 'radio';
|
|
25
|
-
options?: {
|
|
26
|
-
label: string;
|
|
27
|
-
value: string;
|
|
28
|
-
}[];
|
|
29
|
-
predefinedOptions?: 'languages' | 'countries' | 'timezones' | 'currencies';
|
|
30
|
-
multiple?: boolean;
|
|
31
|
-
}
|
|
32
|
-
export interface CheckboxSetting extends BaseSetting<boolean> {
|
|
33
|
-
type: 'checkbox';
|
|
34
|
-
}
|
|
35
|
-
export interface InputSetting extends BaseSetting<string> {
|
|
36
|
-
type: 'input' | 'textarea' | 'color';
|
|
37
|
-
}
|
|
38
|
-
export interface NumberSetting extends BaseSetting<number> {
|
|
39
|
-
type: 'number';
|
|
40
|
-
}
|
|
41
|
-
export interface ResourceSetting extends BaseSetting<string> {
|
|
42
|
-
type: 'resource';
|
|
43
|
-
accept?: string[];
|
|
44
|
-
}
|
|
45
|
-
export interface MediaSourceSetting extends BaseSetting<string> {
|
|
46
|
-
type: 'mediaSource';
|
|
47
|
-
multiple?: boolean;
|
|
48
|
-
}
|
|
49
|
-
export interface DataQuerySetting extends BaseSetting<string> {
|
|
50
|
-
type: 'dataQuery';
|
|
51
|
-
accept?: string[];
|
|
52
|
-
integrationKey?: string;
|
|
53
|
-
}
|
|
54
|
-
export interface FlowSetting extends BaseSetting<any> {
|
|
55
|
-
type: 'flow';
|
|
56
|
-
}
|
|
57
|
-
export interface FormSetting extends BaseSetting<any> {
|
|
58
|
-
type: 'form';
|
|
59
|
-
}
|
|
60
|
-
export type ModuleSetting = SelectSetting | CheckboxSetting | InputSetting | NumberSetting | ResourceSetting | MediaSourceSetting | DataQuerySetting | FlowSetting | FormSetting;
|
|
61
|
-
export type ModuleSettingsSchema = Record<string, ModuleSetting>;
|
|
62
|
-
/** ----------------- config groups ----------------- **/
|
|
63
|
-
export type ConditionOperator = 'isNotEmpty' | 'isEmpty' | 'equals' | 'notEquals';
|
|
64
|
-
export interface FieldCondition {
|
|
65
|
-
operator: ConditionOperator;
|
|
66
|
-
value?: any;
|
|
67
|
-
}
|
|
68
|
-
export type GroupConditions = Record<string, ConditionOperator | FieldCondition>;
|
|
69
|
-
export interface SettingGroup<F extends ModuleSettingsSchema = ModuleSettingsSchema> {
|
|
70
|
-
_group: true;
|
|
71
|
-
label?: string;
|
|
72
|
-
description?: string;
|
|
73
|
-
visibleWhen: GroupConditions;
|
|
74
|
-
fields: F;
|
|
75
|
-
}
|
|
76
|
-
export type ModuleConfigSchema = Record<string, ModuleSetting | SettingGroup>;
|
|
77
|
-
export declare function configGroup<const F extends ModuleSettingsSchema>(opts: {
|
|
78
|
-
label?: string;
|
|
79
|
-
description?: string;
|
|
80
|
-
visibleWhen: GroupConditions;
|
|
81
|
-
fields: F & ValidateSettingDefaults<F>;
|
|
82
|
-
}): SettingGroup<F>;
|
|
83
|
-
/** Evaluate group conditions against current config values */
|
|
84
|
-
export declare function evaluateGroupConditions(conditions: GroupConditions, configValues: Record<string, any>): boolean;
|
|
85
|
-
/** Flatten a ModuleConfigSchema (with possible groups) into a flat settings map */
|
|
86
|
-
export declare function flattenConfigSchema(schema: ModuleConfigSchema): ModuleSettingsSchema;
|
|
87
|
-
/** ----------------- value typing ----------------- **/
|
|
88
|
-
type ScalarForType<T extends SettingType> = T extends 'checkbox' ? boolean : T extends 'number' ? number : T extends 'input' | 'textarea' | 'color' | 'resource' | 'dataQuery' ? string : T extends 'mediaSource' ? string : T extends 'select' | 'radio' ? string : T extends 'flow' ? any : T extends 'form' ? any : never;
|
|
89
|
-
type ArrayizeIfMultiple<S, TSetting> = TSetting extends {
|
|
90
|
-
multiple: true;
|
|
91
|
-
} ? S[] : S;
|
|
92
|
-
type ValueTypeFromSetting<TSetting extends ModuleSetting> = ArrayizeIfMultiple<ScalarForType<TSetting['type']>, TSetting>;
|
|
93
|
-
type Simplify<T> = {
|
|
94
|
-
[K in keyof T]: T[K];
|
|
95
|
-
};
|
|
96
|
-
type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
97
|
-
type TopLevelValues<TSchema extends ModuleConfigSchema> = {
|
|
98
|
-
[K in keyof TSchema as TSchema[K] extends ModuleSetting ? K : never]: TSchema[K] extends ModuleSetting ? ValueTypeFromSetting<TSchema[K]> : never;
|
|
99
|
-
};
|
|
100
|
-
type GroupFieldValues<TSchema extends ModuleConfigSchema> = {
|
|
101
|
-
[K in keyof TSchema]: TSchema[K] extends SettingGroup<infer F> ? {
|
|
102
|
-
[FK in keyof F]: ValueTypeFromSetting<F[FK]>;
|
|
103
|
-
} : {};
|
|
104
|
-
}[keyof TSchema];
|
|
105
|
-
export type ResolveConfig<TSchema extends ModuleConfigSchema> = Simplify<TopLevelValues<TSchema> & UnionToIntersection<GroupFieldValues<TSchema>>>;
|
|
106
|
-
type ValidateSettingDefaults<TSchema extends ModuleSettingsSchema> = {
|
|
107
|
-
[K in keyof TSchema]: TSchema[K] extends {
|
|
108
|
-
default: infer D;
|
|
109
|
-
} ? (D extends ValueTypeFromSetting<TSchema[K]> ? TSchema[K] : never) : TSchema[K];
|
|
110
|
-
};
|
|
111
|
-
type ValidateDefaults<TSchema extends ModuleConfigSchema> = {
|
|
112
|
-
[K in keyof TSchema]: TSchema[K] extends SettingGroup ? TSchema[K] : TSchema[K] extends ModuleSetting ? TSchema[K] extends {
|
|
113
|
-
default: infer D;
|
|
114
|
-
} ? (D extends ValueTypeFromSetting<TSchema[K]> ? TSchema[K] : never) : TSchema[K] : TSchema[K];
|
|
115
|
-
};
|
|
116
|
-
export declare function defineModuleConfig<const S extends ModuleConfigSchema>(schema: S & ValidateDefaults<S>): S & ValidateDefaults<S>;
|
|
117
|
-
export {};
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface FirestoreQueryParams {
|
|
2
|
-
filters?: FirestoreQueryParamFilter[];
|
|
3
|
-
sorts?: FirestoreQueryParamSort[];
|
|
4
|
-
limit?: number;
|
|
5
|
-
startAt?: string;
|
|
6
|
-
endAt?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface FirestoreQueryParamFilter {
|
|
9
|
-
field: string;
|
|
10
|
-
operator: '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'not-in' | 'array-contains-any';
|
|
11
|
-
value: any;
|
|
12
|
-
}
|
|
13
|
-
export interface FirestoreQueryParamSort {
|
|
14
|
-
field: string;
|
|
15
|
-
direction: 'asc' | 'desc';
|
|
16
|
-
}
|
|
17
|
-
export interface SendMailParams {
|
|
18
|
-
to: string;
|
|
19
|
-
subject: string;
|
|
20
|
-
body: string;
|
|
21
|
-
}
|