@uniformdev/canvas-react 19.179.1-alpha.1 → 19.180.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/index.d.mts +197 -85
- package/dist/index.d.ts +197 -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,72 @@ 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;
|
|
174
230
|
variables?: {
|
|
175
231
|
[key: string]: string;
|
|
176
|
-
}
|
|
232
|
+
};
|
|
177
233
|
};
|
|
178
|
-
}
|
|
234
|
+
};
|
|
179
235
|
_patternDataResources?: {
|
|
180
236
|
[key: string]: {
|
|
181
237
|
type: string;
|
|
182
|
-
isPatternParameter?: boolean
|
|
183
|
-
ignorePatternParameterDefault?: boolean
|
|
184
|
-
optionalPatternParameter?: boolean
|
|
238
|
+
isPatternParameter?: boolean;
|
|
239
|
+
ignorePatternParameterDefault?: boolean;
|
|
240
|
+
optionalPatternParameter?: boolean;
|
|
185
241
|
variables?: {
|
|
186
242
|
[key: string]: string;
|
|
187
|
-
}
|
|
243
|
+
};
|
|
188
244
|
};
|
|
189
|
-
}
|
|
190
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
245
|
+
};
|
|
246
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
191
247
|
_overrides?: {
|
|
192
248
|
[key: string]: {
|
|
193
249
|
parameters?: {
|
|
@@ -197,62 +253,90 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
197
253
|
connectedData?: {
|
|
198
254
|
pointer: string;
|
|
199
255
|
syntax: "jptr";
|
|
200
|
-
failureAction?: "
|
|
201
|
-
failureLogLevel?: "
|
|
202
|
-
failureDefault?: string
|
|
203
|
-
}
|
|
256
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
257
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
258
|
+
failureDefault?: string;
|
|
259
|
+
};
|
|
204
260
|
locales?: {
|
|
205
261
|
[key: string]: unknown;
|
|
206
|
-
}
|
|
262
|
+
};
|
|
263
|
+
conditions?: {
|
|
264
|
+
when: {
|
|
265
|
+
op?: "&" | "|";
|
|
266
|
+
clauses: ({
|
|
267
|
+
rule: string;
|
|
268
|
+
source?: string;
|
|
269
|
+
op: string;
|
|
270
|
+
value: string | string[];
|
|
271
|
+
} | any)[];
|
|
272
|
+
};
|
|
273
|
+
value: unknown;
|
|
274
|
+
id: number;
|
|
275
|
+
}[];
|
|
276
|
+
localesConditions?: {
|
|
277
|
+
[key: string]: {
|
|
278
|
+
when: {
|
|
279
|
+
op?: "&" | "|";
|
|
280
|
+
clauses: ({
|
|
281
|
+
rule: string;
|
|
282
|
+
source?: string;
|
|
283
|
+
op: string;
|
|
284
|
+
value: string | string[];
|
|
285
|
+
} | any)[];
|
|
286
|
+
};
|
|
287
|
+
value: unknown;
|
|
288
|
+
id: number;
|
|
289
|
+
}[];
|
|
290
|
+
};
|
|
207
291
|
};
|
|
208
|
-
}
|
|
292
|
+
};
|
|
209
293
|
slots?: {
|
|
210
294
|
[key: string]: any[];
|
|
211
|
-
}
|
|
212
|
-
variant?: string
|
|
295
|
+
};
|
|
296
|
+
variant?: string;
|
|
213
297
|
};
|
|
214
|
-
}
|
|
298
|
+
};
|
|
215
299
|
_overridability?: {
|
|
216
300
|
parameters?: {
|
|
217
301
|
[key: string]: "yes" | "no";
|
|
218
|
-
}
|
|
219
|
-
variants?: boolean
|
|
220
|
-
hideLockedParameters?: boolean
|
|
221
|
-
}
|
|
222
|
-
_locales?: string[]
|
|
302
|
+
};
|
|
303
|
+
variants?: boolean;
|
|
304
|
+
hideLockedParameters?: boolean;
|
|
305
|
+
};
|
|
306
|
+
_locales?: string[];
|
|
223
307
|
}[];
|
|
224
|
-
}
|
|
308
|
+
};
|
|
225
309
|
_id: string;
|
|
226
|
-
_slug?: string | null
|
|
310
|
+
_slug?: string | null;
|
|
227
311
|
_name: string;
|
|
228
|
-
_author?: string
|
|
229
|
-
_authorSubject?: string
|
|
230
|
-
_creator?: string
|
|
231
|
-
_creatorSubject?: string
|
|
232
|
-
_pattern?: string
|
|
312
|
+
_author?: string;
|
|
313
|
+
_authorSubject?: string;
|
|
314
|
+
_creator?: string;
|
|
315
|
+
_creatorSubject?: string;
|
|
316
|
+
_pattern?: string;
|
|
233
317
|
_patternDataResources?: {
|
|
234
318
|
[key: string]: {
|
|
235
319
|
type: string;
|
|
236
|
-
isPatternParameter?: boolean
|
|
237
|
-
ignorePatternParameterDefault?: boolean
|
|
238
|
-
optionalPatternParameter?: boolean
|
|
320
|
+
isPatternParameter?: boolean;
|
|
321
|
+
ignorePatternParameterDefault?: boolean;
|
|
322
|
+
optionalPatternParameter?: boolean;
|
|
239
323
|
variables?: {
|
|
240
324
|
[key: string]: string;
|
|
241
|
-
}
|
|
325
|
+
};
|
|
242
326
|
};
|
|
243
|
-
}
|
|
327
|
+
};
|
|
244
328
|
_dataResources?: {
|
|
245
329
|
[key: string]: {
|
|
246
330
|
type: string;
|
|
247
|
-
isPatternParameter?: boolean
|
|
248
|
-
ignorePatternParameterDefault?: boolean
|
|
249
|
-
optionalPatternParameter?: boolean
|
|
331
|
+
isPatternParameter?: boolean;
|
|
332
|
+
ignorePatternParameterDefault?: boolean;
|
|
333
|
+
optionalPatternParameter?: boolean;
|
|
250
334
|
variables?: {
|
|
251
335
|
[key: string]: string;
|
|
252
|
-
}
|
|
336
|
+
};
|
|
253
337
|
};
|
|
254
|
-
}
|
|
255
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
338
|
+
};
|
|
339
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
256
340
|
_overrides?: {
|
|
257
341
|
[key: string]: {
|
|
258
342
|
parameters?: {
|
|
@@ -262,29 +346,57 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
262
346
|
connectedData?: {
|
|
263
347
|
pointer: string;
|
|
264
348
|
syntax: "jptr";
|
|
265
|
-
failureAction?: "
|
|
266
|
-
failureLogLevel?: "
|
|
267
|
-
failureDefault?: string
|
|
268
|
-
}
|
|
349
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
350
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
351
|
+
failureDefault?: string;
|
|
352
|
+
};
|
|
269
353
|
locales?: {
|
|
270
354
|
[key: string]: unknown;
|
|
271
|
-
}
|
|
355
|
+
};
|
|
356
|
+
conditions?: {
|
|
357
|
+
when: {
|
|
358
|
+
op?: "&" | "|";
|
|
359
|
+
clauses: ({
|
|
360
|
+
rule: string;
|
|
361
|
+
source?: string;
|
|
362
|
+
op: string;
|
|
363
|
+
value: string | string[];
|
|
364
|
+
} | any)[];
|
|
365
|
+
};
|
|
366
|
+
value: unknown;
|
|
367
|
+
id: number;
|
|
368
|
+
}[];
|
|
369
|
+
localesConditions?: {
|
|
370
|
+
[key: string]: {
|
|
371
|
+
when: {
|
|
372
|
+
op?: "&" | "|";
|
|
373
|
+
clauses: ({
|
|
374
|
+
rule: string;
|
|
375
|
+
source?: string;
|
|
376
|
+
op: string;
|
|
377
|
+
value: string | string[];
|
|
378
|
+
} | any)[];
|
|
379
|
+
};
|
|
380
|
+
value: unknown;
|
|
381
|
+
id: number;
|
|
382
|
+
}[];
|
|
383
|
+
};
|
|
272
384
|
};
|
|
273
|
-
}
|
|
385
|
+
};
|
|
274
386
|
slots?: {
|
|
275
387
|
[key: string]: any[];
|
|
276
|
-
}
|
|
277
|
-
variant?: string
|
|
388
|
+
};
|
|
389
|
+
variant?: string;
|
|
278
390
|
};
|
|
279
|
-
}
|
|
391
|
+
};
|
|
280
392
|
_overridability?: {
|
|
281
393
|
parameters?: {
|
|
282
394
|
[key: string]: "yes" | "no";
|
|
283
|
-
}
|
|
284
|
-
variants?: boolean
|
|
285
|
-
hideLockedParameters?: boolean
|
|
286
|
-
}
|
|
287
|
-
_locales?: string[]
|
|
395
|
+
};
|
|
396
|
+
variants?: boolean;
|
|
397
|
+
hideLockedParameters?: boolean;
|
|
398
|
+
};
|
|
399
|
+
_locales?: string[];
|
|
288
400
|
} | undefined;
|
|
289
401
|
isContextualEditing: boolean;
|
|
290
402
|
};
|
|
@@ -366,14 +478,14 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
|
|
|
366
478
|
* The name of the HTML tag to render.
|
|
367
479
|
* @default "div"
|
|
368
480
|
*/
|
|
369
|
-
as?: React$1.ElementType
|
|
481
|
+
as?: React$1.ElementType;
|
|
370
482
|
/** The ID of the parameter. */
|
|
371
483
|
parameterId: string;
|
|
372
484
|
/**
|
|
373
485
|
* A function which can provide a custom react component
|
|
374
486
|
* for rendering a rich text node
|
|
375
487
|
*/
|
|
376
|
-
resolveRichTextRenderer?: RenderRichTextComponentResolver
|
|
488
|
+
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
377
489
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<unknown>>;
|
|
378
490
|
|
|
379
491
|
type UniformRichTextNodeProps = {
|
|
@@ -481,7 +593,7 @@ declare const useUniformContextualEditingState: ({ global, }?: UseUniformContext
|
|
|
481
593
|
declare const componentStore: ComponentStore;
|
|
482
594
|
declare const registerUniformComponent: ({ type, variantId, component, }: {
|
|
483
595
|
type: string;
|
|
484
|
-
variantId?: string
|
|
596
|
+
variantId?: string;
|
|
485
597
|
component: React.ComponentType<ComponentProps<any>>;
|
|
486
598
|
}) => void;
|
|
487
599
|
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,72 @@ 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;
|
|
174
230
|
variables?: {
|
|
175
231
|
[key: string]: string;
|
|
176
|
-
}
|
|
232
|
+
};
|
|
177
233
|
};
|
|
178
|
-
}
|
|
234
|
+
};
|
|
179
235
|
_patternDataResources?: {
|
|
180
236
|
[key: string]: {
|
|
181
237
|
type: string;
|
|
182
|
-
isPatternParameter?: boolean
|
|
183
|
-
ignorePatternParameterDefault?: boolean
|
|
184
|
-
optionalPatternParameter?: boolean
|
|
238
|
+
isPatternParameter?: boolean;
|
|
239
|
+
ignorePatternParameterDefault?: boolean;
|
|
240
|
+
optionalPatternParameter?: boolean;
|
|
185
241
|
variables?: {
|
|
186
242
|
[key: string]: string;
|
|
187
|
-
}
|
|
243
|
+
};
|
|
188
244
|
};
|
|
189
|
-
}
|
|
190
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
245
|
+
};
|
|
246
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
191
247
|
_overrides?: {
|
|
192
248
|
[key: string]: {
|
|
193
249
|
parameters?: {
|
|
@@ -197,62 +253,90 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
197
253
|
connectedData?: {
|
|
198
254
|
pointer: string;
|
|
199
255
|
syntax: "jptr";
|
|
200
|
-
failureAction?: "
|
|
201
|
-
failureLogLevel?: "
|
|
202
|
-
failureDefault?: string
|
|
203
|
-
}
|
|
256
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
257
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
258
|
+
failureDefault?: string;
|
|
259
|
+
};
|
|
204
260
|
locales?: {
|
|
205
261
|
[key: string]: unknown;
|
|
206
|
-
}
|
|
262
|
+
};
|
|
263
|
+
conditions?: {
|
|
264
|
+
when: {
|
|
265
|
+
op?: "&" | "|";
|
|
266
|
+
clauses: ({
|
|
267
|
+
rule: string;
|
|
268
|
+
source?: string;
|
|
269
|
+
op: string;
|
|
270
|
+
value: string | string[];
|
|
271
|
+
} | any)[];
|
|
272
|
+
};
|
|
273
|
+
value: unknown;
|
|
274
|
+
id: number;
|
|
275
|
+
}[];
|
|
276
|
+
localesConditions?: {
|
|
277
|
+
[key: string]: {
|
|
278
|
+
when: {
|
|
279
|
+
op?: "&" | "|";
|
|
280
|
+
clauses: ({
|
|
281
|
+
rule: string;
|
|
282
|
+
source?: string;
|
|
283
|
+
op: string;
|
|
284
|
+
value: string | string[];
|
|
285
|
+
} | any)[];
|
|
286
|
+
};
|
|
287
|
+
value: unknown;
|
|
288
|
+
id: number;
|
|
289
|
+
}[];
|
|
290
|
+
};
|
|
207
291
|
};
|
|
208
|
-
}
|
|
292
|
+
};
|
|
209
293
|
slots?: {
|
|
210
294
|
[key: string]: any[];
|
|
211
|
-
}
|
|
212
|
-
variant?: string
|
|
295
|
+
};
|
|
296
|
+
variant?: string;
|
|
213
297
|
};
|
|
214
|
-
}
|
|
298
|
+
};
|
|
215
299
|
_overridability?: {
|
|
216
300
|
parameters?: {
|
|
217
301
|
[key: string]: "yes" | "no";
|
|
218
|
-
}
|
|
219
|
-
variants?: boolean
|
|
220
|
-
hideLockedParameters?: boolean
|
|
221
|
-
}
|
|
222
|
-
_locales?: string[]
|
|
302
|
+
};
|
|
303
|
+
variants?: boolean;
|
|
304
|
+
hideLockedParameters?: boolean;
|
|
305
|
+
};
|
|
306
|
+
_locales?: string[];
|
|
223
307
|
}[];
|
|
224
|
-
}
|
|
308
|
+
};
|
|
225
309
|
_id: string;
|
|
226
|
-
_slug?: string | null
|
|
310
|
+
_slug?: string | null;
|
|
227
311
|
_name: string;
|
|
228
|
-
_author?: string
|
|
229
|
-
_authorSubject?: string
|
|
230
|
-
_creator?: string
|
|
231
|
-
_creatorSubject?: string
|
|
232
|
-
_pattern?: string
|
|
312
|
+
_author?: string;
|
|
313
|
+
_authorSubject?: string;
|
|
314
|
+
_creator?: string;
|
|
315
|
+
_creatorSubject?: string;
|
|
316
|
+
_pattern?: string;
|
|
233
317
|
_patternDataResources?: {
|
|
234
318
|
[key: string]: {
|
|
235
319
|
type: string;
|
|
236
|
-
isPatternParameter?: boolean
|
|
237
|
-
ignorePatternParameterDefault?: boolean
|
|
238
|
-
optionalPatternParameter?: boolean
|
|
320
|
+
isPatternParameter?: boolean;
|
|
321
|
+
ignorePatternParameterDefault?: boolean;
|
|
322
|
+
optionalPatternParameter?: boolean;
|
|
239
323
|
variables?: {
|
|
240
324
|
[key: string]: string;
|
|
241
|
-
}
|
|
325
|
+
};
|
|
242
326
|
};
|
|
243
|
-
}
|
|
327
|
+
};
|
|
244
328
|
_dataResources?: {
|
|
245
329
|
[key: string]: {
|
|
246
330
|
type: string;
|
|
247
|
-
isPatternParameter?: boolean
|
|
248
|
-
ignorePatternParameterDefault?: boolean
|
|
249
|
-
optionalPatternParameter?: boolean
|
|
331
|
+
isPatternParameter?: boolean;
|
|
332
|
+
ignorePatternParameterDefault?: boolean;
|
|
333
|
+
optionalPatternParameter?: boolean;
|
|
250
334
|
variables?: {
|
|
251
335
|
[key: string]: string;
|
|
252
|
-
}
|
|
336
|
+
};
|
|
253
337
|
};
|
|
254
|
-
}
|
|
255
|
-
_patternError?: "NOTFOUND" | "CYCLIC"
|
|
338
|
+
};
|
|
339
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
|
256
340
|
_overrides?: {
|
|
257
341
|
[key: string]: {
|
|
258
342
|
parameters?: {
|
|
@@ -262,29 +346,57 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
|
|
|
262
346
|
connectedData?: {
|
|
263
347
|
pointer: string;
|
|
264
348
|
syntax: "jptr";
|
|
265
|
-
failureAction?: "
|
|
266
|
-
failureLogLevel?: "
|
|
267
|
-
failureDefault?: string
|
|
268
|
-
}
|
|
349
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
350
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
351
|
+
failureDefault?: string;
|
|
352
|
+
};
|
|
269
353
|
locales?: {
|
|
270
354
|
[key: string]: unknown;
|
|
271
|
-
}
|
|
355
|
+
};
|
|
356
|
+
conditions?: {
|
|
357
|
+
when: {
|
|
358
|
+
op?: "&" | "|";
|
|
359
|
+
clauses: ({
|
|
360
|
+
rule: string;
|
|
361
|
+
source?: string;
|
|
362
|
+
op: string;
|
|
363
|
+
value: string | string[];
|
|
364
|
+
} | any)[];
|
|
365
|
+
};
|
|
366
|
+
value: unknown;
|
|
367
|
+
id: number;
|
|
368
|
+
}[];
|
|
369
|
+
localesConditions?: {
|
|
370
|
+
[key: string]: {
|
|
371
|
+
when: {
|
|
372
|
+
op?: "&" | "|";
|
|
373
|
+
clauses: ({
|
|
374
|
+
rule: string;
|
|
375
|
+
source?: string;
|
|
376
|
+
op: string;
|
|
377
|
+
value: string | string[];
|
|
378
|
+
} | any)[];
|
|
379
|
+
};
|
|
380
|
+
value: unknown;
|
|
381
|
+
id: number;
|
|
382
|
+
}[];
|
|
383
|
+
};
|
|
272
384
|
};
|
|
273
|
-
}
|
|
385
|
+
};
|
|
274
386
|
slots?: {
|
|
275
387
|
[key: string]: any[];
|
|
276
|
-
}
|
|
277
|
-
variant?: string
|
|
388
|
+
};
|
|
389
|
+
variant?: string;
|
|
278
390
|
};
|
|
279
|
-
}
|
|
391
|
+
};
|
|
280
392
|
_overridability?: {
|
|
281
393
|
parameters?: {
|
|
282
394
|
[key: string]: "yes" | "no";
|
|
283
|
-
}
|
|
284
|
-
variants?: boolean
|
|
285
|
-
hideLockedParameters?: boolean
|
|
286
|
-
}
|
|
287
|
-
_locales?: string[]
|
|
395
|
+
};
|
|
396
|
+
variants?: boolean;
|
|
397
|
+
hideLockedParameters?: boolean;
|
|
398
|
+
};
|
|
399
|
+
_locales?: string[];
|
|
288
400
|
} | undefined;
|
|
289
401
|
isContextualEditing: boolean;
|
|
290
402
|
};
|
|
@@ -366,14 +478,14 @@ declare const UniformRichText: React$1.ForwardRefExoticComponent<{
|
|
|
366
478
|
* The name of the HTML tag to render.
|
|
367
479
|
* @default "div"
|
|
368
480
|
*/
|
|
369
|
-
as?: React$1.ElementType
|
|
481
|
+
as?: React$1.ElementType;
|
|
370
482
|
/** The ID of the parameter. */
|
|
371
483
|
parameterId: string;
|
|
372
484
|
/**
|
|
373
485
|
* A function which can provide a custom react component
|
|
374
486
|
* for rendering a rich text node
|
|
375
487
|
*/
|
|
376
|
-
resolveRichTextRenderer?: RenderRichTextComponentResolver
|
|
488
|
+
resolveRichTextRenderer?: RenderRichTextComponentResolver;
|
|
377
489
|
} & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<unknown>>;
|
|
378
490
|
|
|
379
491
|
type UniformRichTextNodeProps = {
|
|
@@ -481,7 +593,7 @@ declare const useUniformContextualEditingState: ({ global, }?: UseUniformContext
|
|
|
481
593
|
declare const componentStore: ComponentStore;
|
|
482
594
|
declare const registerUniformComponent: ({ type, variantId, component, }: {
|
|
483
595
|
type: string;
|
|
484
|
-
variantId?: string
|
|
596
|
+
variantId?: string;
|
|
485
597
|
component: React.ComponentType<ComponentProps<any>>;
|
|
486
598
|
}) => void;
|
|
487
599
|
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.
|
|
3
|
+
"version": "19.180.0",
|
|
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.
|
|
49
|
-
"@uniformdev/context": "19.
|
|
50
|
-
"@uniformdev/context-react": "19.
|
|
51
|
-
"@uniformdev/richtext": "19.
|
|
48
|
+
"@uniformdev/canvas": "19.180.0",
|
|
49
|
+
"@uniformdev/context": "19.180.0",
|
|
50
|
+
"@uniformdev/context-react": "19.180.0",
|
|
51
|
+
"@uniformdev/richtext": "19.180.0"
|
|
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": "309600b88571d0ffb2b80d7d2c27b7aa3e5ae72b"
|
|
71
71
|
}
|