@uniformdev/canvas-react 19.173.0 → 19.173.2-alpha.210
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 +217 -85
- package/dist/index.d.ts +217 -85
- package/dist/index.esm.js +60 -38
- package/dist/index.js +65 -44
- package/dist/index.mjs +60 -38
- 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
|
};
|
|
@@ -357,6 +473,14 @@ type UniformRichTextProps = {
|
|
|
357
473
|
* for rendering a rich text node
|
|
358
474
|
*/
|
|
359
475
|
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
476
|
+
/**
|
|
477
|
+
* Sets the value to show in Canvas editor when the parameter value is empty.
|
|
478
|
+
* Can be a static string, or a function to generate the placeholder out of parameter info.
|
|
479
|
+
* @default undefined
|
|
480
|
+
*/
|
|
481
|
+
placeholder?: string | ((parameter: {
|
|
482
|
+
id: string;
|
|
483
|
+
}) => string | undefined);
|
|
360
484
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
361
485
|
/**
|
|
362
486
|
* Adds rendering support for Uniform Rich Text parameters
|
|
@@ -366,14 +490,22 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
|
|
|
366
490
|
* The name of the HTML tag to render.
|
|
367
491
|
* @default "div"
|
|
368
492
|
*/
|
|
369
|
-
as?: React$1.ElementType
|
|
493
|
+
as?: React$1.ElementType;
|
|
370
494
|
/** The ID of the parameter. */
|
|
371
495
|
parameterId: string;
|
|
372
496
|
/**
|
|
373
497
|
* A function which can provide a custom react component
|
|
374
498
|
* for rendering a rich text node
|
|
375
499
|
*/
|
|
376
|
-
resolveRichTextRenderer?: RenderRichTextComponentResolver
|
|
500
|
+
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
501
|
+
/**
|
|
502
|
+
* Sets the value to show in Canvas editor when the parameter value is empty.
|
|
503
|
+
* Can be a static string, or a function to generate the placeholder out of parameter info.
|
|
504
|
+
* @default undefined
|
|
505
|
+
*/
|
|
506
|
+
placeholder?: string | ((parameter: {
|
|
507
|
+
id: string;
|
|
508
|
+
}) => string | undefined);
|
|
377
509
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<unknown>>;
|
|
378
510
|
|
|
379
511
|
type UniformRichTextNodeProps = {
|
|
@@ -481,7 +613,7 @@ declare const useUniformContextualEditingState: ({ global, }?: UseUniformContext
|
|
|
481
613
|
declare const componentStore: ComponentStore;
|
|
482
614
|
declare const registerUniformComponent: ({ type, variantId, component, }: {
|
|
483
615
|
type: string;
|
|
484
|
-
variantId?: string
|
|
616
|
+
variantId?: string;
|
|
485
617
|
component: React.ComponentType<ComponentProps<any>>;
|
|
486
618
|
}) => void;
|
|
487
619
|
declare const componentStoreResolver: RenderComponentResolver;
|