@measured/puck 0.21.0-canary.68f85428 → 0.21.0-canary.74d9a160
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/{chunk-AO6Y47WD.mjs → chunk-EXX4ZSCK.mjs} +15 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -3
- package/dist/index.mjs +1 -1
- package/dist/no-external.d.mts +1 -1
- package/dist/no-external.d.ts +1 -1
- package/dist/no-external.js +15 -3
- package/dist/no-external.mjs +1 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/{walk-tree-Ctf3FZQI.d.mts → walk-tree-DkTSFbz_.d.mts} +5 -1
- package/dist/{walk-tree-Ctf3FZQI.d.ts → walk-tree-DkTSFbz_.d.ts} +5 -1
- package/package.json +1 -1
|
@@ -3162,11 +3162,13 @@ var ExternalInput = ({
|
|
|
3162
3162
|
id,
|
|
3163
3163
|
readOnly
|
|
3164
3164
|
}) => {
|
|
3165
|
+
var _a;
|
|
3165
3166
|
const {
|
|
3166
3167
|
mapProp = (val) => val,
|
|
3167
3168
|
mapRow = (val) => val,
|
|
3168
3169
|
filterFields
|
|
3169
3170
|
} = field || {};
|
|
3171
|
+
const { enabled: shouldCacheData } = (_a = field.cache) != null ? _a : { enabled: true };
|
|
3170
3172
|
const [data, setData] = useState6([]);
|
|
3171
3173
|
const [isOpen, setOpen] = useState6(false);
|
|
3172
3174
|
const [isLoading, setIsLoading] = useState6(true);
|
|
@@ -3192,11 +3194,18 @@ var ExternalInput = ({
|
|
|
3192
3194
|
(query, filters2) => __async(void 0, null, function* () {
|
|
3193
3195
|
setIsLoading(true);
|
|
3194
3196
|
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
|
3195
|
-
|
|
3197
|
+
let listData;
|
|
3198
|
+
if (shouldCacheData && dataCache[cacheKey]) {
|
|
3199
|
+
listData = dataCache[cacheKey];
|
|
3200
|
+
} else {
|
|
3201
|
+
listData = yield field.fetchList({ query, filters: filters2 });
|
|
3202
|
+
}
|
|
3196
3203
|
if (listData) {
|
|
3197
3204
|
setData(listData);
|
|
3198
3205
|
setIsLoading(false);
|
|
3199
|
-
|
|
3206
|
+
if (shouldCacheData) {
|
|
3207
|
+
dataCache[cacheKey] = listData;
|
|
3208
|
+
}
|
|
3200
3209
|
}
|
|
3201
3210
|
}),
|
|
3202
3211
|
[id, field]
|
|
@@ -3260,6 +3269,7 @@ var ExternalInput = ({
|
|
|
3260
3269
|
}),
|
|
3261
3270
|
onSubmit: (e) => {
|
|
3262
3271
|
e.preventDefault();
|
|
3272
|
+
e.stopPropagation();
|
|
3263
3273
|
search(searchQuery, filters);
|
|
3264
3274
|
},
|
|
3265
3275
|
children: [
|
|
@@ -4170,12 +4180,14 @@ var DraggableComponent = ({
|
|
|
4170
4180
|
}
|
|
4171
4181
|
return cleanup;
|
|
4172
4182
|
}, [permissions.drag, zoneCompound]);
|
|
4183
|
+
const [, setRerender] = useState10(0);
|
|
4173
4184
|
const ref = useRef2(null);
|
|
4174
4185
|
const refSetter = useCallback7(
|
|
4175
4186
|
(el) => {
|
|
4176
4187
|
sortableRef(el);
|
|
4177
|
-
if (el) {
|
|
4188
|
+
if (ref.current !== el) {
|
|
4178
4189
|
ref.current = el;
|
|
4190
|
+
setRerender((update) => update + 1);
|
|
4179
4191
|
}
|
|
4180
4192
|
},
|
|
4181
4193
|
[sortableRef]
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-
|
|
2
|
-
export { a7 as Adaptor, a5 as ArrayField, B as ArrayState,
|
|
1
|
+
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-DkTSFbz_.mjs';
|
|
2
|
+
export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, al as AsFieldProps, N as BaseData, $ as BaseField, a9 as CacheOpts, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ac as CustomField, ab as CustomFieldRender, ai as DefaultComponentProps, K as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, o as Direction, p as DragAxis, aa as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, an as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ae as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ad as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-
|
|
2
|
-
export { a7 as Adaptor, a5 as ArrayField, B as ArrayState,
|
|
1
|
+
import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-DkTSFbz_.js';
|
|
2
|
+
export { a7 as Adaptor, a5 as ArrayField, B as ArrayState, al as AsFieldProps, N as BaseData, $ as BaseField, a9 as CacheOpts, Z as ComponentDataMap, X as ComponentDataOptionalId, _ as Content, ac as CustomField, ab as CustomFieldRender, ai as DefaultComponentProps, K as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, o as Direction, p as DragAxis, aa as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, an as ExtractField, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, Y as MappedItem, a1 as NumberField, a6 as ObjectField, x as OverrideKey, G as PuckComponent, ae as PuckContext, a4 as RadioField, J as RootConfig, T as RootData, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ad as SlotField, a0 as TextField, a2 as TextareaField, q as Viewport, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
package/dist/index.js
CHANGED
|
@@ -3795,11 +3795,13 @@ var ExternalInput = ({
|
|
|
3795
3795
|
id,
|
|
3796
3796
|
readOnly
|
|
3797
3797
|
}) => {
|
|
3798
|
+
var _a;
|
|
3798
3799
|
const {
|
|
3799
3800
|
mapProp = (val) => val,
|
|
3800
3801
|
mapRow = (val) => val,
|
|
3801
3802
|
filterFields
|
|
3802
3803
|
} = field || {};
|
|
3804
|
+
const { enabled: shouldCacheData } = (_a = field.cache) != null ? _a : { enabled: true };
|
|
3803
3805
|
const [data, setData] = (0, import_react17.useState)([]);
|
|
3804
3806
|
const [isOpen, setOpen] = (0, import_react17.useState)(false);
|
|
3805
3807
|
const [isLoading, setIsLoading] = (0, import_react17.useState)(true);
|
|
@@ -3825,11 +3827,18 @@ var ExternalInput = ({
|
|
|
3825
3827
|
(query, filters2) => __async(void 0, null, function* () {
|
|
3826
3828
|
setIsLoading(true);
|
|
3827
3829
|
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
|
3828
|
-
|
|
3830
|
+
let listData;
|
|
3831
|
+
if (shouldCacheData && dataCache[cacheKey]) {
|
|
3832
|
+
listData = dataCache[cacheKey];
|
|
3833
|
+
} else {
|
|
3834
|
+
listData = yield field.fetchList({ query, filters: filters2 });
|
|
3835
|
+
}
|
|
3829
3836
|
if (listData) {
|
|
3830
3837
|
setData(listData);
|
|
3831
3838
|
setIsLoading(false);
|
|
3832
|
-
|
|
3839
|
+
if (shouldCacheData) {
|
|
3840
|
+
dataCache[cacheKey] = listData;
|
|
3841
|
+
}
|
|
3833
3842
|
}
|
|
3834
3843
|
}),
|
|
3835
3844
|
[id, field]
|
|
@@ -3893,6 +3902,7 @@ var ExternalInput = ({
|
|
|
3893
3902
|
}),
|
|
3894
3903
|
onSubmit: (e) => {
|
|
3895
3904
|
e.preventDefault();
|
|
3905
|
+
e.stopPropagation();
|
|
3896
3906
|
search(searchQuery, filters);
|
|
3897
3907
|
},
|
|
3898
3908
|
children: [
|
|
@@ -4796,12 +4806,14 @@ var DraggableComponent = ({
|
|
|
4796
4806
|
}
|
|
4797
4807
|
return cleanup;
|
|
4798
4808
|
}, [permissions.drag, zoneCompound]);
|
|
4809
|
+
const [, setRerender] = (0, import_react24.useState)(0);
|
|
4799
4810
|
const ref = (0, import_react24.useRef)(null);
|
|
4800
4811
|
const refSetter = (0, import_react24.useCallback)(
|
|
4801
4812
|
(el) => {
|
|
4802
4813
|
sortableRef(el);
|
|
4803
|
-
if (el) {
|
|
4814
|
+
if (ref.current !== el) {
|
|
4804
4815
|
ref.current = el;
|
|
4816
|
+
setRerender((update) => update + 1);
|
|
4805
4817
|
}
|
|
4806
4818
|
},
|
|
4807
4819
|
[sortableRef]
|
package/dist/index.mjs
CHANGED
package/dist/no-external.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState,
|
|
1
|
+
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, al as AsFieldProps, N as BaseData, $ as BaseField, a9 as CacheOpts, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ac as CustomField, ab as CustomFieldRender, j as Data, ai as DefaultComponentProps, K as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, o as Direction, p as DragAxis, aa as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, an as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ae as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ad as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.mjs';
|
|
2
2
|
export { Action, ActionBar, AutoField, Button, Drawer, DropZone, FieldLabel, Group, IconButton, Label, Puck, PuckApi, Render, UsePuckData, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
package/dist/no-external.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState,
|
|
1
|
+
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, al as AsFieldProps, N as BaseData, $ as BaseField, a9 as CacheOpts, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ac as CustomField, ab as CustomFieldRender, j as Data, ai as DefaultComponentProps, K as DefaultComponents, af as DefaultRootFieldProps, ah as DefaultRootProps, ag as DefaultRootRenderProps, o as Direction, p as DragAxis, aa as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, an as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ae as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ad as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, am as WithChildren, aj as WithId, ak as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.js';
|
|
2
2
|
export { Action, ActionBar, AutoField, Button, Drawer, DropZone, FieldLabel, Group, IconButton, Label, Puck, PuckApi, Render, UsePuckData, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
package/dist/no-external.js
CHANGED
|
@@ -3795,11 +3795,13 @@ var ExternalInput = ({
|
|
|
3795
3795
|
id,
|
|
3796
3796
|
readOnly
|
|
3797
3797
|
}) => {
|
|
3798
|
+
var _a;
|
|
3798
3799
|
const {
|
|
3799
3800
|
mapProp = (val) => val,
|
|
3800
3801
|
mapRow = (val) => val,
|
|
3801
3802
|
filterFields
|
|
3802
3803
|
} = field || {};
|
|
3804
|
+
const { enabled: shouldCacheData } = (_a = field.cache) != null ? _a : { enabled: true };
|
|
3803
3805
|
const [data, setData] = (0, import_react17.useState)([]);
|
|
3804
3806
|
const [isOpen, setOpen] = (0, import_react17.useState)(false);
|
|
3805
3807
|
const [isLoading, setIsLoading] = (0, import_react17.useState)(true);
|
|
@@ -3825,11 +3827,18 @@ var ExternalInput = ({
|
|
|
3825
3827
|
(query, filters2) => __async(void 0, null, function* () {
|
|
3826
3828
|
setIsLoading(true);
|
|
3827
3829
|
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
|
3828
|
-
|
|
3830
|
+
let listData;
|
|
3831
|
+
if (shouldCacheData && dataCache[cacheKey]) {
|
|
3832
|
+
listData = dataCache[cacheKey];
|
|
3833
|
+
} else {
|
|
3834
|
+
listData = yield field.fetchList({ query, filters: filters2 });
|
|
3835
|
+
}
|
|
3829
3836
|
if (listData) {
|
|
3830
3837
|
setData(listData);
|
|
3831
3838
|
setIsLoading(false);
|
|
3832
|
-
|
|
3839
|
+
if (shouldCacheData) {
|
|
3840
|
+
dataCache[cacheKey] = listData;
|
|
3841
|
+
}
|
|
3833
3842
|
}
|
|
3834
3843
|
}),
|
|
3835
3844
|
[id, field]
|
|
@@ -3893,6 +3902,7 @@ var ExternalInput = ({
|
|
|
3893
3902
|
}),
|
|
3894
3903
|
onSubmit: (e) => {
|
|
3895
3904
|
e.preventDefault();
|
|
3905
|
+
e.stopPropagation();
|
|
3896
3906
|
search(searchQuery, filters);
|
|
3897
3907
|
},
|
|
3898
3908
|
children: [
|
|
@@ -4796,12 +4806,14 @@ var DraggableComponent = ({
|
|
|
4796
4806
|
}
|
|
4797
4807
|
return cleanup;
|
|
4798
4808
|
}, [permissions.drag, zoneCompound]);
|
|
4809
|
+
const [, setRerender] = (0, import_react24.useState)(0);
|
|
4799
4810
|
const ref = (0, import_react24.useRef)(null);
|
|
4800
4811
|
const refSetter = (0, import_react24.useCallback)(
|
|
4801
4812
|
(el) => {
|
|
4802
4813
|
sortableRef(el);
|
|
4803
|
-
if (el) {
|
|
4814
|
+
if (ref.current !== el) {
|
|
4804
4815
|
ref.current = el;
|
|
4816
|
+
setRerender((update) => update + 1);
|
|
4805
4817
|
}
|
|
4806
4818
|
},
|
|
4807
4819
|
[sortableRef]
|
package/dist/no-external.mjs
CHANGED
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-DkTSFbz_.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-DkTSFbz_.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DkTSFbz_.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
|
@@ -82,10 +82,14 @@ type ExternalFieldWithAdaptor<Props extends any = {
|
|
|
82
82
|
adaptorParams?: object;
|
|
83
83
|
getItemSummary: (item: NotUndefined<Props>, index?: number) => string;
|
|
84
84
|
};
|
|
85
|
+
type CacheOpts = {
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
};
|
|
85
88
|
type ExternalField<Props extends any = {
|
|
86
89
|
[key: string]: any;
|
|
87
90
|
}> = BaseField & {
|
|
88
91
|
type: "external";
|
|
92
|
+
cache?: CacheOpts;
|
|
89
93
|
placeholder?: string;
|
|
90
94
|
fetchList: (params: {
|
|
91
95
|
query: string;
|
|
@@ -631,4 +635,4 @@ type WalkTreeOptions = {
|
|
|
631
635
|
};
|
|
632
636
|
declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
|
|
633
637
|
|
|
634
|
-
export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type
|
|
638
|
+
export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type CacheOpts as a9, type ExternalField as aa, type CustomFieldRender as ab, type CustomField as ac, type SlotField as ad, type PuckContext as ae, type DefaultRootFieldProps as af, type DefaultRootRenderProps as ag, type DefaultRootProps as ah, type DefaultComponentProps as ai, type WithId as aj, type WithPuckProps as ak, type AsFieldProps as al, type WithChildren as am, type ExtractField as an, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type Direction as o, type DragAxis as p, type Viewport as q, resolveAllData as r, type FieldTransformFnParams as s, transformProps as t, type FieldTransformFn as u, overrideKeys as v, walkTree as w, type OverrideKey as x, type FieldRenderFunctions as y, type ItemWithId as z };
|
|
@@ -82,10 +82,14 @@ type ExternalFieldWithAdaptor<Props extends any = {
|
|
|
82
82
|
adaptorParams?: object;
|
|
83
83
|
getItemSummary: (item: NotUndefined<Props>, index?: number) => string;
|
|
84
84
|
};
|
|
85
|
+
type CacheOpts = {
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
};
|
|
85
88
|
type ExternalField<Props extends any = {
|
|
86
89
|
[key: string]: any;
|
|
87
90
|
}> = BaseField & {
|
|
88
91
|
type: "external";
|
|
92
|
+
cache?: CacheOpts;
|
|
89
93
|
placeholder?: string;
|
|
90
94
|
fetchList: (params: {
|
|
91
95
|
query: string;
|
|
@@ -631,4 +635,4 @@ type WalkTreeOptions = {
|
|
|
631
635
|
};
|
|
632
636
|
declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
|
|
633
637
|
|
|
634
|
-
export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type
|
|
638
|
+
export { type BaseField as $, type AppState as A, type ArrayState as B, type Config as C, type DropZoneProps as D, type SlotComponent as E, type Fields as F, type PuckComponent as G, type History as H, type IframeConfig as I, type RootConfig as J, type DefaultComponents as K, type ExtractConfigParams as L, type Metadata as M, type BaseData as N, type Overrides as O, type Permissions as P, type RootDataWithoutProps as Q, type RootDataWithProps as R, type Slot as S, type RootData as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type ComponentDataOptionalId as X, type MappedItem as Y, type ComponentDataMap as Z, type Content as _, type ComponentData as a, type TextField as a0, type NumberField as a1, type TextareaField as a2, type SelectField as a3, type RadioField as a4, type ArrayField as a5, type ObjectField as a6, type Adaptor as a7, type ExternalFieldWithAdaptor as a8, type CacheOpts as a9, type ExternalField as aa, type CustomFieldRender as ab, type CustomField as ac, type SlotField as ad, type PuckContext as ae, type DefaultRootFieldProps as af, type DefaultRootRenderProps as ag, type DefaultRootProps as ah, type DefaultComponentProps as ai, type WithId as aj, type WithPuckProps as ak, type AsFieldProps as al, type WithChildren as am, type ExtractField as an, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type Direction as o, type DragAxis as p, type Viewport as q, resolveAllData as r, type FieldTransformFnParams as s, transformProps as t, type FieldTransformFn as u, overrideKeys as v, walkTree as w, type OverrideKey as x, type FieldRenderFunctions as y, type ItemWithId as z };
|
package/package.json
CHANGED