@measured/puck 0.17.0-canary.229cbdd → 0.17.0-canary.ccec96e
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.js +26 -54
- package/dist/index.mjs +26 -54
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1485,60 +1485,32 @@ var ArrayField = ({
|
|
1485
1485
|
children: [
|
1486
1486
|
field.getItemSummary ? field.getItemSummary(data, i) : `Item #${_originalIndex}`,
|
1487
1487
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: getClassNameItem("rhs"), children: [
|
1488
|
-
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime9.
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
) }),
|
1515
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
1516
|
-
IconButton,
|
1517
|
-
{
|
1518
|
-
type: "button",
|
1519
|
-
disabled: field.min !== void 0 && field.min >= localState.arrayState.items.length,
|
1520
|
-
onClick: (e) => {
|
1521
|
-
e.stopPropagation();
|
1522
|
-
const existingValue = [
|
1523
|
-
...value || []
|
1524
|
-
];
|
1525
|
-
const existingItems = [
|
1526
|
-
...arrayState.items || []
|
1527
|
-
];
|
1528
|
-
existingValue.splice(i, 1);
|
1529
|
-
existingItems.splice(i, 1);
|
1530
|
-
onChange(
|
1531
|
-
existingValue,
|
1532
|
-
mapArrayStateToUi({
|
1533
|
-
items: existingItems
|
1534
|
-
})
|
1535
|
-
);
|
1536
|
-
},
|
1537
|
-
title: "Delete",
|
1538
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Trash, { size: 16 })
|
1539
|
-
}
|
1540
|
-
) })
|
1541
|
-
] }),
|
1488
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: getClassNameItem("actions"), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
1489
|
+
IconButton,
|
1490
|
+
{
|
1491
|
+
type: "button",
|
1492
|
+
disabled: field.min !== void 0 && field.min >= localState.arrayState.items.length,
|
1493
|
+
onClick: (e) => {
|
1494
|
+
e.stopPropagation();
|
1495
|
+
const existingValue = [
|
1496
|
+
...value || []
|
1497
|
+
];
|
1498
|
+
const existingItems = [
|
1499
|
+
...arrayState.items || []
|
1500
|
+
];
|
1501
|
+
existingValue.splice(i, 1);
|
1502
|
+
existingItems.splice(i, 1);
|
1503
|
+
onChange(
|
1504
|
+
existingValue,
|
1505
|
+
mapArrayStateToUi({
|
1506
|
+
items: existingItems
|
1507
|
+
})
|
1508
|
+
);
|
1509
|
+
},
|
1510
|
+
title: "Delete",
|
1511
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Trash, { size: 16 })
|
1512
|
+
}
|
1513
|
+
) }) }),
|
1542
1514
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DragIcon, {}) })
|
1543
1515
|
] })
|
1544
1516
|
]
|
package/dist/index.mjs
CHANGED
@@ -1298,60 +1298,32 @@ var ArrayField = ({
|
|
1298
1298
|
children: [
|
1299
1299
|
field.getItemSummary ? field.getItemSummary(data, i) : `Item #${_originalIndex}`,
|
1300
1300
|
/* @__PURE__ */ jsxs4("div", { className: getClassNameItem("rhs"), children: [
|
1301
|
-
!readOnly && /* @__PURE__ */
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
) }),
|
1328
|
-
/* @__PURE__ */ jsx9("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx9(
|
1329
|
-
IconButton,
|
1330
|
-
{
|
1331
|
-
type: "button",
|
1332
|
-
disabled: field.min !== void 0 && field.min >= localState.arrayState.items.length,
|
1333
|
-
onClick: (e) => {
|
1334
|
-
e.stopPropagation();
|
1335
|
-
const existingValue = [
|
1336
|
-
...value || []
|
1337
|
-
];
|
1338
|
-
const existingItems = [
|
1339
|
-
...arrayState.items || []
|
1340
|
-
];
|
1341
|
-
existingValue.splice(i, 1);
|
1342
|
-
existingItems.splice(i, 1);
|
1343
|
-
onChange(
|
1344
|
-
existingValue,
|
1345
|
-
mapArrayStateToUi({
|
1346
|
-
items: existingItems
|
1347
|
-
})
|
1348
|
-
);
|
1349
|
-
},
|
1350
|
-
title: "Delete",
|
1351
|
-
children: /* @__PURE__ */ jsx9(Trash, { size: 16 })
|
1352
|
-
}
|
1353
|
-
) })
|
1354
|
-
] }),
|
1301
|
+
!readOnly && /* @__PURE__ */ jsx9("div", { className: getClassNameItem("actions"), children: /* @__PURE__ */ jsx9("div", { className: getClassNameItem("action"), children: /* @__PURE__ */ jsx9(
|
1302
|
+
IconButton,
|
1303
|
+
{
|
1304
|
+
type: "button",
|
1305
|
+
disabled: field.min !== void 0 && field.min >= localState.arrayState.items.length,
|
1306
|
+
onClick: (e) => {
|
1307
|
+
e.stopPropagation();
|
1308
|
+
const existingValue = [
|
1309
|
+
...value || []
|
1310
|
+
];
|
1311
|
+
const existingItems = [
|
1312
|
+
...arrayState.items || []
|
1313
|
+
];
|
1314
|
+
existingValue.splice(i, 1);
|
1315
|
+
existingItems.splice(i, 1);
|
1316
|
+
onChange(
|
1317
|
+
existingValue,
|
1318
|
+
mapArrayStateToUi({
|
1319
|
+
items: existingItems
|
1320
|
+
})
|
1321
|
+
);
|
1322
|
+
},
|
1323
|
+
title: "Delete",
|
1324
|
+
children: /* @__PURE__ */ jsx9(Trash, { size: 16 })
|
1325
|
+
}
|
1326
|
+
) }) }),
|
1355
1327
|
/* @__PURE__ */ jsx9("div", { children: /* @__PURE__ */ jsx9(DragIcon, {}) })
|
1356
1328
|
] })
|
1357
1329
|
]
|
package/package.json
CHANGED