ods-component-lib 1.18.148 → 1.18.150
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/index.js +108 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +108 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ import OdsBasicDataGrid from "./components/devextreme/OdsBasicDataGrid/OdsBasicD
|
|
|
54
54
|
import OdsTransfer from "./components/devextreme/OdsTransfer";
|
|
55
55
|
import OdsServerSideDatagrid from "./components/devextreme/OdsServerSideDatagrid/OdsServerSideDatagrid";
|
|
56
56
|
import OdsInlineEditDataGrid from "./components/devextreme/OdsInlineEditDataGrid/OdsInlineEditDataGrid";
|
|
57
|
+
import { useOnToolbarButtonHandler } from './components/devextreme/dataGridHandlers/OnToolbarButtonHandler';
|
|
57
58
|
export { OdsButton };
|
|
58
59
|
export { OdsInput };
|
|
59
60
|
export { OdsDropdownButton };
|
|
@@ -106,6 +107,7 @@ export { OdsFilterTagView };
|
|
|
106
107
|
export { OdsFileUpload };
|
|
107
108
|
export { OdsDataGrid };
|
|
108
109
|
export { OdsDisplayGrid };
|
|
110
|
+
export { useOnToolbarButtonHandler };
|
|
109
111
|
export { OdsRemoteDataGrid } from "./components/devextreme/index";
|
|
110
112
|
export { OdsBasicDataGrid };
|
|
111
113
|
export { OdsTransfer };
|
package/dist/index.js
CHANGED
|
@@ -35870,6 +35870,113 @@ var OdsInlineEditDataGrid = function OdsInlineEditDataGrid(props) {
|
|
|
35870
35870
|
}, React__default.createElement("p", null, renderTotal())));
|
|
35871
35871
|
};
|
|
35872
35872
|
|
|
35873
|
+
var client = createCommonjsModule(function (module, exports) {
|
|
35874
|
+
|
|
35875
|
+
|
|
35876
|
+
if (process.env.NODE_ENV === 'production') {
|
|
35877
|
+
exports.createRoot = reactDom.createRoot;
|
|
35878
|
+
exports.hydrateRoot = reactDom.hydrateRoot;
|
|
35879
|
+
} else {
|
|
35880
|
+
var i = reactDom.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
35881
|
+
exports.createRoot = function(c, o) {
|
|
35882
|
+
i.usingClientEntryPoint = true;
|
|
35883
|
+
try {
|
|
35884
|
+
return reactDom.createRoot(c, o);
|
|
35885
|
+
} finally {
|
|
35886
|
+
i.usingClientEntryPoint = false;
|
|
35887
|
+
}
|
|
35888
|
+
};
|
|
35889
|
+
exports.hydrateRoot = function(c, h, o) {
|
|
35890
|
+
i.usingClientEntryPoint = true;
|
|
35891
|
+
try {
|
|
35892
|
+
return reactDom.hydrateRoot(c, h, o);
|
|
35893
|
+
} finally {
|
|
35894
|
+
i.usingClientEntryPoint = false;
|
|
35895
|
+
}
|
|
35896
|
+
};
|
|
35897
|
+
}
|
|
35898
|
+
});
|
|
35899
|
+
var client_1 = client.createRoot;
|
|
35900
|
+
|
|
35901
|
+
var useOnToolbarButtonHandler = function useOnToolbarButtonHandler(props) {
|
|
35902
|
+
var _theme$useToken = antd.theme.useToken(),
|
|
35903
|
+
token = _theme$useToken.token;
|
|
35904
|
+
var onToolbarPreparing = React.useMemo(function () {
|
|
35905
|
+
return function (e) {
|
|
35906
|
+
var toolbarButtonGroup = props.toolbarButtonGroup;
|
|
35907
|
+
var primaryButtons = toolbarButtonGroup.slice(0, 3);
|
|
35908
|
+
var additionalButtons = toolbarButtonGroup.length > 3 ? toolbarButtonGroup.slice(3) : [];
|
|
35909
|
+
primaryButtons.forEach(function (button, index) {
|
|
35910
|
+
var buttonContainer = document.createElement('div');
|
|
35911
|
+
var rootButton = client_1(buttonContainer);
|
|
35912
|
+
rootButton.render(React__default.createElement(React__default.StrictMode, null, React__default.createElement(OdsButton, {
|
|
35913
|
+
key: index,
|
|
35914
|
+
style: {
|
|
35915
|
+
marginLeft: token.margin
|
|
35916
|
+
},
|
|
35917
|
+
type: button.type,
|
|
35918
|
+
onClick: function onClick() {
|
|
35919
|
+
return button.onclick();
|
|
35920
|
+
},
|
|
35921
|
+
disabled: button.disabled
|
|
35922
|
+
}, button.label)));
|
|
35923
|
+
e.toolbarOptions.items.push({
|
|
35924
|
+
location: 'before',
|
|
35925
|
+
widget: 'dxTemplate',
|
|
35926
|
+
template: function template(_, __, container) {
|
|
35927
|
+
container.appendChild(buttonContainer);
|
|
35928
|
+
}
|
|
35929
|
+
});
|
|
35930
|
+
});
|
|
35931
|
+
if (additionalButtons.length > 0) {
|
|
35932
|
+
var dropdownContainer = document.createElement('div');
|
|
35933
|
+
dropdownContainer.style.marginLeft = '10px';
|
|
35934
|
+
var rootDropdown = client_1(dropdownContainer);
|
|
35935
|
+
rootDropdown.render(React__default.createElement(React__default.StrictMode, null, React__default.createElement(OdsDropdown, {
|
|
35936
|
+
key: "dropdown-custom-toolbar",
|
|
35937
|
+
menuItems: additionalButtons.map(function (button) {
|
|
35938
|
+
return {
|
|
35939
|
+
label: button.label,
|
|
35940
|
+
onClick: button.onclick
|
|
35941
|
+
};
|
|
35942
|
+
})
|
|
35943
|
+
}, React__default.createElement(OdsButton, {
|
|
35944
|
+
type: "text",
|
|
35945
|
+
icon: React__default.createElement(DynamicIcon, {
|
|
35946
|
+
iconName: "kebabMenu"
|
|
35947
|
+
})
|
|
35948
|
+
}))));
|
|
35949
|
+
e.toolbarOptions.items.push({
|
|
35950
|
+
location: 'before',
|
|
35951
|
+
widget: 'dxTemplate',
|
|
35952
|
+
template: function template(_, __, container) {
|
|
35953
|
+
container.appendChild(dropdownContainer);
|
|
35954
|
+
}
|
|
35955
|
+
});
|
|
35956
|
+
}
|
|
35957
|
+
var titleContainer = document.createElement('div');
|
|
35958
|
+
var rootTitle = client_1(titleContainer);
|
|
35959
|
+
rootTitle.render(React__default.createElement(React__default.StrictMode, null, React__default.createElement(OdsTitle, {
|
|
35960
|
+
level: 5,
|
|
35961
|
+
style: {
|
|
35962
|
+
display: "flex",
|
|
35963
|
+
alignItems: "center",
|
|
35964
|
+
alignSelf: "stretch",
|
|
35965
|
+
margin: 0
|
|
35966
|
+
}
|
|
35967
|
+
}, props.pageTitle)));
|
|
35968
|
+
e.toolbarOptions.items.unshift({
|
|
35969
|
+
location: 'before',
|
|
35970
|
+
cssClass: 'toolbarTitleItem',
|
|
35971
|
+
template: function template(_, __, container) {
|
|
35972
|
+
container.appendChild(titleContainer);
|
|
35973
|
+
}
|
|
35974
|
+
});
|
|
35975
|
+
};
|
|
35976
|
+
}, [props.toolbarButtonGroup, props.pageTitle, token.margin]);
|
|
35977
|
+
return onToolbarPreparing;
|
|
35978
|
+
};
|
|
35979
|
+
|
|
35873
35980
|
var checkCellSelectionConstraints$1 = function checkCellSelectionConstraints(e) {
|
|
35874
35981
|
return e.rowType == "data" && e.columnIndex > -1 && e.rowIndex > -1;
|
|
35875
35982
|
};
|
|
@@ -37060,4 +37167,5 @@ exports.OdsTimeline = OdsTimeline;
|
|
|
37060
37167
|
exports.OdsTimepicker = OdsTimepicker;
|
|
37061
37168
|
exports.OdsTitle = OdsTitle;
|
|
37062
37169
|
exports.OdsTransfer = OdsTransfer;
|
|
37170
|
+
exports.useOnToolbarButtonHandler = useOnToolbarButtonHandler;
|
|
37063
37171
|
//# sourceMappingURL=index.js.map
|