@uniformdev/canvas-react 19.179.1-alpha.1 → 19.179.2-alpha.22
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/index.d.mts +201 -85
- package/dist/index.d.ts +201 -85
- package/dist/index.esm.js +7 -2
- package/dist/index.js +2 -1
- package/dist/index.mjs +7 -2
- package/package.json +9 -9
package/dist/index.d.mts
CHANGED
|
@@ -110,36 +110,64 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
110
110
|
connectedData?: {
|
|
111
111
|
pointer: string;
|
|
112
112
|
syntax: "jptr";
|
|
113
|
-
failureAction?: "
|
|
114
|
-
failureLogLevel?: "
|
|
115
|
-
failureDefault?: string
|
|
116
|
-
}
|
|
113
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
114
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
115
|
+
failureDefault?: string;
|
|
116
|
+
};
|
|
117
117
|
locales?: {
|
|
118
118
|
[key: string]: unknown;
|
|
119
|
-
}
|
|
119
|
+
};
|
|
120
|
+
conditions?: {
|
|
121
|
+
when: {
|
|
122
|
+
op?: "&" | "|";
|
|
123
|
+
clauses: ({
|
|
124
|
+
rule: string;
|
|
125
|
+
source?: string;
|
|
126
|
+
op: string;
|
|
127
|
+
value: string | string[];
|
|
128
|
+
} | any)[];
|
|
129
|
+
};
|
|
130
|
+
value: unknown;
|
|
131
|
+
id: number;
|
|
132
|
+
}[];
|
|
133
|
+
localesConditions?: {
|
|
134
|
+
[key: string]: {
|
|
135
|
+
when: {
|
|
136
|
+
op?: "&" | "|";
|
|
137
|
+
clauses: ({
|
|
138
|
+
rule: string;
|
|
139
|
+
source?: string;
|
|
140
|
+
op: string;
|
|
141
|
+
value: string | string[];
|
|
142
|
+
} | any)[];
|
|
143
|
+
};
|
|
144
|
+
value: unknown;
|
|
145
|
+
id: number;
|
|
146
|
+
}[];
|
|
147
|
+
};
|
|
120
148
|
};
|
|
121
|
-
}
|
|
122
|
-
variant?: string
|
|
149
|
+
};
|
|
150
|
+
variant?: string;
|
|
123
151
|
projectMapNodes?: {
|
|
124
152
|
id: string;
|
|
125
153
|
path: string;
|
|
126
154
|
projectMapId: string;
|
|
127
155
|
data?: {
|
|
128
|
-
isSearchHit?: boolean
|
|
156
|
+
isSearchHit?: boolean;
|
|
129
157
|
queryStrings?: {
|
|
130
158
|
name: string;
|
|
131
|
-
value?: string
|
|
132
|
-
helpText?: string
|
|
133
|
-
}[]
|
|
134
|
-
previewValue?: string
|
|
135
|
-
}
|
|
159
|
+
value?: string;
|
|
160
|
+
helpText?: string;
|
|
161
|
+
}[];
|
|
162
|
+
previewValue?: string;
|
|
163
|
+
};
|
|
136
164
|
locales?: {
|
|
137
165
|
[key: string]: {
|
|
138
166
|
path: string;
|
|
139
167
|
inherited: boolean;
|
|
140
168
|
};
|
|
141
|
-
}
|
|
142
|
-
}[]
|
|
169
|
+
};
|
|
170
|
+
}[];
|
|
143
171
|
slots?: {
|
|
144
172
|
[key: string]: {
|
|
145
173
|
type: string;
|
|
@@ -150,44 +178,74 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
150
178
|
connectedData?: {
|
|
151
179
|
pointer: string;
|
|
152
180
|
syntax: "jptr";
|
|
153
|
-
failureAction?: "
|
|
154
|
-
failureLogLevel?: "
|
|
155
|
-
failureDefault?: string
|
|
156
|
-
}
|
|
181
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
182
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
183
|
+
failureDefault?: string;
|
|
184
|
+
};
|
|
157
185
|
locales?: {
|
|
158
186
|
[key: string]: unknown;
|
|
159
|
-
}
|
|
187
|
+
};
|
|
188
|
+
conditions?: {
|
|
189
|
+
when: {
|
|
190
|
+
op?: "&" | "|";
|
|
191
|
+
clauses: ({
|
|
192
|
+
rule: string;
|
|
193
|
+
source?: string;
|
|
194
|
+
op: string;
|
|
195
|
+
value: string | string[];
|
|
196
|
+
} | any)[];
|
|
197
|
+
};
|
|
198
|
+
value: unknown;
|
|
199
|
+
id: number;
|
|
200
|
+
}[];
|
|
201
|
+
localesConditions?: {
|
|
202
|
+
[key: string]: {
|
|
203
|
+
when: {
|
|
204
|
+
op?: "&" | "|";
|
|
205
|
+
clauses: ({
|
|
206
|
+
rule: string;
|
|
207
|
+
source?: string;
|
|
208
|
+
op: string;
|
|
209
|
+
value: string | string[];
|
|
210
|
+
} | any)[];
|
|
211
|
+
};
|
|
212
|
+
value: unknown;
|
|
213
|
+
id: number;
|
|
214
|
+
}[];
|
|
215
|
+
};
|
|
160
216
|
};
|
|
161
|
-
}
|
|
162
|
-
variant?: string
|
|
217
|
+
};
|
|
218
|
+
variant?: string;
|
|
163
219
|
slots?: {
|
|
164
220
|
[key: string]: any[];
|
|
165
|
-
}
|
|
166
|
-
_id?: string
|
|
167
|
-
_pattern?: string
|
|
221
|
+
};
|
|
222
|
+
_id?: string;
|
|
223
|
+
_pattern?: string;
|
|
168
224
|
_dataResources?: {
|
|
169
225
|
[key: string]: {
|
|
170
226
|
type: string;
|
|
171
|
-
isPatternParameter?: boolean
|
|
172
|
-
ignorePatternParameterDefault?: boolean
|
|
173
|
-
optionalPatternParameter?: boolean
|
|
227
|
+
isPatternParameter?: boolean;
|
|
228
|
+
ignorePatternParameterDefault?: boolean;
|
|
229
|
+
optionalPatternParameter?: boolean;
|
|
230
|
+
dataSourceVariant?: "unpublished";
|
|
174
231
|
variables?: {
|
|
175
232
|
[key: string]: string;
|
|
176
|
-
}
|
|
233
|
+
};
|
|
177
234
|
};
|
|
178
|
-
}
|
|
235
|
+
};
|
|
179
236
|
_patternDataResources?: {
|
|
180
237
|
[key: string]: {
|
|
181
238
|
type: string;
|
|
182
|
-
isPatternParameter?: boolean
|
|
183
|
-
ignorePatternParameterDefault?: boolean
|
|
184
|
-
optionalPatternParameter?: boolean
|
|
239
|
+
isPatternParameter?: boolean;
|
|
240
|
+
ignorePatternParameterDefault?: boolean;
|
|
241
|
+
optionalPatternParameter?: boolean;
|
|
242
|
+
dataSourceVariant?: "unpublished";
|
|
185
243
|
variables?: {
|
|
186
244
|
[key: string]: string;
|
|
187
|
-
}
|
|
245
|
+
};
|
|
188
246
|
};
|
|
189
|
-
}
|
|
190
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
247
|
+
};
|
|
248
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
191
249
|
_overrides?: {
|
|
192
250
|
[key: string]: {
|
|
193
251
|
parameters?: {
|
|
@@ -197,62 +255,92 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
197
255
|
connectedData?: {
|
|
198
256
|
pointer: string;
|
|
199
257
|
syntax: "jptr";
|
|
200
|
-
failureAction?: "
|
|
201
|
-
failureLogLevel?: "
|
|
202
|
-
failureDefault?: string
|
|
203
|
-
}
|
|
258
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
259
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
260
|
+
failureDefault?: string;
|
|
261
|
+
};
|
|
204
262
|
locales?: {
|
|
205
263
|
[key: string]: unknown;
|
|
206
|
-
}
|
|
264
|
+
};
|
|
265
|
+
conditions?: {
|
|
266
|
+
when: {
|
|
267
|
+
op?: "&" | "|";
|
|
268
|
+
clauses: ({
|
|
269
|
+
rule: string;
|
|
270
|
+
source?: string;
|
|
271
|
+
op: string;
|
|
272
|
+
value: string | string[];
|
|
273
|
+
} | any)[];
|
|
274
|
+
};
|
|
275
|
+
value: unknown;
|
|
276
|
+
id: number;
|
|
277
|
+
}[];
|
|
278
|
+
localesConditions?: {
|
|
279
|
+
[key: string]: {
|
|
280
|
+
when: {
|
|
281
|
+
op?: "&" | "|";
|
|
282
|
+
clauses: ({
|
|
283
|
+
rule: string;
|
|
284
|
+
source?: string;
|
|
285
|
+
op: string;
|
|
286
|
+
value: string | string[];
|
|
287
|
+
} | any)[];
|
|
288
|
+
};
|
|
289
|
+
value: unknown;
|
|
290
|
+
id: number;
|
|
291
|
+
}[];
|
|
292
|
+
};
|
|
207
293
|
};
|
|
208
|
-
}
|
|
294
|
+
};
|
|
209
295
|
slots?: {
|
|
210
296
|
[key: string]: any[];
|
|
211
|
-
}
|
|
212
|
-
variant?: string
|
|
297
|
+
};
|
|
298
|
+
variant?: string;
|
|
213
299
|
};
|
|
214
|
-
}
|
|
300
|
+
};
|
|
215
301
|
_overridability?: {
|
|
216
302
|
parameters?: {
|
|
217
303
|
[key: string]: "yes" | "no";
|
|
218
|
-
}
|
|
219
|
-
variants?: boolean
|
|
220
|
-
hideLockedParameters?: boolean
|
|
221
|
-
}
|
|
222
|
-
_locales?: string[]
|
|
304
|
+
};
|
|
305
|
+
variants?: boolean;
|
|
306
|
+
hideLockedParameters?: boolean;
|
|
307
|
+
};
|
|
308
|
+
_locales?: string[];
|
|
223
309
|
}[];
|
|
224
|
-
}
|
|
310
|
+
};
|
|
225
311
|
_id: string;
|
|
226
|
-
_slug?: string | null
|
|
312
|
+
_slug?: string | null;
|
|
227
313
|
_name: string;
|
|
228
|
-
_author?: string
|
|
229
|
-
_authorSubject?: string
|
|
230
|
-
_creator?: string
|
|
231
|
-
_creatorSubject?: string
|
|
232
|
-
_pattern?: string
|
|
314
|
+
_author?: string;
|
|
315
|
+
_authorSubject?: string;
|
|
316
|
+
_creator?: string;
|
|
317
|
+
_creatorSubject?: string;
|
|
318
|
+
_pattern?: string;
|
|
233
319
|
_patternDataResources?: {
|
|
234
320
|
[key: string]: {
|
|
235
321
|
type: string;
|
|
236
|
-
isPatternParameter?: boolean
|
|
237
|
-
ignorePatternParameterDefault?: boolean
|
|
238
|
-
optionalPatternParameter?: boolean
|
|
322
|
+
isPatternParameter?: boolean;
|
|
323
|
+
ignorePatternParameterDefault?: boolean;
|
|
324
|
+
optionalPatternParameter?: boolean;
|
|
325
|
+
dataSourceVariant?: "unpublished";
|
|
239
326
|
variables?: {
|
|
240
327
|
[key: string]: string;
|
|
241
|
-
}
|
|
328
|
+
};
|
|
242
329
|
};
|
|
243
|
-
}
|
|
330
|
+
};
|
|
244
331
|
_dataResources?: {
|
|
245
332
|
[key: string]: {
|
|
246
333
|
type: string;
|
|
247
|
-
isPatternParameter?: boolean
|
|
248
|
-
ignorePatternParameterDefault?: boolean
|
|
249
|
-
optionalPatternParameter?: boolean
|
|
334
|
+
isPatternParameter?: boolean;
|
|
335
|
+
ignorePatternParameterDefault?: boolean;
|
|
336
|
+
optionalPatternParameter?: boolean;
|
|
337
|
+
dataSourceVariant?: "unpublished";
|
|
250
338
|
variables?: {
|
|
251
339
|
[key: string]: string;
|
|
252
|
-
}
|
|
340
|
+
};
|
|
253
341
|
};
|
|
254
|
-
}
|
|
255
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
342
|
+
};
|
|
343
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
256
344
|
_overrides?: {
|
|
257
345
|
[key: string]: {
|
|
258
346
|
parameters?: {
|
|
@@ -262,29 +350,57 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
262
350
|
connectedData?: {
|
|
263
351
|
pointer: string;
|
|
264
352
|
syntax: "jptr";
|
|
265
|
-
failureAction?: "
|
|
266
|
-
failureLogLevel?: "
|
|
267
|
-
failureDefault?: string
|
|
268
|
-
}
|
|
353
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
354
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
355
|
+
failureDefault?: string;
|
|
356
|
+
};
|
|
269
357
|
locales?: {
|
|
270
358
|
[key: string]: unknown;
|
|
271
|
-
}
|
|
359
|
+
};
|
|
360
|
+
conditions?: {
|
|
361
|
+
when: {
|
|
362
|
+
op?: "&" | "|";
|
|
363
|
+
clauses: ({
|
|
364
|
+
rule: string;
|
|
365
|
+
source?: string;
|
|
366
|
+
op: string;
|
|
367
|
+
value: string | string[];
|
|
368
|
+
} | any)[];
|
|
369
|
+
};
|
|
370
|
+
value: unknown;
|
|
371
|
+
id: number;
|
|
372
|
+
}[];
|
|
373
|
+
localesConditions?: {
|
|
374
|
+
[key: string]: {
|
|
375
|
+
when: {
|
|
376
|
+
op?: "&" | "|";
|
|
377
|
+
clauses: ({
|
|
378
|
+
rule: string;
|
|
379
|
+
source?: string;
|
|
380
|
+
op: string;
|
|
381
|
+
value: string | string[];
|
|
382
|
+
} | any)[];
|
|
383
|
+
};
|
|
384
|
+
value: unknown;
|
|
385
|
+
id: number;
|
|
386
|
+
}[];
|
|
387
|
+
};
|
|
272
388
|
};
|
|
273
|
-
}
|
|
389
|
+
};
|
|
274
390
|
slots?: {
|
|
275
391
|
[key: string]: any[];
|
|
276
|
-
}
|
|
277
|
-
variant?: string
|
|
392
|
+
};
|
|
393
|
+
variant?: string;
|
|
278
394
|
};
|
|
279
|
-
}
|
|
395
|
+
};
|
|
280
396
|
_overridability?: {
|
|
281
397
|
parameters?: {
|
|
282
398
|
[key: string]: "yes" | "no";
|
|
283
|
-
}
|
|
284
|
-
variants?: boolean
|
|
285
|
-
hideLockedParameters?: boolean
|
|
286
|
-
}
|
|
287
|
-
_locales?: string[]
|
|
399
|
+
};
|
|
400
|
+
variants?: boolean;
|
|
401
|
+
hideLockedParameters?: boolean;
|
|
402
|
+
};
|
|
403
|
+
_locales?: string[];
|
|
288
404
|
} | undefined;
|
|
289
405
|
isContextualEditing: boolean;
|
|
290
406
|
};
|
|
@@ -366,14 +482,14 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
|
|
|
366
482
|
* The name of the HTML tag to render.
|
|
367
483
|
* @default "div"
|
|
368
484
|
*/
|
|
369
|
-
as?: React$1.ElementType
|
|
485
|
+
as?: React$1.ElementType;
|
|
370
486
|
/** The ID of the parameter. */
|
|
371
487
|
parameterId: string;
|
|
372
488
|
/**
|
|
373
489
|
* A function which can provide a custom react component
|
|
374
490
|
* for rendering a rich text node
|
|
375
491
|
*/
|
|
376
|
-
resolveRichTextRenderer?: RenderRichTextComponentResolver
|
|
492
|
+
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
377
493
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<unknown>>;
|
|
378
494
|
|
|
379
495
|
type UniformRichTextNodeProps = {
|
|
@@ -481,7 +597,7 @@ declare const useUniformContextualEditingState: ({ global, }?: UseUniformContext
|
|
|
481
597
|
declare const componentStore: ComponentStore;
|
|
482
598
|
declare const registerUniformComponent: ({ type, variantId, component, }: {
|
|
483
599
|
type: string;
|
|
484
|
-
variantId?: string
|
|
600
|
+
variantId?: string;
|
|
485
601
|
component: React.ComponentType<ComponentProps<any>>;
|
|
486
602
|
}) => void;
|
|
487
603
|
declare const componentStoreResolver: RenderComponentResolver;
|
package/dist/index.d.ts
CHANGED
|
@@ -110,36 +110,64 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
110
110
|
connectedData?: {
|
|
111
111
|
pointer: string;
|
|
112
112
|
syntax: "jptr";
|
|
113
|
-
failureAction?: "
|
|
114
|
-
failureLogLevel?: "
|
|
115
|
-
failureDefault?: string
|
|
116
|
-
}
|
|
113
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
114
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
115
|
+
failureDefault?: string;
|
|
116
|
+
};
|
|
117
117
|
locales?: {
|
|
118
118
|
[key: string]: unknown;
|
|
119
|
-
}
|
|
119
|
+
};
|
|
120
|
+
conditions?: {
|
|
121
|
+
when: {
|
|
122
|
+
op?: "&" | "|";
|
|
123
|
+
clauses: ({
|
|
124
|
+
rule: string;
|
|
125
|
+
source?: string;
|
|
126
|
+
op: string;
|
|
127
|
+
value: string | string[];
|
|
128
|
+
} | any)[];
|
|
129
|
+
};
|
|
130
|
+
value: unknown;
|
|
131
|
+
id: number;
|
|
132
|
+
}[];
|
|
133
|
+
localesConditions?: {
|
|
134
|
+
[key: string]: {
|
|
135
|
+
when: {
|
|
136
|
+
op?: "&" | "|";
|
|
137
|
+
clauses: ({
|
|
138
|
+
rule: string;
|
|
139
|
+
source?: string;
|
|
140
|
+
op: string;
|
|
141
|
+
value: string | string[];
|
|
142
|
+
} | any)[];
|
|
143
|
+
};
|
|
144
|
+
value: unknown;
|
|
145
|
+
id: number;
|
|
146
|
+
}[];
|
|
147
|
+
};
|
|
120
148
|
};
|
|
121
|
-
}
|
|
122
|
-
variant?: string
|
|
149
|
+
};
|
|
150
|
+
variant?: string;
|
|
123
151
|
projectMapNodes?: {
|
|
124
152
|
id: string;
|
|
125
153
|
path: string;
|
|
126
154
|
projectMapId: string;
|
|
127
155
|
data?: {
|
|
128
|
-
isSearchHit?: boolean
|
|
156
|
+
isSearchHit?: boolean;
|
|
129
157
|
queryStrings?: {
|
|
130
158
|
name: string;
|
|
131
|
-
value?: string
|
|
132
|
-
helpText?: string
|
|
133
|
-
}[]
|
|
134
|
-
previewValue?: string
|
|
135
|
-
}
|
|
159
|
+
value?: string;
|
|
160
|
+
helpText?: string;
|
|
161
|
+
}[];
|
|
162
|
+
previewValue?: string;
|
|
163
|
+
};
|
|
136
164
|
locales?: {
|
|
137
165
|
[key: string]: {
|
|
138
166
|
path: string;
|
|
139
167
|
inherited: boolean;
|
|
140
168
|
};
|
|
141
|
-
}
|
|
142
|
-
}[]
|
|
169
|
+
};
|
|
170
|
+
}[];
|
|
143
171
|
slots?: {
|
|
144
172
|
[key: string]: {
|
|
145
173
|
type: string;
|
|
@@ -150,44 +178,74 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
150
178
|
connectedData?: {
|
|
151
179
|
pointer: string;
|
|
152
180
|
syntax: "jptr";
|
|
153
|
-
failureAction?: "
|
|
154
|
-
failureLogLevel?: "
|
|
155
|
-
failureDefault?: string
|
|
156
|
-
}
|
|
181
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
182
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
183
|
+
failureDefault?: string;
|
|
184
|
+
};
|
|
157
185
|
locales?: {
|
|
158
186
|
[key: string]: unknown;
|
|
159
|
-
}
|
|
187
|
+
};
|
|
188
|
+
conditions?: {
|
|
189
|
+
when: {
|
|
190
|
+
op?: "&" | "|";
|
|
191
|
+
clauses: ({
|
|
192
|
+
rule: string;
|
|
193
|
+
source?: string;
|
|
194
|
+
op: string;
|
|
195
|
+
value: string | string[];
|
|
196
|
+
} | any)[];
|
|
197
|
+
};
|
|
198
|
+
value: unknown;
|
|
199
|
+
id: number;
|
|
200
|
+
}[];
|
|
201
|
+
localesConditions?: {
|
|
202
|
+
[key: string]: {
|
|
203
|
+
when: {
|
|
204
|
+
op?: "&" | "|";
|
|
205
|
+
clauses: ({
|
|
206
|
+
rule: string;
|
|
207
|
+
source?: string;
|
|
208
|
+
op: string;
|
|
209
|
+
value: string | string[];
|
|
210
|
+
} | any)[];
|
|
211
|
+
};
|
|
212
|
+
value: unknown;
|
|
213
|
+
id: number;
|
|
214
|
+
}[];
|
|
215
|
+
};
|
|
160
216
|
};
|
|
161
|
-
}
|
|
162
|
-
variant?: string
|
|
217
|
+
};
|
|
218
|
+
variant?: string;
|
|
163
219
|
slots?: {
|
|
164
220
|
[key: string]: any[];
|
|
165
|
-
}
|
|
166
|
-
_id?: string
|
|
167
|
-
_pattern?: string
|
|
221
|
+
};
|
|
222
|
+
_id?: string;
|
|
223
|
+
_pattern?: string;
|
|
168
224
|
_dataResources?: {
|
|
169
225
|
[key: string]: {
|
|
170
226
|
type: string;
|
|
171
|
-
isPatternParameter?: boolean
|
|
172
|
-
ignorePatternParameterDefault?: boolean
|
|
173
|
-
optionalPatternParameter?: boolean
|
|
227
|
+
isPatternParameter?: boolean;
|
|
228
|
+
ignorePatternParameterDefault?: boolean;
|
|
229
|
+
optionalPatternParameter?: boolean;
|
|
230
|
+
dataSourceVariant?: "unpublished";
|
|
174
231
|
variables?: {
|
|
175
232
|
[key: string]: string;
|
|
176
|
-
}
|
|
233
|
+
};
|
|
177
234
|
};
|
|
178
|
-
}
|
|
235
|
+
};
|
|
179
236
|
_patternDataResources?: {
|
|
180
237
|
[key: string]: {
|
|
181
238
|
type: string;
|
|
182
|
-
isPatternParameter?: boolean
|
|
183
|
-
ignorePatternParameterDefault?: boolean
|
|
184
|
-
optionalPatternParameter?: boolean
|
|
239
|
+
isPatternParameter?: boolean;
|
|
240
|
+
ignorePatternParameterDefault?: boolean;
|
|
241
|
+
optionalPatternParameter?: boolean;
|
|
242
|
+
dataSourceVariant?: "unpublished";
|
|
185
243
|
variables?: {
|
|
186
244
|
[key: string]: string;
|
|
187
|
-
}
|
|
245
|
+
};
|
|
188
246
|
};
|
|
189
|
-
}
|
|
190
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
247
|
+
};
|
|
248
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
191
249
|
_overrides?: {
|
|
192
250
|
[key: string]: {
|
|
193
251
|
parameters?: {
|
|
@@ -197,62 +255,92 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
197
255
|
connectedData?: {
|
|
198
256
|
pointer: string;
|
|
199
257
|
syntax: "jptr";
|
|
200
|
-
failureAction?: "
|
|
201
|
-
failureLogLevel?: "
|
|
202
|
-
failureDefault?: string
|
|
203
|
-
}
|
|
258
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
259
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
260
|
+
failureDefault?: string;
|
|
261
|
+
};
|
|
204
262
|
locales?: {
|
|
205
263
|
[key: string]: unknown;
|
|
206
|
-
}
|
|
264
|
+
};
|
|
265
|
+
conditions?: {
|
|
266
|
+
when: {
|
|
267
|
+
op?: "&" | "|";
|
|
268
|
+
clauses: ({
|
|
269
|
+
rule: string;
|
|
270
|
+
source?: string;
|
|
271
|
+
op: string;
|
|
272
|
+
value: string | string[];
|
|
273
|
+
} | any)[];
|
|
274
|
+
};
|
|
275
|
+
value: unknown;
|
|
276
|
+
id: number;
|
|
277
|
+
}[];
|
|
278
|
+
localesConditions?: {
|
|
279
|
+
[key: string]: {
|
|
280
|
+
when: {
|
|
281
|
+
op?: "&" | "|";
|
|
282
|
+
clauses: ({
|
|
283
|
+
rule: string;
|
|
284
|
+
source?: string;
|
|
285
|
+
op: string;
|
|
286
|
+
value: string | string[];
|
|
287
|
+
} | any)[];
|
|
288
|
+
};
|
|
289
|
+
value: unknown;
|
|
290
|
+
id: number;
|
|
291
|
+
}[];
|
|
292
|
+
};
|
|
207
293
|
};
|
|
208
|
-
}
|
|
294
|
+
};
|
|
209
295
|
slots?: {
|
|
210
296
|
[key: string]: any[];
|
|
211
|
-
}
|
|
212
|
-
variant?: string
|
|
297
|
+
};
|
|
298
|
+
variant?: string;
|
|
213
299
|
};
|
|
214
|
-
}
|
|
300
|
+
};
|
|
215
301
|
_overridability?: {
|
|
216
302
|
parameters?: {
|
|
217
303
|
[key: string]: "yes" | "no";
|
|
218
|
-
}
|
|
219
|
-
variants?: boolean
|
|
220
|
-
hideLockedParameters?: boolean
|
|
221
|
-
}
|
|
222
|
-
_locales?: string[]
|
|
304
|
+
};
|
|
305
|
+
variants?: boolean;
|
|
306
|
+
hideLockedParameters?: boolean;
|
|
307
|
+
};
|
|
308
|
+
_locales?: string[];
|
|
223
309
|
}[];
|
|
224
|
-
}
|
|
310
|
+
};
|
|
225
311
|
_id: string;
|
|
226
|
-
_slug?: string | null
|
|
312
|
+
_slug?: string | null;
|
|
227
313
|
_name: string;
|
|
228
|
-
_author?: string
|
|
229
|
-
_authorSubject?: string
|
|
230
|
-
_creator?: string
|
|
231
|
-
_creatorSubject?: string
|
|
232
|
-
_pattern?: string
|
|
314
|
+
_author?: string;
|
|
315
|
+
_authorSubject?: string;
|
|
316
|
+
_creator?: string;
|
|
317
|
+
_creatorSubject?: string;
|
|
318
|
+
_pattern?: string;
|
|
233
319
|
_patternDataResources?: {
|
|
234
320
|
[key: string]: {
|
|
235
321
|
type: string;
|
|
236
|
-
isPatternParameter?: boolean
|
|
237
|
-
ignorePatternParameterDefault?: boolean
|
|
238
|
-
optionalPatternParameter?: boolean
|
|
322
|
+
isPatternParameter?: boolean;
|
|
323
|
+
ignorePatternParameterDefault?: boolean;
|
|
324
|
+
optionalPatternParameter?: boolean;
|
|
325
|
+
dataSourceVariant?: "unpublished";
|
|
239
326
|
variables?: {
|
|
240
327
|
[key: string]: string;
|
|
241
|
-
}
|
|
328
|
+
};
|
|
242
329
|
};
|
|
243
|
-
}
|
|
330
|
+
};
|
|
244
331
|
_dataResources?: {
|
|
245
332
|
[key: string]: {
|
|
246
333
|
type: string;
|
|
247
|
-
isPatternParameter?: boolean
|
|
248
|
-
ignorePatternParameterDefault?: boolean
|
|
249
|
-
optionalPatternParameter?: boolean
|
|
334
|
+
isPatternParameter?: boolean;
|
|
335
|
+
ignorePatternParameterDefault?: boolean;
|
|
336
|
+
optionalPatternParameter?: boolean;
|
|
337
|
+
dataSourceVariant?: "unpublished";
|
|
250
338
|
variables?: {
|
|
251
339
|
[key: string]: string;
|
|
252
|
-
}
|
|
340
|
+
};
|
|
253
341
|
};
|
|
254
|
-
}
|
|
255
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
342
|
+
};
|
|
343
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
256
344
|
_overrides?: {
|
|
257
345
|
[key: string]: {
|
|
258
346
|
parameters?: {
|
|
@@ -262,29 +350,57 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
262
350
|
connectedData?: {
|
|
263
351
|
pointer: string;
|
|
264
352
|
syntax: "jptr";
|
|
265
|
-
failureAction?: "
|
|
266
|
-
failureLogLevel?: "
|
|
267
|
-
failureDefault?: string
|
|
268
|
-
}
|
|
353
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
354
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
355
|
+
failureDefault?: string;
|
|
356
|
+
};
|
|
269
357
|
locales?: {
|
|
270
358
|
[key: string]: unknown;
|
|
271
|
-
}
|
|
359
|
+
};
|
|
360
|
+
conditions?: {
|
|
361
|
+
when: {
|
|
362
|
+
op?: "&" | "|";
|
|
363
|
+
clauses: ({
|
|
364
|
+
rule: string;
|
|
365
|
+
source?: string;
|
|
366
|
+
op: string;
|
|
367
|
+
value: string | string[];
|
|
368
|
+
} | any)[];
|
|
369
|
+
};
|
|
370
|
+
value: unknown;
|
|
371
|
+
id: number;
|
|
372
|
+
}[];
|
|
373
|
+
localesConditions?: {
|
|
374
|
+
[key: string]: {
|
|
375
|
+
when: {
|
|
376
|
+
op?: "&" | "|";
|
|
377
|
+
clauses: ({
|
|
378
|
+
rule: string;
|
|
379
|
+
source?: string;
|
|
380
|
+
op: string;
|
|
381
|
+
value: string | string[];
|
|
382
|
+
} | any)[];
|
|
383
|
+
};
|
|
384
|
+
value: unknown;
|
|
385
|
+
id: number;
|
|
386
|
+
}[];
|
|
387
|
+
};
|
|
272
388
|
};
|
|
273
|
-
}
|
|
389
|
+
};
|
|
274
390
|
slots?: {
|
|
275
391
|
[key: string]: any[];
|
|
276
|
-
}
|
|
277
|
-
variant?: string
|
|
392
|
+
};
|
|
393
|
+
variant?: string;
|
|
278
394
|
};
|
|
279
|
-
}
|
|
395
|
+
};
|
|
280
396
|
_overridability?: {
|
|
281
397
|
parameters?: {
|
|
282
398
|
[key: string]: "yes" | "no";
|
|
283
|
-
}
|
|
284
|
-
variants?: boolean
|
|
285
|
-
hideLockedParameters?: boolean
|
|
286
|
-
}
|
|
287
|
-
_locales?: string[]
|
|
399
|
+
};
|
|
400
|
+
variants?: boolean;
|
|
401
|
+
hideLockedParameters?: boolean;
|
|
402
|
+
};
|
|
403
|
+
_locales?: string[];
|
|
288
404
|
} | undefined;
|
|
289
405
|
isContextualEditing: boolean;
|
|
290
406
|
};
|
|
@@ -366,14 +482,14 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
|
|
|
366
482
|
* The name of the HTML tag to render.
|
|
367
483
|
* @default "div"
|
|
368
484
|
*/
|
|
369
|
-
as?: React$1.ElementType
|
|
485
|
+
as?: React$1.ElementType;
|
|
370
486
|
/** The ID of the parameter. */
|
|
371
487
|
parameterId: string;
|
|
372
488
|
/**
|
|
373
489
|
* A function which can provide a custom react component
|
|
374
490
|
* for rendering a rich text node
|
|
375
491
|
*/
|
|
376
|
-
resolveRichTextRenderer?: RenderRichTextComponentResolver
|
|
492
|
+
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
377
493
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<unknown>>;
|
|
378
494
|
|
|
379
495
|
type UniformRichTextNodeProps = {
|
|
@@ -481,7 +597,7 @@ declare const useUniformContextualEditingState: ({ global, }?: UseUniformContext
|
|
|
481
597
|
declare const componentStore: ComponentStore;
|
|
482
598
|
declare const registerUniformComponent: ({ type, variantId, component, }: {
|
|
483
599
|
type: string;
|
|
484
|
-
variantId?: string
|
|
600
|
+
variantId?: string;
|
|
485
601
|
component: React.ComponentType<ComponentProps<any>>;
|
|
486
602
|
}) => void;
|
|
487
603
|
declare const componentStoreResolver: RenderComponentResolver;
|
package/dist/index.esm.js
CHANGED
|
@@ -234,7 +234,11 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
234
234
|
import React4, { createContext, useContext } from "react";
|
|
235
235
|
|
|
236
236
|
// src/hooks/useClientConditionsComposition.ts
|
|
237
|
-
import {
|
|
237
|
+
import {
|
|
238
|
+
evaluateWalkTreeNodeVisibility,
|
|
239
|
+
evaluateWalkTreePropertyCriteria,
|
|
240
|
+
walkNodeTree
|
|
241
|
+
} from "@uniformdev/canvas";
|
|
238
242
|
import { produce } from "immer";
|
|
239
243
|
import { useMemo as useMemo2 } from "react";
|
|
240
244
|
|
|
@@ -261,7 +265,8 @@ function useClientConditionsComposition(data) {
|
|
|
261
265
|
try {
|
|
262
266
|
return produce(data, (draft) => {
|
|
263
267
|
walkNodeTree(draft, (context) => {
|
|
264
|
-
|
|
268
|
+
evaluateWalkTreeNodeVisibility({ context, rules, showIndeterminate: false });
|
|
269
|
+
evaluateWalkTreePropertyCriteria({ node: context.node, rules, keepIndeterminate: false });
|
|
265
270
|
});
|
|
266
271
|
});
|
|
267
272
|
} catch (e) {
|
package/dist/index.js
CHANGED
|
@@ -301,7 +301,8 @@ function useClientConditionsComposition(data) {
|
|
|
301
301
|
try {
|
|
302
302
|
return (0, import_immer.produce)(data, (draft) => {
|
|
303
303
|
(0, import_canvas5.walkNodeTree)(draft, (context) => {
|
|
304
|
-
(0, import_canvas5.
|
|
304
|
+
(0, import_canvas5.evaluateWalkTreeNodeVisibility)({ context, rules, showIndeterminate: false });
|
|
305
|
+
(0, import_canvas5.evaluateWalkTreePropertyCriteria)({ node: context.node, rules, keepIndeterminate: false });
|
|
305
306
|
});
|
|
306
307
|
});
|
|
307
308
|
} catch (e) {
|
package/dist/index.mjs
CHANGED
|
@@ -234,7 +234,11 @@ var PureContextualEditingComponentWrapper = ({
|
|
|
234
234
|
import React4, { createContext, useContext } from "react";
|
|
235
235
|
|
|
236
236
|
// src/hooks/useClientConditionsComposition.ts
|
|
237
|
-
import {
|
|
237
|
+
import {
|
|
238
|
+
evaluateWalkTreeNodeVisibility,
|
|
239
|
+
evaluateWalkTreePropertyCriteria,
|
|
240
|
+
walkNodeTree
|
|
241
|
+
} from "@uniformdev/canvas";
|
|
238
242
|
import { produce } from "immer";
|
|
239
243
|
import { useMemo as useMemo2 } from "react";
|
|
240
244
|
|
|
@@ -261,7 +265,8 @@ function useClientConditionsComposition(data) {
|
|
|
261
265
|
try {
|
|
262
266
|
return produce(data, (draft) => {
|
|
263
267
|
walkNodeTree(draft, (context) => {
|
|
264
|
-
|
|
268
|
+
evaluateWalkTreeNodeVisibility({ context, rules, showIndeterminate: false });
|
|
269
|
+
evaluateWalkTreePropertyCriteria({ node: context.node, rules, keepIndeterminate: false });
|
|
265
270
|
});
|
|
266
271
|
});
|
|
267
272
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-react",
|
|
3
|
-
"version": "19.179.
|
|
3
|
+
"version": "19.179.2-alpha.22+79878be48f",
|
|
4
4
|
"description": "React SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"document": "api-extractor run --local"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@uniformdev/canvas": "19.179.
|
|
49
|
-
"@uniformdev/context": "19.179.
|
|
50
|
-
"@uniformdev/context-react": "19.179.
|
|
51
|
-
"@uniformdev/richtext": "19.179.
|
|
48
|
+
"@uniformdev/canvas": "19.179.2-alpha.22+79878be48f",
|
|
49
|
+
"@uniformdev/context": "19.179.2-alpha.22+79878be48f",
|
|
50
|
+
"@uniformdev/context-react": "19.179.2-alpha.22+79878be48f",
|
|
51
|
+
"@uniformdev/richtext": "19.179.2-alpha.22+79878be48f"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"immer": ">= 10",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"react-dom": ">=16"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@types/react": "18.
|
|
59
|
+
"@types/react": "18.3.3",
|
|
60
60
|
"immer": "10.1.1",
|
|
61
|
-
"react": "18.
|
|
62
|
-
"react-dom": "18.
|
|
61
|
+
"react": "18.3.1",
|
|
62
|
+
"react-dom": "18.3.1"
|
|
63
63
|
},
|
|
64
64
|
"files": [
|
|
65
65
|
"/dist"
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "79878be48f2d4b1c6158026aa632e71c91473ac6"
|
|
71
71
|
}
|