@pnkx-lib/ui 1.9.454 → 1.9.456
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +2 -2
- package/es/chunks/{bundle-mjs-BBFHkixS.js → bundle-mjs-BME7zF0Z.js} +1 -1
- package/es/chunks/{index.esm-o4O8pXMN.js → index.esm-Dr5ZHcf7.js} +135 -79
- package/es/fields/CascaderField.js +1 -1
- package/es/fields/Checkbox.js +1 -1
- package/es/fields/DatePicker.js +3 -3
- package/es/fields/DateRangePicker.js +1 -1
- package/es/fields/Input.js +1 -1
- package/es/fields/InputRangePicker.js +1 -1
- package/es/fields/PnkxField.js +1 -1
- package/es/fields/Select.js +1 -1
- package/es/fields/SliderRanger.js +1 -1
- package/es/fields/SliderSingle.js +1 -1
- package/es/fields/Switch.js +1 -1
- package/es/fields/Textarea.js +1 -1
- package/es/fields/TimePicker.js +1 -1
- package/es/fields/TimeRangePicker.js +1 -1
- package/es/fields/TinyMCE.js +36 -17
- package/es/index.js +1 -1
- package/es/ui/Button.js +1 -1
- package/es/ui/Cascader.js +1 -1
- package/es/ui/CategoryStatus.js +16 -4
- package/es/ui/Container.js +1 -1
- package/es/ui/Label.js +1 -1
- package/es/ui/Layout.js +29 -32
- package/es/ui/Modal.js +1 -1
- package/es/ui/SearchFilterForm.js +1 -1
- package/es/ui/SelectSingleTable.js +1 -1
- package/es/ui/SelectTable.js +1 -1
- package/es/ui/Sidebar/index.js +4 -4
- package/es/ui/Tabs.js +2 -2
- package/es/ui/UploadComponent.js +1 -1
- package/es/ui/UploadImage.js +1 -1
- package/es/ui/index.js +6 -6
- package/package.json +4 -3
- package/types/components/ui/CategoryStatus.d.ts +5 -2
package/es/fields/Input.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Input as Input$1 } from 'antd';
|
|
|
4
4
|
import { g as get } from '../chunks/get-DPccfEM4.js';
|
|
5
5
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
6
6
|
import { Label } from '../ui/Label.js';
|
|
7
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
7
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
8
8
|
import { Tooltip } from '../ui/Tooltip.js';
|
|
9
9
|
|
|
10
10
|
const AllowClearIcon = ({
|
|
@@ -4,7 +4,7 @@ import { InputNumber } from 'antd';
|
|
|
4
4
|
import { g as get } from '../chunks/get-DPccfEM4.js';
|
|
5
5
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
6
6
|
import { Label } from '../ui/Label.js';
|
|
7
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
7
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
8
8
|
import { w as wrapWithTooltip } from '../chunks/wapper-Bk3PQCcg.js';
|
|
9
9
|
|
|
10
10
|
const InputRangePicker = (props) => {
|
package/es/fields/PnkxField.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { C as Controller } from '../chunks/index.esm-
|
|
3
|
+
import { C as Controller } from '../chunks/index.esm-Dr5ZHcf7.js';
|
|
4
4
|
|
|
5
5
|
class PnkxField extends React.PureComponent {
|
|
6
6
|
render() {
|
package/es/fields/Select.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Select as Select$1 } from 'antd';
|
|
|
3
3
|
import { g as get } from '../chunks/get-DPccfEM4.js';
|
|
4
4
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
5
5
|
import { Label } from '../ui/Label.js';
|
|
6
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
6
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
7
7
|
import { R as RefIcon } from '../chunks/CloseOutlined-B3y9Maz0.js';
|
|
8
8
|
import { R as RefIcon$1 } from '../chunks/DownOutlined-BlKl-wuu.js';
|
|
9
9
|
import { useRef } from 'react';
|
|
@@ -3,7 +3,7 @@ import { InputNumber, Slider } from 'antd';
|
|
|
3
3
|
import { g as get } from '../chunks/get-DPccfEM4.js';
|
|
4
4
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
5
5
|
import { Label } from '../ui/Label.js';
|
|
6
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
6
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
7
7
|
|
|
8
8
|
const SliderRange = (props) => {
|
|
9
9
|
//! State
|
|
@@ -3,7 +3,7 @@ import { Slider } from 'antd';
|
|
|
3
3
|
import { g as get } from '../chunks/get-DPccfEM4.js';
|
|
4
4
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
5
5
|
import { Label } from '../ui/Label.js';
|
|
6
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
6
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
7
7
|
|
|
8
8
|
const SliderSingle = (props) => {
|
|
9
9
|
//! State
|
package/es/fields/Switch.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Switch as Switch$1 } from 'antd';
|
|
|
3
3
|
import { g as get } from '../chunks/get-DPccfEM4.js';
|
|
4
4
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
5
5
|
import { Label } from '../ui/Label.js';
|
|
6
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
6
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
7
7
|
|
|
8
8
|
const Switch = (props) => {
|
|
9
9
|
//! State
|
package/es/fields/Textarea.js
CHANGED
|
@@ -4,7 +4,7 @@ import { g as get } from '../chunks/get-DPccfEM4.js';
|
|
|
4
4
|
import { Input } from 'antd';
|
|
5
5
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
6
6
|
import { Label } from '../ui/Label.js';
|
|
7
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
7
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
8
8
|
|
|
9
9
|
const { TextArea } = Input;
|
|
10
10
|
const Textarea = forwardRef(
|
package/es/fields/TimePicker.js
CHANGED
|
@@ -3,7 +3,7 @@ import { TimePicker as TimePicker$1 } from 'antd';
|
|
|
3
3
|
import { Label } from '../ui/Label.js';
|
|
4
4
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
5
5
|
import { g as get } from '../chunks/get-DPccfEM4.js';
|
|
6
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
6
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
7
7
|
|
|
8
8
|
const TimePicker = (props) => {
|
|
9
9
|
const {
|
|
@@ -3,7 +3,7 @@ import { TimePicker } from 'antd';
|
|
|
3
3
|
import { Label } from '../ui/Label.js';
|
|
4
4
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
5
5
|
import { g as get } from '../chunks/get-DPccfEM4.js';
|
|
6
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
6
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
7
7
|
|
|
8
8
|
const { RangePicker } = TimePicker;
|
|
9
9
|
const TimeRangePicker = (props) => {
|
package/es/fields/TinyMCE.js
CHANGED
|
@@ -1282,7 +1282,7 @@ var eventPropTypes = {
|
|
|
1282
1282
|
onScriptsLoad: propTypesExports.func,
|
|
1283
1283
|
onScriptsLoadError: propTypesExports.func,
|
|
1284
1284
|
};
|
|
1285
|
-
var EditorPropTypes = __assign$2({ apiKey: propTypesExports.string, licenseKey: propTypesExports.string, id: propTypesExports.string, inline: propTypesExports.bool, init: propTypesExports.object, initialValue: propTypesExports.string, onEditorChange: propTypesExports.func, value: propTypesExports.string, tagName: propTypesExports.string, tabIndex: propTypesExports.number, cloudChannel: propTypesExports.string, plugins: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.array]), toolbar: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.array]), disabled: propTypesExports.bool, textareaName: propTypesExports.string, tinymceScriptSrc: propTypesExports.oneOfType([
|
|
1285
|
+
var EditorPropTypes = __assign$2({ apiKey: propTypesExports.string, licenseKey: propTypesExports.string, id: propTypesExports.string, inline: propTypesExports.bool, init: propTypesExports.object, initialValue: propTypesExports.string, onEditorChange: propTypesExports.func, value: propTypesExports.string, tagName: propTypesExports.string, tabIndex: propTypesExports.number, cloudChannel: propTypesExports.string, plugins: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.array]), toolbar: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.array]), disabled: propTypesExports.bool, readonly: propTypesExports.bool, textareaName: propTypesExports.string, tinymceScriptSrc: propTypesExports.oneOfType([
|
|
1286
1286
|
propTypesExports.string,
|
|
1287
1287
|
propTypesExports.arrayOf(propTypesExports.string),
|
|
1288
1288
|
propTypesExports.arrayOf(propTypesExports.shape({
|
|
@@ -1296,6 +1296,11 @@ var EditorPropTypes = __assign$2({ apiKey: propTypesExports.string, licenseKey:
|
|
|
1296
1296
|
delay: propTypesExports.number
|
|
1297
1297
|
}) }, eventPropTypes);
|
|
1298
1298
|
|
|
1299
|
+
var getTinymce = function (view) {
|
|
1300
|
+
var global = view;
|
|
1301
|
+
return global && global.tinymce ? global.tinymce : null;
|
|
1302
|
+
};
|
|
1303
|
+
|
|
1299
1304
|
var isFunction = function (x) { return typeof x === 'function'; };
|
|
1300
1305
|
var isEventProp = function (name) { return name in eventPropTypes; };
|
|
1301
1306
|
var eventAttrToEventName = function (attrName) { return attrName.substr(2); };
|
|
@@ -1365,6 +1370,14 @@ var setMode = function (editor, mode) {
|
|
|
1365
1370
|
}
|
|
1366
1371
|
}
|
|
1367
1372
|
};
|
|
1373
|
+
var getTinymceOrError = function (view) {
|
|
1374
|
+
var tinymce = getTinymce(view);
|
|
1375
|
+
if (!tinymce) {
|
|
1376
|
+
throw new Error('tinymce should have been loaded into global scope');
|
|
1377
|
+
}
|
|
1378
|
+
return tinymce;
|
|
1379
|
+
};
|
|
1380
|
+
var isDisabledOptionSupported = function (editor) { return editor.options && editor.options.isRegistered('disabled'); };
|
|
1368
1381
|
|
|
1369
1382
|
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
1370
1383
|
__assign$1 = Object.assign || function(t) {
|
|
@@ -1509,11 +1522,6 @@ var createScriptLoader = function () {
|
|
|
1509
1522
|
};
|
|
1510
1523
|
var ScriptLoader = createScriptLoader();
|
|
1511
1524
|
|
|
1512
|
-
var getTinymce = function (view) {
|
|
1513
|
-
var global = view;
|
|
1514
|
-
return global && global.tinymce ? global.tinymce : null;
|
|
1515
|
-
};
|
|
1516
|
-
|
|
1517
1525
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
1518
1526
|
var extendStatics = function (d, b) {
|
|
1519
1527
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -1634,11 +1642,8 @@ var Editor = /** @class */ (function (_super) {
|
|
|
1634
1642
|
}
|
|
1635
1643
|
return;
|
|
1636
1644
|
}
|
|
1637
|
-
var tinymce =
|
|
1638
|
-
|
|
1639
|
-
throw new Error('tinymce should have been loaded into global scope');
|
|
1640
|
-
}
|
|
1641
|
-
var finalInit = __assign(__assign(__assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: mergePlugins((_a = _this.props.init) === null || _a === void 0 ? void 0 : _a.plugins, _this.props.plugins), toolbar: (_b = _this.props.toolbar) !== null && _b !== void 0 ? _b : (_c = _this.props.init) === null || _c === void 0 ? void 0 : _c.toolbar }), (_this.props.licenseKey ? { license_key: _this.props.licenseKey } : {})), { setup: function (editor) {
|
|
1645
|
+
var tinymce = getTinymceOrError(_this.view);
|
|
1646
|
+
var finalInit = __assign(__assign(__assign(__assign({}, _this.props.init), { selector: undefined, target: target, disabled: _this.props.disabled, readonly: _this.props.readonly, inline: _this.inline, plugins: mergePlugins((_a = _this.props.init) === null || _a === void 0 ? void 0 : _a.plugins, _this.props.plugins), toolbar: (_b = _this.props.toolbar) !== null && _b !== void 0 ? _b : (_c = _this.props.init) === null || _c === void 0 ? void 0 : _c.toolbar }), (_this.props.licenseKey ? { license_key: _this.props.licenseKey } : {})), { setup: function (editor) {
|
|
1642
1647
|
_this.editor = editor;
|
|
1643
1648
|
_this.bindHandlers({});
|
|
1644
1649
|
// When running in inline mode the editor gets the initial value
|
|
@@ -1655,8 +1660,16 @@ var Editor = /** @class */ (function (_super) {
|
|
|
1655
1660
|
if (_this.props.init && isFunction(_this.props.init.setup)) {
|
|
1656
1661
|
_this.props.init.setup(editor);
|
|
1657
1662
|
}
|
|
1663
|
+
if (_this.props.disabled) {
|
|
1664
|
+
if (isDisabledOptionSupported(_this.editor)) {
|
|
1665
|
+
_this.editor.options.set('disabled', _this.props.disabled);
|
|
1666
|
+
}
|
|
1667
|
+
else {
|
|
1668
|
+
_this.editor.mode.set('readonly');
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1658
1671
|
}, init_instance_callback: function (editor) {
|
|
1659
|
-
var _a
|
|
1672
|
+
var _a;
|
|
1660
1673
|
// check for changes that happened since tinymce.init() was called
|
|
1661
1674
|
var initialValue = _this.getInitialValue();
|
|
1662
1675
|
_this.currentContent = (_a = _this.currentContent) !== null && _a !== void 0 ? _a : editor.getContent();
|
|
@@ -1668,8 +1681,6 @@ var Editor = /** @class */ (function (_super) {
|
|
|
1668
1681
|
editor.undoManager.add();
|
|
1669
1682
|
editor.setDirty(false);
|
|
1670
1683
|
}
|
|
1671
|
-
var disabled = (_b = _this.props.disabled) !== null && _b !== void 0 ? _b : false;
|
|
1672
|
-
setMode(_this.editor, disabled ? 'readonly' : 'design');
|
|
1673
1684
|
// ensure existing init_instance_callback is called
|
|
1674
1685
|
if (_this.props.init && isFunction(_this.props.init.init_instance_callback)) {
|
|
1675
1686
|
_this.props.init.init_instance_callback(editor);
|
|
@@ -1747,9 +1758,17 @@ var Editor = /** @class */ (function (_super) {
|
|
|
1747
1758
|
}
|
|
1748
1759
|
});
|
|
1749
1760
|
}
|
|
1761
|
+
if (this.props.readonly !== prevProps.readonly) {
|
|
1762
|
+
var readonly = (_b = this.props.readonly) !== null && _b !== void 0 ? _b : false;
|
|
1763
|
+
setMode(this.editor, readonly ? 'readonly' : 'design');
|
|
1764
|
+
}
|
|
1750
1765
|
if (this.props.disabled !== prevProps.disabled) {
|
|
1751
|
-
|
|
1752
|
-
|
|
1766
|
+
if (isDisabledOptionSupported(this.editor)) {
|
|
1767
|
+
this.editor.options.set('disabled', this.props.disabled);
|
|
1768
|
+
}
|
|
1769
|
+
else {
|
|
1770
|
+
setMode(this.editor, this.props.disabled ? 'readonly' : 'design');
|
|
1771
|
+
}
|
|
1753
1772
|
}
|
|
1754
1773
|
}
|
|
1755
1774
|
}
|
|
@@ -1880,7 +1899,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
1880
1899
|
};
|
|
1881
1900
|
Editor.propTypes = EditorPropTypes;
|
|
1882
1901
|
Editor.defaultProps = {
|
|
1883
|
-
cloudChannel: '
|
|
1902
|
+
cloudChannel: '8',
|
|
1884
1903
|
};
|
|
1885
1904
|
return Editor;
|
|
1886
1905
|
}(React.Component));
|
package/es/index.js
CHANGED
|
@@ -48,7 +48,7 @@ export { Empty } from './ui/Empty.js';
|
|
|
48
48
|
export { Image } from './ui/Image.js';
|
|
49
49
|
export { ConfirmModal } from './ui/ConfirmModal.js';
|
|
50
50
|
export { ErrorBoundary } from './ui/ErrorBoundary.js';
|
|
51
|
-
export { CATEGORY_LIST_ENUM, CategoryStatus, badgeStatusCategoryConfig } from './ui/CategoryStatus.js';
|
|
51
|
+
export { CATEGORY_LIST_ENUM, CategoryStatus, badgeStatusCategoryAccount, badgeStatusCategoryConfig } from './ui/CategoryStatus.js';
|
|
52
52
|
export { I as ID_TABLE_WRAPPER, a as MAX_TAG_COUNT, M as MAX_TAG_TEXT_LENGTH, T as TINY_API } from './chunks/common-BcURBmQ-.js';
|
|
53
53
|
export { PAGE_NUMBER, PAGE_SIZE, SORT, START_PAGE, START_PAGE_SIZE, TypeActionRowTable, TypeBulkActions, TypeStatusTable } from './constants/index.js';
|
|
54
54
|
export { BreadcrumbHeading } from './ui/BreadcrumbHeading.js';
|
package/es/ui/Button.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Button as Button$1 } from 'antd';
|
|
3
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
3
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
4
4
|
|
|
5
5
|
const Button = (props) => {
|
|
6
6
|
const { onClick, ...restProps } = props;
|
package/es/ui/Cascader.js
CHANGED
package/es/ui/CategoryStatus.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { CategoryAccountStatus } from '@pnkx-lib/core';
|
|
3
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
3
4
|
|
|
4
5
|
var CATEGORY_LIST_ENUM = /* @__PURE__ */ ((CATEGORY_LIST_ENUM2) => {
|
|
5
6
|
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["DRAFT"] = 0] = "DRAFT";
|
|
@@ -30,9 +31,20 @@ const badgeStatusCategoryConfig = {
|
|
|
30
31
|
text: "Đã xóa"
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
|
-
const
|
|
34
|
+
const badgeStatusCategoryAccount = {
|
|
35
|
+
[CategoryAccountStatus.ACTIVE]: { color: "bg-[#27CD7F]", text: "Hoạt động" },
|
|
36
|
+
[CategoryAccountStatus.INACTIVE]: {
|
|
37
|
+
color: "bg-[#DD4338]",
|
|
38
|
+
text: "Ngừng hoạt động"
|
|
39
|
+
},
|
|
40
|
+
[CategoryAccountStatus.DELETED]: {
|
|
41
|
+
color: "bg-[#B2B7C2]",
|
|
42
|
+
text: "Đã xóa"
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const CategoryStatus = ({ status, mode }) => {
|
|
34
46
|
//! State
|
|
35
|
-
const bagde = badgeStatusCategoryConfig[Number(status)];
|
|
47
|
+
const bagde = mode === "categoryAccount" ? badgeStatusCategoryAccount[Number(status)] : badgeStatusCategoryConfig[Number(status)];
|
|
36
48
|
//! Function
|
|
37
49
|
const ItemStatus = ({
|
|
38
50
|
color,
|
|
@@ -47,4 +59,4 @@ const CategoryStatus = ({ status }) => {
|
|
|
47
59
|
return /* @__PURE__ */ jsx(ItemStatus, { color: bagde?.color, statusName: bagde?.text });
|
|
48
60
|
};
|
|
49
61
|
|
|
50
|
-
export { CATEGORY_LIST_ENUM, CategoryStatus, badgeStatusCategoryConfig };
|
|
62
|
+
export { CATEGORY_LIST_ENUM, CategoryStatus, badgeStatusCategoryAccount, badgeStatusCategoryConfig };
|
package/es/ui/Container.js
CHANGED
package/es/ui/Label.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
2
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
3
3
|
import { Typography } from './Typography.js';
|
|
4
4
|
|
|
5
5
|
const Label = ({ label, required, classNameLabel }) => {
|
package/es/ui/Layout.js
CHANGED
|
@@ -227,6 +227,7 @@ var Entity = /*#__PURE__*/function () {
|
|
|
227
227
|
_defineProperty(this, "instanceId", void 0);
|
|
228
228
|
/** @private Internal cache map. Do not access this directly */
|
|
229
229
|
_defineProperty(this, "cache", new Map());
|
|
230
|
+
_defineProperty(this, "extracted", new Set());
|
|
230
231
|
this.instanceId = instanceId;
|
|
231
232
|
}
|
|
232
233
|
_createClass(Entity, [{
|
|
@@ -744,7 +745,6 @@ onCacheEffect) {
|
|
|
744
745
|
}, /* eslint-disable react-hooks/exhaustive-deps */
|
|
745
746
|
[fullPathStr]
|
|
746
747
|
/* eslint-enable */);
|
|
747
|
-
|
|
748
748
|
var cacheEntity = globalCache.opGet(fullPathStr);
|
|
749
749
|
|
|
750
750
|
// HMR clean the cache but not trigger `useMemo` again
|
|
@@ -824,14 +824,13 @@ var TOKEN_THRESHOLD = 0;
|
|
|
824
824
|
// Remove will check current keys first
|
|
825
825
|
function cleanTokenStyle(tokenKey, instanceId) {
|
|
826
826
|
tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);
|
|
827
|
-
var
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
return count <= 0;
|
|
827
|
+
var cleanableKeyList = new Set();
|
|
828
|
+
tokenKeys.forEach(function (value, key) {
|
|
829
|
+
if (value <= 0) cleanableKeyList.add(key);
|
|
831
830
|
});
|
|
832
831
|
|
|
833
832
|
// Should keep tokens under threshold for not to insert style too often
|
|
834
|
-
if (
|
|
833
|
+
if (tokenKeys.size - cleanableKeyList.size > TOKEN_THRESHOLD) {
|
|
835
834
|
cleanableKeyList.forEach(function (key) {
|
|
836
835
|
removeStyleTags(key, instanceId);
|
|
837
836
|
tokenKeys.delete(key);
|
|
@@ -1884,7 +1883,8 @@ function useStyleRegister(info, styleFn) {
|
|
|
1884
1883
|
styleId = _ref3[2];
|
|
1885
1884
|
if ((fromHMR || autoClear) && isClientSide) {
|
|
1886
1885
|
removeCSS(styleId, {
|
|
1887
|
-
mark: ATTR_MARK
|
|
1886
|
+
mark: ATTR_MARK,
|
|
1887
|
+
attachTo: container
|
|
1888
1888
|
});
|
|
1889
1889
|
}
|
|
1890
1890
|
},
|
|
@@ -1957,8 +1957,7 @@ function useStyleRegister(info, styleFn) {
|
|
|
1957
1957
|
if (!ssrInline || isMergedClientSide || !defaultCache) {
|
|
1958
1958
|
styleNode = /*#__PURE__*/React.createElement(Empty, null);
|
|
1959
1959
|
} else {
|
|
1960
|
-
|
|
1961
|
-
styleNode = /*#__PURE__*/React.createElement("style", _extends({}, (_ref6 = {}, _defineProperty(_ref6, ATTR_TOKEN, cachedTokenKey), _defineProperty(_ref6, ATTR_MARK, cachedStyleId), _ref6), {
|
|
1960
|
+
styleNode = /*#__PURE__*/React.createElement("style", _extends({}, _defineProperty(_defineProperty({}, ATTR_TOKEN, cachedTokenKey), ATTR_MARK, cachedStyleId), {
|
|
1962
1961
|
dangerouslySetInnerHTML: {
|
|
1963
1962
|
__html: cachedStyleStr
|
|
1964
1963
|
}
|
|
@@ -2000,7 +1999,8 @@ var useCSSVarRegister = function useCSSVarRegister(config, fn) {
|
|
|
2000
1999
|
styleId = _ref2[2];
|
|
2001
2000
|
if (isClientSide) {
|
|
2002
2001
|
removeCSS(styleId, {
|
|
2003
|
-
mark: ATTR_MARK
|
|
2002
|
+
mark: ATTR_MARK,
|
|
2003
|
+
attachTo: container
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
2006
|
}, function (_ref3) {
|
|
@@ -2123,10 +2123,9 @@ function resetWarned() {
|
|
|
2123
2123
|
deprecatedWarnList = null;
|
|
2124
2124
|
resetWarned$1();
|
|
2125
2125
|
}
|
|
2126
|
-
|
|
2127
|
-
let warning = noop$1;
|
|
2126
|
+
let _warning = noop$1;
|
|
2128
2127
|
if (process.env.NODE_ENV !== 'production') {
|
|
2129
|
-
|
|
2128
|
+
_warning = (valid, component, message) => {
|
|
2130
2129
|
warningOnce(valid, `[antd: ${component}] ${message}`);
|
|
2131
2130
|
// StrictMode will inject console which will not throw warning in React 17.
|
|
2132
2131
|
if (process.env.NODE_ENV === 'test') {
|
|
@@ -2134,6 +2133,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
2134
2133
|
}
|
|
2135
2134
|
};
|
|
2136
2135
|
}
|
|
2136
|
+
const warning = _warning;
|
|
2137
2137
|
const WarningContext = /*#__PURE__*/React.createContext({});
|
|
2138
2138
|
/**
|
|
2139
2139
|
* This is a hook but we not named as `useWarning`
|
|
@@ -2652,7 +2652,6 @@ function derivative(token) {
|
|
|
2652
2652
|
return prev;
|
|
2653
2653
|
}, {});
|
|
2654
2654
|
}).reduce((prev, cur) => {
|
|
2655
|
-
// biome-ignore lint/style/noParameterAssign: it is a reduce
|
|
2656
2655
|
prev = Object.assign(Object.assign({}, prev), cur);
|
|
2657
2656
|
return prev;
|
|
2658
2657
|
}, {});
|
|
@@ -3476,7 +3475,7 @@ function genStyleUtils(config) {
|
|
|
3476
3475
|
};
|
|
3477
3476
|
}
|
|
3478
3477
|
|
|
3479
|
-
const version = '5.
|
|
3478
|
+
const version = '5.27.1';
|
|
3480
3479
|
|
|
3481
3480
|
function isStableColor(color) {
|
|
3482
3481
|
return color >= 0 && color <= 255;
|
|
@@ -3717,17 +3716,6 @@ const unitless = {
|
|
|
3717
3716
|
opacityImage: true
|
|
3718
3717
|
};
|
|
3719
3718
|
const ignore = {
|
|
3720
|
-
size: true,
|
|
3721
|
-
sizeSM: true,
|
|
3722
|
-
sizeLG: true,
|
|
3723
|
-
sizeMD: true,
|
|
3724
|
-
sizeXS: true,
|
|
3725
|
-
sizeXXS: true,
|
|
3726
|
-
sizeMS: true,
|
|
3727
|
-
sizeXL: true,
|
|
3728
|
-
sizeXXL: true,
|
|
3729
|
-
sizeUnit: true,
|
|
3730
|
-
sizeStep: true,
|
|
3731
3719
|
motionBase: true,
|
|
3732
3720
|
motionUnit: true
|
|
3733
3721
|
};
|
|
@@ -3941,7 +3929,7 @@ const useResetIconStyle = (iconPrefixCls, csp) => {
|
|
|
3941
3929
|
layer: {
|
|
3942
3930
|
name: 'antd'
|
|
3943
3931
|
}
|
|
3944
|
-
}, () =>
|
|
3932
|
+
}, () => genIconStyle(iconPrefixCls));
|
|
3945
3933
|
};
|
|
3946
3934
|
|
|
3947
3935
|
const fullClone = Object.assign({}, React);
|
|
@@ -4003,7 +3991,12 @@ function MotionProvider(_ref) {
|
|
|
4003
3991
|
}, children);
|
|
4004
3992
|
}
|
|
4005
3993
|
|
|
3994
|
+
const MotionCacheContext = /*#__PURE__*/React.createContext(true);
|
|
3995
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3996
|
+
MotionCacheContext.displayName = 'MotionCacheContext';
|
|
3997
|
+
}
|
|
4006
3998
|
function MotionWrapper(props) {
|
|
3999
|
+
const parentMotion = React.useContext(MotionCacheContext);
|
|
4007
4000
|
const {
|
|
4008
4001
|
children
|
|
4009
4002
|
} = props;
|
|
@@ -4012,11 +4005,13 @@ function MotionWrapper(props) {
|
|
|
4012
4005
|
motion
|
|
4013
4006
|
} = token;
|
|
4014
4007
|
const needWrapMotionProviderRef = React.useRef(false);
|
|
4015
|
-
needWrapMotionProviderRef.current
|
|
4008
|
+
needWrapMotionProviderRef.current || (needWrapMotionProviderRef.current = parentMotion !== motion);
|
|
4016
4009
|
if (needWrapMotionProviderRef.current) {
|
|
4017
|
-
return /*#__PURE__*/React.createElement(
|
|
4010
|
+
return /*#__PURE__*/React.createElement(MotionCacheContext.Provider, {
|
|
4011
|
+
value: motion
|
|
4012
|
+
}, /*#__PURE__*/React.createElement(MotionProvider, {
|
|
4018
4013
|
motion: motion
|
|
4019
|
-
}, children);
|
|
4014
|
+
}, children));
|
|
4020
4015
|
}
|
|
4021
4016
|
return children;
|
|
4022
4017
|
}
|
|
@@ -4145,6 +4140,7 @@ const ProviderChildren = props => {
|
|
|
4145
4140
|
tooltip,
|
|
4146
4141
|
popover,
|
|
4147
4142
|
popconfirm,
|
|
4143
|
+
floatButton,
|
|
4148
4144
|
floatButtonGroup,
|
|
4149
4145
|
variant,
|
|
4150
4146
|
inputNumber,
|
|
@@ -4237,6 +4233,7 @@ const ProviderChildren = props => {
|
|
|
4237
4233
|
tooltip,
|
|
4238
4234
|
popover,
|
|
4239
4235
|
popconfirm,
|
|
4236
|
+
floatButton,
|
|
4240
4237
|
floatButtonGroup,
|
|
4241
4238
|
variant,
|
|
4242
4239
|
inputNumber,
|
|
@@ -4538,7 +4535,7 @@ const prepareComponentToken = token => {
|
|
|
4538
4535
|
};
|
|
4539
4536
|
// ============================== Export ==============================
|
|
4540
4537
|
const DEPRECATED_TOKENS = [['colorBgBody', 'bodyBg'], ['colorBgHeader', 'headerBg'], ['colorBgTrigger', 'triggerBg']];
|
|
4541
|
-
const useStyle$1 = genStyleHooks('Layout',
|
|
4538
|
+
const useStyle$1 = genStyleHooks('Layout', genLayoutStyle, prepareComponentToken, {
|
|
4542
4539
|
deprecatedTokens: DEPRECATED_TOKENS
|
|
4543
4540
|
});
|
|
4544
4541
|
|
|
@@ -4649,7 +4646,7 @@ const genSiderStyle = token => {
|
|
|
4649
4646
|
}
|
|
4650
4647
|
};
|
|
4651
4648
|
};
|
|
4652
|
-
const useStyle = genStyleHooks(['Layout', 'Sider'],
|
|
4649
|
+
const useStyle = genStyleHooks(['Layout', 'Sider'], genSiderStyle, prepareComponentToken, {
|
|
4653
4650
|
deprecatedTokens: DEPRECATED_TOKENS
|
|
4654
4651
|
});
|
|
4655
4652
|
|
package/es/ui/Modal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { u as useForm } from '../chunks/index.esm-
|
|
2
|
+
import { u as useForm } from '../chunks/index.esm-Dr5ZHcf7.js';
|
|
3
3
|
import { Button } from './Button.js';
|
|
4
4
|
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-D_ySRKRj.js';
|
|
5
5
|
import * as React from 'react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Select, Table } from 'antd';
|
|
3
3
|
import { useState, useCallback } from 'react';
|
|
4
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
4
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
5
5
|
import { get, isEmpty } from 'lodash';
|
|
6
6
|
import { ErrorMessage } from './ErrorMessage.js';
|
|
7
7
|
import { Label } from './Label.js';
|
package/es/ui/SelectTable.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Select, Table } from 'antd';
|
|
3
3
|
import { useState, useCallback } from 'react';
|
|
4
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
4
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
5
5
|
|
|
6
6
|
const SelectTable = ({
|
|
7
7
|
columns,
|
package/es/ui/Sidebar/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useLocation, useNavigate } from 'react-router';
|
|
|
5
5
|
import { Flex, AutoComplete, Divider, Dropdown } from 'antd';
|
|
6
6
|
import { Layout } from '../Layout.js';
|
|
7
7
|
import { Input } from '../../fields/Input.js';
|
|
8
|
-
import { t as twMerge } from '../../chunks/bundle-mjs-
|
|
8
|
+
import { t as twMerge } from '../../chunks/bundle-mjs-BME7zF0Z.js';
|
|
9
9
|
import { R as RefIcon$2 } from '../../chunks/DownOutlined-BlKl-wuu.js';
|
|
10
10
|
import { I as Icon, _ as _extends } from '../../chunks/AntdIcon-D_ySRKRj.js';
|
|
11
11
|
|
|
@@ -52,8 +52,8 @@ const SearchIcon = (props) => /* @__PURE__ */ jsx("div", { ...props, children: /
|
|
|
52
52
|
children: /* @__PURE__ */ jsx(
|
|
53
53
|
"path",
|
|
54
54
|
{
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
fillRule: "evenodd",
|
|
56
|
+
clipRule: "evenodd",
|
|
57
57
|
d: "M14.854 14.1467C15.0478 14.3412 15.0476 14.656 14.8534 14.8502C14.6593 15.0443 14.3445 15.0443 14.1504 14.8502L12.0201 12.7261C11.0663 13.5215 9.83903 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83874 13.5217 11.0658 12.7266 12.0195L14.854 14.1467ZM8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13Z",
|
|
58
58
|
fill: "currentColor"
|
|
59
59
|
}
|
|
@@ -94,7 +94,7 @@ const VietNamIcon = ({
|
|
|
94
94
|
fill: "none",
|
|
95
95
|
xmlns: "http://www.w3.org/2000/svg",
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */ jsxs("g", {
|
|
97
|
+
/* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_3926_537319)", children: [
|
|
98
98
|
/* @__PURE__ */ jsx(
|
|
99
99
|
"path",
|
|
100
100
|
{
|
package/es/ui/Tabs.js
CHANGED
|
@@ -29,8 +29,8 @@ const identity = (arg) => arg;
|
|
|
29
29
|
function useStore(api, selector = identity) {
|
|
30
30
|
const slice = React__default.useSyncExternalStore(
|
|
31
31
|
api.subscribe,
|
|
32
|
-
() => selector(api.getState()),
|
|
33
|
-
() => selector(api.getInitialState())
|
|
32
|
+
React__default.useCallback(() => selector(api.getState()), [api, selector]),
|
|
33
|
+
React__default.useCallback(() => selector(api.getInitialState()), [api, selector])
|
|
34
34
|
);
|
|
35
35
|
React__default.useDebugValue(slice);
|
|
36
36
|
return slice;
|
package/es/ui/UploadComponent.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Upload, Image, Tooltip } from 'antd';
|
|
3
3
|
import { Spin } from './Spin.js';
|
|
4
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
4
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
5
5
|
import { Label } from './Label.js';
|
|
6
6
|
import { R as RefIcon } from '../chunks/CloseOutlined-B3y9Maz0.js';
|
|
7
7
|
|
package/es/ui/UploadImage.js
CHANGED
package/es/ui/index.js
CHANGED
|
@@ -55,10 +55,10 @@ export { Image } from './Image.js';
|
|
|
55
55
|
import { ConfirmModal } from './ConfirmModal.js';
|
|
56
56
|
export { ErrorBoundary } from './ErrorBoundary.js';
|
|
57
57
|
import { CATEGORY_LIST_ENUM } from './CategoryStatus.js';
|
|
58
|
-
export { CategoryStatus, badgeStatusCategoryConfig } from './CategoryStatus.js';
|
|
58
|
+
export { CategoryStatus, badgeStatusCategoryAccount, badgeStatusCategoryConfig } from './CategoryStatus.js';
|
|
59
59
|
import { useToggle } from '@pnkx-lib/core';
|
|
60
60
|
import { isEmpty, isBoolean } from 'lodash';
|
|
61
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
61
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
62
62
|
export { BreadcrumbHeading } from './BreadcrumbHeading.js';
|
|
63
63
|
export { Card } from './Card.js';
|
|
64
64
|
export { ConfigProvider } from './ConfigProvider.js';
|
|
@@ -810,9 +810,9 @@ const RefuseApprovalDropListIcon = ({
|
|
|
810
810
|
{
|
|
811
811
|
d: "M11 20.1663C16.06 20.1663 20.1666 16.0597 20.1666 10.9997C20.1666 5.93967 16.06 1.83301 11 1.83301C5.93998 1.83301 1.83331 5.93967 1.83331 10.9997C1.83331 16.0597 5.93998 20.1663 11 20.1663Z",
|
|
812
812
|
stroke: stroke || "#292D32",
|
|
813
|
-
|
|
813
|
+
strokeWidth: "1.5",
|
|
814
814
|
"stroke-miterlimit": "10",
|
|
815
|
-
|
|
815
|
+
strokeLinecap: "round",
|
|
816
816
|
"stroke-linejoin": "round"
|
|
817
817
|
}
|
|
818
818
|
),
|
|
@@ -821,9 +821,9 @@ const RefuseApprovalDropListIcon = ({
|
|
|
821
821
|
{
|
|
822
822
|
d: "M17.3249 4.58301L4.49158 17.4163",
|
|
823
823
|
stroke: stroke || "#292D32",
|
|
824
|
-
|
|
824
|
+
strokeWidth: "1.5",
|
|
825
825
|
"stroke-miterlimit": "10",
|
|
826
|
-
|
|
826
|
+
strokeLinecap: "round",
|
|
827
827
|
"stroke-linejoin": "round"
|
|
828
828
|
}
|
|
829
829
|
)
|