ods-component-lib 1.18.148 → 1.18.152
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/components/devextreme/OdsServerSideDatagrid/OdsServerSideDatagrid.Types.d.ts +1 -1
- package/dist/components/devextreme/dataGridHandlers/OnToolbarButtonHandler.d.ts +7 -1
- package/dist/components/devextreme/dataGridStyle.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +131 -28
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +131 -29
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -34988,6 +34988,125 @@ var DynamicIcon = function DynamicIcon(_ref) {
|
|
|
34988
34988
|
return React.createElement(IconComponent, null);
|
|
34989
34989
|
};
|
|
34990
34990
|
|
|
34991
|
+
var client = createCommonjsModule(function (module, exports) {
|
|
34992
|
+
|
|
34993
|
+
|
|
34994
|
+
if (process.env.NODE_ENV === 'production') {
|
|
34995
|
+
exports.createRoot = reactDom.createRoot;
|
|
34996
|
+
exports.hydrateRoot = reactDom.hydrateRoot;
|
|
34997
|
+
} else {
|
|
34998
|
+
var i = reactDom.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
34999
|
+
exports.createRoot = function(c, o) {
|
|
35000
|
+
i.usingClientEntryPoint = true;
|
|
35001
|
+
try {
|
|
35002
|
+
return reactDom.createRoot(c, o);
|
|
35003
|
+
} finally {
|
|
35004
|
+
i.usingClientEntryPoint = false;
|
|
35005
|
+
}
|
|
35006
|
+
};
|
|
35007
|
+
exports.hydrateRoot = function(c, h, o) {
|
|
35008
|
+
i.usingClientEntryPoint = true;
|
|
35009
|
+
try {
|
|
35010
|
+
return reactDom.hydrateRoot(c, h, o);
|
|
35011
|
+
} finally {
|
|
35012
|
+
i.usingClientEntryPoint = false;
|
|
35013
|
+
}
|
|
35014
|
+
};
|
|
35015
|
+
}
|
|
35016
|
+
});
|
|
35017
|
+
var client_1 = client.createRoot;
|
|
35018
|
+
|
|
35019
|
+
var _templateObject$r;
|
|
35020
|
+
var useStyles$2 = createStyles(function (_ref) {
|
|
35021
|
+
var css = _ref.css,
|
|
35022
|
+
token = _ref.token;
|
|
35023
|
+
return {
|
|
35024
|
+
toolbarGrid: css(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n & .toolbar-primary-button {\n margin-left: ", "px;\n }\n\n & .toolbar-dropdown-container {\n margin-left: ", "px;\n }\n "])), token.margin, token.marginXXS)
|
|
35025
|
+
};
|
|
35026
|
+
});
|
|
35027
|
+
|
|
35028
|
+
var useOnToolbarButtonHandler = function useOnToolbarButtonHandler(_ref) {
|
|
35029
|
+
var pageTitle = _ref.pageTitle,
|
|
35030
|
+
toolbarButtonGroup = _ref.toolbarButtonGroup,
|
|
35031
|
+
callback = _ref.callback;
|
|
35032
|
+
var _useStyles = useStyles$2(),
|
|
35033
|
+
styles = _useStyles.styles;
|
|
35034
|
+
var onToolbarPreparing = useMemo(function () {
|
|
35035
|
+
return function (e) {
|
|
35036
|
+
if ((toolbarButtonGroup === null || toolbarButtonGroup === void 0 ? void 0 : toolbarButtonGroup.length) > 0) {
|
|
35037
|
+
var primaryButtons = toolbarButtonGroup.slice(0, 3);
|
|
35038
|
+
var additionalButtons = toolbarButtonGroup.length > 3 ? toolbarButtonGroup.slice(3) : [];
|
|
35039
|
+
primaryButtons.forEach(function (button, index) {
|
|
35040
|
+
var buttonContainer = document.createElement('div');
|
|
35041
|
+
var rootButton = client_1(buttonContainer);
|
|
35042
|
+
rootButton.render(React.createElement(React.Fragment, null, React.createElement(OdsButton, Object.assign({
|
|
35043
|
+
key: index,
|
|
35044
|
+
className: "toolbar-primary-button",
|
|
35045
|
+
type: button.type
|
|
35046
|
+
}, button.onclick && {
|
|
35047
|
+
onClick: button.onclick
|
|
35048
|
+
}, {
|
|
35049
|
+
disabled: button.disabled
|
|
35050
|
+
}), button.label)));
|
|
35051
|
+
e.toolbarOptions.items.push({
|
|
35052
|
+
location: 'before',
|
|
35053
|
+
widget: 'dxTemplate',
|
|
35054
|
+
template: function template(_, __, container) {
|
|
35055
|
+
container.classList.add(styles.toolbarGrid);
|
|
35056
|
+
container.appendChild(buttonContainer);
|
|
35057
|
+
}
|
|
35058
|
+
});
|
|
35059
|
+
});
|
|
35060
|
+
if (additionalButtons.length > 0) {
|
|
35061
|
+
var dropdownContainer = document.createElement('div');
|
|
35062
|
+
dropdownContainer.classList.add('toolbar-dropdown-container');
|
|
35063
|
+
var rootDropdown = client_1(dropdownContainer);
|
|
35064
|
+
rootDropdown.render(React.createElement(React.Fragment, null, React.createElement(OdsDropdown, {
|
|
35065
|
+
key: "dropdown-custom-toolbar",
|
|
35066
|
+
menuItems: additionalButtons.map(function (button) {
|
|
35067
|
+
return {
|
|
35068
|
+
label: button.label,
|
|
35069
|
+
onClick: button.onclick
|
|
35070
|
+
};
|
|
35071
|
+
})
|
|
35072
|
+
}, React.createElement(OdsButton, {
|
|
35073
|
+
type: "text",
|
|
35074
|
+
icon: React.createElement(DynamicIcon, {
|
|
35075
|
+
iconName: "kebabMenu"
|
|
35076
|
+
})
|
|
35077
|
+
}))));
|
|
35078
|
+
e.toolbarOptions.items.push({
|
|
35079
|
+
location: 'before',
|
|
35080
|
+
widget: 'dxTemplate',
|
|
35081
|
+
template: function template(_, __, container) {
|
|
35082
|
+
container.classList.add(styles.toolbarGrid);
|
|
35083
|
+
container.appendChild(dropdownContainer);
|
|
35084
|
+
}
|
|
35085
|
+
});
|
|
35086
|
+
}
|
|
35087
|
+
}
|
|
35088
|
+
if (pageTitle) {
|
|
35089
|
+
var titleContainer = document.createElement('div');
|
|
35090
|
+
var rootTitle = client_1(titleContainer);
|
|
35091
|
+
rootTitle.render(React.createElement(React.Fragment, null, React.createElement(OdsTitle, {
|
|
35092
|
+
level: 5
|
|
35093
|
+
}, pageTitle)));
|
|
35094
|
+
e.toolbarOptions.items.unshift({
|
|
35095
|
+
location: 'before',
|
|
35096
|
+
cssClass: 'toolbarTitleItem',
|
|
35097
|
+
template: function template(_, __, container) {
|
|
35098
|
+
container.appendChild(titleContainer);
|
|
35099
|
+
}
|
|
35100
|
+
});
|
|
35101
|
+
}
|
|
35102
|
+
if (callback) {
|
|
35103
|
+
callback(e);
|
|
35104
|
+
}
|
|
35105
|
+
};
|
|
35106
|
+
}, [pageTitle, toolbarButtonGroup]);
|
|
35107
|
+
return onToolbarPreparing;
|
|
35108
|
+
};
|
|
35109
|
+
|
|
34991
35110
|
var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
34992
35111
|
var _props$columnResizing, _props$pagerProps$vis, _props$pagerProps, _props$pagerProps$sho, _props$pagerProps2, _props$pagerProps$sho2, _props$pagerProps3, _props$pagerProps$dis, _props$pagerProps4, _props$pagerProps$inf, _props$pagerProps5, _props$exportProps;
|
|
34993
35112
|
var rowCount = useRef(0);
|
|
@@ -35110,6 +35229,11 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
35110
35229
|
props.sortingProps.onOptionChanged(e);
|
|
35111
35230
|
}
|
|
35112
35231
|
}, [props.dataGridRef]);
|
|
35232
|
+
var handleOnToolbarPreparing = useOnToolbarButtonHandler({
|
|
35233
|
+
pageTitle: props.pageTitle,
|
|
35234
|
+
toolbarButtonGroup: props.toolbarButtonGroup,
|
|
35235
|
+
callback: props.onToolbarPreparing
|
|
35236
|
+
});
|
|
35113
35237
|
useEffect(function () {}, [updateTrigger]);
|
|
35114
35238
|
useEffect(function () {
|
|
35115
35239
|
var loadFilterData = function loadFilterData() {
|
|
@@ -35268,29 +35392,7 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
35268
35392
|
}
|
|
35269
35393
|
return React.createElement(React.Fragment, null, buttonElements);
|
|
35270
35394
|
}
|
|
35271
|
-
return React.createElement("div", null,
|
|
35272
|
-
style: {
|
|
35273
|
-
display: "flex",
|
|
35274
|
-
justifyContent: "space-between",
|
|
35275
|
-
alignItems: "center",
|
|
35276
|
-
marginBottom: "10px"
|
|
35277
|
-
}
|
|
35278
|
-
}, React.createElement("h2", null, props.pageTitle), props.toolbarButtonGroup && React.createElement("div", {
|
|
35279
|
-
style: {
|
|
35280
|
-
display: "flex",
|
|
35281
|
-
alignItems: "center"
|
|
35282
|
-
}
|
|
35283
|
-
}, props.toolbarButtonGroup.map(function (button, index) {
|
|
35284
|
-
return React.createElement(OdsButton, {
|
|
35285
|
-
key: index,
|
|
35286
|
-
type: button.type,
|
|
35287
|
-
onClick: button.onClick,
|
|
35288
|
-
disabled: button.disabled,
|
|
35289
|
-
style: {
|
|
35290
|
-
marginLeft: index > 0 ? "10px" : undefined
|
|
35291
|
-
}
|
|
35292
|
-
}, button.label);
|
|
35293
|
-
}))), React.createElement(DataGrid$2, Object.assign({
|
|
35395
|
+
return React.createElement("div", null, React.createElement(DataGrid$2, Object.assign({
|
|
35294
35396
|
dataSource: props.dataSource,
|
|
35295
35397
|
showBorders: true,
|
|
35296
35398
|
repaintChangesOnly: true,
|
|
@@ -35338,7 +35440,7 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
35338
35440
|
onOptionChanged: handleOptionChanged,
|
|
35339
35441
|
width: "100%",
|
|
35340
35442
|
language: props.language,
|
|
35341
|
-
onToolbarPreparing:
|
|
35443
|
+
onToolbarPreparing: handleOnToolbarPreparing,
|
|
35342
35444
|
ref: props.dataGridRef
|
|
35343
35445
|
}), React.createElement(Scrolling, {
|
|
35344
35446
|
mode: "infinite",
|
|
@@ -35427,11 +35529,11 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
35427
35529
|
}, React.createElement("p", null, renderTotal())));
|
|
35428
35530
|
};
|
|
35429
35531
|
|
|
35430
|
-
var _templateObject$
|
|
35431
|
-
var useStyles$
|
|
35532
|
+
var _templateObject$s, _templateObject2$3, _templateObject3$1, _templateObject4, _templateObject5;
|
|
35533
|
+
var useStyles$3 = createStyles(function (_ref) {
|
|
35432
35534
|
var css = _ref.css;
|
|
35433
35535
|
return {
|
|
35434
|
-
grid: css(_templateObject$
|
|
35536
|
+
grid: css(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n & .grid-cell-selected {\n background-color: lightgreen;\n }\n & .grid-cell-disable-text-selection {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n & .grid-cell-disable-colored {\n background-color: lightgray;\n }\n & .grid-summary-row-label {\n font-weight: 900;\n }\n\n & .grid-toolbar-button-item {\n padding: 0 !important;\n }\n\n & .dx-datagrid.dx-gridbase-container.dx-datagrid-borders {\n border: none !important;\n border-radius: 16px 16px 0 0;\n }\n & .dx-datagrid-borders > .dx-datagrid-filter-panel,\n & .dx-datagrid-borders > .dx-datagrid-headers {\n border: 0 !important;\n }\n & .dx-datagrid-search-panel {\n margin-left: 0;\n }\n & .dx-toolbar-after .dx-toolbar-item,\n & .dx-toolbar-after .dx-toolbar-item:last-child {\n padding: 0;\n }\n & .dx-toolbar .dx-toolbar-after {\n display: inline-flex;\n gap: 5px;\n }\n .dx-datagrid-borders > .dx-datagrid-headers,\n .dx-datagrid-borders > .dx-datagrid-rowsview,\n .dx-datagrid-borders > .dx-datagrid-total-footer {\n border-radius: 0;\n }\n\n .dx-datagrid-headers .dx-datagrid-table .dx-row > td {\n text-align: start !important;\n }\n\n & .dx-column-indicators {\n float: right !important;\n }\n\n .dx-header-row .dx-header-filter-indicator.dx-text-content-alignment-right, .dx-header-row .dx-sort-indicator.dx-text-content-alignment-right {\n margin-right: 3px;\n margin-left: unset;\n }\n "]))),
|
|
35435
35537
|
gridCustomSummary: css(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteralLoose(["\n background-color: rgb(255, 255, 255);\n border-radius: 0px 0px 16px 16px;\n font-size: 13px;\n text-align: unset;\n padding: 17px 16px 3px 15px;\n font-weight: 600;\n border-top: 1px solid #ededed;\n "])))
|
|
35436
35538
|
};
|
|
35437
35539
|
});
|
|
@@ -35709,7 +35811,7 @@ var OdsInlineEditDataGrid = function OdsInlineEditDataGrid(props) {
|
|
|
35709
35811
|
onOptionChangedFromProps = props.onOptionChanged,
|
|
35710
35812
|
onExportingFromProps = props.onExporting,
|
|
35711
35813
|
AllGridOptions = _objectWithoutPropertiesLoose(props, _excluded$5);
|
|
35712
|
-
var _useStyles = useStyles$
|
|
35814
|
+
var _useStyles = useStyles$3(),
|
|
35713
35815
|
gridStyle = _useStyles.styles;
|
|
35714
35816
|
var _useState = useState(0),
|
|
35715
35817
|
currentPage = _useState[0],
|
|
@@ -36998,5 +37100,5 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
36998
37100
|
})));
|
|
36999
37101
|
};
|
|
37000
37102
|
|
|
37001
|
-
export { DxTreeList, OdsAlert, OdsAutoComplete, OdsBadge, OdsBadgeRibbon, OdsBannerAlert, OdsBasicDataGrid, OdsBasicTable, OdsButton, OdsCalendar, OdsCard, OdsCheckbox, OdsCheckboxGroup, OdsCollapse, OdsDataGrid, OdsDateRangePicker, OdsDatepicker, OdsDisplayGrid, OdsDivider, OdsDropdown, OdsDropdownButton, OdsFileUpload, OdsFilter, OdsFilterTagView, OdsImage, OdsInlineEditDataGrid, OdsInput, OdsInputNumber, OdsLink, OdsList, OdsModal, OdsModalOld, OdsMultiSelect, OdsNotification, OdsParagraph, OdsPassword, OdsPhoneInput, OdsRadio, OdsRadioGroup, OdsRangeTimepicker, OdsRate, OdsRemoteDataGrid, OdsSearch, OdsSelect, OdsSelectableTable, OdsServerSideDatagrid, OdsSpin, OdsSwitch, OdsTab, OdsBasicTable as OdsTable, OdsTag, OdsText, OdsTextArea, OdsTimeline, OdsTimepicker, OdsTitle, OdsTransfer };
|
|
37103
|
+
export { DxTreeList, OdsAlert, OdsAutoComplete, OdsBadge, OdsBadgeRibbon, OdsBannerAlert, OdsBasicDataGrid, OdsBasicTable, OdsButton, OdsCalendar, OdsCard, OdsCheckbox, OdsCheckboxGroup, OdsCollapse, OdsDataGrid, OdsDateRangePicker, OdsDatepicker, OdsDisplayGrid, OdsDivider, OdsDropdown, OdsDropdownButton, OdsFileUpload, OdsFilter, OdsFilterTagView, OdsImage, OdsInlineEditDataGrid, OdsInput, OdsInputNumber, OdsLink, OdsList, OdsModal, OdsModalOld, OdsMultiSelect, OdsNotification, OdsParagraph, OdsPassword, OdsPhoneInput, OdsRadio, OdsRadioGroup, OdsRangeTimepicker, OdsRate, OdsRemoteDataGrid, OdsSearch, OdsSelect, OdsSelectableTable, OdsServerSideDatagrid, OdsSpin, OdsSwitch, OdsTab, OdsBasicTable as OdsTable, OdsTag, OdsText, OdsTextArea, OdsTimeline, OdsTimepicker, OdsTitle, OdsTransfer, useOnToolbarButtonHandler };
|
|
37002
37104
|
//# sourceMappingURL=index.modern.js.map
|