@pnkx-lib/ui 1.9.191 → 1.9.192
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 +1 -1
- package/es/chunks/{AntdIcon-yV_Jlg2I.js → AntdIcon-ZIq9SabE.js} +71 -5
- package/es/chunks/{bundle-mjs-BME7zF0Z.js → bundle-mjs-BBFHkixS.js} +1 -1
- package/es/chunks/createClass-CBKC8ctW.js +77 -0
- package/es/chunks/defineProperty-DPy3D8dn.js +50 -0
- package/es/chunks/{defineProperty-DKmbVXax.js → index-mzHK7Za8.js} +2 -51
- package/es/chunks/{index.esm-DPdCEbIy.js → index.esm-o4O8pXMN.js} +7 -17
- package/es/chunks/{layout-DLP6LR8f.js → layout-DnU0VrHH.js} +41 -1206
- package/es/constants/index.js +2 -2
- package/es/fields/CascaderField.js +1 -1
- package/es/fields/DatePicker.js +5 -77
- package/es/fields/Input.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/TinyMCE.js +47 -11
- package/es/fields/Upload.js +1 -1
- package/es/ui/BreadcrumbHeading.js +2 -2
- package/es/ui/CategoryStatus.js +1 -1
- package/es/ui/Container.js +1 -1
- package/es/ui/Heading.js +2 -2
- package/es/ui/Layout.js +1 -1
- package/es/ui/SearchFilterForm.js +2 -2
- package/es/ui/Sidebar.js +3 -3
- package/es/ui/UploadImage.js +1 -1
- package/es/ui/index.js +15 -15
- package/package.json +2 -2
- package/types/components/ui/BulkActions/index.d.ts +11 -3
- package/types/components/ui/Table/index.d.ts +12 -1
- package/types/constants/table.d.ts +2 -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-C880miVG.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-BBFHkixS.js';
|
|
8
8
|
import { Tooltip } from '../ui/Tooltip.js';
|
|
9
9
|
|
|
10
10
|
/**
|
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-o4O8pXMN.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-C880miVG.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-BBFHkixS.js';
|
|
7
7
|
|
|
8
8
|
const Select = (props) => {
|
|
9
9
|
//! State
|
|
@@ -3,7 +3,7 @@ import { Slider } from 'antd';
|
|
|
3
3
|
import { g as get } from '../chunks/get-C880miVG.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-BBFHkixS.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-C880miVG.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-BBFHkixS.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-C880miVG.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-BBFHkixS.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-C880miVG.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-BBFHkixS.js';
|
|
8
8
|
|
|
9
9
|
const { TextArea } = Input;
|
|
10
10
|
const Textarea = forwardRef(
|
package/es/fields/TinyMCE.js
CHANGED
|
@@ -1301,6 +1301,45 @@ var getTinymce = function (view) {
|
|
|
1301
1301
|
return global && global.tinymce ? global.tinymce : null;
|
|
1302
1302
|
};
|
|
1303
1303
|
|
|
1304
|
+
const toInt = (str) => parseInt(str, 10);
|
|
1305
|
+
const cmp = (a, b) => {
|
|
1306
|
+
const delta = a - b;
|
|
1307
|
+
if (delta === 0) {
|
|
1308
|
+
return 0 /* Comparison.EQ */;
|
|
1309
|
+
}
|
|
1310
|
+
return delta > 0 ? 1 /* Comparison.GT */ : -1 /* Comparison.LT */;
|
|
1311
|
+
};
|
|
1312
|
+
const nu = (major, minor, patch) => ({ major, minor, patch });
|
|
1313
|
+
const parse = (versionString) => {
|
|
1314
|
+
const parts = /([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(versionString);
|
|
1315
|
+
return parts ? nu(toInt(parts[1]), toInt(parts[2]), toInt(parts[3])) : nu(0, 0, 0);
|
|
1316
|
+
};
|
|
1317
|
+
const compare = (version1, version2) => {
|
|
1318
|
+
const cmp1 = cmp(version1.major, version2.major);
|
|
1319
|
+
if (cmp1 !== 0 /* Comparison.EQ */) {
|
|
1320
|
+
return cmp1;
|
|
1321
|
+
}
|
|
1322
|
+
const cmp2 = cmp(version1.minor, version2.minor);
|
|
1323
|
+
if (cmp2 !== 0 /* Comparison.EQ */) {
|
|
1324
|
+
return cmp2;
|
|
1325
|
+
}
|
|
1326
|
+
const cmp3 = cmp(version1.patch, version2.patch);
|
|
1327
|
+
if (cmp3 !== 0 /* Comparison.EQ */) {
|
|
1328
|
+
return cmp3;
|
|
1329
|
+
}
|
|
1330
|
+
return 0 /* Comparison.EQ */;
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
// Creates a semver string out of tinymce major and minor properties this also handles
|
|
1334
|
+
// the pre semver case with 3.x versions of tinymce having a extra dot 1.2.3.4 we simply
|
|
1335
|
+
// ignore the extra dot and normalize that to proper semver
|
|
1336
|
+
const createSemVer = (tinymce) => {
|
|
1337
|
+
const semver = [tinymce.majorVersion, tinymce.minorVersion].join('.');
|
|
1338
|
+
return semver.split('.').slice(0, 3).join('.');
|
|
1339
|
+
};
|
|
1340
|
+
const getVersion = (tinymce) => parse(createSemVer(tinymce));
|
|
1341
|
+
const isLessThan = (tinymce, version) => !tinymce ? false : compare(getVersion(tinymce), parse(version)) === -1 /* Semver.Comparison.LT */;
|
|
1342
|
+
|
|
1304
1343
|
var isFunction = function (x) { return typeof x === 'function'; };
|
|
1305
1344
|
var isEventProp = function (name) { return name in eventPropTypes; };
|
|
1306
1345
|
var eventAttrToEventName = function (attrName) { return attrName.substr(2); };
|
|
@@ -1377,7 +1416,10 @@ var getTinymceOrError = function (view) {
|
|
|
1377
1416
|
}
|
|
1378
1417
|
return tinymce;
|
|
1379
1418
|
};
|
|
1380
|
-
var isDisabledOptionSupported = function (
|
|
1419
|
+
var isDisabledOptionSupported = function (view) {
|
|
1420
|
+
var tinymce = getTinymceOrError(view);
|
|
1421
|
+
return !isLessThan(tinymce, '7.6.0');
|
|
1422
|
+
};
|
|
1381
1423
|
|
|
1382
1424
|
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
1383
1425
|
__assign$1 = Object.assign || function(t) {
|
|
@@ -1643,7 +1685,9 @@ var Editor = /** @class */ (function (_super) {
|
|
|
1643
1685
|
return;
|
|
1644
1686
|
}
|
|
1645
1687
|
var tinymce = getTinymceOrError(_this.view);
|
|
1646
|
-
var finalInit = __assign(__assign(__assign(__assign({}, _this.props.init), { selector: undefined, target: target
|
|
1688
|
+
var finalInit = __assign(__assign(__assign(__assign(__assign(__assign({}, _this.props.init), { selector: undefined, target: target }), isDisabledOptionSupported(_this.view)
|
|
1689
|
+
? { disabled: _this.props.disabled, readonly: _this.props.readonly }
|
|
1690
|
+
: { readonly: _this.props.disabled || _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) {
|
|
1647
1691
|
_this.editor = editor;
|
|
1648
1692
|
_this.bindHandlers({});
|
|
1649
1693
|
// When running in inline mode the editor gets the initial value
|
|
@@ -1660,14 +1704,6 @@ var Editor = /** @class */ (function (_super) {
|
|
|
1660
1704
|
if (_this.props.init && isFunction(_this.props.init.setup)) {
|
|
1661
1705
|
_this.props.init.setup(editor);
|
|
1662
1706
|
}
|
|
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
|
-
}
|
|
1671
1707
|
}, init_instance_callback: function (editor) {
|
|
1672
1708
|
var _a;
|
|
1673
1709
|
// check for changes that happened since tinymce.init() was called
|
|
@@ -1763,7 +1799,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
1763
1799
|
setMode(this.editor, readonly ? 'readonly' : 'design');
|
|
1764
1800
|
}
|
|
1765
1801
|
if (this.props.disabled !== prevProps.disabled) {
|
|
1766
|
-
if (isDisabledOptionSupported(this.
|
|
1802
|
+
if (isDisabledOptionSupported(this.view)) {
|
|
1767
1803
|
this.editor.options.set('disabled', this.props.disabled);
|
|
1768
1804
|
}
|
|
1769
1805
|
else {
|
package/es/fields/Upload.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Upload, Image } from 'antd';
|
|
|
5
5
|
import { g as get } from '../chunks/get-C880miVG.js';
|
|
6
6
|
import { ErrorMessage } from '../ui/ErrorMessage.js';
|
|
7
7
|
import { Label } from '../ui/Label.js';
|
|
8
|
-
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-
|
|
8
|
+
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-ZIq9SabE.js';
|
|
9
9
|
|
|
10
10
|
// This icon file is generated automatically.
|
|
11
11
|
var PlusOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { c as className } from '../chunks/index-mzHK7Za8.js';
|
|
2
3
|
import { Breadcrumb } from './Breadcrumb.js';
|
|
3
4
|
import { useLocation, Link } from 'react-router';
|
|
4
|
-
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
5
5
|
|
|
6
6
|
const BreadcrumbHeading = (props) => {
|
|
7
7
|
const { menu, customBreadcum } = props;
|
|
@@ -48,7 +48,7 @@ const BreadcrumbHeading = (props) => {
|
|
|
48
48
|
...customBreadcum ?? []
|
|
49
49
|
];
|
|
50
50
|
//! Render
|
|
51
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
51
|
+
return /* @__PURE__ */ jsx("div", { className: className("flex justify-between items-end"), children: /* @__PURE__ */ jsx(Breadcrumb, { items: dataBreadcum }) });
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
export { BreadcrumbHeading };
|
package/es/ui/CategoryStatus.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
2
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
|
|
3
3
|
|
|
4
4
|
var CATEGORY_LIST_ENUM = /* @__PURE__ */ ((CATEGORY_LIST_ENUM2) => {
|
|
5
5
|
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["DRAFT"] = 0] = "DRAFT";
|
package/es/ui/Container.js
CHANGED
package/es/ui/Heading.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { c as className } from '../chunks/index-mzHK7Za8.js';
|
|
2
3
|
import { Breadcrumb } from './Breadcrumb.js';
|
|
3
4
|
import { useLocation, Link } from 'react-router';
|
|
4
|
-
import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
|
|
5
5
|
|
|
6
6
|
const Heading = (props) => {
|
|
7
7
|
const { rightContent, children, noBreadcum, classNameWrapHeading, menu } = props;
|
|
@@ -50,7 +50,7 @@ const Heading = (props) => {
|
|
|
50
50
|
/* @__PURE__ */ jsxs(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
|
-
className:
|
|
53
|
+
className: className(
|
|
54
54
|
"flex justify-between items-end",
|
|
55
55
|
classNameWrapHeading
|
|
56
56
|
),
|
package/es/ui/Layout.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { S as SiderContext, a as Sider, C as Content, F as Footer, H as Header, L as Layout$1 } from '../chunks/layout-
|
|
2
|
+
import { S as SiderContext, a as Sider, C as Content, F as Footer, H as Header, L as Layout$1 } from '../chunks/layout-DnU0VrHH.js';
|
|
3
3
|
|
|
4
4
|
const LayoutComponent = ({
|
|
5
5
|
layoutClassName,
|
|
@@ -1,7 +1,7 @@
|
|
|
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-o4O8pXMN.js';
|
|
3
3
|
import { Button } from './Button.js';
|
|
4
|
-
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-
|
|
4
|
+
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-ZIq9SabE.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
|
|
7
7
|
// This icon file is generated automatically.
|
package/es/ui/Sidebar.js
CHANGED
|
@@ -2,11 +2,11 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useState, useEffect } from 'react';
|
|
4
4
|
import { useNavigate, useLocation } from 'react-router';
|
|
5
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
6
|
-
import { H as Header } from '../chunks/layout-
|
|
5
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
|
|
6
|
+
import { H as Header } from '../chunks/layout-DnU0VrHH.js';
|
|
7
7
|
import { AutoComplete, Divider, Dropdown, Flex } from 'antd';
|
|
8
8
|
import { Input } from '../fields/Input.js';
|
|
9
|
-
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-
|
|
9
|
+
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-ZIq9SabE.js';
|
|
10
10
|
|
|
11
11
|
// This icon file is generated automatically.
|
|
12
12
|
var DownOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
|
package/es/ui/UploadImage.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Upload, Image, Tooltip, message } from 'antd';
|
|
5
5
|
import { Spin } from './Spin.js';
|
|
6
|
-
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-
|
|
6
|
+
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-ZIq9SabE.js';
|
|
7
7
|
|
|
8
8
|
// This icon file is generated automatically.
|
|
9
9
|
var CloseOutlined$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" };
|
package/es/ui/index.js
CHANGED
|
@@ -6,11 +6,11 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
6
6
|
import React__default, { useLayoutEffect, useEffect, useRef, useMemo, useCallback, useState, memo, useReducer, createContext, useContext } from 'react';
|
|
7
7
|
import { Table as Table$1 } from 'antd';
|
|
8
8
|
import { Modal } from './Modal.js';
|
|
9
|
-
import { u as useForm } from '../chunks/index.esm-
|
|
9
|
+
import { u as useForm } from '../chunks/index.esm-o4O8pXMN.js';
|
|
10
10
|
import { PnkxField } from '../fields/PnkxField.js';
|
|
11
11
|
import { Checkbox } from '../fields/Checkbox.js';
|
|
12
12
|
import { unstable_batchedUpdates, createPortal } from 'react-dom';
|
|
13
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
13
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
|
|
14
14
|
import { Badge } from './Badge.js';
|
|
15
15
|
export { typeColorMap } from './Badge.js';
|
|
16
16
|
import { Heading } from './Heading.js';
|
|
@@ -4872,15 +4872,15 @@ const BulkAction = ({
|
|
|
4872
4872
|
|
|
4873
4873
|
const BulkActions = ({
|
|
4874
4874
|
quantity = 0,
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4875
|
+
handleRestore,
|
|
4876
|
+
handleSendApproval,
|
|
4877
|
+
handleCancelSendApproval,
|
|
4878
|
+
handleRefuseApproval,
|
|
4879
|
+
handleApproval,
|
|
4879
4880
|
handleCancelApproval,
|
|
4880
|
-
|
|
4881
|
-
handleDeactivate,
|
|
4881
|
+
handleDelete,
|
|
4882
4882
|
handleActivate,
|
|
4883
|
-
|
|
4883
|
+
handleInActivate,
|
|
4884
4884
|
status
|
|
4885
4885
|
}) => {
|
|
4886
4886
|
//! State
|
|
@@ -4900,7 +4900,7 @@ const BulkActions = ({
|
|
|
4900
4900
|
icon: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "white" }),
|
|
4901
4901
|
iconDropList: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "#0F1D40" }),
|
|
4902
4902
|
iconDisable: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "#B2B7C2" }),
|
|
4903
|
-
action:
|
|
4903
|
+
action: handleSendApproval,
|
|
4904
4904
|
name: "Gửi duyệt",
|
|
4905
4905
|
typeIcon: "info",
|
|
4906
4906
|
title: "Xác nhận gửi duyệt",
|
|
@@ -4911,7 +4911,7 @@ const BulkActions = ({
|
|
|
4911
4911
|
icon: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "white" }),
|
|
4912
4912
|
iconDropList: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "#0F1D40" }),
|
|
4913
4913
|
iconDisable: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "#B2B7C2" }),
|
|
4914
|
-
action:
|
|
4914
|
+
action: handleCancelSendApproval,
|
|
4915
4915
|
name: "Huỷ gửi duyệt",
|
|
4916
4916
|
typeIcon: "error",
|
|
4917
4917
|
title: "Xác nhận hủy gửi duyệt",
|
|
@@ -4922,7 +4922,7 @@ const BulkActions = ({
|
|
|
4922
4922
|
icon: /* @__PURE__ */ jsx(RefuseApprovalIcon, { stroke: "white" }),
|
|
4923
4923
|
iconDropList: /* @__PURE__ */ jsx(RefuseApprovalIcon, { stroke: "#0F1D40" }),
|
|
4924
4924
|
iconDisable: /* @__PURE__ */ jsx(RefuseApprovalIcon, { stroke: "#B2B7C2" }),
|
|
4925
|
-
action:
|
|
4925
|
+
action: handleRefuseApproval,
|
|
4926
4926
|
name: "Từ chối duyệt",
|
|
4927
4927
|
typeIcon: "error",
|
|
4928
4928
|
title: "Xác nhận từ chối duyệt",
|
|
@@ -4933,7 +4933,7 @@ const BulkActions = ({
|
|
|
4933
4933
|
icon: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "white" }),
|
|
4934
4934
|
iconDropList: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "#0F1D40" }),
|
|
4935
4935
|
iconDisable: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "#B2B7C2" }),
|
|
4936
|
-
action:
|
|
4936
|
+
action: handleApproval,
|
|
4937
4937
|
name: "Duyệt",
|
|
4938
4938
|
typeIcon: "info",
|
|
4939
4939
|
title: "Xác nhận duyệt",
|
|
@@ -4981,7 +4981,7 @@ const BulkActions = ({
|
|
|
4981
4981
|
icon: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "white" }),
|
|
4982
4982
|
iconDropList: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "#0F1D40" }),
|
|
4983
4983
|
iconDisable: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "#B2B7C2" }),
|
|
4984
|
-
action:
|
|
4984
|
+
action: handleInActivate,
|
|
4985
4985
|
name: "Vô hiệu hóa",
|
|
4986
4986
|
typeIcon: "info",
|
|
4987
4987
|
title: "Xác nhận vô hiệu hóa",
|
|
@@ -5158,7 +5158,7 @@ const Table = ({
|
|
|
5158
5158
|
rowsSelected && !isEmpty(rowsSelected) && /* @__PURE__ */ jsx("div", { className: "fixed bottom-1/100 left-1/2 -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsx(
|
|
5159
5159
|
BulkActions,
|
|
5160
5160
|
{
|
|
5161
|
-
type: TypeBulkActions.
|
|
5161
|
+
type: TypeBulkActions.BULKACTION,
|
|
5162
5162
|
quantity: rowsSelected?.length,
|
|
5163
5163
|
status,
|
|
5164
5164
|
...bulkActionHandlers
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnkx-lib/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.192",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./es/index.js",
|
|
7
7
|
"module": "./es/index.js",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"@headlessui/react": "^2.2.2",
|
|
135
135
|
"@heroicons/react": "^2.2.0",
|
|
136
136
|
"@hookform/resolvers": "^5.0.1",
|
|
137
|
-
"@pnkx-lib/core": "^1.1.
|
|
137
|
+
"@pnkx-lib/core": "^1.1.62",
|
|
138
138
|
"@pnkx-lib/icon": "^0.0.35",
|
|
139
139
|
"@tailwindcss/cli": "^4.1.6",
|
|
140
140
|
"@tinymce/miniature": "^6.0.0",
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { ConfirmModalProps } from '../ConfirmModal';
|
|
2
|
-
import { BulkActionHandlers } from '@pnkx-lib/core';
|
|
3
2
|
import { TypeBulkActions, TypeStatusTable } from '../../../constants';
|
|
4
3
|
import { CATEGORY_LIST_ENUM } from '../CategoryStatus';
|
|
5
|
-
interface IBulkActionsProps
|
|
4
|
+
interface IBulkActionsProps {
|
|
6
5
|
quantity?: number;
|
|
6
|
+
handleRestore?: () => void;
|
|
7
|
+
handleSendApproval?: () => void;
|
|
8
|
+
handleCancelSendApproval?: () => void;
|
|
9
|
+
handleRefuseApproval?: () => void;
|
|
10
|
+
handleApproval?: () => void;
|
|
11
|
+
handleCancelApproval?: () => void;
|
|
12
|
+
handleDelete?: () => void;
|
|
13
|
+
handleActivate?: () => void;
|
|
14
|
+
handleInActivate?: () => void;
|
|
7
15
|
status?: TypeStatusTable;
|
|
8
16
|
type?: TypeBulkActions;
|
|
9
17
|
}
|
|
@@ -18,5 +26,5 @@ export type TListIcon = {
|
|
|
18
26
|
typeIcon?: ConfirmModalProps["typeIcon"];
|
|
19
27
|
name?: string;
|
|
20
28
|
};
|
|
21
|
-
export declare const BulkActions: ({ quantity,
|
|
29
|
+
export declare const BulkActions: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: IBulkActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
30
|
export {};
|
|
@@ -2,7 +2,7 @@ import { default as React, ReactNode } from 'react';
|
|
|
2
2
|
import { TableColumnsType as TableColumnsTypeAntd } from 'antd';
|
|
3
3
|
import { TableProps } from 'antd/lib/table';
|
|
4
4
|
import { SorterResult } from 'antd/es/table/interface';
|
|
5
|
-
import {
|
|
5
|
+
import { InitialFiltersSearch } from '@pnkx-lib/core';
|
|
6
6
|
import { MenuType } from '../Sidebar';
|
|
7
7
|
import { GroupHeadingButtonItem } from './HeadingTable/components/GroupHeadingButton';
|
|
8
8
|
import { TypeStatusTable } from '../../../constants';
|
|
@@ -15,6 +15,17 @@ export type TableColumnsType<T> = TableColumnsTypeAntd<T> & TableColumnsTypeEdit
|
|
|
15
15
|
export type TFilters = {
|
|
16
16
|
status?: TypeStatusTable;
|
|
17
17
|
};
|
|
18
|
+
export interface BulkActionHandlers {
|
|
19
|
+
handleRestore?: () => void;
|
|
20
|
+
handleSendApproval?: () => void;
|
|
21
|
+
handleCancelSendApproval?: () => void;
|
|
22
|
+
handleRefuseApproval?: () => void;
|
|
23
|
+
handleApproval?: () => void;
|
|
24
|
+
handleCancelApproval?: () => void;
|
|
25
|
+
handleDelete?: () => void;
|
|
26
|
+
handleActivate?: () => void;
|
|
27
|
+
handleInActivate?: () => void;
|
|
28
|
+
}
|
|
18
29
|
export interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
|
19
30
|
dataSource?: T[];
|
|
20
31
|
columns: TableColumnsType<T>;
|
|
@@ -17,8 +17,8 @@ export declare enum TypeActionRowTable {
|
|
|
17
17
|
VIEW = "VIEW"
|
|
18
18
|
}
|
|
19
19
|
export declare enum TypeBulkActions {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
BULKACTION = "bulkaction",
|
|
21
|
+
DROPLIST = "droplist"
|
|
22
22
|
}
|
|
23
23
|
export declare enum TypeStatusTable {
|
|
24
24
|
ALL = "ALL",// Tất cả
|