@pnkx-lib/ui 1.9.565 → 1.9.567

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.
Files changed (43) hide show
  1. package/dist/style.css +2 -2
  2. package/es/chunks/{bundle-mjs-BME7zF0Z.js → bundle-mjs-BBFHkixS.js} +1 -1
  3. package/es/chunks/{index.esm-AaUjBMaK.js → index.esm-Ds4t-z37.js} +90 -55
  4. package/es/chunks/{toArray-DACIS0E1.js → toArray-7SKWyzWi.js} +44 -42
  5. package/es/fields/CascaderField.js +1 -1
  6. package/es/fields/Checkbox.js +1 -1
  7. package/es/fields/DatePicker.js +1 -1
  8. package/es/fields/DateRangePicker.js +1 -1
  9. package/es/fields/Input.js +1 -1
  10. package/es/fields/InputRangePicker.js +1 -1
  11. package/es/fields/PnkxField.js +1 -1
  12. package/es/fields/Select.js +1 -1
  13. package/es/fields/SliderRanger.js +1 -1
  14. package/es/fields/SliderSingle.js +1 -1
  15. package/es/fields/Switch.js +1 -1
  16. package/es/fields/Textarea.js +1 -1
  17. package/es/fields/TimePicker.js +1 -1
  18. package/es/fields/TimeRangePicker.js +1 -1
  19. package/es/fields/TinyMCE.js +16 -35
  20. package/es/ui/BulkActions/index.js +1 -1
  21. package/es/ui/Button.js +1 -1
  22. package/es/ui/Cascader.js +1 -1
  23. package/es/ui/CategoryStatus.js +1 -1
  24. package/es/ui/ClinicalStatus.js +1 -1
  25. package/es/ui/Clock/index.js +1 -1
  26. package/es/ui/Container.js +1 -1
  27. package/es/ui/CustomeBulkActions/index.js +1 -1
  28. package/es/ui/Descriptions.js +1 -1
  29. package/es/ui/GenericUploadModal.js +540 -578
  30. package/es/ui/Label.js +1 -1
  31. package/es/ui/Layout.js +28 -31
  32. package/es/ui/Modal.js +1 -1
  33. package/es/ui/PriceStatus.js +1 -1
  34. package/es/ui/SearchFilterForm.js +1 -1
  35. package/es/ui/SelectSingleTable.js +1 -1
  36. package/es/ui/SelectTable.js +10 -6
  37. package/es/ui/Sidebar/index.js +1 -1
  38. package/es/ui/TableCategory/index.js +2 -2
  39. package/es/ui/TableForm/index.js +1 -1
  40. package/es/ui/UploadComponent.js +1 -1
  41. package/es/ui/UploadImage.js +1 -1
  42. package/es/ui/index.js +3 -3
  43. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { Checkbox as Checkbox$1 } from 'antd';
3
3
  import { g as get } from '../chunks/get-BtGVDpFp.js';
4
4
  import { ErrorMessage } from '../ui/ErrorMessage.js';
5
5
  import { Typography } from '../ui/Typography.js';
6
- import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
6
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
7
7
 
8
8
  const Checkbox = (props) => {
9
9
  //! State
@@ -10,7 +10,7 @@ import { g as getDefaultExportFromCjs } from '../chunks/_commonjsHelpers-D5KtpA0
10
10
  import { g as get } from '../chunks/get-BtGVDpFp.js';
11
11
  import { ErrorMessage } from '../ui/ErrorMessage.js';
12
12
  import { Label } from '../ui/Label.js';
13
- import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
13
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
14
14
 
15
15
  const CalendarIcon = ({
16
16
  size = 24,
@@ -3,7 +3,7 @@ import { DatePicker } from 'antd';
3
3
  import { g as get } from '../chunks/get-BtGVDpFp.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-BME7zF0Z.js';
6
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
7
7
  import { w as wrapWithTooltip } from '../chunks/wapper-Bk3PQCcg.js';
8
8
 
9
9
  const { RangePicker: RangePickerPnkx } = DatePicker;
@@ -4,7 +4,7 @@ import { Input as Input$1 } from 'antd';
4
4
  import { g as get } from '../chunks/get-BtGVDpFp.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-BME7zF0Z.js';
7
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.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-BtGVDpFp.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-BME7zF0Z.js';
7
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
8
8
  import { w as wrapWithTooltip } from '../chunks/wapper-Bk3PQCcg.js';
9
9
 
10
10
  const InputRangePicker = (props) => {
@@ -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-AaUjBMaK.js';
3
+ import { C as Controller } from '../chunks/index.esm-Ds4t-z37.js';
4
4
 
5
5
  class PnkxField extends React.PureComponent {
6
6
  render() {
@@ -3,7 +3,7 @@ import { Select as Select$1 } from 'antd';
3
3
  import { g as get } from '../chunks/get-BtGVDpFp.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-BME7zF0Z.js';
6
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
7
7
  import { R as RefIcon } from '../chunks/CloseOutlined-DdLJZQvZ.js';
8
8
  import { R as RefIcon$1 } from '../chunks/DownOutlined-Cl95zPIN.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-BtGVDpFp.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-BME7zF0Z.js';
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-BtGVDpFp.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-BME7zF0Z.js';
6
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
7
7
 
8
8
  const SliderSingle = (props) => {
9
9
  //! State
@@ -3,7 +3,7 @@ import { Switch as Switch$1 } from 'antd';
3
3
  import { g as get } from '../chunks/get-BtGVDpFp.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-BME7zF0Z.js';
6
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
7
7
 
8
8
  const Switch = (props) => {
9
9
  //! State
@@ -4,7 +4,7 @@ import { g as get } from '../chunks/get-BtGVDpFp.js';
4
4
  import { Input, Tooltip } 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-BME7zF0Z.js';
7
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
8
8
 
9
9
  const { TextArea } = Input;
10
10
  const Textarea = forwardRef(
@@ -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-BtGVDpFp.js';
6
- import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
6
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.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-BtGVDpFp.js';
6
- import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
6
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
7
7
 
8
8
  const { RangePicker } = TimePicker;
9
9
  const TimeRangePicker = (props) => {
@@ -1281,7 +1281,7 @@ var eventPropTypes = {
1281
1281
  onScriptsLoad: propTypesExports.func,
1282
1282
  onScriptsLoadError: propTypesExports.func,
1283
1283
  };
1284
- 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([
1284
+ 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
1285
  propTypesExports.string,
1286
1286
  propTypesExports.arrayOf(propTypesExports.string),
1287
1287
  propTypesExports.arrayOf(propTypesExports.shape({
@@ -1295,11 +1295,6 @@ var EditorPropTypes = __assign$2({ apiKey: propTypesExports.string, licenseKey:
1295
1295
  delay: propTypesExports.number
1296
1296
  }) }, eventPropTypes);
1297
1297
 
1298
- var getTinymce = function (view) {
1299
- var global = view;
1300
- return global && global.tinymce ? global.tinymce : null;
1301
- };
1302
-
1303
1298
  var isFunction = function (x) { return typeof x === 'function'; };
1304
1299
  var isEventProp = function (name) { return name in eventPropTypes; };
1305
1300
  var eventAttrToEventName = function (attrName) { return attrName.substr(2); };
@@ -1369,14 +1364,6 @@ var setMode = function (editor, mode) {
1369
1364
  }
1370
1365
  }
1371
1366
  };
1372
- var getTinymceOrError = function (view) {
1373
- var tinymce = getTinymce(view);
1374
- if (!tinymce) {
1375
- throw new Error('tinymce should have been loaded into global scope');
1376
- }
1377
- return tinymce;
1378
- };
1379
- var isDisabledOptionSupported = function (editor) { return editor.options && editor.options.isRegistered('disabled'); };
1380
1367
 
1381
1368
  var __assign$1 = (undefined && undefined.__assign) || function () {
1382
1369
  __assign$1 = Object.assign || function(t) {
@@ -1521,6 +1508,11 @@ var createScriptLoader = function () {
1521
1508
  };
1522
1509
  var ScriptLoader = createScriptLoader();
1523
1510
 
1511
+ var getTinymce = function (view) {
1512
+ var global = view;
1513
+ return global && global.tinymce ? global.tinymce : null;
1514
+ };
1515
+
1524
1516
  var __extends = (undefined && undefined.__extends) || (function () {
1525
1517
  var extendStatics = function (d, b) {
1526
1518
  extendStatics = Object.setPrototypeOf ||
@@ -1641,8 +1633,11 @@ var Editor = /** @class */ (function (_super) {
1641
1633
  }
1642
1634
  return;
1643
1635
  }
1644
- var tinymce = getTinymceOrError(_this.view);
1645
- 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) {
1636
+ var tinymce = getTinymce(_this.view);
1637
+ if (!tinymce) {
1638
+ throw new Error('tinymce should have been loaded into global scope');
1639
+ }
1640
+ 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) {
1646
1641
  _this.editor = editor;
1647
1642
  _this.bindHandlers({});
1648
1643
  // When running in inline mode the editor gets the initial value
@@ -1659,16 +1654,8 @@ var Editor = /** @class */ (function (_super) {
1659
1654
  if (_this.props.init && isFunction(_this.props.init.setup)) {
1660
1655
  _this.props.init.setup(editor);
1661
1656
  }
1662
- if (_this.props.disabled) {
1663
- if (isDisabledOptionSupported(_this.editor)) {
1664
- _this.editor.options.set('disabled', _this.props.disabled);
1665
- }
1666
- else {
1667
- _this.editor.mode.set('readonly');
1668
- }
1669
- }
1670
1657
  }, init_instance_callback: function (editor) {
1671
- var _a;
1658
+ var _a, _b;
1672
1659
  // check for changes that happened since tinymce.init() was called
1673
1660
  var initialValue = _this.getInitialValue();
1674
1661
  _this.currentContent = (_a = _this.currentContent) !== null && _a !== void 0 ? _a : editor.getContent();
@@ -1680,6 +1667,8 @@ var Editor = /** @class */ (function (_super) {
1680
1667
  editor.undoManager.add();
1681
1668
  editor.setDirty(false);
1682
1669
  }
1670
+ var disabled = (_b = _this.props.disabled) !== null && _b !== void 0 ? _b : false;
1671
+ setMode(_this.editor, disabled ? 'readonly' : 'design');
1683
1672
  // ensure existing init_instance_callback is called
1684
1673
  if (_this.props.init && isFunction(_this.props.init.init_instance_callback)) {
1685
1674
  _this.props.init.init_instance_callback(editor);
@@ -1757,17 +1746,9 @@ var Editor = /** @class */ (function (_super) {
1757
1746
  }
1758
1747
  });
1759
1748
  }
1760
- if (this.props.readonly !== prevProps.readonly) {
1761
- var readonly = (_b = this.props.readonly) !== null && _b !== void 0 ? _b : false;
1762
- setMode(this.editor, readonly ? 'readonly' : 'design');
1763
- }
1764
1749
  if (this.props.disabled !== prevProps.disabled) {
1765
- if (isDisabledOptionSupported(this.editor)) {
1766
- this.editor.options.set('disabled', this.props.disabled);
1767
- }
1768
- else {
1769
- setMode(this.editor, this.props.disabled ? 'readonly' : 'design');
1770
- }
1750
+ var disabled = (_b = this.props.disabled) !== null && _b !== void 0 ? _b : false;
1751
+ setMode(this.editor, disabled ? 'readonly' : 'design');
1771
1752
  }
1772
1753
  }
1773
1754
  }
@@ -5,7 +5,7 @@ import { i as isEmpty } from '../../chunks/isEmpty-DF7aUYTo.js';
5
5
  import { ConfirmModal } from '../ConfirmModal.js';
6
6
  import { useToggle } from '@pnkx-lib/core';
7
7
  import { CATEGORY_LIST_ENUM } from '../CategoryStatus.js';
8
- import { t as twMerge } from '../../chunks/bundle-mjs-BME7zF0Z.js';
8
+ import { t as twMerge } from '../../chunks/bundle-mjs-BBFHkixS.js';
9
9
  import { Popover } from '../Popover.js';
10
10
  import { Tooltip as Tooltip$1 } from 'antd';
11
11
  import { M as MoreIcon, R as RestoreIcon, S as SendApprovalIcon, C as CancelSendApprovalIcon, a as RefuseApprovalIcon, b as RefuseApprovalDropListIcon, A as ApprovalIcon, i as isBoolean, c as CancelApprovalIcon, D as DeleteIcon, d as ActivateIcon, I as InActiveIcon } from '../../chunks/isBoolean-De4T9T2f.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-BME7zF0Z.js';
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
@@ -1,6 +1,6 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Cascader } from 'antd';
3
- import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
3
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
4
4
 
5
5
  const CascaderField = (props) => {
6
6
  const {
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
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";
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import React__default from 'react';
3
- import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
3
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
4
4
 
5
5
  const badgeStatusclinicalConfig = {
6
6
  [0 /* WAITING */]: {
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useEffect } from 'react';
3
3
  import { g as getDefaultExportFromCjs } from '../../chunks/_commonjsHelpers-D5KtpA0t.js';
4
- import { t as twMerge } from '../../chunks/bundle-mjs-BME7zF0Z.js';
4
+ import { t as twMerge } from '../../chunks/bundle-mjs-BBFHkixS.js';
5
5
 
6
6
  var dayjs_min$1 = {exports: {}};
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
2
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
3
3
 
4
4
  const Container = ({
5
5
  children,
@@ -4,7 +4,7 @@ import { CATEGORY_LIST_ENUM, COUNT_LEVEL, CATEGORY_PRICE_LIST_ENUM } from '../Ca
4
4
  import { R as RestoreIcon, S as SendApprovalIcon, C as CancelSendApprovalIcon, a as RefuseApprovalIcon, b as RefuseApprovalDropListIcon, A as ApprovalIcon, i as isBoolean, c as CancelApprovalIcon, D as DeleteIcon, d as ActivateIcon, I as InActiveIcon, M as MoreIcon } from '../../chunks/isBoolean-De4T9T2f.js';
5
5
  import { useToggle } from '@pnkx-lib/core';
6
6
  import { ConfirmModal } from '../ConfirmModal.js';
7
- import { t as twMerge } from '../../chunks/bundle-mjs-BME7zF0Z.js';
7
+ import { t as twMerge } from '../../chunks/bundle-mjs-BBFHkixS.js';
8
8
  import { Popover } from '../Popover.js';
9
9
  import { i as isEmpty } from '../../chunks/isEmpty-DF7aUYTo.js';
10
10
  import { Tooltip } from 'antd';
@@ -1,6 +1,6 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Descriptions as Descriptions$1 } from 'antd';
3
- import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
3
+ import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
4
4
 
5
5
  const Descriptions = (props) => {
6
6
  const { className } = props;