@measured/puck 0.16.3-canary.af421c6 → 0.17.0-canary.8ea38c3
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +9 -3
- package/dist/{resolve-all-data-BoWgijLi.d.mts → resolve-all-data-CaVk1fIL.d.mts} +1 -1
- package/dist/{resolve-all-data-BoWgijLi.d.ts → resolve-all-data-CaVk1fIL.d.ts} +1 -1
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-
|
2
|
-
export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-
|
1
|
+
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-CaVk1fIL.mjs';
|
2
|
+
export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-CaVk1fIL.mjs';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
5
|
import { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-
|
2
|
-
export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-
|
1
|
+
import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-CaVk1fIL.js';
|
2
|
+
export { L as Adaptor, J as ArrayField, r as ArrayState, a2 as AsFieldProps, B as BaseData, y as BaseField, t as ComponentConfig, w as ComponentData, x as Content, X as CustomField, $ as DefaultRootProps, _ as DefaultRootRenderProps, W as ExternalField, Q as ExternalFieldWithAdaptor, p as FieldRenderFunctions, Y as Fields, q as ItemWithId, M as MappedItem, N as NumberField, K as ObjectField, n as OverrideKey, s as PuckComponent, Z as PuckContext, G as RadioField, v as RootData, R as RootDataWithProps, u as RootDataWithoutProps, S as SelectField, T as TextField, z as TextareaField, m as Viewport, a3 as WithChildren, a0 as WithId, a1 as WithPuckProps, o as overrideKeys, a4 as resolveAllData } from './resolve-all-data-CaVk1fIL.js';
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
4
4
|
import * as react from 'react';
|
5
5
|
import { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
package/dist/index.js
CHANGED
@@ -1607,7 +1607,7 @@ var DefaultField = ({
|
|
1607
1607
|
autoComplete: "off",
|
1608
1608
|
type: field.type,
|
1609
1609
|
name,
|
1610
|
-
value: typeof value === "undefined" ? "" : value,
|
1610
|
+
value: typeof value === "undefined" ? "" : value.toString(),
|
1611
1611
|
onChange: (e) => {
|
1612
1612
|
if (field.type === "number") {
|
1613
1613
|
onChange(Number(e.currentTarget.value));
|
@@ -1793,7 +1793,7 @@ var ExternalInput = ({
|
|
1793
1793
|
const validKeys = /* @__PURE__ */ new Set();
|
1794
1794
|
for (const item of mappedData) {
|
1795
1795
|
for (const key of Object.keys(item)) {
|
1796
|
-
if (typeof item[key] === "string" || typeof item[key] === "number") {
|
1796
|
+
if (typeof item[key] === "string" || typeof item[key] === "number" || (0, import_react10.isValidElement)(item[key])) {
|
1797
1797
|
validKeys.add(key);
|
1798
1798
|
}
|
1799
1799
|
}
|
package/dist/index.mjs
CHANGED
@@ -1420,7 +1420,7 @@ var DefaultField = ({
|
|
1420
1420
|
autoComplete: "off",
|
1421
1421
|
type: field.type,
|
1422
1422
|
name,
|
1423
|
-
value: typeof value === "undefined" ? "" : value,
|
1423
|
+
value: typeof value === "undefined" ? "" : value.toString(),
|
1424
1424
|
onChange: (e) => {
|
1425
1425
|
if (field.type === "number") {
|
1426
1426
|
onChange(Number(e.currentTarget.value));
|
@@ -1445,7 +1445,13 @@ import { useEffect as useEffect8 } from "react";
|
|
1445
1445
|
|
1446
1446
|
// components/ExternalInput/index.tsx
|
1447
1447
|
init_react_import();
|
1448
|
-
import {
|
1448
|
+
import {
|
1449
|
+
useMemo,
|
1450
|
+
useEffect as useEffect7,
|
1451
|
+
useState as useState8,
|
1452
|
+
useCallback as useCallback4,
|
1453
|
+
isValidElement
|
1454
|
+
} from "react";
|
1449
1455
|
|
1450
1456
|
// css-module:/home/runner/work/puck/puck/packages/core/components/ExternalInput/styles.module.css#css-module
|
1451
1457
|
init_react_import();
|
@@ -1606,7 +1612,7 @@ var ExternalInput = ({
|
|
1606
1612
|
const validKeys = /* @__PURE__ */ new Set();
|
1607
1613
|
for (const item of mappedData) {
|
1608
1614
|
for (const key of Object.keys(item)) {
|
1609
|
-
if (typeof item[key] === "string" || typeof item[key] === "number") {
|
1615
|
+
if (typeof item[key] === "string" || typeof item[key] === "number" || isValidElement(item[key])) {
|
1610
1616
|
validKeys.add(key);
|
1611
1617
|
}
|
1612
1618
|
}
|
@@ -91,7 +91,7 @@ type ExternalField<Props extends {
|
|
91
91
|
filters: Record<string, any>;
|
92
92
|
}) => Promise<any[] | null>;
|
93
93
|
mapProp?: (value: any) => Props;
|
94
|
-
mapRow?: (value: any) => Record<string, string | number>;
|
94
|
+
mapRow?: (value: any) => Record<string, string | number | ReactElement>;
|
95
95
|
getItemSummary?: (item: Props, index?: number) => string;
|
96
96
|
showSearch?: boolean;
|
97
97
|
initialQuery?: string;
|
@@ -91,7 +91,7 @@ type ExternalField<Props extends {
|
|
91
91
|
filters: Record<string, any>;
|
92
92
|
}) => Promise<any[] | null>;
|
93
93
|
mapProp?: (value: any) => Props;
|
94
|
-
mapRow?: (value: any) => Record<string, string | number>;
|
94
|
+
mapRow?: (value: any) => Record<string, string | number | ReactElement>;
|
95
95
|
getItemSummary?: (item: Props, index?: number) => string;
|
96
96
|
showSearch?: boolean;
|
97
97
|
initialQuery?: string;
|
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, D as Data } from './resolve-all-data-
|
3
|
-
export { a4 as resolveAllData } from './resolve-all-data-
|
2
|
+
import { C as Config, D as Data } from './resolve-all-data-CaVk1fIL.mjs';
|
3
|
+
export { a4 as resolveAllData } from './resolve-all-data-CaVk1fIL.mjs';
|
4
4
|
import 'react';
|
5
5
|
|
6
6
|
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
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, D as Data } from './resolve-all-data-
|
3
|
-
export { a4 as resolveAllData } from './resolve-all-data-
|
2
|
+
import { C as Config, D as Data } from './resolve-all-data-CaVk1fIL.js';
|
3
|
+
export { a4 as resolveAllData } from './resolve-all-data-CaVk1fIL.js';
|
4
4
|
import 'react';
|
5
5
|
|
6
6
|
declare function Render<UserConfig extends Config = Config>({ config, data, }: {
|
package/package.json
CHANGED