@pnkx-lib/ui 1.9.298 → 1.9.300
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/{AntdIcon-ZIq9SabE.js → AntdIcon-DSoxq9aC.js} +1 -1
- package/es/chunks/{bundle-mjs-BME7zF0Z.js → bundle-mjs-BBFHkixS.js} +1 -1
- package/es/chunks/{createClass-CBKC8ctW.js → createSuper-C90IQ42g.js} +17 -17
- package/es/chunks/{index.esm-AaUjBMaK.js → index.esm-o4O8pXMN.js} +21 -39
- package/es/chunks/{layout-7Xdid6Lv.js → layout-DoBNb9xg.js} +8 -14
- 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/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 +47 -11
- package/es/fields/Upload.js +1 -1
- package/es/ui/Button.js +1 -1
- package/es/ui/Cascader.js +1 -1
- package/es/ui/CategoryStatus.js +1 -1
- package/es/ui/Container.js +1 -1
- package/es/ui/ErrorMessage.js +1 -1
- package/es/ui/Layout.js +1 -1
- package/es/ui/Modal.js +1 -1
- package/es/ui/SearchFilterForm.js +2 -2
- package/es/ui/Sidebar.js +3 -3
- package/es/ui/UploadComponent.js +2 -2
- package/es/ui/UploadImage.js +1 -1
- package/es/ui/UploadMultiple.js +2 -2
- package/es/ui/index.js +806 -5506
- package/package.json +1 -1
- package/types/components/ui/Table/index.d.ts +4 -17
- package/es/chunks/{defineProperty-DPy3D8dn.js → defineProperty-CTLrw71t.js} +10 -10
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-DSoxq9aC.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" };
|
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-BBFHkixS.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,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/ErrorMessage.js
CHANGED
|
@@ -4,7 +4,7 @@ import React__default from 'react';
|
|
|
4
4
|
const ErrorMessage = React__default.memo(
|
|
5
5
|
({ errorMessage }) => {
|
|
6
6
|
if (!errorMessage) return null;
|
|
7
|
-
return /* @__PURE__ */ jsx("div", { className: "ml-2 text-red-600", children: errorMessage });
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { className: "ml-2 text-red-600 text-sm", children: errorMessage });
|
|
8
8
|
}
|
|
9
9
|
);
|
|
10
10
|
|
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-DoBNb9xg.js';
|
|
3
3
|
|
|
4
4
|
const LayoutComponent = ({
|
|
5
5
|
layoutClassName,
|
package/es/ui/Modal.js
CHANGED
|
@@ -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-DSoxq9aC.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 { jsxs, Fragment, jsx } 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-DoBNb9xg.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-DSoxq9aC.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/UploadComponent.js
CHANGED
|
@@ -4,8 +4,8 @@ import { useState } from 'react';
|
|
|
4
4
|
import { Upload, Image, Tooltip, message } from 'antd';
|
|
5
5
|
import { Spin } from './Spin.js';
|
|
6
6
|
import { Label } from './Label.js';
|
|
7
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
|
8
|
-
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-
|
|
7
|
+
import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
|
|
8
|
+
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-DSoxq9aC.js';
|
|
9
9
|
|
|
10
10
|
// This icon file is generated automatically.
|
|
11
11
|
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/UploadImage.js
CHANGED
package/es/ui/UploadMultiple.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Spin, Upload, message } from 'antd';
|
|
5
|
-
import { C as Controller } from '../chunks/index.esm-
|
|
6
|
-
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-
|
|
5
|
+
import { C as Controller } from '../chunks/index.esm-o4O8pXMN.js';
|
|
6
|
+
import { I as Icon, _ as _extends } from '../chunks/AntdIcon-DSoxq9aC.js';
|
|
7
7
|
|
|
8
8
|
// This icon file is generated automatically.
|
|
9
9
|
var InboxOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" };
|