adou-ui
Version:
feat:修复了TagInput无法清空的问题
1,053 lines (1,005 loc) • 363 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-dom"], factory);
else if(typeof exports === 'object')
exports["RPB"] = factory(require("react"), require("react-dom"));
else
root["RPB"] = factory(root["React"], root["ReactDOM"]);
})(this, (__WEBPACK_EXTERNAL_MODULE__442__, __WEBPACK_EXTERNAL_MODULE__3__) => {
return /******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 191:
/***/ ((module) => {
"use strict";
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
module.exports = function (cssWithMappingToString) {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
return this.map(function (item) {
var content = "";
var needLayer = typeof item[5] !== "undefined";
if (item[4]) {
content += "@supports (".concat(item[4], ") {");
}
if (item[2]) {
content += "@media ".concat(item[2], " {");
}
if (needLayer) {
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
}
content += cssWithMappingToString(item);
if (needLayer) {
content += "}";
}
if (item[2]) {
content += "}";
}
if (item[4]) {
content += "}";
}
return content;
}).join("");
};
// import a list of modules into the list
list.i = function i(modules, media, dedupe, supports, layer) {
if (typeof modules === "string") {
modules = [[null, modules, undefined]];
}
var alreadyImportedModules = {};
if (dedupe) {
for (var k = 0; k < this.length; k++) {
var id = this[k][0];
if (id != null) {
alreadyImportedModules[id] = true;
}
}
}
for (var _k = 0; _k < modules.length; _k++) {
var item = [].concat(modules[_k]);
if (dedupe && alreadyImportedModules[item[0]]) {
continue;
}
if (typeof layer !== "undefined") {
if (typeof item[5] === "undefined") {
item[5] = layer;
} else {
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
item[5] = layer;
}
}
if (media) {
if (!item[2]) {
item[2] = media;
} else {
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
item[2] = media;
}
}
if (supports) {
if (!item[4]) {
item[4] = "".concat(supports);
} else {
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
item[4] = supports;
}
}
list.push(item);
}
};
return list;
};
/***/ }),
/***/ 73:
/***/ ((module) => {
"use strict";
module.exports = function (item) {
var content = item[1];
var cssMapping = item[3];
if (!cssMapping) {
return content;
}
if (typeof btoa === "function") {
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
var sourceMapping = "/*# ".concat(data, " */");
return [content].concat([sourceMapping]).join("\n");
}
return [content].join("\n");
};
/***/ }),
/***/ 36:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
(function webpackUniversalModuleDefinition(root, factory) {
if (true) module.exports = factory(__webpack_require__(442), __webpack_require__(3));else {}
})(this, (__WEBPACK_EXTERNAL_MODULE__442__, __WEBPACK_EXTERNAL_MODULE__3__) => {
return /******/(() => {
// webpackBootstrap
/******/
"use strict";
/******/
var __webpack_modules__ = {
/***/191: ( /***/module => {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
module.exports = function (cssWithMappingToString) {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
return this.map(function (item) {
var content = "";
var needLayer = typeof item[5] !== "undefined";
if (item[4]) {
content += "@supports (".concat(item[4], ") {");
}
if (item[2]) {
content += "@media ".concat(item[2], " {");
}
if (needLayer) {
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
}
content += cssWithMappingToString(item);
if (needLayer) {
content += "}";
}
if (item[2]) {
content += "}";
}
if (item[4]) {
content += "}";
}
return content;
}).join("");
};
// import a list of modules into the list
list.i = function i(modules, media, dedupe, supports, layer) {
if (typeof modules === "string") {
modules = [[null, modules, undefined]];
}
var alreadyImportedModules = {};
if (dedupe) {
for (var k = 0; k < this.length; k++) {
var id = this[k][0];
if (id != null) {
alreadyImportedModules[id] = true;
}
}
}
for (var _k = 0; _k < modules.length; _k++) {
var item = [].concat(modules[_k]);
if (dedupe && alreadyImportedModules[item[0]]) {
continue;
}
if (typeof layer !== "undefined") {
if (typeof item[5] === "undefined") {
item[5] = layer;
} else {
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
item[5] = layer;
}
}
if (media) {
if (!item[2]) {
item[2] = media;
} else {
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
item[2] = media;
}
}
if (supports) {
if (!item[4]) {
item[4] = "".concat(supports);
} else {
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
item[4] = supports;
}
}
list.push(item);
}
};
return list;
};
/***/
}),
/***/73: ( /***/module => {
module.exports = function (item) {
var content = item[1];
var cssMapping = item[3];
if (!cssMapping) {
return content;
}
if (typeof btoa === "function") {
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
var sourceMapping = "/*# ".concat(data, " */");
return [content].concat([sourceMapping]).join("\n");
}
return [content].join("\n");
};
/***/
}),
/***/137: ( /***/(__unused_webpack_module, exports, __nested_webpack_require_4372__) => {
var __webpack_unused_export__;
var m = __nested_webpack_require_4372__(3);
if (true) {
exports.H = m.createRoot;
__webpack_unused_export__ = m.hydrateRoot;
} else { var i; }
/***/
}),
/***/736: ( /***/(module, __nested_webpack_exports__, __nested_webpack_require_4708__) => {
/* harmony export */__nested_webpack_require_4708__.d(__nested_webpack_exports__, {
/* harmony export */A: () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */
});
/* harmony import */
var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_4708__(73);
/* harmony import */
var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_4708__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */
var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_4708__(191);
/* harmony import */
var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_4708__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
// Module
___CSS_LOADER_EXPORT___.push([module.id, "/* Loading.css */\n.loading-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n background: transparent;\n pointer-events: \"auto\";\n}\n\n.loading-spinner {\n border: 8px solid #f3f3f3;\n /* Light grey */\n border-top: 8px solid #3498db;\n /* Blue */\n border-radius: 50%;\n width: 50px;\n height: 50px;\n animation: spin 2s linear infinite;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}", "", {
"version": 3,
"sources": ["webpack://./src/hooks/loading.scss"],
"names": [],
"mappings": "AAAA,gBAAA;AACA;EACI,eAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,aAAA;EACA,uBAAA;EACA,sBAAA;AACJ;;AAEA;EACI,yBAAA;EACA,eAAA;EACA,6BAAA;EACA,SAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,kCAAA;AACJ;;AAEA;EACI;IACI,uBAAA;EACN;EAEE;IACI,yBAAA;EAAN;AACF",
"sourcesContent": ["/* Loading.css */\r\n.loading-overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n z-index: 9999;\r\n background: transparent;\r\n pointer-events: \"auto\";\r\n}\r\n\r\n.loading-spinner {\r\n border: 8px solid #f3f3f3;\r\n /* Light grey */\r\n border-top: 8px solid #3498db;\r\n /* Blue */\r\n border-radius: 50%;\r\n width: 50px;\r\n height: 50px;\r\n animation: spin 2s linear infinite;\r\n}\r\n\r\n@keyframes spin {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}"],
"sourceRoot": ""
}]);
// Exports
/* harmony default export */
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
/***/
}),
/***/151: ( /***/(module, __nested_webpack_exports__, __nested_webpack_require_8008__) => {
/* harmony export */__nested_webpack_require_8008__.d(__nested_webpack_exports__, {
/* harmony export */A: () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */
});
/* harmony import */
var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_8008__(73);
/* harmony import */
var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_8008__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */
var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_8008__(191);
/* harmony import */
var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_8008__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
// Module
___CSS_LOADER_EXPORT___.push([module.id, ".adou-notification-container {\n position: fixed;\n top: 20px;\n right: 0px;\n z-index: 1000;\n}\n.adou-notification-container .adou-notification {\n width: 320px;\n position: relative;\n padding: 15px;\n margin-bottom: 15px;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n background-color: #fff;\n transition: all 0.3s ease;\n transform: translateX(100%);\n}\n.adou-notification-container .adou-notification-appearing {\n transform: translateX(-20px);\n}\n.adou-notification-container .adou-notification-disappearing {\n opacity: 0;\n transform: translateX(100%) !important;\n}\n.adou-notification-container .adou-notification:hover {\n cursor: pointer;\n box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);\n}\n.adou-notification-container .adou-notification-header {\n display: flex;\n align-items: start;\n justify-content: space-between;\n margin-bottom: 10px;\n}\n.adou-notification-container .adou-notification-header-title {\n font-size: 18px;\n font-weight: 600;\n color: #333;\n display: flex;\n}\n.adou-notification-container .adou-notification-header-title-icon {\n margin-right: 8px;\n}\n.adou-notification-container .adou-notification-header-close {\n cursor: pointer;\n font-size: 16px;\n color: #999;\n transition: all 0.3s ease;\n}\n.adou-notification-container .adou-notification-header-close:hover {\n color: #ff4d4f;\n transform: scale(1.2);\n}\n.adou-notification-container .adou-notification-content {\n font-size: 14px;\n color: #666;\n line-height: 1.5;\n}", "", {
"version": 3,
"sources": ["webpack://./src/hooks/notification.scss"],
"names": [],
"mappings": "AAAA;EACI,eAAA;EACA,SAAA;EACA,UAAA;EACA,aAAA;AACJ;AACI;EACI,YAAA;EACA,kBAAA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,yCAAA;EACA,sBAAA;EACA,yBAAA;EAEA,2BAAA;AAAR;AAEQ;EAEI,4BAAA;AADZ;AAIQ;EACI,UAAA;EACA,sCAAA;AAFZ;AAKQ;EACI,eAAA;EACA,0CAAA;AAHZ;AAOQ;EACI,aAAA;EACA,kBAAA;EACA,8BAAA;EACA,mBAAA;AALZ;AAOY;EACI,eAAA;EACA,gBAAA;EACA,WAAA;EACA,aAAA;AALhB;AAOgB;EACI,iBAAA;AALpB;AASY;EACI,eAAA;EACA,eAAA;EACA,WAAA;EACA,yBAAA;AAPhB;AASgB;EACI,cAAA;EACA,qBAAA;AAPpB;AAYQ;EACI,eAAA;EACA,WAAA;EACA,gBAAA;AAVZ",
"sourcesContent": [".adou-notification-container {\r\n position: fixed;\r\n top: 20px;\r\n right: 0px;\r\n z-index: 1000;\r\n\r\n .adou-notification {\r\n width: 320px;\r\n position: relative;\r\n padding: 15px;\r\n margin-bottom: 15px;\r\n border-radius: 8px;\r\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\r\n background-color: #fff;\r\n transition: all 0.3s ease;\r\n // opacity: 0;\r\n transform: translateX(100%);\r\n\r\n &-appearing {\r\n // opacity: 1;\r\n transform: translateX(-20px);\r\n }\r\n\r\n &-disappearing {\r\n opacity: 0;\r\n transform: translateX(100%) !important;\r\n }\r\n\r\n &:hover {\r\n cursor: pointer;\r\n box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);\r\n // transform: translate(-20px, -2px);\r\n }\r\n\r\n &-header {\r\n display: flex;\r\n align-items: start;\r\n justify-content: space-between;\r\n margin-bottom: 10px;\r\n\r\n &-title {\r\n font-size: 18px;\r\n font-weight: 600;\r\n color: #333;\r\n display: flex;\r\n\r\n &-icon {\r\n margin-right: 8px;\r\n }\r\n }\r\n\r\n &-close {\r\n cursor: pointer;\r\n font-size: 16px;\r\n color: #999;\r\n transition: all 0.3s ease;\r\n\r\n &:hover {\r\n color: #ff4d4f;\r\n transform: scale(1.2);\r\n }\r\n }\r\n }\r\n\r\n &-content {\r\n font-size: 14px;\r\n color: #666;\r\n line-height: 1.5;\r\n }\r\n }\r\n}"],
"sourceRoot": ""
}]);
// Exports
/* harmony default export */
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
/***/
}),
/***/323: ( /***/(module, __nested_webpack_exports__, __nested_webpack_require_13602__) => {
/* harmony export */__nested_webpack_require_13602__.d(__nested_webpack_exports__, {
/* harmony export */A: () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */
});
/* harmony import */
var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_13602__(73);
/* harmony import */
var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_13602__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */
var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_13602__(191);
/* harmony import */
var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_13602__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
// Module
___CSS_LOADER_EXPORT___.push([module.id, ".adou-toast-container {\n position: absolute;\n top: 20px;\n left: 50%;\n transform: translate(-50%, 0%);\n z-index: 1000;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.adou-toast-container .adou-toast {\n width: 300px;\n position: relative;\n padding: 15px;\n padding-right: 20px;\n margin: 10px 0;\n border-radius: 5px;\n color: white;\n opacity: 0;\n transform: translateY(-20px);\n transition: transform 0.5s ease, opacity 0.5s ease;\n}\n.adou-toast-container .adou-toast-success {\n background-color: #4caf50;\n}\n.adou-toast-container .adou-toast-error {\n background-color: #f44336;\n}\n.adou-toast-container .adou-toast-warning {\n background-color: #ff9800;\n}\n.adou-toast-container .adou-toast.appearing {\n opacity: 1;\n transform: translateY(0);\n}\n.adou-toast-container .adou-toast.disappearing {\n opacity: 0;\n transform: translateY(-20px) scaleX(0.9);\n}\n.adou-toast-container .adou-toast-timer {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 4px;\n background-color: rgba(255, 255, 255, 0.7);\n transition: width 0.1s linear;\n}\n.adou-toast-container .adou-toast-close {\n position: absolute;\n top: -5px;\n right: 1px;\n background: none;\n border: none;\n color: #fff;\n font-size: 20px;\n cursor: pointer;\n margin-left: 10px;\n transition: color 0.3s;\n}\n.adou-toast-container .adou-toast-close:hover {\n color: #ccc;\n}", "", {
"version": 3,
"sources": ["webpack://./src/hooks/toast.scss"],
"names": [],
"mappings": "AAIA;EACI,kBAAA;EACA,SAAA;EACA,SAAA;EACA,8BAAA;EACA,aAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,uBAAA;AAHJ;AAKI;EACI,YAAA;EACA,kBAAA;EACA,aAAA;EACA,mBAAA;EACA,cAAA;EACA,kBAAA;EACA,YAAA;EACA,UAAA;EAEA,4BAAA;EACA,kDAAA;AAJR;AAMQ;EACI,yBA7BU;AAyBtB;AAOQ;EACI,yBAhCQ;AA2BpB;AAQQ;EACI,yBAnCU;AA6BtB;AASQ;EACI,UAAA;EAEA,wBAAA;AARZ;AAWQ;EACI,UAAA;EACA,wCAAA;AATZ;AAYQ;EACI,kBAAA;EACA,SAAA;EACA,OAAA;EACA,WAAA;EACA,0CAAA;EACA,6BAAA;AAVZ;AAaQ;EACI,kBAAA;EACA,SAAA;EACA,UAAA;EACA,gBAAA;EACA,YAAA;EACA,WAAA;EACA,eAAA;EACA,eAAA;EACA,iBAAA;EACA,sBAAA;AAXZ;AAaY;EACI,WAAA;AAXhB",
"sourcesContent": ["$toast-success-color: #4caf50;\r\n$toast-error-color: #f44336;\r\n$toast-warning-color: #ff9800;\r\n\r\n.adou-toast-container {\r\n position: absolute;\r\n top: 20px;\r\n left: 50%; // 水平中心\r\n transform: translate(-50%, 0%); // 将容器移动到中心\r\n z-index: 1000;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n\r\n .adou-toast {\r\n width: 300px;\r\n position: relative;\r\n padding: 15px;\r\n padding-right: 20px;\r\n margin: 10px 0;\r\n border-radius: 5px;\r\n color: white;\r\n opacity: 0;\r\n // 仅向下移动,不缩小 -- 配合 &.appearing的transform: translateY(0);不能删除哦\r\n transform: translateY(-20px);\r\n transition: transform 0.5s ease, opacity 0.5s ease;\r\n\r\n &-success {\r\n background-color: $toast-success-color;\r\n }\r\n\r\n &-error {\r\n background-color: $toast-error-color;\r\n }\r\n\r\n &-warning {\r\n background-color: $toast-warning-color;\r\n }\r\n\r\n &.appearing {\r\n opacity: 1;\r\n // 仅向下移动,不缩小 -- 配合 .adou-toast的transform: translateY(-20px); 不能删除哦\r\n transform: translateY(0);\r\n }\r\n\r\n &.disappearing {\r\n opacity: 0;\r\n transform: translateY(-20px) scaleX(0.9); // 向上移动并缩小宽度\r\n }\r\n\r\n &-timer {\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n height: 4px;\r\n background-color: rgba(255, 255, 255, 0.7);\r\n transition: width 0.1s linear; // 平滑缩短动画\r\n }\r\n\r\n &-close {\r\n position: absolute;\r\n top: -5px;\r\n right: 1px;\r\n background: none;\r\n border: none;\r\n color: #fff;\r\n font-size: 20px;\r\n cursor: pointer;\r\n margin-left: 10px;\r\n transition: color 0.3s;\r\n\r\n &:hover {\r\n color: #ccc;\r\n }\r\n }\r\n }\r\n}"],
"sourceRoot": ""
}]);
// Exports
/* harmony default export */
const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___;
/***/
}),
/***/591: ( /***/module => {
var stylesInDOM = [];
function getIndexByIdentifier(identifier) {
var result = -1;
for (var i = 0; i < stylesInDOM.length; i++) {
if (stylesInDOM[i].identifier === identifier) {
result = i;
break;
}
}
return result;
}
function modulesToDom(list, options) {
var idCountMap = {};
var identifiers = [];
for (var i = 0; i < list.length; i++) {
var item = list[i];
var id = options.base ? item[0] + options.base : item[0];
var count = idCountMap[id] || 0;
var identifier = "".concat(id, " ").concat(count);
idCountMap[id] = count + 1;
var indexByIdentifier = getIndexByIdentifier(identifier);
var obj = {
css: item[1],
media: item[2],
sourceMap: item[3],
supports: item[4],
layer: item[5]
};
if (indexByIdentifier !== -1) {
stylesInDOM[indexByIdentifier].references++;
stylesInDOM[indexByIdentifier].updater(obj);
} else {
var updater = addElementStyle(obj, options);
options.byIndex = i;
stylesInDOM.splice(i, 0, {
identifier: identifier,
updater: updater,
references: 1
});
}
identifiers.push(identifier);
}
return identifiers;
}
function addElementStyle(obj, options) {
var api = options.domAPI(options);
api.update(obj);
var updater = function updater(newObj) {
if (newObj) {
if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
return;
}
api.update(obj = newObj);
} else {
api.remove();
}
};
return updater;
}
module.exports = function (list, options) {
options = options || {};
list = list || [];
var lastIdentifiers = modulesToDom(list, options);
return function update(newList) {
newList = newList || [];
for (var i = 0; i < lastIdentifiers.length; i++) {
var identifier = lastIdentifiers[i];
var index = getIndexByIdentifier(identifier);
stylesInDOM[index].references--;
}
var newLastIdentifiers = modulesToDom(newList, options);
for (var _i = 0; _i < lastIdentifiers.length; _i++) {
var _identifier = lastIdentifiers[_i];
var _index = getIndexByIdentifier(_identifier);
if (stylesInDOM[_index].references === 0) {
stylesInDOM[_index].updater();
stylesInDOM.splice(_index, 1);
}
}
lastIdentifiers = newLastIdentifiers;
};
};
/***/
}),
/***/128: ( /***/module => {
var memo = {};
/* istanbul ignore next */
function getTarget(target) {
if (typeof memo[target] === "undefined") {
var styleTarget = document.querySelector(target);
// Special case to return head of iframe instead of iframe itself
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
try {
// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
styleTarget = styleTarget.contentDocument.head;
} catch (e) {
// istanbul ignore next
styleTarget = null;
}
}
memo[target] = styleTarget;
}
return memo[target];
}
/* istanbul ignore next */
function insertBySelector(insert, style) {
var target = getTarget(insert);
if (!target) {
throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
}
target.appendChild(style);
}
module.exports = insertBySelector;
/***/
}),
/***/51: ( /***/module => {
/* istanbul ignore next */
function insertStyleElement(options) {
var element = document.createElement("style");
options.setAttributes(element, options.attributes);
options.insert(element, options.options);
return element;
}
module.exports = insertStyleElement;
/***/
}),
/***/855: ( /***/(module, __unused_webpack_exports, __nested_webpack_require_24314__) => {
/* istanbul ignore next */
function setAttributesWithoutAttributes(styleElement) {
var nonce = true ? __nested_webpack_require_24314__.nc : 0;
if (nonce) {
styleElement.setAttribute("nonce", nonce);
}
}
module.exports = setAttributesWithoutAttributes;
/***/
}),
/***/740: ( /***/module => {
/* istanbul ignore next */
function apply(styleElement, options, obj) {
var css = "";
if (obj.supports) {
css += "@supports (".concat(obj.supports, ") {");
}
if (obj.media) {
css += "@media ".concat(obj.media, " {");
}
var needLayer = typeof obj.layer !== "undefined";
if (needLayer) {
css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
}
css += obj.css;
if (needLayer) {
css += "}";
}
if (obj.media) {
css += "}";
}
if (obj.supports) {
css += "}";
}
var sourceMap = obj.sourceMap;
if (sourceMap && typeof btoa !== "undefined") {
css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
}
// For old IE
/* istanbul ignore if */
options.styleTagTransform(css, styleElement, options.options);
}
function removeStyleElement(styleElement) {
// istanbul ignore if
if (styleElement.parentNode === null) {
return false;
}
styleElement.parentNode.removeChild(styleElement);
}
/* istanbul ignore next */
function domAPI(options) {
if (typeof document === "undefined") {
return {
update: function update() {},
remove: function remove() {}
};
}
var styleElement = options.insertStyleElement(options);
return {
update: function update(obj) {
apply(styleElement, options, obj);
},
remove: function remove() {
removeStyleElement(styleElement);
}
};
}
module.exports = domAPI;
/***/
}),
/***/656: ( /***/module => {
/* istanbul ignore next */
function styleTagTransform(css, styleElement) {
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = css;
} else {
while (styleElement.firstChild) {
styleElement.removeChild(styleElement.firstChild);
}
styleElement.appendChild(document.createTextNode(css));
}
}
module.exports = styleTagTransform;
/***/
}),
/***/442: ( /***/module => {
module.exports = __WEBPACK_EXTERNAL_MODULE__442__;
/***/
}),
/***/3: ( /***/module => {
module.exports = __WEBPACK_EXTERNAL_MODULE__3__;
/***/
})
/******/
};
/************************************************************************/
/******/ // The module cache
/******/
var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/
function __nested_webpack_require_27724__(moduleId) {
/******/ // Check if module is in cache
/******/var cachedModule = __webpack_module_cache__[moduleId];
/******/
if (cachedModule !== undefined) {
/******/return cachedModule.exports;
/******/
}
/******/ // Create a new module (and put it into the cache)
/******/
var module = __webpack_module_cache__[moduleId] = {
/******/id: moduleId,
/******/ // no module.loaded needed
/******/exports: {}
/******/
};
/******/
/******/ // Execute the module function
/******/
__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_27724__);
/******/
/******/ // Return the exports of the module
/******/
return module.exports;
/******/
}
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/
(() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/__nested_webpack_require_27724__.n = module => {
/******/var getter = module && module.__esModule ? /******/() => module['default'] : /******/() => module;
/******/
__nested_webpack_require_27724__.d(getter, {
a: getter
});
/******/
return getter;
/******/
};
/******/
})();
/******/
/******/ /* webpack/runtime/define property getters */
/******/
(() => {
/******/ // define getter functions for harmony exports
/******/__nested_webpack_require_27724__.d = (exports, definition) => {
/******/for (var key in definition) {
/******/if (__nested_webpack_require_27724__.o(definition, key) && !__nested_webpack_require_27724__.o(exports, key)) {
/******/Object.defineProperty(exports, key, {
enumerable: true,
get: definition[key]
});
/******/
}
/******/
}
/******/
};
/******/
})();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/
(() => {
/******/__nested_webpack_require_27724__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
/******/
})();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/
(() => {
/******/ // define __esModule on exports
/******/__nested_webpack_require_27724__.r = exports => {
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/Object.defineProperty(exports, Symbol.toStringTag, {
value: 'Module'
});
/******/
}
/******/
Object.defineProperty(exports, '__esModule', {
value: true
});
/******/
};
/******/
})();
/******/
/******/ /* webpack/runtime/nonce */
/******/
(() => {
/******/__nested_webpack_require_27724__.nc = undefined;
/******/
})();
/******/
/************************************************************************/
var __nested_webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
// ESM COMPAT FLAG
__nested_webpack_require_27724__.r(__nested_webpack_exports__);
// EXPORTS
__nested_webpack_require_27724__.d(__nested_webpack_exports__, {
convertArrayKeysToCamelCase: () => ( /* reexport */libs_convertArrayKeysToCamelCase),
convertArrayKeysToSnakeCase: () => ( /* reexport */libs_convertArrayKeysToSnakeCase),
convertListToTree: () => ( /* reexport */libs_convertListToTree),
convertToTag: () => ( /* reexport */libs_convertToTag),
flattenDataWithoutNesting: () => ( /* reexport */libs_flattenDataWithoutNesting),
getAbsolutePosition: () => ( /* reexport */libs_getAbsolutePositionOfStage),
getContentWidth: () => ( /* reexport */libs_getContentWidth),
isEmptyO: () => ( /* reexport */libs_isEmptyO),
splitFilesIntoColumns: () => ( /* reexport */libs_splitFilesIntoColumns),
timeFormatter: () => ( /* reexport */time_formatter_namespaceObject),
useClickOutside: () => ( /* reexport */hooks_useClickOutside),
useDrag: () => ( /* reexport */hooks_useDrag),
useForm: () => ( /* reexport */hooks_useForm),
useLoading: () => ( /* reexport */useLoading),
useNavigateTo: () => ( /* reexport */hooks_useNavigateTo),
useNotification: () => ( /* reexport */hooks_useNotification),
useThrottle: () => ( /* reexport */hooks_useThrottle),
useToast: () => ( /* reexport */hooks_useToast)
});
// NAMESPACE OBJECT: ./src/libs/time-formatter.js
var time_formatter_namespaceObject = {};
__nested_webpack_require_27724__.r(time_formatter_namespaceObject);
__nested_webpack_require_27724__.d(time_formatter_namespaceObject, {
"default": () => time_formatter
});
; // CONCATENATED MODULE: ./src/libs/getAbsolutePositionOfStage.js
function getAbsolutePositionOfStage(domElement) {
let left = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
let top = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
if (!parseInt(left)) {
left = 0;
} else {
left = parseInt(left);
}
if (!parseInt(top)) {
top = 0;
} else {
top = parseInt(top);
}
if (!domElement) {
return {
x: 0,
y: 0,
width: 0,
height: 0
};
}
const box = domElement === null || domElement === void 0 ? void 0 : domElement.getBoundingClientRect();
const body = document.body;
const docElem = document.documentElement;
const scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;
const scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;
const clientTop = docElem.clientTop || body.clientTop || 0;
const clientLeft = docElem.clientLeft || body.clientLeft || 0;
const attr = {};
attr.y = box.top + scrollTop - clientTop + top;
attr.x = box.left + scrollLeft - clientLeft + left;
attr.width = box.width;
attr.height = box.height;
return attr;
}
/* harmony default export */
const libs_getAbsolutePositionOfStage = getAbsolutePositionOfStage;
; // CONCATENATED MODULE: ./src/libs/convertToTag.js
const convertToTag = str => {
let tags = [];
const regex = /\[(.*?)\]/g;
const temp = str === null || str === void 0 ? void 0 : str.match(regex);
temp && (tags = temp.map(match => match === null || match === void 0 ? void 0 : match.slice(1, -1)));
return tags;
};
/* harmony default export */
const libs_convertToTag = convertToTag;
; // CONCATENATED MODULE: ./src/libs/time-formatter.js
function formatDateTime(dateString) {
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "YYYY-MM-DD";
const date = new Date(dateString);
switch (format) {
case "MM-DD HH:mm":
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
const hours = String(date.getHours()).padStart(2, "0");
const minutes = String(date.getMinutes()).padStart(2, "0");
return "".concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes);
case "YYYY-MM-DD HH:mm:ss":
const year = date.getFullYear();
const month2 = String(date.getMonth() + 1).padStart(2, "0");
const day2 = String(date.getDate()).padStart(2, "0");
const hours2 = String(date.getHours()).padStart(2, "0");
const minutes2 = String(date.getMinutes()).padStart(2, "0");
const seconds2 = String(date.getSeconds()).padStart(2, "0");
return "".concat(year, "-").concat(month2, "-").concat(day2, " ").concat(hours2, ":").concat(minutes2, ":").concat(seconds2);
case "YYYY-MM-DD":
const year2 = date.getFullYear();
const month3 = String(date.getMonth() + 1).padStart(2, "0");
const day3 = String(date.getDate()).padStart(2, "0");
return "".concat(year2, "-").concat(month3, "-").concat(day3);
case "HH:mm:ss":
const hours4 = String(date.getHours()).padStart(2, "0");
const minutes4 = String(date.getMinutes()).padStart(2, "0");
const seconds4 = String(date.getSeconds()).padStart(2, "0");
console.log("`${hours4}:${minutes4}:${seconds4}`: ", "".concat(hours4, ":").concat(minutes4, ":").concat(seconds4));
return "".concat(hours4, ":").concat(minutes4, ":").concat(seconds4);
case "YYYY-MM-DD HH:mm":
const year5 = date.getFullYear();
const month5 = String(date.getMonth() + 1).padStart(2, "0");
const day5 = String(date.getDate()).padStart(2, "0");
const hours5 = String(date.getHours()).padStart(2, "0");
const minutes5 = String(date.getMinutes()).padStart(2, "0");
return "".concat(year5, "-").concat(month5, "-").concat(day5, " ").concat(hours5, ":").concat(minutes5);
default:
break;
}
}
/* harmony default export */
const time_formatter = formatDateTime;
; // CONCATENATED MODULE: ./src/libs/isEmptyO.js
function isEmptyO(obj) {
return Object.keys(obj !== null && obj !== void 0 ? obj : {}).length === 0;
}
/* harmony default export */
const libs_isEmptyO = isEmptyO;
; // CONCATENATED MODULE: ./src/libs/convertArrayKeysToCamelCase.js
function snakeToCamel(name) {
return name.replace(/_([a-z])/g, (match, letter) => letter.toUpperCase());
}
function convertKeysToCamelCase(obj) {
return Object.fromEntries(Object.entries(obj).map(_ref => {
let [key, value] = _ref;
return [snakeToCamel(key), value || ""];
}));
}
function convertArrayKeysToCamelCase(arr) {
return arr.map(item => convertKeysToCamelCase(item));
}
/* harmony default export */
const libs_convertArrayKeysToCamelCase = convertArrayKeysToCamelCase;
; // CONCATENATED MODULE: ./src/libs/convertArrayKeysToSnakeCase.js
function camelToSnake(name) {
return name.replace(/([a-z])([A-Z])/g, "$1_$2").toLowerCase();
}
function convertKeysToSnakeCase(obj) {
return Object.fromEntries(Object.entries(obj).map(_ref => {
let [key, value] = _ref;
return [camelToSnake(key), value];
}));
}
function convertArrayKeysToSnakeCase(arr) {
return arr.map(item => convertKeysToSnakeCase(item));
}
/* harmony default export */
const libs_convertArrayKeysToSnakeCase = convertArrayKeysToSnakeCase;
; // CONCATENATED MODULE: ./src/libs/convertListToTree.ts
const convertListToTree = (list, pid) => {
let level = 0;
// 递归辅助函数,用于处理每个节点及其子节点
const buildTree = (items, parentId, currentLevel) => {
const children = [];
items.forEach(item => {
if (item.pid === parentId) {
item.level = currentLevel;
children.push(item);
// 递归调用自身处理子节点,层级加1
item.children = buildTree(list, item.id, currentLevel + 1);
}
});
return children;
};
const data = buildTree(list, pid, level);
return data;
};
/* harmony default export */
const libs_convertListToTree = convertListToTree;
; // CONCATENATED MODULE: ./src/libs/flattenDataWithoutNesting.ts
function flattenDataWithoutNesting(data) {
let flattened = [];
function flattenRecursive(node, parentId) {
const {
id,
name,
isExpanded
} = node;
flattened.push({
...node,
id,
name,
isExpanded,
pid: parentId
});
if (node.children && node.children.length > 0) {
node.children.forEach(child => {
flattenRecursive(child, id);
});
}
}
data.forEach(rootNode => {
flattenRecursive(rootNode, null);
});
return flattened;
}
/* harmony default export */
const libs_flattenDataWithoutNesting = flattenDataWithoutNesting;
; // CONCATENATED MODULE: ./src/libs/splitFilesIntoColumns.ts
// 根据列数和每列展示的文件数量来分割文件
const splitFilesIntoColumns = (files, filesPerColumn) => {
const result = [];
let currentColumn = [];
files.forEach((file, index) => {
currentColumn.push(file);
if ((index + 1) % filesPerColumn === 0 || index === files.length - 1) {
result.push(currentColumn);
currentColumn = [];
}
});
return result;
};
/* harmony default export */
const libs_splitFilesIntoColumns = splitFilesIntoColumns;
; // CONCATENATED MODULE: ./src/libs/getContentWidth.ts
function getContentWidth(element) {
const computedStyle = window.getComputedStyle(element);
const offsetWidth = element.offsetWidth;
const borderWidthLeftRight = parseInt(computedStyle.borderLeftWidth) + parseInt(computedStyle.borderRightWidth);
const paddingWidthLeftRight = parseInt(computedStyle.paddingLeft) + parseInt(computedStyle.paddingRight);
return offsetWidth - borderWidthLeftRight - paddingWidthLeftRight;
}
/* harmony default export */
const libs_getContentWidth = getContentWidth;
; // CONCATENATED MODULE: ../../node_modules/@remix-run/router/dist/router.js
/**
* @remix-run/router v1.5.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
////////////////////////////////////////////////////////////////////////////////
//#region Types and Constants
////////////////////////////////////////////////////////////////////////////////
/**
* Actions represent the type of change to a location value.
*/
var router_Action;
(function (Action) {
/**
* A POP indicates a change to an arbitrary index in the history stack, such
* as a back or forward navigation. It does not describe the direction of the
* navigation, only that the current index changed.
*
* Note: This is the default action for newly created history objects.
*/
Action["Pop"] = "POP";
/**
* A PUSH indicates a new entry being added to the history stack, such as when
* a link is clicked and a new page loads. When this happens, all subsequent
* entries in the stack are lost.
*/
Action["Push"] = "PUSH";
/**
* A REPLACE indicates the entry at the current index in the history stack
* being replaced by a new one.
*/
Action["Replace"] = "REPLACE";
})(router_Action || (router_Action = {}));
const PopStateEventType = "popstate";
/**
* Memory history stores the current location in memory. It is designed for use
* in stateful non-browser environments like tests and React Native.
*/
function router_createMemoryHistory(options) {
if (options === void 0) {
options = {};
}
let {
initialEntries = ["/"],
initialIndex,
v5Compat = false
} = options;
let entries; // Declare so we can access from createMemoryLocation
entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === "string" ? null : entry.state, index === 0 ? "default" : undefined));
let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);
let action = router_Action.Pop;
let listener = null;
function clampIndex(n) {
return Math.min(Math.max(n, 0), entries.length - 1);
}
function getCurrentLocation() {
return entries[index];
}
function createMemoryLocation(to, state, key) {
if (state === void 0) {
state = null;
}
let location = createLocation(entries ? getCurrentLocation().pathname : "/", to, state, key);
warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(to));
return location;
}
function createHref(to) {
return typeof to === "string" ? to : createPath(to);
}
let history = {
get index() {
return index;
},
get action() {
return action;
},
get location() {
return getCurrentLocation();
},
createHref,
createURL(to) {
return new URL(createHref(to), "http://localhost");
},
encodeLocation(to) {
let path = typeof to === "string" ? router_parsePath(to) : to;
return {
pathname: path.pathname || "",
search: path.search || "",
hash: path.hash || ""
};
},
push(to, state) {
action = router_Action.Push;
let nextLocation = createMemoryLocation(to, state);
index += 1;
entries.splice(index