@flexkit/studio 0.0.36 → 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.
- package/README.md +81 -0
- package/dist/astro.d.ts +3 -5
- package/dist/astro.js +3 -8
- package/dist/chat-page-NWMI4XOE.js +2 -0
- package/dist/chat-page-NWMI4XOE.js.map +1 -0
- package/dist/chunk-2DXR5NJV.js +2 -0
- package/dist/chunk-2DXR5NJV.js.map +1 -0
- package/dist/chunk-3CPWATOI.js +2 -0
- package/dist/chunk-3CPWATOI.js.map +1 -0
- package/dist/chunk-5DHOBLAE.js +2 -0
- package/dist/chunk-5DHOBLAE.js.map +1 -0
- package/dist/chunk-6LYEDKFY.js +7 -0
- package/dist/chunk-6LYEDKFY.js.map +1 -0
- package/dist/chunk-7PDYCDX6.js +2 -0
- package/dist/chunk-7PDYCDX6.js.map +1 -0
- package/dist/chunk-7SK5YPHT.js +2 -0
- package/dist/chunk-7SK5YPHT.js.map +1 -0
- package/dist/chunk-AKQ6ELDX.js +2 -0
- package/dist/chunk-AKQ6ELDX.js.map +1 -0
- package/dist/{chunk-POQX5GIA.js → chunk-C2BPRGGQ.js} +47 -172
- package/dist/chunk-CSUHZFEP.js +2 -0
- package/dist/chunk-CSUHZFEP.js.map +1 -0
- package/dist/chunk-G4PYYHI3.js +2 -0
- package/dist/chunk-G4PYYHI3.js.map +1 -0
- package/dist/chunk-GZIMMYLK.js +2 -0
- package/dist/chunk-GZIMMYLK.js.map +1 -0
- package/dist/chunk-HROHAMPM.js +3 -0
- package/dist/chunk-HROHAMPM.js.map +1 -0
- package/dist/chunk-NNA4MLFC.js +3 -0
- package/dist/chunk-NNA4MLFC.js.map +1 -0
- package/dist/chunk-NSYO57O3.js +5 -0
- package/dist/chunk-NSYO57O3.js.map +1 -0
- package/dist/chunk-ODORXGGY.js +2 -0
- package/dist/chunk-ODORXGGY.js.map +1 -0
- package/dist/chunk-OUSEULBR.js +384 -0
- package/dist/chunk-OUSEULBR.js.map +1 -0
- package/dist/chunk-P6BZ4QP7.js +2 -0
- package/dist/chunk-P6BZ4QP7.js.map +1 -0
- package/dist/chunk-QQUNCDUB.js +2 -0
- package/dist/chunk-QQUNCDUB.js.map +1 -0
- package/dist/chunk-SZEGGBOC.js +2 -0
- package/dist/chunk-SZEGGBOC.js.map +1 -0
- package/dist/chunk-W2EBZZAY.js +3 -0
- package/dist/chunk-W2EBZZAY.js.map +1 -0
- package/dist/chunk-YINI2YKQ.js +4 -0
- package/dist/chunk-YINI2YKQ.js.map +1 -0
- package/dist/{core-handler-C3xC98bN.d.ts → core-handler-XAVVKLhV.d.ts} +0 -3
- package/dist/edit-entity-PVT34FD7.js +2 -0
- package/dist/edit-entity-PVT34FD7.js.map +1 -0
- package/dist/index.css +1402 -0
- package/dist/index.d.ts +433 -33
- package/dist/index.js +12 -395
- package/dist/index.js.map +1 -1
- package/dist/list-SQCN7HA3.js +2 -0
- package/dist/list-SQCN7HA3.js.map +1 -0
- package/dist/nextjs.d.ts +61 -56
- package/dist/nextjs.js +3 -8
- package/dist/pages-OIAPASPF.js +3 -0
- package/dist/pages-OIAPASPF.js.map +1 -0
- package/dist/plugin-pages-AHOA6YJE.js +2 -0
- package/dist/plugin-pages-AHOA6YJE.js.map +1 -0
- package/dist/project-selector-72VM6SUI.js +2 -0
- package/dist/project-selector-72VM6SUI.js.map +1 -0
- package/dist/root-4FGNRGCD.js +23 -0
- package/dist/root-4FGNRGCD.js.map +1 -0
- package/dist/root-5ZW536V7.js +2 -0
- package/dist/root-5ZW536V7.js.map +1 -0
- package/dist/root-IIILTOJI.js +31 -0
- package/dist/root-IIILTOJI.js.map +1 -0
- package/dist/root-QPQQ3DFJ.js +2 -0
- package/dist/root-QPQQ3DFJ.js.map +1 -0
- package/dist/search-2K2BU4UU.js +2 -0
- package/dist/{search-XKG5A7XM.js.map → search-2K2BU4UU.js.map} +1 -1
- package/dist/skills-pages-PSBRTFGK.js +2 -0
- package/dist/skills-pages-PSBRTFGK.js.map +1 -0
- package/dist/tanstack-start.d.ts +4 -6
- package/dist/tanstack-start.js +5 -12
- package/dist/ui.d.ts +5 -7
- package/dist/ui.js +1 -6
- package/dist/ui.js.map +1 -1
- package/dist/user-nav-QZFCICK3.js +2 -0
- package/dist/{user-nav-LSEOOH4E.js.map → user-nav-QZFCICK3.js.map} +1 -1
- package/package.json +30 -12
- package/dist/asset-3XMRPTA5.js +0 -2
- package/dist/asset-3XMRPTA5.js.map +0 -1
- package/dist/boolean-MTD44LXP.js +0 -2
- package/dist/boolean-MTD44LXP.js.map +0 -1
- package/dist/chunk-3VOTTOJT.js +0 -2
- package/dist/chunk-3VOTTOJT.js.map +0 -1
- package/dist/chunk-5I7Q5ODB.js +0 -2
- package/dist/chunk-5I7Q5ODB.js.map +0 -1
- package/dist/chunk-6NRQMG26.js +0 -2
- package/dist/chunk-6NRQMG26.js.map +0 -1
- package/dist/chunk-6V73336R.js +0 -623
- package/dist/chunk-7BOX7HHO.js +0 -2
- package/dist/chunk-7BOX7HHO.js.map +0 -1
- package/dist/chunk-7JFLGBWE.js +0 -2
- package/dist/chunk-7JFLGBWE.js.map +0 -1
- package/dist/chunk-7ZJN4MWQ.js +0 -2
- package/dist/chunk-7ZJN4MWQ.js.map +0 -1
- package/dist/chunk-AICNS7KW.js +0 -2
- package/dist/chunk-AICNS7KW.js.map +0 -1
- package/dist/chunk-D4XLXU2H.js +0 -2
- package/dist/chunk-D4XLXU2H.js.map +0 -1
- package/dist/chunk-FLT6RWXH.js +0 -2
- package/dist/chunk-FLT6RWXH.js.map +0 -1
- package/dist/chunk-GBM7VKFS.js +0 -2
- package/dist/chunk-GBM7VKFS.js.map +0 -1
- package/dist/chunk-HMMBYXYA.js +0 -2
- package/dist/chunk-HMMBYXYA.js.map +0 -1
- package/dist/chunk-IRY4KWB5.js +0 -2
- package/dist/chunk-IRY4KWB5.js.map +0 -1
- package/dist/chunk-JH4MVD36.js +0 -2
- package/dist/chunk-JH4MVD36.js.map +0 -1
- package/dist/chunk-JKHUO27E.js +0 -2
- package/dist/chunk-JKHUO27E.js.map +0 -1
- package/dist/chunk-LIV5RBWJ.js +0 -2
- package/dist/chunk-LIV5RBWJ.js.map +0 -1
- package/dist/chunk-PENRGDNC.js +0 -2
- package/dist/chunk-PENRGDNC.js.map +0 -1
- package/dist/chunk-QOX3QNMM.js +0 -2
- package/dist/chunk-QOX3QNMM.js.map +0 -1
- package/dist/chunk-QVBNGGOE.js +0 -2
- package/dist/chunk-QVBNGGOE.js.map +0 -1
- package/dist/chunk-S6MOM5G3.js +0 -2
- package/dist/chunk-S6MOM5G3.js.map +0 -1
- package/dist/chunk-UGRS4FEI.js +0 -2
- package/dist/chunk-UGRS4FEI.js.map +0 -1
- package/dist/chunk-USNXQOMJ.js +0 -2
- package/dist/chunk-USNXQOMJ.js.map +0 -1
- package/dist/chunk-UWMJBBTY.js +0 -2
- package/dist/chunk-UWMJBBTY.js.map +0 -1
- package/dist/chunk-W3Z33ETA.js +0 -2
- package/dist/chunk-W3Z33ETA.js.map +0 -1
- package/dist/chunk-WDRCARCP.js +0 -3
- package/dist/chunk-WDRCARCP.js.map +0 -1
- package/dist/chunk-WIUPQHZ5.js +0 -2
- package/dist/chunk-WIUPQHZ5.js.map +0 -1
- package/dist/chunk-WJ4ORIXF.js +0 -2
- package/dist/chunk-WJ4ORIXF.js.map +0 -1
- package/dist/chunk-YSLN4XT6.js +0 -2
- package/dist/chunk-YSLN4XT6.js.map +0 -1
- package/dist/datetime-C55QQQJK.js +0 -2
- package/dist/datetime-C55QQQJK.js.map +0 -1
- package/dist/editor-NZLXIOE7.js +0 -2
- package/dist/editor-NZLXIOE7.js.map +0 -1
- package/dist/project-selector-GQ24PVO6.js +0 -2
- package/dist/project-selector-GQ24PVO6.js.map +0 -1
- package/dist/search-XKG5A7XM.js +0 -2
- package/dist/select-SO3DICYX.js +0 -2
- package/dist/select-SO3DICYX.js.map +0 -1
- package/dist/switch-SU3OIXL6.js +0 -2
- package/dist/switch-SU3OIXL6.js.map +0 -1
- package/dist/text-FZSI6W5I.js +0 -2
- package/dist/text-FZSI6W5I.js.map +0 -1
- package/dist/text-QXGOD2KW.js +0 -2
- package/dist/text-QXGOD2KW.js.map +0 -1
- package/dist/textarea-INLURFNU.js +0 -2
- package/dist/textarea-INLURFNU.js.map +0 -1
- package/dist/tools.d.ts +0 -78
- package/dist/tools.js +0 -60
- package/dist/types-U28Ppixq.d.ts +0 -56
- package/dist/types.d-CPIuPrvL.d.ts +0 -458
- package/dist/user-nav-LSEOOH4E.js +0 -2
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
import { JSX, ReactNode, ComponentType } from 'react';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { OperationVariables } from '@apollo/client';
|
|
4
|
-
import { Control, UseFormSetValue, FieldValues } from 'react-hook-form';
|
|
5
|
-
|
|
6
|
-
type User = {
|
|
7
|
-
id: string;
|
|
8
|
-
email: string;
|
|
9
|
-
display_name: string;
|
|
10
|
-
avatar_url: string;
|
|
11
|
-
role: string;
|
|
12
|
-
/** Space codes the user belongs to (owners receive every project space). */
|
|
13
|
-
spaces: string[];
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
type Auth = {
|
|
17
|
-
user: User | undefined;
|
|
18
|
-
logout: (projectId: string) => Promise<void>;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
type AuthService = [boolean, Auth];
|
|
22
|
-
|
|
23
|
-
type AttributeValue = {
|
|
24
|
-
_id: string;
|
|
25
|
-
[key: string]: string | AttributeValue | AttributeValue[] | null;
|
|
26
|
-
__typename: string;
|
|
27
|
-
};
|
|
28
|
-
type EntityItem = {
|
|
29
|
-
[attribute: string]: AttributeValue;
|
|
30
|
-
};
|
|
31
|
-
type EntityData = {
|
|
32
|
-
[attributeName: string]: EntityItem;
|
|
33
|
-
};
|
|
34
|
-
type MappedEntityItem = {
|
|
35
|
-
_id: string;
|
|
36
|
-
[attributeName: string]: string | OrderedAssetValue[];
|
|
37
|
-
};
|
|
38
|
-
type ImageValue = {
|
|
39
|
-
_id: string;
|
|
40
|
-
path: string;
|
|
41
|
-
url?: string;
|
|
42
|
-
size: number;
|
|
43
|
-
mimeType: string;
|
|
44
|
-
originalFilename: string;
|
|
45
|
-
lqip: string;
|
|
46
|
-
width: number;
|
|
47
|
-
height: number;
|
|
48
|
-
};
|
|
49
|
-
type OrderedAssetValue = ImageValue & {
|
|
50
|
-
sortOrder?: number;
|
|
51
|
-
/** Aggregate count of all connected assets; edges are bounded by `first`. */
|
|
52
|
-
totalCount?: number;
|
|
53
|
-
};
|
|
54
|
-
type FormEntityItem = {
|
|
55
|
-
[attributeName: string]: FormFieldValue;
|
|
56
|
-
};
|
|
57
|
-
type EntityQuerySelection = 'list' | 'full' | 'display';
|
|
58
|
-
type UseEntityQueryParams = {
|
|
59
|
-
entityNamePlural: string;
|
|
60
|
-
schema: Schema;
|
|
61
|
-
scope: string;
|
|
62
|
-
variables?: OperationVariables;
|
|
63
|
-
isForm?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* `list` only selects each related entity's display attribute (desk/list grids).
|
|
66
|
-
* `full` keeps nested relationship fields (forms, relationship pickers). Default: `full`.
|
|
67
|
-
* `display` selects only the entity's display attribute (menus and selectors).
|
|
68
|
-
*/
|
|
69
|
-
selection?: EntityQuerySelection;
|
|
70
|
-
/** Omit the collection count when only rows are needed; count returns 0. Default: true. */
|
|
71
|
-
includeCount?: boolean;
|
|
72
|
-
};
|
|
73
|
-
type FormFieldValue = {
|
|
74
|
-
_id?: string;
|
|
75
|
-
count?: number;
|
|
76
|
-
disabled: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Server-known asset sort orders for ordered asset relationships. Grows as
|
|
79
|
-
* the form field pages in more connection edges beyond the initial `first`.
|
|
80
|
-
* Update mutations use this so paged-in assets are treated as existing
|
|
81
|
-
* (reorder/disconnect) rather than new connects.
|
|
82
|
-
*/
|
|
83
|
-
knownAssetSortOrders?: {
|
|
84
|
-
[id: string]: number;
|
|
85
|
-
};
|
|
86
|
-
relationships?: {
|
|
87
|
-
connect?: SingleRelationshipConnection | MultipleRelationshipConnection;
|
|
88
|
-
disconnect?: string[];
|
|
89
|
-
};
|
|
90
|
-
scope: string;
|
|
91
|
-
value: boolean | number | string | MappedEntityItem | MappedEntityItem[] | EntityItem | EntityItem[] | AttributeValue | AttributeValue[] | ImageValue | OrderedAssetValue[] | undefined | null;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
type SingleRelationshipConnection = {
|
|
95
|
-
_id: string;
|
|
96
|
-
value: string | MappedEntityItem | MappedEntityItem[] | EntityItem | EntityItem[] | AttributeValue | AttributeValue[] | ImageValue | OrderedAssetValue[] | undefined | null;
|
|
97
|
-
};
|
|
98
|
-
type MultipleRelationshipConnection = {
|
|
99
|
-
_id: string;
|
|
100
|
-
sortOrder?: number;
|
|
101
|
-
value: string | MappedEntityItem | MappedEntityItem[] | EntityItem | EntityItem[] | AttributeValue | AttributeValue[] | ImageValue | OrderedAssetValue[] | undefined | null;
|
|
102
|
-
}[];
|
|
103
|
-
type Relationships = {
|
|
104
|
-
[relationshipId: string]: {
|
|
105
|
-
connect?: SingleRelationshipConnection | MultipleRelationshipConnection;
|
|
106
|
-
disconnect?: string[];
|
|
107
|
-
} | undefined;
|
|
108
|
-
};
|
|
109
|
-
type AppContextType = {
|
|
110
|
-
isRouteLoading: boolean;
|
|
111
|
-
pageTitle: string;
|
|
112
|
-
scope: string;
|
|
113
|
-
relationships: Relationships;
|
|
114
|
-
};
|
|
115
|
-
type ActionSetScope = {
|
|
116
|
-
type: 'setScope';
|
|
117
|
-
payload: {
|
|
118
|
-
projectId?: string;
|
|
119
|
-
scope: string;
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
type ActionSetRelationship = {
|
|
123
|
-
type: 'setRelationship';
|
|
124
|
-
payload: {
|
|
125
|
-
[relationshipId: string]: {
|
|
126
|
-
connect?: SingleRelationshipConnection | MultipleRelationshipConnection;
|
|
127
|
-
disconnect: string[];
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
type ScopeType = 'local' | 'global' | 'relationship';
|
|
132
|
-
type DataType = 'cartesianpoint' | 'bigint' | 'boolean' | 'date' | 'datetime' | 'duration' | 'float' | 'id' | 'int' | 'point' | 'string' | 'time' | 'asset';
|
|
133
|
-
type DefaultValueByDataType = {
|
|
134
|
-
asset: '';
|
|
135
|
-
bigint: string;
|
|
136
|
-
boolean: boolean | '';
|
|
137
|
-
cartesianpoint: string;
|
|
138
|
-
date: string;
|
|
139
|
-
datetime: string;
|
|
140
|
-
duration: string;
|
|
141
|
-
float: number | '';
|
|
142
|
-
id: string;
|
|
143
|
-
int: number | '';
|
|
144
|
-
point: string;
|
|
145
|
-
string: string;
|
|
146
|
-
time: string;
|
|
147
|
-
};
|
|
148
|
-
type DefaultValue<T extends DataType = DataType> = DefaultValueByDataType[T];
|
|
149
|
-
type InputType = 'datetime' | 'editor' | 'asset' | 'number' | 'relationship' | 'select' | 'switch' | 'text' | 'textarea' | (string & NonNullable<unknown>);
|
|
150
|
-
type PreviewType = 'boolean' | 'text' | 'number' | 'date' | 'datetime' | 'editor' | 'select' | 'relationship' | 'swtich' | 'textarea' | (string & NonNullable<unknown>);
|
|
151
|
-
type SelectList = {
|
|
152
|
-
label: string;
|
|
153
|
-
value: string;
|
|
154
|
-
};
|
|
155
|
-
type GroupedSelectList = {
|
|
156
|
-
groupLabel: string;
|
|
157
|
-
items: SelectList[];
|
|
158
|
-
};
|
|
159
|
-
type ZodNamespace = typeof z;
|
|
160
|
-
type CommonOptions = {
|
|
161
|
-
comment?: string;
|
|
162
|
-
size?: number;
|
|
163
|
-
placeholder?: string;
|
|
164
|
-
};
|
|
165
|
-
type SelectOptions = CommonOptions & {
|
|
166
|
-
list: SelectList[] | GroupedSelectList[];
|
|
167
|
-
};
|
|
168
|
-
type AssetOptions = CommonOptions & {
|
|
169
|
-
accept?: string;
|
|
170
|
-
};
|
|
171
|
-
type RelationshipOptions = CommonOptions & {
|
|
172
|
-
accept?: string;
|
|
173
|
-
};
|
|
174
|
-
type DateTimeOptions = CommonOptions & {
|
|
175
|
-
format?: string;
|
|
176
|
-
};
|
|
177
|
-
type NumberOptions = CommonOptions & {
|
|
178
|
-
min?: number;
|
|
179
|
-
max?: number;
|
|
180
|
-
};
|
|
181
|
-
type AttributeOptions = {
|
|
182
|
-
select: SelectOptions;
|
|
183
|
-
asset: AssetOptions;
|
|
184
|
-
datetime: DateTimeOptions;
|
|
185
|
-
number: NumberOptions;
|
|
186
|
-
relationship: RelationshipOptions;
|
|
187
|
-
text: CommonOptions;
|
|
188
|
-
textarea: CommonOptions;
|
|
189
|
-
switch: CommonOptions;
|
|
190
|
-
[key: string]: CommonOptions;
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* Context passed to `hidden` and `readOnly` callbacks. `record` is the current
|
|
194
|
-
* form values unwrapped from `FormFieldValue` wrappers (use `record.status`,
|
|
195
|
-
* not `record.status.value`).
|
|
196
|
-
*/
|
|
197
|
-
type ConditionalFieldContext = {
|
|
198
|
-
record: {
|
|
199
|
-
[attributeName: string]: unknown;
|
|
200
|
-
};
|
|
201
|
-
value: unknown;
|
|
202
|
-
currentUser: User | undefined;
|
|
203
|
-
};
|
|
204
|
-
type ConditionalFlag = boolean | ((context: ConditionalFieldContext) => boolean);
|
|
205
|
-
type AttributeBase = {
|
|
206
|
-
inputType: InputType;
|
|
207
|
-
previewType?: PreviewType;
|
|
208
|
-
/**
|
|
209
|
-
* Hide the field in the form. A static `true` also hides the list column.
|
|
210
|
-
* Callbacks are form-only and re-evaluate as `record` / `currentUser` change.
|
|
211
|
-
* Distinct from `entity.menu.hidden`.
|
|
212
|
-
*/
|
|
213
|
-
hidden?: ConditionalFlag;
|
|
214
|
-
/**
|
|
215
|
-
* Make the field read-only in the form. Callbacks re-evaluate as `record` /
|
|
216
|
-
* `currentUser` change. Currently-read-only attributes are omitted from
|
|
217
|
-
* create/update mutations and skipped during form validation.
|
|
218
|
-
*/
|
|
219
|
-
readOnly?: ConditionalFlag;
|
|
220
|
-
/**
|
|
221
|
-
* Marks uniqueness intent. Enforced at deploy for global non-asset attributes.
|
|
222
|
-
*/
|
|
223
|
-
unique?: boolean;
|
|
224
|
-
/**
|
|
225
|
-
* Include this attribute in search indexing and the global search UI.
|
|
226
|
-
*/
|
|
227
|
-
searchable?: boolean;
|
|
228
|
-
/**
|
|
229
|
-
* Field group name(s) this attribute belongs to. Distinct from
|
|
230
|
-
* `entity.menu.group`, which is the sidebar section.
|
|
231
|
-
*/
|
|
232
|
-
group?: string | string[];
|
|
233
|
-
label: string;
|
|
234
|
-
name: string;
|
|
235
|
-
options?: AttributeOptions[InputType];
|
|
236
|
-
relationship?: {
|
|
237
|
-
entity: string;
|
|
238
|
-
mode: 'single' | 'multiple';
|
|
239
|
-
field: string;
|
|
240
|
-
};
|
|
241
|
-
validation?: (zod: ZodNamespace) => z.ZodType;
|
|
242
|
-
};
|
|
243
|
-
/**
|
|
244
|
-
* Space codes that can read/write this attribute. Members of any listed
|
|
245
|
-
* space have access; users outside all listed spaces cannot see the value.
|
|
246
|
-
*
|
|
247
|
-
* Not allowed on relationship attributes (`scope: 'relationship'`): bind the
|
|
248
|
-
* related entity to the space instead.
|
|
249
|
-
*/
|
|
250
|
-
type AttributeSpaces = {
|
|
251
|
-
spaces?: string[];
|
|
252
|
-
};
|
|
253
|
-
type AttributeScopeAndSpaces = {
|
|
254
|
-
scope: 'relationship';
|
|
255
|
-
spaces?: never;
|
|
256
|
-
} | ({
|
|
257
|
-
scope: 'local' | 'global';
|
|
258
|
-
} & AttributeSpaces);
|
|
259
|
-
type AttributeByDataType<T extends DataType> = AttributeBase & {
|
|
260
|
-
dataType: T;
|
|
261
|
-
defaultValue?: DefaultValueByDataType[T];
|
|
262
|
-
} & (T extends 'asset' ? {
|
|
263
|
-
scope?: 'global';
|
|
264
|
-
} & AttributeSpaces : AttributeScopeAndSpaces);
|
|
265
|
-
type Attribute = {
|
|
266
|
-
[T in DataType]: AttributeByDataType<T>;
|
|
267
|
-
}[DataType];
|
|
268
|
-
/**
|
|
269
|
-
* Form-only tab that groups attributes in the edit/add drawer.
|
|
270
|
-
* Distinct from `entity.menu.group` (sidebar section).
|
|
271
|
-
*/
|
|
272
|
-
type FieldGroup = {
|
|
273
|
-
name: string;
|
|
274
|
-
/**
|
|
275
|
-
* Tab label. Required for custom groups. Optional for the reserved
|
|
276
|
-
* `all` tab; Studio uses `All fields` when it is omitted.
|
|
277
|
-
*/
|
|
278
|
-
title?: string;
|
|
279
|
-
icon?: JSX.Element;
|
|
280
|
-
default?: boolean;
|
|
281
|
-
hidden?: ConditionalFlag;
|
|
282
|
-
};
|
|
283
|
-
type Entity = {
|
|
284
|
-
name: string;
|
|
285
|
-
plural: string;
|
|
286
|
-
/**
|
|
287
|
-
* Attribute name used as the human-readable label in relationship previews,
|
|
288
|
-
* search hits, and edit-drawer titles. Must match an attribute `name`.
|
|
289
|
-
* Falls back to the first attribute when omitted. The effective display
|
|
290
|
-
* attribute cannot be space-bound.
|
|
291
|
-
*/
|
|
292
|
-
display?: string;
|
|
293
|
-
menu?: {
|
|
294
|
-
hidden: true;
|
|
295
|
-
label?: string;
|
|
296
|
-
} | {
|
|
297
|
-
label?: string;
|
|
298
|
-
group?: string;
|
|
299
|
-
icon?: JSX.Element;
|
|
300
|
-
};
|
|
301
|
-
/**
|
|
302
|
-
* Space codes that can access this entity. Members of any listed space have
|
|
303
|
-
* access; users outside all listed spaces cannot see the entity at all.
|
|
304
|
-
*/
|
|
305
|
-
spaces?: string[];
|
|
306
|
-
/**
|
|
307
|
-
* Form field groups rendered as tabs. Does not change storage.
|
|
308
|
-
* Distinct from `menu.group` (sidebar section).
|
|
309
|
-
*/
|
|
310
|
-
groups?: FieldGroup[];
|
|
311
|
-
attributes: Attribute[];
|
|
312
|
-
};
|
|
313
|
-
type Schema = Entity[];
|
|
314
|
-
type Scope = {
|
|
315
|
-
name: string;
|
|
316
|
-
label: string;
|
|
317
|
-
isDefault?: boolean;
|
|
318
|
-
sortOrder?: number;
|
|
319
|
-
};
|
|
320
|
-
type Scopes = Scope[];
|
|
321
|
-
type Space = {
|
|
322
|
-
code: string;
|
|
323
|
-
label: string;
|
|
324
|
-
};
|
|
325
|
-
type Spaces = Space[];
|
|
326
|
-
interface SearchResultItem {
|
|
327
|
-
_id: string;
|
|
328
|
-
_entityName: string;
|
|
329
|
-
_entityNamePlural: string;
|
|
330
|
-
[key: string]: string;
|
|
331
|
-
}
|
|
332
|
-
interface SearchRequestProps {
|
|
333
|
-
searchRequests: {
|
|
334
|
-
searches: {
|
|
335
|
-
collection: string;
|
|
336
|
-
}[];
|
|
337
|
-
};
|
|
338
|
-
commonParams: {
|
|
339
|
-
q: string;
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
type FormFieldParams<T extends keyof AttributeOptions> = {
|
|
344
|
-
control: Control | undefined;
|
|
345
|
-
defaultScope: string;
|
|
346
|
-
defaultValue: FormFieldValue;
|
|
347
|
-
entityId?: string;
|
|
348
|
-
entityName: string;
|
|
349
|
-
entityNamePlural: string;
|
|
350
|
-
fieldSchema: Omit<Attribute, 'options'> & {
|
|
351
|
-
options: AttributeOptions[T];
|
|
352
|
-
};
|
|
353
|
-
getValues: (_payload?: string | string[]) => FormFieldValue | undefined;
|
|
354
|
-
readOnly: boolean;
|
|
355
|
-
relationshipEntityName?: string;
|
|
356
|
-
schema: Schema;
|
|
357
|
-
scope: string;
|
|
358
|
-
setValue: UseFormSetValue<FieldValues>;
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
interface LogoProps {
|
|
362
|
-
theme: string | undefined;
|
|
363
|
-
title: string;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
interface ProjectSelectorProps {
|
|
367
|
-
projectId: string;
|
|
368
|
-
projects: ProjectOptions[];
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
interface SearchProps {
|
|
372
|
-
onSelect: (item: { entityName: string; entityNamePlural: string; entityId: string }) => void;
|
|
373
|
-
projectId: string;
|
|
374
|
-
schema: Entity[];
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
interface FormFieldProps extends FormFieldParams<keyof AttributeOptions> {}
|
|
378
|
-
|
|
379
|
-
interface AppOptions {
|
|
380
|
-
name: string;
|
|
381
|
-
title: string;
|
|
382
|
-
icon?: JSX.Element;
|
|
383
|
-
component: ReactNode;
|
|
384
|
-
routes?: AppRoute[];
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
interface AppRoute {
|
|
388
|
-
path: string;
|
|
389
|
-
component: ReactNode;
|
|
390
|
-
children?: AppRoute[];
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
interface StudioExtension {
|
|
394
|
-
/** Stable machine-readable identity, independent of the optional display label. */
|
|
395
|
-
id: string;
|
|
396
|
-
name?: string;
|
|
397
|
-
contributes: StudioContributions;
|
|
398
|
-
extensions?: StudioExtension[];
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
interface StudioContributions {
|
|
402
|
-
apps?: AppOptions[];
|
|
403
|
-
formFields?: {
|
|
404
|
-
[key: string]: {
|
|
405
|
-
component: (Props: FormFieldProps) => JSX.Element;
|
|
406
|
-
description?: string;
|
|
407
|
-
};
|
|
408
|
-
};
|
|
409
|
-
previewFields?: {
|
|
410
|
-
[key: string]: {
|
|
411
|
-
component: ({ value }: { value: string | boolean | number | null | Date | Image }) => JSX.Element | null;
|
|
412
|
-
description?: string;
|
|
413
|
-
};
|
|
414
|
-
};
|
|
415
|
-
commands?: CommandOptions[];
|
|
416
|
-
navbar?: {
|
|
417
|
-
logo?: {
|
|
418
|
-
component: (Props: LogoProps) => JSX.Element;
|
|
419
|
-
};
|
|
420
|
-
projectSelector?: {
|
|
421
|
-
component: (Props: ProjectSelectorProps) => JSX.Element;
|
|
422
|
-
};
|
|
423
|
-
search?: {
|
|
424
|
-
component: (Props: SearchProps) => JSX.Element;
|
|
425
|
-
};
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
interface ProjectOptions {
|
|
430
|
-
title?: string;
|
|
431
|
-
projectId: string;
|
|
432
|
-
basePath: string;
|
|
433
|
-
icon?: ComponentType;
|
|
434
|
-
menuGroups?: {
|
|
435
|
-
title: string;
|
|
436
|
-
name: string;
|
|
437
|
-
}[];
|
|
438
|
-
extensions?: StudioExtension[];
|
|
439
|
-
scopes?: Scopes;
|
|
440
|
-
/**
|
|
441
|
-
* Permission spaces for this project. Spaces scope access to entities,
|
|
442
|
-
* attributes and app resources (automations, skills, agents). Membership is
|
|
443
|
-
* assigned to project members in the Flexkit Dashboard after deploy.
|
|
444
|
-
*/
|
|
445
|
-
spaces?: Spaces;
|
|
446
|
-
schema: Entity[];
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* If a single project is used, not specifying a basePath is acceptable
|
|
451
|
-
*/
|
|
452
|
-
type SingleProject = Omit<ProjectOptions, 'basePath'> & {
|
|
453
|
-
basePath?: string;
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
type Config = SingleProject | ProjectOptions[];
|
|
457
|
-
|
|
458
|
-
export type { AppContextType as A, Config as C, DataType as D, Entity as E, FieldGroup as F, ImageValue as I, LogoProps as L, MappedEntityItem as M, OrderedAssetValue as O, ProjectOptions as P, StudioContributions as S, UseEntityQueryParams as U, ActionSetRelationship as a, ActionSetScope as b, AppOptions as c, StudioExtension as d, SearchRequestProps as e, SearchResultItem as f, Attribute as g, AuthService as h, FormEntityItem as i, Schema as j, User as k, EntityQuerySelection as l, AttributeValue as m, MultipleRelationshipConnection as n, SingleRelationshipConnection as o, ConditionalFieldContext as p, ConditionalFlag as q, DefaultValue as r, DefaultValueByDataType as s, EntityData as t, FormFieldParams as u, FormFieldProps as v, FormFieldValue as w, ScopeType as x, SingleProject as y };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import'./index.css';import {b as b$1}from'./chunk-WJ4ORIXF.js';import {a,b as b$3,c as c$1}from'./chunk-IRY4KWB5.js';import {b,r,c,e,f,l,m,i,h,n}from'./chunk-HMMBYXYA.js';import'./chunk-LIV5RBWJ.js';import'./chunk-WDRCARCP.js';import {b as b$2}from'./chunk-6NRQMG26.js';import'./chunk-WIUPQHZ5.js';import'./chunk-O2QMYUPS.js';import v from'boring-avatars';import {Monitor,Moon,Sun}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';var A=["#06d9b6","#a4f479","#d4d323","#fb468f","#0ec4f1"];function z({projectId:D}){let{theme:a$1,setTheme:t}=b(),[C,r$1]=b$1();return C?jsx(r,{className:"fk:h-8 fk:w-8 fk:rounded-full fk:corner-squircle"}):jsxs(c,{children:[jsx(e,{asChild:true,children:jsx(b$2,{className:"fk:relative fk:h-8 fk:w-8 fk:rounded-full fk:corner-squircle",variant:"ghost",children:jsxs(a,{className:"fk:h-8 fk:w-8",children:[r$1.user?.avatar_url?jsx(b$3,{alt:r$1.user.display_name,src:r$1.user.avatar_url}):null,jsx(c$1,{className:"fk:bg-transparent",children:jsx(v,{className:"fk:size-8",colors:A,name:r$1.user?.id??"user",size:32,variant:"marble"})})]})})}),jsxs(f,{align:"end",className:"fk:w-56",forceMount:true,children:[jsx(l,{className:"font-normal",children:jsxs("div",{className:"fk:flex fk:flex-col fk:space-y-1",children:[jsx("p",{className:"fk:text-sm fk:font-medium fk:leading-none",children:r$1.user?.display_name}),jsx("p",{className:"fk:text-xs fk:leading-none fk:text-muted-foreground",children:r$1.user?.email})]})}),jsx(m,{}),jsx(l,{children:"Theme"}),jsxs(i,{checked:a$1==="system",onCheckedChange:()=>{t("system");},children:[jsx(Monitor,{className:"fk:mr-2 fk:h-4 fk:w-4"}),jsx("span",{children:"System"})]}),jsxs(i,{checked:a$1==="dark",onCheckedChange:()=>{t("dark");},children:[jsx(Moon,{className:"fk:mr-2 fk:h-4 fk:w-4"}),jsx("span",{children:"Dark"})]}),jsxs(i,{checked:a$1==="light",onCheckedChange:()=>{t("light");},children:[jsx(Sun,{className:"fk:mr-2 fk:h-4 fk:w-4"}),jsx("span",{children:"Light"})]}),jsx(m,{}),jsxs(h,{onClick:()=>{r$1.logout(D).then(()=>{}).catch(()=>{});},children:["Log out",jsx(n,{children:"\u21E7\u2318Q"})]})]})]})}export{z as UserNav};//# sourceMappingURL=user-nav-LSEOOH4E.js.map
|
|
2
|
-
//# sourceMappingURL=user-nav-LSEOOH4E.js.map
|