@pnkx-lib/ui 1.9.505 → 1.9.508
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/assets/{ui-U4G0iQfu.css → ui-Dqfe-FBg.css} +0 -107
- package/es/chunks/{GenericUploadModal-BNQ9cWDf.js → GenericUploadModal-Dhv5_mhq.js} +72 -48
- package/es/chunks/{index.esm-AaUjBMaK.js → index.esm-Dr5ZHcf7.js} +96 -58
- package/es/chunks/{toArray-Czwb0MFW.js → toArray-2LkvUaha.js} +27 -38
- package/es/fields/PnkxField.js +1 -1
- package/es/fields/Textarea.js +1 -1
- package/es/fields/TinyMCE.js +1 -1
- package/es/index.js +4 -3
- package/es/ui/CategoryStatus.js +14 -1
- package/es/ui/FloatButton.js +15 -0
- package/es/ui/GenericUploadModal.js +2 -2
- package/es/ui/Layout.js +3 -3
- package/es/ui/SearchFilterForm.js +1 -1
- package/es/ui/Sidebar/index.js +32 -14
- package/es/ui/Tabs.js +2 -2
- package/es/ui/UploadImage.js +1 -1
- package/es/ui/index.js +4214 -3348
- package/package.json +3 -3
- package/types/components/ui/BulkActions/DropListActions.d.ts +3 -2
- package/types/components/ui/CategoryStatus.d.ts +11 -0
- package/types/components/ui/CustomeBulkActions/BulkAction.d.ts +10 -0
- package/types/components/ui/CustomeBulkActions/ConvertData.d.ts +6 -5
- package/types/components/ui/CustomeBulkActions/DropListAction.d.ts +24 -0
- package/types/components/ui/CustomeBulkActions/index.d.ts +8 -5
- package/types/components/ui/FloatButton.d.ts +4 -0
- package/types/components/ui/index.d.ts +2 -0
- package/types/ui/FloatButton.d.ts +2 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useContext, createContext } from 'react';
|
|
3
3
|
import { _ as _typeof, c as _arrayLikeToArray, a as _unsupportedIterableToArray, b as _defineProperty } from './defineProperty-CTLrw71t.js';
|
|
4
|
-
import { w as warningOnce, a as _objectWithoutProperties, b as _objectSpread2, c as _slicedToArray, d as warning$
|
|
4
|
+
import { w as warningOnce, a as _objectWithoutProperties, b as _objectSpread2, c as _slicedToArray, d as warning$1, e as canUseDom, u as updateCSS, r as removeCSS, _ as _extends, f as _arrayWithHoles, g as _nonIterableRest, h as resetWarned$1, F as FastColor, i as generate, p as presetPrimaryColors, j as presetPalettes, k as IconContext } from './AntdIcon-Bve8mGNz.js';
|
|
5
5
|
import { _ as _createClass, a as _classCallCheck, b as _inherits, c as _createSuper, d as _assertThisInitialized } from './createSuper-C9_dQ5Zr.js';
|
|
6
6
|
|
|
7
7
|
function useMemo(getValue, condition, shouldUpdate) {
|
|
@@ -177,6 +177,7 @@ var Entity = /*#__PURE__*/function () {
|
|
|
177
177
|
_defineProperty(this, "instanceId", void 0);
|
|
178
178
|
/** @private Internal cache map. Do not access this directly */
|
|
179
179
|
_defineProperty(this, "cache", new Map());
|
|
180
|
+
_defineProperty(this, "extracted", new Set());
|
|
180
181
|
this.instanceId = instanceId;
|
|
181
182
|
}
|
|
182
183
|
_createClass(Entity, [{
|
|
@@ -435,7 +436,7 @@ var Theme = /*#__PURE__*/function () {
|
|
|
435
436
|
this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
|
|
436
437
|
this.id = uuid;
|
|
437
438
|
if (derivatives.length === 0) {
|
|
438
|
-
warning$
|
|
439
|
+
warning$1(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
|
|
439
440
|
}
|
|
440
441
|
uuid += 1;
|
|
441
442
|
}
|
|
@@ -575,13 +576,12 @@ function unit$1(num) {
|
|
|
575
576
|
return num;
|
|
576
577
|
}
|
|
577
578
|
function toStyleStr(style, tokenKey, styleId) {
|
|
578
|
-
var _objectSpread2$1;
|
|
579
579
|
var customizeAttrs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
580
580
|
var plain = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
581
581
|
if (plain) {
|
|
582
582
|
return style;
|
|
583
583
|
}
|
|
584
|
-
var attrs = _objectSpread2(_objectSpread2({}, customizeAttrs), {}, (
|
|
584
|
+
var attrs = _objectSpread2(_objectSpread2({}, customizeAttrs), {}, _defineProperty(_defineProperty({}, ATTR_TOKEN, tokenKey), ATTR_MARK, styleId));
|
|
585
585
|
var attrStr = Object.keys(attrs).map(function (attr) {
|
|
586
586
|
var val = attrs[attr];
|
|
587
587
|
return val ? "".concat(attr, "=\"").concat(val, "\"") : null;
|
|
@@ -693,7 +693,7 @@ var useCleanupRegister = function useCleanupRegister(deps) {
|
|
|
693
693
|
function register(fn) {
|
|
694
694
|
if (cleanupFlag) {
|
|
695
695
|
if (process.env.NODE_ENV !== 'production') {
|
|
696
|
-
warning$
|
|
696
|
+
warning$1(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');
|
|
697
697
|
}
|
|
698
698
|
return;
|
|
699
699
|
}
|
|
@@ -786,7 +786,6 @@ onCacheEffect) {
|
|
|
786
786
|
}, /* eslint-disable react-hooks/exhaustive-deps */
|
|
787
787
|
[fullPathStr]
|
|
788
788
|
/* eslint-enable */);
|
|
789
|
-
|
|
790
789
|
var cacheEntity = globalCache.opGet(fullPathStr);
|
|
791
790
|
|
|
792
791
|
// HMR clean the cache but not trigger `useMemo` again
|
|
@@ -866,14 +865,13 @@ var TOKEN_THRESHOLD = 0;
|
|
|
866
865
|
// Remove will check current keys first
|
|
867
866
|
function cleanTokenStyle(tokenKey, instanceId) {
|
|
868
867
|
tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);
|
|
869
|
-
var
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
return count <= 0;
|
|
868
|
+
var cleanableKeyList = new Set();
|
|
869
|
+
tokenKeys.forEach(function (value, key) {
|
|
870
|
+
if (value <= 0) cleanableKeyList.add(key);
|
|
873
871
|
});
|
|
874
872
|
|
|
875
873
|
// Should keep tokens under threshold for not to insert style too often
|
|
876
|
-
if (
|
|
874
|
+
if (tokenKeys.size - cleanableKeyList.size > TOKEN_THRESHOLD) {
|
|
877
875
|
cleanableKeyList.forEach(function (key) {
|
|
878
876
|
removeStyleTags(key, instanceId);
|
|
879
877
|
tokenKeys.delete(key);
|
|
@@ -1954,7 +1952,8 @@ function useStyleRegister(info, styleFn) {
|
|
|
1954
1952
|
styleId = _ref3[2];
|
|
1955
1953
|
if ((fromHMR || autoClear) && isClientSide) {
|
|
1956
1954
|
removeCSS(styleId, {
|
|
1957
|
-
mark: ATTR_MARK
|
|
1955
|
+
mark: ATTR_MARK,
|
|
1956
|
+
attachTo: container
|
|
1958
1957
|
});
|
|
1959
1958
|
}
|
|
1960
1959
|
},
|
|
@@ -2027,8 +2026,7 @@ function useStyleRegister(info, styleFn) {
|
|
|
2027
2026
|
if (!ssrInline || isMergedClientSide || !defaultCache) {
|
|
2028
2027
|
styleNode = /*#__PURE__*/React.createElement(Empty, null);
|
|
2029
2028
|
} else {
|
|
2030
|
-
|
|
2031
|
-
styleNode = /*#__PURE__*/React.createElement("style", _extends({}, (_ref6 = {}, _defineProperty(_ref6, ATTR_TOKEN, cachedTokenKey), _defineProperty(_ref6, ATTR_MARK, cachedStyleId), _ref6), {
|
|
2029
|
+
styleNode = /*#__PURE__*/React.createElement("style", _extends({}, _defineProperty(_defineProperty({}, ATTR_TOKEN, cachedTokenKey), ATTR_MARK, cachedStyleId), {
|
|
2032
2030
|
dangerouslySetInnerHTML: {
|
|
2033
2031
|
__html: cachedStyleStr
|
|
2034
2032
|
}
|
|
@@ -2115,7 +2113,8 @@ var useCSSVarRegister = function useCSSVarRegister(config, fn) {
|
|
|
2115
2113
|
styleId = _ref2[2];
|
|
2116
2114
|
if (isClientSide) {
|
|
2117
2115
|
removeCSS(styleId, {
|
|
2118
|
-
mark: ATTR_MARK
|
|
2116
|
+
mark: ATTR_MARK,
|
|
2117
|
+
attachTo: container
|
|
2119
2118
|
});
|
|
2120
2119
|
}
|
|
2121
2120
|
}, function (_ref3) {
|
|
@@ -2259,9 +2258,9 @@ function resetWarned() {
|
|
|
2259
2258
|
deprecatedWarnList = null;
|
|
2260
2259
|
resetWarned$1();
|
|
2261
2260
|
}
|
|
2262
|
-
let
|
|
2261
|
+
let _warning = noop$1;
|
|
2263
2262
|
if (process.env.NODE_ENV !== 'production') {
|
|
2264
|
-
|
|
2263
|
+
_warning = (valid, component, message) => {
|
|
2265
2264
|
warningOnce(valid, `[antd: ${component}] ${message}`);
|
|
2266
2265
|
// StrictMode will inject console which will not throw warning in React 17.
|
|
2267
2266
|
if (process.env.NODE_ENV === 'test') {
|
|
@@ -2269,6 +2268,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
2269
2268
|
}
|
|
2270
2269
|
};
|
|
2271
2270
|
}
|
|
2271
|
+
const warning = _warning;
|
|
2272
2272
|
const WarningContext = /*#__PURE__*/React.createContext({});
|
|
2273
2273
|
/**
|
|
2274
2274
|
* This is a hook but we not named as `useWarning`
|
|
@@ -2308,7 +2308,6 @@ const devUseWarning = process.env.NODE_ENV !== 'production' ? component => {
|
|
|
2308
2308
|
noopWarning.deprecated = noop$1;
|
|
2309
2309
|
return noopWarning;
|
|
2310
2310
|
};
|
|
2311
|
-
const warning$1 = warning;
|
|
2312
2311
|
|
|
2313
2312
|
// ZombieJ: We export single file here since
|
|
2314
2313
|
// ConfigProvider use this which will make loop deps
|
|
@@ -2946,7 +2945,6 @@ function derivative(token) {
|
|
|
2946
2945
|
return prev;
|
|
2947
2946
|
}, {});
|
|
2948
2947
|
}).reduce((prev, cur) => {
|
|
2949
|
-
// biome-ignore lint/style/noParameterAssign: it is a reduce
|
|
2950
2948
|
prev = Object.assign(Object.assign({}, prev), cur);
|
|
2951
2949
|
return prev;
|
|
2952
2950
|
}, {});
|
|
@@ -3077,7 +3075,7 @@ function registerTheme(globalPrefixCls, theme) {
|
|
|
3077
3075
|
if (canUseDom()) {
|
|
3078
3076
|
updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);
|
|
3079
3077
|
} else {
|
|
3080
|
-
process.env.NODE_ENV !== "production" ? warning
|
|
3078
|
+
process.env.NODE_ENV !== "production" ? warning(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;
|
|
3081
3079
|
}
|
|
3082
3080
|
}
|
|
3083
3081
|
|
|
@@ -3770,7 +3768,7 @@ function genStyleUtils(config) {
|
|
|
3770
3768
|
};
|
|
3771
3769
|
}
|
|
3772
3770
|
|
|
3773
|
-
const version = '5.
|
|
3771
|
+
const version = '5.27.1';
|
|
3774
3772
|
|
|
3775
3773
|
function isStableColor(color) {
|
|
3776
3774
|
return color >= 0 && color <= 255;
|
|
@@ -4011,17 +4009,6 @@ const unitless = {
|
|
|
4011
4009
|
opacityImage: true
|
|
4012
4010
|
};
|
|
4013
4011
|
const ignore = {
|
|
4014
|
-
size: true,
|
|
4015
|
-
sizeSM: true,
|
|
4016
|
-
sizeLG: true,
|
|
4017
|
-
sizeMD: true,
|
|
4018
|
-
sizeXS: true,
|
|
4019
|
-
sizeXXS: true,
|
|
4020
|
-
sizeMS: true,
|
|
4021
|
-
sizeXL: true,
|
|
4022
|
-
sizeXXL: true,
|
|
4023
|
-
sizeUnit: true,
|
|
4024
|
-
sizeStep: true,
|
|
4025
4012
|
motionBase: true,
|
|
4026
4013
|
motionUnit: true
|
|
4027
4014
|
};
|
|
@@ -4208,11 +4195,11 @@ const genCommonStyle = (token, componentPrefixCls, rootCls, resetFont) => {
|
|
|
4208
4195
|
};
|
|
4209
4196
|
const genFocusOutline = (token, offset) => ({
|
|
4210
4197
|
outline: `${unit$1(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,
|
|
4211
|
-
outlineOffset:
|
|
4198
|
+
outlineOffset: 1,
|
|
4212
4199
|
transition: 'outline-offset 0s, outline 0s'
|
|
4213
4200
|
});
|
|
4214
4201
|
const genFocusStyle = (token, offset) => ({
|
|
4215
|
-
'&:focus-visible':
|
|
4202
|
+
'&:focus-visible': genFocusOutline(token)
|
|
4216
4203
|
});
|
|
4217
4204
|
const genIconStyle = iconPrefixCls => ({
|
|
4218
4205
|
[`.${iconPrefixCls}`]: Object.assign(Object.assign({}, resetIcon()), {
|
|
@@ -4276,7 +4263,7 @@ const useResetIconStyle = (iconPrefixCls, csp) => {
|
|
|
4276
4263
|
layer: {
|
|
4277
4264
|
name: 'antd'
|
|
4278
4265
|
}
|
|
4279
|
-
}, () =>
|
|
4266
|
+
}, () => genIconStyle(iconPrefixCls));
|
|
4280
4267
|
};
|
|
4281
4268
|
|
|
4282
4269
|
const fullClone = Object.assign({}, React);
|
|
@@ -4405,7 +4392,7 @@ const setGlobalConfig = props => {
|
|
|
4405
4392
|
}
|
|
4406
4393
|
if (theme) {
|
|
4407
4394
|
if (isLegacyTheme(theme)) {
|
|
4408
|
-
process.env.NODE_ENV !== "production" ? warning
|
|
4395
|
+
process.env.NODE_ENV !== "production" ? warning(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') : void 0;
|
|
4409
4396
|
registerTheme(getGlobalPrefixCls(), theme);
|
|
4410
4397
|
}
|
|
4411
4398
|
}
|
|
@@ -4487,6 +4474,7 @@ const ProviderChildren = props => {
|
|
|
4487
4474
|
tooltip,
|
|
4488
4475
|
popover,
|
|
4489
4476
|
popconfirm,
|
|
4477
|
+
floatButton,
|
|
4490
4478
|
floatButtonGroup,
|
|
4491
4479
|
variant,
|
|
4492
4480
|
inputNumber,
|
|
@@ -4579,6 +4567,7 @@ const ProviderChildren = props => {
|
|
|
4579
4567
|
tooltip,
|
|
4580
4568
|
popover,
|
|
4581
4569
|
popconfirm,
|
|
4570
|
+
floatButton,
|
|
4582
4571
|
floatButtonGroup,
|
|
4583
4572
|
variant,
|
|
4584
4573
|
inputNumber,
|
|
@@ -4722,7 +4711,7 @@ ConfigProvider.config = setGlobalConfig;
|
|
|
4722
4711
|
ConfigProvider.useConfig = useConfig;
|
|
4723
4712
|
Object.defineProperty(ConfigProvider, 'SizeContext', {
|
|
4724
4713
|
get: () => {
|
|
4725
|
-
process.env.NODE_ENV !== "production" ? warning
|
|
4714
|
+
process.env.NODE_ENV !== "production" ? warning(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;
|
|
4726
4715
|
return SizeContext;
|
|
4727
4716
|
}
|
|
4728
4717
|
});
|
|
@@ -4748,4 +4737,4 @@ function toArray(children) {
|
|
|
4748
4737
|
return ret;
|
|
4749
4738
|
}
|
|
4750
4739
|
|
|
4751
|
-
export { genCalc as $, toStyleStr as A, ATTR_CACHE_MAP as B, ConfigContext as C, DisabledContext as D, serialize as E, extract
|
|
4740
|
+
export { genCalc as $, toStyleStr as A, ATTR_CACHE_MAP as B, ConfigContext as C, DisabledContext as D, serialize as E, extract as F, CSS_VAR_PREFIX as G, STYLE_PREFIX as H, extract$1 as I, extract$2 as J, unitlessKeys as K, LocaleContext as L, supportWhere as M, supportLogicProps as N, StyleContext as O, StyleProvider as P, Theme as Q, createCache as R, SizeContext as S, TOKEN_PREFIX as T, createTheme as U, getComputedToken$1 as V, token2CSSVar as W, useCSSVarRegister as X, useCacheToken as Y, useStyleRegister as Z, _toConsumableArray as _, useComponentConfig as a, genStyleUtils as a0, statistic as a1, statisticToken as a2, MotionProvider as a3, merge$1 as a4, get as a5, set as a6, isEqual as a7, useMemo as b, useLayoutUpdateEffect as c, Context as d, useLayoutEffect as e, clearFix as f, genStyleHooks as g, textEllipsis as h, isFragment as i, defaultPrefixCls as j, genComponentStyleHook as k, localeValues as l, merge as m, useToken as n, omit as o, devUseWarning as p, getAlphaColor as q, resetComponent as r, getLineHeight as s, toArray as t, unit$1 as u, genFocusStyle as v, warning as w, resetIcon as x, genSubStyleComponent as y, lintWarning as z };
|
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/Textarea.js
CHANGED
package/es/fields/TinyMCE.js
CHANGED
package/es/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { Button } from './ui/Button.js';
|
|
2
|
+
export { FloatButton } from './ui/FloatButton.js';
|
|
2
3
|
export { CascaderField } from './ui/Cascader.js';
|
|
3
4
|
export { ErrorMessage } from './ui/ErrorMessage.js';
|
|
4
5
|
export { Typography } from './ui/Typography.js';
|
|
5
|
-
export { ActionRowTable, BulkActions, Clock, Table, TableCategory } from './ui/index.js';
|
|
6
|
+
export { ActionRowTable, BulkActions, Clock, CustomeBulkActions, Table, TableCategory } from './ui/index.js';
|
|
6
7
|
export { Modal } from './ui/Modal.js';
|
|
7
8
|
export { Tooltip } from './ui/Tooltip.js';
|
|
8
9
|
export { Tabs } from './ui/Tabs.js';
|
|
@@ -48,7 +49,7 @@ export { Empty } from './ui/Empty.js';
|
|
|
48
49
|
export { Image } from './ui/Image.js';
|
|
49
50
|
export { ConfirmModal } from './ui/ConfirmModal.js';
|
|
50
51
|
export { ErrorBoundary } from './ui/ErrorBoundary.js';
|
|
51
|
-
export { CATEGORY_LIST_ENUM, CategoryStatus, badgeStatusCategoryConfig } from './ui/CategoryStatus.js';
|
|
52
|
+
export { CATEGORY_LIST_ENUM, CATEGORY_PRICE_LIST_ENUM, COUNT_LEVEL, CategoryStatus, badgeStatusCategoryConfig } from './ui/CategoryStatus.js';
|
|
52
53
|
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
54
|
export { ListStatusApproved, PAGE_NUMBER, PAGE_SIZE, SORT, START_PAGE, START_PAGE_SIZE, TypeActionRowTable, TypeBulkActions, TypeStatusTable } from './constants/index.js';
|
|
54
55
|
export { BreadcrumbHeading } from './ui/BreadcrumbHeading.js';
|
|
@@ -65,7 +66,7 @@ export { ViewPdf } from './ui/ViewPdf.js';
|
|
|
65
66
|
export { Sidebar } from './ui/Sidebar/index.js';
|
|
66
67
|
export { SelectTable } from './ui/SelectTable.js';
|
|
67
68
|
export { SelectSingleTable } from './ui/SelectSingleTable.js';
|
|
68
|
-
export { G as GenericUploadModal } from './chunks/GenericUploadModal-
|
|
69
|
+
export { G as GenericUploadModal } from './chunks/GenericUploadModal-Dhv5_mhq.js';
|
|
69
70
|
export { Descriptions } from './ui/Descriptions.js';
|
|
70
71
|
export { Input } from './fields/Input.js';
|
|
71
72
|
export { PnkxField } from './fields/PnkxField.js';
|
package/es/ui/CategoryStatus.js
CHANGED
|
@@ -10,6 +10,19 @@ var CATEGORY_LIST_ENUM = /* @__PURE__ */ ((CATEGORY_LIST_ENUM2) => {
|
|
|
10
10
|
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["DELETE"] = 5] = "DELETE";
|
|
11
11
|
return CATEGORY_LIST_ENUM2;
|
|
12
12
|
})(CATEGORY_LIST_ENUM || {});
|
|
13
|
+
var CATEGORY_PRICE_LIST_ENUM = /* @__PURE__ */ ((CATEGORY_PRICE_LIST_ENUM2) => {
|
|
14
|
+
CATEGORY_PRICE_LIST_ENUM2[CATEGORY_PRICE_LIST_ENUM2["CREATED"] = 0] = "CREATED";
|
|
15
|
+
CATEGORY_PRICE_LIST_ENUM2[CATEGORY_PRICE_LIST_ENUM2["WAITING_CONFIRM"] = 1] = "WAITING_CONFIRM";
|
|
16
|
+
CATEGORY_PRICE_LIST_ENUM2[CATEGORY_PRICE_LIST_ENUM2["WAITING_APPROVAL"] = 2] = "WAITING_APPROVAL";
|
|
17
|
+
CATEGORY_PRICE_LIST_ENUM2[CATEGORY_PRICE_LIST_ENUM2["APPROVED"] = 3] = "APPROVED";
|
|
18
|
+
CATEGORY_PRICE_LIST_ENUM2[CATEGORY_PRICE_LIST_ENUM2["DELETED"] = 4] = "DELETED";
|
|
19
|
+
return CATEGORY_PRICE_LIST_ENUM2;
|
|
20
|
+
})(CATEGORY_PRICE_LIST_ENUM || {});
|
|
21
|
+
var COUNT_LEVEL = /* @__PURE__ */ ((COUNT_LEVEL2) => {
|
|
22
|
+
COUNT_LEVEL2[COUNT_LEVEL2["ONE_LEVEL"] = 0] = "ONE_LEVEL";
|
|
23
|
+
COUNT_LEVEL2[COUNT_LEVEL2["TWO_LEVEL"] = 1] = "TWO_LEVEL";
|
|
24
|
+
return COUNT_LEVEL2;
|
|
25
|
+
})(COUNT_LEVEL || {});
|
|
13
26
|
const badgeStatusCategoryConfig = {
|
|
14
27
|
[0 /* DRAFT */]: { color: "bg-[#007BE5]", text: "Tạo mới" },
|
|
15
28
|
[1 /* WATING_APPROVAL */]: {
|
|
@@ -47,4 +60,4 @@ const CategoryStatus = ({ status }) => {
|
|
|
47
60
|
return /* @__PURE__ */ jsx(ItemStatus, { color: bagde?.color, statusName: bagde?.text });
|
|
48
61
|
};
|
|
49
62
|
|
|
50
|
-
export { CATEGORY_LIST_ENUM, CategoryStatus, badgeStatusCategoryConfig };
|
|
63
|
+
export { CATEGORY_LIST_ENUM, CATEGORY_PRICE_LIST_ENUM, COUNT_LEVEL, CategoryStatus, badgeStatusCategoryConfig };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { FloatButton as FloatButton$1 } from 'antd';
|
|
3
|
+
|
|
4
|
+
const FloatButton = (props) => {
|
|
5
|
+
const { onClick, ...restProps } = props;
|
|
6
|
+
const handleClick = (e) => {
|
|
7
|
+
if (e?.currentTarget) {
|
|
8
|
+
e.currentTarget.blur();
|
|
9
|
+
}
|
|
10
|
+
onClick?.(e);
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ jsx(FloatButton$1, { onClick: handleClick, ...restProps });
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { FloatButton };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'antd';
|
|
3
|
-
export { G as GenericUploadModal } from '../chunks/GenericUploadModal-
|
|
4
|
-
import '../chunks/index.esm-
|
|
3
|
+
export { G as GenericUploadModal } from '../chunks/GenericUploadModal-Dhv5_mhq.js';
|
|
4
|
+
import '../chunks/index.esm-Dr5ZHcf7.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@pnkx-lib/core';
|
|
7
7
|
import '../chunks/InboxOutlined-BBuIJe6u.js';
|
package/es/ui/Layout.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { g as genStyleHooks, u as unit, C as ConfigContext, o as omit, t as toArray, a as useComponentConfig, _ as _toConsumableArray } from '../chunks/toArray-
|
|
2
|
+
import { g as genStyleHooks, u as unit, C as ConfigContext, o as omit, t as toArray, a as useComponentConfig, _ as _toConsumableArray } from '../chunks/toArray-2LkvUaha.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useContext, useState, useEffect, useRef } from 'react';
|
|
5
5
|
import { c as classNames } from '../chunks/index-BLRvgOFN.js';
|
|
@@ -185,7 +185,7 @@ const prepareComponentToken = token => {
|
|
|
185
185
|
};
|
|
186
186
|
// ============================== Export ==============================
|
|
187
187
|
const DEPRECATED_TOKENS = [['colorBgBody', 'bodyBg'], ['colorBgHeader', 'headerBg'], ['colorBgTrigger', 'triggerBg']];
|
|
188
|
-
const useStyle$1 = genStyleHooks('Layout',
|
|
188
|
+
const useStyle$1 = genStyleHooks('Layout', genLayoutStyle, prepareComponentToken, {
|
|
189
189
|
deprecatedTokens: DEPRECATED_TOKENS
|
|
190
190
|
});
|
|
191
191
|
|
|
@@ -296,7 +296,7 @@ const genSiderStyle = token => {
|
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
};
|
|
299
|
-
const useStyle = genStyleHooks(['Layout', 'Sider'],
|
|
299
|
+
const useStyle = genStyleHooks(['Layout', 'Sider'], genSiderStyle, prepareComponentToken, {
|
|
300
300
|
deprecatedTokens: DEPRECATED_TOKENS
|
|
301
301
|
});
|
|
302
302
|
|
|
@@ -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-Bve8mGNz.js';
|
|
5
5
|
import * as React from 'react';
|
package/es/ui/Sidebar/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import { useLocation, useNavigate } from 'react-router';
|
|
5
|
-
import { Flex, AutoComplete, Divider, Dropdown } from 'antd';
|
|
5
|
+
import { Flex, AutoComplete, Divider, ConfigProvider, Dropdown } from 'antd';
|
|
6
6
|
import { Layout } from '../Layout.js';
|
|
7
7
|
import { Input } from '../../fields/Input.js';
|
|
8
8
|
import { t as twMerge } from '../../chunks/bundle-mjs-BME7zF0Z.js';
|
|
@@ -300,21 +300,39 @@ const UserInfoSection = ({
|
|
|
300
300
|
]
|
|
301
301
|
}
|
|
302
302
|
) }) }),
|
|
303
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center
|
|
304
|
-
|
|
303
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(ConfigProvider, { theme: { token: { zIndexPopupBase: 3e3 } }, children: /* @__PURE__ */ jsx(
|
|
304
|
+
Dropdown,
|
|
305
305
|
{
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
),
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
306
|
+
menu: { items },
|
|
307
|
+
trigger: ["click"],
|
|
308
|
+
placement: "bottomRight",
|
|
309
|
+
getPopupContainer: () => document.body,
|
|
310
|
+
overlayStyle: { zIndex: 9999 },
|
|
311
|
+
children: /* @__PURE__ */ jsxs(
|
|
312
|
+
"button",
|
|
313
|
+
{
|
|
314
|
+
type: "button",
|
|
315
|
+
className: twMerge(
|
|
316
|
+
hoverOpenMenu ? "" : "justify-center",
|
|
317
|
+
"text-black flex items-center rounded-md gap-2 focus:outline-none"
|
|
318
|
+
),
|
|
319
|
+
children: [
|
|
320
|
+
/* @__PURE__ */ jsx(Divider, { type: "vertical" }),
|
|
321
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center w-[30px] h-[30px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
322
|
+
"img",
|
|
323
|
+
{
|
|
324
|
+
src: userInfo.avatar,
|
|
325
|
+
alt: "avatar",
|
|
326
|
+
className: "w-full h-full object-cover"
|
|
327
|
+
}
|
|
328
|
+
) }),
|
|
329
|
+
/* @__PURE__ */ jsx("p", { className: "max-w-[120px] truncate", children: userInfo.name }),
|
|
330
|
+
/* @__PURE__ */ jsx(DownOutlinedIcon, { className: "w-6 h-6" })
|
|
331
|
+
]
|
|
332
|
+
}
|
|
333
|
+
)
|
|
316
334
|
}
|
|
317
|
-
) }) })
|
|
335
|
+
) }) })
|
|
318
336
|
] });
|
|
319
337
|
};
|
|
320
338
|
|
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/UploadImage.js
CHANGED