ods-component-lib 1.18.52 → 1.18.54
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/antd/cascader/OdsCascader.d.ts +4 -0
- package/dist/components/antd/cascader/OdsCascader.styled.d.ts +46 -0
- package/dist/components/antd/dropdown/OdsDropdown.d.ts +2 -2
- package/dist/components/antd/steps/OdsSteps.d.ts +8 -1
- package/dist/components/antd/typography/OdsLink.d.ts +5 -2
- package/dist/components/antd/typography/OdsParagraph.d.ts +5 -2
- package/dist/components/antd/typography/OdsTypography.d.ts +7 -0
- package/dist/components/antd/typography/Typography.styled.d.ts +3 -0
- package/dist/components/devextreme/OdsRemoteDataGrid.d.ts +0 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +89 -167
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +87 -166
- package/dist/index.modern.js.map +1 -1
- package/dist/stories/Commons/OdsParagraph/OdsParagraph.stories.d.ts +15 -0
- package/dist/stories/Commons/OdsParagraph/Samples/BasicParagraph.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsParagraph/Samples/BasicTypography.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsRate/OdsRate.stories.d.ts +17 -0
- package/dist/stories/Commons/OdsRate/Samples/AllowHalfWithTooltips.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsRate/Samples/Basic.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsRate/Samples/OtherCharacter.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsRate/Samples/Readonly.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsSpin/OdsSpin.stories.d.ts +9 -0
- package/dist/stories/Commons/OdsSpin/Samples/Basic.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsSteps/OdsSteps.stories.d.ts +20 -0
- package/dist/stories/Commons/OdsSteps/Samples/BasicError.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsSteps/Samples/BasicHorizontal.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsSteps/Samples/BasicVertical.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsSteps/Samples/SwitchStep.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsSteps/Samples/SwitchStepWithDrawer.d.ts +1 -0
- package/dist/stories/Commons/OdsSteps/Samples/SwitchStepWithDrawerSecond.d.ts +1 -0
- package/dist/stories/Commons/OdsSteps/Samples/WithIcon.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsTab/OdsTab.stories.d.ts +16 -0
- package/dist/stories/Commons/OdsTab/Samples/BasicWithDisabled.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsTab/Samples/Indicator.Sample.d.ts +1 -0
- package/dist/stories/Commons/OdsTab/Samples/Slide.Sample.d.ts +1 -0
- package/dist/stories/OdsCascader/OdsCascader.stories.d.ts +17 -0
- package/dist/stories/OdsCascader/Samples/BasicWithDefaultValue.Sample.d.ts +1 -0
- package/dist/stories/OdsCascader/Samples/CustomFieldNames.Sample.d.ts +1 -0
- package/dist/stories/OdsCascader/Samples/MultipleWithDisabled.Sample.d.ts +1 -0
- package/dist/stories/OdsCascader/Samples/Search.Sample.d.ts +1 -0
- package/dist/stories/OdsCollapse/OdsCollapse.stories.d.ts +16 -0
- package/dist/stories/OdsCollapse/Samples/BasicVSAccordion.Sample.d.ts +1 -0
- package/dist/stories/OdsCollapse/Samples/BasicVsCustom.Sample.d.ts +1 -0
- package/dist/stories/OdsCollapse/Samples/NestedCollapse.Sample.d.ts +1 -0
- package/dist/stories/OdsSelect/OdsSelect.stories.d.ts +7 -50
- package/dist/stories/OdsSelect/Samples/BasicWithOptGroup.Sample.d.ts +1 -0
- package/dist/stories/OdsSwitch/OdsSwitch.stories copy.d.ts +16 -0
- package/dist/stories/OdsSwitch/OdsSwitch.stories.d.ts +16 -0
- package/dist/stories/OdsSwitch/Samples/BasicDisabled.Sample.d.ts +1 -0
- package/dist/stories/OdsSwitch/Samples/Checked.Sample.d.ts +1 -0
- package/dist/stories/OdsSwitch/Samples/CheckedChildrenDisplayIcon.Sample.d.ts +1 -0
- package/dist/stories/OdsSwitch/Samples/CheckedChildrenDisplayText.Sample.d.ts +1 -0
- package/dist/stories/OdsSwitch/Samples/CheckedLoading.Sample.d.ts +1 -0
- package/dist/stories/OdsTag/OdsTag.stories.d.ts +9 -1
- package/dist/stories/OdsTag/Samples/Basic.Sample.d.ts +1 -0
- package/dist/stories/OdsTag/Samples/Colorful.Sample.d.ts +1 -0
- package/dist/stories/OdsTag/Samples/Status.Sample.d.ts +1 -0
- package/dist/stories/OdsTitle/OdsTitle.stories.d.ts +5 -5
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledCascader: import("styled-components").StyledComponent<(<OptionType extends import("rc-cascader").DefaultOptionType | import("rc-cascader").BaseOptionType = import("rc-cascader").DefaultOptionType>(props: (Pick<import("rc-cascader").SingleCascaderProps<OptionType>, "defaultValue" | "value" | "onChange" | "placeholder" | "id" | "disabled" | "onFocus" | "onBlur" | "onKeyDown" | "maxLength" | "autoFocus" | "className" | "style" | "tabIndex" | "title" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onKeyUp" | "onClick" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "removeIcon" | "maxTagCount" | "direction" | "prefixCls" | "suffixIcon" | "allowClear" | "clearIcon" | "defaultOpen" | "open" | "getPopupContainer" | "placement" | "builtinPlacements" | "transitionName" | "dropdownClassName" | "popupClassName" | "loading" | "searchValue" | "autoClearSearchValue" | "onSearch" | "showSearch" | "tagRender" | "notFoundContent" | "onClear" | "choiceTransitionName" | "onDropdownVisibleChange" | "getInputElement" | "getRawInputElement" | "maxTagTextLength" | "maxTagPlaceholder" | "animation" | "dropdownStyle" | "dropdownMatchSelectWidth" | "dropdownRender" | "dropdownAlign" | "showAction" | "onPopupScroll" | "onInputKeyDown" | "fieldNames" | "changeOnSelect" | "displayRender" | "showCheckedStrategy" | "expandTrigger" | "dropdownPrefixCls" | "loadData" | "popupVisible" | "dropdownMenuColumnStyle" | "popupPlacement" | "onPopupVisibleChange" | "expandIcon" | "loadingIcon"> & {
|
|
3
|
+
multiple?: false;
|
|
4
|
+
} & {
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
size?: import("antd/es/button").ButtonSize;
|
|
7
|
+
showArrow?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
bordered?: boolean;
|
|
10
|
+
placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
|
|
11
|
+
suffixIcon?: import("react").ReactNode;
|
|
12
|
+
options?: OptionType[];
|
|
13
|
+
status?: "" | "warning" | "error";
|
|
14
|
+
autoClearSearchValue?: boolean;
|
|
15
|
+
rootClassName?: string;
|
|
16
|
+
popupClassName?: string;
|
|
17
|
+
dropdownClassName?: string;
|
|
18
|
+
variant?: "outlined" | "borderless" | "filled";
|
|
19
|
+
} & {
|
|
20
|
+
children?: import("react").ReactNode;
|
|
21
|
+
} & import("react").RefAttributes<import("antd/es/cascader").CascaderRef>) | (Pick<import("rc-cascader").MultipleCascaderProps<OptionType>, "defaultValue" | "value" | "onChange" | "placeholder" | "id" | "disabled" | "onFocus" | "onBlur" | "onKeyDown" | "maxLength" | "autoFocus" | "className" | "style" | "tabIndex" | "title" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onKeyUp" | "onClick" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "removeIcon" | "maxTagCount" | "direction" | "prefixCls" | "suffixIcon" | "allowClear" | "clearIcon" | "defaultOpen" | "open" | "getPopupContainer" | "placement" | "builtinPlacements" | "transitionName" | "dropdownClassName" | "popupClassName" | "loading" | "searchValue" | "autoClearSearchValue" | "onSearch" | "showSearch" | "tagRender" | "notFoundContent" | "onClear" | "choiceTransitionName" | "onDropdownVisibleChange" | "getInputElement" | "getRawInputElement" | "maxTagTextLength" | "maxTagPlaceholder" | "animation" | "dropdownStyle" | "dropdownMatchSelectWidth" | "dropdownRender" | "dropdownAlign" | "showAction" | "onPopupScroll" | "onInputKeyDown" | "fieldNames" | "changeOnSelect" | "displayRender" | "showCheckedStrategy" | "expandTrigger" | "dropdownPrefixCls" | "loadData" | "popupVisible" | "dropdownMenuColumnStyle" | "popupPlacement" | "onPopupVisibleChange" | "expandIcon" | "loadingIcon"> & {
|
|
22
|
+
multiple: true;
|
|
23
|
+
} & {
|
|
24
|
+
multiple?: boolean;
|
|
25
|
+
size?: import("antd/es/button").ButtonSize;
|
|
26
|
+
showArrow?: boolean;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
bordered?: boolean;
|
|
29
|
+
placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
|
|
30
|
+
suffixIcon?: import("react").ReactNode;
|
|
31
|
+
options?: OptionType[];
|
|
32
|
+
status?: "" | "warning" | "error";
|
|
33
|
+
autoClearSearchValue?: boolean;
|
|
34
|
+
rootClassName?: string;
|
|
35
|
+
popupClassName?: string;
|
|
36
|
+
dropdownClassName?: string;
|
|
37
|
+
variant?: "outlined" | "borderless" | "filled";
|
|
38
|
+
} & {
|
|
39
|
+
children?: import("react").ReactNode;
|
|
40
|
+
} & import("react").RefAttributes<import("antd/es/cascader").CascaderRef>)) => import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any>) | (new (props: any) => import("react").Component<any, any, any>)>) & {
|
|
41
|
+
displayName: string;
|
|
42
|
+
SHOW_PARENT: "SHOW_PARENT";
|
|
43
|
+
SHOW_CHILD: "SHOW_CHILD";
|
|
44
|
+
Panel: import("react").FC<Pick<import("antd").CascaderProps<any>, import("antd/es/cascader/Panel").PanelPickType>>;
|
|
45
|
+
_InternalPanelDoNotUseOrYouWillBeFired: (props: Record<string | number | symbol, any>) => import("react").JSX.Element;
|
|
46
|
+
}, any, {}, never>;
|
|
@@ -3,5 +3,5 @@ import React from "react";
|
|
|
3
3
|
export interface IDropDownProps extends DropDownProps {
|
|
4
4
|
menuItems?: any[];
|
|
5
5
|
}
|
|
6
|
-
declare function
|
|
7
|
-
export default
|
|
6
|
+
declare function OdsDropdown(props: IDropDownProps): React.JSX.Element;
|
|
7
|
+
export default OdsDropdown;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import { StepProps, StepsProps } from "antd";
|
|
3
|
+
export interface IStepsProps extends StepsProps {
|
|
4
|
+
items?: IStepProps[];
|
|
5
|
+
}
|
|
6
|
+
interface IStepProps extends StepProps {
|
|
7
|
+
content: any;
|
|
8
|
+
}
|
|
9
|
+
declare const OdsSteps: (props: IStepsProps) => React.JSX.Element;
|
|
3
10
|
export default OdsSteps;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { TypographyProps } from "antd";
|
|
2
1
|
import React from "react";
|
|
3
|
-
|
|
2
|
+
import { StyledtTypographyLink } from "./Typography.styled";
|
|
3
|
+
interface StyledOdsLinkProps extends React.ComponentProps<typeof StyledtTypographyLink> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const OdsLink: React.FC<StyledOdsLinkProps>;
|
|
4
7
|
export default OdsLink;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { TypographyProps } from 'antd';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
|
|
2
|
+
import { StyledtTypographyParagraph } from './Typography.styled';
|
|
3
|
+
export interface StyledOdsParagraphProps extends React.ComponentProps<typeof StyledtTypographyParagraph> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const OdsParagraph: (props: StyledOdsParagraphProps) => React.JSX.Element;
|
|
4
7
|
export default OdsParagraph;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyledtTypography } from './Typography.styled';
|
|
3
|
+
export interface StyledOdsTypographyProps extends React.ComponentProps<typeof StyledtTypography> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const OdsTypography: (props: StyledOdsTypographyProps) => React.JSX.Element;
|
|
7
|
+
export default OdsTypography;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const StyledtTypography: import("styled-components").StyledComponent<import("antd").TypographyProps, any, {}, never>;
|
|
3
|
+
export declare const StyledtTypographyParagraph: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/typography/Paragraph").ParagraphProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
4
|
+
export declare const StyledtTypographyLink: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/typography/Link").LinkProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { IDataGridOptions, IButtonProps, ISelectionProps, IEditingProps, ISummaryProps } from 'devextreme-react/data-grid';
|
|
3
3
|
import { ButtonType } from 'antd/es/button/buttonHelpers';
|
|
4
4
|
export interface IOdsDataGridProps extends IDataGridOptions {
|
|
5
|
-
ref?: any;
|
|
6
5
|
dataGridPageName?: string;
|
|
7
6
|
language: string;
|
|
8
7
|
exportFileName: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ import DxTreeList from "./components/devextreme/treeview/DxTreeList";
|
|
|
47
47
|
import OdsRemoteDataGrid from "./components/devextreme/OdsRemoteDataGrid";
|
|
48
48
|
import OdsBadge from "./components/antd/badge/OdsBadge";
|
|
49
49
|
import OdsBadgeRibbon from "./components/antd/badge/OdsBadgeRibbon";
|
|
50
|
+
import OdsAdvanceModal from "./components/antd/modal/OdsAdvanceModal";
|
|
50
51
|
export { OdsButton };
|
|
51
52
|
export { OdsInput };
|
|
52
53
|
export { OdsDropdownButton };
|
|
@@ -93,6 +94,7 @@ export { OdsBannerAlert };
|
|
|
93
94
|
export { OdsMultiSelect };
|
|
94
95
|
export { OdsBadge };
|
|
95
96
|
export { OdsBadgeRibbon };
|
|
97
|
+
export { OdsAdvanceModal };
|
|
96
98
|
export { OdsDataGrid };
|
|
97
99
|
export { OdsDisplayGrid };
|
|
98
100
|
export { OdsRemoteDataGrid };
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,18 @@ function _extends() {
|
|
|
38
38
|
};
|
|
39
39
|
return _extends.apply(this, arguments);
|
|
40
40
|
}
|
|
41
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
42
|
+
if (source == null) return {};
|
|
43
|
+
var target = {};
|
|
44
|
+
var sourceKeys = Object.keys(source);
|
|
45
|
+
var key, i;
|
|
46
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
47
|
+
key = sourceKeys[i];
|
|
48
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
49
|
+
target[key] = source[key];
|
|
50
|
+
}
|
|
51
|
+
return target;
|
|
52
|
+
}
|
|
41
53
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
42
54
|
if (!raw) {
|
|
43
55
|
raw = strings.slice(0);
|
|
@@ -503,7 +515,7 @@ var StyledDropdown = styled__default(antd.Dropdown)(_templateObject$8 || (_templ
|
|
|
503
515
|
var handleMenuClick = function handleMenuClick(e) {
|
|
504
516
|
console.log('click', e);
|
|
505
517
|
};
|
|
506
|
-
function
|
|
518
|
+
function OdsDropdown(props) {
|
|
507
519
|
var menuProps = {
|
|
508
520
|
items: props.menuItems,
|
|
509
521
|
onClick: handleMenuClick
|
|
@@ -981,7 +993,6 @@ var StyledSpin = styled__default(antd.Spin)(_templateObject$f || (_templateObjec
|
|
|
981
993
|
function OdsSpin(props) {
|
|
982
994
|
var _useState = React.useState(true),
|
|
983
995
|
loading = _useState[0];
|
|
984
|
-
props.size = "default";
|
|
985
996
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledSpin, Object.assign({}, props, {
|
|
986
997
|
spinning: loading
|
|
987
998
|
}), props.children));
|
|
@@ -999,41 +1010,10 @@ function OdsSwitch(props) {
|
|
|
999
1010
|
var _templateObject$h;
|
|
1000
1011
|
var StyledTabs = styled__default(antd.Tabs)(_templateObject$h || (_templateObject$h = _taggedTemplateLiteralLoose(["\n //\n"])));
|
|
1001
1012
|
|
|
1002
|
-
var onChange = function onChange(key) {
|
|
1003
|
-
console.log(key);
|
|
1004
|
-
};
|
|
1005
|
-
var items = [{
|
|
1006
|
-
key: '1',
|
|
1007
|
-
label: "Tab 1",
|
|
1008
|
-
children: "Content of Tab Pane 1",
|
|
1009
|
-
disabled: true
|
|
1010
|
-
}, {
|
|
1011
|
-
key: '2',
|
|
1012
|
-
label: "Tab 2",
|
|
1013
|
-
children: "Content of Tab Pane 2"
|
|
1014
|
-
}, {
|
|
1015
|
-
key: '3',
|
|
1016
|
-
label: "Tab 3",
|
|
1017
|
-
children: "Content of Tab Pane 3"
|
|
1018
|
-
}];
|
|
1019
1013
|
function OdsTab(props) {
|
|
1020
|
-
var _useState = React.useState(),
|
|
1021
|
-
size = _useState[0],
|
|
1022
|
-
setSize = _useState[1];
|
|
1023
|
-
var _useState2 = React.useState(),
|
|
1024
|
-
tabPosition = _useState2[0],
|
|
1025
|
-
setTabPosition = _useState2[1];
|
|
1026
|
-
setTabPosition("top");
|
|
1027
|
-
setSize("middle");
|
|
1028
1014
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(styled.ThemeProvider, {
|
|
1029
1015
|
theme: lightTheme
|
|
1030
|
-
}, React__default.createElement(StyledTabs, Object.assign({}, props
|
|
1031
|
-
tabPosition: tabPosition,
|
|
1032
|
-
size: size,
|
|
1033
|
-
defaultActiveKey: "1",
|
|
1034
|
-
items: items,
|
|
1035
|
-
onChange: onChange
|
|
1036
|
-
}), props.children)));
|
|
1016
|
+
}, React__default.createElement(StyledTabs, Object.assign({}, props))));
|
|
1037
1017
|
}
|
|
1038
1018
|
|
|
1039
1019
|
var _templateObject$i;
|
|
@@ -1102,21 +1082,27 @@ var OdsTimepicker = function OdsTimepicker(props) {
|
|
|
1102
1082
|
}));
|
|
1103
1083
|
};
|
|
1104
1084
|
|
|
1105
|
-
var _templateObject$m;
|
|
1085
|
+
var _templateObject$m, _templateObject2, _templateObject3;
|
|
1106
1086
|
var StyledtTypography = styled__default(antd.Typography)(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n //\n"])));
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1087
|
+
var StyledtTypographyParagraph = styled__default(antd.Typography.Paragraph)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n //\n"])));
|
|
1088
|
+
var StyledtTypographyLink = styled__default(antd.Typography.Link)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n // \n"])));
|
|
1089
|
+
|
|
1090
|
+
var _excluded = ["children"];
|
|
1091
|
+
var StyledOdsLink = function StyledOdsLink(_ref) {
|
|
1092
|
+
var children = _ref.children,
|
|
1093
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1094
|
+
return React__default.createElement(StyledtTypographyLink, Object.assign({}, props), children);
|
|
1095
|
+
};
|
|
1111
1096
|
var OdsLink = function OdsLink(props) {
|
|
1112
1097
|
return React__default.createElement(StyledOdsLink, Object.assign({}, props));
|
|
1113
1098
|
};
|
|
1114
1099
|
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
}
|
|
1100
|
+
var _excluded$1 = ["children"];
|
|
1101
|
+
var StyledOdsParagraph = function StyledOdsParagraph(_ref) {
|
|
1102
|
+
var children = _ref.children,
|
|
1103
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
1104
|
+
return React__default.createElement(StyledtTypographyParagraph, Object.assign({}, props), children);
|
|
1105
|
+
};
|
|
1120
1106
|
var OdsParagraph = function OdsParagraph(props) {
|
|
1121
1107
|
return React__default.createElement(StyledOdsParagraph, Object.assign({}, props));
|
|
1122
1108
|
};
|
|
@@ -16304,73 +16290,6 @@ function debounce(func, wait, options) {
|
|
|
16304
16290
|
|
|
16305
16291
|
var debounce_1 = debounce;
|
|
16306
16292
|
|
|
16307
|
-
/** Error message constants. */
|
|
16308
|
-
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
16309
|
-
|
|
16310
|
-
/**
|
|
16311
|
-
* Creates a throttled function that only invokes `func` at most once per
|
|
16312
|
-
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
|
16313
|
-
* method to cancel delayed `func` invocations and a `flush` method to
|
|
16314
|
-
* immediately invoke them. Provide `options` to indicate whether `func`
|
|
16315
|
-
* should be invoked on the leading and/or trailing edge of the `wait`
|
|
16316
|
-
* timeout. The `func` is invoked with the last arguments provided to the
|
|
16317
|
-
* throttled function. Subsequent calls to the throttled function return the
|
|
16318
|
-
* result of the last `func` invocation.
|
|
16319
|
-
*
|
|
16320
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
16321
|
-
* invoked on the trailing edge of the timeout only if the throttled function
|
|
16322
|
-
* is invoked more than once during the `wait` timeout.
|
|
16323
|
-
*
|
|
16324
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
16325
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
16326
|
-
*
|
|
16327
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
16328
|
-
* for details over the differences between `_.throttle` and `_.debounce`.
|
|
16329
|
-
*
|
|
16330
|
-
* @static
|
|
16331
|
-
* @memberOf _
|
|
16332
|
-
* @since 0.1.0
|
|
16333
|
-
* @category Function
|
|
16334
|
-
* @param {Function} func The function to throttle.
|
|
16335
|
-
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
|
16336
|
-
* @param {Object} [options={}] The options object.
|
|
16337
|
-
* @param {boolean} [options.leading=true]
|
|
16338
|
-
* Specify invoking on the leading edge of the timeout.
|
|
16339
|
-
* @param {boolean} [options.trailing=true]
|
|
16340
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
16341
|
-
* @returns {Function} Returns the new throttled function.
|
|
16342
|
-
* @example
|
|
16343
|
-
*
|
|
16344
|
-
* // Avoid excessively updating the position while scrolling.
|
|
16345
|
-
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
|
16346
|
-
*
|
|
16347
|
-
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
|
16348
|
-
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
|
16349
|
-
* jQuery(element).on('click', throttled);
|
|
16350
|
-
*
|
|
16351
|
-
* // Cancel the trailing throttled invocation.
|
|
16352
|
-
* jQuery(window).on('popstate', throttled.cancel);
|
|
16353
|
-
*/
|
|
16354
|
-
function throttle(func, wait, options) {
|
|
16355
|
-
var leading = true,
|
|
16356
|
-
trailing = true;
|
|
16357
|
-
|
|
16358
|
-
if (typeof func != 'function') {
|
|
16359
|
-
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
16360
|
-
}
|
|
16361
|
-
if (isObject_1(options)) {
|
|
16362
|
-
leading = 'leading' in options ? !!options.leading : leading;
|
|
16363
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
16364
|
-
}
|
|
16365
|
-
return debounce_1(func, wait, {
|
|
16366
|
-
'leading': leading,
|
|
16367
|
-
'maxWait': wait,
|
|
16368
|
-
'trailing': trailing
|
|
16369
|
-
});
|
|
16370
|
-
}
|
|
16371
|
-
|
|
16372
|
-
var throttle_1 = throttle;
|
|
16373
|
-
|
|
16374
16293
|
var iconComponents = {
|
|
16375
16294
|
edit: outline.EditIcon,
|
|
16376
16295
|
"delete": outline.Trash1Icon,
|
|
@@ -16400,20 +16319,13 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16400
16319
|
var _useState = React.useState([]),
|
|
16401
16320
|
data = _useState[0],
|
|
16402
16321
|
setData = _useState[1];
|
|
16403
|
-
var _useState2 = React.useState(false),
|
|
16404
|
-
isLoading = _useState2[0],
|
|
16405
|
-
setIsLoading = _useState2[1];
|
|
16406
16322
|
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
16407
|
-
var
|
|
16408
|
-
filteredRowCount =
|
|
16409
|
-
setFilteredRowCount =
|
|
16410
|
-
var
|
|
16411
|
-
columns = _useState4[0],
|
|
16412
|
-
setColumns = _useState4[1];
|
|
16323
|
+
var _useState2 = React.useState(0),
|
|
16324
|
+
filteredRowCount = _useState2[0],
|
|
16325
|
+
setFilteredRowCount = _useState2[1];
|
|
16326
|
+
var columns = React.useRef(props.columns);
|
|
16413
16327
|
var gridRef = React.useRef(null);
|
|
16414
|
-
var
|
|
16415
|
-
filterApplied = _useState5[0],
|
|
16416
|
-
setFilterApplied = _useState5[1];
|
|
16328
|
+
var filterApplied = React.useRef(false);
|
|
16417
16329
|
var onCancelEditEvent = new CustomEvent('cancelEdit', {
|
|
16418
16330
|
bubbles: true,
|
|
16419
16331
|
detail: {
|
|
@@ -16441,13 +16353,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16441
16353
|
}
|
|
16442
16354
|
}, [(_props$axiosRequest2 = props.axiosRequest) === null || _props$axiosRequest2 === void 0 ? void 0 : _props$axiosRequest2.requestData]);
|
|
16443
16355
|
React.useEffect(function () {
|
|
16444
|
-
if (
|
|
16445
|
-
|
|
16446
|
-
}
|
|
16447
|
-
}, [props.ref]);
|
|
16448
|
-
React.useEffect(function () {
|
|
16449
|
-
if (columns !== undefined && columns.length > 0) {
|
|
16450
|
-
var newColumns = columns.map(function (colItem) {
|
|
16356
|
+
if (columns.current !== undefined && columns.current.length > 0) {
|
|
16357
|
+
var newColumns = columns.current.map(function (colItem) {
|
|
16451
16358
|
if (colItem.tooltip !== undefined && colItem.tooltip.enable) {
|
|
16452
16359
|
var headerCellRenderr = function headerCellRenderr() {
|
|
16453
16360
|
return React__default.createElement("div", null, React__default.createElement("span", null, colItem.caption), React__default.createElement(antd.Tooltip, {
|
|
@@ -16462,7 +16369,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16462
16369
|
}
|
|
16463
16370
|
return colItem;
|
|
16464
16371
|
});
|
|
16465
|
-
|
|
16372
|
+
columns.current = newColumns;
|
|
16466
16373
|
}
|
|
16467
16374
|
}, [props.columns]);
|
|
16468
16375
|
React.useEffect(function () {
|
|
@@ -16502,7 +16409,6 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16502
16409
|
var fetchData = React.useCallback(function () {
|
|
16503
16410
|
try {
|
|
16504
16411
|
if (props.axiosRequest == undefined) return Promise.resolve();
|
|
16505
|
-
setIsLoading(true);
|
|
16506
16412
|
var _temp2 = function () {
|
|
16507
16413
|
if (props.isServerSide) {
|
|
16508
16414
|
var apiUrl = props.axiosRequest.environmentUrl + "" + props.axiosRequest.apiUrl;
|
|
@@ -16574,30 +16480,20 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16574
16480
|
}, [props.isServerSide]);
|
|
16575
16481
|
var getServerSide = React.useCallback(function (type) {
|
|
16576
16482
|
try {
|
|
16577
|
-
|
|
16578
|
-
|
|
16579
|
-
return
|
|
16580
|
-
if (
|
|
16581
|
-
|
|
16582
|
-
|
|
16583
|
-
loadedPageCount = loadedPageCount + 1;
|
|
16584
|
-
return Promise.resolve(fetchData()).then(function () {});
|
|
16585
|
-
}
|
|
16586
|
-
}();
|
|
16483
|
+
return Promise.resolve(function () {
|
|
16484
|
+
if (type === "reachedBottom") {
|
|
16485
|
+
return function () {
|
|
16486
|
+
if (totalPageCount <= loadedPageCount) {} else {
|
|
16487
|
+
loadedPageCount = loadedPageCount + 1;
|
|
16488
|
+
return Promise.resolve(fetchData()).then(function () {});
|
|
16587
16489
|
}
|
|
16588
|
-
}()
|
|
16589
|
-
} catch (e) {
|
|
16590
|
-
return Promise.reject(e);
|
|
16490
|
+
}();
|
|
16591
16491
|
}
|
|
16592
|
-
}
|
|
16593
|
-
trailing: false
|
|
16594
|
-
});
|
|
16595
|
-
run(type);
|
|
16596
|
-
return Promise.resolve();
|
|
16492
|
+
}());
|
|
16597
16493
|
} catch (e) {
|
|
16598
16494
|
return Promise.reject(e);
|
|
16599
16495
|
}
|
|
16600
|
-
}, [totalPageCount
|
|
16496
|
+
}, [totalPageCount]);
|
|
16601
16497
|
var onExporting = React.useCallback(function (e) {
|
|
16602
16498
|
if (e.format === 'xlsx') {
|
|
16603
16499
|
var workbook = new exceljs.Workbook();
|
|
@@ -16701,9 +16597,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16701
16597
|
result = result + " - " + props.customSummary.summaryTotalPageCountLabel + " " + loadedPageCount + " / " + totalPageCount;
|
|
16702
16598
|
}
|
|
16703
16599
|
return result;
|
|
16704
|
-
}, [data, filteredRowCount, loadedPageCount, props.pageSize, totalRecordCount, filterApplied]);
|
|
16600
|
+
}, [data, filteredRowCount, loadedPageCount, props.pageSize, totalRecordCount, filterApplied.current]);
|
|
16705
16601
|
var concatFilteredLabel = function concatFilteredLabel(result, totalloaded) {
|
|
16706
|
-
if (filteredRowCount > 0 && totalloaded !== filteredRowCount && filterApplied) {
|
|
16602
|
+
if (filteredRowCount > 0 && totalloaded !== filteredRowCount && filterApplied.current) {
|
|
16707
16603
|
var filteredLabel = filteredRowCount + " " + props.customSummary.summaryFilteredDataLabel + "- ";
|
|
16708
16604
|
result = filteredLabel + " " + result + " ";
|
|
16709
16605
|
}
|
|
@@ -16753,10 +16649,13 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16753
16649
|
var handleContentReady = function handleContentReady(e) {
|
|
16754
16650
|
var dataGridInstance = e.component;
|
|
16755
16651
|
var filteredDataCount = dataGridInstance.totalCount();
|
|
16756
|
-
setFilteredRowCount(filteredDataCount);
|
|
16652
|
+
if (filterApplied.current && filteredDataCount > 0) setFilteredRowCount(filteredDataCount);
|
|
16757
16653
|
};
|
|
16758
16654
|
var onFilterValueChange = function onFilterValueChange(e) {
|
|
16759
|
-
if (e !== null)
|
|
16655
|
+
if (e !== null) filterApplied.current = true;else {
|
|
16656
|
+
filterApplied.current = false;
|
|
16657
|
+
setFilteredRowCount(0);
|
|
16658
|
+
}
|
|
16760
16659
|
};
|
|
16761
16660
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(DataGrid__default, {
|
|
16762
16661
|
keyExpr: props.keyExpr,
|
|
@@ -16794,7 +16693,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16794
16693
|
onEditCanceling: props.onEditCanceling,
|
|
16795
16694
|
onContentReady: handleContentReady,
|
|
16796
16695
|
onFilterValueChange: onFilterValueChange
|
|
16797
|
-
}, columns.map(function (col) {
|
|
16696
|
+
}, columns.current.map(function (col) {
|
|
16798
16697
|
return React__default.createElement(DataGrid.Column, Object.assign({
|
|
16799
16698
|
key: col.dataField
|
|
16800
16699
|
}, col, {
|
|
@@ -16821,8 +16720,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16821
16720
|
caption: props.actionButtonGroupCaption,
|
|
16822
16721
|
type: "buttons",
|
|
16823
16722
|
showInColumnChooser: false
|
|
16824
|
-
}, !props.edit && actionButtons.map(function (buttonItem) {
|
|
16723
|
+
}, !props.edit && actionButtons.map(function (buttonItem, index) {
|
|
16825
16724
|
return React__default.createElement(DataGrid.Button, {
|
|
16725
|
+
key: "action-button-" + index,
|
|
16826
16726
|
hint: buttonItem.hint,
|
|
16827
16727
|
visible: buttonItem.visible,
|
|
16828
16728
|
disabled: buttonItem.actionPermission == undefined ? false : !buttonItem.actionPermission,
|
|
@@ -16831,8 +16731,10 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16831
16731
|
})),
|
|
16832
16732
|
onClick: buttonItem.onClick
|
|
16833
16733
|
});
|
|
16834
|
-
}), props.edit && actionButtons.map(function (buttonItem) {
|
|
16835
|
-
return React__default.createElement(DataGrid.Button, Object.assign({
|
|
16734
|
+
}), props.edit && actionButtons.map(function (buttonItem, index) {
|
|
16735
|
+
return React__default.createElement(DataGrid.Button, Object.assign({
|
|
16736
|
+
key: "action-button-" + index
|
|
16737
|
+
}, buttonItem));
|
|
16836
16738
|
})), kebabMenuButtons.length > 0 && React__default.createElement(DataGrid.Column, {
|
|
16837
16739
|
dataField: "Actionss",
|
|
16838
16740
|
fixed: true,
|
|
@@ -16879,7 +16781,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16879
16781
|
scrollByThumb: true,
|
|
16880
16782
|
mode: "infinite"
|
|
16881
16783
|
}), React__default.createElement(DataGrid.LoadPanel, {
|
|
16882
|
-
enabled:
|
|
16784
|
+
enabled: true,
|
|
16883
16785
|
shadingColor: "rgba(0,0,0,0.4)"
|
|
16884
16786
|
}), React__default.createElement(DataGrid.SearchPanel, {
|
|
16885
16787
|
visible: true
|
|
@@ -16925,8 +16827,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16925
16827
|
alignSelf: "stretch",
|
|
16926
16828
|
margin: 0
|
|
16927
16829
|
}
|
|
16928
|
-
}, props.pageTitle)), props.toolbarButtonGroup && Array.isArray(props.toolbarButtonGroup) && props.toolbarButtonGroup.map(function (buttonGroupItem) {
|
|
16830
|
+
}, props.pageTitle)), props.toolbarButtonGroup && Array.isArray(props.toolbarButtonGroup) && props.toolbarButtonGroup.map(function (buttonGroupItem, index) {
|
|
16929
16831
|
return React__default.createElement(DataGrid.Item, {
|
|
16832
|
+
key: "toolbar-button-" + index,
|
|
16930
16833
|
location: "before"
|
|
16931
16834
|
}, React__default.createElement(OdsButton, {
|
|
16932
16835
|
style: {
|
|
@@ -16943,11 +16846,12 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16943
16846
|
}), React__default.createElement(DataGrid.Item, {
|
|
16944
16847
|
name: "exportButton",
|
|
16945
16848
|
cssClass: 'toolbarPanelItems'
|
|
16946
|
-
})), React__default.createElement(DataGrid.Summary,
|
|
16947
|
-
|
|
16849
|
+
})), React__default.createElement(DataGrid.Summary, {
|
|
16850
|
+
calculateCustomSummary: renderTotal
|
|
16851
|
+
}, React__default.createElement(DataGrid.TotalItem, {
|
|
16852
|
+
column: columns.current[0].dataField,
|
|
16948
16853
|
summaryType: "custom",
|
|
16949
|
-
displayFormat:
|
|
16950
|
-
customizeText: renderTotal
|
|
16854
|
+
displayFormat: renderTotal()
|
|
16951
16855
|
})), React__default.createElement(DataGrid.StateStoring, {
|
|
16952
16856
|
enabled: true,
|
|
16953
16857
|
type: "custom",
|
|
@@ -16971,7 +16875,25 @@ function OdsBadgeRibbon(props) {
|
|
|
16971
16875
|
}, React__default.createElement(StyledBadge.Ribbon, Object.assign({}, props), props.children)));
|
|
16972
16876
|
}
|
|
16973
16877
|
|
|
16878
|
+
var _excluded$2 = ["content"];
|
|
16879
|
+
var OdsAdvanceModal = function OdsAdvanceModal(_ref) {
|
|
16880
|
+
var content = _ref.content,
|
|
16881
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
16882
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(antd.Modal, Object.assign({}, props, {
|
|
16883
|
+
open: props.open,
|
|
16884
|
+
onOk: props.onOk,
|
|
16885
|
+
onCancel: props.onCancel
|
|
16886
|
+
}), content), React__default.createElement(styled.ThemeProvider, {
|
|
16887
|
+
theme: lightTheme
|
|
16888
|
+
}, React__default.createElement(antd.Modal, Object.assign({}, props, {
|
|
16889
|
+
open: props.open,
|
|
16890
|
+
onOk: props.onOk,
|
|
16891
|
+
onCancel: props.onCancel
|
|
16892
|
+
}), content)));
|
|
16893
|
+
};
|
|
16894
|
+
|
|
16974
16895
|
exports.DxTreeList = DxTreeList;
|
|
16896
|
+
exports.OdsAdvanceModal = OdsAdvanceModal;
|
|
16975
16897
|
exports.OdsAlert = OdsAlert;
|
|
16976
16898
|
exports.OdsAutoComplete = OdsAutoComplete;
|
|
16977
16899
|
exports.OdsBadge = OdsBadge;
|
|
@@ -16983,13 +16905,13 @@ exports.OdsCalendar = OdsCalendar;
|
|
|
16983
16905
|
exports.OdsCard = OdsCard;
|
|
16984
16906
|
exports.OdsCheckbox = OdsCheckbox;
|
|
16985
16907
|
exports.OdsCheckboxGroup = OdsCheckboxGroup;
|
|
16986
|
-
exports.OdsCollapse =
|
|
16908
|
+
exports.OdsCollapse = OdsDropdown;
|
|
16987
16909
|
exports.OdsDataGrid = OdsDataGrid;
|
|
16988
16910
|
exports.OdsDateRangePicker = OdsDateRangePicker;
|
|
16989
16911
|
exports.OdsDatepicker = OdsDatepicker;
|
|
16990
16912
|
exports.OdsDisplayGrid = OdsDisplayGrid;
|
|
16991
16913
|
exports.OdsDivider = OdsDivider;
|
|
16992
|
-
exports.OdsDropdown =
|
|
16914
|
+
exports.OdsDropdown = OdsDropdown;
|
|
16993
16915
|
exports.OdsDropdownButton = OdsDropdownButton;
|
|
16994
16916
|
exports.OdsImage = OdsImage;
|
|
16995
16917
|
exports.OdsInput = OdsInput;
|