@plasmicpkgs/antd 2.0.44 → 2.0.46
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/.tsbuildinfo +1 -1
- package/dist/antd.esm.js +134 -105
- package/dist/index.js +134 -105
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/skinny/customControls-fb0b7e5f.js.map +1 -1
- package/skinny/registerButton.js.map +1 -1
- package/skinny/registerCarousel.js.map +1 -1
- package/skinny/registerCheckbox.js +4 -1
- package/skinny/registerCheckbox.js.map +1 -1
- package/skinny/registerCollapse.js +10 -4
- package/skinny/registerCollapse.js.map +1 -1
- package/skinny/registerDropdown.js +4 -1
- package/skinny/registerDropdown.js.map +1 -1
- package/skinny/registerInput.js.map +1 -1
- package/skinny/registerMenu.js.map +1 -1
- package/skinny/registerOption.js.map +1 -1
- package/skinny/registerRate.js.map +1 -1
- package/skinny/registerSelect.js.map +1 -1
- package/skinny/registerSlider.js +20 -20
- package/skinny/registerSlider.js.map +1 -1
- package/skinny/registerSwitch.js.map +1 -1
- package/skinny/registerTable.js +40 -42
- package/skinny/registerTable.js.map +1 -1
- package/skinny/registerTabs.js +56 -37
- package/skinny/registerTabs.js.map +1 -1
package/dist/antd.esm.js
CHANGED
|
@@ -329,7 +329,10 @@ const checkboxGroupMeta = {
|
|
|
329
329
|
};
|
|
330
330
|
function registerCheckboxGroup(loader, customCheckboxGroupMeta) {
|
|
331
331
|
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
332
|
-
doRegisterComponent(
|
|
332
|
+
doRegisterComponent(
|
|
333
|
+
CheckboxGroup,
|
|
334
|
+
customCheckboxGroupMeta != null ? customCheckboxGroupMeta : checkboxGroupMeta
|
|
335
|
+
);
|
|
333
336
|
}
|
|
334
337
|
|
|
335
338
|
var __defProp$5 = Object.defineProperty;
|
|
@@ -416,7 +419,10 @@ const collapstePanelMeta = {
|
|
|
416
419
|
};
|
|
417
420
|
function registerCollapsePanel(loader, customCollapsePanelMeta) {
|
|
418
421
|
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
419
|
-
doRegisterComponent(
|
|
422
|
+
doRegisterComponent(
|
|
423
|
+
CollapsePanel,
|
|
424
|
+
customCollapsePanelMeta != null ? customCollapsePanelMeta : collapstePanelMeta
|
|
425
|
+
);
|
|
420
426
|
}
|
|
421
427
|
const collapsteMeta = {
|
|
422
428
|
name: "AntdCollapse",
|
|
@@ -491,9 +497,12 @@ const collapsteMeta = {
|
|
|
491
497
|
};
|
|
492
498
|
function Collapse(props) {
|
|
493
499
|
const _a = props, { openIcon, closeIcon } = _a, rest = __objRest$3(_a, ["openIcon", "closeIcon"]);
|
|
494
|
-
return /* @__PURE__ */ React.createElement(
|
|
495
|
-
|
|
496
|
-
|
|
500
|
+
return /* @__PURE__ */ React.createElement(
|
|
501
|
+
AntdCollapse,
|
|
502
|
+
__spreadProps$3(__spreadValues$5({}, rest), {
|
|
503
|
+
expandIcon: openIcon || closeIcon ? ({ isActive }) => isActive ? openIcon : closeIcon : void 0
|
|
504
|
+
})
|
|
505
|
+
);
|
|
497
506
|
}
|
|
498
507
|
function registerCollapse(loader, customCollapseMeta) {
|
|
499
508
|
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
@@ -667,7 +676,10 @@ const dropdownButtonMeta = {
|
|
|
667
676
|
};
|
|
668
677
|
function registerDropdownButton(loader, customDropdownButtonMeta) {
|
|
669
678
|
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
670
|
-
doRegisterComponent(
|
|
679
|
+
doRegisterComponent(
|
|
680
|
+
DropdownButton,
|
|
681
|
+
customDropdownButtonMeta != null ? customDropdownButtonMeta : dropdownButtonMeta
|
|
682
|
+
);
|
|
671
683
|
}
|
|
672
684
|
|
|
673
685
|
var __defProp$3 = Object.defineProperty;
|
|
@@ -1679,28 +1691,28 @@ var __objRest$2 = (source, exclude) => {
|
|
|
1679
1691
|
}
|
|
1680
1692
|
return target;
|
|
1681
1693
|
};
|
|
1682
|
-
const Slider = React.forwardRef(
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
if (
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1694
|
+
const Slider = React.forwardRef(
|
|
1695
|
+
(_a, ref) => {
|
|
1696
|
+
var _b = _a, { value, defaultValue, value2, defaultValue2 } = _b, props = __objRest$2(_b, ["value", "defaultValue", "value2", "defaultValue2"]);
|
|
1697
|
+
const newProps = __spreadValues$2({}, props);
|
|
1698
|
+
if (props.range) {
|
|
1699
|
+
if (typeof value === "number" || typeof value2 === "number") {
|
|
1700
|
+
newProps.value = [value != null ? value : 0, value2 != null ? value2 : 0];
|
|
1701
|
+
}
|
|
1702
|
+
if (typeof defaultValue === "number" || typeof defaultValue2 === "number") {
|
|
1703
|
+
newProps.defaultValue = [defaultValue != null ? defaultValue : 0, defaultValue2 != null ? defaultValue2 : 0];
|
|
1704
|
+
}
|
|
1705
|
+
} else {
|
|
1706
|
+
if (typeof value === "number") {
|
|
1707
|
+
newProps.value = value;
|
|
1708
|
+
}
|
|
1709
|
+
if (typeof defaultValue === "number") {
|
|
1710
|
+
newProps.defaultValue = defaultValue;
|
|
1711
|
+
}
|
|
1698
1712
|
}
|
|
1713
|
+
return /* @__PURE__ */ React.createElement(AntdSlider, __spreadProps$1(__spreadValues$2({}, newProps), { ref }));
|
|
1699
1714
|
}
|
|
1700
|
-
|
|
1701
|
-
ref
|
|
1702
|
-
}));
|
|
1703
|
-
});
|
|
1715
|
+
);
|
|
1704
1716
|
const sliderMeta = {
|
|
1705
1717
|
name: "AntdSlider",
|
|
1706
1718
|
displayName: "Antd Slider",
|
|
@@ -1882,9 +1894,7 @@ function TableValue(props) {
|
|
|
1882
1894
|
var _a;
|
|
1883
1895
|
const { className } = props;
|
|
1884
1896
|
const column = useSelector("currentColumn");
|
|
1885
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
1886
|
-
className
|
|
1887
|
-
}, (_a = column == null ? void 0 : column.toString()) != null ? _a : "");
|
|
1897
|
+
return /* @__PURE__ */ React.createElement("div", { className }, (_a = column == null ? void 0 : column.toString()) != null ? _a : "");
|
|
1888
1898
|
}
|
|
1889
1899
|
function ColumnWrapper(props) {
|
|
1890
1900
|
return props.children;
|
|
@@ -1894,47 +1904,47 @@ function TableWrapper(props) {
|
|
|
1894
1904
|
const { className, items, columns, size, onSelect, pagination } = props;
|
|
1895
1905
|
const tableColumns = (_b = (_a = columns == null ? void 0 : columns.props) == null ? void 0 : _a.children) != null ? _b : columns;
|
|
1896
1906
|
const columnDefinitions = React.useMemo(() => {
|
|
1897
|
-
return React.Children.map(
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
const columnDefinition = {
|
|
1903
|
-
columnIndex,
|
|
1904
|
-
title,
|
|
1905
|
-
dataIndex,
|
|
1906
|
-
key: columnIndex,
|
|
1907
|
-
render: (value, record, rowIndex) => {
|
|
1908
|
-
return /* @__PURE__ */ React.createElement(DataProvider, {
|
|
1909
|
-
name: "currentRow",
|
|
1910
|
-
data: record
|
|
1911
|
-
}, /* @__PURE__ */ React.createElement(DataProvider, {
|
|
1912
|
-
name: "currentRowIndex",
|
|
1913
|
-
data: rowIndex
|
|
1914
|
-
}, /* @__PURE__ */ React.createElement(DataProvider, {
|
|
1915
|
-
name: "currentColumn",
|
|
1916
|
-
data: value
|
|
1917
|
-
}, repeatedElement(rowIndex, /* @__PURE__ */ React.createElement(ColumnWrapper, __spreadValues$1({}, rest), columnTemplate)))));
|
|
1907
|
+
return React.Children.map(
|
|
1908
|
+
tableColumns,
|
|
1909
|
+
(column, columnIndex) => {
|
|
1910
|
+
if (!column) {
|
|
1911
|
+
return void 0;
|
|
1918
1912
|
}
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1913
|
+
const _a2 = column.props, { columnTemplate, title, dataIndex } = _a2, rest = __objRest$1(_a2, ["columnTemplate", "title", "dataIndex"]);
|
|
1914
|
+
const columnDefinition = {
|
|
1915
|
+
columnIndex,
|
|
1916
|
+
title,
|
|
1917
|
+
dataIndex,
|
|
1918
|
+
key: columnIndex,
|
|
1919
|
+
render: (value, record, rowIndex) => {
|
|
1920
|
+
return /* @__PURE__ */ React.createElement(DataProvider, { name: "currentRow", data: record }, /* @__PURE__ */ React.createElement(DataProvider, { name: "currentRowIndex", data: rowIndex }, /* @__PURE__ */ React.createElement(DataProvider, { name: "currentColumn", data: value }, repeatedElement(
|
|
1921
|
+
rowIndex,
|
|
1922
|
+
/* @__PURE__ */ React.createElement(ColumnWrapper, __spreadValues$1({}, rest), columnTemplate)
|
|
1923
|
+
))));
|
|
1924
|
+
}
|
|
1925
|
+
};
|
|
1926
|
+
return columnDefinition;
|
|
1927
|
+
}
|
|
1928
|
+
).filter(Boolean);
|
|
1922
1929
|
}, [tableColumns]);
|
|
1923
|
-
return /* @__PURE__ */ React.createElement(
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1930
|
+
return /* @__PURE__ */ React.createElement(
|
|
1931
|
+
Table,
|
|
1932
|
+
{
|
|
1933
|
+
className,
|
|
1934
|
+
columns: columnDefinitions,
|
|
1935
|
+
dataSource: items,
|
|
1936
|
+
size,
|
|
1937
|
+
onRow: (record) => {
|
|
1938
|
+
return {
|
|
1939
|
+
onMouseUp: () => {
|
|
1940
|
+
return onSelect == null ? void 0 : onSelect(record.id);
|
|
1941
|
+
}
|
|
1942
|
+
};
|
|
1943
|
+
},
|
|
1944
|
+
pagination: pagination ? void 0 : pagination,
|
|
1945
|
+
rowKey: "id"
|
|
1946
|
+
}
|
|
1947
|
+
);
|
|
1938
1948
|
}
|
|
1939
1949
|
const DEFAULT_ITEMS = [
|
|
1940
1950
|
{
|
|
@@ -2141,12 +2151,15 @@ function Tabs(props) {
|
|
|
2141
2151
|
"leftTabBarExtraContent",
|
|
2142
2152
|
"rightTabBarExtraContent"
|
|
2143
2153
|
]);
|
|
2144
|
-
return /* @__PURE__ */ React.createElement(
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2154
|
+
return /* @__PURE__ */ React.createElement(
|
|
2155
|
+
AntdTabs,
|
|
2156
|
+
__spreadProps(__spreadValues({}, otherProps), {
|
|
2157
|
+
tabBarExtraContent: {
|
|
2158
|
+
left: leftTabBarExtraContent,
|
|
2159
|
+
right: rightTabBarExtraContent
|
|
2160
|
+
}
|
|
2161
|
+
})
|
|
2162
|
+
);
|
|
2150
2163
|
}
|
|
2151
2164
|
function NavigateTabs({ componentProps, studioOps }) {
|
|
2152
2165
|
const tabPanes = [];
|
|
@@ -2159,31 +2172,44 @@ function NavigateTabs({ componentProps, studioOps }) {
|
|
|
2159
2172
|
const currTabPos = activeKey ? tabPanes.findIndex((tabKey) => {
|
|
2160
2173
|
return tabKey === activeKey;
|
|
2161
2174
|
}) : 0;
|
|
2162
|
-
return /* @__PURE__ */ React.createElement(
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
style: { width: "100%" },
|
|
2172
|
-
onClick: () => {
|
|
2173
|
-
if (tabPanes.length > 0) {
|
|
2174
|
-
const prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
|
|
2175
|
-
studioOps.updateProps({ activeKey: tabPanes[prevTabPos] });
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2178
|
-
}, "Prev tab"), /* @__PURE__ */ React.createElement(Button$1, {
|
|
2179
|
-
style: { width: "100%" },
|
|
2180
|
-
onClick: () => {
|
|
2181
|
-
if (tabPanes.length > 0) {
|
|
2182
|
-
const nextTabPos = (currTabPos + 1) % tabPanes.length;
|
|
2183
|
-
studioOps.updateProps({ activeKey: tabPanes[nextTabPos] });
|
|
2175
|
+
return /* @__PURE__ */ React.createElement(
|
|
2176
|
+
"div",
|
|
2177
|
+
{
|
|
2178
|
+
style: {
|
|
2179
|
+
width: "100%",
|
|
2180
|
+
display: "flex",
|
|
2181
|
+
flexDirection: "row",
|
|
2182
|
+
gap: "10px",
|
|
2183
|
+
justifyContent: "space-between"
|
|
2184
2184
|
}
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2185
|
+
},
|
|
2186
|
+
/* @__PURE__ */ React.createElement(
|
|
2187
|
+
Button$1,
|
|
2188
|
+
{
|
|
2189
|
+
style: { width: "100%" },
|
|
2190
|
+
onClick: () => {
|
|
2191
|
+
if (tabPanes.length > 0) {
|
|
2192
|
+
const prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
|
|
2193
|
+
studioOps.updateProps({ activeKey: tabPanes[prevTabPos] });
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
},
|
|
2197
|
+
"Prev tab"
|
|
2198
|
+
),
|
|
2199
|
+
/* @__PURE__ */ React.createElement(
|
|
2200
|
+
Button$1,
|
|
2201
|
+
{
|
|
2202
|
+
style: { width: "100%" },
|
|
2203
|
+
onClick: () => {
|
|
2204
|
+
if (tabPanes.length > 0) {
|
|
2205
|
+
const nextTabPos = (currTabPos + 1) % tabPanes.length;
|
|
2206
|
+
studioOps.updateProps({ activeKey: tabPanes[nextTabPos] });
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
},
|
|
2210
|
+
"Next tab"
|
|
2211
|
+
)
|
|
2212
|
+
);
|
|
2187
2213
|
}
|
|
2188
2214
|
function OutlineMessage() {
|
|
2189
2215
|
return /* @__PURE__ */ React.createElement("div", null, "* To re-arrange tab panes, use the Outline panel");
|
|
@@ -2336,13 +2362,16 @@ const tabsMeta = {
|
|
|
2336
2362
|
return void 0;
|
|
2337
2363
|
};
|
|
2338
2364
|
const tabKey = generateNewKey();
|
|
2339
|
-
studioOps.appendToSlot(
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2365
|
+
studioOps.appendToSlot(
|
|
2366
|
+
{
|
|
2367
|
+
type: "component",
|
|
2368
|
+
name: "AntdTabPane",
|
|
2369
|
+
props: {
|
|
2370
|
+
key: tabKey
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
"children"
|
|
2374
|
+
);
|
|
2346
2375
|
studioOps.updateProps({ activeKey: tabKey });
|
|
2347
2376
|
}
|
|
2348
2377
|
},
|
package/dist/index.js
CHANGED
|
@@ -359,7 +359,10 @@ const checkboxGroupMeta = {
|
|
|
359
359
|
};
|
|
360
360
|
function registerCheckboxGroup(loader, customCheckboxGroupMeta) {
|
|
361
361
|
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent__default.default(...args);
|
|
362
|
-
doRegisterComponent(
|
|
362
|
+
doRegisterComponent(
|
|
363
|
+
CheckboxGroup__default.default,
|
|
364
|
+
customCheckboxGroupMeta != null ? customCheckboxGroupMeta : checkboxGroupMeta
|
|
365
|
+
);
|
|
363
366
|
}
|
|
364
367
|
|
|
365
368
|
var __defProp$5 = Object.defineProperty;
|
|
@@ -446,7 +449,10 @@ const collapstePanelMeta = {
|
|
|
446
449
|
};
|
|
447
450
|
function registerCollapsePanel(loader, customCollapsePanelMeta) {
|
|
448
451
|
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent__default.default(...args);
|
|
449
|
-
doRegisterComponent(
|
|
452
|
+
doRegisterComponent(
|
|
453
|
+
CollapsePanel__default.default,
|
|
454
|
+
customCollapsePanelMeta != null ? customCollapsePanelMeta : collapstePanelMeta
|
|
455
|
+
);
|
|
450
456
|
}
|
|
451
457
|
const collapsteMeta = {
|
|
452
458
|
name: "AntdCollapse",
|
|
@@ -521,9 +527,12 @@ const collapsteMeta = {
|
|
|
521
527
|
};
|
|
522
528
|
function Collapse(props) {
|
|
523
529
|
const _a = props, { openIcon, closeIcon } = _a, rest = __objRest$3(_a, ["openIcon", "closeIcon"]);
|
|
524
|
-
return /* @__PURE__ */ React__default.default.createElement(
|
|
525
|
-
|
|
526
|
-
|
|
530
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
531
|
+
AntdCollapse__default.default,
|
|
532
|
+
__spreadProps$3(__spreadValues$5({}, rest), {
|
|
533
|
+
expandIcon: openIcon || closeIcon ? ({ isActive }) => isActive ? openIcon : closeIcon : void 0
|
|
534
|
+
})
|
|
535
|
+
);
|
|
527
536
|
}
|
|
528
537
|
function registerCollapse(loader, customCollapseMeta) {
|
|
529
538
|
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent__default.default(...args);
|
|
@@ -697,7 +706,10 @@ const dropdownButtonMeta = {
|
|
|
697
706
|
};
|
|
698
707
|
function registerDropdownButton(loader, customDropdownButtonMeta) {
|
|
699
708
|
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent__default.default(...args);
|
|
700
|
-
doRegisterComponent(
|
|
709
|
+
doRegisterComponent(
|
|
710
|
+
DropdownButton__default.default,
|
|
711
|
+
customDropdownButtonMeta != null ? customDropdownButtonMeta : dropdownButtonMeta
|
|
712
|
+
);
|
|
701
713
|
}
|
|
702
714
|
|
|
703
715
|
var __defProp$3 = Object.defineProperty;
|
|
@@ -1709,28 +1721,28 @@ var __objRest$2 = (source, exclude) => {
|
|
|
1709
1721
|
}
|
|
1710
1722
|
return target;
|
|
1711
1723
|
};
|
|
1712
|
-
const Slider = React__default.default.forwardRef(
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
if (
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1724
|
+
const Slider = React__default.default.forwardRef(
|
|
1725
|
+
(_a, ref) => {
|
|
1726
|
+
var _b = _a, { value, defaultValue, value2, defaultValue2 } = _b, props = __objRest$2(_b, ["value", "defaultValue", "value2", "defaultValue2"]);
|
|
1727
|
+
const newProps = __spreadValues$2({}, props);
|
|
1728
|
+
if (props.range) {
|
|
1729
|
+
if (typeof value === "number" || typeof value2 === "number") {
|
|
1730
|
+
newProps.value = [value != null ? value : 0, value2 != null ? value2 : 0];
|
|
1731
|
+
}
|
|
1732
|
+
if (typeof defaultValue === "number" || typeof defaultValue2 === "number") {
|
|
1733
|
+
newProps.defaultValue = [defaultValue != null ? defaultValue : 0, defaultValue2 != null ? defaultValue2 : 0];
|
|
1734
|
+
}
|
|
1735
|
+
} else {
|
|
1736
|
+
if (typeof value === "number") {
|
|
1737
|
+
newProps.value = value;
|
|
1738
|
+
}
|
|
1739
|
+
if (typeof defaultValue === "number") {
|
|
1740
|
+
newProps.defaultValue = defaultValue;
|
|
1741
|
+
}
|
|
1728
1742
|
}
|
|
1743
|
+
return /* @__PURE__ */ React__default.default.createElement(AntdSlider__default.default, __spreadProps$1(__spreadValues$2({}, newProps), { ref }));
|
|
1729
1744
|
}
|
|
1730
|
-
|
|
1731
|
-
ref
|
|
1732
|
-
}));
|
|
1733
|
-
});
|
|
1745
|
+
);
|
|
1734
1746
|
const sliderMeta = {
|
|
1735
1747
|
name: "AntdSlider",
|
|
1736
1748
|
displayName: "Antd Slider",
|
|
@@ -1912,9 +1924,7 @@ function TableValue(props) {
|
|
|
1912
1924
|
var _a;
|
|
1913
1925
|
const { className } = props;
|
|
1914
1926
|
const column = host.useSelector("currentColumn");
|
|
1915
|
-
return /* @__PURE__ */ React__default.default.createElement("div", {
|
|
1916
|
-
className
|
|
1917
|
-
}, (_a = column == null ? void 0 : column.toString()) != null ? _a : "");
|
|
1927
|
+
return /* @__PURE__ */ React__default.default.createElement("div", { className }, (_a = column == null ? void 0 : column.toString()) != null ? _a : "");
|
|
1918
1928
|
}
|
|
1919
1929
|
function ColumnWrapper(props) {
|
|
1920
1930
|
return props.children;
|
|
@@ -1924,47 +1934,47 @@ function TableWrapper(props) {
|
|
|
1924
1934
|
const { className, items, columns, size, onSelect, pagination } = props;
|
|
1925
1935
|
const tableColumns = (_b = (_a = columns == null ? void 0 : columns.props) == null ? void 0 : _a.children) != null ? _b : columns;
|
|
1926
1936
|
const columnDefinitions = React__default.default.useMemo(() => {
|
|
1927
|
-
return React__default.default.Children.map(
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
const columnDefinition = {
|
|
1933
|
-
columnIndex,
|
|
1934
|
-
title,
|
|
1935
|
-
dataIndex,
|
|
1936
|
-
key: columnIndex,
|
|
1937
|
-
render: (value, record, rowIndex) => {
|
|
1938
|
-
return /* @__PURE__ */ React__default.default.createElement(host.DataProvider, {
|
|
1939
|
-
name: "currentRow",
|
|
1940
|
-
data: record
|
|
1941
|
-
}, /* @__PURE__ */ React__default.default.createElement(host.DataProvider, {
|
|
1942
|
-
name: "currentRowIndex",
|
|
1943
|
-
data: rowIndex
|
|
1944
|
-
}, /* @__PURE__ */ React__default.default.createElement(host.DataProvider, {
|
|
1945
|
-
name: "currentColumn",
|
|
1946
|
-
data: value
|
|
1947
|
-
}, host.repeatedElement(rowIndex, /* @__PURE__ */ React__default.default.createElement(ColumnWrapper, __spreadValues$1({}, rest), columnTemplate)))));
|
|
1937
|
+
return React__default.default.Children.map(
|
|
1938
|
+
tableColumns,
|
|
1939
|
+
(column, columnIndex) => {
|
|
1940
|
+
if (!column) {
|
|
1941
|
+
return void 0;
|
|
1948
1942
|
}
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1943
|
+
const _a2 = column.props, { columnTemplate, title, dataIndex } = _a2, rest = __objRest$1(_a2, ["columnTemplate", "title", "dataIndex"]);
|
|
1944
|
+
const columnDefinition = {
|
|
1945
|
+
columnIndex,
|
|
1946
|
+
title,
|
|
1947
|
+
dataIndex,
|
|
1948
|
+
key: columnIndex,
|
|
1949
|
+
render: (value, record, rowIndex) => {
|
|
1950
|
+
return /* @__PURE__ */ React__default.default.createElement(host.DataProvider, { name: "currentRow", data: record }, /* @__PURE__ */ React__default.default.createElement(host.DataProvider, { name: "currentRowIndex", data: rowIndex }, /* @__PURE__ */ React__default.default.createElement(host.DataProvider, { name: "currentColumn", data: value }, host.repeatedElement(
|
|
1951
|
+
rowIndex,
|
|
1952
|
+
/* @__PURE__ */ React__default.default.createElement(ColumnWrapper, __spreadValues$1({}, rest), columnTemplate)
|
|
1953
|
+
))));
|
|
1954
|
+
}
|
|
1955
|
+
};
|
|
1956
|
+
return columnDefinition;
|
|
1957
|
+
}
|
|
1958
|
+
).filter(Boolean);
|
|
1952
1959
|
}, [tableColumns]);
|
|
1953
|
-
return /* @__PURE__ */ React__default.default.createElement(
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1960
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
1961
|
+
Table__default.default,
|
|
1962
|
+
{
|
|
1963
|
+
className,
|
|
1964
|
+
columns: columnDefinitions,
|
|
1965
|
+
dataSource: items,
|
|
1966
|
+
size,
|
|
1967
|
+
onRow: (record) => {
|
|
1968
|
+
return {
|
|
1969
|
+
onMouseUp: () => {
|
|
1970
|
+
return onSelect == null ? void 0 : onSelect(record.id);
|
|
1971
|
+
}
|
|
1972
|
+
};
|
|
1973
|
+
},
|
|
1974
|
+
pagination: pagination ? void 0 : pagination,
|
|
1975
|
+
rowKey: "id"
|
|
1976
|
+
}
|
|
1977
|
+
);
|
|
1968
1978
|
}
|
|
1969
1979
|
const DEFAULT_ITEMS = [
|
|
1970
1980
|
{
|
|
@@ -2171,12 +2181,15 @@ function Tabs(props) {
|
|
|
2171
2181
|
"leftTabBarExtraContent",
|
|
2172
2182
|
"rightTabBarExtraContent"
|
|
2173
2183
|
]);
|
|
2174
|
-
return /* @__PURE__ */ React__default.default.createElement(
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2184
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
2185
|
+
AntdTabs__default.default,
|
|
2186
|
+
__spreadProps(__spreadValues({}, otherProps), {
|
|
2187
|
+
tabBarExtraContent: {
|
|
2188
|
+
left: leftTabBarExtraContent,
|
|
2189
|
+
right: rightTabBarExtraContent
|
|
2190
|
+
}
|
|
2191
|
+
})
|
|
2192
|
+
);
|
|
2180
2193
|
}
|
|
2181
2194
|
function NavigateTabs({ componentProps, studioOps }) {
|
|
2182
2195
|
const tabPanes = [];
|
|
@@ -2189,31 +2202,44 @@ function NavigateTabs({ componentProps, studioOps }) {
|
|
|
2189
2202
|
const currTabPos = activeKey ? tabPanes.findIndex((tabKey) => {
|
|
2190
2203
|
return tabKey === activeKey;
|
|
2191
2204
|
}) : 0;
|
|
2192
|
-
return /* @__PURE__ */ React__default.default.createElement(
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
style: { width: "100%" },
|
|
2202
|
-
onClick: () => {
|
|
2203
|
-
if (tabPanes.length > 0) {
|
|
2204
|
-
const prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
|
|
2205
|
-
studioOps.updateProps({ activeKey: tabPanes[prevTabPos] });
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
}, "Prev tab"), /* @__PURE__ */ React__default.default.createElement(antd.Button, {
|
|
2209
|
-
style: { width: "100%" },
|
|
2210
|
-
onClick: () => {
|
|
2211
|
-
if (tabPanes.length > 0) {
|
|
2212
|
-
const nextTabPos = (currTabPos + 1) % tabPanes.length;
|
|
2213
|
-
studioOps.updateProps({ activeKey: tabPanes[nextTabPos] });
|
|
2205
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
2206
|
+
"div",
|
|
2207
|
+
{
|
|
2208
|
+
style: {
|
|
2209
|
+
width: "100%",
|
|
2210
|
+
display: "flex",
|
|
2211
|
+
flexDirection: "row",
|
|
2212
|
+
gap: "10px",
|
|
2213
|
+
justifyContent: "space-between"
|
|
2214
2214
|
}
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2215
|
+
},
|
|
2216
|
+
/* @__PURE__ */ React__default.default.createElement(
|
|
2217
|
+
antd.Button,
|
|
2218
|
+
{
|
|
2219
|
+
style: { width: "100%" },
|
|
2220
|
+
onClick: () => {
|
|
2221
|
+
if (tabPanes.length > 0) {
|
|
2222
|
+
const prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
|
|
2223
|
+
studioOps.updateProps({ activeKey: tabPanes[prevTabPos] });
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
},
|
|
2227
|
+
"Prev tab"
|
|
2228
|
+
),
|
|
2229
|
+
/* @__PURE__ */ React__default.default.createElement(
|
|
2230
|
+
antd.Button,
|
|
2231
|
+
{
|
|
2232
|
+
style: { width: "100%" },
|
|
2233
|
+
onClick: () => {
|
|
2234
|
+
if (tabPanes.length > 0) {
|
|
2235
|
+
const nextTabPos = (currTabPos + 1) % tabPanes.length;
|
|
2236
|
+
studioOps.updateProps({ activeKey: tabPanes[nextTabPos] });
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
},
|
|
2240
|
+
"Next tab"
|
|
2241
|
+
)
|
|
2242
|
+
);
|
|
2217
2243
|
}
|
|
2218
2244
|
function OutlineMessage() {
|
|
2219
2245
|
return /* @__PURE__ */ React__default.default.createElement("div", null, "* To re-arrange tab panes, use the Outline panel");
|
|
@@ -2366,13 +2392,16 @@ const tabsMeta = {
|
|
|
2366
2392
|
return void 0;
|
|
2367
2393
|
};
|
|
2368
2394
|
const tabKey = generateNewKey();
|
|
2369
|
-
studioOps.appendToSlot(
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2395
|
+
studioOps.appendToSlot(
|
|
2396
|
+
{
|
|
2397
|
+
type: "component",
|
|
2398
|
+
name: "AntdTabPane",
|
|
2399
|
+
props: {
|
|
2400
|
+
key: tabKey
|
|
2401
|
+
}
|
|
2402
|
+
},
|
|
2403
|
+
"children"
|
|
2404
|
+
);
|
|
2376
2405
|
studioOps.updateProps({ activeKey: tabKey });
|
|
2377
2406
|
}
|
|
2378
2407
|
},
|