@plasmicpkgs/plasmic-rich-components 1.0.48 → 1.0.50
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.ts +2 -0
- package/dist/plasmic-rich-components.cjs.development.js +30 -13
- package/dist/plasmic-rich-components.cjs.development.js.map +1 -1
- package/dist/plasmic-rich-components.cjs.production.min.js +1 -1
- package/dist/plasmic-rich-components.cjs.production.min.js.map +1 -1
- package/dist/plasmic-rich-components.esm.js +25 -10
- package/dist/plasmic-rich-components.esm.js.map +1 -1
- package/dist/rich-layout/RichLayout.d.ts +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -10,9 +10,8 @@ var registerComponent = _interopDefault(require('@plasmicapp/host/registerCompon
|
|
|
10
10
|
require('@plasmicapp/host/registerGlobalContext');
|
|
11
11
|
var icons = require('@ant-design/icons');
|
|
12
12
|
var proComponents = require('@ant-design/pro-components');
|
|
13
|
-
var
|
|
13
|
+
var antd = require('antd');
|
|
14
14
|
var host = require('@plasmicapp/host');
|
|
15
|
-
var Button = _interopDefault(require('antd/es/button'));
|
|
16
15
|
var csvWriterBrowser = require('csv-writer-browser');
|
|
17
16
|
var fastStringify = _interopDefault(require('fast-stringify'));
|
|
18
17
|
|
|
@@ -139,8 +138,18 @@ function RichLayout(_ref) {
|
|
|
139
138
|
showAvatarMenu = _ref.showAvatarMenu,
|
|
140
139
|
className = _ref.className,
|
|
141
140
|
layoutProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
142
|
-
var
|
|
143
|
-
|
|
141
|
+
var isClient = useIsClient();
|
|
142
|
+
var _useState = React.useState(undefined),
|
|
143
|
+
pathname = _useState[0],
|
|
144
|
+
setPathname = _useState[1];
|
|
145
|
+
React.useEffect(function () {
|
|
146
|
+
if (typeof location !== "undefined") {
|
|
147
|
+
setPathname(location.pathname);
|
|
148
|
+
}
|
|
149
|
+
}, []);
|
|
150
|
+
if (!isClient) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
144
153
|
return React__default.createElement("div", {
|
|
145
154
|
className: className
|
|
146
155
|
}, React__default.createElement("style", null, ".ant-pro-layout-bg-list {\n display: none;\n }"), React__default.createElement(proComponents.ProLayout, Object.assign({}, layoutProps, {
|
|
@@ -168,7 +177,7 @@ function RichLayout(_ref) {
|
|
|
168
177
|
size: "small",
|
|
169
178
|
title: avatarLabel,
|
|
170
179
|
render: function render(_props, dom) {
|
|
171
|
-
return React__default.createElement(Dropdown, {
|
|
180
|
+
return React__default.createElement(antd.Dropdown, {
|
|
172
181
|
menu: {
|
|
173
182
|
items: [{
|
|
174
183
|
key: "logout",
|
|
@@ -223,10 +232,13 @@ function generateNavMenuType(remainingDepth, displayName, defaultValue) {
|
|
|
223
232
|
}
|
|
224
233
|
var richLayoutMeta = {
|
|
225
234
|
name: "hostless-rich-layout",
|
|
226
|
-
displayName: "Rich Layout",
|
|
235
|
+
displayName: "Rich Page Layout",
|
|
227
236
|
props: {
|
|
228
237
|
children: "slot",
|
|
229
|
-
actionsChildren:
|
|
238
|
+
actionsChildren: {
|
|
239
|
+
type: "slot",
|
|
240
|
+
hidePlaceholder: true
|
|
241
|
+
},
|
|
230
242
|
title: {
|
|
231
243
|
displayName: "Title",
|
|
232
244
|
type: "string",
|
|
@@ -383,7 +395,7 @@ var richLayoutMeta = {
|
|
|
383
395
|
height: "stretch"
|
|
384
396
|
},
|
|
385
397
|
importName: "RichLayout",
|
|
386
|
-
importPath: "@plasmicpkgs/plasmic-rich-components
|
|
398
|
+
importPath: "@plasmicpkgs/plasmic-rich-components"
|
|
387
399
|
};
|
|
388
400
|
function registerRichLayout(loader) {
|
|
389
401
|
registerComponentHelper(loader, RichLayout, richLayoutMeta);
|
|
@@ -1389,12 +1401,12 @@ function RichTable(props) {
|
|
|
1389
1401
|
} : undefined
|
|
1390
1402
|
},
|
|
1391
1403
|
toolBarRender: function toolBarRender() {
|
|
1392
|
-
return [addHref && React__default.createElement(Button, {
|
|
1404
|
+
return [addHref && React__default.createElement(antd.Button, {
|
|
1393
1405
|
key: "button",
|
|
1394
1406
|
icon: React__default.createElement(icons.PlusOutlined, null),
|
|
1395
1407
|
type: "primary",
|
|
1396
1408
|
href: addHref
|
|
1397
|
-
}, "Add"), React__default.createElement(Dropdown, {
|
|
1409
|
+
}, "Add"), React__default.createElement(antd.Dropdown, {
|
|
1398
1410
|
key: "menu",
|
|
1399
1411
|
menu: {
|
|
1400
1412
|
items: [{
|
|
@@ -1467,7 +1479,7 @@ function RichTable(props) {
|
|
|
1467
1479
|
}
|
|
1468
1480
|
}]
|
|
1469
1481
|
}
|
|
1470
|
-
}, React__default.createElement(Button, null, React__default.createElement(icons.EllipsisOutlined, null)))];
|
|
1482
|
+
}, React__default.createElement(antd.Button, null, React__default.createElement(icons.EllipsisOutlined, null)))];
|
|
1471
1483
|
}
|
|
1472
1484
|
}), React__default.createElement("style", null, "\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 "));
|
|
1473
1485
|
}
|
|
@@ -1495,7 +1507,10 @@ function getDefaultValueHint(field) {
|
|
|
1495
1507
|
}
|
|
1496
1508
|
var dataTableMeta = {
|
|
1497
1509
|
name: "hostless-rich-table",
|
|
1498
|
-
displayName: "
|
|
1510
|
+
displayName: "Table",
|
|
1511
|
+
defaultStyles: {
|
|
1512
|
+
width: "stretch"
|
|
1513
|
+
},
|
|
1499
1514
|
props: {
|
|
1500
1515
|
data: {
|
|
1501
1516
|
type: "dataSourceOpData",
|
|
@@ -1589,7 +1604,7 @@ var dataTableMeta = {
|
|
|
1589
1604
|
}
|
|
1590
1605
|
},
|
|
1591
1606
|
importName: "RichTable",
|
|
1592
|
-
importPath: "@plasmicpkgs/plasmic-rich-components
|
|
1607
|
+
importPath: "@plasmicpkgs/plasmic-rich-components"
|
|
1593
1608
|
};
|
|
1594
1609
|
function registerRichTable(loader) {
|
|
1595
1610
|
registerComponentHelper(loader, RichTable, dataTableMeta);
|
|
@@ -1600,5 +1615,7 @@ function registerAll(loader) {
|
|
|
1600
1615
|
registerRichTable(loader);
|
|
1601
1616
|
}
|
|
1602
1617
|
|
|
1618
|
+
exports.RichLayout = RichLayout;
|
|
1619
|
+
exports.RichTable = RichTable;
|
|
1603
1620
|
exports.registerAll = registerAll;
|
|
1604
1621
|
//# sourceMappingURL=plasmic-rich-components.cjs.development.js.map
|