@plasmicpkgs/plasmic-rich-components 1.0.80 → 1.0.82
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.
|
@@ -186,9 +186,10 @@ function deriveValueType(cconfig) {
|
|
|
186
186
|
}
|
|
187
187
|
function buildFieldsPropType(opts) {
|
|
188
188
|
function getDefaultValueHint(field) {
|
|
189
|
-
return function (
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
return function (_props, contextData, _a) {
|
|
190
|
+
var item = _a.item;
|
|
191
|
+
if (item.fieldId) {
|
|
192
|
+
var fieldSetting = contextData === null || contextData === void 0 ? void 0 : contextData.mergedFields.find(function (f) { return f.fieldId === item.fieldId; });
|
|
192
193
|
return fieldSetting === null || fieldSetting === void 0 ? void 0 : fieldSetting[field];
|
|
193
194
|
}
|
|
194
195
|
return undefined;
|
|
@@ -1276,7 +1277,9 @@ function RichTable(props) {
|
|
|
1276
1277
|
return null;
|
|
1277
1278
|
}
|
|
1278
1279
|
return (React.createElement("div", { className: "".concat(className, " ").concat(scopeClassName !== null && scopeClassName !== void 0 ? scopeClassName : "") },
|
|
1279
|
-
React.createElement(ProTable, __assign({
|
|
1280
|
+
React.createElement(ProTable, __assign({ rowClassName: props.onRowClick || props.canSelectRows === "click"
|
|
1281
|
+
? "plasmic-table-row-clickable"
|
|
1282
|
+
: undefined, actionRef: actionRef, columns: columnDefinitions, onChange: function (_pagination, _filters, sorter, _extra) {
|
|
1280
1283
|
setSortState({ sorter: sorter });
|
|
1281
1284
|
}, style: {
|
|
1282
1285
|
width: "100%",
|
|
@@ -1314,7 +1317,7 @@ function RichTable(props) {
|
|
|
1314
1317
|
].filter(function (x) { return !!x; });
|
|
1315
1318
|
} })),
|
|
1316
1319
|
React.createElement("style", { dangerouslySetInnerHTML: {
|
|
1317
|
-
__html: "\n :where(.css-dev-only-do-not-override-1p704s4).ant-pro-table-column-setting-overlay .ant-tree-treenode:hover .ant-pro-table-column-setting-list-item-option {\n display: none;\n }\n .ant-pro-table-list-toolbar-right {\n flex-wrap: initial;\n flex-shrink: 0;\n }\n .ant-pro-table, .ant-pro-table > .ant-pro-card, .ant-pro-table .ant-table-wrapper, .ant-pro-table .ant-spin-nested-loading, .ant-pro-table .ant-table-container {\n height: 100%;\n }\n .ant-pro-table .ant-spin-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n .ant-pro-table .ant-table {\n flex-grow: 1;\n min-height: 0;\n }\n .ant-pro-table .ant-pagination {\n flex-shrink: 0;\n }\n .ant-pro-table .ant-table-content {\n overflow: auto !important;\n height: 100%;\n }\n .ant-pro-table > .ant-pro-card > .ant-pro-card-body {\n display: flex;\n flex-direction: column;\n }\n .ant-pro-table .ant-table-wrapper {\n flex-grow: 1;\n min-height: 0;\n }\n .ant-pro-table .ant-table-thead > tr > th, .ant-pro-table .ant-table-thead > tr > td.ant-table-selection-column {\n position: sticky;\n top: 0;\n z-index: 2;\n }\n .ant-pro-table .ant-table-thead > tr > th.ant-table-cell-fix-left, .ant-pro-table .ant-table-thead > tr > th.ant-table-cell-fix-right {\n z-index: 3;\n }\n .ant-pro-table .ant-table-tbody > tr > td {\n z-index: 0;\n }\n .ant-pro-table .ant-table-tbody > tr > td.ant-table-cell-fix-left,.ant-pro-table .ant-table-tbody > tr > td.ant-table-cell-fix-right {\n z-index: 1;\n }\n ".concat(scopeClassName && hideSelectionBar
|
|
1320
|
+
__html: "\n :where(.css-dev-only-do-not-override-1p704s4).ant-pro-table-column-setting-overlay .ant-tree-treenode:hover .ant-pro-table-column-setting-list-item-option {\n display: none;\n }\n :where(.plasmic-table-row-clickable) {\n cursor: pointer;\n }\n .ant-pro-table-list-toolbar-right {\n flex-wrap: initial;\n flex-shrink: 0;\n }\n .ant-pro-table, .ant-pro-table > .ant-pro-card, .ant-pro-table .ant-table-wrapper, .ant-pro-table .ant-spin-nested-loading, .ant-pro-table .ant-table-container {\n height: 100%;\n }\n .ant-pro-table .ant-spin-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n .ant-pro-table .ant-table {\n flex-grow: 1;\n min-height: 0;\n }\n .ant-pro-table .ant-pagination {\n flex-shrink: 0;\n }\n .ant-pro-table .ant-table-content {\n overflow: auto !important;\n height: 100%;\n }\n .ant-pro-table > .ant-pro-card > .ant-pro-card-body {\n display: flex;\n flex-direction: column;\n }\n .ant-pro-table .ant-table-wrapper {\n flex-grow: 1;\n min-height: 0;\n }\n .ant-pro-table .ant-table-thead > tr > th, .ant-pro-table .ant-table-thead > tr > td.ant-table-selection-column {\n position: sticky;\n top: 0;\n z-index: 2;\n }\n .ant-pro-table .ant-table-thead > tr > th.ant-table-cell-fix-left, .ant-pro-table .ant-table-thead > tr > th.ant-table-cell-fix-right {\n z-index: 3;\n }\n .ant-pro-table .ant-table-tbody > tr > td {\n z-index: 0;\n }\n .ant-pro-table .ant-table-tbody > tr > td.ant-table-cell-fix-left,.ant-pro-table .ant-table-tbody > tr > td.ant-table-cell-fix-right {\n z-index: 1;\n }\n ".concat(scopeClassName && hideSelectionBar
|
|
1318
1321
|
? "\n .".concat(scopeClassName, " .ant-pro-table-alert {\n display: none;\n }\n ")
|
|
1319
1322
|
: "", "\n "),
|
|
1320
1323
|
} })));
|
|
@@ -1655,7 +1658,10 @@ var dataTableMeta = {
|
|
|
1655
1658
|
displayName: "Row key",
|
|
1656
1659
|
helpText: "Column key to use as row key; can also be a function that takes in a row and returns a key value",
|
|
1657
1660
|
hidden: function (ps) { return !ps.canSelectRows || ps.canSelectRows === "none"; },
|
|
1658
|
-
defaultValueHint: function (ps) {
|
|
1661
|
+
defaultValueHint: function (ps) {
|
|
1662
|
+
var derivedRowKey = deriveRowKey(ps.data, ps.rowKey);
|
|
1663
|
+
return derivedRowKey !== undefined ? "".concat(derivedRowKey) : undefined;
|
|
1664
|
+
},
|
|
1659
1665
|
},
|
|
1660
1666
|
selectedRowKey: {
|
|
1661
1667
|
type: "string",
|