akeyless-client-commons 1.1.84 → 1.1.85
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/components/index.js +64 -92
- package/dist/components/index.mjs +65 -93
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -6950,6 +6950,7 @@ var import_react18 = require("react");
|
|
|
6950
6950
|
var import_moment2 = __toESM(require("moment"));
|
|
6951
6951
|
var import_lucide_react7 = require("lucide-react");
|
|
6952
6952
|
var import_react_aria_components3 = require("react-aria-components");
|
|
6953
|
+
var import_date2 = require("@internationalized/date");
|
|
6953
6954
|
// src/components/ui/calendar-rac.tsx
|
|
6954
6955
|
var import_date = require("@internationalized/date");
|
|
6955
6956
|
var import_lucide_react6 = require("lucide-react");
|
|
@@ -7055,7 +7056,6 @@ function DateInput(_param) {
|
|
|
7055
7056
|
}
|
|
7056
7057
|
// src/components/forms/index.tsx
|
|
7057
7058
|
var import_react_aria_components4 = require("react-aria-components");
|
|
7058
|
-
var import_date2 = require("@internationalized/date");
|
|
7059
7059
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
7060
7060
|
var ConfirmForm = function(param) {
|
|
7061
7061
|
var onV = param.onV, onX = param.onX, _param_headline = param.headline, headline = _param_headline === void 0 ? "" : _param_headline, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_buttonsContainerClassName = param.buttonsContainerClassName, buttonsContainerClassName = _param_buttonsContainerClassName === void 0 ? "" : _param_buttonsContainerClassName, _param_headlineClassName = param.headlineClassName, headlineClassName = _param_headlineClassName === void 0 ? "" : _param_headlineClassName, _param_cancelButtonClassName = param.cancelButtonClassName, cancelButtonClassName = _param_cancelButtonClassName === void 0 ? "" : _param_cancelButtonClassName, _param_confirmButtonClassName = param.confirmButtonClassName, confirmButtonClassName = _param_confirmButtonClassName === void 0 ? "" : _param_confirmButtonClassName, _param_cancelButtonProps = param.cancelButtonProps, cancelButtonProps = _param_cancelButtonProps === void 0 ? {} : _param_cancelButtonProps, _param_confirmButtonProps = param.confirmButtonProps, confirmButtonProps = _param_confirmButtonProps === void 0 ? {} : _param_confirmButtonProps, cancelElement = param.cancelElement, confirmElement = param.confirmElement;
|
|
@@ -7188,30 +7188,6 @@ function DatePicker2(param) {
|
|
|
7188
7188
|
};
|
|
7189
7189
|
}() : _param_submit, _param_formClassName = param.formClassName, formClassName = _param_formClassName === void 0 ? "" : _param_formClassName, _param_labelsClassName = param.labelsClassName, labelsClassName = _param_labelsClassName === void 0 ? "" : _param_labelsClassName, _param_inputsClassName = param.inputsClassName, inputsClassName = _param_inputsClassName === void 0 ? "" : _param_inputsClassName, _param_buttonClassName = param.buttonClassName, buttonClassName = _param_buttonClassName === void 0 ? "" : _param_buttonClassName, _param_buttonStyle = param.buttonStyle, buttonStyle = _param_buttonStyle === void 0 ? {} : _param_buttonStyle, defaultFrom = param.defaultFrom, defaultTo = param.defaultTo, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_fromText = param.fromText, fromText = _param_fromText === void 0 ? "From date" : _param_fromText, _param_toText = param.toText, toText = _param_toText === void 0 ? "To date" : _param_toText, _param_buttonText = param.buttonText, buttonText = _param_buttonText === void 0 ? "Search" : _param_buttonText;
|
|
7190
7190
|
var _ref = _sliced_to_array((0, import_react18.useState)(false), 2), isLoading = _ref[0], setIsLoading = _ref[1];
|
|
7191
|
-
var _ref1 = _sliced_to_array((0, import_react18.useState)(function() {
|
|
7192
|
-
if (defaultFrom) {
|
|
7193
|
-
try {
|
|
7194
|
-
return (0, import_date2.parseDate)(defaultFrom);
|
|
7195
|
-
} catch (e) {
|
|
7196
|
-
return (0, import_date2.parseDate)((0, import_moment2.default)(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
7197
|
-
}
|
|
7198
|
-
}
|
|
7199
|
-
return (0, import_date2.parseDate)((0, import_moment2.default)(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
7200
|
-
}), 2), fromDate = _ref1[0], setFromDate = _ref1[1];
|
|
7201
|
-
var _ref2 = _sliced_to_array((0, import_react18.useState)(function() {
|
|
7202
|
-
if (defaultTo) {
|
|
7203
|
-
try {
|
|
7204
|
-
return (0, import_date2.parseDate)(defaultTo);
|
|
7205
|
-
} catch (e) {
|
|
7206
|
-
return (0, import_date2.parseDate)((0, import_moment2.default)(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
7207
|
-
}
|
|
7208
|
-
}
|
|
7209
|
-
return (0, import_date2.parseDate)((0, import_moment2.default)(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
7210
|
-
}), 2), toDate = _ref2[0], setToDate = _ref2[1];
|
|
7211
|
-
var formatDateValue = function(date) {
|
|
7212
|
-
if (!date) return "";
|
|
7213
|
-
return "".concat(date.year, "-").concat(String(date.month).padStart(2, "0"), "-").concat(String(date.day).padStart(2, "0"));
|
|
7214
|
-
};
|
|
7215
7191
|
var onSubmit = /*#__PURE__*/ function() {
|
|
7216
7192
|
var _ref = _async_to_generator(function(e) {
|
|
7217
7193
|
return _ts_generator(this, function(_state) {
|
|
@@ -7236,6 +7212,16 @@ function DatePicker2(param) {
|
|
|
7236
7212
|
return _ref.apply(this, arguments);
|
|
7237
7213
|
};
|
|
7238
7214
|
}();
|
|
7215
|
+
var getDefaultValue = function(dateStr) {
|
|
7216
|
+
if (dateStr) {
|
|
7217
|
+
try {
|
|
7218
|
+
return (0, import_date2.parseDate)(dateStr);
|
|
7219
|
+
} catch (e) {
|
|
7220
|
+
return (0, import_date2.today)((0, import_date2.getLocalTimeZone)());
|
|
7221
|
+
}
|
|
7222
|
+
}
|
|
7223
|
+
return (0, import_date2.today)((0, import_date2.getLocalTimeZone)());
|
|
7224
|
+
};
|
|
7239
7225
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components4.I18nProvider, {
|
|
7240
7226
|
locale: direction === "rtl" ? "he-IL" : "en-US",
|
|
7241
7227
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("form", {
|
|
@@ -7245,89 +7231,75 @@ function DatePicker2(param) {
|
|
|
7245
7231
|
onSubmit: onSubmit,
|
|
7246
7232
|
className: cn("w-full h-10 flex justify-start gap-3 items-center", formClassName),
|
|
7247
7233
|
children: [
|
|
7248
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.
|
|
7249
|
-
|
|
7234
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components3.DatePicker, {
|
|
7235
|
+
className: cn("flex items-center gap-2", labelsClassName),
|
|
7250
7236
|
name: "from",
|
|
7251
|
-
|
|
7252
|
-
}),
|
|
7253
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", {
|
|
7254
|
-
type: "hidden",
|
|
7255
|
-
name: "to",
|
|
7256
|
-
value: formatDateValue(toDate)
|
|
7257
|
-
}),
|
|
7258
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", {
|
|
7259
|
-
className: cn("center text-[14px] relative gap-2", labelsClassName),
|
|
7237
|
+
defaultValue: getDefaultValue(defaultFrom),
|
|
7260
7238
|
children: [
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7239
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Label, {
|
|
7240
|
+
className: "font-medium text-foreground text-sm whitespace-nowrap",
|
|
7241
|
+
children: fromText
|
|
7242
|
+
}),
|
|
7243
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", {
|
|
7244
|
+
className: "flex",
|
|
7265
7245
|
children: [
|
|
7266
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.
|
|
7267
|
-
className: "
|
|
7268
|
-
children:
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DateInput, {
|
|
7272
|
-
className: cn("w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end", inputsClassName),
|
|
7273
|
-
unstyled: true
|
|
7274
|
-
})
|
|
7275
|
-
}),
|
|
7276
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Button, {
|
|
7277
|
-
className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
|
|
7278
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CalendarIcon, {
|
|
7279
|
-
size: 16
|
|
7280
|
-
})
|
|
7281
|
-
})
|
|
7282
|
-
]
|
|
7246
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Group, {
|
|
7247
|
+
className: cn("w-full border rounded-md bg-background", inputsClassName),
|
|
7248
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DateInput, {
|
|
7249
|
+
className: "px-2 py-1"
|
|
7250
|
+
})
|
|
7283
7251
|
}),
|
|
7284
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.
|
|
7285
|
-
className: "
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
className: "max-h-[inherit] overflow-auto p-2",
|
|
7289
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Calendar, {})
|
|
7252
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Button, {
|
|
7253
|
+
className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
|
|
7254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CalendarIcon, {
|
|
7255
|
+
size: 16
|
|
7290
7256
|
})
|
|
7291
7257
|
})
|
|
7292
7258
|
]
|
|
7259
|
+
}),
|
|
7260
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Popover, {
|
|
7261
|
+
className: "data-[entering]:fade-in-0 data-[entering]:zoom-in-95 data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 z-50 rounded-lg border bg-background text-popover-foreground shadow-lg outline-hidden data-entering:animate-in data-exiting:animate-out",
|
|
7262
|
+
offset: 4,
|
|
7263
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Dialog, {
|
|
7264
|
+
className: "max-h-[inherit] overflow-auto p-2",
|
|
7265
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Calendar, {})
|
|
7266
|
+
})
|
|
7293
7267
|
})
|
|
7294
7268
|
]
|
|
7295
7269
|
}),
|
|
7296
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
7297
|
-
className: cn("
|
|
7270
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_aria_components3.DatePicker, {
|
|
7271
|
+
className: cn("flex items-center gap-2", labelsClassName),
|
|
7272
|
+
name: "to",
|
|
7273
|
+
defaultValue: getDefaultValue(defaultTo),
|
|
7298
7274
|
children: [
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7275
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Label, {
|
|
7276
|
+
className: "font-medium text-foreground text-sm whitespace-nowrap",
|
|
7277
|
+
children: toText
|
|
7278
|
+
}),
|
|
7279
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", {
|
|
7280
|
+
className: "flex",
|
|
7303
7281
|
children: [
|
|
7304
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.
|
|
7305
|
-
className: "
|
|
7306
|
-
children:
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DateInput, {
|
|
7310
|
-
className: cn("w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end", inputsClassName),
|
|
7311
|
-
unstyled: true
|
|
7312
|
-
})
|
|
7313
|
-
}),
|
|
7314
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Button, {
|
|
7315
|
-
className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
|
|
7316
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CalendarIcon, {
|
|
7317
|
-
size: 16
|
|
7318
|
-
})
|
|
7319
|
-
})
|
|
7320
|
-
]
|
|
7282
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Group, {
|
|
7283
|
+
className: cn("w-full border rounded-md bg-background", inputsClassName),
|
|
7284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DateInput, {
|
|
7285
|
+
className: "px-2 py-1"
|
|
7286
|
+
})
|
|
7321
7287
|
}),
|
|
7322
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.
|
|
7323
|
-
className: "
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
className: "max-h-[inherit] overflow-auto p-2",
|
|
7327
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Calendar, {})
|
|
7288
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Button, {
|
|
7289
|
+
className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
|
|
7290
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CalendarIcon, {
|
|
7291
|
+
size: 16
|
|
7328
7292
|
})
|
|
7329
7293
|
})
|
|
7330
7294
|
]
|
|
7295
|
+
}),
|
|
7296
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Popover, {
|
|
7297
|
+
className: "data-[entering]:fade-in-0 data-[entering]:zoom-in-95 data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 z-50 rounded-lg border bg-background text-popover-foreground shadow-lg outline-hidden data-entering:animate-in data-exiting:animate-out",
|
|
7298
|
+
offset: 4,
|
|
7299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_aria_components3.Dialog, {
|
|
7300
|
+
className: "max-h-[inherit] overflow-auto p-2",
|
|
7301
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Calendar, {})
|
|
7302
|
+
})
|
|
7331
7303
|
})
|
|
7332
7304
|
]
|
|
7333
7305
|
}),
|
|
@@ -6724,7 +6724,8 @@ var ModularForm_default = ModularForm;
|
|
|
6724
6724
|
import { useState as useState11 } from "react";
|
|
6725
6725
|
import moment3 from "moment";
|
|
6726
6726
|
import { CalendarIcon } from "lucide-react";
|
|
6727
|
-
import { Button as Button3, DatePicker as RACDatePicker, Dialog as Dialog2, Group, Popover as Popover2 } from "react-aria-components";
|
|
6727
|
+
import { Button as Button3, DatePicker as RACDatePicker, Dialog as Dialog2, Group, Label, Popover as Popover2 } from "react-aria-components";
|
|
6728
|
+
import { parseDate, today as today2, getLocalTimeZone as getLocalTimeZone2 } from "@internationalized/date";
|
|
6728
6729
|
// src/components/ui/calendar-rac.tsx
|
|
6729
6730
|
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
6730
6731
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
@@ -6830,7 +6831,6 @@ function DateInput(_param) {
|
|
|
6830
6831
|
}
|
|
6831
6832
|
// src/components/forms/index.tsx
|
|
6832
6833
|
import { I18nProvider } from "react-aria-components";
|
|
6833
|
-
import { parseDate } from "@internationalized/date";
|
|
6834
6834
|
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
6835
6835
|
var ConfirmForm = function(param) {
|
|
6836
6836
|
var onV = param.onV, onX = param.onX, _param_headline = param.headline, headline = _param_headline === void 0 ? "" : _param_headline, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_buttonsContainerClassName = param.buttonsContainerClassName, buttonsContainerClassName = _param_buttonsContainerClassName === void 0 ? "" : _param_buttonsContainerClassName, _param_headlineClassName = param.headlineClassName, headlineClassName = _param_headlineClassName === void 0 ? "" : _param_headlineClassName, _param_cancelButtonClassName = param.cancelButtonClassName, cancelButtonClassName = _param_cancelButtonClassName === void 0 ? "" : _param_cancelButtonClassName, _param_confirmButtonClassName = param.confirmButtonClassName, confirmButtonClassName = _param_confirmButtonClassName === void 0 ? "" : _param_confirmButtonClassName, _param_cancelButtonProps = param.cancelButtonProps, cancelButtonProps = _param_cancelButtonProps === void 0 ? {} : _param_cancelButtonProps, _param_confirmButtonProps = param.confirmButtonProps, confirmButtonProps = _param_confirmButtonProps === void 0 ? {} : _param_confirmButtonProps, cancelElement = param.cancelElement, confirmElement = param.confirmElement;
|
|
@@ -6963,30 +6963,6 @@ function DatePicker2(param) {
|
|
|
6963
6963
|
};
|
|
6964
6964
|
}() : _param_submit, _param_formClassName = param.formClassName, formClassName = _param_formClassName === void 0 ? "" : _param_formClassName, _param_labelsClassName = param.labelsClassName, labelsClassName = _param_labelsClassName === void 0 ? "" : _param_labelsClassName, _param_inputsClassName = param.inputsClassName, inputsClassName = _param_inputsClassName === void 0 ? "" : _param_inputsClassName, _param_buttonClassName = param.buttonClassName, buttonClassName = _param_buttonClassName === void 0 ? "" : _param_buttonClassName, _param_buttonStyle = param.buttonStyle, buttonStyle = _param_buttonStyle === void 0 ? {} : _param_buttonStyle, defaultFrom = param.defaultFrom, defaultTo = param.defaultTo, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_fromText = param.fromText, fromText = _param_fromText === void 0 ? "From date" : _param_fromText, _param_toText = param.toText, toText = _param_toText === void 0 ? "To date" : _param_toText, _param_buttonText = param.buttonText, buttonText = _param_buttonText === void 0 ? "Search" : _param_buttonText;
|
|
6965
6965
|
var _useState11 = _sliced_to_array(useState11(false), 2), isLoading = _useState11[0], setIsLoading = _useState11[1];
|
|
6966
|
-
var _useState111 = _sliced_to_array(useState11(function() {
|
|
6967
|
-
if (defaultFrom) {
|
|
6968
|
-
try {
|
|
6969
|
-
return parseDate(defaultFrom);
|
|
6970
|
-
} catch (e) {
|
|
6971
|
-
return parseDate(moment3(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
6972
|
-
}
|
|
6973
|
-
}
|
|
6974
|
-
return parseDate(moment3(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
6975
|
-
}), 2), fromDate = _useState111[0], setFromDate = _useState111[1];
|
|
6976
|
-
var _useState112 = _sliced_to_array(useState11(function() {
|
|
6977
|
-
if (defaultTo) {
|
|
6978
|
-
try {
|
|
6979
|
-
return parseDate(defaultTo);
|
|
6980
|
-
} catch (e) {
|
|
6981
|
-
return parseDate(moment3(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
6982
|
-
}
|
|
6983
|
-
}
|
|
6984
|
-
return parseDate(moment3(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"));
|
|
6985
|
-
}), 2), toDate = _useState112[0], setToDate = _useState112[1];
|
|
6986
|
-
var formatDateValue = function(date) {
|
|
6987
|
-
if (!date) return "";
|
|
6988
|
-
return "".concat(date.year, "-").concat(String(date.month).padStart(2, "0"), "-").concat(String(date.day).padStart(2, "0"));
|
|
6989
|
-
};
|
|
6990
6966
|
var onSubmit = /*#__PURE__*/ function() {
|
|
6991
6967
|
var _ref = _async_to_generator(function(e) {
|
|
6992
6968
|
return _ts_generator(this, function(_state) {
|
|
@@ -7011,6 +6987,16 @@ function DatePicker2(param) {
|
|
|
7011
6987
|
return _ref.apply(this, arguments);
|
|
7012
6988
|
};
|
|
7013
6989
|
}();
|
|
6990
|
+
var getDefaultValue = function(dateStr) {
|
|
6991
|
+
if (dateStr) {
|
|
6992
|
+
try {
|
|
6993
|
+
return parseDate(dateStr);
|
|
6994
|
+
} catch (e) {
|
|
6995
|
+
return today2(getLocalTimeZone2());
|
|
6996
|
+
}
|
|
6997
|
+
}
|
|
6998
|
+
return today2(getLocalTimeZone2());
|
|
6999
|
+
};
|
|
7014
7000
|
return /* @__PURE__ */ jsx24(I18nProvider, {
|
|
7015
7001
|
locale: direction === "rtl" ? "he-IL" : "en-US",
|
|
7016
7002
|
children: /* @__PURE__ */ jsxs17("form", {
|
|
@@ -7020,89 +7006,75 @@ function DatePicker2(param) {
|
|
|
7020
7006
|
onSubmit: onSubmit,
|
|
7021
7007
|
className: cn("w-full h-10 flex justify-start gap-3 items-center", formClassName),
|
|
7022
7008
|
children: [
|
|
7023
|
-
/* @__PURE__ */
|
|
7024
|
-
|
|
7009
|
+
/* @__PURE__ */ jsxs17(RACDatePicker, {
|
|
7010
|
+
className: cn("flex items-center gap-2", labelsClassName),
|
|
7025
7011
|
name: "from",
|
|
7026
|
-
|
|
7027
|
-
}),
|
|
7028
|
-
/* @__PURE__ */ jsx24("input", {
|
|
7029
|
-
type: "hidden",
|
|
7030
|
-
name: "to",
|
|
7031
|
-
value: formatDateValue(toDate)
|
|
7032
|
-
}),
|
|
7033
|
-
/* @__PURE__ */ jsxs17("label", {
|
|
7034
|
-
className: cn("center text-[14px] relative gap-2", labelsClassName),
|
|
7012
|
+
defaultValue: getDefaultValue(defaultFrom),
|
|
7035
7013
|
children: [
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7014
|
+
/* @__PURE__ */ jsx24(Label, {
|
|
7015
|
+
className: "font-medium text-foreground text-sm whitespace-nowrap",
|
|
7016
|
+
children: fromText
|
|
7017
|
+
}),
|
|
7018
|
+
/* @__PURE__ */ jsxs17("div", {
|
|
7019
|
+
className: "flex",
|
|
7040
7020
|
children: [
|
|
7041
|
-
/* @__PURE__ */
|
|
7042
|
-
className: "
|
|
7043
|
-
children:
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
children: /* @__PURE__ */ jsx24(DateInput, {
|
|
7047
|
-
className: cn("w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end", inputsClassName),
|
|
7048
|
-
unstyled: true
|
|
7049
|
-
})
|
|
7050
|
-
}),
|
|
7051
|
-
/* @__PURE__ */ jsx24(Button3, {
|
|
7052
|
-
className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
|
|
7053
|
-
children: /* @__PURE__ */ jsx24(CalendarIcon, {
|
|
7054
|
-
size: 16
|
|
7055
|
-
})
|
|
7056
|
-
})
|
|
7057
|
-
]
|
|
7021
|
+
/* @__PURE__ */ jsx24(Group, {
|
|
7022
|
+
className: cn("w-full border rounded-md bg-background", inputsClassName),
|
|
7023
|
+
children: /* @__PURE__ */ jsx24(DateInput, {
|
|
7024
|
+
className: "px-2 py-1"
|
|
7025
|
+
})
|
|
7058
7026
|
}),
|
|
7059
|
-
/* @__PURE__ */ jsx24(
|
|
7060
|
-
className: "
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
className: "max-h-[inherit] overflow-auto p-2",
|
|
7064
|
-
children: /* @__PURE__ */ jsx24(Calendar, {})
|
|
7027
|
+
/* @__PURE__ */ jsx24(Button3, {
|
|
7028
|
+
className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
|
|
7029
|
+
children: /* @__PURE__ */ jsx24(CalendarIcon, {
|
|
7030
|
+
size: 16
|
|
7065
7031
|
})
|
|
7066
7032
|
})
|
|
7067
7033
|
]
|
|
7034
|
+
}),
|
|
7035
|
+
/* @__PURE__ */ jsx24(Popover2, {
|
|
7036
|
+
className: "data-[entering]:fade-in-0 data-[entering]:zoom-in-95 data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 z-50 rounded-lg border bg-background text-popover-foreground shadow-lg outline-hidden data-entering:animate-in data-exiting:animate-out",
|
|
7037
|
+
offset: 4,
|
|
7038
|
+
children: /* @__PURE__ */ jsx24(Dialog2, {
|
|
7039
|
+
className: "max-h-[inherit] overflow-auto p-2",
|
|
7040
|
+
children: /* @__PURE__ */ jsx24(Calendar, {})
|
|
7041
|
+
})
|
|
7068
7042
|
})
|
|
7069
7043
|
]
|
|
7070
7044
|
}),
|
|
7071
|
-
/* @__PURE__ */ jsxs17(
|
|
7072
|
-
className: cn("
|
|
7045
|
+
/* @__PURE__ */ jsxs17(RACDatePicker, {
|
|
7046
|
+
className: cn("flex items-center gap-2", labelsClassName),
|
|
7047
|
+
name: "to",
|
|
7048
|
+
defaultValue: getDefaultValue(defaultTo),
|
|
7073
7049
|
children: [
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7050
|
+
/* @__PURE__ */ jsx24(Label, {
|
|
7051
|
+
className: "font-medium text-foreground text-sm whitespace-nowrap",
|
|
7052
|
+
children: toText
|
|
7053
|
+
}),
|
|
7054
|
+
/* @__PURE__ */ jsxs17("div", {
|
|
7055
|
+
className: "flex",
|
|
7078
7056
|
children: [
|
|
7079
|
-
/* @__PURE__ */
|
|
7080
|
-
className: "
|
|
7081
|
-
children:
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
children: /* @__PURE__ */ jsx24(DateInput, {
|
|
7085
|
-
className: cn("w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end", inputsClassName),
|
|
7086
|
-
unstyled: true
|
|
7087
|
-
})
|
|
7088
|
-
}),
|
|
7089
|
-
/* @__PURE__ */ jsx24(Button3, {
|
|
7090
|
-
className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
|
|
7091
|
-
children: /* @__PURE__ */ jsx24(CalendarIcon, {
|
|
7092
|
-
size: 16
|
|
7093
|
-
})
|
|
7094
|
-
})
|
|
7095
|
-
]
|
|
7057
|
+
/* @__PURE__ */ jsx24(Group, {
|
|
7058
|
+
className: cn("w-full border rounded-md bg-background", inputsClassName),
|
|
7059
|
+
children: /* @__PURE__ */ jsx24(DateInput, {
|
|
7060
|
+
className: "px-2 py-1"
|
|
7061
|
+
})
|
|
7096
7062
|
}),
|
|
7097
|
-
/* @__PURE__ */ jsx24(
|
|
7098
|
-
className: "
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
className: "max-h-[inherit] overflow-auto p-2",
|
|
7102
|
-
children: /* @__PURE__ */ jsx24(Calendar, {})
|
|
7063
|
+
/* @__PURE__ */ jsx24(Button3, {
|
|
7064
|
+
className: "-ms-9 -me-px z-10 flex w-9 items-center justify-center rounded-e-md text-muted-foreground/80 outline-none transition-[color,box-shadow] hover:text-foreground data-focus-visible:border-ring data-focus-visible:ring-[3px] data-focus-visible:ring-ring/50",
|
|
7065
|
+
children: /* @__PURE__ */ jsx24(CalendarIcon, {
|
|
7066
|
+
size: 16
|
|
7103
7067
|
})
|
|
7104
7068
|
})
|
|
7105
7069
|
]
|
|
7070
|
+
}),
|
|
7071
|
+
/* @__PURE__ */ jsx24(Popover2, {
|
|
7072
|
+
className: "data-[entering]:fade-in-0 data-[entering]:zoom-in-95 data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 z-50 rounded-lg border bg-background text-popover-foreground shadow-lg outline-hidden data-entering:animate-in data-exiting:animate-out",
|
|
7073
|
+
offset: 4,
|
|
7074
|
+
children: /* @__PURE__ */ jsx24(Dialog2, {
|
|
7075
|
+
className: "max-h-[inherit] overflow-auto p-2",
|
|
7076
|
+
children: /* @__PURE__ */ jsx24(Calendar, {})
|
|
7077
|
+
})
|
|
7106
7078
|
})
|
|
7107
7079
|
]
|
|
7108
7080
|
}),
|