@pnkx-lib/ui 1.9.166 → 1.9.168
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/es/chunks/{PageNotFound-D5g7S_k0.js → PageNotFound-D26HbHVw.js} +7 -1
- package/es/chunks/{Switch-CpLqxgvG.js → SliderRanger-DD_Z5ULj.js} +102 -2
- package/es/fields/index.js +1 -1
- package/es/index.js +2 -2
- package/es/ui/index.js +1 -1
- package/package.json +1 -1
- package/types/components/fields/SliderRanger.d.ts +2 -2
- package/types/components/fields/index.d.ts +2 -0
- package/types/constants/table.d.ts +6 -0
- /package/types/components/fields/{Slider.d.ts → SliderSingle.d.ts} +0 -0
@@ -616,6 +616,12 @@ const HeadingTable = (props) => {
|
|
616
616
|
);
|
617
617
|
};
|
618
618
|
|
619
|
+
const START_PAGE = 1;
|
620
|
+
const START_PAGE_SIZE = 10;
|
621
|
+
const PAGE_NUMBER = "page";
|
622
|
+
const PAGE_SIZE = "size";
|
623
|
+
const SORT_BY = "SortBy";
|
624
|
+
const SORT_DESC = "SortDesc";
|
619
625
|
var TypeActionRowTable = /* @__PURE__ */ ((TypeActionRowTable2) => {
|
620
626
|
TypeActionRowTable2["DELETE"] = "DELETE";
|
621
627
|
TypeActionRowTable2["EDIT"] = "EDIT";
|
@@ -2498,4 +2504,4 @@ const PageNotFound = ({ path = "/" }) => {
|
|
2498
2504
|
);
|
2499
2505
|
};
|
2500
2506
|
|
2501
|
-
export {
|
2507
|
+
export { TypeBulkActions as $, Alert as A, Button as B, CascaderField as C, Dropdown as D, Empty as E, Flex as F, ErrorBoundary as G, Heading as H, Image as I, CATEGORY_LIST_ENUM as J, badgeStatusCategoryConfig as K, CategoryStatus as L, Modal as M, ActionRowTable as N, START_PAGE as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, START_PAGE_SIZE as U, PAGE_NUMBER as V, Watermark as W, PAGE_SIZE as X, SORT_BY as Y, SORT_DESC as Z, TypeActionRowTable as _, Tabs as a, TypeStatusTable as a0, BulkActions as a1, BreadcrumbHeading as a2, Card as a3, ConfigProvider as a4, PageNotFound as a5, SearchFiltersForm as b, Container as c, Badge as d, Col as e, Breadcrumb as f, Pagination as g, Sidebar as h, Tag as i, Divider as j, Drawer as k, Popconfirm as l, Result as m, Rate as n, Segmented as o, Statistic as p, Timeline as q, Tour as r, Tree as s, typeColorMap as t, Anchor as u, Appfix as v, AutoComplete as w, Collapse as x, ColorPicker as y, ConfirmModal as z };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { i as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, k as Icon, _ as _extends } from './UploadImage-BRBnjq5U.js';
|
2
|
-
import { Select as Select$1, Radio, Upload, Image, Switch as Switch$1 } from 'antd';
|
2
|
+
import { Select as Select$1, Radio, Upload, Image, Switch as Switch$1, Slider } from 'antd';
|
3
3
|
import * as React from 'react';
|
4
4
|
import { useState } from 'react';
|
5
5
|
|
@@ -258,4 +258,104 @@ const Switch = (props) => {
|
|
258
258
|
] });
|
259
259
|
};
|
260
260
|
|
261
|
-
|
261
|
+
const SliderSingle = (props) => {
|
262
|
+
//! State
|
263
|
+
const {
|
264
|
+
field,
|
265
|
+
formState,
|
266
|
+
label,
|
267
|
+
required,
|
268
|
+
afterOnChange,
|
269
|
+
customStyleContainer,
|
270
|
+
customStyleSlider,
|
271
|
+
disabled,
|
272
|
+
...restProps
|
273
|
+
} = props;
|
274
|
+
const { name, value, onChange } = field || {};
|
275
|
+
const { touchedFields, errors, isSubmitted } = formState || {};
|
276
|
+
const isTouched = get(touchedFields, name);
|
277
|
+
const errorMessage = get(errors, name)?.message;
|
278
|
+
//! Function
|
279
|
+
const handleChange = (sliderValue) => {
|
280
|
+
onChange?.(sliderValue);
|
281
|
+
afterOnChange?.(sliderValue);
|
282
|
+
};
|
283
|
+
const renderErrorMessage = () => {
|
284
|
+
if (!errorMessage) return null;
|
285
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
286
|
+
ErrorMessage,
|
287
|
+
{
|
288
|
+
errorMessage,
|
289
|
+
isTouched,
|
290
|
+
isSubmitted
|
291
|
+
}
|
292
|
+
);
|
293
|
+
};
|
294
|
+
//! Render
|
295
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
|
296
|
+
label && /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { label, required }),
|
297
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
298
|
+
Slider,
|
299
|
+
{
|
300
|
+
className: twMerge("focus:outline-none", customStyleSlider),
|
301
|
+
disabled,
|
302
|
+
onChange: handleChange,
|
303
|
+
value,
|
304
|
+
...restProps
|
305
|
+
}
|
306
|
+
),
|
307
|
+
renderErrorMessage()
|
308
|
+
] });
|
309
|
+
};
|
310
|
+
|
311
|
+
const SliderRange = (props) => {
|
312
|
+
//! State
|
313
|
+
const {
|
314
|
+
field,
|
315
|
+
formState,
|
316
|
+
label,
|
317
|
+
required,
|
318
|
+
afterOnChange,
|
319
|
+
customStyleContainer,
|
320
|
+
customStyleSlider,
|
321
|
+
disabled,
|
322
|
+
...restProps
|
323
|
+
} = props;
|
324
|
+
const { name, value, onChange } = field || {};
|
325
|
+
const { touchedFields, errors, isSubmitted } = formState || {};
|
326
|
+
const isTouched = get(touchedFields, name);
|
327
|
+
const errorMessage = get(errors, name)?.message;
|
328
|
+
//! Function
|
329
|
+
const handleChange = (sliderValue) => {
|
330
|
+
onChange?.(sliderValue);
|
331
|
+
afterOnChange?.(sliderValue);
|
332
|
+
};
|
333
|
+
const renderErrorMessage = () => {
|
334
|
+
if (!errorMessage) return null;
|
335
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
336
|
+
ErrorMessage,
|
337
|
+
{
|
338
|
+
errorMessage,
|
339
|
+
isTouched,
|
340
|
+
isSubmitted
|
341
|
+
}
|
342
|
+
);
|
343
|
+
};
|
344
|
+
//! Render
|
345
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
|
346
|
+
label && /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { label, required }),
|
347
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
348
|
+
Slider,
|
349
|
+
{
|
350
|
+
className: twMerge("focus:outline-none", customStyleSlider),
|
351
|
+
disabled,
|
352
|
+
onChange: handleChange,
|
353
|
+
value,
|
354
|
+
...restProps
|
355
|
+
}
|
356
|
+
),
|
357
|
+
renderErrorMessage()
|
358
|
+
] });
|
359
|
+
};
|
360
|
+
|
361
|
+
export { RadioGroup as R, Select as S, UploadField as U, Switch as a, SliderSingle as b, SliderRange as c };
|
package/es/fields/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
export { C as Checkbox, D as DatePicker, I as Input, P as PnkxField, R as RangePicker, h as Textarea, g as TinyMCE } from '../chunks/UploadImage-BRBnjq5U.js';
|
2
|
-
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/
|
2
|
+
export { R as RadioGroup, S as Select, c as SliderRange, b as SliderSingle, a as Switch, U as UploadField } from '../chunks/SliderRanger-DD_Z5ULj.js';
|
package/es/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { N as ActionRowTable, A as Alert, u as Anchor, v as Appfix, w as AutoComplete, d as Badge, f as Breadcrumb,
|
1
|
+
export { N as ActionRowTable, A as Alert, u as Anchor, v as Appfix, w as AutoComplete, d as Badge, f as Breadcrumb, a2 as BreadcrumbHeading, a1 as BulkActions, B as Button, J as CATEGORY_LIST_ENUM, a3 as Card, C as CascaderField, L as CategoryStatus, e as Col, x as Collapse, y as ColorPicker, a4 as ConfigProvider, z as ConfirmModal, c as Container, j as Divider, k as Drawer, D as Dropdown, E as Empty, G as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, V as PAGE_NUMBER, X as PAGE_SIZE, a5 as PageNotFound, g as Pagination, l as Popconfirm, P as Popover, Q as QRCode, n as Rate, m as Result, R as Row, Y as SORT_BY, Z as SORT_DESC, O as START_PAGE, U as START_PAGE_SIZE, b as SearchFiltersForm, o as Segmented, h as Sidebar, S as Skeleton, p as Statistic, T as Table, a as Tabs, i as Tag, q as Timeline, r as Tour, s as Tree, _ as TypeActionRowTable, $ as TypeBulkActions, a0 as TypeStatusTable, W as Watermark, K as badgeStatusCategoryConfig, t as typeColorMap } from './chunks/PageNotFound-D26HbHVw.js';
|
2
2
|
export { C as Checkbox, D as DatePicker, E as ErrorMessage, I as Input, L as Label, b as Layout, M as Menu, P as PnkxField, R as RangePicker, S as Space, e as Spin, c as Splitter, d as Steps, f as TINY_API, h as Textarea, g as TinyMCE, a as Tooltip, T as Typography, U as UploadImage } from './chunks/UploadImage-BRBnjq5U.js';
|
3
|
-
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/
|
3
|
+
export { R as RadioGroup, S as Select, c as SliderRange, b as SliderSingle, a as Switch, U as UploadField } from './chunks/SliderRanger-DD_Z5ULj.js';
|
4
4
|
export { a as useMessage, u as useToast } from './chunks/useMessage-CUPcOtIS.js';
|
package/es/ui/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { N as ActionRowTable, A as Alert, u as Anchor, v as Appfix, w as AutoComplete, d as Badge, f as Breadcrumb,
|
1
|
+
export { N as ActionRowTable, A as Alert, u as Anchor, v as Appfix, w as AutoComplete, d as Badge, f as Breadcrumb, a2 as BreadcrumbHeading, a1 as BulkActions, B as Button, J as CATEGORY_LIST_ENUM, a3 as Card, C as CascaderField, L as CategoryStatus, e as Col, x as Collapse, y as ColorPicker, a4 as ConfigProvider, z as ConfirmModal, c as Container, j as Divider, k as Drawer, D as Dropdown, E as Empty, G as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, V as PAGE_NUMBER, X as PAGE_SIZE, a5 as PageNotFound, g as Pagination, l as Popconfirm, P as Popover, Q as QRCode, n as Rate, m as Result, R as Row, Y as SORT_BY, Z as SORT_DESC, O as START_PAGE, U as START_PAGE_SIZE, b as SearchFiltersForm, o as Segmented, h as Sidebar, S as Skeleton, p as Statistic, T as Table, a as Tabs, i as Tag, q as Timeline, r as Tour, s as Tree, _ as TypeActionRowTable, $ as TypeBulkActions, a0 as TypeStatusTable, W as Watermark, K as badgeStatusCategoryConfig, t as typeColorMap } from '../chunks/PageNotFound-D26HbHVw.js';
|
2
2
|
export { E as ErrorMessage, L as Label, b as Layout, M as Menu, S as Space, e as Spin, c as Splitter, d as Steps, f as TINY_API, a as Tooltip, T as Typography, U as UploadImage } from '../chunks/UploadImage-BRBnjq5U.js';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ControllerRenderProps, UseFormStateReturn } from 'react-hook-form';
|
2
2
|
import { SliderRangeProps } from 'antd/es/slider';
|
3
|
-
export interface
|
3
|
+
export interface SliderRangesProps extends Omit<SliderRangeProps, "onChange"> {
|
4
4
|
field?: ControllerRenderProps<any, any>;
|
5
5
|
formState?: UseFormStateReturn<any>;
|
6
6
|
label?: string;
|
@@ -9,4 +9,4 @@ export interface SliderProps extends Omit<SliderRangeProps, "onChange"> {
|
|
9
9
|
customStyleContainer?: string;
|
10
10
|
customStyleSlider?: string;
|
11
11
|
}
|
12
|
-
export declare const SliderRange: (props:
|
12
|
+
export declare const SliderRange: (props: SliderRangesProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,3 +1,9 @@
|
|
1
|
+
export declare const START_PAGE = 1;
|
2
|
+
export declare const START_PAGE_SIZE = 10;
|
3
|
+
export declare const PAGE_NUMBER = "page";
|
4
|
+
export declare const PAGE_SIZE = "size";
|
5
|
+
export declare const SORT_BY = "SortBy";
|
6
|
+
export declare const SORT_DESC = "SortDesc";
|
1
7
|
export declare enum TypeActionRowTable {
|
2
8
|
DELETE = "DELETE",
|
3
9
|
EDIT = "EDIT",
|
File without changes
|