@helpwave/hightide 0.1.19 → 0.1.20
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/date/DatePicker.js +3 -2
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +3 -2
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +3 -2
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +3 -2
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.d.mts +3 -0
- package/dist/components/layout-and-navigation/Expandable.d.ts +3 -0
- package/dist/components/layout-and-navigation/Expandable.js +3 -2
- package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.mjs +3 -2
- package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.js +3 -2
- package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.mjs +3 -2
- package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +5 -10
- package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +5 -10
- package/dist/components/loading-states/LoadingAndErrorComponent.js +14 -331
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +15 -322
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingContainer.d.mts +8 -0
- package/dist/components/loading-states/LoadingContainer.d.ts +8 -0
- package/dist/components/loading-states/LoadingContainer.js +34 -0
- package/dist/components/loading-states/LoadingContainer.js.map +1 -0
- package/dist/components/loading-states/LoadingContainer.mjs +10 -0
- package/dist/components/loading-states/LoadingContainer.mjs.map +1 -0
- package/dist/components/modals/LanguageModal.js +3 -2
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +3 -2
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +3 -2
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +3 -2
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js +3 -2
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +3 -2
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.js +3 -2
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +3 -2
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js +3 -2
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +3 -2
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.js +3 -2
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +3 -2
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/Select.js +3 -2
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +3 -2
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/css/globals.css +33 -0
- package/dist/css/uncompiled/utitlity/animation.css +27 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +296 -284
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +260 -249
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2891,6 +2891,7 @@ __export(index_exports, {
|
|
|
2891
2891
|
LoadingAndErrorComponent: () => LoadingAndErrorComponent,
|
|
2892
2892
|
LoadingAnimation: () => LoadingAnimation,
|
|
2893
2893
|
LoadingButton: () => LoadingButton,
|
|
2894
|
+
LoadingContainer: () => LoadingContainer,
|
|
2894
2895
|
LocalStorageService: () => LocalStorageService,
|
|
2895
2896
|
LoopingArrayCalculator: () => LoopingArrayCalculator,
|
|
2896
2897
|
MarkdownInterpreter: () => MarkdownInterpreter,
|
|
@@ -3905,7 +3906,8 @@ var Expandable = (0, import_react4.forwardRef)(function Expandable2({
|
|
|
3905
3906
|
disabled = false,
|
|
3906
3907
|
className,
|
|
3907
3908
|
headerClassName,
|
|
3908
|
-
contentClassName
|
|
3909
|
+
contentClassName,
|
|
3910
|
+
contentExpandedClassName
|
|
3909
3911
|
}, ref) {
|
|
3910
3912
|
const defaultIcon = (0, import_react4.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
|
|
3911
3913
|
icon ??= defaultIcon;
|
|
@@ -3941,7 +3943,7 @@ var Expandable = (0, import_react4.forwardRef)(function Expandable2({
|
|
|
3941
3943
|
className: (0, import_clsx5.default)(
|
|
3942
3944
|
"flex-col-2 px-4 transition-all duration-300 ease-in-out",
|
|
3943
3945
|
{
|
|
3944
|
-
"max-h-96 opacity-100 pb-2": isExpanded,
|
|
3946
|
+
[(0, import_clsx5.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
|
|
3945
3947
|
"max-h-0 opacity-0 overflow-hidden": !isExpanded
|
|
3946
3948
|
},
|
|
3947
3949
|
contentClassName
|
|
@@ -6912,30 +6914,24 @@ var ErrorComponent = ({
|
|
|
6912
6914
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
6913
6915
|
var import_react20 = require("react");
|
|
6914
6916
|
|
|
6915
|
-
// src/components/loading-states/
|
|
6916
|
-
var import_clsx28 =
|
|
6917
|
+
// src/components/loading-states/LoadingContainer.tsx
|
|
6918
|
+
var import_clsx28 = require("clsx");
|
|
6917
6919
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
6918
|
-
var
|
|
6919
|
-
|
|
6920
|
-
loadingText,
|
|
6921
|
-
classname
|
|
6922
|
-
}) => {
|
|
6923
|
-
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6924
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: (0, import_clsx28.default)("flex-col-2 items-center justify-center w-full h-24", classname), children: [
|
|
6925
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Helpwave, { animate: "loading" }),
|
|
6926
|
-
loadingText ?? `${translation("loading")}...`
|
|
6927
|
-
] });
|
|
6920
|
+
var LoadingContainer = ({ className }) => {
|
|
6921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: (0, import_clsx28.clsx)("relative overflow-hidden shimmer bg-disabled-background rounded-md", className) });
|
|
6928
6922
|
};
|
|
6929
6923
|
|
|
6930
6924
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
6925
|
+
var import_clsx29 = require("clsx");
|
|
6931
6926
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
6932
6927
|
var LoadingAndErrorComponent = ({
|
|
6933
6928
|
children,
|
|
6934
6929
|
isLoading = false,
|
|
6935
6930
|
hasError = false,
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
minimumLoadingDuration
|
|
6931
|
+
loadingComponent,
|
|
6932
|
+
errorComponent,
|
|
6933
|
+
minimumLoadingDuration,
|
|
6934
|
+
className
|
|
6939
6935
|
}) => {
|
|
6940
6936
|
const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react20.useState)(false);
|
|
6941
6937
|
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react20.useState)(false);
|
|
@@ -6947,27 +6943,42 @@ var LoadingAndErrorComponent = ({
|
|
|
6947
6943
|
}, minimumLoadingDuration);
|
|
6948
6944
|
}
|
|
6949
6945
|
if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
|
|
6950
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6946
|
+
return loadingComponent ?? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoadingContainer, { className: (0, import_clsx29.clsx)(className) });
|
|
6951
6947
|
}
|
|
6952
6948
|
if (hasError) {
|
|
6953
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
6949
|
+
return errorComponent ?? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoadingContainer, { className: (0, import_clsx29.clsx)("bg-negative", className) });
|
|
6954
6950
|
}
|
|
6955
6951
|
return children;
|
|
6956
6952
|
};
|
|
6957
6953
|
|
|
6958
|
-
// src/components/loading-states/
|
|
6959
|
-
var
|
|
6954
|
+
// src/components/loading-states/LoadingAnimation.tsx
|
|
6955
|
+
var import_clsx30 = __toESM(require("clsx"));
|
|
6960
6956
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6957
|
+
var LoadingAnimation = ({
|
|
6958
|
+
overwriteTranslation,
|
|
6959
|
+
loadingText,
|
|
6960
|
+
classname
|
|
6961
|
+
}) => {
|
|
6962
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: (0, import_clsx30.default)("flex-col-2 items-center justify-center w-full h-24", classname), children: [
|
|
6964
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Helpwave, { animate: "loading" }),
|
|
6965
|
+
loadingText ?? `${translation("loading")}...`
|
|
6966
|
+
] });
|
|
6967
|
+
};
|
|
6968
|
+
|
|
6969
|
+
// src/components/loading-states/LoadingButton.tsx
|
|
6970
|
+
var import_clsx31 = __toESM(require("clsx"));
|
|
6971
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6961
6972
|
var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
|
|
6962
6973
|
const paddingClass = ButtonUtil.paddingMapping[size];
|
|
6963
|
-
return /* @__PURE__ */ (0,
|
|
6964
|
-
isLoading && /* @__PURE__ */ (0,
|
|
6965
|
-
/* @__PURE__ */ (0,
|
|
6974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "inline-block relative", children: [
|
|
6975
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: (0, import_clsx31.default)("flex-row-2 absolute inset-0 items-center justify-center bg-white/40", paddingClass), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Helpwave, { animate: "loading", className: "text-white" }) }),
|
|
6976
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SolidButton, { ...rest, disabled: rest.disabled, onClick: isLoading ? noop : onClick })
|
|
6966
6977
|
] });
|
|
6967
6978
|
};
|
|
6968
6979
|
|
|
6969
6980
|
// src/components/loading-states/ProgressIndicator.tsx
|
|
6970
|
-
var
|
|
6981
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6971
6982
|
var sizeMapping = { small: 16, medium: 24, big: 48 };
|
|
6972
6983
|
var ProgressIndicator = ({
|
|
6973
6984
|
progress,
|
|
@@ -6984,7 +6995,7 @@ var ProgressIndicator = ({
|
|
|
6984
6995
|
if (direction === "clockwise") {
|
|
6985
6996
|
rotation += 360 * progress;
|
|
6986
6997
|
}
|
|
6987
|
-
return /* @__PURE__ */ (0,
|
|
6998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6988
6999
|
"svg",
|
|
6989
7000
|
{
|
|
6990
7001
|
style: {
|
|
@@ -6993,7 +7004,7 @@ var ProgressIndicator = ({
|
|
|
6993
7004
|
transform: `rotate(${rotation}deg)`
|
|
6994
7005
|
},
|
|
6995
7006
|
children: [
|
|
6996
|
-
/* @__PURE__ */ (0,
|
|
7007
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6997
7008
|
"circle",
|
|
6998
7009
|
{
|
|
6999
7010
|
cx: center,
|
|
@@ -7004,7 +7015,7 @@ var ProgressIndicator = ({
|
|
|
7004
7015
|
className: "stroke-progress-indicator-fill"
|
|
7005
7016
|
}
|
|
7006
7017
|
),
|
|
7007
|
-
/* @__PURE__ */ (0,
|
|
7018
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7008
7019
|
"circle",
|
|
7009
7020
|
{
|
|
7010
7021
|
cx: center,
|
|
@@ -7023,8 +7034,8 @@ var ProgressIndicator = ({
|
|
|
7023
7034
|
};
|
|
7024
7035
|
|
|
7025
7036
|
// src/components/modals/ConfirmModal.tsx
|
|
7026
|
-
var
|
|
7027
|
-
var
|
|
7037
|
+
var import_clsx32 = __toESM(require("clsx"));
|
|
7038
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
7028
7039
|
var ConfirmModal = ({
|
|
7029
7040
|
overwriteTranslation,
|
|
7030
7041
|
children,
|
|
@@ -7043,10 +7054,10 @@ var ConfirmModal = ({
|
|
|
7043
7054
|
positive: "positive",
|
|
7044
7055
|
primary: "primary"
|
|
7045
7056
|
};
|
|
7046
|
-
return /* @__PURE__ */ (0,
|
|
7047
|
-
/* @__PURE__ */ (0,
|
|
7048
|
-
/* @__PURE__ */ (0,
|
|
7049
|
-
onCancel && /* @__PURE__ */ (0,
|
|
7057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Modal, { ...restProps, onClose: onCancel, className: (0, import_clsx32.default)("justify-between", className), children: [
|
|
7058
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex-col-2 grow", children }),
|
|
7059
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex-row-4 mt-3 justify-end", children: [
|
|
7060
|
+
onCancel && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7050
7061
|
SolidButton,
|
|
7051
7062
|
{
|
|
7052
7063
|
color: buttonOverwrites?.[0].color ?? "neutral",
|
|
@@ -7055,7 +7066,7 @@ var ConfirmModal = ({
|
|
|
7055
7066
|
children: buttonOverwrites?.[0].text ?? translation("cancel")
|
|
7056
7067
|
}
|
|
7057
7068
|
),
|
|
7058
|
-
onDecline && /* @__PURE__ */ (0,
|
|
7069
|
+
onDecline && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7059
7070
|
SolidButton,
|
|
7060
7071
|
{
|
|
7061
7072
|
color: buttonOverwrites?.[1].color ?? "negative",
|
|
@@ -7064,7 +7075,7 @@ var ConfirmModal = ({
|
|
|
7064
7075
|
children: buttonOverwrites?.[1].text ?? translation("decline")
|
|
7065
7076
|
}
|
|
7066
7077
|
),
|
|
7067
|
-
/* @__PURE__ */ (0,
|
|
7078
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7068
7079
|
SolidButton,
|
|
7069
7080
|
{
|
|
7070
7081
|
autoFocus: true,
|
|
@@ -7079,7 +7090,7 @@ var ConfirmModal = ({
|
|
|
7079
7090
|
};
|
|
7080
7091
|
|
|
7081
7092
|
// src/components/modals/DiscardChangesModal.tsx
|
|
7082
|
-
var
|
|
7093
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
7083
7094
|
var DiscardChangesModal = ({
|
|
7084
7095
|
overwriteTranslation,
|
|
7085
7096
|
children,
|
|
@@ -7090,7 +7101,7 @@ var DiscardChangesModal = ({
|
|
|
7090
7101
|
...modalProps
|
|
7091
7102
|
}) => {
|
|
7092
7103
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7093
|
-
return /* @__PURE__ */ (0,
|
|
7104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7094
7105
|
ConfirmModal,
|
|
7095
7106
|
{
|
|
7096
7107
|
headerProps: {
|
|
@@ -7109,18 +7120,18 @@ var DiscardChangesModal = ({
|
|
|
7109
7120
|
};
|
|
7110
7121
|
|
|
7111
7122
|
// src/components/modals/InputModal.tsx
|
|
7112
|
-
var
|
|
7123
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
7113
7124
|
var InputModal = ({
|
|
7114
7125
|
inputs,
|
|
7115
7126
|
buttonOverwrites,
|
|
7116
7127
|
...restProps
|
|
7117
7128
|
}) => {
|
|
7118
|
-
return /* @__PURE__ */ (0,
|
|
7129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7119
7130
|
ConfirmModal,
|
|
7120
7131
|
{
|
|
7121
7132
|
buttonOverwrites,
|
|
7122
7133
|
...restProps,
|
|
7123
|
-
children: inputs.map((inputProps, index) => /* @__PURE__ */ (0,
|
|
7134
|
+
children: inputs.map((inputProps, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Input, { ...inputProps }, `input ${index}`))
|
|
7124
7135
|
}
|
|
7125
7136
|
);
|
|
7126
7137
|
};
|
|
@@ -7128,11 +7139,11 @@ var InputModal = ({
|
|
|
7128
7139
|
// src/components/user-action/Select.tsx
|
|
7129
7140
|
var import_react23 = require("react");
|
|
7130
7141
|
var import_react24 = require("react");
|
|
7131
|
-
var
|
|
7142
|
+
var import_clsx35 = __toESM(require("clsx"));
|
|
7132
7143
|
|
|
7133
7144
|
// src/components/user-action/Menu.tsx
|
|
7134
7145
|
var import_react22 = require("react");
|
|
7135
|
-
var
|
|
7146
|
+
var import_clsx33 = __toESM(require("clsx"));
|
|
7136
7147
|
|
|
7137
7148
|
// src/hooks/useOutsideClick.ts
|
|
7138
7149
|
var import_react21 = require("react");
|
|
@@ -7221,17 +7232,17 @@ var usePopoverPosition = (trigger, options) => {
|
|
|
7221
7232
|
|
|
7222
7233
|
// src/components/user-action/Menu.tsx
|
|
7223
7234
|
var import_react_dom2 = require("react-dom");
|
|
7224
|
-
var
|
|
7235
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
7225
7236
|
var MenuItem = ({
|
|
7226
7237
|
children,
|
|
7227
7238
|
onClick,
|
|
7228
7239
|
alignment = "left",
|
|
7229
7240
|
isDisabled = false,
|
|
7230
7241
|
className
|
|
7231
|
-
}) => /* @__PURE__ */ (0,
|
|
7242
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7232
7243
|
"div",
|
|
7233
7244
|
{
|
|
7234
|
-
className: (0,
|
|
7245
|
+
className: (0, import_clsx33.default)("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold", {
|
|
7235
7246
|
"text-right": alignment === "right",
|
|
7236
7247
|
"text-left": alignment === "left",
|
|
7237
7248
|
"text-disabled-text cursor-not-allowed": isDisabled,
|
|
@@ -7297,14 +7308,14 @@ var Menu = ({
|
|
|
7297
7308
|
setIsHidden(false);
|
|
7298
7309
|
}
|
|
7299
7310
|
}, [isOpen]);
|
|
7300
|
-
return /* @__PURE__ */ (0,
|
|
7311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
7301
7312
|
trigger(bag, triggerRef),
|
|
7302
|
-
(0, import_react_dom2.createPortal)(/* @__PURE__ */ (0,
|
|
7313
|
+
(0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7303
7314
|
"div",
|
|
7304
7315
|
{
|
|
7305
7316
|
ref: menuRef,
|
|
7306
7317
|
onClick: (e) => e.stopPropagation(),
|
|
7307
|
-
className: (0,
|
|
7318
|
+
className: (0, import_clsx33.default)(
|
|
7308
7319
|
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-10",
|
|
7309
7320
|
{
|
|
7310
7321
|
"animate-pop-in": isOpen,
|
|
@@ -7329,8 +7340,8 @@ var Menu = ({
|
|
|
7329
7340
|
|
|
7330
7341
|
// src/components/user-action/SearchBar.tsx
|
|
7331
7342
|
var import_lucide_react10 = require("lucide-react");
|
|
7332
|
-
var
|
|
7333
|
-
var
|
|
7343
|
+
var import_clsx34 = require("clsx");
|
|
7344
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
7334
7345
|
var SearchBar = ({
|
|
7335
7346
|
placeholder,
|
|
7336
7347
|
onSearch,
|
|
@@ -7339,31 +7350,31 @@ var SearchBar = ({
|
|
|
7339
7350
|
...inputProps
|
|
7340
7351
|
}) => {
|
|
7341
7352
|
const translation = useTranslation([formTranslation]);
|
|
7342
|
-
return /* @__PURE__ */ (0,
|
|
7343
|
-
/* @__PURE__ */ (0,
|
|
7353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: (0, import_clsx34.clsx)("flex-row-2 justify-between items-center", containerClassName), children: [
|
|
7354
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7344
7355
|
Input,
|
|
7345
7356
|
{
|
|
7346
7357
|
...inputProps,
|
|
7347
7358
|
placeholder: placeholder ?? translation("search")
|
|
7348
7359
|
}
|
|
7349
7360
|
),
|
|
7350
|
-
onSearch && /* @__PURE__ */ (0,
|
|
7361
|
+
onSearch && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.Search, { className: "w-full h-full" }) })
|
|
7351
7362
|
] });
|
|
7352
7363
|
};
|
|
7353
7364
|
|
|
7354
7365
|
// src/components/user-action/Select.tsx
|
|
7355
|
-
var
|
|
7366
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
7356
7367
|
var SelectTile = ({
|
|
7357
7368
|
className,
|
|
7358
7369
|
disabledClassName,
|
|
7359
7370
|
title,
|
|
7360
7371
|
...restProps
|
|
7361
7372
|
}) => {
|
|
7362
|
-
return /* @__PURE__ */ (0,
|
|
7373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7363
7374
|
Tile,
|
|
7364
7375
|
{
|
|
7365
7376
|
...restProps,
|
|
7366
|
-
className: (0,
|
|
7377
|
+
className: (0, import_clsx35.default)("px-2 py-1 rounded-md", className),
|
|
7367
7378
|
disabledClassName: disabledClassName ?? "text-disabled-text cursor-not-allowed",
|
|
7368
7379
|
title: { ...title, className: title.className ?? "font-semibold" }
|
|
7369
7380
|
}
|
|
@@ -7393,17 +7404,17 @@ var Select = ({
|
|
|
7393
7404
|
searchMapping: (0, import_react23.useCallback)((item) => item.searchTags, []),
|
|
7394
7405
|
...searchOptions
|
|
7395
7406
|
});
|
|
7396
|
-
return /* @__PURE__ */ (0,
|
|
7397
|
-
label && /* @__PURE__ */ (0,
|
|
7398
|
-
/* @__PURE__ */ (0,
|
|
7407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: (0, import_clsx35.default)(className), children: [
|
|
7408
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Label, { ...label, labelType: label.labelType ?? "labelBig", className: (0, import_clsx35.default)("mb-1", label.className) }),
|
|
7409
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7399
7410
|
Menu,
|
|
7400
7411
|
{
|
|
7401
7412
|
...menuProps,
|
|
7402
|
-
trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0,
|
|
7413
|
+
trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
7403
7414
|
"button",
|
|
7404
7415
|
{
|
|
7405
7416
|
ref,
|
|
7406
|
-
className: (0,
|
|
7417
|
+
className: (0, import_clsx35.default)(
|
|
7407
7418
|
"btn-md justify-between w-full border-2",
|
|
7408
7419
|
{
|
|
7409
7420
|
"rounded-b-lg": !open,
|
|
@@ -7415,17 +7426,17 @@ var Select = ({
|
|
|
7415
7426
|
onClick: toggleOpen,
|
|
7416
7427
|
disabled,
|
|
7417
7428
|
children: [
|
|
7418
|
-
!isShowingHint && /* @__PURE__ */ (0,
|
|
7419
|
-
isShowingHint && /* @__PURE__ */ (0,
|
|
7420
|
-
/* @__PURE__ */ (0,
|
|
7429
|
+
!isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? selectedOption?.label }),
|
|
7430
|
+
isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: (0, import_clsx35.default)("textstyle-description", hintTextClassName), children: hintText }),
|
|
7431
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ExpansionIcon, { isExpanded: isOpen })
|
|
7421
7432
|
]
|
|
7422
7433
|
}
|
|
7423
7434
|
),
|
|
7424
|
-
menuClassName: (0,
|
|
7435
|
+
menuClassName: (0, import_clsx35.default)("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
|
|
7425
7436
|
children: (bag) => {
|
|
7426
7437
|
const { close } = bag;
|
|
7427
|
-
return /* @__PURE__ */ (0,
|
|
7428
|
-
!searchOptions?.disabled && /* @__PURE__ */ (0,
|
|
7438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
7439
|
+
!searchOptions?.disabled && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7429
7440
|
SearchBar,
|
|
7430
7441
|
{
|
|
7431
7442
|
value: search,
|
|
@@ -7433,8 +7444,8 @@ var Select = ({
|
|
|
7433
7444
|
autoFocus: true
|
|
7434
7445
|
}
|
|
7435
7446
|
),
|
|
7436
|
-
/* @__PURE__ */ (0,
|
|
7437
|
-
result.map((option, index) => /* @__PURE__ */ (0,
|
|
7447
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
|
|
7448
|
+
result.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7438
7449
|
SelectTile,
|
|
7439
7450
|
{
|
|
7440
7451
|
isSelected: option === selectedOption,
|
|
@@ -7468,7 +7479,7 @@ var SelectUncontrolled = ({
|
|
|
7468
7479
|
setSelected(value);
|
|
7469
7480
|
}
|
|
7470
7481
|
}, [options, value]);
|
|
7471
|
-
return /* @__PURE__ */ (0,
|
|
7482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7472
7483
|
Select,
|
|
7473
7484
|
{
|
|
7474
7485
|
value: selected,
|
|
@@ -7484,7 +7495,7 @@ var SelectUncontrolled = ({
|
|
|
7484
7495
|
};
|
|
7485
7496
|
|
|
7486
7497
|
// src/components/modals/LanguageModal.tsx
|
|
7487
|
-
var
|
|
7498
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
7488
7499
|
var defaultLanguageModalTranslation = {
|
|
7489
7500
|
en: {
|
|
7490
7501
|
language: "Language",
|
|
@@ -7507,7 +7518,7 @@ var LanguageModal = ({
|
|
|
7507
7518
|
}) => {
|
|
7508
7519
|
const { language, setLanguage } = useLanguage();
|
|
7509
7520
|
const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
|
|
7510
|
-
return /* @__PURE__ */ (0,
|
|
7521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7511
7522
|
Modal,
|
|
7512
7523
|
{
|
|
7513
7524
|
headerProps: {
|
|
@@ -7517,8 +7528,8 @@ var LanguageModal = ({
|
|
|
7517
7528
|
},
|
|
7518
7529
|
onClose,
|
|
7519
7530
|
...modalProps,
|
|
7520
|
-
children: /* @__PURE__ */ (0,
|
|
7521
|
-
/* @__PURE__ */ (0,
|
|
7531
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "w-64", children: [
|
|
7532
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7522
7533
|
Select,
|
|
7523
7534
|
{
|
|
7524
7535
|
className: "mt-2",
|
|
@@ -7527,7 +7538,7 @@ var LanguageModal = ({
|
|
|
7527
7538
|
onChange: (language2) => setLanguage(language2)
|
|
7528
7539
|
}
|
|
7529
7540
|
),
|
|
7530
|
-
/* @__PURE__ */ (0,
|
|
7541
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
7531
7542
|
] })
|
|
7532
7543
|
}
|
|
7533
7544
|
);
|
|
@@ -7535,7 +7546,7 @@ var LanguageModal = ({
|
|
|
7535
7546
|
|
|
7536
7547
|
// src/theming/useTheme.tsx
|
|
7537
7548
|
var import_react25 = require("react");
|
|
7538
|
-
var
|
|
7549
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
7539
7550
|
var themes = ["light", "dark"];
|
|
7540
7551
|
var defaultThemeTypeTranslation = {
|
|
7541
7552
|
en: {
|
|
@@ -7574,12 +7585,12 @@ var ThemeProvider = ({ children, initialTheme = "light" }) => {
|
|
|
7574
7585
|
(0, import_react25.useEffect)(() => {
|
|
7575
7586
|
document.documentElement.setAttribute("data-theme", theme);
|
|
7576
7587
|
}, [theme]);
|
|
7577
|
-
return /* @__PURE__ */ (0,
|
|
7588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ThemeContext.Provider, { value: { theme, setTheme }, children });
|
|
7578
7589
|
};
|
|
7579
7590
|
var useTheme = () => (0, import_react25.useContext)(ThemeContext);
|
|
7580
7591
|
|
|
7581
7592
|
// src/components/modals/ThemeModal.tsx
|
|
7582
|
-
var
|
|
7593
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
7583
7594
|
var defaultConfirmDialogTranslation = {
|
|
7584
7595
|
en: {
|
|
7585
7596
|
chooseTheme: "Choose your preferred theme"
|
|
@@ -7596,7 +7607,7 @@ var ThemeModal = ({
|
|
|
7596
7607
|
}) => {
|
|
7597
7608
|
const { theme, setTheme } = useTheme();
|
|
7598
7609
|
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
7599
|
-
return /* @__PURE__ */ (0,
|
|
7610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7600
7611
|
Modal,
|
|
7601
7612
|
{
|
|
7602
7613
|
headerProps: {
|
|
@@ -7606,8 +7617,8 @@ var ThemeModal = ({
|
|
|
7606
7617
|
},
|
|
7607
7618
|
onClose,
|
|
7608
7619
|
...modalProps,
|
|
7609
|
-
children: /* @__PURE__ */ (0,
|
|
7610
|
-
/* @__PURE__ */ (0,
|
|
7620
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "w-64", children: [
|
|
7621
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7611
7622
|
Select,
|
|
7612
7623
|
{
|
|
7613
7624
|
className: "mt-2",
|
|
@@ -7616,7 +7627,7 @@ var ThemeModal = ({
|
|
|
7616
7627
|
onChange: (theme2) => setTheme(theme2)
|
|
7617
7628
|
}
|
|
7618
7629
|
),
|
|
7619
|
-
/* @__PURE__ */ (0,
|
|
7630
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
7620
7631
|
] })
|
|
7621
7632
|
}
|
|
7622
7633
|
);
|
|
@@ -7629,8 +7640,8 @@ var import_lucide_react13 = require("lucide-react");
|
|
|
7629
7640
|
var import_react26 = require("react");
|
|
7630
7641
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
7631
7642
|
var import_lucide_react11 = require("lucide-react");
|
|
7632
|
-
var
|
|
7633
|
-
var
|
|
7643
|
+
var import_clsx36 = __toESM(require("clsx"));
|
|
7644
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
7634
7645
|
var checkboxSizeMapping = {
|
|
7635
7646
|
small: "size-5",
|
|
7636
7647
|
medium: "size-6",
|
|
@@ -7666,27 +7677,27 @@ var Checkbox = ({
|
|
|
7666
7677
|
const newValue = checked === "indeterminate" ? false : !checked;
|
|
7667
7678
|
propagateChange(newValue);
|
|
7668
7679
|
};
|
|
7669
|
-
return /* @__PURE__ */ (0,
|
|
7670
|
-
/* @__PURE__ */ (0,
|
|
7680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: (0, import_clsx36.default)("group flex-row-2 items-center cursor-pointer", containerClassName), onClick: changeValue, children: [
|
|
7681
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7671
7682
|
CheckboxPrimitive.Root,
|
|
7672
7683
|
{
|
|
7673
7684
|
onCheckedChange: propagateChange,
|
|
7674
7685
|
checked,
|
|
7675
7686
|
disabled,
|
|
7676
7687
|
id,
|
|
7677
|
-
className: (0,
|
|
7688
|
+
className: (0, import_clsx36.default)(usedSizeClass, `items-center border-2 rounded outline-none `, {
|
|
7678
7689
|
"text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
|
|
7679
7690
|
"focus:border-primary group-hover:border-primary ": !disabled,
|
|
7680
7691
|
"bg-surface": !disabled && !checked,
|
|
7681
7692
|
"bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
|
|
7682
7693
|
}, className),
|
|
7683
|
-
children: /* @__PURE__ */ (0,
|
|
7684
|
-
checked === true && /* @__PURE__ */ (0,
|
|
7685
|
-
checked === "indeterminate" && /* @__PURE__ */ (0,
|
|
7694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(CheckboxPrimitive.Indicator, { children: [
|
|
7695
|
+
checked === true && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react11.Check, { className: innerIconSize }),
|
|
7696
|
+
checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react11.Minus, { className: innerIconSize })
|
|
7686
7697
|
] })
|
|
7687
7698
|
}
|
|
7688
7699
|
),
|
|
7689
|
-
label && /* @__PURE__ */ (0,
|
|
7700
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Label, { ...label, className: (0, import_clsx36.default)(label.className), htmlFor: id })
|
|
7690
7701
|
] });
|
|
7691
7702
|
};
|
|
7692
7703
|
var CheckboxUncontrolled = ({
|
|
@@ -7705,7 +7716,7 @@ var CheckboxUncontrolled = ({
|
|
|
7705
7716
|
}
|
|
7706
7717
|
setChecked(checked2);
|
|
7707
7718
|
};
|
|
7708
|
-
return /* @__PURE__ */ (0,
|
|
7719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7709
7720
|
Checkbox,
|
|
7710
7721
|
{
|
|
7711
7722
|
...props,
|
|
@@ -7717,8 +7728,8 @@ var CheckboxUncontrolled = ({
|
|
|
7717
7728
|
|
|
7718
7729
|
// src/components/properties/PropertyBase.tsx
|
|
7719
7730
|
var import_lucide_react12 = require("lucide-react");
|
|
7720
|
-
var
|
|
7721
|
-
var
|
|
7731
|
+
var import_clsx37 = __toESM(require("clsx"));
|
|
7732
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
7722
7733
|
var PropertyBase = ({
|
|
7723
7734
|
overwriteTranslation,
|
|
7724
7735
|
name,
|
|
@@ -7732,11 +7743,11 @@ var PropertyBase = ({
|
|
|
7732
7743
|
}) => {
|
|
7733
7744
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7734
7745
|
const requiredAndNoValue = softRequired && !hasValue;
|
|
7735
|
-
return /* @__PURE__ */ (0,
|
|
7736
|
-
/* @__PURE__ */ (0,
|
|
7746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: (0, import_clsx37.default)("flex-row-0 group", className), children: [
|
|
7747
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
7737
7748
|
"div",
|
|
7738
7749
|
{
|
|
7739
|
-
className: (0,
|
|
7750
|
+
className: (0, import_clsx37.default)(
|
|
7740
7751
|
"flex-row-2 max-w-48 min-w-48 px-3 py-2 items-center rounded-l-xl border-2 border-r-0",
|
|
7741
7752
|
{
|
|
7742
7753
|
"bg-property-title-background text-property-title-text group-hover:border-primary": !requiredAndNoValue,
|
|
@@ -7745,15 +7756,15 @@ var PropertyBase = ({
|
|
|
7745
7756
|
className
|
|
7746
7757
|
),
|
|
7747
7758
|
children: [
|
|
7748
|
-
/* @__PURE__ */ (0,
|
|
7749
|
-
/* @__PURE__ */ (0,
|
|
7759
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "max-w-6 min-w-6 text-text-default", children: icon }),
|
|
7760
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-semibold", children: name })
|
|
7750
7761
|
]
|
|
7751
7762
|
}
|
|
7752
7763
|
),
|
|
7753
|
-
/* @__PURE__ */ (0,
|
|
7764
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
7754
7765
|
"div",
|
|
7755
7766
|
{
|
|
7756
|
-
className: (0,
|
|
7767
|
+
className: (0, import_clsx37.default)(
|
|
7757
7768
|
"flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
|
|
7758
7769
|
{
|
|
7759
7770
|
"bg-surface group-hover:border-primary": !requiredAndNoValue,
|
|
@@ -7763,13 +7774,13 @@ var PropertyBase = ({
|
|
|
7763
7774
|
),
|
|
7764
7775
|
children: [
|
|
7765
7776
|
input({ softRequired, hasValue }),
|
|
7766
|
-
requiredAndNoValue && /* @__PURE__ */ (0,
|
|
7767
|
-
onRemove && hasValue && /* @__PURE__ */ (0,
|
|
7777
|
+
requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "text-warning", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react12.AlertTriangle, { size: 24 }) }),
|
|
7778
|
+
onRemove && hasValue && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7768
7779
|
TextButton,
|
|
7769
7780
|
{
|
|
7770
7781
|
onClick: onRemove,
|
|
7771
7782
|
color: "negative",
|
|
7772
|
-
className: (0,
|
|
7783
|
+
className: (0, import_clsx37.default)("items-center", { "!text-transparent": !hasValue || readOnly }),
|
|
7773
7784
|
disabled: !hasValue || readOnly,
|
|
7774
7785
|
children: translation("remove")
|
|
7775
7786
|
}
|
|
@@ -7781,7 +7792,7 @@ var PropertyBase = ({
|
|
|
7781
7792
|
};
|
|
7782
7793
|
|
|
7783
7794
|
// src/components/properties/CheckboxProperty.tsx
|
|
7784
|
-
var
|
|
7795
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
7785
7796
|
var CheckboxProperty = ({
|
|
7786
7797
|
overwriteTranslation,
|
|
7787
7798
|
value,
|
|
@@ -7790,14 +7801,14 @@ var CheckboxProperty = ({
|
|
|
7790
7801
|
...baseProps
|
|
7791
7802
|
}) => {
|
|
7792
7803
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7793
|
-
return /* @__PURE__ */ (0,
|
|
7804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7794
7805
|
PropertyBase,
|
|
7795
7806
|
{
|
|
7796
7807
|
...baseProps,
|
|
7797
7808
|
hasValue: true,
|
|
7798
7809
|
readOnly,
|
|
7799
|
-
icon: /* @__PURE__ */ (0,
|
|
7800
|
-
input: () => /* @__PURE__ */ (0,
|
|
7810
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react13.Check, { size: 24 }),
|
|
7811
|
+
input: () => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7801
7812
|
Checkbox,
|
|
7802
7813
|
{
|
|
7803
7814
|
checked: value ?? true,
|
|
@@ -7813,8 +7824,8 @@ var CheckboxProperty = ({
|
|
|
7813
7824
|
|
|
7814
7825
|
// src/components/properties/DateProperty.tsx
|
|
7815
7826
|
var import_lucide_react14 = require("lucide-react");
|
|
7816
|
-
var
|
|
7817
|
-
var
|
|
7827
|
+
var import_clsx38 = __toESM(require("clsx"));
|
|
7828
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7818
7829
|
var DateProperty = ({
|
|
7819
7830
|
value,
|
|
7820
7831
|
onChange = noop,
|
|
@@ -7825,16 +7836,16 @@ var DateProperty = ({
|
|
|
7825
7836
|
}) => {
|
|
7826
7837
|
const hasValue = !!value;
|
|
7827
7838
|
const dateText = value ? type === "dateTime" ? formatDateTime(value) : formatDate(value) : "";
|
|
7828
|
-
return /* @__PURE__ */ (0,
|
|
7839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7829
7840
|
PropertyBase,
|
|
7830
7841
|
{
|
|
7831
7842
|
...baseProps,
|
|
7832
7843
|
hasValue,
|
|
7833
|
-
icon: /* @__PURE__ */ (0,
|
|
7834
|
-
input: ({ softRequired }) => /* @__PURE__ */ (0,
|
|
7844
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react14.CalendarDays, { size: 24 }),
|
|
7845
|
+
input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7835
7846
|
Input,
|
|
7836
7847
|
{
|
|
7837
|
-
className: (0,
|
|
7848
|
+
className: (0, import_clsx38.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
|
|
7838
7849
|
value: dateText,
|
|
7839
7850
|
type: type === "dateTime" ? "datetime-local" : "date",
|
|
7840
7851
|
readOnly,
|
|
@@ -7856,14 +7867,14 @@ var DateProperty = ({
|
|
|
7856
7867
|
|
|
7857
7868
|
// src/components/properties/MultiSelectProperty.tsx
|
|
7858
7869
|
var import_lucide_react16 = require("lucide-react");
|
|
7859
|
-
var
|
|
7870
|
+
var import_clsx40 = __toESM(require("clsx"));
|
|
7860
7871
|
|
|
7861
7872
|
// src/components/user-action/MultiSelect.tsx
|
|
7862
7873
|
var import_react27 = require("react");
|
|
7863
7874
|
var import_react28 = require("react");
|
|
7864
|
-
var
|
|
7875
|
+
var import_clsx39 = __toESM(require("clsx"));
|
|
7865
7876
|
var import_lucide_react15 = require("lucide-react");
|
|
7866
|
-
var
|
|
7877
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7867
7878
|
var defaultMultiSelectTranslation = {
|
|
7868
7879
|
en: {
|
|
7869
7880
|
selected: `{{amount}} selected`
|
|
@@ -7895,25 +7906,25 @@ var MultiSelect = ({
|
|
|
7895
7906
|
});
|
|
7896
7907
|
const selectedItems = options.filter((value) => value.selected);
|
|
7897
7908
|
const isShowingHint = !selectedDisplayOverwrite && selectedItems.length === 0;
|
|
7898
|
-
return /* @__PURE__ */ (0,
|
|
7899
|
-
label && /* @__PURE__ */ (0,
|
|
7909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: (0, import_clsx39.default)(className), children: [
|
|
7910
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7900
7911
|
Label,
|
|
7901
7912
|
{
|
|
7902
7913
|
...label,
|
|
7903
7914
|
htmlFor: label.name,
|
|
7904
|
-
className: (0,
|
|
7915
|
+
className: (0, import_clsx39.default)(" mb-1", label.className),
|
|
7905
7916
|
labelType: label.labelType ?? "labelBig"
|
|
7906
7917
|
}
|
|
7907
7918
|
),
|
|
7908
|
-
/* @__PURE__ */ (0,
|
|
7919
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7909
7920
|
Menu,
|
|
7910
7921
|
{
|
|
7911
7922
|
...menuProps,
|
|
7912
|
-
trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0,
|
|
7923
|
+
trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7913
7924
|
"button",
|
|
7914
7925
|
{
|
|
7915
7926
|
ref,
|
|
7916
|
-
className: (0,
|
|
7927
|
+
className: (0, import_clsx39.default)(
|
|
7917
7928
|
"btn-md justify-between w-full border-2 h-auto",
|
|
7918
7929
|
{
|
|
7919
7930
|
"min-h-14": useChipDisplay,
|
|
@@ -7924,18 +7935,18 @@ var MultiSelect = ({
|
|
|
7924
7935
|
),
|
|
7925
7936
|
onClick: toggleOpen,
|
|
7926
7937
|
disabled,
|
|
7927
|
-
children: useChipDisplay ? /* @__PURE__ */ (0,
|
|
7928
|
-
!isShowingHint && /* @__PURE__ */ (0,
|
|
7929
|
-
isShowingHint && /* @__PURE__ */ (0,
|
|
7930
|
-
/* @__PURE__ */ (0,
|
|
7938
|
+
children: useChipDisplay ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: isShowingHint ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(IconButton, { disabled, size: "small", color: "neutral", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react15.Plus, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
7939
|
+
!isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
|
|
7940
|
+
isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: (0, import_clsx39.default)("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
|
|
7941
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ExpansionIcon, { isExpanded: isOpen })
|
|
7931
7942
|
] })
|
|
7932
7943
|
}
|
|
7933
7944
|
),
|
|
7934
|
-
menuClassName: (0,
|
|
7945
|
+
menuClassName: (0, import_clsx39.default)("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
|
|
7935
7946
|
children: (bag) => {
|
|
7936
7947
|
const { close } = bag;
|
|
7937
|
-
return /* @__PURE__ */ (0,
|
|
7938
|
-
!searchOptions?.disabled && /* @__PURE__ */ (0,
|
|
7948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
7949
|
+
!searchOptions?.disabled && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7939
7950
|
SearchBar,
|
|
7940
7951
|
{
|
|
7941
7952
|
value: search,
|
|
@@ -7943,7 +7954,7 @@ var MultiSelect = ({
|
|
|
7943
7954
|
autoFocus: true
|
|
7944
7955
|
}
|
|
7945
7956
|
),
|
|
7946
|
-
/* @__PURE__ */ (0,
|
|
7957
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
|
|
7947
7958
|
result.map((option, index) => {
|
|
7948
7959
|
const update = () => {
|
|
7949
7960
|
onChange(options.map((value) => value.value === option.value ? {
|
|
@@ -7951,10 +7962,10 @@ var MultiSelect = ({
|
|
|
7951
7962
|
selected: !value.selected
|
|
7952
7963
|
} : value));
|
|
7953
7964
|
};
|
|
7954
|
-
return /* @__PURE__ */ (0,
|
|
7965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7955
7966
|
SelectTile,
|
|
7956
7967
|
{
|
|
7957
|
-
prefix: /* @__PURE__ */ (0,
|
|
7968
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7958
7969
|
Checkbox,
|
|
7959
7970
|
{
|
|
7960
7971
|
checked: option.selected,
|
|
@@ -7972,9 +7983,9 @@ var MultiSelect = ({
|
|
|
7972
7983
|
}),
|
|
7973
7984
|
additionalItems && additionalItems({ ...bag, search })
|
|
7974
7985
|
] }),
|
|
7975
|
-
/* @__PURE__ */ (0,
|
|
7976
|
-
/* @__PURE__ */ (0,
|
|
7977
|
-
/* @__PURE__ */ (0,
|
|
7986
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex-row-2 justify-between", children: [
|
|
7987
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex-row-2", children: [
|
|
7988
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7978
7989
|
SolidButton,
|
|
7979
7990
|
{
|
|
7980
7991
|
color: "neutral",
|
|
@@ -7989,7 +8000,7 @@ var MultiSelect = ({
|
|
|
7989
8000
|
children: translation("all")
|
|
7990
8001
|
}
|
|
7991
8002
|
),
|
|
7992
|
-
/* @__PURE__ */ (0,
|
|
8003
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7993
8004
|
SolidButton,
|
|
7994
8005
|
{
|
|
7995
8006
|
color: "neutral",
|
|
@@ -8004,7 +8015,7 @@ var MultiSelect = ({
|
|
|
8004
8015
|
}
|
|
8005
8016
|
)
|
|
8006
8017
|
] }),
|
|
8007
|
-
/* @__PURE__ */ (0,
|
|
8018
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SolidButton, { size: "small", onClick: close, children: "Done" })
|
|
8008
8019
|
] })
|
|
8009
8020
|
] });
|
|
8010
8021
|
}
|
|
@@ -8021,7 +8032,7 @@ var MultiSelectUncontrolled = ({
|
|
|
8021
8032
|
(0, import_react28.useEffect)(() => {
|
|
8022
8033
|
setUsedOptions(options);
|
|
8023
8034
|
}, [options]);
|
|
8024
|
-
return /* @__PURE__ */ (0,
|
|
8035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8025
8036
|
MultiSelect,
|
|
8026
8037
|
{
|
|
8027
8038
|
...props,
|
|
@@ -8035,7 +8046,7 @@ var MultiSelectUncontrolled = ({
|
|
|
8035
8046
|
};
|
|
8036
8047
|
|
|
8037
8048
|
// src/components/properties/MultiSelectProperty.tsx
|
|
8038
|
-
var
|
|
8049
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
8039
8050
|
var MultiSelectProperty = ({
|
|
8040
8051
|
overwriteTranslation,
|
|
8041
8052
|
options,
|
|
@@ -8048,7 +8059,7 @@ var MultiSelectProperty = ({
|
|
|
8048
8059
|
}) => {
|
|
8049
8060
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
8050
8061
|
const hasValue = options.some((value) => value.selected);
|
|
8051
|
-
return /* @__PURE__ */ (0,
|
|
8062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8052
8063
|
PropertyBase,
|
|
8053
8064
|
{
|
|
8054
8065
|
name,
|
|
@@ -8056,12 +8067,12 @@ var MultiSelectProperty = ({
|
|
|
8056
8067
|
readOnly,
|
|
8057
8068
|
softRequired,
|
|
8058
8069
|
hasValue,
|
|
8059
|
-
icon: /* @__PURE__ */ (0,
|
|
8060
|
-
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0,
|
|
8070
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react16.List, { size: 24 }),
|
|
8071
|
+
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8061
8072
|
MultiSelect,
|
|
8062
8073
|
{
|
|
8063
8074
|
...multiSelectProps,
|
|
8064
|
-
className: (0,
|
|
8075
|
+
className: (0, import_clsx40.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
|
|
8065
8076
|
options,
|
|
8066
8077
|
disabled: readOnly,
|
|
8067
8078
|
useChipDisplay: true,
|
|
@@ -8074,10 +8085,10 @@ var MultiSelectProperty = ({
|
|
|
8074
8085
|
if (!onAddNew && !search.trim()) {
|
|
8075
8086
|
return void 0;
|
|
8076
8087
|
}
|
|
8077
|
-
return /* @__PURE__ */ (0,
|
|
8088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8078
8089
|
SelectTile,
|
|
8079
8090
|
{
|
|
8080
|
-
prefix: /* @__PURE__ */ (0,
|
|
8091
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react16.Plus, {}),
|
|
8081
8092
|
title: { value: `${translation("add")} ${search.trim()}` },
|
|
8082
8093
|
onClick: () => {
|
|
8083
8094
|
onAddNew(search);
|
|
@@ -8087,7 +8098,7 @@ var MultiSelectProperty = ({
|
|
|
8087
8098
|
}
|
|
8088
8099
|
);
|
|
8089
8100
|
},
|
|
8090
|
-
triggerClassName: (0,
|
|
8101
|
+
triggerClassName: (0, import_clsx40.default)(
|
|
8091
8102
|
"!border-none !p-0 !min-h-10",
|
|
8092
8103
|
{
|
|
8093
8104
|
"!bg-warning !text-surface-warning": softRequired2 && !hasValue,
|
|
@@ -8102,8 +8113,8 @@ var MultiSelectProperty = ({
|
|
|
8102
8113
|
|
|
8103
8114
|
// src/components/properties/NumberProperty.tsx
|
|
8104
8115
|
var import_lucide_react17 = require("lucide-react");
|
|
8105
|
-
var
|
|
8106
|
-
var
|
|
8116
|
+
var import_clsx41 = __toESM(require("clsx"));
|
|
8117
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
8107
8118
|
var defaultNumberPropertyTranslation = {
|
|
8108
8119
|
en: {
|
|
8109
8120
|
value: "Value"
|
|
@@ -8124,23 +8135,23 @@ var NumberProperty = ({
|
|
|
8124
8135
|
}) => {
|
|
8125
8136
|
const translation = useTranslation([defaultNumberPropertyTranslation], overwriteTranslation);
|
|
8126
8137
|
const hasValue = value !== void 0;
|
|
8127
|
-
return /* @__PURE__ */ (0,
|
|
8138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
8128
8139
|
PropertyBase,
|
|
8129
8140
|
{
|
|
8130
8141
|
...baseProps,
|
|
8131
8142
|
onRemove,
|
|
8132
8143
|
hasValue,
|
|
8133
|
-
icon: /* @__PURE__ */ (0,
|
|
8134
|
-
input: ({ softRequired }) => /* @__PURE__ */ (0,
|
|
8144
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react17.Binary, { size: 24 }),
|
|
8145
|
+
input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
8135
8146
|
"div",
|
|
8136
8147
|
{
|
|
8137
|
-
className: (0,
|
|
8148
|
+
className: (0, import_clsx41.default)("flex-row-2 grow", { "text-warning": softRequired && !hasValue }),
|
|
8138
8149
|
children: [
|
|
8139
|
-
/* @__PURE__ */ (0,
|
|
8150
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
8140
8151
|
Input,
|
|
8141
8152
|
{
|
|
8142
8153
|
expanded: false,
|
|
8143
|
-
className: (0,
|
|
8154
|
+
className: (0, import_clsx41.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
|
|
8144
8155
|
value: value?.toString() ?? "",
|
|
8145
8156
|
type: "number",
|
|
8146
8157
|
readOnly,
|
|
@@ -8163,7 +8174,7 @@ var NumberProperty = ({
|
|
|
8163
8174
|
}
|
|
8164
8175
|
}
|
|
8165
8176
|
),
|
|
8166
|
-
suffix && /* @__PURE__ */ (0,
|
|
8177
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: (0, import_clsx41.default)("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
|
|
8167
8178
|
]
|
|
8168
8179
|
}
|
|
8169
8180
|
)
|
|
@@ -8173,8 +8184,8 @@ var NumberProperty = ({
|
|
|
8173
8184
|
|
|
8174
8185
|
// src/components/properties/SelectProperty.tsx
|
|
8175
8186
|
var import_lucide_react18 = require("lucide-react");
|
|
8176
|
-
var
|
|
8177
|
-
var
|
|
8187
|
+
var import_clsx42 = __toESM(require("clsx"));
|
|
8188
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
8178
8189
|
var SingleSelectProperty = ({
|
|
8179
8190
|
overwriteTranslation,
|
|
8180
8191
|
value,
|
|
@@ -8188,7 +8199,7 @@ var SingleSelectProperty = ({
|
|
|
8188
8199
|
}) => {
|
|
8189
8200
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
8190
8201
|
const hasValue = value !== void 0;
|
|
8191
|
-
return /* @__PURE__ */ (0,
|
|
8202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
8192
8203
|
PropertyBase,
|
|
8193
8204
|
{
|
|
8194
8205
|
name,
|
|
@@ -8196,15 +8207,15 @@ var SingleSelectProperty = ({
|
|
|
8196
8207
|
readOnly,
|
|
8197
8208
|
softRequired,
|
|
8198
8209
|
hasValue,
|
|
8199
|
-
icon: /* @__PURE__ */ (0,
|
|
8200
|
-
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0,
|
|
8210
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react18.List, { size: 24 }),
|
|
8211
|
+
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
8201
8212
|
Select,
|
|
8202
8213
|
{
|
|
8203
8214
|
...selectProps,
|
|
8204
8215
|
value,
|
|
8205
8216
|
options,
|
|
8206
8217
|
disabled: readOnly,
|
|
8207
|
-
className: (0,
|
|
8218
|
+
className: (0, import_clsx42.default)("w-full"),
|
|
8208
8219
|
hintText: `${translation("select")}...`,
|
|
8209
8220
|
searchOptions: {
|
|
8210
8221
|
sortingFunction: (a, b) => a.value.localeCompare(b.value),
|
|
@@ -8214,10 +8225,10 @@ var SingleSelectProperty = ({
|
|
|
8214
8225
|
if (!onAddNew && !search.trim()) {
|
|
8215
8226
|
return void 0;
|
|
8216
8227
|
}
|
|
8217
|
-
return /* @__PURE__ */ (0,
|
|
8228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
8218
8229
|
SelectTile,
|
|
8219
8230
|
{
|
|
8220
|
-
prefix: /* @__PURE__ */ (0,
|
|
8231
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react18.Plus, {}),
|
|
8221
8232
|
title: { value: `${translation("add")} ${search.trim()}` },
|
|
8222
8233
|
onClick: () => {
|
|
8223
8234
|
onAddNew(search);
|
|
@@ -8227,7 +8238,7 @@ var SingleSelectProperty = ({
|
|
|
8227
8238
|
}
|
|
8228
8239
|
);
|
|
8229
8240
|
},
|
|
8230
|
-
triggerClassName: (0,
|
|
8241
|
+
triggerClassName: (0, import_clsx42.default)(
|
|
8231
8242
|
"!border-none",
|
|
8232
8243
|
{
|
|
8233
8244
|
"!bg-warning !text-surface-warning": softRequired2 && !hasValue,
|
|
@@ -8243,12 +8254,12 @@ var SingleSelectProperty = ({
|
|
|
8243
8254
|
|
|
8244
8255
|
// src/components/properties/TextProperty.tsx
|
|
8245
8256
|
var import_lucide_react19 = require("lucide-react");
|
|
8246
|
-
var
|
|
8257
|
+
var import_clsx44 = __toESM(require("clsx"));
|
|
8247
8258
|
|
|
8248
8259
|
// src/components/user-action/Textarea.tsx
|
|
8249
8260
|
var import_react29 = require("react");
|
|
8250
|
-
var
|
|
8251
|
-
var
|
|
8261
|
+
var import_clsx43 = __toESM(require("clsx"));
|
|
8262
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
8252
8263
|
var Textarea = ({
|
|
8253
8264
|
label,
|
|
8254
8265
|
headline,
|
|
@@ -8271,20 +8282,20 @@ var Textarea = ({
|
|
|
8271
8282
|
onEditCompleted(text);
|
|
8272
8283
|
clearTimer();
|
|
8273
8284
|
};
|
|
8274
|
-
return /* @__PURE__ */ (0,
|
|
8275
|
-
label && /* @__PURE__ */ (0,
|
|
8285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "w-full", children: [
|
|
8286
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8276
8287
|
Label,
|
|
8277
8288
|
{
|
|
8278
8289
|
...label,
|
|
8279
8290
|
htmlFor: id,
|
|
8280
|
-
className: (0,
|
|
8291
|
+
className: (0, import_clsx43.default)("mb-1", label.className),
|
|
8281
8292
|
labelType: label.labelType ?? "labelSmall"
|
|
8282
8293
|
}
|
|
8283
8294
|
),
|
|
8284
|
-
/* @__PURE__ */ (0,
|
|
8295
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
8285
8296
|
"div",
|
|
8286
8297
|
{
|
|
8287
|
-
className: (0,
|
|
8298
|
+
className: (0, import_clsx43.default)(
|
|
8288
8299
|
"bg-surface text-on-surface relative",
|
|
8289
8300
|
{
|
|
8290
8301
|
"shadow border-2 rounded-lg": defaultStyle,
|
|
@@ -8293,12 +8304,12 @@ var Textarea = ({
|
|
|
8293
8304
|
}
|
|
8294
8305
|
),
|
|
8295
8306
|
children: [
|
|
8296
|
-
headline && /* @__PURE__ */ (0,
|
|
8297
|
-
/* @__PURE__ */ (0,
|
|
8307
|
+
headline && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
|
|
8308
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8298
8309
|
"textarea",
|
|
8299
8310
|
{
|
|
8300
8311
|
id,
|
|
8301
|
-
className: (0,
|
|
8312
|
+
className: (0, import_clsx43.default)("pt-0 px-3 border-transparent appearance-none w-full leading-tight focus:ring-0 focus:outline-none", {
|
|
8302
8313
|
"resize-none": !resizable,
|
|
8303
8314
|
"h-32": defaultStyle,
|
|
8304
8315
|
"mt-3": !headline,
|
|
@@ -8327,7 +8338,7 @@ var Textarea = ({
|
|
|
8327
8338
|
]
|
|
8328
8339
|
}
|
|
8329
8340
|
),
|
|
8330
|
-
hasFocus && disclaimer && /* @__PURE__ */ (0,
|
|
8341
|
+
hasFocus && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("label", { className: "text-negative", children: disclaimer })
|
|
8331
8342
|
] });
|
|
8332
8343
|
};
|
|
8333
8344
|
var TextareaUncontrolled = ({
|
|
@@ -8339,7 +8350,7 @@ var TextareaUncontrolled = ({
|
|
|
8339
8350
|
(0, import_react29.useEffect)(() => {
|
|
8340
8351
|
setText(value);
|
|
8341
8352
|
}, [value]);
|
|
8342
|
-
return /* @__PURE__ */ (0,
|
|
8353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8343
8354
|
Textarea,
|
|
8344
8355
|
{
|
|
8345
8356
|
...props,
|
|
@@ -8353,7 +8364,7 @@ var TextareaUncontrolled = ({
|
|
|
8353
8364
|
};
|
|
8354
8365
|
|
|
8355
8366
|
// src/components/properties/TextProperty.tsx
|
|
8356
|
-
var
|
|
8367
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
8357
8368
|
var defaultTextPropertyTranslation = {
|
|
8358
8369
|
en: {
|
|
8359
8370
|
text: "Text"
|
|
@@ -8373,17 +8384,17 @@ var TextProperty = ({
|
|
|
8373
8384
|
}) => {
|
|
8374
8385
|
const translation = useTranslation([defaultTextPropertyTranslation], overwriteTranslation);
|
|
8375
8386
|
const hasValue = value !== void 0;
|
|
8376
|
-
return /* @__PURE__ */ (0,
|
|
8387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
8377
8388
|
PropertyBase,
|
|
8378
8389
|
{
|
|
8379
8390
|
...baseProps,
|
|
8380
8391
|
onRemove,
|
|
8381
8392
|
hasValue,
|
|
8382
|
-
icon: /* @__PURE__ */ (0,
|
|
8383
|
-
input: ({ softRequired }) => /* @__PURE__ */ (0,
|
|
8393
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react19.Text, { size: 24 }),
|
|
8394
|
+
input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
8384
8395
|
Textarea,
|
|
8385
8396
|
{
|
|
8386
|
-
className: (0,
|
|
8397
|
+
className: (0, import_clsx44.default)("ring-0 border-0 outline-0 !px-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
|
|
8387
8398
|
rows: 5,
|
|
8388
8399
|
defaultStyle: false,
|
|
8389
8400
|
value: value ?? "",
|
|
@@ -8410,12 +8421,12 @@ var TextProperty = ({
|
|
|
8410
8421
|
};
|
|
8411
8422
|
|
|
8412
8423
|
// src/components/table/FillerRowElement.tsx
|
|
8413
|
-
var
|
|
8414
|
-
var
|
|
8424
|
+
var import_clsx45 = require("clsx");
|
|
8425
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
8415
8426
|
var FillerRowElement = ({
|
|
8416
8427
|
className
|
|
8417
8428
|
}) => {
|
|
8418
|
-
return /* @__PURE__ */ (0,
|
|
8429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: (0, import_clsx45.clsx)("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
|
|
8419
8430
|
};
|
|
8420
8431
|
|
|
8421
8432
|
// src/components/table/Filter.ts
|
|
@@ -8434,14 +8445,14 @@ var TableFilters = {
|
|
|
8434
8445
|
|
|
8435
8446
|
// src/components/table/Table.tsx
|
|
8436
8447
|
var import_react32 = require("react");
|
|
8437
|
-
var
|
|
8448
|
+
var import_clsx48 = __toESM(require("clsx"));
|
|
8438
8449
|
var import_react_table = require("@tanstack/react-table");
|
|
8439
8450
|
var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
|
|
8440
8451
|
|
|
8441
8452
|
// src/components/table/TableFilterButton.tsx
|
|
8442
8453
|
var import_lucide_react20 = require("lucide-react");
|
|
8443
8454
|
var import_react30 = require("react");
|
|
8444
|
-
var
|
|
8455
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
8445
8456
|
var defaultTableFilterTranslation = {
|
|
8446
8457
|
en: {
|
|
8447
8458
|
filter: "Filter",
|
|
@@ -8471,12 +8482,12 @@ var TableFilterButton = ({
|
|
|
8471
8482
|
(0, import_react30.useEffect)(() => {
|
|
8472
8483
|
setFilterValue(columnFilterValue);
|
|
8473
8484
|
}, [columnFilterValue]);
|
|
8474
|
-
return /* @__PURE__ */ (0,
|
|
8485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8475
8486
|
Menu,
|
|
8476
8487
|
{
|
|
8477
|
-
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0,
|
|
8478
|
-
/* @__PURE__ */ (0,
|
|
8479
|
-
hasFilter && /* @__PURE__ */ (0,
|
|
8488
|
+
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { ref, className: "relative", children: [
|
|
8489
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react20.FilterIcon, {}) }),
|
|
8490
|
+
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8480
8491
|
"div",
|
|
8481
8492
|
{
|
|
8482
8493
|
className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
|
|
@@ -8484,9 +8495,9 @@ var TableFilterButton = ({
|
|
|
8484
8495
|
}
|
|
8485
8496
|
)
|
|
8486
8497
|
] }),
|
|
8487
|
-
children: ({ close }) => /* @__PURE__ */ (0,
|
|
8488
|
-
/* @__PURE__ */ (0,
|
|
8489
|
-
filterType === "text" && /* @__PURE__ */ (0,
|
|
8498
|
+
children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
|
|
8499
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "textstyle-title-sm", children: translation("filter") }),
|
|
8500
|
+
filterType === "text" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8490
8501
|
Input,
|
|
8491
8502
|
{
|
|
8492
8503
|
value: filterValue ?? "",
|
|
@@ -8496,8 +8507,8 @@ var TableFilterButton = ({
|
|
|
8496
8507
|
className: "h-10"
|
|
8497
8508
|
}
|
|
8498
8509
|
),
|
|
8499
|
-
filterType === "range" && /* @__PURE__ */ (0,
|
|
8500
|
-
/* @__PURE__ */ (0,
|
|
8510
|
+
filterType === "range" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-row-2 items-center", children: [
|
|
8511
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8501
8512
|
Input,
|
|
8502
8513
|
{
|
|
8503
8514
|
value: filterValue?.[0] ?? "",
|
|
@@ -8510,8 +8521,8 @@ var TableFilterButton = ({
|
|
|
8510
8521
|
className: "h-10 input-indicator-hidden w-40"
|
|
8511
8522
|
}
|
|
8512
8523
|
),
|
|
8513
|
-
/* @__PURE__ */ (0,
|
|
8514
|
-
/* @__PURE__ */ (0,
|
|
8524
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "font-bold", children: "-" }),
|
|
8525
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8515
8526
|
Input,
|
|
8516
8527
|
{
|
|
8517
8528
|
value: filterValue?.[1] ?? "",
|
|
@@ -8525,8 +8536,8 @@ var TableFilterButton = ({
|
|
|
8525
8536
|
}
|
|
8526
8537
|
)
|
|
8527
8538
|
] }),
|
|
8528
|
-
filterType === "dateRange" && /* @__PURE__ */ (0,
|
|
8529
|
-
/* @__PURE__ */ (0,
|
|
8539
|
+
filterType === "dateRange" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
8540
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8530
8541
|
Input,
|
|
8531
8542
|
{
|
|
8532
8543
|
value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
|
|
@@ -8539,7 +8550,7 @@ var TableFilterButton = ({
|
|
|
8539
8550
|
className: "h-10 w-50"
|
|
8540
8551
|
}
|
|
8541
8552
|
),
|
|
8542
|
-
/* @__PURE__ */ (0,
|
|
8553
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8543
8554
|
Input,
|
|
8544
8555
|
{
|
|
8545
8556
|
value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
|
|
@@ -8553,12 +8564,12 @@ var TableFilterButton = ({
|
|
|
8553
8564
|
}
|
|
8554
8565
|
)
|
|
8555
8566
|
] }),
|
|
8556
|
-
/* @__PURE__ */ (0,
|
|
8557
|
-
hasFilter && /* @__PURE__ */ (0,
|
|
8567
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
|
|
8568
|
+
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SolidButton, { color: "negative", size: "small", onClick: () => {
|
|
8558
8569
|
column.setFilterValue(void 0);
|
|
8559
8570
|
close();
|
|
8560
8571
|
}, children: translation("remove") }),
|
|
8561
|
-
/* @__PURE__ */ (0,
|
|
8572
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SolidButton, { size: "small", onClick: () => {
|
|
8562
8573
|
column.setFilterValue(filterValue);
|
|
8563
8574
|
close();
|
|
8564
8575
|
}, children: translation("apply") })
|
|
@@ -8570,8 +8581,8 @@ var TableFilterButton = ({
|
|
|
8570
8581
|
|
|
8571
8582
|
// src/components/table/TableSortButton.tsx
|
|
8572
8583
|
var import_lucide_react21 = require("lucide-react");
|
|
8573
|
-
var
|
|
8574
|
-
var
|
|
8584
|
+
var import_clsx46 = __toESM(require("clsx"));
|
|
8585
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
8575
8586
|
var TableSortButton = ({
|
|
8576
8587
|
sortDirection,
|
|
8577
8588
|
invert = false,
|
|
@@ -8579,20 +8590,20 @@ var TableSortButton = ({
|
|
|
8579
8590
|
className,
|
|
8580
8591
|
...buttonProps
|
|
8581
8592
|
}) => {
|
|
8582
|
-
let icon = /* @__PURE__ */ (0,
|
|
8593
|
+
let icon = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react21.ChevronsUpDown, { className: "w-full h-full" });
|
|
8583
8594
|
if (sortDirection) {
|
|
8584
8595
|
let usedSortDirection = sortDirection;
|
|
8585
8596
|
if (invert) {
|
|
8586
8597
|
usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
|
|
8587
8598
|
}
|
|
8588
|
-
icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0,
|
|
8599
|
+
icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react21.ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react21.ChevronDown, { className: "w-full h-full" });
|
|
8589
8600
|
}
|
|
8590
|
-
return /* @__PURE__ */ (0,
|
|
8601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
8591
8602
|
IconButton,
|
|
8592
8603
|
{
|
|
8593
8604
|
size: "tiny",
|
|
8594
8605
|
color,
|
|
8595
|
-
className: (0,
|
|
8606
|
+
className: (0, import_clsx46.default)(className),
|
|
8596
8607
|
...buttonProps,
|
|
8597
8608
|
children: icon
|
|
8598
8609
|
}
|
|
@@ -8611,17 +8622,17 @@ var useResizeCallbackWrapper = (callback) => {
|
|
|
8611
8622
|
};
|
|
8612
8623
|
|
|
8613
8624
|
// src/components/table/TableCell.tsx
|
|
8614
|
-
var
|
|
8615
|
-
var
|
|
8625
|
+
var import_clsx47 = require("clsx");
|
|
8626
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
8616
8627
|
var TableCell = ({
|
|
8617
8628
|
children,
|
|
8618
8629
|
className
|
|
8619
8630
|
}) => {
|
|
8620
|
-
return /* @__PURE__ */ (0,
|
|
8631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: (0, import_clsx47.clsx)("block max-w-full overflow-ellipsis truncate", className), children });
|
|
8621
8632
|
};
|
|
8622
8633
|
|
|
8623
8634
|
// src/components/table/Table.tsx
|
|
8624
|
-
var
|
|
8635
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
8625
8636
|
var Table = ({
|
|
8626
8637
|
data,
|
|
8627
8638
|
fillerRow,
|
|
@@ -8740,7 +8751,7 @@ var Table = ({
|
|
|
8740
8751
|
minSize: 60,
|
|
8741
8752
|
maxSize: 700,
|
|
8742
8753
|
cell: ({ cell }) => {
|
|
8743
|
-
return /* @__PURE__ */ (0,
|
|
8754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TableCell, { children: cell.getValue() });
|
|
8744
8755
|
},
|
|
8745
8756
|
...defaultColumn
|
|
8746
8757
|
},
|
|
@@ -8825,24 +8836,24 @@ var Table = ({
|
|
|
8825
8836
|
}
|
|
8826
8837
|
return colSizes;
|
|
8827
8838
|
}, [table.getState().columnSizingInfo, table.getState().columnSizing]);
|
|
8828
|
-
return /* @__PURE__ */ (0,
|
|
8829
|
-
/* @__PURE__ */ (0,
|
|
8839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { ref, className: (0, import_clsx48.default)("flex-col-4", className), children: [
|
|
8840
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8830
8841
|
import_react_custom_scrollbars_23.Scrollbars,
|
|
8831
8842
|
{
|
|
8832
8843
|
autoHeight: true,
|
|
8833
8844
|
autoHeightMax: tableRef.current?.offsetHeight + 2,
|
|
8834
8845
|
autoHide: true,
|
|
8835
|
-
children: /* @__PURE__ */ (0,
|
|
8846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8836
8847
|
"table",
|
|
8837
8848
|
{
|
|
8838
8849
|
ref: tableRef,
|
|
8839
|
-
className: (0,
|
|
8850
|
+
className: (0, import_clsx48.default)(tableClassName),
|
|
8840
8851
|
style: {
|
|
8841
8852
|
...columnSizeVars,
|
|
8842
8853
|
width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
|
|
8843
8854
|
},
|
|
8844
8855
|
children: [
|
|
8845
|
-
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0,
|
|
8856
|
+
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8846
8857
|
"col",
|
|
8847
8858
|
{
|
|
8848
8859
|
style: {
|
|
@@ -8853,22 +8864,22 @@ var Table = ({
|
|
|
8853
8864
|
},
|
|
8854
8865
|
header.id
|
|
8855
8866
|
)) }, headerGroup.id)),
|
|
8856
|
-
/* @__PURE__ */ (0,
|
|
8857
|
-
return /* @__PURE__ */ (0,
|
|
8867
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
|
|
8868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8858
8869
|
"th",
|
|
8859
8870
|
{
|
|
8860
8871
|
colSpan: header.colSpan,
|
|
8861
|
-
className: (0,
|
|
8872
|
+
className: (0, import_clsx48.default)("relative group", header.column.columnDef.meta?.className),
|
|
8862
8873
|
children: [
|
|
8863
|
-
/* @__PURE__ */ (0,
|
|
8864
|
-
header.column.getCanSort() && /* @__PURE__ */ (0,
|
|
8874
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-row-1 items-center", children: [
|
|
8875
|
+
header.column.getCanSort() && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8865
8876
|
TableSortButton,
|
|
8866
8877
|
{
|
|
8867
8878
|
sortDirection: header.column.getIsSorted(),
|
|
8868
8879
|
onClick: () => header.column.toggleSorting()
|
|
8869
8880
|
}
|
|
8870
8881
|
),
|
|
8871
|
-
header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ (0,
|
|
8882
|
+
header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8872
8883
|
TableFilterButton,
|
|
8873
8884
|
{
|
|
8874
8885
|
column: header.column,
|
|
@@ -8880,7 +8891,7 @@ var Table = ({
|
|
|
8880
8891
|
header.getContext()
|
|
8881
8892
|
)
|
|
8882
8893
|
] }) }),
|
|
8883
|
-
header.column.getCanResize() && /* @__PURE__ */ (0,
|
|
8894
|
+
header.column.getCanResize() && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8884
8895
|
"div",
|
|
8885
8896
|
{
|
|
8886
8897
|
onMouseDown: header.getResizeHandler(),
|
|
@@ -8899,18 +8910,18 @@ var Table = ({
|
|
|
8899
8910
|
header.id
|
|
8900
8911
|
);
|
|
8901
8912
|
}) }, headerGroup.id)) }),
|
|
8902
|
-
/* @__PURE__ */ (0,
|
|
8913
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("tbody", { children: [
|
|
8903
8914
|
table.getRowModel().rows.map((row) => {
|
|
8904
|
-
return /* @__PURE__ */ (0,
|
|
8905
|
-
return /* @__PURE__ */ (0,
|
|
8915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
|
|
8916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { children: (0, import_react_table.flexRender)(
|
|
8906
8917
|
cell.column.columnDef.cell,
|
|
8907
8918
|
cell.getContext()
|
|
8908
8919
|
) }, cell.id);
|
|
8909
8920
|
}) }, row.id);
|
|
8910
8921
|
}),
|
|
8911
8922
|
range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
|
|
8912
|
-
return /* @__PURE__ */ (0,
|
|
8913
|
-
return /* @__PURE__ */ (0,
|
|
8923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { children: columns.map((column) => {
|
|
8924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(FillerRowElement, {}) }, column.id);
|
|
8914
8925
|
}) }, "filler-row-" + index);
|
|
8915
8926
|
})
|
|
8916
8927
|
] })
|
|
@@ -8919,7 +8930,7 @@ var Table = ({
|
|
|
8919
8930
|
)
|
|
8920
8931
|
}
|
|
8921
8932
|
),
|
|
8922
|
-
/* @__PURE__ */ (0,
|
|
8933
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8923
8934
|
Pagination,
|
|
8924
8935
|
{
|
|
8925
8936
|
pageIndex: table.getState().pagination.pageIndex,
|
|
@@ -8934,7 +8945,7 @@ var TableUncontrolled = ({ data, ...props }) => {
|
|
|
8934
8945
|
(0, import_react32.useEffect)(() => {
|
|
8935
8946
|
setUsedData(data);
|
|
8936
8947
|
}, [data]);
|
|
8937
|
-
return /* @__PURE__ */ (0,
|
|
8948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8938
8949
|
Table,
|
|
8939
8950
|
{
|
|
8940
8951
|
...props,
|
|
@@ -8958,7 +8969,7 @@ var TableWithSelection = ({
|
|
|
8958
8969
|
{
|
|
8959
8970
|
id: selectionRowId,
|
|
8960
8971
|
header: ({ table }) => {
|
|
8961
|
-
return /* @__PURE__ */ (0,
|
|
8972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8962
8973
|
Checkbox,
|
|
8963
8974
|
{
|
|
8964
8975
|
checked: table.getIsSomeRowsSelected() ? "indeterminate" : table.getIsAllRowsSelected(),
|
|
@@ -8971,7 +8982,7 @@ var TableWithSelection = ({
|
|
|
8971
8982
|
);
|
|
8972
8983
|
},
|
|
8973
8984
|
cell: ({ row }) => {
|
|
8974
|
-
return /* @__PURE__ */ (0,
|
|
8985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8975
8986
|
Checkbox,
|
|
8976
8987
|
{
|
|
8977
8988
|
disabled: !row.getCanSelect(),
|
|
@@ -8990,15 +9001,15 @@ var TableWithSelection = ({
|
|
|
8990
9001
|
...columns
|
|
8991
9002
|
];
|
|
8992
9003
|
}, [columns, selectionRowId]);
|
|
8993
|
-
return /* @__PURE__ */ (0,
|
|
9004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8994
9005
|
Table,
|
|
8995
9006
|
{
|
|
8996
9007
|
columns: columnsWithSelection,
|
|
8997
9008
|
fillerRow: (columnId, table) => {
|
|
8998
9009
|
if (columnId === selectionRowId) {
|
|
8999
|
-
return /* @__PURE__ */ (0,
|
|
9010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Checkbox, { checked: false, disabled: true, containerClassName: "max-w-6" });
|
|
9000
9011
|
}
|
|
9001
|
-
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ (0,
|
|
9012
|
+
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(FillerRowElement, {});
|
|
9002
9013
|
},
|
|
9003
9014
|
state: {
|
|
9004
9015
|
rowSelection,
|
|
@@ -9012,7 +9023,7 @@ var TableWithSelection = ({
|
|
|
9012
9023
|
},
|
|
9013
9024
|
meta: {
|
|
9014
9025
|
...meta,
|
|
9015
|
-
bodyRowClassName: (0,
|
|
9026
|
+
bodyRowClassName: (0, import_clsx48.default)(
|
|
9016
9027
|
{ "cursor-pointer": !disableClickRowClickSelection },
|
|
9017
9028
|
meta?.bodyRowClassName
|
|
9018
9029
|
)
|
|
@@ -9024,7 +9035,7 @@ var TableWithSelection = ({
|
|
|
9024
9035
|
|
|
9025
9036
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
9026
9037
|
var import_react33 = require("react");
|
|
9027
|
-
var
|
|
9038
|
+
var import_clsx49 = require("clsx");
|
|
9028
9039
|
|
|
9029
9040
|
// src/util/writeToClipboard.ts
|
|
9030
9041
|
var writeToClipboard = (text) => {
|
|
@@ -9033,7 +9044,7 @@ var writeToClipboard = (text) => {
|
|
|
9033
9044
|
|
|
9034
9045
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
9035
9046
|
var import_lucide_react22 = require("lucide-react");
|
|
9036
|
-
var
|
|
9047
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
9037
9048
|
var CopyToClipboardWrapper = ({
|
|
9038
9049
|
children,
|
|
9039
9050
|
textToCopy,
|
|
@@ -9064,10 +9075,10 @@ var CopyToClipboardWrapper = ({
|
|
|
9064
9075
|
left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
|
|
9065
9076
|
right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
|
|
9066
9077
|
};
|
|
9067
|
-
return /* @__PURE__ */ (0,
|
|
9078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
9068
9079
|
"div",
|
|
9069
9080
|
{
|
|
9070
|
-
className: (0,
|
|
9081
|
+
className: (0, import_clsx49.clsx)("relative inline-block cursor-copy", containerClassName),
|
|
9071
9082
|
onMouseEnter: () => {
|
|
9072
9083
|
setIsShowingIndication(true);
|
|
9073
9084
|
},
|
|
@@ -9082,10 +9093,10 @@ var CopyToClipboardWrapper = ({
|
|
|
9082
9093
|
},
|
|
9083
9094
|
children: [
|
|
9084
9095
|
children,
|
|
9085
|
-
/* @__PURE__ */ (0,
|
|
9096
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
9086
9097
|
"div",
|
|
9087
9098
|
{
|
|
9088
|
-
className: (0,
|
|
9099
|
+
className: (0, import_clsx49.clsx)(
|
|
9089
9100
|
`absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
|
|
9090
9101
|
shadow-around-md bg-tooltip-background cursor-default pointer-events-none`,
|
|
9091
9102
|
"transition-opacity duration-200",
|
|
@@ -9097,18 +9108,18 @@ var CopyToClipboardWrapper = ({
|
|
|
9097
9108
|
opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
|
|
9098
9109
|
},
|
|
9099
9110
|
children: [
|
|
9100
|
-
isShowingConfirmation && /* @__PURE__ */ (0,
|
|
9101
|
-
/* @__PURE__ */ (0,
|
|
9111
|
+
isShowingConfirmation && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-1", children: [
|
|
9112
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.CheckIcon, { size: 16, className: "text-positive" }),
|
|
9102
9113
|
translation("copied")
|
|
9103
9114
|
] }),
|
|
9104
|
-
isShowingIndication && /* @__PURE__ */ (0,
|
|
9105
|
-
/* @__PURE__ */ (0,
|
|
9115
|
+
isShowingIndication && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-1 text-description", children: [
|
|
9116
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.Copy, { size: 16 }),
|
|
9106
9117
|
translation("clickToCopy")
|
|
9107
9118
|
] }),
|
|
9108
|
-
/* @__PURE__ */ (0,
|
|
9119
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
9109
9120
|
"div",
|
|
9110
9121
|
{
|
|
9111
|
-
className: (0,
|
|
9122
|
+
className: (0, import_clsx49.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
|
|
9112
9123
|
style: { ...triangleStyle[position], zIndex: zIndex + 1 }
|
|
9113
9124
|
}
|
|
9114
9125
|
)
|
|
@@ -9121,8 +9132,8 @@ var CopyToClipboardWrapper = ({
|
|
|
9121
9132
|
};
|
|
9122
9133
|
|
|
9123
9134
|
// src/components/user-action/DateAndTimePicker.tsx
|
|
9124
|
-
var
|
|
9125
|
-
var
|
|
9135
|
+
var import_clsx50 = __toESM(require("clsx"));
|
|
9136
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
9126
9137
|
var DateTimePicker = ({
|
|
9127
9138
|
overwriteTranslation,
|
|
9128
9139
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -9141,7 +9152,7 @@ var DateTimePicker = ({
|
|
|
9141
9152
|
let dateDisplay;
|
|
9142
9153
|
let timeDisplay;
|
|
9143
9154
|
if (useDate) {
|
|
9144
|
-
dateDisplay = /* @__PURE__ */ (0,
|
|
9155
|
+
dateDisplay = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
9145
9156
|
DatePicker,
|
|
9146
9157
|
{
|
|
9147
9158
|
...datePickerProps,
|
|
@@ -9155,25 +9166,25 @@ var DateTimePicker = ({
|
|
|
9155
9166
|
);
|
|
9156
9167
|
}
|
|
9157
9168
|
if (useTime) {
|
|
9158
|
-
timeDisplay = /* @__PURE__ */ (0,
|
|
9169
|
+
timeDisplay = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
9159
9170
|
TimePicker,
|
|
9160
9171
|
{
|
|
9161
9172
|
...timePickerProps,
|
|
9162
|
-
className: (0,
|
|
9173
|
+
className: (0, import_clsx50.default)("h-full", { "justify-between w-full": mode === "time" }),
|
|
9163
9174
|
maxHeight: 250,
|
|
9164
9175
|
time: value,
|
|
9165
9176
|
onChange
|
|
9166
9177
|
}
|
|
9167
9178
|
);
|
|
9168
9179
|
}
|
|
9169
|
-
return /* @__PURE__ */ (0,
|
|
9170
|
-
/* @__PURE__ */ (0,
|
|
9180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex-col-2 w-fit", children: [
|
|
9181
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex-row-4", children: [
|
|
9171
9182
|
dateDisplay,
|
|
9172
9183
|
timeDisplay
|
|
9173
9184
|
] }),
|
|
9174
|
-
/* @__PURE__ */ (0,
|
|
9175
|
-
/* @__PURE__ */ (0,
|
|
9176
|
-
/* @__PURE__ */ (0,
|
|
9185
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex-row-2 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex-row-2 mt-1", children: [
|
|
9186
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
|
|
9187
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
9177
9188
|
SolidButton,
|
|
9178
9189
|
{
|
|
9179
9190
|
size: "medium",
|
|
@@ -9187,8 +9198,8 @@ var DateTimePicker = ({
|
|
|
9187
9198
|
|
|
9188
9199
|
// src/components/user-action/ScrollPicker.tsx
|
|
9189
9200
|
var import_react34 = require("react");
|
|
9190
|
-
var
|
|
9191
|
-
var
|
|
9201
|
+
var import_clsx51 = __toESM(require("clsx"));
|
|
9202
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
9192
9203
|
var up = 1;
|
|
9193
9204
|
var down = -1;
|
|
9194
9205
|
var ScrollPicker = ({
|
|
@@ -9327,7 +9338,7 @@ var ScrollPicker = ({
|
|
|
9327
9338
|
}
|
|
9328
9339
|
return clamp(1 - opacityValue / max);
|
|
9329
9340
|
};
|
|
9330
|
-
return /* @__PURE__ */ (0,
|
|
9341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
9331
9342
|
"div",
|
|
9332
9343
|
{
|
|
9333
9344
|
className: "relative overflow-hidden",
|
|
@@ -9337,15 +9348,15 @@ var ScrollPicker = ({
|
|
|
9337
9348
|
setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + event.deltaY }));
|
|
9338
9349
|
}
|
|
9339
9350
|
},
|
|
9340
|
-
children: /* @__PURE__ */ (0,
|
|
9341
|
-
/* @__PURE__ */ (0,
|
|
9351
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
|
|
9352
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
9342
9353
|
"div",
|
|
9343
9354
|
{
|
|
9344
9355
|
className: "absolute z-[1] top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2 w-full min-w-[40px] border border-divider/30 border-y-2 border-x-0 ",
|
|
9345
9356
|
style: { height: `${itemHeight}px` }
|
|
9346
9357
|
}
|
|
9347
9358
|
),
|
|
9348
|
-
/* @__PURE__ */ (0,
|
|
9359
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
9349
9360
|
"div",
|
|
9350
9361
|
{
|
|
9351
9362
|
className: "flex-col-2 select-none",
|
|
@@ -9353,10 +9364,10 @@ var ScrollPicker = ({
|
|
|
9353
9364
|
transform: `translateY(${-transition * (distance + itemHeight)}px)`,
|
|
9354
9365
|
columnGap: `${distance}px`
|
|
9355
9366
|
},
|
|
9356
|
-
children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ (0,
|
|
9367
|
+
children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
9357
9368
|
"div",
|
|
9358
9369
|
{
|
|
9359
|
-
className: (0,
|
|
9370
|
+
className: (0, import_clsx51.default)(
|
|
9360
9371
|
`flex-col-2 items-center justify-center rounded-md`,
|
|
9361
9372
|
{
|
|
9362
9373
|
"text-primary font-bold": currentIndex === index,
|
|
@@ -9385,8 +9396,8 @@ var ScrollPicker = ({
|
|
|
9385
9396
|
// src/components/user-action/ToggleableInput.tsx
|
|
9386
9397
|
var import_react35 = require("react");
|
|
9387
9398
|
var import_lucide_react23 = require("lucide-react");
|
|
9388
|
-
var
|
|
9389
|
-
var
|
|
9399
|
+
var import_clsx52 = __toESM(require("clsx"));
|
|
9400
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
9390
9401
|
var ToggleableInput = ({
|
|
9391
9402
|
type = "text",
|
|
9392
9403
|
value,
|
|
@@ -9413,14 +9424,14 @@ var ToggleableInput = ({
|
|
|
9413
9424
|
ref.current?.focus();
|
|
9414
9425
|
}
|
|
9415
9426
|
}, [isEditing]);
|
|
9416
|
-
return /* @__PURE__ */ (0,
|
|
9417
|
-
/* @__PURE__ */ (0,
|
|
9427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { children: [
|
|
9428
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
9418
9429
|
"div",
|
|
9419
9430
|
{
|
|
9420
|
-
className: (0,
|
|
9431
|
+
className: (0, import_clsx52.default)("flex-row-2 items-center w-full overflow-hidden", { "cursor-pointer": !isEditing }),
|
|
9421
9432
|
onClick: () => !isEditing ? setIsEditing(!isEditing) : void 0,
|
|
9422
9433
|
children: [
|
|
9423
|
-
/* @__PURE__ */ (0,
|
|
9434
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: (0, import_clsx52.default)("flex-row-2 overflow-hidden", { "flex-1": isEditing }), children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
9424
9435
|
"input",
|
|
9425
9436
|
{
|
|
9426
9437
|
ref,
|
|
@@ -9448,16 +9459,16 @@ var ToggleableInput = ({
|
|
|
9448
9459
|
onEditCompletedWrapper(value);
|
|
9449
9460
|
}
|
|
9450
9461
|
},
|
|
9451
|
-
className: (0,
|
|
9462
|
+
className: (0, import_clsx52.default)(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {
|
|
9452
9463
|
underline: isEditing
|
|
9453
9464
|
}, labelClassName),
|
|
9454
9465
|
onFocus: (event) => event.target.select()
|
|
9455
9466
|
}
|
|
9456
|
-
) : /* @__PURE__ */ (0,
|
|
9457
|
-
/* @__PURE__ */ (0,
|
|
9467
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: (0, import_clsx52.default)("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
|
|
9468
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
9458
9469
|
import_lucide_react23.Pencil,
|
|
9459
9470
|
{
|
|
9460
|
-
className: (0,
|
|
9471
|
+
className: (0, import_clsx52.default)(`cursor-pointer`, { "text-transparent": isEditing }),
|
|
9461
9472
|
size,
|
|
9462
9473
|
style: { minWidth: `${size}px` }
|
|
9463
9474
|
}
|
|
@@ -9465,7 +9476,7 @@ var ToggleableInput = ({
|
|
|
9465
9476
|
]
|
|
9466
9477
|
}
|
|
9467
9478
|
),
|
|
9468
|
-
isEditing && disclaimer && /* @__PURE__ */ (0,
|
|
9479
|
+
isEditing && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("label", { className: "text-negative", children: disclaimer })
|
|
9469
9480
|
] });
|
|
9470
9481
|
};
|
|
9471
9482
|
var ToggleableInputUncontrolled = ({
|
|
@@ -9477,7 +9488,7 @@ var ToggleableInputUncontrolled = ({
|
|
|
9477
9488
|
(0, import_react35.useEffect)(() => {
|
|
9478
9489
|
setValue(initialValue);
|
|
9479
9490
|
}, [initialValue]);
|
|
9480
|
-
return /* @__PURE__ */ (0,
|
|
9491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
9481
9492
|
ToggleableInput,
|
|
9482
9493
|
{
|
|
9483
9494
|
value,
|
|
@@ -9592,6 +9603,7 @@ function resolveSetState(action, prev) {
|
|
|
9592
9603
|
LoadingAndErrorComponent,
|
|
9593
9604
|
LoadingAnimation,
|
|
9594
9605
|
LoadingButton,
|
|
9606
|
+
LoadingContainer,
|
|
9595
9607
|
LocalStorageService,
|
|
9596
9608
|
LoopingArrayCalculator,
|
|
9597
9609
|
MarkdownInterpreter,
|