@flexkit/studio 0.0.28 → 0.0.30
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/asset-TS7J5GA5.js +2 -0
- package/dist/{asset-REAMGMQL.js.map → asset-TS7J5GA5.js.map} +1 -1
- package/dist/chunk-73RMWG53.js +2 -0
- package/dist/{chunk-X3S7TRCM.js.map → chunk-73RMWG53.js.map} +1 -1
- package/dist/chunk-DWK4NNLB.js +2 -0
- package/dist/chunk-DWK4NNLB.js.map +1 -0
- package/dist/chunk-FVFRTCEB.js +2 -0
- package/dist/chunk-FVFRTCEB.js.map +1 -0
- package/dist/chunk-HAQICAOQ.js +2 -0
- package/dist/chunk-HAQICAOQ.js.map +1 -0
- package/dist/chunk-IXO2LU47.js +2 -0
- package/dist/{chunk-TBCSVE5L.js.map → chunk-IXO2LU47.js.map} +1 -1
- package/dist/{chunk-NNRD7YZU.js → chunk-LL2Z4TD3.js} +2 -2
- package/dist/{chunk-NNRD7YZU.js.map → chunk-LL2Z4TD3.js.map} +1 -1
- package/dist/chunk-MC6VZLKC.js +2 -0
- package/dist/chunk-MC6VZLKC.js.map +1 -0
- package/dist/chunk-N52AF6GE.js +2 -0
- package/dist/chunk-N52AF6GE.js.map +1 -0
- package/dist/chunk-WXMCINGZ.js +2 -0
- package/dist/{chunk-27Y2SQ67.js.map → chunk-WXMCINGZ.js.map} +1 -1
- package/dist/chunk-YA4ACPM5.js +2 -0
- package/dist/{chunk-KR7CLPY2.js.map → chunk-YA4ACPM5.js.map} +1 -1
- package/dist/index.css +814 -42
- package/dist/index.d.ts +39 -4
- package/dist/index.js +196 -194
- package/dist/index.js.map +1 -1
- package/dist/{search-YRDOJUQO.js → search-UFFZBRQV.js} +2 -2
- package/dist/{search-YRDOJUQO.js.map → search-UFFZBRQV.js.map} +1 -1
- package/dist/switch-AFZGXSR3.js +2 -0
- package/dist/{switch-KVO3JRNX.js.map → switch-AFZGXSR3.js.map} +1 -1
- package/dist/text-2RL2L5FT.js +2 -0
- package/dist/{text-ODG7ABSW.js.map → text-2RL2L5FT.js.map} +1 -1
- package/dist/textarea-2A4TLWZS.js +2 -0
- package/dist/{textarea-M4YPSJEC.js.map → textarea-2A4TLWZS.js.map} +1 -1
- package/dist/{types.d-DiQPwK_q.d.ts → types.d-CX3kDxFZ.d.ts} +45 -4
- package/dist/ui.d.ts +467 -4
- package/dist/ui.js +6 -1
- package/dist/ui.js.map +1 -1
- package/dist/user-nav-4JKIFZLB.js +2 -0
- package/dist/user-nav-4JKIFZLB.js.map +1 -0
- package/package.json +17 -1
- package/dist/asset-REAMGMQL.js +0 -2
- package/dist/chunk-27Y2SQ67.js +0 -2
- package/dist/chunk-AALMEPYG.js +0 -2
- package/dist/chunk-AALMEPYG.js.map +0 -1
- package/dist/chunk-CWHDJ7Q4.js +0 -2
- package/dist/chunk-CWHDJ7Q4.js.map +0 -1
- package/dist/chunk-KR7CLPY2.js +0 -2
- package/dist/chunk-M5AH5ERI.js +0 -2
- package/dist/chunk-M5AH5ERI.js.map +0 -1
- package/dist/chunk-QXCD5JR4.js +0 -2
- package/dist/chunk-QXCD5JR4.js.map +0 -1
- package/dist/chunk-TBCSVE5L.js +0 -2
- package/dist/chunk-X3S7TRCM.js +0 -2
- package/dist/chunk-ZSJAPCIZ.js +0 -2
- package/dist/chunk-ZSJAPCIZ.js.map +0 -1
- package/dist/switch-KVO3JRNX.js +0 -2
- package/dist/text-ODG7ABSW.js +0 -2
- package/dist/textarea-M4YPSJEC.js +0 -2
- package/dist/user-nav-QYO4X7CQ.js +0 -2
- package/dist/user-nav-QYO4X7CQ.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { Dispatch, JSX, SetStateAction, UIEvent, ReactElement } from 'react';
|
|
3
|
-
import { A as AppContextType, a as ActionSetRelationship, b as ActionSetScope, C as Config, c as AppOptions, E as Entity, P as PluginOptions, d as ProjectOptions, O as OrderedAssetValue,
|
|
4
|
-
export { D as DataType,
|
|
3
|
+
import { A as AppContextType, a as ActionSetRelationship, b as ActionSetScope, C as Config, c as AppOptions, E as Entity, P as PluginOptions, d as ProjectOptions, O as OrderedAssetValue, S as SearchRequestProps, e as SearchResultItem, f as Attribute, U as UseEntityQueryParams, M as MappedEntityItem, F as FormEntityItem, I as ImageValue, g as Schema, h as AttributeValue, i as MultipleRelationshipConnection, j as SingleRelationshipConnection } from './types.d-CX3kDxFZ.js';
|
|
4
|
+
export { D as DataType, k as DefaultValue, l as DefaultValueByDataType, m as EntityData, n as FormFieldParams, o as FormFieldProps, p as FormFieldValue, L as LogoProps, q as ScopeType, r as SingleProject } from './types.d-CX3kDxFZ.js';
|
|
5
5
|
export { Outlet, useLocation, useParams } from 'react-router-dom';
|
|
6
6
|
import { OperationVariables, DocumentNode, ErrorLike } from '@apollo/client';
|
|
7
7
|
export { gql } from '@apollo/client';
|
|
@@ -92,12 +92,39 @@ declare function defineConfig<T extends Config>(config: T): T;
|
|
|
92
92
|
|
|
93
93
|
declare function defineEntity<T extends Entity>(entity: T): Entity;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Space bindings use OR semantics: a resource bound to ['finance', 'mkt'] is
|
|
97
|
+
* accessible to members of either space. Unbound resources are accessible to
|
|
98
|
+
* everyone. This is a UI convenience only — the server enforces the same
|
|
99
|
+
* rules through generated @authorization directives.
|
|
100
|
+
*
|
|
101
|
+
* `userSpaces === undefined` means membership is not known yet (auth still
|
|
102
|
+
* loading). Treat that as allowed so space-bound entities/attributes do not
|
|
103
|
+
* flicker out of the Desk sidebar, grids, and forms. Once auth resolves,
|
|
104
|
+
* `spaces` is always an array — possibly empty for users with no memberships.
|
|
105
|
+
*/
|
|
106
|
+
declare function canAccessSpaces(userSpaces: string[] | undefined, resourceSpaces: string[] | undefined): boolean;
|
|
107
|
+
declare function filterAttributesForSpaces(attributes: Attribute[], userSpaces: string[] | undefined): Attribute[];
|
|
108
|
+
declare function filterEntitiesForSpaces(schema: Entity[], userSpaces: string[] | undefined): Entity[];
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Viewers are read-only: the GraphQL route and the automations API reject
|
|
112
|
+
* their mutations server-side. This helper only mirrors that rule in the UI
|
|
113
|
+
* so restricted actions render as disabled instead of failing on submit.
|
|
114
|
+
* While the role is still unknown (auth loading) actions stay enabled and
|
|
115
|
+
* the server remains the source of truth.
|
|
116
|
+
*/
|
|
117
|
+
declare function canMutateData(role: string | null | undefined): boolean;
|
|
118
|
+
declare function useCanMutate(): boolean;
|
|
119
|
+
|
|
95
120
|
type User = {
|
|
96
121
|
id: string;
|
|
97
122
|
email: string;
|
|
98
123
|
display_name: string;
|
|
99
124
|
avatar_url: string;
|
|
100
125
|
role: string;
|
|
126
|
+
/** Space codes the user belongs to (owners receive every project space). */
|
|
127
|
+
spaces: string[];
|
|
101
128
|
};
|
|
102
129
|
|
|
103
130
|
type Auth = {
|
|
@@ -130,7 +157,9 @@ declare function useEntityQuery({ entityNamePlural, schema, scope, variables, is
|
|
|
130
157
|
isLoadingMore: boolean;
|
|
131
158
|
isProjectDisabled: boolean;
|
|
132
159
|
isProjectReadOnly: boolean;
|
|
133
|
-
reload: (
|
|
160
|
+
reload: (options?: {
|
|
161
|
+
preserve?: boolean;
|
|
162
|
+
}) => Promise<void>;
|
|
134
163
|
schemaErrorMessage: string | null;
|
|
135
164
|
};
|
|
136
165
|
|
|
@@ -173,6 +202,12 @@ type EntityQuery = {
|
|
|
173
202
|
};
|
|
174
203
|
declare function getEntityQuery(entityNamePlural: string, scope: string, schema: Schema, options?: {
|
|
175
204
|
selection?: 'list' | 'full';
|
|
205
|
+
/**
|
|
206
|
+
* The top-level aggregate count is a filtered label scan on the server.
|
|
207
|
+
* Pagination pages (fetchMore) skip it — the total from the first page
|
|
208
|
+
* still stands.
|
|
209
|
+
*/
|
|
210
|
+
includeCount?: boolean;
|
|
176
211
|
}): EntityQuery;
|
|
177
212
|
/**
|
|
178
213
|
* Returns a string with the GraphQl query needed to mutate the dataToMutate object for the given entity and scope.
|
|
@@ -354,4 +389,4 @@ declare const assetSchema: Entity;
|
|
|
354
389
|
|
|
355
390
|
declare const tagSchema: Entity;
|
|
356
391
|
|
|
357
|
-
export { AppOptions, Attribute, AttributeValue, type ConfigContext, DataTable, DataTableColumnHeader, DataTableFacetedFilter, DataTableRowActions, DataTableSortedBy, DataTableToolbar, DataTableViewOptions, DefaultValueSwitch, Entity, type EntityListRowPatch, FlexkitStudio, FormEntityItem, IMAGES_BASE_URL, MappedEntityItem, PluginOptions, ProjectDisabled, Schema, SchemaError, SearchRequestProps, SearchResultItem, type UploadedFileResult, assetSchema, defineConfig, defineEntity, getEntityCreateMutation, getEntityDeleteMutation, getEntityDeleteWhere, getEntityQuery, getEntitySchema, getEntityUpdateMutation, tagSchema, useAppContext, useAppDispatch, useAuth, useConfig, useDispatch, useEntityMutation, useEntityQuery, useGraphQLError, useGridColumnsDefinition, usePatchEntityList, useRefreshEntityList, useSearch, useUploadAssets };
|
|
392
|
+
export { AppOptions, Attribute, AttributeValue, type ConfigContext, DataTable, DataTableColumnHeader, DataTableFacetedFilter, DataTableRowActions, DataTableSortedBy, DataTableToolbar, DataTableViewOptions, DefaultValueSwitch, Entity, type EntityListRowPatch, FlexkitStudio, FormEntityItem, IMAGES_BASE_URL, MappedEntityItem, PluginOptions, ProjectDisabled, Schema, SchemaError, SearchRequestProps, SearchResultItem, type UploadedFileResult, assetSchema, canAccessSpaces, canMutateData, defineConfig, defineEntity, filterAttributesForSpaces, filterEntitiesForSpaces, getEntityCreateMutation, getEntityDeleteMutation, getEntityDeleteWhere, getEntityQuery, getEntitySchema, getEntityUpdateMutation, tagSchema, useAppContext, useAppDispatch, useAuth, useCanMutate, useConfig, useDispatch, useEntityMutation, useEntityQuery, useGraphQLError, useGridColumnsDefinition, usePatchEntityList, useRefreshEntityList, useSearch, useUploadAssets };
|