@pinnacle0/web-ui 0.5.0-beta.8 → 0.5.0
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/admin/AdminApp/Default/NavigatorSide/index.d.ts +1 -1
- package/admin/AdminApp/Default/NavigatorSide/index.less +4 -1
- package/admin/AdminApp/Default/SoundSwitch.d.ts +1 -1
- package/admin/AdminApp/Default/SquareLogo/index.d.ts +1 -1
- package/admin/AdminApp/Menu.d.ts +2 -2
- package/admin/AdminApp/Navigator.d.ts +2 -2
- package/admin/AdminApp/NotFound.d.ts +1 -1
- package/admin/AdminApp/RouteSwitch.d.ts +2 -2
- package/admin/AdminApp/WithErrorBoundary.d.ts +1 -1
- package/admin/AdminApp/index.d.ts +1 -1
- package/admin/AdminPage/Filter.d.ts +1 -1
- package/admin/AdminPage/Filter.js +1 -1
- package/admin/AdminPage/Result.d.ts +2 -2
- package/admin/AdminPage/SaveBar.d.ts +1 -1
- package/admin/AdminPage/Summary.d.ts +1 -1
- package/admin/AdminPage/TopBar.d.ts +1 -1
- package/admin/AdminPage/index.d.ts +1 -1
- package/admin/AdminPermissionSelector.d.ts +5 -5
- package/admin/AdminPermissionSelector.js +4 -4
- package/admin/AdminPermissionSelector.js.map +1 -1
- package/core/Amount/AmountPercentage.d.ts +1 -1
- package/core/Amount/index.d.ts +1 -1
- package/core/AmountConditionInput.d.ts +1 -1
- package/core/AmountConditionInput.js +2 -2
- package/core/AmountConditionInput.js.map +1 -1
- package/core/AmountRangeInput.d.ts +1 -2
- package/core/AmountRangeInput.js +3 -3
- package/core/AmountRangeInput.js.map +1 -1
- package/core/{AuthenticationCodeInput.d.ts → AuthenticationCodeInput/index.d.ts} +4 -3
- package/core/{AuthenticationCodeInput.js → AuthenticationCodeInput/index.js} +8 -7
- package/core/AuthenticationCodeInput/index.js.map +1 -0
- package/core/AuthenticationCodeInput/index.less +5 -0
- package/core/AutoCompleteInput.d.ts +1 -1
- package/core/Badge.d.ts +2 -2
- package/core/BoolRadio.d.ts +3 -1
- package/core/BoolRadio.js +3 -3
- package/core/BoolRadio.js.map +1 -1
- package/core/BoolSelect.d.ts +1 -1
- package/core/BoolSwitch.d.ts +4 -4
- package/core/Breadcrumb/index.d.ts +1 -1
- package/core/Button.d.ts +2 -2
- package/core/Card.d.ts +1 -1
- package/core/Carousel.d.ts +1 -1
- package/core/Carousel3D/index.d.ts +1 -1
- package/core/Cascader/InitialNullable.d.ts +1 -1
- package/core/Cascader/Nullable.d.ts +1 -1
- package/core/Cascader/index.d.ts +3 -2
- package/core/Cascader/index.js +9 -3
- package/core/Cascader/index.js.map +1 -1
- package/core/Cascader/index.less +12 -0
- package/core/Checkbox.d.ts +1 -1
- package/core/Collapse.d.ts +1 -1
- package/core/ConfigProvider.d.ts +2 -0
- package/core/ConfigProvider.js +2 -0
- package/core/ConfigProvider.js.map +1 -0
- package/core/Countdown/SlidingDigit.d.ts +1 -1
- package/core/Countdown/index.d.ts +1 -1
- package/core/DateCalendar.d.ts +1 -1
- package/core/DatePicker.d.ts +1 -1
- package/core/DateRangePicker.d.ts +1 -1
- package/core/DateTimePicker.d.ts +1 -1
- package/core/DateTimeRangePicker/index.d.ts +1 -1
- package/core/Descriptions/index.d.ts +2 -2
- package/core/Drawer.d.ts +1 -1
- package/core/EnumCheckboxGroup/Map.d.ts +1 -1
- package/core/EnumCheckboxGroup/index.d.ts +1 -1
- package/core/EnumRadio/InitialNullable.d.ts +1 -1
- package/core/EnumRadio/Map.d.ts +1 -1
- package/core/EnumRadio/Nullable.d.ts +1 -1
- package/core/EnumRadio/index.d.ts +3 -1
- package/core/EnumRadio/index.js +2 -2
- package/core/EnumRadio/index.js.map +1 -1
- package/core/EnumSelect/InitialNullable.d.ts +1 -1
- package/core/EnumSelect/Map.d.ts +1 -1
- package/core/EnumSelect/Nullable.d.ts +1 -1
- package/core/EnumSelect/index.d.ts +2 -1
- package/core/EnumSelect/index.js +14 -3
- package/core/EnumSelect/index.js.map +1 -1
- package/core/EnumSelect/index.less +10 -0
- package/core/FlatList/Content/Footer/index.d.ts +2 -2
- package/core/FlatList/Content/index.d.ts +2 -2
- package/core/FlatList/FloatingLoader/index.d.ts +2 -2
- package/core/FlatList/index.d.ts +2 -2
- package/core/FlatList/shared/Loader/index.d.ts +2 -2
- package/core/Foldable/index.d.ts +1 -1
- package/core/Form/Item.d.ts +1 -1
- package/core/Form/index.d.ts +3 -2
- package/core/Form/index.js +2 -2
- package/core/Form/index.js.map +1 -1
- package/core/Form/index.less +16 -7
- package/core/HTMLContent/index.d.ts +1 -1
- package/core/Image.d.ts +1 -1
- package/core/ImageUploader/index.d.ts +2 -2
- package/core/Input.d.ts +7 -10
- package/core/Input.js +0 -1
- package/core/Input.js.map +1 -1
- package/core/LabelledSelect.d.ts +1 -1
- package/core/Link.d.ts +1 -1
- package/core/LocalImporter.d.ts +1 -1
- package/core/LocaleProvider.d.ts +1 -1
- package/core/LocaleSelect.d.ts +1 -1
- package/core/Markdown/index.d.ts +3 -3
- package/core/Modal/index.d.ts +1 -1
- package/core/MultipleCascader/index.d.ts +1 -1
- package/core/MultipleEnumSelect.d.ts +1 -1
- package/core/MultipleSelector/TablePopover.d.ts +1 -1
- package/core/MultipleSelector/index.d.ts +4 -4
- package/core/MutableTable/index.d.ts +1 -1
- package/core/MutableTable/index.js +1 -1
- package/core/MutableTable/index.js.map +1 -1
- package/core/MutableTable/index.less +3 -1
- package/core/NumberInput/NumberInputPercentage.d.ts +1 -1
- package/core/NumberInput/index.d.ts +4 -4
- package/core/NumberInput/index.js +8 -5
- package/core/NumberInput/index.js.map +1 -1
- package/core/NumberInput/index.less +8 -110
- package/core/OverflowableText/index.d.ts +1 -1
- package/core/PagedList/index.d.ts +1 -1
- package/core/Pagination/index.d.ts +2 -2
- package/core/Popover/index.d.ts +1 -1
- package/core/Progress/index.d.ts +1 -1
- package/core/Progress.d.ts +1 -1
- package/core/Radio.d.ts +1 -1
- package/core/Resizable/Resizer.d.ts +2 -2
- package/core/SearchableSelect.d.ts +1 -1
- package/core/Select.d.ts +1 -1
- package/core/SignedAmountInput.d.ts +1 -1
- package/core/SignedAmountInput.js +2 -2
- package/core/SignedAmountInput.js.map +1 -1
- package/core/Skeleton.d.ts +1 -1
- package/core/Skeleton.js +14 -1
- package/core/Skeleton.js.map +1 -1
- package/core/Slider/RangeSlider.d.ts +1 -1
- package/core/Slider/index.d.ts +1 -1
- package/core/Space.d.ts +2 -1
- package/core/Space.js +1 -0
- package/core/Space.js.map +1 -1
- package/core/Spin.d.ts +1 -1
- package/core/StepFormContainer/index.d.ts +2 -2
- package/core/StepFormContainer/index.js +2 -2
- package/core/StepFormContainer/index.js.map +1 -1
- package/core/Steps.d.ts +1 -1
- package/core/StyleProvider.d.ts +1 -1
- package/core/Table.d.ts +2 -2
- package/core/Tabs/Single.d.ts +1 -1
- package/core/Tabs/index.d.ts +1 -1
- package/core/Tag.d.ts +1 -1
- package/core/TagInput/index.d.ts +1 -1
- package/core/Tags.d.ts +2 -2
- package/core/TimePicker.d.ts +1 -1
- package/core/TimeRangePicker.d.ts +1 -1
- package/core/Tooltip.d.ts +1 -1
- package/core/TypedTabs/index.d.ts +1 -1
- package/core/Uploader.d.ts +1 -1
- package/core/VerticalMarquee/index.d.ts +1 -1
- package/core/VirtualList/index.d.ts +1 -1
- package/core/VirtualTable/TableHeader.d.ts +1 -1
- package/core/VirtualTable/TableRow.d.ts +2 -2
- package/core/VirtualTable/index.d.ts +1 -1
- package/core/VirtualTable/index.js +4 -0
- package/core/VirtualTable/index.js.map +1 -1
- package/core/VirtualTable/index.less +1 -0
- package/core/WithExplanation/index.d.ts +1 -1
- package/core/WithExplanation/index.js +3 -2
- package/core/WithExplanation/index.js.map +1 -1
- package/core/WithExplanation/index.less +21 -6
- package/core/WithTooltipList.d.ts +2 -2
- package/core/YearMonthSelector.d.ts +1 -1
- package/hooks/useOrientationMode.d.ts +1 -1
- package/hooks/useOrientationMode.js +4 -10
- package/hooks/useOrientationMode.js.map +1 -1
- package/package.json +11 -11
- package/util/ModalUtil/index.d.ts +7 -1
- package/util/ModalUtil/index.js +8 -4
- package/util/ModalUtil/index.js.map +1 -1
- package/util/ModalUtil/index.less +8 -20
- package/util/OrientationUtil.d.ts +5 -6
- package/util/OrientationUtil.js +20 -30
- package/util/OrientationUtil.js.map +1 -1
- package/util/PromptUtil/PromptBody.d.ts +1 -1
- package/core/AuthenticationCodeInput.js.map +0 -1
package/core/Skeleton.js
CHANGED
|
@@ -24,15 +24,28 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
24
|
};
|
|
25
25
|
return __assign.apply(this, arguments);
|
|
26
26
|
};
|
|
27
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
+
var t = {};
|
|
29
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
+
t[p] = s[p];
|
|
31
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
};
|
|
27
38
|
import React from "react";
|
|
28
39
|
import AntSkeleton from "antd/es/skeleton";
|
|
40
|
+
import { classNames } from "../util/ClassNames";
|
|
29
41
|
export var Skeleton = /** @class */ (function (_super) {
|
|
30
42
|
__extends(Skeleton, _super);
|
|
31
43
|
function Skeleton() {
|
|
32
44
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
33
45
|
}
|
|
34
46
|
Skeleton.prototype.render = function () {
|
|
35
|
-
|
|
47
|
+
var _a = this.props, className = _a.className, restProps = __rest(_a, ["className"]);
|
|
48
|
+
return React.createElement(AntSkeleton, __assign({ className: classNames("g-skeleton", className) }, restProps));
|
|
36
49
|
};
|
|
37
50
|
Skeleton.displayName = "Skeleton";
|
|
38
51
|
return Skeleton;
|
package/core/Skeleton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../src/core/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../src/core/Skeleton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAI9C;IAA8B,4BAA0B;IAAxD;;IAOA,CAAC;IAJG,yBAAM,GAAN;QACI,IAAM,KAA4B,IAAI,CAAC,KAAK,EAArC,SAAS,eAAA,EAAK,SAAS,cAAxB,aAAyB,CAAa,CAAC;QAC7C,OAAO,oBAAC,WAAW,aAAC,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,IAAM,SAAS,EAAI,CAAC;IAC1F,CAAC;IALM,oBAAW,GAAG,UAAU,CAAC;IAMpC,eAAC;CAAA,AAPD,CAA8B,KAAK,CAAC,aAAa,GAOhD"}
|
package/core/Slider/index.d.ts
CHANGED
package/core/Space.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ interface Props extends SpaceProps {
|
|
|
4
4
|
}
|
|
5
5
|
export declare class Space extends React.PureComponent<Props> {
|
|
6
6
|
static displayName: string;
|
|
7
|
-
|
|
7
|
+
static Compact: React.FC<import("antd/es/space/Compact").SpaceCompactProps>;
|
|
8
|
+
render(): React.JSX.Element;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
package/core/Space.js
CHANGED
|
@@ -35,6 +35,7 @@ export var Space = /** @class */ (function (_super) {
|
|
|
35
35
|
return React.createElement(AntSpace, __assign({}, this.props));
|
|
36
36
|
};
|
|
37
37
|
Space.displayName = "Space";
|
|
38
|
+
Space.Compact = AntSpace.Compact;
|
|
38
39
|
return Space;
|
|
39
40
|
}(React.PureComponent));
|
|
40
41
|
//# sourceMappingURL=Space.js.map
|
package/core/Space.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Space.js","sourceRoot":"","sources":["../../src/core/Space.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,QAAQ,MAAM,eAAe,CAAC;AAIrC;IAA2B,yBAA0B;IAArD;;
|
|
1
|
+
{"version":3,"file":"Space.js","sourceRoot":"","sources":["../../src/core/Space.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,QAAQ,MAAM,eAAe,CAAC;AAIrC;IAA2B,yBAA0B;IAArD;;IAQA,CAAC;IAHG,sBAAM,GAAN;QACI,OAAO,oBAAC,QAAQ,eAAK,IAAI,CAAC,KAAK,EAAI,CAAC;IACxC,CAAC;IANM,iBAAW,GAAG,OAAO,CAAC;IAEtB,aAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IAKtC,YAAC;CAAA,AARD,CAA2B,KAAK,CAAC,aAAa,GAQ7C"}
|
package/core/Spin.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface Props extends Omit<AntSpinProps, "spinning"> {
|
|
|
5
5
|
}
|
|
6
6
|
export declare class Spin extends React.PureComponent<Props> {
|
|
7
7
|
static displayName: string;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export type SpinSize = AntSpinSize;
|
|
11
11
|
export type SpinIndicator = AntSpinIndicator;
|
|
@@ -21,6 +21,6 @@ export declare class StepFormContainer extends React.PureComponent<Props> {
|
|
|
21
21
|
static displayName: string;
|
|
22
22
|
goToPrevStep: () => void;
|
|
23
23
|
goToNextStep: () => void;
|
|
24
|
-
renderButtons: (submitButton: React.ReactElement, isValidating: boolean) => JSX.Element;
|
|
25
|
-
render(): JSX.Element;
|
|
24
|
+
renderButtons: (submitButton: React.ReactElement, isValidating: boolean) => React.JSX.Element;
|
|
25
|
+
render(): React.JSX.Element;
|
|
26
26
|
}
|
|
@@ -31,7 +31,7 @@ export var StepFormContainer = /** @class */ (function (_super) {
|
|
|
31
31
|
var _a, _b;
|
|
32
32
|
var currentStep = (_a = _this.props, _a.currentStep), buttonRenderer = (_b = _a.buttonRenderer, _b === void 0 ? function (prevButton, nextButton) { return (currentStep > 0 ? [prevButton, nextButton] : nextButton); } : _b);
|
|
33
33
|
var t = i18n();
|
|
34
|
-
var prevButton = (React.createElement(Button, { onClick: _this.goToPrevStep, disabled: isValidating, key: "prevButton" }, t.prevStep));
|
|
34
|
+
var prevButton = (React.createElement(Button, { onClick: _this.goToPrevStep, disabled: isValidating, key: "prevButton", type: "primary", ghost: true }, t.prevStep));
|
|
35
35
|
return React.createElement(Space, null, buttonRenderer(prevButton, submitButton));
|
|
36
36
|
};
|
|
37
37
|
return _this;
|
|
@@ -42,7 +42,7 @@ export var StepFormContainer = /** @class */ (function (_super) {
|
|
|
42
42
|
var t = i18n();
|
|
43
43
|
var nextButtonText = currentStep !== steps.length - 1 ? t.nextStep : t.finish;
|
|
44
44
|
return (React.createElement("div", { className: classNames("g-step-form-container", className), id: id, style: style },
|
|
45
|
-
React.createElement(Steps, { current: currentStep, labelPlacement: stepLabelPlacement }, steps.map(function (_, key) { return (React.createElement(Steps.Step, { key: key, title: _.title, description: _.description })); })),
|
|
45
|
+
React.createElement(Steps, { current: currentStep, labelPlacement: stepLabelPlacement, responsive: stepLabelPlacement !== "horizontal" }, steps.map(function (_, key) { return (React.createElement(Steps.Step, { key: key, title: _.title, description: _.description })); })),
|
|
46
46
|
React.createElement(Form, { layout: formLayout, onFinish: currentStep < steps.length - 1 ? this.goToNextStep : onFinish, buttonText: nextButtonText, buttonRenderer: this.renderButtons }, steps[currentStep].content)));
|
|
47
47
|
};
|
|
48
48
|
StepFormContainer.displayName = "StepFormContainer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/StepFormContainer/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,IAAI,EAAC,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AACjC,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAC/B,OAAO,cAAc,CAAC;AAqBtB;IAAuC,qCAA0B;IAAjE;QAAA,qEAoCC;QAjCG,kBAAY,GAAG,cAAM,OAAA,KAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,EAAnD,CAAmD,CAAC;QAEzE,kBAAY,GAAG,cAAM,OAAA,KAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,EAAnD,CAAmD,CAAC;QAEzE,mBAAa,GAAG,UAAC,YAAgC,EAAE,YAAqB;;YAC7D,IAAA,WAAW,IAAZ,KAAwH,KAAI,CAAC,KAAK,iBAAtH,EAAE,cAAc,IAAd,sBAAsG,kBAArF,UAAC,UAAU,EAAE,UAAU,IAAK,OAAA,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAAzD,CAAyD,MAAA,CAAe;YACzI,IAAM,CAAC,GAAG,IAAI,EAAE,CAAC;YACjB,IAAM,UAAU,GAAG,CACf,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,QAAQ,EAAE,WAAW,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,CAAC,aAAa,IAC5J,KAAK,CAAC,WAAW,CAAC,CAAC,OAAO,CACxB,CACL,CACT,CAAC;IACN,CAAC;IAlCM,6BAAW,GAAG,mBAAmB,AAAtB,CAAuB;IAmC7C,wBAAC;CAAA,AApCD,CAAuC,KAAK,CAAC,aAAa,GAoCzD"}
|
package/core/Steps.d.ts
CHANGED
package/core/StyleProvider.d.ts
CHANGED
package/core/Table.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export declare class Table<RowType extends object, OrderByFieldType> extends Rea
|
|
|
81
81
|
} | {
|
|
82
82
|
onClick?: undefined;
|
|
83
83
|
};
|
|
84
|
-
renderPopoverContent: () => JSX.Element[];
|
|
85
|
-
render(): JSX.Element;
|
|
84
|
+
renderPopoverContent: () => React.JSX.Element[];
|
|
85
|
+
render(): React.JSX.Element;
|
|
86
86
|
}
|
|
87
87
|
export type { TableRowSelection };
|
package/core/Tabs/Single.d.ts
CHANGED
package/core/Tabs/index.d.ts
CHANGED
package/core/Tag.d.ts
CHANGED
package/core/TagInput/index.d.ts
CHANGED
|
@@ -22,6 +22,6 @@ export declare class TagInput<T> extends React.PureComponent<Props<T>, State> {
|
|
|
22
22
|
onKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
23
23
|
onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
24
24
|
onBlur: () => void;
|
|
25
|
-
render(): JSX.Element;
|
|
25
|
+
render(): React.JSX.Element;
|
|
26
26
|
}
|
|
27
27
|
export {};
|
package/core/Tags.d.ts
CHANGED
|
@@ -13,6 +13,6 @@ export interface Props {
|
|
|
13
13
|
export declare class Tags extends React.PureComponent<Props> {
|
|
14
14
|
static displayName: string;
|
|
15
15
|
private readonly singleTagStyle;
|
|
16
|
-
renderTag: (item: React.ReactElement | string | number | null, index: number) => JSX.Element;
|
|
17
|
-
render(): JSX.Element;
|
|
16
|
+
renderTag: (item: React.ReactElement | string | number | null, index: number) => React.JSX.Element;
|
|
17
|
+
render(): React.JSX.Element;
|
|
18
18
|
}
|
package/core/TimePicker.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export declare class TimeRangePicker<T extends boolean> extends React.PureCompon
|
|
|
11
11
|
static displayName: string;
|
|
12
12
|
private readonly timeFormatter;
|
|
13
13
|
onChange: (dates: [Dayjs | null, Dayjs | null] | null) => void;
|
|
14
|
-
render(): JSX.Element;
|
|
14
|
+
render(): React.JSX.Element;
|
|
15
15
|
}
|
package/core/Tooltip.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ export interface Props<T extends string> extends Omit<TabsProps, "onChange"> {
|
|
|
18
18
|
}
|
|
19
19
|
export declare class TypedTabs<T extends string> extends React.PureComponent<Props<T>> {
|
|
20
20
|
static displayName: string;
|
|
21
|
-
render(): JSX.Element;
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
22
|
}
|
package/core/Uploader.d.ts
CHANGED
|
@@ -27,6 +27,6 @@ export declare class Uploader<SuccessResponseType, ErrorResponseType> extends Re
|
|
|
27
27
|
componentWillUnmount(): void;
|
|
28
28
|
preventDefaultDragDrop: (e: DragEvent) => void;
|
|
29
29
|
onUpload: ({ file }: UploadChangeParam) => void;
|
|
30
|
-
render(): JSX.Element;
|
|
30
|
+
render(): React.JSX.Element;
|
|
31
31
|
}
|
|
32
32
|
export {};
|
|
@@ -11,4 +11,4 @@ export interface State {
|
|
|
11
11
|
hasShadowChildren: boolean;
|
|
12
12
|
paused: boolean;
|
|
13
13
|
}
|
|
14
|
-
export declare const VerticalMarquee: ({ className: extraClassName, speed, styles, children }: Props) => JSX.Element;
|
|
14
|
+
export declare const VerticalMarquee: ({ className: extraClassName, speed, styles, children }: Props) => React.JSX.Element;
|
|
@@ -31,4 +31,4 @@ export interface Props<T extends object> {
|
|
|
31
31
|
/**
|
|
32
32
|
* Efficiently rendering large lists and tabular data
|
|
33
33
|
*/
|
|
34
|
-
export declare function VirtualList<T extends object>({ data, rowKey, direction, renderItem: renderData, overscan, initialRect, observeElementOffset, fixedSize, observeElementRect, id, className, listRef, }: Props<T>): JSX.Element;
|
|
34
|
+
export declare function VirtualList<T extends object>({ data, rowKey, direction, renderItem: renderData, overscan, initialRect, observeElementOffset, fixedSize, observeElementRect, id, className, listRef, }: Props<T>): React.JSX.Element;
|
|
@@ -6,5 +6,5 @@ interface Props<RowType extends object> {
|
|
|
6
6
|
columns: VirtualTableColumn<RowType>[];
|
|
7
7
|
columnsStickyPosition: ColumnsStickyPosition;
|
|
8
8
|
}
|
|
9
|
-
export declare const TableHeader: <RowType extends object>({ headerRef, headerHeight, columns, columnsStickyPosition }: Props<RowType>) => JSX.Element;
|
|
9
|
+
export declare const TableHeader: <RowType extends object>({ headerRef, headerHeight, columns, columnsStickyPosition }: Props<RowType>) => React.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import type { VirtualItem } from "@tanstack/react-virtual";
|
|
3
3
|
import type { VirtualTableColumn, ColumnsStickyPosition } from "./type";
|
|
4
4
|
interface Props<RowType extends object> {
|
|
@@ -12,5 +12,5 @@ interface Props<RowType extends object> {
|
|
|
12
12
|
rowClassName?: string;
|
|
13
13
|
onRowClick?: (record: RowType, rowIndex: number) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare const TableRow: <RowType extends object>({ virtualItem, data, columns, columnWidths, rowHeight, scrollBarSize, columnsStickyPosition, rowClassName, onRowClick }: Props<RowType>) => JSX.Element;
|
|
15
|
+
export declare const TableRow: <RowType extends object>({ virtualItem, data, columns, columnWidths, rowHeight, scrollBarSize, columnsStickyPosition, rowClassName, onRowClick }: Props<RowType>) => React.JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -25,6 +25,6 @@ export interface VirtualTableProps<RowType extends object> {
|
|
|
25
25
|
headerHeight?: number;
|
|
26
26
|
rowSelection?: VirtualTableRowSelection<RowType>;
|
|
27
27
|
}
|
|
28
|
-
export declare const VirtualTable: (<RowType extends object>({ columns, rowHeight, dataSource, className, rowClassName, loading, emptyPlaceholder, onRowClick, scrollY, scrollX, overscan, rowSelection, headerHeight, rowKey, }: VirtualTableProps<RowType>) => JSX.Element) & {
|
|
28
|
+
export declare const VirtualTable: (<RowType extends object>({ columns, rowHeight, dataSource, className, rowClassName, loading, emptyPlaceholder, onRowClick, scrollY, scrollX, overscan, rowSelection, headerHeight, rowKey, }: VirtualTableProps<RowType>) => React.JSX.Element) & {
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
@@ -32,6 +32,10 @@ export var VirtualTable = Object.assign(function (_a) {
|
|
|
32
32
|
});
|
|
33
33
|
var _d = useColumns({ columns: transformedColumns }), headerRef = _d.headerRef, columnWidths = _d.columnWidths, getColumnWidths = _d.getColumnWidths, columnsStickyPosition = _d.columnsStickyPosition;
|
|
34
34
|
var _e = useScroll({ scrollContentRef: scrollContentRef, headerRef: headerRef, isScrollable: isVerticalScrollable }), onScroll = _e.onScroll, scrollBarSize = _e.scrollBarSize, tableBodyRef = _e.tableBodyRef;
|
|
35
|
+
React.useEffect(function () {
|
|
36
|
+
// avoid the table content get pressed together on mount
|
|
37
|
+
setTimeout(function () { return scrollContentRef.current && (scrollContentRef.current.style.visibility = "visible"); }, 1000);
|
|
38
|
+
}, []);
|
|
35
39
|
return (React.createElement("div", { className: classNames("g-virtual-table", className), style: { width: scrollX || "100%", height: containerHeight } },
|
|
36
40
|
loading && (React.createElement("div", { className: "mask" },
|
|
37
41
|
React.createElement(Spin, { spinning: loading }))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/VirtualTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wCAAwC,CAAC;AAChD,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AA,CAChB,oBAAC,QAAQ,IACL,GAAG,EAAE,WAAW,CAAC,GAAG,EACpB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,EACnC,OAAO,EAAE,kBAAkB,EAC3B,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,qBAAqB,EAAE,qBAAqB,EAC5C,YAAY,EAAE,YAAY,GAC5B,CACL,EAbmB,CAanB,CAAC,CACV,CACT,CACC,CACJ,CACJ,CACT,CAAC;AACN,CAAC,EACD,EAAC,WAAW,EAAE,cAAc,EAAC,CAChC,CAAC"}
|
|
@@ -17,5 +17,5 @@ export interface Props {
|
|
|
17
17
|
export declare class WithExplanation extends React.PureComponent<Props> {
|
|
18
18
|
static displayName: string;
|
|
19
19
|
static defaultProps: PickOptional<Props>;
|
|
20
|
-
render(): string | number | true | React.ReactFragment | JSX.Element;
|
|
20
|
+
render(): string | number | true | React.ReactFragment | React.JSX.Element;
|
|
21
21
|
}
|
|
@@ -30,8 +30,9 @@ export var WithExplanation = /** @class */ (function (_super) {
|
|
|
30
30
|
children,
|
|
31
31
|
React.createElement(Tooltip, { className: "g-with-explanation-tooltip", title: Array.isArray(explanation) ? explanation.map(function (_, index) { return React.createElement("p", { key: index }, _); }) : explanation },
|
|
32
32
|
React.createElement("div", { className: "icon-container" },
|
|
33
|
-
React.createElement("svg", { viewBox: "0 0
|
|
34
|
-
React.createElement("
|
|
33
|
+
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 26 24" },
|
|
34
|
+
React.createElement("circle", { cx: "8", cy: "8", r: "8", style: { strokeMiterlimit: 10 }, transform: "translate(3.5 4)" }),
|
|
35
|
+
React.createElement("path", { d: "M2.338 9.9a.972.972 0 0 1-.294-.715.929.929 0 0 1 .294-.714.991.991 0 0 1 .728-.28 1 1 0 0 1 .742.28.929.929 0 0 1 .294.714.994.994 0 0 1-.308.728 1.049 1.049 0 0 1-.728.28 1 1 0 0 1-.728-.293zm-.014-2.466V7.2a2.794 2.794 0 0 1 .28-1.33 6.938 6.938 0 0 1 1.582-1.74l.239-.266a1.638 1.638 0 0 0 .391-1.022 1.593 1.593 0 0 0-.406-1.148 1.624 1.624 0 0 0-1.19-.419 1.549 1.549 0 0 0-1.373.6A2.345 2.345 0 0 0 1.47 3.3H0A3.247 3.247 0 0 1 .882.9 3.245 3.245 0 0 1 3.318 0 3.131 3.131 0 0 1 5.5.742a2.53 2.53 0 0 1 .841 2 2.71 2.71 0 0 1-.531 1.71 14.388 14.388 0 0 1-1.176 1.092 2.319 2.319 0 0 0-.588.728 1.871 1.871 0 0 0-.224.924v.238z", transform: "translate(8.336 6.808)" }))))));
|
|
35
36
|
}
|
|
36
37
|
else {
|
|
37
38
|
return children || "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/WithExplanation/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAGnC,OAAO,cAAc,CAAC;AAetB;IAAqC,mCAA0B;IAA/D;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/WithExplanation/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAGnC,OAAO,cAAc,CAAC;AAetB;IAAqC,mCAA0B;IAA/D;;IA8BA,CAAC;IAvBG,gCAAM,GAAN;;QACW,IAAA,QAAQ,IAAT,KAAwC,IAAI,CAAC,KAAK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on-container {
|
|
10
12
|
margin-left: 0;
|
|
11
|
-
margin-right:
|
|
13
|
+
margin-right: @gap;
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -16,12 +18,25 @@
|
|
|
16
18
|
display: inline-flex;
|
|
17
19
|
align-items: center;
|
|
18
20
|
justify-content: center;
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
margin-left: 5px;
|
|
21
|
+
width: auto;
|
|
22
|
+
height: 1em;
|
|
23
|
+
margin-left: @gap;
|
|
24
|
+
color: inherit;
|
|
24
25
|
cursor: help;
|
|
26
|
+
|
|
27
|
+
svg {
|
|
28
|
+
width: auto;
|
|
29
|
+
height: 1.4em;
|
|
30
|
+
|
|
31
|
+
path {
|
|
32
|
+
fill: currentcolor;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
circle {
|
|
36
|
+
fill: none;
|
|
37
|
+
stroke: currentcolor;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
25
40
|
}
|
|
26
41
|
}
|
|
27
42
|
|
|
@@ -17,7 +17,7 @@ export declare class WithTooltipList extends React.PureComponent<Props> {
|
|
|
17
17
|
static displayName: string;
|
|
18
18
|
private readonly labelStyle;
|
|
19
19
|
private readonly wrapperStyle;
|
|
20
|
-
renderTooltip: () => JSX.Element;
|
|
21
|
-
render(): string | JSX.Element;
|
|
20
|
+
renderTooltip: () => React.JSX.Element;
|
|
21
|
+
render(): string | React.JSX.Element;
|
|
22
22
|
private readonly dummyClick;
|
|
23
23
|
}
|
|
@@ -11,5 +11,5 @@ export declare class YearMonthSelector<T extends boolean> extends React.PureComp
|
|
|
11
11
|
static displayName: string;
|
|
12
12
|
isDateDisabled: (current: Dayjs) => boolean;
|
|
13
13
|
onChange: (date: Dayjs | null, dateString: string) => void;
|
|
14
|
-
render(): JSX.Element;
|
|
14
|
+
render(): React.JSX.Element;
|
|
15
15
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { OrientationType } from "../util/OrientationUtil";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function useOrientation(): OrientationType;
|
|
@@ -16,15 +16,9 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
16
16
|
};
|
|
17
17
|
import React from "react";
|
|
18
18
|
import { OrientationUtil } from "../util/OrientationUtil";
|
|
19
|
-
export function
|
|
20
|
-
var _a = __read(React.useState(OrientationUtil.
|
|
21
|
-
React.useEffect(function () {
|
|
22
|
-
|
|
23
|
-
OrientationUtil.onOrientationChange(handler);
|
|
24
|
-
return function () {
|
|
25
|
-
OrientationUtil.removeOnChange(handler);
|
|
26
|
-
};
|
|
27
|
-
}, []);
|
|
28
|
-
return mode;
|
|
19
|
+
export function useOrientation() {
|
|
20
|
+
var _a = __read(React.useState(OrientationUtil.current()), 2), orientation = _a[0], setOrientation = _a[1];
|
|
21
|
+
React.useEffect(function () { return OrientationUtil.subscribe(setOrientation); }, []);
|
|
22
|
+
return orientation;
|
|
29
23
|
}
|
|
30
24
|
//# sourceMappingURL=useOrientationMode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOrientationMode.js","sourceRoot":"","sources":["../../src/hooks/useOrientationMode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAGxD,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"useOrientationMode.js","sourceRoot":"","sources":["../../src/hooks/useOrientationMode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAGxD,MAAM,UAAU,cAAc;IACpB,IAAA,KAAA,OAAgC,KAAK,CAAC,QAAQ,CAAkB,eAAe,CAAC,OAAO,EAAE,CAAC,IAAA,EAAzF,WAAW,QAAA,EAAE,cAAc,QAA8D,CAAC;IAEjG,KAAK,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,CAAC,SAAS,CAAC,cAAc,CAAC,EAAzC,CAAyC,EAAE,EAAE,CAAC,CAAC;IAErE,OAAO,WAAW,CAAC;AACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinnacle0/web-ui",
|
|
3
|
-
"version": "0.5.0
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"author": "Pinnacle",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"node": ">= 16.15.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@ant-design/cssinjs": "
|
|
21
|
-
"@ant-design/icons": "5.
|
|
20
|
+
"@ant-design/cssinjs": "1.10.1",
|
|
21
|
+
"@ant-design/icons": "5.1.4",
|
|
22
22
|
"@juggle/resize-observer": "3.4.0",
|
|
23
23
|
"@tanstack/react-virtual": "3.0.0-beta.30",
|
|
24
|
-
"antd": "5.
|
|
24
|
+
"antd": "5.5.2",
|
|
25
25
|
"classnames": "2.3.2",
|
|
26
|
-
"dayjs": "1.11.
|
|
26
|
+
"dayjs": "1.11.8",
|
|
27
27
|
"intersection-observer": "0.12.2",
|
|
28
28
|
"rc-picker": "3.7.4",
|
|
29
29
|
"rc-resize-observer": "1.3.1"
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"react-router-dom": ">=5.2.0 <6.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@babel/core": "7.
|
|
38
|
-
"@babel/runtime": "7.
|
|
37
|
+
"@babel/core": "7.22.1",
|
|
38
|
+
"@babel/runtime": "7.22.3",
|
|
39
39
|
"@testing-library/dom": "9.2.0",
|
|
40
40
|
"@testing-library/jest-dom": "5.16.5",
|
|
41
41
|
"@testing-library/react": "14.0.0",
|
|
42
42
|
"@testing-library/user-event": "14.4.3",
|
|
43
43
|
"@types/fs-extra": "11.0.1",
|
|
44
44
|
"@types/history": "4.7.11",
|
|
45
|
-
"@types/react": "18.2.
|
|
46
|
-
"@types/react-dom": "18.2.
|
|
45
|
+
"@types/react": "18.2.8",
|
|
46
|
+
"@types/react-dom": "18.2.4",
|
|
47
47
|
"@types/react-router": "5.1.20",
|
|
48
48
|
"@types/react-router-dom": "5.3.3",
|
|
49
49
|
"fs-extra": "11.1.1",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"react": "18.2.0",
|
|
52
52
|
"react-dom": "18.2.0",
|
|
53
53
|
"react-router-dom": "5.3.0",
|
|
54
|
-
"typescript": "5.0.4",
|
|
55
54
|
"@pinnacle0/devtool-util": "1.2.6",
|
|
56
55
|
"@pinnacle0/webpack-util": "0.4.56"
|
|
57
56
|
},
|
|
58
57
|
"publishConfig": {
|
|
59
|
-
"directory": "build"
|
|
58
|
+
"directory": "build",
|
|
59
|
+
"linkDirectory": false
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"run-script": "ts-node --project config/tsconfig.script.json",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ModalFunc } from "antd/es/modal/confirm";
|
|
3
|
+
import type { PickOptional } from "../../internal/type";
|
|
3
4
|
import "./index.less";
|
|
5
|
+
import type { ButtonProps } from "antd/es/button";
|
|
4
6
|
export type CreateModalReturnType = ReturnType<ModalFunc>;
|
|
5
7
|
export type ModalConfigWithoutEvent = Omit<ModalConfig, "onOk" | "onCancel">;
|
|
6
8
|
export type CreateAsyncModalPromise<WithCloseHandling extends boolean> = WithCloseHandling extends true ? Promise<"ok" | "cancel" | "close"> : Promise<boolean>;
|
|
@@ -20,11 +22,15 @@ export interface ModalConfig {
|
|
|
20
22
|
hideButtons?: boolean;
|
|
21
23
|
addInnerPadding?: boolean;
|
|
22
24
|
footerExtra?: React.ReactElement | string | number;
|
|
25
|
+
cancelButtonProps?: ButtonProps;
|
|
26
|
+
}
|
|
27
|
+
export interface RootProps {
|
|
28
|
+
config?: PickOptional<ModalConfig>;
|
|
23
29
|
}
|
|
24
30
|
declare function createSync(config: ModalConfig): CreateModalReturnType;
|
|
25
31
|
declare function createAsync<WithCloseHandling extends boolean = false>(config: ModalConfigWithoutEvent, withCloseHandling?: WithCloseHandling): CreateAsyncModalPromise<WithCloseHandling>;
|
|
26
32
|
declare function confirm(body: React.ReactNode, title?: string): Promise<boolean>;
|
|
27
|
-
declare function Root(): React.ReactElement;
|
|
33
|
+
declare function Root({ config }: RootProps): React.ReactElement;
|
|
28
34
|
/**
|
|
29
35
|
* If using <ModalUtil.Root />, this function will not work
|
|
30
36
|
*/
|
package/util/ModalUtil/index.js
CHANGED
|
@@ -32,6 +32,7 @@ import { TextUtil } from "../../internal/TextUtil";
|
|
|
32
32
|
import { i18n } from "../../internal/i18n/util";
|
|
33
33
|
import "./index.less";
|
|
34
34
|
var modalInstance = null;
|
|
35
|
+
var userModalConfig = {};
|
|
35
36
|
function createSync(config) {
|
|
36
37
|
var t = i18n();
|
|
37
38
|
var defaultModalConfig = {
|
|
@@ -43,7 +44,7 @@ function createSync(config) {
|
|
|
43
44
|
autoFocusButton: "ok",
|
|
44
45
|
addInnerPadding: true,
|
|
45
46
|
};
|
|
46
|
-
var mergedConfig = __assign(__assign({}, defaultModalConfig), config);
|
|
47
|
+
var mergedConfig = __assign(__assign(__assign({}, defaultModalConfig), userModalConfig), config);
|
|
47
48
|
if (Array.isArray(mergedConfig.body)) {
|
|
48
49
|
mergedConfig.body = mergedConfig.body.map(function (rowContent, index) { return React.createElement("div", { key: index }, rowContent); });
|
|
49
50
|
}
|
|
@@ -72,6 +73,7 @@ function createSync(config) {
|
|
|
72
73
|
keyboard: false,
|
|
73
74
|
autoFocusButton: mergedConfig.autoFocusButton,
|
|
74
75
|
icon: null,
|
|
76
|
+
cancelButtonProps: mergedConfig.cancelButtonProps,
|
|
75
77
|
};
|
|
76
78
|
var instance = modalInstance || Modal;
|
|
77
79
|
var ref = mergedConfig.cancelText ? instance.confirm(antModalConfig) : instance.info(antModalConfig);
|
|
@@ -108,18 +110,20 @@ function confirm(body, title) {
|
|
|
108
110
|
*/
|
|
109
111
|
title: title || t.defaultTitle,
|
|
110
112
|
body: body,
|
|
111
|
-
width: 480,
|
|
113
|
+
width: userModalConfig.width || 480,
|
|
112
114
|
okText: t.defaultConfirm,
|
|
113
115
|
cancelText: t.defaultCancel,
|
|
114
116
|
});
|
|
115
117
|
}
|
|
116
|
-
function Root() {
|
|
117
|
-
var
|
|
118
|
+
function Root(_a) {
|
|
119
|
+
var config = _a.config;
|
|
120
|
+
var _b = __read(Modal.useModal(), 2), apiInstance = _b[0], contextHolder = _b[1];
|
|
118
121
|
React.useEffect(function () {
|
|
119
122
|
if (modalInstance) {
|
|
120
123
|
throw new Error("[web-ui] ModalUtil.Root cannot be mounted more than once");
|
|
121
124
|
}
|
|
122
125
|
modalInstance = apiInstance;
|
|
126
|
+
userModalConfig = config !== null && config !== void 0 ? config : {};
|
|
123
127
|
return function () {
|
|
124
128
|
modalInstance = null;
|
|
125
129
|
};
|