@contember/bindx-react 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/dist/batching/QueryBatcher.d.ts +31 -0
- package/dist/batching/QueryBatcher.d.ts.map +1 -0
- package/dist/batching/index.d.ts +2 -0
- package/dist/batching/index.d.ts.map +1 -0
- package/dist/components/EntityScope.d.ts +28 -0
- package/dist/components/EntityScope.d.ts.map +1 -0
- package/dist/dataview/DataGrid.d.ts +45 -0
- package/dist/dataview/DataGrid.d.ts.map +1 -0
- package/dist/dataview/DataGridPagination.d.ts +24 -0
- package/dist/dataview/DataGridPagination.d.ts.map +1 -0
- package/dist/dataview/DataGridToolbar.d.ts +16 -0
- package/dist/dataview/DataGridToolbar.d.ts.map +1 -0
- package/dist/dataview/DataViewContext.d.ts +32 -0
- package/dist/dataview/DataViewContext.d.ts.map +1 -0
- package/dist/dataview/columns.d.ts +115 -0
- package/dist/dataview/columns.d.ts.map +1 -0
- package/dist/dataview/contextHooks.d.ts +48 -0
- package/dist/dataview/contextHooks.d.ts.map +1 -0
- package/dist/dataview/dataAttribute.d.ts +6 -0
- package/dist/dataview/dataAttribute.d.ts.map +1 -0
- package/dist/dataview/export.d.ts +46 -0
- package/dist/dataview/export.d.ts.map +1 -0
- package/dist/dataview/filterComponents.d.ts +127 -0
- package/dist/dataview/filterComponents.d.ts.map +1 -0
- package/dist/dataview/filterContext.d.ts +10 -0
- package/dist/dataview/filterContext.d.ts.map +1 -0
- package/dist/dataview/filterHooks.d.ts +74 -0
- package/dist/dataview/filterHooks.d.ts.map +1 -0
- package/dist/dataview/filterScope.d.ts +54 -0
- package/dist/dataview/filterScope.d.ts.map +1 -0
- package/dist/dataview/filterWrappers.d.ts +65 -0
- package/dist/dataview/filterWrappers.d.ts.map +1 -0
- package/dist/dataview/index.d.ts +21 -0
- package/dist/dataview/index.d.ts.map +1 -0
- package/dist/dataview/infiniteLoad.d.ts +32 -0
- package/dist/dataview/infiniteLoad.d.ts.map +1 -0
- package/dist/dataview/loaderComponents.d.ts +80 -0
- package/dist/dataview/loaderComponents.d.ts.map +1 -0
- package/dist/dataview/pagingComponents.d.ts +50 -0
- package/dist/dataview/pagingComponents.d.ts.map +1 -0
- package/dist/dataview/renderCellValue.d.ts +9 -0
- package/dist/dataview/renderCellValue.d.ts.map +1 -0
- package/dist/dataview/selectionComponents.d.ts +62 -0
- package/dist/dataview/selectionComponents.d.ts.map +1 -0
- package/dist/dataview/sortingComponents.d.ts +39 -0
- package/dist/dataview/sortingComponents.d.ts.map +1 -0
- package/dist/dataview/stateStorage.d.ts +19 -0
- package/dist/dataview/stateStorage.d.ts.map +1 -0
- package/dist/dataview/useDataView.d.ts +58 -0
- package/dist/dataview/useDataView.d.ts.map +1 -0
- package/dist/dataview/useDataViewState.d.ts +89 -0
- package/dist/dataview/useDataViewState.d.ts.map +1 -0
- package/dist/hooks/BackendAdapterContext.d.ts +110 -0
- package/dist/hooks/BackendAdapterContext.d.ts.map +1 -0
- package/dist/hooks/ContemberBindxProvider.d.ts +67 -0
- package/dist/hooks/ContemberBindxProvider.d.ts.map +1 -0
- package/dist/hooks/createBindx.d.ts +39 -0
- package/dist/hooks/createBindx.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useBindxEvents.d.ts +83 -0
- package/dist/hooks/useBindxEvents.d.ts.map +1 -0
- package/dist/hooks/useEntity.d.ts +123 -0
- package/dist/hooks/useEntity.d.ts.map +1 -0
- package/dist/hooks/useEntityBeforePersist.d.ts +22 -0
- package/dist/hooks/useEntityBeforePersist.d.ts.map +1 -0
- package/dist/hooks/useEntityCore.d.ts +52 -0
- package/dist/hooks/useEntityCore.d.ts.map +1 -0
- package/dist/hooks/useEntityImpl.d.ts +105 -0
- package/dist/hooks/useEntityImpl.d.ts.map +1 -0
- package/dist/hooks/useEntityList.d.ts +102 -0
- package/dist/hooks/useEntityList.d.ts.map +1 -0
- package/dist/hooks/useEntityListCore.d.ts +49 -0
- package/dist/hooks/useEntityListCore.d.ts.map +1 -0
- package/dist/hooks/useEntityListImpl.d.ts +70 -0
- package/dist/hooks/useEntityListImpl.d.ts.map +1 -0
- package/dist/hooks/useErrors.d.ts +72 -0
- package/dist/hooks/useErrors.d.ts.map +1 -0
- package/dist/hooks/usePersist.d.ts +115 -0
- package/dist/hooks/usePersist.d.ts.map +1 -0
- package/dist/hooks/useSelectionCollection.d.ts +41 -0
- package/dist/hooks/useSelectionCollection.d.ts.map +1 -0
- package/dist/hooks/useSelectionCollectionForList.d.ts +40 -0
- package/dist/hooks/useSelectionCollectionForList.d.ts.map +1 -0
- package/dist/hooks/useStableSelectionMeta.d.ts +11 -0
- package/dist/hooks/useStableSelectionMeta.d.ts.map +1 -0
- package/dist/hooks/useStoreSubscription.d.ts +19 -0
- package/dist/hooks/useStoreSubscription.d.ts.map +1 -0
- package/dist/hooks/useUndo.d.ts +45 -0
- package/dist/hooks/useUndo.d.ts.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/jsx/SelectionMeta.d.ts +2 -0
- package/dist/jsx/SelectionMeta.d.ts.map +1 -0
- package/dist/jsx/analyzer.d.ts +22 -0
- package/dist/jsx/analyzer.d.ts.map +1 -0
- package/dist/jsx/collectorProxy.d.ts +14 -0
- package/dist/jsx/collectorProxy.d.ts.map +1 -0
- package/dist/jsx/componentBuilder.d.ts +51 -0
- package/dist/jsx/componentBuilder.d.ts.map +1 -0
- package/dist/jsx/componentBuilder.types.d.ts +268 -0
- package/dist/jsx/componentBuilder.types.d.ts.map +1 -0
- package/dist/jsx/componentBuilderCompat.d.ts +17 -0
- package/dist/jsx/componentBuilderCompat.d.ts.map +1 -0
- package/dist/jsx/componentFactory.d.ts +39 -0
- package/dist/jsx/componentFactory.d.ts.map +1 -0
- package/dist/jsx/components/Entity.d.ts +82 -0
- package/dist/jsx/components/Entity.d.ts.map +1 -0
- package/dist/jsx/components/EntityList.d.ts +48 -0
- package/dist/jsx/components/EntityList.d.ts.map +1 -0
- package/dist/jsx/components/Field.d.ts +27 -0
- package/dist/jsx/components/Field.d.ts.map +1 -0
- package/dist/jsx/components/HasMany.d.ts +34 -0
- package/dist/jsx/components/HasMany.d.ts.map +1 -0
- package/dist/jsx/components/HasOne.d.ts +25 -0
- package/dist/jsx/components/HasOne.d.ts.map +1 -0
- package/dist/jsx/components/HasRole.d.ts +51 -0
- package/dist/jsx/components/HasRole.d.ts.map +1 -0
- package/dist/jsx/components/If.d.ts +51 -0
- package/dist/jsx/components/If.d.ts.map +1 -0
- package/dist/jsx/components/Show.d.ts +33 -0
- package/dist/jsx/components/Show.d.ts.map +1 -0
- package/dist/jsx/components/index.d.ts +8 -0
- package/dist/jsx/components/index.d.ts.map +1 -0
- package/dist/jsx/conditions.d.ts +310 -0
- package/dist/jsx/conditions.d.ts.map +1 -0
- package/dist/jsx/createComponent.d.ts +44 -0
- package/dist/jsx/createComponent.d.ts.map +1 -0
- package/dist/jsx/index.d.ts +19 -0
- package/dist/jsx/index.d.ts.map +1 -0
- package/dist/jsx/inlineProxy.d.ts +14 -0
- package/dist/jsx/inlineProxy.d.ts.map +1 -0
- package/dist/jsx/legacyTypes.d.ts +26 -0
- package/dist/jsx/legacyTypes.d.ts.map +1 -0
- package/dist/jsx/proxy.d.ts +2 -0
- package/dist/jsx/proxy.d.ts.map +1 -0
- package/dist/jsx/proxyShared.d.ts +14 -0
- package/dist/jsx/proxyShared.d.ts.map +1 -0
- package/dist/jsx/runtimeProxy.d.ts +11 -0
- package/dist/jsx/runtimeProxy.d.ts.map +1 -0
- package/dist/jsx/standaloneCreateComponent.d.ts +30 -0
- package/dist/jsx/standaloneCreateComponent.d.ts.map +1 -0
- package/dist/jsx/types.d.ts +109 -0
- package/dist/jsx/types.d.ts.map +1 -0
- package/dist/jsx/withCollector.d.ts +39 -0
- package/dist/jsx/withCollector.d.ts.map +1 -0
- package/dist/roles/RoleContext.d.ts +31 -0
- package/dist/roles/RoleContext.d.ts.map +1 -0
- package/dist/roles/index.d.ts +2 -0
- package/dist/roles/index.d.ts.map +1 -0
- package/package.json +34 -0
- package/src/batching/QueryBatcher.ts +114 -0
- package/src/batching/index.ts +1 -0
- package/src/components/EntityScope.tsx +43 -0
- package/src/hooks/BackendAdapterContext.tsx +214 -0
- package/src/hooks/ContemberBindxProvider.tsx +158 -0
- package/src/hooks/index.ts +61 -0
- package/src/hooks/useBindxEvents.ts +229 -0
- package/src/hooks/useEntity.ts +489 -0
- package/src/hooks/useEntityBeforePersist.ts +32 -0
- package/src/hooks/useEntityList.ts +444 -0
- package/src/hooks/useErrors.ts +150 -0
- package/src/hooks/usePersist.ts +377 -0
- package/src/hooks/useSelectionCollection.ts +122 -0
- package/src/hooks/useStoreSubscription.ts +51 -0
- package/src/hooks/useUndo.ts +83 -0
- package/src/index.ts +357 -0
- package/src/jsx/SelectionMeta.ts +2 -0
- package/src/jsx/analyzer.ts +261 -0
- package/src/jsx/collectorProxy.ts +282 -0
- package/src/jsx/componentBuilder.ts +180 -0
- package/src/jsx/componentBuilder.types.ts +463 -0
- package/src/jsx/componentBuilderCompat.ts +39 -0
- package/src/jsx/componentFactory.ts +400 -0
- package/src/jsx/components/Entity.tsx +383 -0
- package/src/jsx/components/EntityList.tsx +147 -0
- package/src/jsx/components/Field.tsx +79 -0
- package/src/jsx/components/HasMany.tsx +109 -0
- package/src/jsx/components/HasOne.tsx +78 -0
- package/src/jsx/components/HasRole.tsx +95 -0
- package/src/jsx/components/If.tsx +127 -0
- package/src/jsx/components/Show.tsx +56 -0
- package/src/jsx/components/index.ts +20 -0
- package/src/jsx/conditions.ts +472 -0
- package/src/jsx/createComponent.ts +175 -0
- package/src/jsx/index.ts +135 -0
- package/src/jsx/legacyTypes.ts +30 -0
- package/src/jsx/proxy.ts +1 -0
- package/src/jsx/proxyShared.ts +42 -0
- package/src/jsx/standaloneCreateComponent.ts +47 -0
- package/src/jsx/types.ts +192 -0
- package/src/jsx/withCollector.ts +45 -0
- package/src/roles/RoleContext.tsx +57 -0
- package/src/roles/index.ts +1 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composable condition DSL for the <If> component.
|
|
3
|
+
*
|
|
4
|
+
* Provides a type-safe way to express conditions on FieldRef, HasManyRef, and HasOneRef
|
|
5
|
+
* that works correctly during collection phase. The condition builders ensure that
|
|
6
|
+
* referenced fields are collected for the GraphQL query, even when the condition
|
|
7
|
+
* evaluates to false during collection.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { cond } from '@contember/bindx-react'
|
|
12
|
+
*
|
|
13
|
+
* // Simple conditions
|
|
14
|
+
* <If condition={cond.hasItems(task.developers)} then={...} />
|
|
15
|
+
* <If condition={cond.eq(task.status, 'active')} then={...} />
|
|
16
|
+
*
|
|
17
|
+
* // Complex conditions with AND/OR/NOT
|
|
18
|
+
* <If condition={cond.and(
|
|
19
|
+
* cond.hasItems(task.developers),
|
|
20
|
+
* cond.eq(task.status, 'active')
|
|
21
|
+
* )} then={...} />
|
|
22
|
+
*
|
|
23
|
+
* <If condition={cond.or(
|
|
24
|
+
* cond.isEmpty(task.developers),
|
|
25
|
+
* cond.not(cond.isConnected(task.project))
|
|
26
|
+
* )} then={...} />
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @packageDocumentation
|
|
30
|
+
*/
|
|
31
|
+
import type { FieldRefBase, HasManyRefBase, HasOneRefBase } from '@contember/bindx';
|
|
32
|
+
/**
|
|
33
|
+
* Symbol to identify condition objects
|
|
34
|
+
*/
|
|
35
|
+
export declare const CONDITION_META: unique symbol;
|
|
36
|
+
/**
|
|
37
|
+
* Internal metadata for a condition.
|
|
38
|
+
*/
|
|
39
|
+
export interface ConditionMeta {
|
|
40
|
+
/** Condition type identifier for debugging */
|
|
41
|
+
readonly type: string;
|
|
42
|
+
/** Fields to collect for selection (FieldRef/HasManyRef/HasOneRef) */
|
|
43
|
+
readonly fields: unknown[];
|
|
44
|
+
/** Evaluate condition at runtime */
|
|
45
|
+
readonly evaluate: () => boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A composable condition for the <If> component.
|
|
49
|
+
*
|
|
50
|
+
* Conditions can be combined using `cond.and()`, `cond.or()`, and `cond.not()`.
|
|
51
|
+
* All referenced fields are automatically collected for the GraphQL query.
|
|
52
|
+
*/
|
|
53
|
+
export interface Condition {
|
|
54
|
+
readonly [CONDITION_META]: ConditionMeta;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Base type for scalar fields - accepts both FieldRef and FieldRefBase.
|
|
58
|
+
*/
|
|
59
|
+
type AnyScalarField<T> = FieldRefBase<T>;
|
|
60
|
+
/**
|
|
61
|
+
* Base type for has-many - accepts both HasManyRef and HasManyRefBase.
|
|
62
|
+
*/
|
|
63
|
+
type AnyHasManyField = HasManyRefBase<any, any, any, any, any>;
|
|
64
|
+
/**
|
|
65
|
+
* Base type for has-one - accepts both HasOneRef and HasOneRefBase.
|
|
66
|
+
*/
|
|
67
|
+
type AnyHasOneField = HasOneRefBase<any, any, any, any, any>;
|
|
68
|
+
/**
|
|
69
|
+
* Condition builder - single import for all condition operations.
|
|
70
|
+
*
|
|
71
|
+
* Use this to create conditions for the <If> component that work correctly
|
|
72
|
+
* during both collection and runtime phases.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* import { cond } from '@contember/bindx-react'
|
|
77
|
+
*
|
|
78
|
+
* // Simple conditions
|
|
79
|
+
* <If condition={cond.hasItems(task.developers)} then={...} />
|
|
80
|
+
* <If condition={cond.eq(task.status, 'active')} then={...} />
|
|
81
|
+
*
|
|
82
|
+
* // Complex conditions with AND/OR/NOT
|
|
83
|
+
* <If condition={cond.and(
|
|
84
|
+
* cond.hasItems(task.developers),
|
|
85
|
+
* cond.eq(task.status, 'active')
|
|
86
|
+
* )} then={...} />
|
|
87
|
+
*
|
|
88
|
+
* <If condition={cond.or(
|
|
89
|
+
* cond.isEmpty(task.developers),
|
|
90
|
+
* cond.not(cond.isConnected(task.project))
|
|
91
|
+
* )} then={...} />
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare const cond: {
|
|
95
|
+
/**
|
|
96
|
+
* Check if a has-many relation has items.
|
|
97
|
+
*
|
|
98
|
+
* @param field - The has-many field reference
|
|
99
|
+
* @returns A condition that is true when the relation has at least one item
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```tsx
|
|
103
|
+
* <If condition={cond.hasItems(task.developers)} then={
|
|
104
|
+
* <HasMany field={task.developers}>{dev => <span>{dev.name.value}</span>}</HasMany>
|
|
105
|
+
* } />
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
readonly hasItems: (field: AnyHasManyField) => Condition;
|
|
109
|
+
/**
|
|
110
|
+
* Check if a has-many relation is empty.
|
|
111
|
+
*
|
|
112
|
+
* @param field - The has-many field reference
|
|
113
|
+
* @returns A condition that is true when the relation has no items
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```tsx
|
|
117
|
+
* <If condition={cond.isEmpty(task.developers)} then={
|
|
118
|
+
* <span>No developers assigned</span>
|
|
119
|
+
* } />
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
readonly isEmpty: (field: AnyHasManyField) => Condition;
|
|
123
|
+
/**
|
|
124
|
+
* Check if a has-one relation is connected.
|
|
125
|
+
*
|
|
126
|
+
* @param field - The has-one field reference
|
|
127
|
+
* @returns A condition that is true when the relation points to an entity
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```tsx
|
|
131
|
+
* <If condition={cond.isConnected(task.project)} then={
|
|
132
|
+
* <HasOne field={task.project}>{project => <span>{project.name.value}</span>}</HasOne>
|
|
133
|
+
* } />
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
readonly isConnected: (field: AnyHasOneField) => Condition;
|
|
137
|
+
/**
|
|
138
|
+
* Check if a has-one relation is disconnected.
|
|
139
|
+
*
|
|
140
|
+
* @param field - The has-one field reference
|
|
141
|
+
* @returns A condition that is true when the relation is not connected
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```tsx
|
|
145
|
+
* <If condition={cond.isDisconnected(task.project)} then={
|
|
146
|
+
* <span>No project assigned</span>
|
|
147
|
+
* } />
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
readonly isDisconnected: (field: AnyHasOneField) => Condition;
|
|
151
|
+
/**
|
|
152
|
+
* Check if a field equals a value.
|
|
153
|
+
*
|
|
154
|
+
* @param field - The field reference
|
|
155
|
+
* @param value - The value to compare against
|
|
156
|
+
* @returns A condition that is true when the field value equals the given value
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```tsx
|
|
160
|
+
* <If condition={cond.eq(task.status, 'completed')} then={
|
|
161
|
+
* <span className="text-green-500">Done!</span>
|
|
162
|
+
* } />
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
readonly eq: <T>(field: AnyScalarField<T>, value: T) => Condition;
|
|
166
|
+
/**
|
|
167
|
+
* Check if a field is not equal to a value.
|
|
168
|
+
*
|
|
169
|
+
* @param field - The field reference
|
|
170
|
+
* @param value - The value to compare against
|
|
171
|
+
* @returns A condition that is true when the field value does not equal the given value
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```tsx
|
|
175
|
+
* <If condition={cond.neq(task.status, 'cancelled')} then={
|
|
176
|
+
* <TaskActions task={task} />
|
|
177
|
+
* } />
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
readonly neq: <T>(field: AnyScalarField<T>, value: T) => Condition;
|
|
181
|
+
/**
|
|
182
|
+
* Check if a field is null.
|
|
183
|
+
*
|
|
184
|
+
* @param field - The field reference
|
|
185
|
+
* @returns A condition that is true when the field value is null
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```tsx
|
|
189
|
+
* <If condition={cond.isNull(task.completedAt)} then={
|
|
190
|
+
* <span>In progress</span>
|
|
191
|
+
* } />
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
readonly isNull: <T>(field: AnyScalarField<T>) => Condition;
|
|
195
|
+
/**
|
|
196
|
+
* Check if a field is not null.
|
|
197
|
+
*
|
|
198
|
+
* @param field - The field reference
|
|
199
|
+
* @returns A condition that is true when the field value is not null
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```tsx
|
|
203
|
+
* <If condition={cond.isNotNull(task.completedAt)} then={
|
|
204
|
+
* <span>Completed: {task.completedAt.value}</span>
|
|
205
|
+
* } />
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
readonly isNotNull: <T>(field: AnyScalarField<T>) => Condition;
|
|
209
|
+
/**
|
|
210
|
+
* Check if a field value is truthy.
|
|
211
|
+
*
|
|
212
|
+
* @param field - The field reference (typically boolean)
|
|
213
|
+
* @returns A condition that is true when the field value is truthy
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* ```tsx
|
|
217
|
+
* <If condition={cond.isTruthy(task.isUrgent)} then={
|
|
218
|
+
* <Badge variant="destructive">Urgent!</Badge>
|
|
219
|
+
* } />
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
readonly isTruthy: <T>(field: AnyScalarField<T>) => Condition;
|
|
223
|
+
/**
|
|
224
|
+
* Check if a field value is falsy.
|
|
225
|
+
*
|
|
226
|
+
* @param field - The field reference (typically boolean)
|
|
227
|
+
* @returns A condition that is true when the field value is falsy
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```tsx
|
|
231
|
+
* <If condition={cond.isFalsy(task.isArchived)} then={
|
|
232
|
+
* <TaskActions task={task} />
|
|
233
|
+
* } />
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
readonly isFalsy: <T>(field: AnyScalarField<T>) => Condition;
|
|
237
|
+
/**
|
|
238
|
+
* Logical AND - all conditions must be true.
|
|
239
|
+
*
|
|
240
|
+
* @param conditions - Conditions to combine
|
|
241
|
+
* @returns A condition that is true when all given conditions are true
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```tsx
|
|
245
|
+
* <If condition={cond.and(
|
|
246
|
+
* cond.hasItems(task.developers),
|
|
247
|
+
* cond.eq(task.status, 'active'),
|
|
248
|
+
* cond.isConnected(task.project)
|
|
249
|
+
* )} then={
|
|
250
|
+
* <span>Task is ready</span>
|
|
251
|
+
* } />
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
readonly and: (...conditions: Condition[]) => Condition;
|
|
255
|
+
/**
|
|
256
|
+
* Logical OR - at least one condition must be true.
|
|
257
|
+
*
|
|
258
|
+
* @param conditions - Conditions to combine
|
|
259
|
+
* @returns A condition that is true when at least one given condition is true
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* ```tsx
|
|
263
|
+
* <If condition={cond.or(
|
|
264
|
+
* cond.eq(task.status, 'completed'),
|
|
265
|
+
* cond.eq(task.status, 'cancelled')
|
|
266
|
+
* )} then={
|
|
267
|
+
* <span>Task is finished</span>
|
|
268
|
+
* } />
|
|
269
|
+
* ```
|
|
270
|
+
*/
|
|
271
|
+
readonly or: (...conditions: Condition[]) => Condition;
|
|
272
|
+
/**
|
|
273
|
+
* Logical NOT - negate a condition.
|
|
274
|
+
*
|
|
275
|
+
* @param condition - Condition to negate
|
|
276
|
+
* @returns A condition that is true when the given condition is false
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* ```tsx
|
|
280
|
+
* <If condition={cond.not(cond.isConnected(task.project))} then={
|
|
281
|
+
* <span>No project assigned</span>
|
|
282
|
+
* } />
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
readonly not: (condition: Condition) => Condition;
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Check if a value is a Condition object.
|
|
289
|
+
*
|
|
290
|
+
* @param value - Value to check
|
|
291
|
+
* @returns True if the value is a Condition
|
|
292
|
+
*/
|
|
293
|
+
export declare function isCondition(value: unknown): value is Condition;
|
|
294
|
+
/**
|
|
295
|
+
* Collect all field references from a condition.
|
|
296
|
+
* Used by the selection collector to ensure all fields are included in the query.
|
|
297
|
+
*
|
|
298
|
+
* @param condition - The condition to collect fields from
|
|
299
|
+
* @returns Array of field references
|
|
300
|
+
*/
|
|
301
|
+
export declare function collectConditionFields(condition: Condition): unknown[];
|
|
302
|
+
/**
|
|
303
|
+
* Evaluate a condition at runtime.
|
|
304
|
+
*
|
|
305
|
+
* @param condition - The condition to evaluate
|
|
306
|
+
* @returns The boolean result of the condition
|
|
307
|
+
*/
|
|
308
|
+
export declare function evaluateCondition(condition: Condition): boolean;
|
|
309
|
+
export {};
|
|
310
|
+
//# sourceMappingURL=conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../src/jsx/conditions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAEX,YAAY,EAEZ,cAAc,EAEd,aAAa,EACb,MAAM,kBAAkB,CAAA;AAMzB;;GAEG;AACH,eAAO,MAAM,cAAc,eAA2B,CAAA;AAEtD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,CAAA;IAC1B,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAA;CAChC;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACzB,QAAQ,CAAC,CAAC,cAAc,CAAC,EAAE,aAAa,CAAA;CACxC;AAMD;;GAEG;AACH,KAAK,cAAc,CAAC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3B,CAAA;AAMV;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,EAAE,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAE/D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component creation utilities for bindx.
|
|
3
|
+
*
|
|
4
|
+
* The main createComponent function is now provided by createBindx() using the builder API.
|
|
5
|
+
* This module re-exports builder utilities and provides helper functions.
|
|
6
|
+
*/
|
|
7
|
+
import type { FluentFragment, AnyBrand } from '@contember/bindx';
|
|
8
|
+
import { ComponentBrand } from '@contember/bindx';
|
|
9
|
+
export { COMPONENT_MARKER, COMPONENT_BRAND, COMPONENT_SELECTIONS, ComponentBuilderImpl, createComponentBuilder, isBindxComponent, getComponentBrand, } from './componentBuilder.js';
|
|
10
|
+
export type { SelectionPropMeta, BindxComponentBase, BindxComponent, ComponentBuilder, ComponentBuilderState, CreateComponentOptions, InterfaceEntityPropConfig, ImplicitInterfaceEntityConfig, ExplicitInterfaceEntityConfig, AddInterfaces, InterfaceSelectorsMap, AnyEntityPropConfig, EntityPropConfig, ImplicitEntityConfig, ExplicitEntityConfig, AddImplicitEntity, AddExplicitEntity, AddImplicitInterfaceEntity, AddExplicitInterfaceEntity, SetScalarProps, BuildEntityProps, BuildProps, BuildFragmentProps, InitialBuilderState, } from './componentBuilder.types.js';
|
|
11
|
+
export { assignFragmentProperties } from './componentBuilderCompat.js';
|
|
12
|
+
/**
|
|
13
|
+
* Enables or disables brand validation.
|
|
14
|
+
* Call with false in production to disable warnings.
|
|
15
|
+
*/
|
|
16
|
+
export declare function setBrandValidation(enabled: boolean): void;
|
|
17
|
+
/**
|
|
18
|
+
* Validates that an EntityRef has the required component brand.
|
|
19
|
+
* Logs a warning in development mode if the brand is missing.
|
|
20
|
+
*
|
|
21
|
+
* @param entityRef - The EntityRef to validate
|
|
22
|
+
* @param component - The component that requires the brand
|
|
23
|
+
* @param propName - The prop name for error messages
|
|
24
|
+
*/
|
|
25
|
+
export declare function validateBrand(entityRef: {
|
|
26
|
+
__brands?: Set<symbol>;
|
|
27
|
+
} | null | undefined, component: {
|
|
28
|
+
[key: symbol]: ComponentBrand | undefined;
|
|
29
|
+
}, propName: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Merges multiple fragment selections into one.
|
|
32
|
+
* Combines both the selection metadata and brand symbols.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const article = useEntity('Article', { id }, e =>
|
|
37
|
+
* e.author(mergeFragments(AuthorInfo.$author, AuthorCard.$author))
|
|
38
|
+
* )
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function mergeFragments<T, R1 extends object, B1 extends AnyBrand>(fragment1: FluentFragment<T, R1, B1>): FluentFragment<T, R1, B1>;
|
|
42
|
+
export declare function mergeFragments<T, R1 extends object, R2 extends object, B1 extends AnyBrand, B2 extends AnyBrand>(fragment1: FluentFragment<T, R1, B1>, fragment2: FluentFragment<T, R2, B2>): FluentFragment<T, R1 & R2, B1 | B2>;
|
|
43
|
+
export declare function mergeFragments<T, R1 extends object, R2 extends object, R3 extends object, B1 extends AnyBrand, B2 extends AnyBrand, B3 extends AnyBrand>(fragment1: FluentFragment<T, R1, B1>, fragment2: FluentFragment<T, R2, B2>, fragment3: FluentFragment<T, R3, B3>): FluentFragment<T, R1 & R2 & R3, B1 | B2 | B3>;
|
|
44
|
+
//# sourceMappingURL=createComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../../src/jsx/createComponent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,c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CAAC,CAAA;AAC5B,wBAAgB,cAAc,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,QAAQ,EAAE,EAAE,SAAS,QAAQ,EAC/G,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EACpC,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,GAClC,cAAc,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;AACtC,wBAAgB,cAAc,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,QAAQ,EAAE,EAAE,SAAS,QAAQ,EAAE,EAAE,SAAS,QAAQ,EACvJ,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EACpC,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EACpC,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,GAClC,cAAc,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { BINDX_COMPONENT, FIELD_REF_META, type FieldRefMeta, type FieldRef, type HasManyRef, type HasOneRef, type HasOneAccessor, type EntityRef, type EntityAccessor, type FieldRefBase, type HasManyRefBase, type HasOneRefBase, type HasOneAccessorBase, type EntityRefBase, type EntityAccessorBase, type EntityFields, type SelectedEntityFields, type SelectedEntityFieldsBase, type FieldProps, type HasManyProps, type HasOneProps, type IfProps, type EntityComponentProps, type SelectionMeta, type SelectionFieldMeta, type HasManyComponentOptions, type SelectionProvider, type AnyBrand, } from './types.js';
|
|
2
|
+
export { SelectionMetaCollector, mergeSelections, createEmptySelection, } from './SelectionMeta.js';
|
|
3
|
+
export { createCollectorProxy, } from './proxy.js';
|
|
4
|
+
export { analyzeJsx, collectSelection, convertToQuerySelection, debugSelection, } from './analyzer.js';
|
|
5
|
+
export { Field, FieldWithMeta } from './components/Field.js';
|
|
6
|
+
export { HasMany, HasManyWithMeta } from './components/HasMany.js';
|
|
7
|
+
export { HasOne, HasOneWithMeta } from './components/HasOne.js';
|
|
8
|
+
export { If, IfWithMeta } from './components/If.js';
|
|
9
|
+
export { Show, ShowWithMeta, type ShowProps } from './components/Show.js';
|
|
10
|
+
export { Entity, type EntityProps } from './components/Entity.js';
|
|
11
|
+
export { EntityList, type EntityListProps } from './components/EntityList.js';
|
|
12
|
+
export { HasRole, type HasRoleProps } from './components/HasRole.js';
|
|
13
|
+
export { cond, isCondition, evaluateCondition, collectConditionFields, CONDITION_META, type Condition, type ConditionMeta, } from './conditions.js';
|
|
14
|
+
export { isBindxComponent, mergeFragments, COMPONENT_MARKER, COMPONENT_BRAND, COMPONENT_SELECTIONS, createComponentBuilder, ComponentBuilderImpl, getComponentBrand, setBrandValidation, validateBrand, } from './createComponent.js';
|
|
15
|
+
export { createComponent } from './standaloneCreateComponent.js';
|
|
16
|
+
export { withCollector } from './withCollector.js';
|
|
17
|
+
export type { SelectionPropMeta, BindxComponentBase, BindxComponent, ComponentBuilder, ComponentBuilderState, CreateComponentOptions, InterfaceEntityPropConfig, ImplicitInterfaceEntityConfig, ExplicitInterfaceEntityConfig, AddInterfaces, InterfaceSelectorsMap, AnyEntityPropConfig, EntityPropConfig, ImplicitEntityConfig, ExplicitEntityConfig, AddImplicitEntity, AddExplicitEntity, AddImplicitInterfaceEntity, AddExplicitInterfaceEntity, SetScalarProps, BuildEntityProps, BuildProps, BuildFragmentProps, InitialBuilderState, } from './createComponent.js';
|
|
18
|
+
export type { EntityPropKeys, EntityFromProp, SelectionFromProp, ImplicitFragmentProperties, } from './legacyTypes.js';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jsx/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,eAAe,EACf,cAAc,EACd,KAAK,YAAY,EAEjB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAEvB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAE7B,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,QAAQ,GACb,MAAM,YAAY,CAAA;AAGnB,OAAO,EACN,sBAAsB,EACtB,eAAe,EACf,oBAAoB,GACpB,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EACN,oBAAoB,GACpB,MAAM,YAAY,CAAA;AAGnB,OAAO,EACN,UAAU,EACV,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,GACd,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAGpE,OAAO,EACN,IAAI,EACJ,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,KAAK,SAAS,EACd,KAAK,aAAa,GAClB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EACN,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,GACb,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAGhE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,YAAY,EACX,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EAEtB,yBAAyB,EACzB,6BAA6B,EAC7B,6BAA6B,EAC7B,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EAEnB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EAEpB,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,0BAA0B,EAC1B,cAAc,EAEd,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,mBAAmB,GACnB,MAAM,sBAAsB,CAAA;AAG7B,YAAY,EACX,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,0BAA0B,GAC1B,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SnapshotStore, SelectionMeta } from '@contember/bindx';
|
|
2
|
+
import { type EntityAccessor, type EntityFields } from './types.js';
|
|
3
|
+
import { type NotifyChange } from './proxyShared.js';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a fields proxy that reads directly from inline data.
|
|
6
|
+
* Used for nested relations to avoid store modifications during render.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createInlineFieldsProxy(data: Record<string, unknown>, basePath: string[], store: SnapshotStore, notifyChange: NotifyChange, selection?: SelectionMeta): EntityFields<unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* Creates an accessor that reads directly from inline data.
|
|
11
|
+
* Used for nested relations to avoid store modifications during render.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createInlineAccessor(data: Record<string, unknown>, basePath: string[], store: SnapshotStore, notifyChange: NotifyChange, selection?: SelectionMeta): EntityAccessor<unknown>;
|
|
14
|
+
//# sourceMappingURL=inlineProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inlineProxy.d.ts","sourceRoot":"","sources":["../../src/jsx/inlineProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAc,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhF,OAAO,EAEN,KAAK,cAAc,EACnB,KAAK,YAAY,EAKjB,MAAM,YAAY,CAAA;AACnB,OAAO,EACN,KAAK,YAAY,EAMjB,MAAM,kBAAkB,CAAA;AAEzB;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,aAAa,EACpB,YAAY,EAAE,YAAY,EAC1B,SAAS,CAAC,EAAE,aAAa,GACvB,YAAY,CAAC,OAAO,CAAC,CAOvB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,aAAa,EACpB,YAAY,EAAE,YAAY,EAC1B,SAAS,CAAC,EAAE,aAAa,GACvB,cAAc,CAAC,OAAO,CAAC,CA6BzB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy type exports for backwards compatibility.
|
|
3
|
+
* These types were previously exported from createComponent.ts
|
|
4
|
+
*/
|
|
5
|
+
import type { EntityRef, FluentFragment } from '@contember/bindx';
|
|
6
|
+
/**
|
|
7
|
+
* Extract keys from props type where value is EntityRef<any, any>
|
|
8
|
+
*/
|
|
9
|
+
export type EntityPropKeys<P> = {
|
|
10
|
+
[K in keyof P]: P[K] extends EntityRef<infer _T, infer _S> ? K : never;
|
|
11
|
+
}[keyof P];
|
|
12
|
+
/**
|
|
13
|
+
* Extract the full entity type from an EntityRef prop
|
|
14
|
+
*/
|
|
15
|
+
export type EntityFromProp<P, K extends keyof P> = P[K] extends EntityRef<infer T, infer _S> ? T : never;
|
|
16
|
+
/**
|
|
17
|
+
* Extract the selection type from an EntityRef prop
|
|
18
|
+
*/
|
|
19
|
+
export type SelectionFromProp<P, K extends keyof P> = P[K] extends EntityRef<infer _T, infer S> ? S : never;
|
|
20
|
+
/**
|
|
21
|
+
* Fragment properties for implicit mode - $propName for each entity prop
|
|
22
|
+
*/
|
|
23
|
+
export type ImplicitFragmentProperties<P> = {
|
|
24
|
+
[K in EntityPropKeys<P> as `$${K & string}`]: FluentFragment<EntityFromProp<P, K>, SelectionFromProp<P, K>>;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=legacyTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyTypes.d.ts","sourceRoot":"","sources":["../../src/jsx/legacyTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjE;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;KAC9B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK;CACtE,CAAC,MAAM,CAAC,CAAC,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAExG;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE3G;;GAEG;AACH,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI;KAC1C,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,MAAM,EAAE,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3G,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/jsx/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type EntityRef, type EntityAccessor } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Known properties on entity accessor that should NOT be treated as field access.
|
|
4
|
+
* Properties are accessed with $ prefix for consistency with EntityHandle.
|
|
5
|
+
* Used by collector proxy.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ENTITY_ACCESSOR_PROPERTIES: Set<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Wraps an EntityRef in a Proxy that supports direct field access.
|
|
10
|
+
* - `entity.fieldName` is equivalent to `entity.$fields.fieldName`
|
|
11
|
+
* - Known accessor properties pass through to the target
|
|
12
|
+
*/
|
|
13
|
+
export declare function wrapEntityRefWithFieldAccessProxy<T>(ref: EntityRef<T>): EntityAccessor<T>;
|
|
14
|
+
//# sourceMappingURL=proxyShared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxyShared.d.ts","sourceRoot":"","sources":["../../src/jsx/proxyShared.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,MAAM,YAAY,CAAA;AAEnB;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,aAMrC,CAAA;AAEF;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAiBzF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SnapshotStore, SelectionMeta } from '@contember/bindx';
|
|
2
|
+
import { type EntityAccessor } from './types.js';
|
|
3
|
+
import { type NotifyChange } from './proxyShared.js';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a runtime accessor with real data from SnapshotStore.
|
|
6
|
+
* Supports direct field access: `entity.fieldName` is equivalent to `entity.$fields.fieldName`.
|
|
7
|
+
*
|
|
8
|
+
* @param selection - Optional selection metadata. When provided, accessing fields not in the selection will throw UnfetchedFieldError.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createRuntimeAccessor<T>(entityType: string, entityId: string, store: SnapshotStore, notifyChange: NotifyChange, path?: string[], selection?: SelectionMeta): EntityAccessor<T>;
|
|
11
|
+
//# sourceMappingURL=runtimeProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtimeProxy.d.ts","sourceRoot":"","sources":["../../src/jsx/runtimeProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAc,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhF,OAAO,EAEN,KAAK,cAAc,EAMnB,MAAM,YAAY,CAAA;AAEnB,OAAO,EACN,KAAK,YAAY,EAOjB,MAAM,kBAAkB,CAAA;AAGzB;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACtC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,aAAa,EACpB,YAAY,EAAE,YAAY,EAC1B,IAAI,GAAE,MAAM,EAAO,EACnB,SAAS,CAAC,EAAE,aAAa,GACvB,cAAc,CAAC,CAAC,CAAC,CAqEnB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standalone createComponent function.
|
|
3
|
+
*
|
|
4
|
+
* Unlike the old createBindx()-returned createComponent, this function
|
|
5
|
+
* does not need a schema-bound closure. The SchemaRegistry is passed as null
|
|
6
|
+
* and components resolve it from context at render time if needed.
|
|
7
|
+
*/
|
|
8
|
+
import type { ComponentBuilder, ComponentBuilderState, CreateComponentOptions } from './componentBuilder.types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Creates a component builder for defining bindx components.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { createComponent } from '@contember/bindx-react'
|
|
15
|
+
* import { schema } from './generated'
|
|
16
|
+
*
|
|
17
|
+
* const ArticleCard = createComponent()
|
|
18
|
+
* .entity('article', schema.Article, e => e.title().author(a => a.name()))
|
|
19
|
+
* .props<{ className?: string }>()
|
|
20
|
+
* .render(({ article, className }) => (
|
|
21
|
+
* <div className={className}>
|
|
22
|
+
* <h2>{article.$data?.title}</h2>
|
|
23
|
+
* <span>{article.$data?.author?.name}</span>
|
|
24
|
+
* </div>
|
|
25
|
+
* ))
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function createComponent(): ComponentBuilder<ComponentBuilderState<{}, object, readonly string[]>>;
|
|
29
|
+
export declare function createComponent<const TRoles extends readonly string[]>(options: CreateComponentOptions<TRoles>): ComponentBuilder<ComponentBuilderState<{}, object, TRoles>>;
|
|
30
|
+
//# sourceMappingURL=standaloneCreateComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standaloneCreateComponent.d.ts","sourceRoot":"","sources":["../../src/jsx/standaloneCreateComponent.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACX,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,MAAM,6BAA6B,CAAA;AAGpC;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,eAAe,IAAI,gBAAgB,CAAC,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;AACzG,wBAAgB,eAAe,CAAC,KAAK,CAAC,MAAM,SAAS,SAAS,MAAM,EAAE,EACrE,OAAO,EAAE,sBAAsB,CAAC,MAAM,CAAC,GAErC,gBAAgB,CAAC,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SelectionMeta, SelectionFieldMeta, EntityFields, FieldRefMeta, ScalarKeys, HasManyKeys, HasOneKeys, SelectedEntityFields, SelectedEntityFieldsBase, FieldRef, HasManyRef, HasOneRef, HasOneAccessor, EntityRef, EntityAccessor, FieldRefBase, HasManyRefBase, HasOneRefBase, HasOneAccessorBase, EntityRefBase, EntityAccessorBase, AnyBrand } from '@contember/bindx';
|
|
3
|
+
import { Condition } from './conditions.js';
|
|
4
|
+
export type { SelectionMeta, SelectionFieldMeta };
|
|
5
|
+
export { FIELD_REF_META } from '@contember/bindx';
|
|
6
|
+
export type { EntityFields, FieldRefMeta, ScalarKeys, HasManyKeys, HasOneKeys, SelectedEntityFields, SelectedEntityFieldsBase, FieldRef, HasManyRef, HasOneRef, HasOneAccessor, EntityRef, EntityAccessor, FieldRefBase, HasManyRefBase, HasOneRefBase, HasOneAccessorBase, EntityRefBase, EntityAccessorBase, AnyBrand, };
|
|
7
|
+
/**
|
|
8
|
+
* Marker symbol for identifying bindx components
|
|
9
|
+
*/
|
|
10
|
+
export declare const BINDX_COMPONENT: unique symbol;
|
|
11
|
+
/**
|
|
12
|
+
* Symbol for direct scope access on collector proxies.
|
|
13
|
+
* Replaces NESTED_SELECTION_REF - carries the SelectionScope directly.
|
|
14
|
+
* Used when passing relation entities to nested createComponent components.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SCOPE_REF: unique symbol;
|
|
17
|
+
/**
|
|
18
|
+
* Props for Field component.
|
|
19
|
+
* Accepts FieldRefBase, so both FieldRef (explicit) and FieldRefBase (implicit) work.
|
|
20
|
+
*/
|
|
21
|
+
export interface FieldProps<T> {
|
|
22
|
+
field: FieldRefBase<T>;
|
|
23
|
+
children?: (accessor: FieldRef<T>) => ReactNode;
|
|
24
|
+
format?: (value: T | null) => ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Options for HasMany relation
|
|
28
|
+
*/
|
|
29
|
+
export interface HasManyComponentOptions {
|
|
30
|
+
filter?: unknown;
|
|
31
|
+
orderBy?: unknown;
|
|
32
|
+
limit?: number;
|
|
33
|
+
offset?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Props for HasMany component.
|
|
37
|
+
* Selection-aware: children callback receives EntityAccessor with direct field access.
|
|
38
|
+
* Accepts HasManyRefBase, so both HasManyRef (explicit) and HasManyRefBase (implicit) work.
|
|
39
|
+
*
|
|
40
|
+
* @typeParam TEntity - The full entity type
|
|
41
|
+
* @typeParam TSelected - The selected subset of fields (defaults to TEntity for backwards compatibility)
|
|
42
|
+
* @typeParam TBrand - Component brand type for validation (defaults to AnyBrand)
|
|
43
|
+
* @typeParam TEntityName - Entity name as string literal for type narrowing
|
|
44
|
+
* @typeParam TSchema - Schema for entity name lookup in nested relations
|
|
45
|
+
*/
|
|
46
|
+
export interface HasManyProps<TEntity, TSelected = TEntity, TBrand extends AnyBrand = AnyBrand, TEntityName extends string = string, TSchema extends Record<string, object> = Record<string, object>> {
|
|
47
|
+
field: HasManyRefBase<TEntity, TSelected, TBrand, TEntityName, TSchema>;
|
|
48
|
+
children: (item: EntityAccessor<TEntity, TSelected, TBrand, TEntityName, TSchema>, index: number) => ReactNode;
|
|
49
|
+
filter?: unknown;
|
|
50
|
+
orderBy?: unknown;
|
|
51
|
+
limit?: number;
|
|
52
|
+
offset?: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Props for HasOne component.
|
|
56
|
+
* Selection-aware: children callback receives EntityAccessor with direct field access.
|
|
57
|
+
* Accepts HasOneRefBase, so both HasOneRef (explicit) and HasOneRefBase (implicit) work.
|
|
58
|
+
*
|
|
59
|
+
* @typeParam TEntity - The full entity type
|
|
60
|
+
* @typeParam TSelected - The selected subset of fields (defaults to TEntity for backwards compatibility)
|
|
61
|
+
* @typeParam TBrand - Component brand type for validation (defaults to AnyBrand)
|
|
62
|
+
* @typeParam TEntityName - Entity name as string literal for type narrowing
|
|
63
|
+
* @typeParam TSchema - Schema for entity name lookup in nested relations
|
|
64
|
+
*/
|
|
65
|
+
export interface HasOneProps<TEntity, TSelected = TEntity, TBrand extends AnyBrand = AnyBrand, TEntityName extends string = string, TSchema extends Record<string, object> = Record<string, object>> {
|
|
66
|
+
field: HasOneRefBase<TEntity, TSelected, TBrand, TEntityName, TSchema>;
|
|
67
|
+
children: (entity: EntityAccessor<TEntity, TSelected, TBrand, TEntityName, TSchema>) => ReactNode;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Props for Entity component.
|
|
71
|
+
* Entity name is preserved for proper HasRole type narrowing.
|
|
72
|
+
* Children receive EntityAccessor with direct field access.
|
|
73
|
+
*/
|
|
74
|
+
export interface EntityComponentProps<TSchema extends Record<string, object>, K extends keyof TSchema & string> {
|
|
75
|
+
name: K;
|
|
76
|
+
id: string;
|
|
77
|
+
children: (entity: EntityAccessor<TSchema[K], TSchema[K], import('@contember/bindx').AnyBrand, K, TSchema>) => ReactNode;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Props for If conditional component.
|
|
81
|
+
*
|
|
82
|
+
* Supports three types of conditions:
|
|
83
|
+
* 1. Boolean literals: `condition={true}` or `condition={someBoolean}`
|
|
84
|
+
* 2. FieldRef<boolean>: `condition={task.isActive}` - field value is used
|
|
85
|
+
* 3. Condition objects: `condition={cond.hasItems(task.developers)}` - composable DSL
|
|
86
|
+
*
|
|
87
|
+
* Using the Condition DSL is recommended for implicit selection mode as it ensures
|
|
88
|
+
* all referenced fields are collected for the GraphQL query.
|
|
89
|
+
*/
|
|
90
|
+
export interface IfProps {
|
|
91
|
+
/**
|
|
92
|
+
* Condition to evaluate. Can be:
|
|
93
|
+
* - A boolean literal
|
|
94
|
+
* - A FieldRef<boolean>
|
|
95
|
+
* - A Condition object from the condition builders (hasItems, isEmpty, eq, and, or, not, etc.)
|
|
96
|
+
*/
|
|
97
|
+
condition: boolean | FieldRef<boolean> | Condition;
|
|
98
|
+
then: ReactNode;
|
|
99
|
+
else?: ReactNode;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Interface for components that can provide selection info
|
|
103
|
+
*/
|
|
104
|
+
export interface SelectionProvider {
|
|
105
|
+
getSelection(props: unknown, collectNested: (children: ReactNode) => SelectionMeta): SelectionFieldMeta | SelectionFieldMeta[] | null;
|
|
106
|
+
}
|
|
107
|
+
export type { EntityPropKeys, EntityFromProp, SelectionFromProp, ImplicitFragmentProperties, } from './legacyTypes.js';
|
|
108
|
+
export { COMPONENT_MARKER, COMPONENT_SELECTIONS } from './componentBuilder.js';
|
|
109
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","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