@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.
package/dist/index.js
CHANGED
|
@@ -194,9 +194,10 @@ function deriveValueType(cconfig) {
|
|
|
194
194
|
}
|
|
195
195
|
function buildFieldsPropType(opts) {
|
|
196
196
|
function getDefaultValueHint(field) {
|
|
197
|
-
return function (
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
return function (_props, contextData, _a) {
|
|
198
|
+
var item = _a.item;
|
|
199
|
+
if (item.fieldId) {
|
|
200
|
+
var fieldSetting = contextData === null || contextData === void 0 ? void 0 : contextData.mergedFields.find(function (f) { return f.fieldId === item.fieldId; });
|
|
200
201
|
return fieldSetting === null || fieldSetting === void 0 ? void 0 : fieldSetting[field];
|
|
201
202
|
}
|
|
202
203
|
return undefined;
|
|
@@ -1284,7 +1285,9 @@ function RichTable(props) {
|
|
|
1284
1285
|
return null;
|
|
1285
1286
|
}
|
|
1286
1287
|
return (React__default.default.createElement("div", { className: "".concat(className, " ").concat(scopeClassName !== null && scopeClassName !== void 0 ? scopeClassName : "") },
|
|
1287
|
-
React__default.default.createElement(proComponents.ProTable, __assign({
|
|
1288
|
+
React__default.default.createElement(proComponents.ProTable, __assign({ rowClassName: props.onRowClick || props.canSelectRows === "click"
|
|
1289
|
+
? "plasmic-table-row-clickable"
|
|
1290
|
+
: undefined, actionRef: actionRef, columns: columnDefinitions, onChange: function (_pagination, _filters, sorter, _extra) {
|
|
1288
1291
|
setSortState({ sorter: sorter });
|
|
1289
1292
|
}, style: {
|
|
1290
1293
|
width: "100%",
|
|
@@ -1322,7 +1325,7 @@ function RichTable(props) {
|
|
|
1322
1325
|
].filter(function (x) { return !!x; });
|
|
1323
1326
|
} })),
|
|
1324
1327
|
React__default.default.createElement("style", { dangerouslySetInnerHTML: {
|
|
1325
|
-
__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
|
|
1328
|
+
__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
|
|
1326
1329
|
? "\n .".concat(scopeClassName, " .ant-pro-table-alert {\n display: none;\n }\n ")
|
|
1327
1330
|
: "", "\n "),
|
|
1328
1331
|
} })));
|
|
@@ -1663,7 +1666,10 @@ var dataTableMeta = {
|
|
|
1663
1666
|
displayName: "Row key",
|
|
1664
1667
|
helpText: "Column key to use as row key; can also be a function that takes in a row and returns a key value",
|
|
1665
1668
|
hidden: function (ps) { return !ps.canSelectRows || ps.canSelectRows === "none"; },
|
|
1666
|
-
defaultValueHint: function (ps) {
|
|
1669
|
+
defaultValueHint: function (ps) {
|
|
1670
|
+
var derivedRowKey = deriveRowKey(ps.data, ps.rowKey);
|
|
1671
|
+
return derivedRowKey !== undefined ? "".concat(derivedRowKey) : undefined;
|
|
1672
|
+
},
|
|
1667
1673
|
},
|
|
1668
1674
|
selectedRowKey: {
|
|
1669
1675
|
type: "string",
|