@univerjs/ui 0.4.0 → 0.4.1-nightly.202410191605
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/lib/cjs/index.js +8 -9
- package/lib/es/index.js +123 -225
- package/lib/index.css +1 -1
- package/lib/types/common/menu-hidden-observable.d.ts +1 -1
- package/lib/types/views/MobileApp.d.ts +1 -1
- package/lib/types/views/workbench/Workbench.d.ts +1 -1
- package/lib/umd/index.js +8 -9
- package/package.json +6 -6
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1122,11 +1122,11 @@ const _ZIndexManager = class _ZIndexManager {
|
|
|
1122
1122
|
};
|
|
1123
1123
|
_MAX_INDEX = new WeakMap(), _MIN_INDEX = new WeakMap(), __name(_ZIndexManager, "ZIndexManager"), __privateAdd(_ZIndexManager, _MAX_INDEX, 2147483647), __privateAdd(_ZIndexManager, _MIN_INDEX, -2147483647);
|
|
1124
1124
|
let ZIndexManager = _ZIndexManager;
|
|
1125
|
-
function getMenuHiddenObservable(accessor, targetUniverType, matchUnitId) {
|
|
1125
|
+
function getMenuHiddenObservable(accessor, targetUniverType, matchUnitId, needHideUnitId) {
|
|
1126
1126
|
const univerInstanceService = accessor.get(IUniverInstanceService);
|
|
1127
1127
|
return new Observable((subscriber) => {
|
|
1128
1128
|
const subscription = univerInstanceService.focused$.subscribe((unitId) => {
|
|
1129
|
-
if (unitId == null || matchUnitId && matchUnitId !== unitId)
|
|
1129
|
+
if (unitId == null || matchUnitId && matchUnitId !== unitId || needHideUnitId && needHideUnitId === unitId)
|
|
1130
1130
|
return subscriber.next(!0);
|
|
1131
1131
|
const univerType2 = univerInstanceService.getUnitType(unitId);
|
|
1132
1132
|
subscriber.next(univerType2 !== targetUniverType);
|
|
@@ -2602,7 +2602,7 @@ ShortcutPanelController = __decorateClass$c([
|
|
|
2602
2602
|
__decorateParam$c(4, ICommandService)
|
|
2603
2603
|
], ShortcutPanelController);
|
|
2604
2604
|
const IUIController = createIdentifier("univer.ui.ui-controller");
|
|
2605
|
-
var render$1 = {}, interopRequireWildcard = { exports: {} }, _typeof$
|
|
2605
|
+
var render$1 = {}, interopRequireWildcard = { exports: {} }, _typeof$1 = { exports: {} };
|
|
2606
2606
|
(function(module) {
|
|
2607
2607
|
function _typeof3(o) {
|
|
2608
2608
|
"@babel/helpers - typeof";
|
|
@@ -2613,8 +2613,8 @@ var render$1 = {}, interopRequireWildcard = { exports: {} }, _typeof$2 = { expor
|
|
|
2613
2613
|
}, module.exports.__esModule = !0, module.exports.default = module.exports, _typeof3(o);
|
|
2614
2614
|
}
|
|
2615
2615
|
__name(_typeof3, "_typeof"), module.exports = _typeof3, module.exports.__esModule = !0, module.exports.default = module.exports;
|
|
2616
|
-
})(_typeof$
|
|
2617
|
-
var _typeofExports = _typeof$
|
|
2616
|
+
})(_typeof$1);
|
|
2617
|
+
var _typeofExports = _typeof$1.exports;
|
|
2618
2618
|
(function(module) {
|
|
2619
2619
|
var _typeof3 = _typeofExports.default;
|
|
2620
2620
|
function _getRequireWildcardCache(e2) {
|
|
@@ -2984,7 +2984,7 @@ var regeneratorRuntimeExports = regeneratorRuntime.exports, asyncToGenerator = {
|
|
|
2984
2984
|
}
|
|
2985
2985
|
__name(_asyncToGenerator, "_asyncToGenerator"), module.exports = _asyncToGenerator, module.exports.__esModule = !0, module.exports.default = module.exports;
|
|
2986
2986
|
})(asyncToGenerator);
|
|
2987
|
-
var asyncToGeneratorExports = asyncToGenerator.exports, objectSpread2 = { exports: {} }, defineProperty = { exports: {} }, toPropertyKey$
|
|
2987
|
+
var asyncToGeneratorExports = asyncToGenerator.exports, objectSpread2 = { exports: {} }, defineProperty = { exports: {} }, toPropertyKey$1 = { exports: {} }, toPrimitive$1 = { exports: {} };
|
|
2988
2988
|
(function(module) {
|
|
2989
2989
|
var _typeof3 = _typeofExports.default;
|
|
2990
2990
|
function toPrimitive2(t2, r2) {
|
|
@@ -2998,8 +2998,8 @@ var asyncToGeneratorExports = asyncToGenerator.exports, objectSpread2 = { export
|
|
|
2998
2998
|
return (r2 === "string" ? String : Number)(t2);
|
|
2999
2999
|
}
|
|
3000
3000
|
__name(toPrimitive2, "toPrimitive"), module.exports = toPrimitive2, module.exports.__esModule = !0, module.exports.default = module.exports;
|
|
3001
|
-
})(toPrimitive$
|
|
3002
|
-
var toPrimitiveExports = toPrimitive$
|
|
3001
|
+
})(toPrimitive$1);
|
|
3002
|
+
var toPrimitiveExports = toPrimitive$1.exports;
|
|
3003
3003
|
(function(module) {
|
|
3004
3004
|
var _typeof3 = _typeofExports.default, toPrimitive2 = toPrimitiveExports;
|
|
3005
3005
|
function toPropertyKey2(t2) {
|
|
@@ -3007,8 +3007,8 @@ var toPrimitiveExports = toPrimitive$2.exports;
|
|
|
3007
3007
|
return _typeof3(i) == "symbol" ? i : i + "";
|
|
3008
3008
|
}
|
|
3009
3009
|
__name(toPropertyKey2, "toPropertyKey"), module.exports = toPropertyKey2, module.exports.__esModule = !0, module.exports.default = module.exports;
|
|
3010
|
-
})(toPropertyKey$
|
|
3011
|
-
var toPropertyKeyExports = toPropertyKey$
|
|
3010
|
+
})(toPropertyKey$1);
|
|
3011
|
+
var toPropertyKeyExports = toPropertyKey$1.exports;
|
|
3012
3012
|
(function(module) {
|
|
3013
3013
|
var toPropertyKey2 = toPropertyKeyExports;
|
|
3014
3014
|
function _defineProperty2(e2, r2, t2) {
|
|
@@ -3054,7 +3054,7 @@ Object.defineProperty(render$1, "__esModule", {
|
|
|
3054
3054
|
});
|
|
3055
3055
|
render$1._r = _r;
|
|
3056
3056
|
render$1._u = _u;
|
|
3057
|
-
var render_2 = render$1.render = render, unmount_1 = render$1.unmount = unmount, _regeneratorRuntime2 = _interopRequireDefault(regeneratorRuntimeExports), _asyncToGenerator2 = _interopRequireDefault(asyncToGeneratorExports), _typeof2 = _interopRequireDefault(_typeofExports), _objectSpread2$
|
|
3057
|
+
var render_2 = render$1.render = render, unmount_1 = render$1.unmount = unmount, _regeneratorRuntime2 = _interopRequireDefault(regeneratorRuntimeExports), _asyncToGenerator2 = _interopRequireDefault(asyncToGeneratorExports), _typeof2 = _interopRequireDefault(_typeofExports), _objectSpread2$1 = _interopRequireDefault(objectSpread2Exports), ReactDOM = _interopRequireWildcard(ReactDOM$1), fullClone = (0, _objectSpread2$1.default)({}, ReactDOM), version = fullClone.version, reactRender = fullClone.render, unmountComponentAtNode = fullClone.unmountComponentAtNode, createRoot;
|
|
3058
3058
|
try {
|
|
3059
3059
|
var mainVersion = Number((version || "").split(".")[0]);
|
|
3060
3060
|
mainVersion >= 18 && (createRoot = fullClone.createRoot);
|
|
@@ -4131,13 +4131,13 @@ function DesktopWorkbench(props) {
|
|
|
4131
4131
|
contextMenu = !0,
|
|
4132
4132
|
mountContainer,
|
|
4133
4133
|
onRendered
|
|
4134
|
-
} = props, localeService = useDependency(LocaleService), themeService = useDependency(ThemeService), messageService = useDependency(IMessageService), instanceService = useDependency(IUniverInstanceService), contentRef = useRef(null), footerComponents = useComponentsOfPart(BuiltInUIPart.FOOTER), headerComponents = useComponentsOfPart(BuiltInUIPart.HEADER), headerMenuComponents = useComponentsOfPart(BuiltInUIPart.HEADER_MENU), contentComponents = useComponentsOfPart(BuiltInUIPart.CONTENT), leftSidebarComponents = useComponentsOfPart(BuiltInUIPart.LEFT_SIDEBAR), globalComponents = useComponentsOfPart(BuiltInUIPart.GLOBAL), [
|
|
4134
|
+
} = props, localeService = useDependency(LocaleService), themeService = useDependency(ThemeService), messageService = useDependency(IMessageService), instanceService = useDependency(IUniverInstanceService), contentRef = useRef(null), footerComponents = useComponentsOfPart(BuiltInUIPart.FOOTER), headerComponents = useComponentsOfPart(BuiltInUIPart.HEADER), headerMenuComponents = useComponentsOfPart(BuiltInUIPart.HEADER_MENU), contentComponents = useComponentsOfPart(BuiltInUIPart.CONTENT), leftSidebarComponents = useComponentsOfPart(BuiltInUIPart.LEFT_SIDEBAR), globalComponents = useComponentsOfPart(BuiltInUIPart.GLOBAL), [docSnapShot, setDocSnapShot] = useState(null);
|
|
4135
4135
|
useEffect(() => {
|
|
4136
4136
|
const sub = instanceService.focused$.subscribe((id) => {
|
|
4137
4137
|
if (id == null)
|
|
4138
4138
|
return;
|
|
4139
|
-
const instanceType = instanceService.getUnitType(id);
|
|
4140
|
-
|
|
4139
|
+
const instanceType = instanceService.getUnitType(id), instance = instanceService.getUnit(id);
|
|
4140
|
+
instanceType === UniverInstanceType.UNIVER_DOC && instance && setDocSnapShot(instance.getSnapshot());
|
|
4141
4141
|
});
|
|
4142
4142
|
return () => {
|
|
4143
4143
|
sub.unsubscribe();
|
|
@@ -4173,7 +4173,7 @@ function DesktopWorkbench(props) {
|
|
|
4173
4173
|
className: clsx$1(
|
|
4174
4174
|
styles$3.workbenchContainerContent,
|
|
4175
4175
|
{
|
|
4176
|
-
[styles$3.workbenchContainerDocContent]:
|
|
4176
|
+
[styles$3.workbenchContainerDocContent]: (docSnapShot == null ? void 0 : docSnapShot.documentStyle.documentFlavor) === DocumentFlavor.TRADITIONAL
|
|
4177
4177
|
}
|
|
4178
4178
|
),
|
|
4179
4179
|
children: [
|
|
@@ -4294,17 +4294,7 @@ function createContainer$1(id) {
|
|
|
4294
4294
|
return element2.id = id, element2;
|
|
4295
4295
|
}
|
|
4296
4296
|
__name(createContainer$1, "createContainer$1");
|
|
4297
|
-
const
|
|
4298
|
-
appLayout,
|
|
4299
|
-
appHeader,
|
|
4300
|
-
appContainer,
|
|
4301
|
-
appContainerHeader,
|
|
4302
|
-
appContainerWrapper,
|
|
4303
|
-
appContainerContent,
|
|
4304
|
-
appContainerCanvas,
|
|
4305
|
-
appContainerLeftSidebar,
|
|
4306
|
-
appContainerSidebar
|
|
4307
|
-
}, mobileMenuContainer = "univer-mobile-menu-container", mobileMenuItem = "univer-mobile-menu-item", styles$1 = {
|
|
4297
|
+
const mobileMenuContainer = "univer-mobile-menu-container", mobileMenuItem = "univer-mobile-menu-item", styles$2 = {
|
|
4308
4298
|
mobileMenuContainer,
|
|
4309
4299
|
mobileMenuItem
|
|
4310
4300
|
};
|
|
@@ -4322,7 +4312,7 @@ function MobileMenu(props) {
|
|
|
4322
4312
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4323
4313
|
"div",
|
|
4324
4314
|
{
|
|
4325
|
-
className: styles$
|
|
4315
|
+
className: styles$2.mobileMenuContainer,
|
|
4326
4316
|
style: {
|
|
4327
4317
|
gridTemplateColumns: `repeat(${Math.min(2, flattedMenuItems.length)}, 48px)`
|
|
4328
4318
|
},
|
|
@@ -4342,9 +4332,9 @@ function MobileMenuItem(props) {
|
|
|
4342
4332
|
const { menuItem, onClick } = props, { id, type, title, label, icon } = menuItem;
|
|
4343
4333
|
if (type !== MenuItemType.BUTTON)
|
|
4344
4334
|
throw new Error(`[MobileMenuItem]: on mobile devices only "BUTTON" type menu items are supported. Please check "${id}".`);
|
|
4345
|
-
const disabled = useObservable$1(menuItem.disabled$, !1), activated = useObservable$1(menuItem.activated$, !1), hidden = useObservable$1(menuItem.hidden$, !1), value = useObservable$1(menuItem.value$), className = clsx$1(styles$
|
|
4346
|
-
[styles$
|
|
4347
|
-
[styles$
|
|
4335
|
+
const disabled = useObservable$1(menuItem.disabled$, !1), activated = useObservable$1(menuItem.activated$, !1), hidden = useObservable$1(menuItem.hidden$, !1), value = useObservable$1(menuItem.value$), className = clsx$1(styles$2.mobileMenuItem, {
|
|
4336
|
+
[styles$2.mobileMenuItemActivated]: activated,
|
|
4337
|
+
[styles$2.mobileMenuItemHidden]: hidden
|
|
4348
4338
|
});
|
|
4349
4339
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4350
4340
|
"button",
|
|
@@ -4395,6 +4385,17 @@ function MobileContextMenu() {
|
|
|
4395
4385
|
) }) });
|
|
4396
4386
|
}
|
|
4397
4387
|
__name(MobileContextMenu, "MobileContextMenu");
|
|
4388
|
+
const appLayout = "univer-app-layout", appHeader = "univer-app-header", appContainer = "univer-app-container", appContainerHeader = "univer-app-container-header", appContainerWrapper = "univer-app-container-wrapper", appContainerContent = "univer-app-container-content", appContainerCanvas = "univer-app-container-canvas", appContainerLeftSidebar = "univer-app-container-left-sidebar", appContainerSidebar = "univer-app-container-sidebar", styles$1 = {
|
|
4389
|
+
appLayout,
|
|
4390
|
+
appHeader,
|
|
4391
|
+
appContainer,
|
|
4392
|
+
appContainerHeader,
|
|
4393
|
+
appContainerWrapper,
|
|
4394
|
+
appContainerContent,
|
|
4395
|
+
appContainerCanvas,
|
|
4396
|
+
appContainerLeftSidebar,
|
|
4397
|
+
appContainerSidebar
|
|
4398
|
+
};
|
|
4398
4399
|
function MobileApp(props) {
|
|
4399
4400
|
const {
|
|
4400
4401
|
header = !0,
|
|
@@ -4425,17 +4426,17 @@ function MobileApp(props) {
|
|
|
4425
4426
|
subscriptions.forEach((subscription) => subscription.unsubscribe()), document.body.removeChild(portalContainer);
|
|
4426
4427
|
};
|
|
4427
4428
|
}, [localeService, messageService, mountContainer, portalContainer, themeService.currentTheme$]), /* @__PURE__ */ jsxRuntimeExports.jsxs(ConfigProvider, { locale: locale == null ? void 0 : locale.design, mountContainer: portalContainer, children: [
|
|
4428
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$
|
|
4429
|
-
header && /* @__PURE__ */ jsxRuntimeExports.jsx("header", { className: styles$
|
|
4430
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: styles$
|
|
4431
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$
|
|
4432
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("aside", { className: styles$
|
|
4433
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: styles$
|
|
4434
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("header", { className: styles$
|
|
4429
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1.appLayout, tabIndex: -1, onBlur: /* @__PURE__ */ __name((e2) => e2.stopPropagation(), "onBlur"), children: [
|
|
4430
|
+
header && /* @__PURE__ */ jsxRuntimeExports.jsx("header", { className: styles$1.appContainerHeader }),
|
|
4431
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: styles$1.appContainer, children: [
|
|
4432
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1.appContainerWrapper, children: [
|
|
4433
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("aside", { className: styles$1.appContainerLeftSidebar, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentContainer, { components: leftSidebarComponents }, "left-sidebar") }),
|
|
4434
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: styles$1.appContainerContent, children: [
|
|
4435
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("header", { className: styles$1.appHeader, children: header && /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentContainer, { components: headerComponents }, "header") }),
|
|
4435
4436
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4436
4437
|
"section",
|
|
4437
4438
|
{
|
|
4438
|
-
className: styles$
|
|
4439
|
+
className: styles$1.appContainerCanvas,
|
|
4439
4440
|
ref: contentRef,
|
|
4440
4441
|
"data-range-selector": !0,
|
|
4441
4442
|
onContextMenu: /* @__PURE__ */ __name((e2) => e2.preventDefault(), "onContextMenu"),
|
|
@@ -4443,9 +4444,9 @@ function MobileApp(props) {
|
|
|
4443
4444
|
}
|
|
4444
4445
|
)
|
|
4445
4446
|
] }),
|
|
4446
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("aside", { className: styles$
|
|
4447
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("aside", { className: styles$1.appContainerSidebar, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Sidebar, {}) })
|
|
4447
4448
|
] }),
|
|
4448
|
-
footer && /* @__PURE__ */ jsxRuntimeExports.jsx("footer", { className: styles$
|
|
4449
|
+
footer && /* @__PURE__ */ jsxRuntimeExports.jsx("footer", { className: styles$1.appFooter, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentContainer, { components: footerComponents }, "footer") }),
|
|
4449
4450
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ZenZone, {})
|
|
4450
4451
|
] })
|
|
4451
4452
|
] }),
|
|
@@ -6453,42 +6454,42 @@ const _DesktopMessageService = class _DesktopMessageService {
|
|
|
6453
6454
|
};
|
|
6454
6455
|
__name(_DesktopMessageService, "DesktopMessageService");
|
|
6455
6456
|
let DesktopMessageService = _DesktopMessageService;
|
|
6456
|
-
function _arrayLikeToArray
|
|
6457
|
+
function _arrayLikeToArray(r2, a) {
|
|
6457
6458
|
(a == null || a > r2.length) && (a = r2.length);
|
|
6458
6459
|
for (var e2 = 0, n2 = Array(a); e2 < a; e2++) n2[e2] = r2[e2];
|
|
6459
6460
|
return n2;
|
|
6460
6461
|
}
|
|
6461
|
-
__name(_arrayLikeToArray
|
|
6462
|
+
__name(_arrayLikeToArray, "_arrayLikeToArray");
|
|
6462
6463
|
function _arrayWithoutHoles(r2) {
|
|
6463
|
-
if (Array.isArray(r2)) return _arrayLikeToArray
|
|
6464
|
+
if (Array.isArray(r2)) return _arrayLikeToArray(r2);
|
|
6464
6465
|
}
|
|
6465
6466
|
__name(_arrayWithoutHoles, "_arrayWithoutHoles");
|
|
6466
6467
|
function _iterableToArray(r2) {
|
|
6467
6468
|
if (typeof Symbol < "u" && r2[Symbol.iterator] != null || r2["@@iterator"] != null) return Array.from(r2);
|
|
6468
6469
|
}
|
|
6469
6470
|
__name(_iterableToArray, "_iterableToArray");
|
|
6470
|
-
function _unsupportedIterableToArray
|
|
6471
|
+
function _unsupportedIterableToArray(r2, a) {
|
|
6471
6472
|
if (r2) {
|
|
6472
|
-
if (typeof r2 == "string") return _arrayLikeToArray
|
|
6473
|
+
if (typeof r2 == "string") return _arrayLikeToArray(r2, a);
|
|
6473
6474
|
var t2 = {}.toString.call(r2).slice(8, -1);
|
|
6474
|
-
return t2 === "Object" && r2.constructor && (t2 = r2.constructor.name), t2 === "Map" || t2 === "Set" ? Array.from(r2) : t2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray
|
|
6475
|
+
return t2 === "Object" && r2.constructor && (t2 = r2.constructor.name), t2 === "Map" || t2 === "Set" ? Array.from(r2) : t2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r2, a) : void 0;
|
|
6475
6476
|
}
|
|
6476
6477
|
}
|
|
6477
|
-
__name(_unsupportedIterableToArray
|
|
6478
|
+
__name(_unsupportedIterableToArray, "_unsupportedIterableToArray");
|
|
6478
6479
|
function _nonIterableSpread() {
|
|
6479
6480
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
6480
6481
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
6481
6482
|
}
|
|
6482
6483
|
__name(_nonIterableSpread, "_nonIterableSpread");
|
|
6483
6484
|
function _toConsumableArray(r2) {
|
|
6484
|
-
return _arrayWithoutHoles(r2) || _iterableToArray(r2) || _unsupportedIterableToArray
|
|
6485
|
+
return _arrayWithoutHoles(r2) || _iterableToArray(r2) || _unsupportedIterableToArray(r2) || _nonIterableSpread();
|
|
6485
6486
|
}
|
|
6486
6487
|
__name(_toConsumableArray, "_toConsumableArray");
|
|
6487
|
-
function _arrayWithHoles
|
|
6488
|
+
function _arrayWithHoles(r2) {
|
|
6488
6489
|
if (Array.isArray(r2)) return r2;
|
|
6489
6490
|
}
|
|
6490
|
-
__name(_arrayWithHoles
|
|
6491
|
-
function _iterableToArrayLimit
|
|
6491
|
+
__name(_arrayWithHoles, "_arrayWithHoles");
|
|
6492
|
+
function _iterableToArrayLimit(r2, l2) {
|
|
6492
6493
|
var t2 = r2 == null ? null : typeof Symbol < "u" && r2[Symbol.iterator] || r2["@@iterator"];
|
|
6493
6494
|
if (t2 != null) {
|
|
6494
6495
|
var e2, n2, i, u2, a = [], f2 = !0, o = !1;
|
|
@@ -6509,16 +6510,16 @@ function _iterableToArrayLimit$1(r2, l2) {
|
|
|
6509
6510
|
return a;
|
|
6510
6511
|
}
|
|
6511
6512
|
}
|
|
6512
|
-
__name(_iterableToArrayLimit
|
|
6513
|
-
function _nonIterableRest
|
|
6513
|
+
__name(_iterableToArrayLimit, "_iterableToArrayLimit");
|
|
6514
|
+
function _nonIterableRest() {
|
|
6514
6515
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6515
6516
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
6516
6517
|
}
|
|
6517
|
-
__name(_nonIterableRest
|
|
6518
|
-
function _slicedToArray
|
|
6519
|
-
return _arrayWithHoles
|
|
6518
|
+
__name(_nonIterableRest, "_nonIterableRest");
|
|
6519
|
+
function _slicedToArray(r2, e2) {
|
|
6520
|
+
return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e2) || _unsupportedIterableToArray(r2, e2) || _nonIterableRest();
|
|
6520
6521
|
}
|
|
6521
|
-
__name(_slicedToArray
|
|
6522
|
+
__name(_slicedToArray, "_slicedToArray");
|
|
6522
6523
|
function _objectWithoutPropertiesLoose(r2, e2) {
|
|
6523
6524
|
if (r2 == null) return {};
|
|
6524
6525
|
var t2 = {};
|
|
@@ -6539,41 +6540,41 @@ function _objectWithoutProperties(e2, t2) {
|
|
|
6539
6540
|
return i;
|
|
6540
6541
|
}
|
|
6541
6542
|
__name(_objectWithoutProperties, "_objectWithoutProperties");
|
|
6542
|
-
function _typeof
|
|
6543
|
+
function _typeof(o) {
|
|
6543
6544
|
"@babel/helpers - typeof";
|
|
6544
|
-
return _typeof
|
|
6545
|
+
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o2) {
|
|
6545
6546
|
return typeof o2;
|
|
6546
6547
|
} : function(o2) {
|
|
6547
6548
|
return o2 && typeof Symbol == "function" && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
6548
|
-
}, _typeof
|
|
6549
|
+
}, _typeof(o);
|
|
6549
6550
|
}
|
|
6550
|
-
__name(_typeof
|
|
6551
|
-
function toPrimitive
|
|
6552
|
-
if (_typeof
|
|
6551
|
+
__name(_typeof, "_typeof");
|
|
6552
|
+
function toPrimitive(t2, r2) {
|
|
6553
|
+
if (_typeof(t2) != "object" || !t2) return t2;
|
|
6553
6554
|
var e2 = t2[Symbol.toPrimitive];
|
|
6554
6555
|
if (e2 !== void 0) {
|
|
6555
6556
|
var i = e2.call(t2, r2 || "default");
|
|
6556
|
-
if (_typeof
|
|
6557
|
+
if (_typeof(i) != "object") return i;
|
|
6557
6558
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
6558
6559
|
}
|
|
6559
6560
|
return (r2 === "string" ? String : Number)(t2);
|
|
6560
6561
|
}
|
|
6561
|
-
__name(toPrimitive
|
|
6562
|
-
function toPropertyKey
|
|
6563
|
-
var i = toPrimitive
|
|
6564
|
-
return _typeof
|
|
6562
|
+
__name(toPrimitive, "toPrimitive");
|
|
6563
|
+
function toPropertyKey(t2) {
|
|
6564
|
+
var i = toPrimitive(t2, "string");
|
|
6565
|
+
return _typeof(i) == "symbol" ? i : i + "";
|
|
6565
6566
|
}
|
|
6566
|
-
__name(toPropertyKey
|
|
6567
|
-
function _defineProperty
|
|
6568
|
-
return (r2 = toPropertyKey
|
|
6567
|
+
__name(toPropertyKey, "toPropertyKey");
|
|
6568
|
+
function _defineProperty(e2, r2, t2) {
|
|
6569
|
+
return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, {
|
|
6569
6570
|
value: t2,
|
|
6570
6571
|
enumerable: !0,
|
|
6571
6572
|
configurable: !0,
|
|
6572
6573
|
writable: !0
|
|
6573
6574
|
}) : e2[r2] = t2, e2;
|
|
6574
6575
|
}
|
|
6575
|
-
__name(_defineProperty
|
|
6576
|
-
function ownKeys
|
|
6576
|
+
__name(_defineProperty, "_defineProperty");
|
|
6577
|
+
function ownKeys(e2, r2) {
|
|
6577
6578
|
var t2 = Object.keys(e2);
|
|
6578
6579
|
if (Object.getOwnPropertySymbols) {
|
|
6579
6580
|
var o = Object.getOwnPropertySymbols(e2);
|
|
@@ -6583,19 +6584,19 @@ function ownKeys$1(e2, r2) {
|
|
|
6583
6584
|
}
|
|
6584
6585
|
return t2;
|
|
6585
6586
|
}
|
|
6586
|
-
__name(ownKeys
|
|
6587
|
-
function _objectSpread2
|
|
6587
|
+
__name(ownKeys, "ownKeys");
|
|
6588
|
+
function _objectSpread2(e2) {
|
|
6588
6589
|
for (var r2 = 1; r2 < arguments.length; r2++) {
|
|
6589
6590
|
var t2 = arguments[r2] != null ? arguments[r2] : {};
|
|
6590
|
-
r2 % 2 ? ownKeys
|
|
6591
|
-
_defineProperty
|
|
6592
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys
|
|
6591
|
+
r2 % 2 ? ownKeys(Object(t2), !0).forEach(function(r3) {
|
|
6592
|
+
_defineProperty(e2, r3, t2[r3]);
|
|
6593
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys(Object(t2)).forEach(function(r3) {
|
|
6593
6594
|
Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3));
|
|
6594
6595
|
});
|
|
6595
6596
|
}
|
|
6596
6597
|
return e2;
|
|
6597
6598
|
}
|
|
6598
|
-
__name(_objectSpread2
|
|
6599
|
+
__name(_objectSpread2, "_objectSpread2");
|
|
6599
6600
|
function _extends() {
|
|
6600
6601
|
return _extends = Object.assign ? Object.assign.bind() : function(n2) {
|
|
6601
6602
|
for (var e2 = 1; e2 < arguments.length; e2++) {
|
|
@@ -6646,15 +6647,6 @@ var classnames = { exports: {} };
|
|
|
6646
6647
|
})(classnames);
|
|
6647
6648
|
var classnamesExports = classnames.exports;
|
|
6648
6649
|
const clsx = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
6649
|
-
function _typeof(o) {
|
|
6650
|
-
"@babel/helpers - typeof";
|
|
6651
|
-
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o2) {
|
|
6652
|
-
return typeof o2;
|
|
6653
|
-
} : function(o2) {
|
|
6654
|
-
return o2 && typeof Symbol == "function" && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
6655
|
-
}, _typeof(o);
|
|
6656
|
-
}
|
|
6657
|
-
__name(_typeof, "_typeof");
|
|
6658
6650
|
function isDOM(node) {
|
|
6659
6651
|
return node instanceof HTMLElement || node instanceof SVGElement;
|
|
6660
6652
|
}
|
|
@@ -6795,7 +6787,7 @@ __name(_classCallCheck, "_classCallCheck");
|
|
|
6795
6787
|
function _defineProperties(e2, r2) {
|
|
6796
6788
|
for (var t2 = 0; t2 < r2.length; t2++) {
|
|
6797
6789
|
var o = r2[t2];
|
|
6798
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e2, toPropertyKey
|
|
6790
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e2, toPropertyKey(o.key), o);
|
|
6799
6791
|
}
|
|
6800
6792
|
}
|
|
6801
6793
|
__name(_defineProperties, "_defineProperties");
|
|
@@ -6847,7 +6839,7 @@ function _assertThisInitialized(e2) {
|
|
|
6847
6839
|
}
|
|
6848
6840
|
__name(_assertThisInitialized, "_assertThisInitialized");
|
|
6849
6841
|
function _possibleConstructorReturn(t2, e2) {
|
|
6850
|
-
if (e2 && (_typeof
|
|
6842
|
+
if (e2 && (_typeof(e2) == "object" || typeof e2 == "function")) return e2;
|
|
6851
6843
|
if (e2 !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
6852
6844
|
return _assertThisInitialized(t2);
|
|
6853
6845
|
}
|
|
@@ -6888,52 +6880,6 @@ function useEvent(callback) {
|
|
|
6888
6880
|
return memoFn;
|
|
6889
6881
|
}
|
|
6890
6882
|
__name(useEvent, "useEvent");
|
|
6891
|
-
function _arrayWithHoles(r2) {
|
|
6892
|
-
if (Array.isArray(r2)) return r2;
|
|
6893
|
-
}
|
|
6894
|
-
__name(_arrayWithHoles, "_arrayWithHoles");
|
|
6895
|
-
function _iterableToArrayLimit(r2, l2) {
|
|
6896
|
-
var t2 = r2 == null ? null : typeof Symbol < "u" && r2[Symbol.iterator] || r2["@@iterator"];
|
|
6897
|
-
if (t2 != null) {
|
|
6898
|
-
var e2, n2, i, u2, a = [], f2 = !0, o = !1;
|
|
6899
|
-
try {
|
|
6900
|
-
if (i = (t2 = t2.call(r2)).next, l2 !== 0) for (; !(f2 = (e2 = i.call(t2)).done) && (a.push(e2.value), a.length !== l2); f2 = !0) ;
|
|
6901
|
-
} catch (r3) {
|
|
6902
|
-
o = !0, n2 = r3;
|
|
6903
|
-
} finally {
|
|
6904
|
-
try {
|
|
6905
|
-
if (!f2 && t2.return != null && (u2 = t2.return(), Object(u2) !== u2)) return;
|
|
6906
|
-
} finally {
|
|
6907
|
-
if (o) throw n2;
|
|
6908
|
-
}
|
|
6909
|
-
}
|
|
6910
|
-
return a;
|
|
6911
|
-
}
|
|
6912
|
-
}
|
|
6913
|
-
__name(_iterableToArrayLimit, "_iterableToArrayLimit");
|
|
6914
|
-
function _arrayLikeToArray(r2, a) {
|
|
6915
|
-
(a == null || a > r2.length) && (a = r2.length);
|
|
6916
|
-
for (var e2 = 0, n2 = Array(a); e2 < a; e2++) n2[e2] = r2[e2];
|
|
6917
|
-
return n2;
|
|
6918
|
-
}
|
|
6919
|
-
__name(_arrayLikeToArray, "_arrayLikeToArray");
|
|
6920
|
-
function _unsupportedIterableToArray(r2, a) {
|
|
6921
|
-
if (r2) {
|
|
6922
|
-
if (typeof r2 == "string") return _arrayLikeToArray(r2, a);
|
|
6923
|
-
var t2 = {}.toString.call(r2).slice(8, -1);
|
|
6924
|
-
return t2 === "Object" && r2.constructor && (t2 = r2.constructor.name), t2 === "Map" || t2 === "Set" ? Array.from(r2) : t2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r2, a) : void 0;
|
|
6925
|
-
}
|
|
6926
|
-
}
|
|
6927
|
-
__name(_unsupportedIterableToArray, "_unsupportedIterableToArray");
|
|
6928
|
-
function _nonIterableRest() {
|
|
6929
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6930
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
6931
|
-
}
|
|
6932
|
-
__name(_nonIterableRest, "_nonIterableRest");
|
|
6933
|
-
function _slicedToArray(r2, e2) {
|
|
6934
|
-
return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e2) || _unsupportedIterableToArray(r2, e2) || _nonIterableRest();
|
|
6935
|
-
}
|
|
6936
|
-
__name(_slicedToArray, "_slicedToArray");
|
|
6937
6883
|
function canUseDom() {
|
|
6938
6884
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
6939
6885
|
}
|
|
@@ -6951,54 +6897,6 @@ function useSafeState(defaultValue) {
|
|
|
6951
6897
|
return __name(safeSetState, "safeSetState"), [value, safeSetState];
|
|
6952
6898
|
}
|
|
6953
6899
|
__name(useSafeState, "useSafeState");
|
|
6954
|
-
function toPrimitive(t2, r2) {
|
|
6955
|
-
if (_typeof(t2) != "object" || !t2) return t2;
|
|
6956
|
-
var e2 = t2[Symbol.toPrimitive];
|
|
6957
|
-
if (e2 !== void 0) {
|
|
6958
|
-
var i = e2.call(t2, r2 || "default");
|
|
6959
|
-
if (_typeof(i) != "object") return i;
|
|
6960
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
6961
|
-
}
|
|
6962
|
-
return (r2 === "string" ? String : Number)(t2);
|
|
6963
|
-
}
|
|
6964
|
-
__name(toPrimitive, "toPrimitive");
|
|
6965
|
-
function toPropertyKey(t2) {
|
|
6966
|
-
var i = toPrimitive(t2, "string");
|
|
6967
|
-
return _typeof(i) == "symbol" ? i : i + "";
|
|
6968
|
-
}
|
|
6969
|
-
__name(toPropertyKey, "toPropertyKey");
|
|
6970
|
-
function _defineProperty(e2, r2, t2) {
|
|
6971
|
-
return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, {
|
|
6972
|
-
value: t2,
|
|
6973
|
-
enumerable: !0,
|
|
6974
|
-
configurable: !0,
|
|
6975
|
-
writable: !0
|
|
6976
|
-
}) : e2[r2] = t2, e2;
|
|
6977
|
-
}
|
|
6978
|
-
__name(_defineProperty, "_defineProperty");
|
|
6979
|
-
function ownKeys(e2, r2) {
|
|
6980
|
-
var t2 = Object.keys(e2);
|
|
6981
|
-
if (Object.getOwnPropertySymbols) {
|
|
6982
|
-
var o = Object.getOwnPropertySymbols(e2);
|
|
6983
|
-
r2 && (o = o.filter(function(r3) {
|
|
6984
|
-
return Object.getOwnPropertyDescriptor(e2, r3).enumerable;
|
|
6985
|
-
})), t2.push.apply(t2, o);
|
|
6986
|
-
}
|
|
6987
|
-
return t2;
|
|
6988
|
-
}
|
|
6989
|
-
__name(ownKeys, "ownKeys");
|
|
6990
|
-
function _objectSpread2(e2) {
|
|
6991
|
-
for (var r2 = 1; r2 < arguments.length; r2++) {
|
|
6992
|
-
var t2 = arguments[r2] != null ? arguments[r2] : {};
|
|
6993
|
-
r2 % 2 ? ownKeys(Object(t2), !0).forEach(function(r3) {
|
|
6994
|
-
_defineProperty(e2, r3, t2[r3]);
|
|
6995
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys(Object(t2)).forEach(function(r3) {
|
|
6996
|
-
Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3));
|
|
6997
|
-
});
|
|
6998
|
-
}
|
|
6999
|
-
return e2;
|
|
7000
|
-
}
|
|
7001
|
-
__name(_objectSpread2, "_objectSpread2");
|
|
7002
6900
|
function useSyncState(defaultValue) {
|
|
7003
6901
|
var _React$useReducer = React.useReducer(function(x) {
|
|
7004
6902
|
return x + 1;
|
|
@@ -7046,7 +6944,7 @@ __name(getVendorPrefixedEventName, "getVendorPrefixedEventName");
|
|
|
7046
6944
|
var internalAnimationEndName = getVendorPrefixedEventName("animationend"), internalTransitionEndName = getVendorPrefixedEventName("transitionend"), supportTransition = !!(internalAnimationEndName && internalTransitionEndName), animationEndName = internalAnimationEndName || "animationend", transitionEndName = internalTransitionEndName || "transitionend";
|
|
7047
6945
|
function getTransitionName(transitionName, transitionType) {
|
|
7048
6946
|
if (!transitionName) return null;
|
|
7049
|
-
if (_typeof
|
|
6947
|
+
if (_typeof(transitionName) === "object") {
|
|
7050
6948
|
var type = transitionType.replace(/-\w/g, function(match2) {
|
|
7051
6949
|
return match2[1].toUpperCase();
|
|
7052
6950
|
});
|
|
@@ -7135,7 +7033,7 @@ function isActive(step) {
|
|
|
7135
7033
|
}
|
|
7136
7034
|
__name(isActive, "isActive");
|
|
7137
7035
|
const useStepQueue = /* @__PURE__ */ __name(function(status, prepareOnly, callback) {
|
|
7138
|
-
var _useState = useSafeState(STEP_NONE), _useState2 = _slicedToArray
|
|
7036
|
+
var _useState = useSafeState(STEP_NONE), _useState2 = _slicedToArray(_useState, 2), step = _useState2[0], setStep = _useState2[1], _useNextFrame = useNextFrame(), _useNextFrame2 = _slicedToArray(_useNextFrame, 2), nextFrame = _useNextFrame2[0], cancelNextFrame = _useNextFrame2[1];
|
|
7139
7037
|
function startQueue() {
|
|
7140
7038
|
setStep(STEP_PREPARE, !0);
|
|
7141
7039
|
}
|
|
@@ -7158,7 +7056,7 @@ const useStepQueue = /* @__PURE__ */ __name(function(status, prepareOnly, callba
|
|
|
7158
7056
|
}, []), [startQueue, step];
|
|
7159
7057
|
}, "useStepQueue");
|
|
7160
7058
|
function useStatus(supportMotion, visible, getElement, _ref) {
|
|
7161
|
-
var _ref$motionEnter = _ref.motionEnter, motionEnter = _ref$motionEnter === void 0 ? !0 : _ref$motionEnter, _ref$motionAppear = _ref.motionAppear, motionAppear = _ref$motionAppear === void 0 ? !0 : _ref$motionAppear, _ref$motionLeave = _ref.motionLeave, motionLeave = _ref$motionLeave === void 0 ? !0 : _ref$motionLeave, motionDeadline = _ref.motionDeadline, motionLeaveImmediately = _ref.motionLeaveImmediately, onAppearPrepare = _ref.onAppearPrepare, onEnterPrepare = _ref.onEnterPrepare, onLeavePrepare = _ref.onLeavePrepare, onAppearStart = _ref.onAppearStart, onEnterStart = _ref.onEnterStart, onLeaveStart = _ref.onLeaveStart, onAppearActive = _ref.onAppearActive, onEnterActive = _ref.onEnterActive, onLeaveActive = _ref.onLeaveActive, onAppearEnd = _ref.onAppearEnd, onEnterEnd = _ref.onEnterEnd, onLeaveEnd = _ref.onLeaveEnd, onVisibleChanged = _ref.onVisibleChanged, _useState = useSafeState(), _useState2 = _slicedToArray
|
|
7059
|
+
var _ref$motionEnter = _ref.motionEnter, motionEnter = _ref$motionEnter === void 0 ? !0 : _ref$motionEnter, _ref$motionAppear = _ref.motionAppear, motionAppear = _ref$motionAppear === void 0 ? !0 : _ref$motionAppear, _ref$motionLeave = _ref.motionLeave, motionLeave = _ref$motionLeave === void 0 ? !0 : _ref$motionLeave, motionDeadline = _ref.motionDeadline, motionLeaveImmediately = _ref.motionLeaveImmediately, onAppearPrepare = _ref.onAppearPrepare, onEnterPrepare = _ref.onEnterPrepare, onLeavePrepare = _ref.onLeavePrepare, onAppearStart = _ref.onAppearStart, onEnterStart = _ref.onEnterStart, onLeaveStart = _ref.onLeaveStart, onAppearActive = _ref.onAppearActive, onEnterActive = _ref.onEnterActive, onLeaveActive = _ref.onLeaveActive, onAppearEnd = _ref.onAppearEnd, onEnterEnd = _ref.onEnterEnd, onLeaveEnd = _ref.onLeaveEnd, onVisibleChanged = _ref.onVisibleChanged, _useState = useSafeState(), _useState2 = _slicedToArray(_useState, 2), asyncVisible = _useState2[0], setAsyncVisible = _useState2[1], _useSyncState = useSyncState(STATUS_NONE), _useSyncState2 = _slicedToArray(_useSyncState, 2), getStatus = _useSyncState2[0], setStatus = _useSyncState2[1], _useState3 = useSafeState(null), _useState4 = _slicedToArray(_useState3, 2), style2 = _useState4[0], setStyle = _useState4[1], currentStatus = getStatus(), mountedRef = useRef(!1), deadlineRef = useRef(null);
|
|
7162
7060
|
function getDomElement() {
|
|
7163
7061
|
return getElement();
|
|
7164
7062
|
}
|
|
@@ -7177,14 +7075,14 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
7177
7075
|
status === STATUS_APPEAR && currentActive ? canEnd = onAppearEnd == null ? void 0 : onAppearEnd(element2, event) : status === STATUS_ENTER && currentActive ? canEnd = onEnterEnd == null ? void 0 : onEnterEnd(element2, event) : status === STATUS_LEAVE && currentActive && (canEnd = onLeaveEnd == null ? void 0 : onLeaveEnd(element2, event)), currentActive && canEnd !== !1 && updateMotionEndStatus();
|
|
7178
7076
|
}
|
|
7179
7077
|
}
|
|
7180
|
-
}), _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd), _useDomMotionEvents2 = _slicedToArray
|
|
7078
|
+
}), _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd), _useDomMotionEvents2 = _slicedToArray(_useDomMotionEvents, 1), patchMotionEvents = _useDomMotionEvents2[0], getEventHandlers = /* @__PURE__ */ __name(function(targetStatus) {
|
|
7181
7079
|
switch (targetStatus) {
|
|
7182
7080
|
case STATUS_APPEAR:
|
|
7183
|
-
return _defineProperty
|
|
7081
|
+
return _defineProperty(_defineProperty(_defineProperty({}, STEP_PREPARE, onAppearPrepare), STEP_START, onAppearStart), STEP_ACTIVE, onAppearActive);
|
|
7184
7082
|
case STATUS_ENTER:
|
|
7185
|
-
return _defineProperty
|
|
7083
|
+
return _defineProperty(_defineProperty(_defineProperty({}, STEP_PREPARE, onEnterPrepare), STEP_START, onEnterStart), STEP_ACTIVE, onEnterActive);
|
|
7186
7084
|
case STATUS_LEAVE:
|
|
7187
|
-
return _defineProperty
|
|
7085
|
+
return _defineProperty(_defineProperty(_defineProperty({}, STEP_PREPARE, onLeavePrepare), STEP_START, onLeaveStart), STEP_ACTIVE, onLeaveActive);
|
|
7188
7086
|
default:
|
|
7189
7087
|
return {};
|
|
7190
7088
|
}
|
|
@@ -7204,7 +7102,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
7204
7102
|
deadline: !0
|
|
7205
7103
|
});
|
|
7206
7104
|
}, motionDeadline))), step === STEP_PREPARED && updateMotionEndStatus(), DoStep;
|
|
7207
|
-
}), _useStepQueue2 = _slicedToArray
|
|
7105
|
+
}), _useStepQueue2 = _slicedToArray(_useStepQueue, 2), startStep = _useStepQueue2[0], step = _useStepQueue2[1], active = isActive(step);
|
|
7208
7106
|
activeRef.current = active, useIsomorphicLayoutEffect(function() {
|
|
7209
7107
|
setAsyncVisible(visible);
|
|
7210
7108
|
var isMounted = mountedRef.current;
|
|
@@ -7228,14 +7126,14 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
7228
7126
|
asyncVisible && (firstMountChangeRef.current = !0), asyncVisible !== void 0 && currentStatus === STATUS_NONE && ((firstMountChangeRef.current || asyncVisible) && (onVisibleChanged == null || onVisibleChanged(asyncVisible)), firstMountChangeRef.current = !0);
|
|
7229
7127
|
}, [asyncVisible, currentStatus]);
|
|
7230
7128
|
var mergedStyle = style2;
|
|
7231
|
-
return eventHandlers[STEP_PREPARE] && step === STEP_START && (mergedStyle = _objectSpread2
|
|
7129
|
+
return eventHandlers[STEP_PREPARE] && step === STEP_START && (mergedStyle = _objectSpread2({
|
|
7232
7130
|
transition: "none"
|
|
7233
7131
|
}, mergedStyle)), [currentStatus, step, mergedStyle, asyncVisible != null ? asyncVisible : visible];
|
|
7234
7132
|
}
|
|
7235
7133
|
__name(useStatus, "useStatus");
|
|
7236
7134
|
function genCSSMotion(config) {
|
|
7237
7135
|
var transitionSupport = config;
|
|
7238
|
-
_typeof
|
|
7136
|
+
_typeof(config) === "object" && (transitionSupport = config.transitionSupport);
|
|
7239
7137
|
function isSupportTransition(props, contextMotion) {
|
|
7240
7138
|
return !!(props.motionName && transitionSupport && contextMotion !== !1);
|
|
7241
7139
|
}
|
|
@@ -7250,19 +7148,19 @@ function genCSSMotion(config) {
|
|
|
7250
7148
|
}
|
|
7251
7149
|
}
|
|
7252
7150
|
__name(getDomElement, "getDomElement");
|
|
7253
|
-
var _useStatus = useStatus(supportMotion, visible, getDomElement, props), _useStatus2 = _slicedToArray
|
|
7151
|
+
var _useStatus = useStatus(supportMotion, visible, getDomElement, props), _useStatus2 = _slicedToArray(_useStatus, 4), status = _useStatus2[0], statusStep = _useStatus2[1], statusStyle = _useStatus2[2], mergedVisible = _useStatus2[3], renderedRef = React.useRef(mergedVisible);
|
|
7254
7152
|
mergedVisible && (renderedRef.current = !0);
|
|
7255
7153
|
var setNodeRef = React.useCallback(function(node) {
|
|
7256
7154
|
nodeRef.current = node, fillRef(ref, node);
|
|
7257
|
-
}, [ref]), motionChildren, mergedProps = _objectSpread2
|
|
7155
|
+
}, [ref]), motionChildren, mergedProps = _objectSpread2(_objectSpread2({}, eventProps), {}, {
|
|
7258
7156
|
visible
|
|
7259
7157
|
});
|
|
7260
7158
|
if (!children)
|
|
7261
7159
|
motionChildren = null;
|
|
7262
7160
|
else if (status === STATUS_NONE)
|
|
7263
|
-
mergedVisible ? motionChildren = children(_objectSpread2
|
|
7161
|
+
mergedVisible ? motionChildren = children(_objectSpread2({}, mergedProps), setNodeRef) : !removeOnLeave && renderedRef.current && leavedClassName ? motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
|
|
7264
7162
|
className: leavedClassName
|
|
7265
|
-
}), setNodeRef) : forceRender || !removeOnLeave && !leavedClassName ? motionChildren = children(_objectSpread2
|
|
7163
|
+
}), setNodeRef) : forceRender || !removeOnLeave && !leavedClassName ? motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
|
|
7266
7164
|
style: {
|
|
7267
7165
|
display: "none"
|
|
7268
7166
|
}
|
|
@@ -7271,8 +7169,8 @@ function genCSSMotion(config) {
|
|
|
7271
7169
|
var statusSuffix;
|
|
7272
7170
|
statusStep === STEP_PREPARE ? statusSuffix = "prepare" : isActive(statusStep) ? statusSuffix = "active" : statusStep === STEP_START && (statusSuffix = "start");
|
|
7273
7171
|
var motionCls = getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix));
|
|
7274
|
-
motionChildren = children(_objectSpread2
|
|
7275
|
-
className: clsx(getTransitionName(motionName, status), _defineProperty
|
|
7172
|
+
motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
|
|
7173
|
+
className: clsx(getTransitionName(motionName, status), _defineProperty(_defineProperty({}, motionCls, motionCls && statusSuffix), motionName, typeof motionName == "string")),
|
|
7276
7174
|
style: statusStyle
|
|
7277
7175
|
}), setNodeRef);
|
|
7278
7176
|
}
|
|
@@ -7293,9 +7191,9 @@ const CSSMotion = genCSSMotion(supportTransition);
|
|
|
7293
7191
|
var STATUS_ADD = "add", STATUS_KEEP = "keep", STATUS_REMOVE = "remove", STATUS_REMOVED = "removed";
|
|
7294
7192
|
function wrapKeyToObject(key) {
|
|
7295
7193
|
var keyObj;
|
|
7296
|
-
return key && _typeof
|
|
7194
|
+
return key && _typeof(key) === "object" && "key" in key ? keyObj = key : keyObj = {
|
|
7297
7195
|
key
|
|
7298
|
-
}, _objectSpread2
|
|
7196
|
+
}, _objectSpread2(_objectSpread2({}, keyObj), {}, {
|
|
7299
7197
|
key: String(keyObj.key)
|
|
7300
7198
|
});
|
|
7301
7199
|
}
|
|
@@ -7312,20 +7210,20 @@ function diffKeys() {
|
|
|
7312
7210
|
var currentKeyObj = currentKeyObjects[i];
|
|
7313
7211
|
if (currentKeyObj.key === keyObj.key) {
|
|
7314
7212
|
currentIndex < i && (list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function(obj) {
|
|
7315
|
-
return _objectSpread2
|
|
7213
|
+
return _objectSpread2(_objectSpread2({}, obj), {}, {
|
|
7316
7214
|
status: STATUS_ADD
|
|
7317
7215
|
});
|
|
7318
|
-
})), currentIndex = i), list.push(_objectSpread2
|
|
7216
|
+
})), currentIndex = i), list.push(_objectSpread2(_objectSpread2({}, currentKeyObj), {}, {
|
|
7319
7217
|
status: STATUS_KEEP
|
|
7320
7218
|
})), currentIndex += 1, hit = !0;
|
|
7321
7219
|
break;
|
|
7322
7220
|
}
|
|
7323
7221
|
}
|
|
7324
|
-
hit || list.push(_objectSpread2
|
|
7222
|
+
hit || list.push(_objectSpread2(_objectSpread2({}, keyObj), {}, {
|
|
7325
7223
|
status: STATUS_REMOVE
|
|
7326
7224
|
}));
|
|
7327
7225
|
}), currentIndex < currentLen && (list = list.concat(currentKeyObjects.slice(currentIndex).map(function(obj) {
|
|
7328
|
-
return _objectSpread2
|
|
7226
|
+
return _objectSpread2(_objectSpread2({}, obj), {}, {
|
|
7329
7227
|
status: STATUS_ADD
|
|
7330
7228
|
});
|
|
7331
7229
|
})));
|
|
@@ -7357,11 +7255,11 @@ function genCSSMotionList(transitionSupport) {
|
|
|
7357
7255
|
_classCallCheck(this, CSSMotionList3);
|
|
7358
7256
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
|
|
7359
7257
|
args[_key] = arguments[_key];
|
|
7360
|
-
return _this = _super.call.apply(_super, [this].concat(args)), _defineProperty
|
|
7258
|
+
return _this = _super.call.apply(_super, [this].concat(args)), _defineProperty(_assertThisInitialized(_this), "state", {
|
|
7361
7259
|
keyEntities: []
|
|
7362
|
-
}), _defineProperty
|
|
7260
|
+
}), _defineProperty(_assertThisInitialized(_this), "removeKey", function(removeKey) {
|
|
7363
7261
|
var keyEntities = _this.state.keyEntities, nextKeyEntities = keyEntities.map(function(entity) {
|
|
7364
|
-
return entity.key !== removeKey ? entity : _objectSpread2
|
|
7262
|
+
return entity.key !== removeKey ? entity : _objectSpread2(_objectSpread2({}, entity), {}, {
|
|
7365
7263
|
status: STATUS_REMOVED
|
|
7366
7264
|
});
|
|
7367
7265
|
});
|
|
@@ -7394,7 +7292,7 @@ function genCSSMotionList(transitionSupport) {
|
|
|
7394
7292
|
}
|
|
7395
7293
|
}, "onVisibleChanged")
|
|
7396
7294
|
}), function(props, ref) {
|
|
7397
|
-
return children(_objectSpread2
|
|
7295
|
+
return children(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
7398
7296
|
index
|
|
7399
7297
|
}), ref);
|
|
7400
7298
|
});
|
|
@@ -7416,7 +7314,7 @@ function genCSSMotionList(transitionSupport) {
|
|
|
7416
7314
|
}, "getDerivedStateFromProps")
|
|
7417
7315
|
}]), CSSMotionList3;
|
|
7418
7316
|
}(React.Component);
|
|
7419
|
-
return _defineProperty
|
|
7317
|
+
return _defineProperty(CSSMotionList2, "defaultProps", {
|
|
7420
7318
|
component: "div"
|
|
7421
7319
|
}), CSSMotionList2;
|
|
7422
7320
|
}
|
|
@@ -7976,7 +7874,7 @@ function pickAttrs(props) {
|
|
|
7976
7874
|
}
|
|
7977
7875
|
__name(pickAttrs, "pickAttrs");
|
|
7978
7876
|
var Notify = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
7979
|
-
var prefixCls = props.prefixCls, style2 = props.style, className = props.className, _props$duration = props.duration, duration = _props$duration === void 0 ? 4.5 : _props$duration, showProgress = props.showProgress, _props$pauseOnHover = props.pauseOnHover, pauseOnHover = _props$pauseOnHover === void 0 ? !0 : _props$pauseOnHover, eventKey = props.eventKey, content = props.content, closable = props.closable, _props$closeIcon = props.closeIcon, closeIcon = _props$closeIcon === void 0 ? "x" : _props$closeIcon, divProps = props.props, onClick = props.onClick, onNoticeClose = props.onNoticeClose, times = props.times, forcedHovering = props.hovering, _React$useState = React.useState(!1), _React$useState2 = _slicedToArray
|
|
7877
|
+
var prefixCls = props.prefixCls, style2 = props.style, className = props.className, _props$duration = props.duration, duration = _props$duration === void 0 ? 4.5 : _props$duration, showProgress = props.showProgress, _props$pauseOnHover = props.pauseOnHover, pauseOnHover = _props$pauseOnHover === void 0 ? !0 : _props$pauseOnHover, eventKey = props.eventKey, content = props.content, closable = props.closable, _props$closeIcon = props.closeIcon, closeIcon = _props$closeIcon === void 0 ? "x" : _props$closeIcon, divProps = props.props, onClick = props.onClick, onNoticeClose = props.onNoticeClose, times = props.times, forcedHovering = props.hovering, _React$useState = React.useState(!1), _React$useState2 = _slicedToArray(_React$useState, 2), hovering = _React$useState2[0], setHovering = _React$useState2[1], _React$useState3 = React.useState(0), _React$useState4 = _slicedToArray(_React$useState3, 2), percent = _React$useState4[0], setPercent = _React$useState4[1], _React$useState5 = React.useState(0), _React$useState6 = _slicedToArray(_React$useState5, 2), spentTime = _React$useState6[0], setSpentTime = _React$useState6[1], mergedHovering = forcedHovering || hovering, mergedShowProgress = duration > 0 && showProgress, onInternalClose = /* @__PURE__ */ __name(function() {
|
|
7980
7878
|
onNoticeClose(eventKey);
|
|
7981
7879
|
}, "onInternalClose"), onCloseKeyDown = /* @__PURE__ */ __name(function(e2) {
|
|
7982
7880
|
(e2.key === "Enter" || e2.code === "Enter" || e2.keyCode === KeyCode.ENTER) && onInternalClose();
|
|
@@ -8004,13 +7902,13 @@ var Notify = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
8004
7902
|
}
|
|
8005
7903
|
}, [duration, spentTime, mergedHovering, mergedShowProgress, times]);
|
|
8006
7904
|
var closableObj = React.useMemo(function() {
|
|
8007
|
-
return _typeof
|
|
7905
|
+
return _typeof(closable) === "object" && closable !== null ? closable : closable ? {
|
|
8008
7906
|
closeIcon
|
|
8009
7907
|
} : {};
|
|
8010
7908
|
}, [closable, closeIcon]), ariaProps = pickAttrs(closableObj, !0), validPercent = 100 - (!percent || percent < 0 ? 0 : percent > 100 ? 100 : percent), noticePrefixCls = "".concat(prefixCls, "-notice");
|
|
8011
7909
|
return /* @__PURE__ */ React.createElement("div", _extends({}, divProps, {
|
|
8012
7910
|
ref,
|
|
8013
|
-
className: clsx(noticePrefixCls, className, _defineProperty
|
|
7911
|
+
className: clsx(noticePrefixCls, className, _defineProperty({}, "".concat(noticePrefixCls, "-closable"), closable)),
|
|
8014
7912
|
style: style2,
|
|
8015
7913
|
onMouseEnter: /* @__PURE__ */ __name(function(e2) {
|
|
8016
7914
|
var _divProps$onMouseEnte;
|
|
@@ -8043,18 +7941,18 @@ var Notify = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
8043
7941
|
threshold: DEFAULT_THRESHOLD,
|
|
8044
7942
|
gap: DEFAULT_GAP
|
|
8045
7943
|
};
|
|
8046
|
-
if (config && _typeof
|
|
7944
|
+
if (config && _typeof(config) === "object") {
|
|
8047
7945
|
var _config$offset, _config$threshold, _config$gap;
|
|
8048
7946
|
result.offset = (_config$offset = config.offset) !== null && _config$offset !== void 0 ? _config$offset : DEFAULT_OFFSET, result.threshold = (_config$threshold = config.threshold) !== null && _config$threshold !== void 0 ? _config$threshold : DEFAULT_THRESHOLD, result.gap = (_config$gap = config.gap) !== null && _config$gap !== void 0 ? _config$gap : DEFAULT_GAP;
|
|
8049
7947
|
}
|
|
8050
7948
|
return [!!config, result];
|
|
8051
7949
|
}, "useStack"), _excluded$1 = ["className", "style", "classNames", "styles"], NoticeList = /* @__PURE__ */ __name(function(props) {
|
|
8052
|
-
var configList = props.configList, placement = props.placement, prefixCls = props.prefixCls, className = props.className, style2 = props.style, motion = props.motion, onAllNoticeRemoved = props.onAllNoticeRemoved, onNoticeClose = props.onNoticeClose, stackConfig = props.stack, _useContext = useContext(NotificationContext), ctxCls = _useContext.classNames, dictRef = useRef({}), _useState = useState(null), _useState2 = _slicedToArray
|
|
7950
|
+
var configList = props.configList, placement = props.placement, prefixCls = props.prefixCls, className = props.className, style2 = props.style, motion = props.motion, onAllNoticeRemoved = props.onAllNoticeRemoved, onNoticeClose = props.onNoticeClose, stackConfig = props.stack, _useContext = useContext(NotificationContext), ctxCls = _useContext.classNames, dictRef = useRef({}), _useState = useState(null), _useState2 = _slicedToArray(_useState, 2), latestNotice = _useState2[0], setLatestNotice = _useState2[1], _useState3 = useState([]), _useState4 = _slicedToArray(_useState3, 2), hoverKeys = _useState4[0], setHoverKeys = _useState4[1], keys = configList.map(function(config) {
|
|
8053
7951
|
return {
|
|
8054
7952
|
config,
|
|
8055
7953
|
key: String(config.key)
|
|
8056
7954
|
};
|
|
8057
|
-
}), _useStack = useStack(stackConfig), _useStack2 = _slicedToArray
|
|
7955
|
+
}), _useStack = useStack(stackConfig), _useStack2 = _slicedToArray(_useStack, 2), stack = _useStack2[0], _useStack2$ = _useStack2[1], offset = _useStack2$.offset, threshold = _useStack2$.threshold, gap = _useStack2$.gap, expanded = stack && (hoverKeys.length > 0 || keys.length <= threshold), placementMotion = typeof motion == "function" ? motion(placement) : motion;
|
|
8058
7956
|
return useEffect(function() {
|
|
8059
7957
|
stack && hoverKeys.length > 1 && setHoverKeys(function(prev) {
|
|
8060
7958
|
return prev.filter(function(key) {
|
|
@@ -8072,7 +7970,7 @@ var Notify = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
8072
7970
|
}
|
|
8073
7971
|
}, [keys, stack]), /* @__PURE__ */ React__default.createElement(CSSMotionList, _extends({
|
|
8074
7972
|
key: placement,
|
|
8075
|
-
className: clsx(prefixCls, "".concat(prefixCls, "-").concat(placement), ctxCls == null ? void 0 : ctxCls.list, className, _defineProperty
|
|
7973
|
+
className: clsx(prefixCls, "".concat(prefixCls, "-").concat(placement), ctxCls == null ? void 0 : ctxCls.list, className, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-stack"), !!stack), "".concat(prefixCls, "-stack-expanded"), expanded)),
|
|
8076
7974
|
style: style2,
|
|
8077
7975
|
keys,
|
|
8078
7976
|
motionAppear: !0
|
|
@@ -8101,7 +7999,7 @@ var Notify = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
8101
7999
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
8102
8000
|
ref: nodeRef,
|
|
8103
8001
|
className: clsx("".concat(prefixCls, "-notice-wrapper"), motionClassName, configClassNames == null ? void 0 : configClassNames.wrapper),
|
|
8104
|
-
style: _objectSpread2
|
|
8002
|
+
style: _objectSpread2(_objectSpread2(_objectSpread2({}, motionStyle), stackStyle), configStyles == null ? void 0 : configStyles.wrapper),
|
|
8105
8003
|
onMouseEnter: /* @__PURE__ */ __name(function() {
|
|
8106
8004
|
return setHoverKeys(function(prev) {
|
|
8107
8005
|
return prev.includes(strKey) ? prev : [].concat(_toConsumableArray(prev), [strKey]);
|
|
@@ -8131,7 +8029,7 @@ var Notify = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
8131
8029
|
})));
|
|
8132
8030
|
});
|
|
8133
8031
|
}, "NoticeList2"), Notifications = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
8134
|
-
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-notification" : _props$prefixCls, container = props.container, motion = props.motion, maxCount = props.maxCount, className = props.className, style2 = props.style, onAllRemoved = props.onAllRemoved, stack = props.stack, renderNotifications = props.renderNotifications, _React$useState = React.useState([]), _React$useState2 = _slicedToArray
|
|
8032
|
+
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-notification" : _props$prefixCls, container = props.container, motion = props.motion, maxCount = props.maxCount, className = props.className, style2 = props.style, onAllRemoved = props.onAllRemoved, stack = props.stack, renderNotifications = props.renderNotifications, _React$useState = React.useState([]), _React$useState2 = _slicedToArray(_React$useState, 2), configList = _React$useState2[0], setConfigList = _React$useState2[1], onNoticeClose = /* @__PURE__ */ __name(function(key) {
|
|
8135
8033
|
var _config$onClose, config = configList.find(function(item) {
|
|
8136
8034
|
return item.key === key;
|
|
8137
8035
|
});
|
|
@@ -8147,7 +8045,7 @@ var Notify = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
8147
8045
|
setConfigList(function(list) {
|
|
8148
8046
|
var clone = _toConsumableArray(list), index = clone.findIndex(function(item) {
|
|
8149
8047
|
return item.key === config.key;
|
|
8150
|
-
}), innerConfig = _objectSpread2
|
|
8048
|
+
}), innerConfig = _objectSpread2({}, config);
|
|
8151
8049
|
if (index >= 0) {
|
|
8152
8050
|
var _list$index;
|
|
8153
8051
|
innerConfig.times = (((_list$index = list[index]) === null || _list$index === void 0 ? void 0 : _list$index.times) || 0) + 1, clone[index] = innerConfig;
|
|
@@ -8164,7 +8062,7 @@ var Notify = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
8164
8062
|
}, "destroy")
|
|
8165
8063
|
};
|
|
8166
8064
|
});
|
|
8167
|
-
var _React$useState3 = React.useState({}), _React$useState4 = _slicedToArray
|
|
8065
|
+
var _React$useState3 = React.useState({}), _React$useState4 = _slicedToArray(_React$useState3, 2), placements = _React$useState4[0], setPlacements = _React$useState4[1];
|
|
8168
8066
|
React.useEffect(function() {
|
|
8169
8067
|
var nextPlacements = {};
|
|
8170
8068
|
configList.forEach(function(config) {
|
|
@@ -8176,7 +8074,7 @@ var Notify = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
8176
8074
|
}, [configList]);
|
|
8177
8075
|
var onAllNoticeRemoved = /* @__PURE__ */ __name(function(placement) {
|
|
8178
8076
|
setPlacements(function(originPlacements) {
|
|
8179
|
-
var clone = _objectSpread2
|
|
8077
|
+
var clone = _objectSpread2({}, originPlacements), list = clone[placement] || [];
|
|
8180
8078
|
return list.length || delete clone[placement], clone;
|
|
8181
8079
|
});
|
|
8182
8080
|
}, "onAllNoticeRemoved2"), emptyRef = React.useRef(!1);
|
|
@@ -8218,7 +8116,7 @@ function mergeConfig() {
|
|
|
8218
8116
|
}
|
|
8219
8117
|
__name(mergeConfig, "mergeConfig");
|
|
8220
8118
|
function useNotification() {
|
|
8221
|
-
var rootConfig = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _rootConfig$getContai = rootConfig.getContainer, getContainer = _rootConfig$getContai === void 0 ? defaultGetContainer : _rootConfig$getContai, motion = rootConfig.motion, prefixCls = rootConfig.prefixCls, maxCount = rootConfig.maxCount, className = rootConfig.className, style2 = rootConfig.style, onAllRemoved = rootConfig.onAllRemoved, stack = rootConfig.stack, renderNotifications = rootConfig.renderNotifications, shareConfig = _objectWithoutProperties(rootConfig, _excluded), _React$useState = React.useState(), _React$useState2 = _slicedToArray
|
|
8119
|
+
var rootConfig = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _rootConfig$getContai = rootConfig.getContainer, getContainer = _rootConfig$getContai === void 0 ? defaultGetContainer : _rootConfig$getContai, motion = rootConfig.motion, prefixCls = rootConfig.prefixCls, maxCount = rootConfig.maxCount, className = rootConfig.className, style2 = rootConfig.style, onAllRemoved = rootConfig.onAllRemoved, stack = rootConfig.stack, renderNotifications = rootConfig.renderNotifications, shareConfig = _objectWithoutProperties(rootConfig, _excluded), _React$useState = React.useState(), _React$useState2 = _slicedToArray(_React$useState, 2), container = _React$useState2[0], setContainer = _React$useState2[1], notificationsRef = React.useRef(), contextHolder = /* @__PURE__ */ React.createElement(Notifications, {
|
|
8222
8120
|
container,
|
|
8223
8121
|
ref: notificationsRef,
|
|
8224
8122
|
prefixCls,
|
|
@@ -8229,7 +8127,7 @@ function useNotification() {
|
|
|
8229
8127
|
onAllRemoved,
|
|
8230
8128
|
stack,
|
|
8231
8129
|
renderNotifications
|
|
8232
|
-
}), _React$useState3 = React.useState([]), _React$useState4 = _slicedToArray
|
|
8130
|
+
}), _React$useState3 = React.useState([]), _React$useState4 = _slicedToArray(_React$useState3, 2), taskQueue = _React$useState4[0], setTaskQueue = _React$useState4[1], api = React.useMemo(function() {
|
|
8233
8131
|
return {
|
|
8234
8132
|
open: /* @__PURE__ */ __name(function(config) {
|
|
8235
8133
|
var mergedConfig = mergeConfig(shareConfig, config);
|