@raystack/apsara 0.13.0 → 0.14.0
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/calendar/calendar.d.ts.map +1 -1
- package/dist/calendar/date-picker.d.ts +13 -0
- package/dist/calendar/date-picker.d.ts.map +1 -0
- package/dist/calendar/index.d.ts +2 -0
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/range-picker.d.ts +15 -0
- package/dist/calendar/range-picker.d.ts.map +1 -0
- package/dist/errorstate/errorstate.d.ts +2 -1
- package/dist/errorstate/errorstate.d.ts.map +1 -1
- package/dist/index.cjs +312 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +36 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +311 -44
- package/dist/index.js.map +1 -1
- package/dist/popover/popover.d.ts.map +1 -1
- package/dist/sidebar/sidebar.d.ts +2 -0
- package/dist/sidebar/sidebar.d.ts.map +1 -1
- package/dist/table/FilteredChip.d.ts.map +1 -1
- package/dist/table/datatable.d.ts +4 -3
- package/dist/table/datatable.d.ts.map +1 -1
- package/dist/table/datatables.types.d.ts +11 -5
- package/dist/table/datatables.types.d.ts.map +1 -1
- package/dist/table/filterFns.d.ts +2 -1
- package/dist/table/filterFns.d.ts.map +1 -1
- package/dist/textfield/textfield.d.ts +15 -2
- package/dist/textfield/textfield.d.ts.map +1 -1
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../calendar/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAM7D,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,EAAE,CAAC;AAIhD,eAAO,MAAM,QAAQ,yDAKlB,aAAa,
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../calendar/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAM7D,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,EAAE,CAAC;AAIhD,eAAO,MAAM,QAAQ,yDAKlB,aAAa,4CAgCf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CalendarProps } from "./calendar";
|
|
2
|
+
import { TextfieldProps } from "~/textfield/textfield";
|
|
3
|
+
interface DatePickerProps {
|
|
4
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
5
|
+
dateFormat?: string;
|
|
6
|
+
textFieldProps?: TextfieldProps;
|
|
7
|
+
calendarProps?: CalendarProps;
|
|
8
|
+
onSelect?: (date: Date) => void;
|
|
9
|
+
value?: Date;
|
|
10
|
+
}
|
|
11
|
+
export declare function DatePicker({ side, dateFormat, textFieldProps, calendarProps, value, onSelect, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../calendar/date-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,YAAY,CAAC;AAKrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,IAAI,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAY,EACZ,UAAyB,EACzB,cAAc,EACd,aAAa,EACb,KAAkB,EAClB,QAAmB,GACpB,EAAE,eAAe,2CAoCjB"}
|
package/dist/calendar/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../calendar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../calendar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CalendarProps } from "./calendar";
|
|
2
|
+
import { TextfieldProps } from "~/textfield/textfield";
|
|
3
|
+
import { DateRange } from "react-day-picker";
|
|
4
|
+
interface RangePickerProps {
|
|
5
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
6
|
+
dateFormat?: string;
|
|
7
|
+
textFieldProps?: TextfieldProps;
|
|
8
|
+
calendarProps?: CalendarProps;
|
|
9
|
+
onSelect?: (date: DateRange) => void;
|
|
10
|
+
pickerGroupClassName?: string;
|
|
11
|
+
value?: DateRange;
|
|
12
|
+
}
|
|
13
|
+
export declare function RangePicker({ side, dateFormat, textFieldProps, calendarProps, onSelect, value, pickerGroupClassName, }: RangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=range-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range-picker.d.ts","sourceRoot":"","sources":["../../calendar/range-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,YAAY,CAAC;AAKrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,SAAS,EAA2B,MAAM,kBAAkB,CAAC;AAGtE,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAID,wBAAgB,WAAW,CAAC,EAC1B,IAAY,EACZ,UAAyB,EACzB,cAAc,EACd,aAAa,EACb,QAAmB,EACnB,KAGC,EACD,oBAAoB,GACrB,EAAE,gBAAgB,2CA4DlB"}
|
|
@@ -5,7 +5,8 @@ declare const errorstate: (props?: import("class-variance-authority/dist/types")
|
|
|
5
5
|
type ErrorStateProps = PropsWithChildren<VariantProps<typeof errorstate>> & HTMLAttributes<HTMLElement> & {
|
|
6
6
|
icon?: React.ReactElement;
|
|
7
7
|
status?: Status;
|
|
8
|
+
message?: string;
|
|
8
9
|
};
|
|
9
|
-
export declare function ErrorState({ children, className, status, icon, ...props }: ErrorStateProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function ErrorState({ children, className, status, icon, message, ...props }: ErrorStateProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=errorstate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorstate.d.ts","sourceRoot":"","sources":["../../errorstate/errorstate.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM1D,KAAK,MAAM,GACP,KAAK,GACL,WAAW,GACX,mBAAmB,GACnB,sBAAsB,GACtB,MAAM,CAAC;AAiDX,QAAA,MAAM,UAAU,yFAAyB,CAAC;AAC1C,KAAK,eAAe,GAAG,iBAAiB,CAAC,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,GACvE,cAAc,CAAC,WAAW,CAAC,GAAG;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"errorstate.d.ts","sourceRoot":"","sources":["../../errorstate/errorstate.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM1D,KAAK,MAAM,GACP,KAAK,GACL,WAAW,GACX,mBAAmB,GACnB,sBAAsB,GACtB,MAAM,CAAC;AAiDX,QAAA,MAAM,UAAU,yFAAyB,CAAC;AAC1C,KAAK,eAAe,GAAG,iBAAiB,CAAC,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,GACvE,cAAc,CAAC,WAAW,CAAC,GAAG;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEJ,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EACT,EAAE,eAAe,2CAoBjB"}
|
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,8 @@ function _interopNamespaceDefault(e) {
|
|
|
23
23
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
24
24
|
var $7SXl2$reactdom__namespace = /*#__PURE__*/_interopNamespaceDefault($7SXl2$reactdom);
|
|
25
25
|
|
|
26
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
27
|
+
|
|
26
28
|
function getDefaultExportFromCjs (x) {
|
|
27
29
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
28
30
|
}
|
|
@@ -2446,6 +2448,28 @@ var ArrowUpIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
2446
2448
|
}));
|
|
2447
2449
|
});
|
|
2448
2450
|
|
|
2451
|
+
var _excluded$I = ["color"];
|
|
2452
|
+
var CalendarIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
2453
|
+
var _ref$color = _ref.color,
|
|
2454
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
2455
|
+
props = _objectWithoutPropertiesLoose$1(_ref, _excluded$I);
|
|
2456
|
+
|
|
2457
|
+
return React.createElement("svg", Object.assign({
|
|
2458
|
+
width: "15",
|
|
2459
|
+
height: "15",
|
|
2460
|
+
viewBox: "0 0 15 15",
|
|
2461
|
+
fill: "none",
|
|
2462
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2463
|
+
}, props, {
|
|
2464
|
+
ref: forwardedRef
|
|
2465
|
+
}), React.createElement("path", {
|
|
2466
|
+
d: "M4.5 1C4.77614 1 5 1.22386 5 1.5V2H10V1.5C10 1.22386 10.2239 1 10.5 1C10.7761 1 11 1.22386 11 1.5V2H12.5C13.3284 2 14 2.67157 14 3.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V3.5C1 2.67157 1.67157 2 2.5 2H4V1.5C4 1.22386 4.22386 1 4.5 1ZM10 3V3.5C10 3.77614 10.2239 4 10.5 4C10.7761 4 11 3.77614 11 3.5V3H12.5C12.7761 3 13 3.22386 13 3.5V5H2V3.5C2 3.22386 2.22386 3 2.5 3H4V3.5C4 3.77614 4.22386 4 4.5 4C4.77614 4 5 3.77614 5 3.5V3H10ZM2 6V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V6H2ZM7 7.5C7 7.22386 7.22386 7 7.5 7C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8C7.22386 8 7 7.77614 7 7.5ZM9.5 7C9.22386 7 9 7.22386 9 7.5C9 7.77614 9.22386 8 9.5 8C9.77614 8 10 7.77614 10 7.5C10 7.22386 9.77614 7 9.5 7ZM11 7.5C11 7.22386 11.2239 7 11.5 7C11.7761 7 12 7.22386 12 7.5C12 7.77614 11.7761 8 11.5 8C11.2239 8 11 7.77614 11 7.5ZM11.5 9C11.2239 9 11 9.22386 11 9.5C11 9.77614 11.2239 10 11.5 10C11.7761 10 12 9.77614 12 9.5C12 9.22386 11.7761 9 11.5 9ZM9 9.5C9 9.22386 9.22386 9 9.5 9C9.77614 9 10 9.22386 10 9.5C10 9.77614 9.77614 10 9.5 10C9.22386 10 9 9.77614 9 9.5ZM7.5 9C7.22386 9 7 9.22386 7 9.5C7 9.77614 7.22386 10 7.5 10C7.77614 10 8 9.77614 8 9.5C8 9.22386 7.77614 9 7.5 9ZM5 9.5C5 9.22386 5.22386 9 5.5 9C5.77614 9 6 9.22386 6 9.5C6 9.77614 5.77614 10 5.5 10C5.22386 10 5 9.77614 5 9.5ZM3.5 9C3.22386 9 3 9.22386 3 9.5C3 9.77614 3.22386 10 3.5 10C3.77614 10 4 9.77614 4 9.5C4 9.22386 3.77614 9 3.5 9ZM3 11.5C3 11.2239 3.22386 11 3.5 11C3.77614 11 4 11.2239 4 11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5ZM5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11ZM7 11.5C7 11.2239 7.22386 11 7.5 11C7.77614 11 8 11.2239 8 11.5C8 11.7761 7.77614 12 7.5 12C7.22386 12 7 11.7761 7 11.5ZM9.5 11C9.22386 11 9 11.2239 9 11.5C9 11.7761 9.22386 12 9.5 12C9.77614 12 10 11.7761 10 11.5C10 11.2239 9.77614 11 9.5 11Z",
|
|
2467
|
+
fill: color,
|
|
2468
|
+
fillRule: "evenodd",
|
|
2469
|
+
clipRule: "evenodd"
|
|
2470
|
+
}));
|
|
2471
|
+
});
|
|
2472
|
+
|
|
2449
2473
|
var _excluded$T = ["color"];
|
|
2450
2474
|
var CheckIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
2451
2475
|
var _ref$color = _ref.color,
|
|
@@ -9719,8 +9743,8 @@ const getHeadline = (status = "Something gone wrong") => {
|
|
|
9719
9743
|
}
|
|
9720
9744
|
};
|
|
9721
9745
|
const errorstate = cva(styles$n.errorstate);
|
|
9722
|
-
function ErrorState({ children, className, status, icon, ...props }) {
|
|
9723
|
-
return (jsxRuntimeExports$1.jsx(Flex, { justify: "center", style: { width: "100%", height: "100%" }, children: jsxRuntimeExports$1.jsxs(Flex, { direction: "column", gap: "large", align: "center", justify: "center", className: errorstate({ className }), style: { textAlign: "center", maxWidth: "400px" }, ...props, children: [icon ? icon : getIcon(status), jsxRuntimeExports$1.jsxs(Flex, { direction: "column", gap: "medium", children: [jsxRuntimeExports$1.jsx(Headline, { size: "large", children: getHeadline(status) }), jsxRuntimeExports$1.jsx(Body, { size: "large", children: getMessage(status) })] })] }) }));
|
|
9746
|
+
function ErrorState({ children, className, status, icon, message, ...props }) {
|
|
9747
|
+
return (jsxRuntimeExports$1.jsx(Flex, { justify: "center", style: { width: "100%", height: "100%" }, children: jsxRuntimeExports$1.jsxs(Flex, { direction: "column", gap: "large", align: "center", justify: "center", className: errorstate({ className }), style: { textAlign: "center", maxWidth: "400px" }, ...props, children: [icon ? icon : getIcon(status), jsxRuntimeExports$1.jsxs(Flex, { direction: "column", gap: "medium", children: [jsxRuntimeExports$1.jsx(Headline, { size: "large", children: getHeadline(status) }), jsxRuntimeExports$1.jsx(Body, { size: "large", children: message ? message : getMessage(status) })] })] }) }));
|
|
9724
9748
|
}
|
|
9725
9749
|
|
|
9726
9750
|
var styles$m = {"grid":"grid-module_grid__UQeew","align-start":"grid-module_align-start__Z7pvl","align-center":"grid-module_align-center__Rwlbt","align-end":"grid-module_align-end__nuXn1","align-stretch":"grid-module_align-stretch__6SP1w","align-baseline":"grid-module_align-baseline__ajEPv","justify-start":"grid-module_justify-start__hRYMn","justify-center":"grid-module_justify-center__zQ7Ym","justify-end":"grid-module_justify-end__92x6b","justify-between":"grid-module_justify-between__vQXi3","flow-row":"grid-module_flow-row__bI9DV","flow-column":"grid-module_flow-column__lsmAV","flow-dense":"grid-module_flow-dense__rAnOn","flow-rowDense":"grid-module_flow-rowDense__vvLwD","flow-columnDense":"grid-module_flow-columnDense__HnI7j","columns-1":"grid-module_columns-1__ISyE5","columns-2":"grid-module_columns-2__nAJXX","columns-3":"grid-module_columns-3__jSanv","columns-4":"grid-module_columns-4__TPrmV","gap-xs":"grid-module_gap-xs__jJXAg","gap-sm":"grid-module_gap-sm__lSOTF","gap-md":"grid-module_gap-md__d44tx","gap-lg":"grid-module_gap-lg__QxI9L","gap-xl":"grid-module_gap-xl__0VXE9","gapX-xs":"grid-module_gapX-xs__vCzot","gapX-sm":"grid-module_gapX-sm__3p68N","gapX-md":"grid-module_gapX-md__JPO3S","gapX-lg":"grid-module_gapX-lg__qFCBX","gapX-xl":"grid-module_gapX-xl__J141F","gapY-xs":"grid-module_gapY-xs__yx6Mm","gapY-sm":"grid-module_gapY-sm__uopNl","gapY-md":"grid-module_gapY-md__4XBeo","gapY-lg":"grid-module_gapY-lg__QrF6Z","gapY-xl":"grid-module_gapY-xl__Y6SHF"};
|
|
@@ -10035,7 +10059,8 @@ const $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2 = $cb5cc270b50c6fcd$export$d7e1f
|
|
|
10035
10059
|
|
|
10036
10060
|
var styles$i = {"popover":"popover-module_popover__Jh8Hg"};
|
|
10037
10061
|
|
|
10038
|
-
const
|
|
10062
|
+
const popoverContent = cva(styles$i.popover);
|
|
10063
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (jsxRuntimeExports$1.jsx($cb5cc270b50c6fcd$export$602eac185826482c, { children: jsxRuntimeExports$1.jsx($cb5cc270b50c6fcd$export$7c6e2c02157bb7d2, { ref: ref, align: align, sideOffset: sideOffset, className: popoverContent({ className }), ...props }) })));
|
|
10039
10064
|
PopoverContent.displayName = $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2.displayName;
|
|
10040
10065
|
const Popover = Object.assign($cb5cc270b50c6fcd$export$be92b6f5f03c0fe9, {
|
|
10041
10066
|
Trigger: $cb5cc270b50c6fcd$export$41fb9f06171c75f4,
|
|
@@ -28121,7 +28146,7 @@ function DayPicker(props) {
|
|
|
28121
28146
|
return (jsxRuntimeExports.jsx(RootProvider, __assign({}, props, { children: jsxRuntimeExports.jsx(Root, { initialProps: props }) })));
|
|
28122
28147
|
}
|
|
28123
28148
|
|
|
28124
|
-
var styles$6 = {"calendarRoot":"calendar-module_calendarRoot__KnBz-","caption":"calendar-module_caption__KH06I","caption_label":"calendar-module_caption_label__C5Ys7","nav_button":"calendar-module_nav_button__8W5py","nav_button_previous":"calendar-module_nav_button_previous__lWJYm","nav_button_next":"calendar-module_nav_button_next__1MzRT","head":"calendar-module_head__EIxyS","head_cell":"calendar-module_head_cell__z8NlN","cell":"calendar-module_cell__TTpcD","day_today":"calendar-module_day_today__P35-i","day_range_middle":"calendar-module_day_range_middle__3yKS1","day_range_start":"calendar-module_day_range_start__Qyhit","day_range_end":"calendar-module_day_range_end__YF0ad","row":"calendar-module_row__cjS3G","day":"calendar-module_day__rQFGK","day_outside":"calendar-module_day_outside__WN68B"};
|
|
28149
|
+
var styles$6 = {"calendarRoot":"calendar-module_calendarRoot__KnBz-","caption":"calendar-module_caption__KH06I","caption_label":"calendar-module_caption_label__C5Ys7","nav_button":"calendar-module_nav_button__8W5py","nav_button_previous":"calendar-module_nav_button_previous__lWJYm","nav_button_next":"calendar-module_nav_button_next__1MzRT","head":"calendar-module_head__EIxyS","head_cell":"calendar-module_head_cell__z8NlN","cell":"calendar-module_cell__TTpcD","day_today":"calendar-module_day_today__P35-i","day_range_middle":"calendar-module_day_range_middle__3yKS1","day_range_start":"calendar-module_day_range_start__Qyhit","day_range_end":"calendar-module_day_range_end__YF0ad","row":"calendar-module_row__cjS3G","day":"calendar-module_day__rQFGK","day_outside":"calendar-module_day_outside__WN68B","months":"calendar-module_months__IN75k","calendarPopover":"calendar-module_calendarPopover__PY4sa","datePickerInput":"calendar-module_datePickerInput__aOnRQ"};
|
|
28125
28150
|
|
|
28126
28151
|
const root$1 = cva(styles$6.calendarRoot);
|
|
28127
28152
|
const Calendar = function ({ className, classNames, showOutsideDays = true, ...props }) {
|
|
@@ -28145,10 +28170,100 @@ const Calendar = function ({ className, classNames, showOutsideDays = true, ...p
|
|
|
28145
28170
|
day_range_middle: styles$6.day_range_middle,
|
|
28146
28171
|
day_range_end: styles$6.day_range_end,
|
|
28147
28172
|
day_range_start: styles$6.day_range_start,
|
|
28173
|
+
months: styles$6.months,
|
|
28148
28174
|
...classNames,
|
|
28149
28175
|
}, className: root$1({ className }), ...props }));
|
|
28150
28176
|
};
|
|
28151
28177
|
|
|
28178
|
+
var styles$5 = {"textfield":"textfield-module_textfield__u4AGg","textfield-sm":"textfield-module_textfield-sm__OKPic","textfield-md":"textfield-module_textfield-md__e2ayW","textfield-invlid":"textfield-module_textfield-invlid__zo9MF","textfield-valid":"textfield-module_textfield-valid__6rMM9","textfield-leading":"textfield-module_textfield-leading__AE-ld","textfield-trailing":"textfield-module_textfield-trailing__Hj2jX"};
|
|
28179
|
+
|
|
28180
|
+
const textfield = cva(styles$5.textfield, {
|
|
28181
|
+
variants: {
|
|
28182
|
+
size: {
|
|
28183
|
+
small: styles$5["textfield-sm"],
|
|
28184
|
+
medium: styles$5["textfield-md"],
|
|
28185
|
+
},
|
|
28186
|
+
state: {
|
|
28187
|
+
invalid: styles$5["textfield-invalid"],
|
|
28188
|
+
valid: styles$5["textfield-valid"],
|
|
28189
|
+
},
|
|
28190
|
+
hasLeadingElement: {
|
|
28191
|
+
true: styles$5["textfield-leading"],
|
|
28192
|
+
},
|
|
28193
|
+
hasTrailingElement: {
|
|
28194
|
+
true: styles$5["textfield-trailing"],
|
|
28195
|
+
},
|
|
28196
|
+
},
|
|
28197
|
+
defaultVariants: {
|
|
28198
|
+
size: "small",
|
|
28199
|
+
},
|
|
28200
|
+
});
|
|
28201
|
+
const TextField = React.forwardRef(({ leading, trailing, className, src, size, state, style, ...props }, ref) => {
|
|
28202
|
+
const hasLeadingElement = Boolean(leading);
|
|
28203
|
+
const hasTrailingElement = Boolean(trailing);
|
|
28204
|
+
return (jsxRuntimeExports$1.jsxs(Flex, { align: "center", style: { position: "relative", width: "100%" }, children: [hasLeadingElement ? (jsxRuntimeExports$1.jsx(Flex, { style: { position: "absolute", left: "8px" }, children: leading })) : null, jsxRuntimeExports$1.jsx("input", { className: cx(textfield({
|
|
28205
|
+
size,
|
|
28206
|
+
state,
|
|
28207
|
+
className,
|
|
28208
|
+
hasLeadingElement,
|
|
28209
|
+
hasTrailingElement,
|
|
28210
|
+
})), ...props, ref: ref }), hasTrailingElement ? (jsxRuntimeExports$1.jsx(Flex, { style: { position: "absolute", right: "8px" }, children: trailing })) : null] }));
|
|
28211
|
+
});
|
|
28212
|
+
TextField.displayName = "TextField";
|
|
28213
|
+
|
|
28214
|
+
var dayjs_min = {exports: {}};
|
|
28215
|
+
|
|
28216
|
+
(function (module, exports) {
|
|
28217
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
28218
|
+
} (dayjs_min));
|
|
28219
|
+
|
|
28220
|
+
var dayjs_minExports = dayjs_min.exports;
|
|
28221
|
+
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
28222
|
+
|
|
28223
|
+
function DatePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, calendarProps, value = new Date(), onSelect = () => { }, }) {
|
|
28224
|
+
const [showCalendar, setShowCalendar] = React.useState(false);
|
|
28225
|
+
const dateValue = dayjs(value).format(dateFormat);
|
|
28226
|
+
const handleSelect = (day, selectedDay) => {
|
|
28227
|
+
const selected = day || selectedDay;
|
|
28228
|
+
onSelect(selected);
|
|
28229
|
+
setShowCalendar(false);
|
|
28230
|
+
};
|
|
28231
|
+
function onOpenChange(open) {
|
|
28232
|
+
setShowCalendar(Boolean(open));
|
|
28233
|
+
}
|
|
28234
|
+
return (jsxRuntimeExports$1.jsxs(Popover, { open: showCalendar, onOpenChange: onOpenChange, children: [jsxRuntimeExports$1.jsx(Popover.Trigger, { asChild: true, children: jsxRuntimeExports$1.jsx(TextField, { value: dateValue, trailing: jsxRuntimeExports$1.jsx(CalendarIcon, {}), className: styles$6.datePickerInput, readOnly: true, ...textFieldProps }) }), jsxRuntimeExports$1.jsx(Popover.Content, { side: side, className: styles$6.calendarPopover, children: jsxRuntimeExports$1.jsx(Calendar, { ...calendarProps, mode: "single", selected: value, defaultMonth: value, onSelect: handleSelect }) })] }));
|
|
28235
|
+
}
|
|
28236
|
+
|
|
28237
|
+
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, calendarProps, onSelect = () => { }, value = {
|
|
28238
|
+
to: new Date(),
|
|
28239
|
+
from: new Date(),
|
|
28240
|
+
}, pickerGroupClassName, }) {
|
|
28241
|
+
const [showCalendar, setShowCalendar] = React.useState(false);
|
|
28242
|
+
const [currentRangeField, setCurrentRangeField] = React.useState("from");
|
|
28243
|
+
const startDate = dayjs(value.from).format(dateFormat);
|
|
28244
|
+
const endDate = dayjs(value.to).format(dateFormat);
|
|
28245
|
+
// 1st click will select the start date.
|
|
28246
|
+
// 2nd click will select the end date.
|
|
28247
|
+
// 3rd click will select the start date again.
|
|
28248
|
+
const handleSelect = (range, selectedDay) => {
|
|
28249
|
+
const from = value?.from || range?.from;
|
|
28250
|
+
if (currentRangeField === "to" && dayjs(selectedDay).isAfter(dayjs(from))) {
|
|
28251
|
+
// update the end date
|
|
28252
|
+
onSelect({ from, to: selectedDay });
|
|
28253
|
+
setCurrentRangeField("from");
|
|
28254
|
+
}
|
|
28255
|
+
else {
|
|
28256
|
+
// reset the range and select start day
|
|
28257
|
+
onSelect({ from: selectedDay });
|
|
28258
|
+
setCurrentRangeField("to");
|
|
28259
|
+
}
|
|
28260
|
+
};
|
|
28261
|
+
function onOpenChange(open) {
|
|
28262
|
+
setShowCalendar(Boolean(open));
|
|
28263
|
+
}
|
|
28264
|
+
return (jsxRuntimeExports$1.jsxs(Popover, { open: showCalendar, onOpenChange: onOpenChange, children: [jsxRuntimeExports$1.jsx(Popover.Trigger, { asChild: true, children: jsxRuntimeExports$1.jsxs(Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntimeExports$1.jsx(TextField, { value: startDate, trailing: jsxRuntimeExports$1.jsx(CalendarIcon, {}), className: styles$6.datePickerInput, readOnly: true, ...textFieldProps }), jsxRuntimeExports$1.jsx(TextField, { value: endDate, trailing: jsxRuntimeExports$1.jsx(CalendarIcon, {}), className: styles$6.datePickerInput, readOnly: true, ...textFieldProps })] }) }), jsxRuntimeExports$1.jsx(Popover.Content, { side: side, className: styles$6.calendarPopover, children: jsxRuntimeExports$1.jsx(Calendar, { showOutsideDays: false, numberOfMonths: 2, defaultMonth: value.from, ...calendarProps, mode: "range", selected: value, onSelect: handleSelect }) })] }));
|
|
28265
|
+
}
|
|
28266
|
+
|
|
28152
28267
|
/**
|
|
28153
28268
|
* table-core
|
|
28154
28269
|
*
|
|
@@ -31627,43 +31742,41 @@ function DataTableFilterOptions({ children, ...props }) {
|
|
|
31627
31742
|
})] })) : null] }));
|
|
31628
31743
|
}
|
|
31629
31744
|
|
|
31630
|
-
var styles$
|
|
31631
|
-
|
|
31632
|
-
const textfield = cva(styles$5.textfield, {
|
|
31633
|
-
variants: {
|
|
31634
|
-
size: {
|
|
31635
|
-
small: styles$5["textfield-sm"],
|
|
31636
|
-
medium: styles$5["textfield-md"],
|
|
31637
|
-
},
|
|
31638
|
-
state: {
|
|
31639
|
-
invalid: styles$5["textfield-invalid"],
|
|
31640
|
-
valid: styles$5["textfield-valid"],
|
|
31641
|
-
},
|
|
31642
|
-
leading: {
|
|
31643
|
-
true: styles$5["textfield-leading"],
|
|
31644
|
-
},
|
|
31645
|
-
},
|
|
31646
|
-
defaultVariants: {
|
|
31647
|
-
size: "small",
|
|
31648
|
-
},
|
|
31649
|
-
});
|
|
31650
|
-
const TextField = React.forwardRef(({ leading, className, src, size, state, style, ...props }, ref) => {
|
|
31651
|
-
return (jsxRuntimeExports$1.jsxs(Flex, { align: "center", style: { position: "relative", width: "100%" }, children: [leading ? (jsxRuntimeExports$1.jsx(Flex, { style: { position: "absolute", left: "8px" }, children: leading })) : null, jsxRuntimeExports$1.jsx("input", { className: cx(textfield({ size, state, className, leading })), style: leading ? { paddingLeft: "32px" } : {}, ...props, ref: ref })] }));
|
|
31652
|
-
});
|
|
31653
|
-
TextField.displayName = "TextField";
|
|
31654
|
-
|
|
31655
|
-
var styles$4 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","table":"datatable-module_table__x2IkY","head":"datatable-module_head__zCfCW","toolbar":"datatable-module_toolbar__lO-aI","chip":"datatable-module_chip__IiwTD","chipWrapper":"datatable-module_chipWrapper__iz69x","filterOperator":"datatable-module_filterOperator__qtDsH"};
|
|
31745
|
+
var styles$4 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","table":"datatable-module_table__x2IkY","head":"datatable-module_head__zCfCW","toolbar":"datatable-module_toolbar__lO-aI","chip":"datatable-module_chip__IiwTD","chipWrapper":"datatable-module_chipWrapper__iz69x","filterOperator":"datatable-module_filterOperator__qtDsH","filterText":"datatable-module_filterText__w00L8","flex1":"datatable-module_flex1__fA-kQ"};
|
|
31656
31746
|
|
|
31657
31747
|
const columnTypesMap = {
|
|
31658
31748
|
select: "select",
|
|
31659
31749
|
number: "number",
|
|
31660
31750
|
text: "text",
|
|
31751
|
+
date: "date",
|
|
31661
31752
|
};
|
|
31662
31753
|
const filterValueTypeMap = {
|
|
31663
31754
|
select: "select",
|
|
31664
31755
|
text: "text",
|
|
31756
|
+
datePicker: "datePicker",
|
|
31757
|
+
rangePicker: "rangePicker",
|
|
31665
31758
|
};
|
|
31666
31759
|
|
|
31760
|
+
var isSameOrAfter$1 = {exports: {}};
|
|
31761
|
+
|
|
31762
|
+
(function (module, exports) {
|
|
31763
|
+
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)};}}));
|
|
31764
|
+
} (isSameOrAfter$1));
|
|
31765
|
+
|
|
31766
|
+
var isSameOrAfterExports = isSameOrAfter$1.exports;
|
|
31767
|
+
var isSameOrAfter = /*@__PURE__*/getDefaultExportFromCjs(isSameOrAfterExports);
|
|
31768
|
+
|
|
31769
|
+
var isSameOrBefore$1 = {exports: {}};
|
|
31770
|
+
|
|
31771
|
+
(function (module, exports) {
|
|
31772
|
+
!function(e,i){module.exports=i();}(commonjsGlobal,(function(){return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)};}}));
|
|
31773
|
+
} (isSameOrBefore$1));
|
|
31774
|
+
|
|
31775
|
+
var isSameOrBeforeExports = isSameOrBefore$1.exports;
|
|
31776
|
+
var isSameOrBefore = /*@__PURE__*/getDefaultExportFromCjs(isSameOrBeforeExports);
|
|
31777
|
+
|
|
31778
|
+
dayjs.extend(isSameOrAfter);
|
|
31779
|
+
dayjs.extend(isSameOrBefore);
|
|
31667
31780
|
const operationsOptions = {
|
|
31668
31781
|
[columnTypesMap.select]: [
|
|
31669
31782
|
{
|
|
@@ -31779,25 +31892,85 @@ const operationsOptions = {
|
|
|
31779
31892
|
hideValueField: true,
|
|
31780
31893
|
},
|
|
31781
31894
|
],
|
|
31895
|
+
[columnTypesMap.date]: [
|
|
31896
|
+
{
|
|
31897
|
+
label: "is",
|
|
31898
|
+
value: "is",
|
|
31899
|
+
fn: (row, columnId, filterValue) => {
|
|
31900
|
+
return dayjs(row.getValue(columnId)).isSame(dayjs(filterValue.date), "day");
|
|
31901
|
+
},
|
|
31902
|
+
},
|
|
31903
|
+
{
|
|
31904
|
+
label: "is before",
|
|
31905
|
+
value: "is before",
|
|
31906
|
+
fn: (row, columnId, filterValue) => {
|
|
31907
|
+
return dayjs(row.getValue(columnId)).isBefore(dayjs(filterValue.date), "day");
|
|
31908
|
+
},
|
|
31909
|
+
},
|
|
31910
|
+
{
|
|
31911
|
+
label: "is after",
|
|
31912
|
+
value: "is after",
|
|
31913
|
+
fn: (row, columnId, filterValue) => {
|
|
31914
|
+
return dayjs(row.getValue(columnId)).isAfter(dayjs(filterValue.date), "day");
|
|
31915
|
+
},
|
|
31916
|
+
},
|
|
31917
|
+
{
|
|
31918
|
+
label: "is between",
|
|
31919
|
+
value: "is between",
|
|
31920
|
+
fn: (row, columnId, filterValue) => {
|
|
31921
|
+
return (dayjs(row.getValue(columnId)).isSameOrAfter(dayjs(filterValue.dateRange?.from), "day") &&
|
|
31922
|
+
dayjs(row.getValue(columnId)).isSameOrBefore(dayjs(filterValue.dateRange?.to), "day"));
|
|
31923
|
+
},
|
|
31924
|
+
component: "rangePicker",
|
|
31925
|
+
},
|
|
31926
|
+
],
|
|
31782
31927
|
};
|
|
31783
31928
|
|
|
31784
|
-
const
|
|
31785
|
-
|
|
31786
|
-
|
|
31787
|
-
|
|
31788
|
-
|
|
31929
|
+
const getFilterValueType = ({ filterOperation, columnType, }) => {
|
|
31930
|
+
if (filterOperation?.component) {
|
|
31931
|
+
return filterOperation?.component;
|
|
31932
|
+
}
|
|
31933
|
+
else if (columnType === columnTypesMap.date) {
|
|
31934
|
+
return filterValueTypeMap.datePicker;
|
|
31935
|
+
}
|
|
31936
|
+
else if (columnType === columnTypesMap.select) {
|
|
31937
|
+
return filterValueTypeMap.select;
|
|
31938
|
+
}
|
|
31939
|
+
else {
|
|
31940
|
+
return filterValueTypeMap.text;
|
|
31941
|
+
}
|
|
31942
|
+
};
|
|
31943
|
+
const FilterValues = ({ columnType = filterValueTypeMap.text, options = [], onValueChange, filterOperation, ...props }) => {
|
|
31944
|
+
const [value, setValue] = React.useState({
|
|
31945
|
+
value: "",
|
|
31946
|
+
date: new Date(),
|
|
31947
|
+
dateRange: {
|
|
31948
|
+
to: new Date(),
|
|
31949
|
+
from: new Date(),
|
|
31950
|
+
},
|
|
31951
|
+
});
|
|
31952
|
+
const valueType = getFilterValueType({ filterOperation, columnType });
|
|
31789
31953
|
React.useEffect(() => {
|
|
31790
|
-
if (
|
|
31791
|
-
onValueChange(
|
|
31954
|
+
if (onValueChange) {
|
|
31955
|
+
onValueChange(value);
|
|
31792
31956
|
}
|
|
31793
31957
|
}, [value]);
|
|
31794
|
-
|
|
31795
|
-
|
|
31796
|
-
|
|
31958
|
+
switch (valueType) {
|
|
31959
|
+
case filterValueTypeMap.select:
|
|
31960
|
+
return (jsxRuntimeExports$1.jsxs(Select, { value: value.value, onValueChange: (value) => setValue({ value }), children: [jsxRuntimeExports$1.jsx(Select.Trigger, { children: jsxRuntimeExports$1.jsx(Select.Value, { placeholder: "Select value" }) }), jsxRuntimeExports$1.jsx(Select.Content, { children: options.map((opt) => {
|
|
31961
|
+
return (jsxRuntimeExports$1.jsx(Select.Item, { value: opt.value, children: opt.label || opt.value }, opt.key));
|
|
31962
|
+
}) })] }));
|
|
31963
|
+
case filterValueTypeMap.datePicker:
|
|
31964
|
+
return (jsxRuntimeExports$1.jsx(DatePicker, { onSelect: (date) => setValue({ date }), value: value.date }));
|
|
31965
|
+
case filterValueTypeMap.rangePicker:
|
|
31966
|
+
return (jsxRuntimeExports$1.jsx(RangePicker, { onSelect: (dateRange) => setValue({ dateRange }), value: value.dateRange }));
|
|
31967
|
+
default:
|
|
31968
|
+
return (jsxRuntimeExports$1.jsx(TextField, { value: value.value, onChange: (e) => setValue({ value: e.target.value }) }));
|
|
31969
|
+
}
|
|
31797
31970
|
};
|
|
31798
31971
|
const Operation = ({ columnType = columnTypesMap.text, onOperationSelect, }) => {
|
|
31799
31972
|
const options = operationsOptions[columnType] || [];
|
|
31800
|
-
const [value, setValue] = React.useState(options?.[0]
|
|
31973
|
+
const [value, setValue] = React.useState(options?.[0]?.value);
|
|
31801
31974
|
React.useEffect(() => {
|
|
31802
31975
|
const selectedOption = options.find((o) => o.value === value);
|
|
31803
31976
|
if (selectedOption) {
|
|
@@ -31829,7 +32002,7 @@ const FilteredChip = ({ column, updateColumnCustomFilter, }) => {
|
|
|
31829
32002
|
setFilterOperation(undefined);
|
|
31830
32003
|
setFilterValue({});
|
|
31831
32004
|
}
|
|
31832
|
-
return (jsxRuntimeExports$1.jsxs(Box, { className: styles$4.chip, children: [jsxRuntimeExports$1.jsx(Text, { children: columnName }), jsxRuntimeExports$1.jsx(Operation, { columnType: filterVariant, onOperationSelect: setFilterOperation }), filterOperation?.hideValueField ? null : (jsxRuntimeExports$1.jsx(FilterValues, { columnType: filterVariant, options: options, onValueChange: setFilterValue })), jsxRuntimeExports$1.jsx(Flex, { children: jsxRuntimeExports$1.jsx(Cross1Icon, { height: "12", width: "12", onClick: removeFilter }) })] }));
|
|
32005
|
+
return (jsxRuntimeExports$1.jsxs(Box, { className: styles$4.chip, children: [jsxRuntimeExports$1.jsx(Text, { className: styles$4.filterText, children: columnName }), jsxRuntimeExports$1.jsx(Operation, { columnType: filterVariant, onOperationSelect: setFilterOperation }), filterOperation?.hideValueField ? null : (jsxRuntimeExports$1.jsx(FilterValues, { columnType: filterVariant, options: options, onValueChange: setFilterValue, filterOperation: filterOperation })), jsxRuntimeExports$1.jsx(Flex, { children: jsxRuntimeExports$1.jsx(Cross1Icon, { height: "12", width: "12", onClick: removeFilter }) })] }));
|
|
31833
32006
|
};
|
|
31834
32007
|
|
|
31835
32008
|
function DataTableFilterChips(props) {
|
|
@@ -31935,7 +32108,98 @@ const Table = Object.assign(TableRoot, {
|
|
|
31935
32108
|
Caption: TableCaption,
|
|
31936
32109
|
});
|
|
31937
32110
|
|
|
31938
|
-
|
|
32111
|
+
/**
|
|
32112
|
+
* @internal
|
|
32113
|
+
*/
|
|
32114
|
+
const SkeletonThemeContext = React.createContext({});
|
|
32115
|
+
|
|
32116
|
+
/* eslint-disable react/no-array-index-key */
|
|
32117
|
+
const defaultEnableAnimation = true;
|
|
32118
|
+
// For performance & cleanliness, don't add any inline styles unless we have to
|
|
32119
|
+
function styleOptionsToCssProperties({ baseColor, highlightColor, width, height, borderRadius, circle, direction, duration, enableAnimation = defaultEnableAnimation, }) {
|
|
32120
|
+
const style = {};
|
|
32121
|
+
if (direction === 'rtl')
|
|
32122
|
+
style['--animation-direction'] = 'reverse';
|
|
32123
|
+
if (typeof duration === 'number')
|
|
32124
|
+
style['--animation-duration'] = `${duration}s`;
|
|
32125
|
+
if (!enableAnimation)
|
|
32126
|
+
style['--pseudo-element-display'] = 'none';
|
|
32127
|
+
if (typeof width === 'string' || typeof width === 'number')
|
|
32128
|
+
style.width = width;
|
|
32129
|
+
if (typeof height === 'string' || typeof height === 'number')
|
|
32130
|
+
style.height = height;
|
|
32131
|
+
if (typeof borderRadius === 'string' || typeof borderRadius === 'number')
|
|
32132
|
+
style.borderRadius = borderRadius;
|
|
32133
|
+
if (circle)
|
|
32134
|
+
style.borderRadius = '50%';
|
|
32135
|
+
if (typeof baseColor !== 'undefined')
|
|
32136
|
+
style['--base-color'] = baseColor;
|
|
32137
|
+
if (typeof highlightColor !== 'undefined')
|
|
32138
|
+
style['--highlight-color'] = highlightColor;
|
|
32139
|
+
return style;
|
|
32140
|
+
}
|
|
32141
|
+
function Skeleton({ count = 1, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle = false, style: styleProp, ...originalPropsStyleOptions }) {
|
|
32142
|
+
var _a, _b, _c;
|
|
32143
|
+
const contextStyleOptions = React.useContext(SkeletonThemeContext);
|
|
32144
|
+
const propsStyleOptions = { ...originalPropsStyleOptions };
|
|
32145
|
+
// DO NOT overwrite style options from the context if `propsStyleOptions`
|
|
32146
|
+
// has properties explicity set to undefined
|
|
32147
|
+
for (const [key, value] of Object.entries(originalPropsStyleOptions)) {
|
|
32148
|
+
if (typeof value === 'undefined') {
|
|
32149
|
+
delete propsStyleOptions[key];
|
|
32150
|
+
}
|
|
32151
|
+
}
|
|
32152
|
+
// Props take priority over context
|
|
32153
|
+
const styleOptions = {
|
|
32154
|
+
...contextStyleOptions,
|
|
32155
|
+
...propsStyleOptions,
|
|
32156
|
+
circle,
|
|
32157
|
+
};
|
|
32158
|
+
// `styleProp` has the least priority out of everything
|
|
32159
|
+
const style = {
|
|
32160
|
+
...styleProp,
|
|
32161
|
+
...styleOptionsToCssProperties(styleOptions),
|
|
32162
|
+
};
|
|
32163
|
+
let className = 'react-loading-skeleton';
|
|
32164
|
+
if (customClassName)
|
|
32165
|
+
className += ` ${customClassName}`;
|
|
32166
|
+
const inline = (_a = styleOptions.inline) !== null && _a !== void 0 ? _a : false;
|
|
32167
|
+
const elements = [];
|
|
32168
|
+
const countCeil = Math.ceil(count);
|
|
32169
|
+
for (let i = 0; i < countCeil; i++) {
|
|
32170
|
+
let thisStyle = style;
|
|
32171
|
+
if (countCeil > count && i === countCeil - 1) {
|
|
32172
|
+
// count is not an integer and we've reached the last iteration of
|
|
32173
|
+
// the loop, so add a "fractional" skeleton.
|
|
32174
|
+
//
|
|
32175
|
+
// For example, if count is 3.5, we've already added 3 full
|
|
32176
|
+
// skeletons, so now we add one more skeleton that is 0.5 times the
|
|
32177
|
+
// original width.
|
|
32178
|
+
const width = (_b = thisStyle.width) !== null && _b !== void 0 ? _b : '100%'; // 100% is the default since that's what's in the CSS
|
|
32179
|
+
const fractionalPart = count % 1;
|
|
32180
|
+
const fractionalWidth = typeof width === 'number'
|
|
32181
|
+
? width * fractionalPart
|
|
32182
|
+
: `calc(${width} * ${fractionalPart})`;
|
|
32183
|
+
thisStyle = { ...thisStyle, width: fractionalWidth };
|
|
32184
|
+
}
|
|
32185
|
+
const skeletonSpan = (React.createElement("span", { className: className, style: thisStyle, key: i }, "\u200C"));
|
|
32186
|
+
if (inline) {
|
|
32187
|
+
elements.push(skeletonSpan);
|
|
32188
|
+
}
|
|
32189
|
+
else {
|
|
32190
|
+
// Without the <br />, the skeleton lines will all run together if
|
|
32191
|
+
// `width` is specified
|
|
32192
|
+
elements.push(React.createElement(React.Fragment, { key: i },
|
|
32193
|
+
skeletonSpan,
|
|
32194
|
+
React.createElement("br", null)));
|
|
32195
|
+
}
|
|
32196
|
+
}
|
|
32197
|
+
return (React.createElement("span", { className: containerClassName, "data-testid": containerTestId, "aria-live": "polite", "aria-busy": (_c = styleOptions.enableAnimation) !== null && _c !== void 0 ? _c : defaultEnableAnimation }, Wrapper
|
|
32198
|
+
? elements.map((el, i) => React.createElement(Wrapper, { key: i }, el))
|
|
32199
|
+
: elements));
|
|
32200
|
+
}
|
|
32201
|
+
|
|
32202
|
+
function DataTableRoot({ columns, data, emptyState, children, parentStyle, isLoading = false, ShouldShowHeader = true, ...props }) {
|
|
31939
32203
|
const [tableCustomFilter, setTableCustomFilter] = React.useState({});
|
|
31940
32204
|
const convertedChildren = React.Children.toArray(children);
|
|
31941
32205
|
const header = convertedChildren.find((child) => child.type === DataTableToolbar) || null;
|
|
@@ -31954,6 +32218,9 @@ function DataTableRoot({ columns, data, emptyState, children, parentStyle, Shoul
|
|
|
31954
32218
|
if (colId && tableCustomFilter.hasOwnProperty(colId)) {
|
|
31955
32219
|
col.filterFn = tableCustomFilter[colId];
|
|
31956
32220
|
}
|
|
32221
|
+
col.cell = isLoading
|
|
32222
|
+
? () => (jsxRuntimeExports$1.jsx(Skeleton, { containerClassName: styles$4.flex1, highlightColor: "var(--background-base)", baseColor: "var(--background-base-hover)" }))
|
|
32223
|
+
: col.cell;
|
|
31957
32224
|
return col;
|
|
31958
32225
|
});
|
|
31959
32226
|
const updateColumnCustomFilter = (id, filterFn) => {
|
|
@@ -32487,6 +32754,7 @@ exports.Checkbox = Checkbox;
|
|
|
32487
32754
|
exports.Command = Command;
|
|
32488
32755
|
exports.Container = Container;
|
|
32489
32756
|
exports.DataTable = DataTable;
|
|
32757
|
+
exports.DatePicker = DatePicker;
|
|
32490
32758
|
exports.Dialog = Dialog;
|
|
32491
32759
|
exports.Display = Display;
|
|
32492
32760
|
exports.DropdownMenu = DropdownMenu;
|
|
@@ -32502,6 +32770,7 @@ exports.Link = Link;
|
|
|
32502
32770
|
exports.Popover = Popover;
|
|
32503
32771
|
exports.RSelect = RSelect;
|
|
32504
32772
|
exports.Radio = Radio;
|
|
32773
|
+
exports.RangePicker = RangePicker;
|
|
32505
32774
|
exports.ScrollArea = ScrollArea;
|
|
32506
32775
|
exports.Select = Select;
|
|
32507
32776
|
exports.Separator = Separator;
|