wcz-test 6.22.2 → 6.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/compiler-runtime.js +6 -0
- package/dist/_virtual/compiler-runtime.js.map +1 -0
- package/dist/_virtual/compiler-runtime2.js +5 -0
- package/dist/_virtual/compiler-runtime2.js.map +1 -0
- package/dist/_virtual/jsx-runtime.js +6 -0
- package/dist/_virtual/jsx-runtime.js.map +1 -0
- package/dist/_virtual/jsx-runtime2.js +5 -0
- package/dist/_virtual/jsx-runtime2.js.map +1 -0
- package/dist/_virtual/react-compiler-runtime.development.js +5 -0
- package/dist/_virtual/react-compiler-runtime.development.js.map +1 -0
- package/dist/_virtual/react-compiler-runtime.production.js +5 -0
- package/dist/_virtual/react-compiler-runtime.production.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.development.js +5 -0
- package/dist/_virtual/react-jsx-runtime.development.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.js +5 -0
- package/dist/_virtual/react-jsx-runtime.production.js.map +1 -0
- package/dist/client.js +4 -4
- package/dist/components/core/AppTitle.d.ts +2 -0
- package/dist/components/core/AppTitle.js +23 -0
- package/dist/components/core/AppTitle.js.map +1 -0
- package/dist/components/core/Fullscreen.d.ts +3 -0
- package/dist/components/core/Fullscreen.js +104 -0
- package/dist/components/core/Fullscreen.js.map +1 -0
- package/dist/components/core/Layout.d.ts +8 -0
- package/dist/components/core/Layout.js +215 -0
- package/dist/components/core/Layout.js.map +1 -0
- package/dist/components/core/ToolbarAccount.d.ts +2 -0
- package/dist/components/core/ToolbarAccount.js +602 -0
- package/dist/components/core/ToolbarAccount.js.map +1 -0
- package/dist/components/core/TypographyWithIcon.d.ts +7 -0
- package/dist/components/core/TypographyWithIcon.js +117 -0
- package/dist/components/core/TypographyWithIcon.js.map +1 -0
- package/dist/components/core/navigation/NavigationList.d.ts +22 -0
- package/dist/components/core/navigation/NavigationList.js +166 -0
- package/dist/components/core/navigation/NavigationList.js.map +1 -0
- package/dist/components/core/navigation/NavigationListItem.d.ts +16 -0
- package/dist/components/core/navigation/NavigationListItem.js +467 -0
- package/dist/components/core/navigation/NavigationListItem.js.map +1 -0
- package/dist/components/core/navigation/NavigationRail.d.ts +12 -0
- package/dist/components/core/navigation/NavigationRail.js +141 -0
- package/dist/components/core/navigation/NavigationRail.js.map +1 -0
- package/dist/components/data-grid/ChipInputCell.d.ts +9 -0
- package/dist/components/data-grid/ChipInputCell.js +95 -0
- package/dist/components/data-grid/ChipInputCell.js.map +1 -0
- package/dist/components/data-grid/EditableColumnHeader.d.ts +2 -0
- package/dist/components/data-grid/EditableColumnHeader.js +30 -0
- package/dist/components/data-grid/EditableColumnHeader.js.map +1 -0
- package/dist/components/file/Dropzone.d.ts +8 -0
- package/dist/components/file/Dropzone.js +151 -0
- package/dist/components/file/Dropzone.js.map +1 -0
- package/dist/components/file/FileViewer.d.ts +20 -0
- package/dist/components/file/FileViewer.js +127 -0
- package/dist/components/file/FileViewer.js.map +1 -0
- package/dist/components/file/fileViewer/FileViewerGrid.d.ts +17 -0
- package/dist/components/file/fileViewer/FileViewerGrid.js +282 -0
- package/dist/components/file/fileViewer/FileViewerGrid.js.map +1 -0
- package/dist/components/file/fileViewer/FileViewerList.d.ts +12 -0
- package/dist/components/file/fileViewer/FileViewerList.js +191 -0
- package/dist/components/file/fileViewer/FileViewerList.js.map +1 -0
- package/dist/components/file/fileViewer/ImageViewer.d.ts +6 -0
- package/dist/components/file/fileViewer/ImageViewer.js +75 -0
- package/dist/components/file/fileViewer/ImageViewer.js.map +1 -0
- package/dist/components/file/fileViewer/common/ActionsMenu.d.ts +15 -0
- package/dist/components/file/fileViewer/common/ActionsMenu.js +159 -0
- package/dist/components/file/fileViewer/common/ActionsMenu.js.map +1 -0
- package/dist/components/form/FormAutocomplete.d.ts +7 -0
- package/dist/components/form/FormAutocomplete.js +80 -0
- package/dist/components/form/FormAutocomplete.js.map +1 -0
- package/dist/components/form/FormCheckbox.d.ts +7 -0
- package/dist/components/form/FormCheckbox.js +81 -0
- package/dist/components/form/FormCheckbox.js.map +1 -0
- package/dist/components/form/FormDatePicker.d.ts +8 -0
- package/dist/components/form/FormDatePicker.js +77 -0
- package/dist/components/form/FormDatePicker.js.map +1 -0
- package/dist/components/form/FormDateRangePicker.d.ts +8 -0
- package/dist/components/form/FormDateRangePicker.js +77 -0
- package/dist/components/form/FormDateRangePicker.js.map +1 -0
- package/dist/components/form/FormDateTimePicker.d.ts +8 -0
- package/dist/components/form/FormDateTimePicker.js +77 -0
- package/dist/components/form/FormDateTimePicker.js.map +1 -0
- package/dist/components/form/FormDateTimeRangePicker.d.ts +8 -0
- package/dist/components/form/FormDateTimeRangePicker.js +77 -0
- package/dist/components/form/FormDateTimeRangePicker.js.map +1 -0
- package/dist/components/form/FormNumberField.d.ts +9 -0
- package/dist/components/form/FormNumberField.js +73 -0
- package/dist/components/form/FormNumberField.js.map +1 -0
- package/dist/components/form/FormRadioGroup.d.ts +13 -0
- package/dist/components/form/FormRadioGroup.js +113 -0
- package/dist/components/form/FormRadioGroup.js.map +1 -0
- package/dist/components/form/FormSlider.d.ts +7 -0
- package/dist/components/form/FormSlider.js +94 -0
- package/dist/components/form/FormSlider.js.map +1 -0
- package/dist/components/form/FormSubmitButton.d.ts +4 -0
- package/dist/components/form/FormSubmitButton.js +50 -0
- package/dist/components/form/FormSubmitButton.js.map +1 -0
- package/dist/components/form/FormSwitch.d.ts +7 -0
- package/dist/components/form/FormSwitch.js +81 -0
- package/dist/components/form/FormSwitch.js.map +1 -0
- package/dist/components/form/FormTextField.d.ts +7 -0
- package/dist/components/form/FormTextField.js +52 -0
- package/dist/components/form/FormTextField.js.map +1 -0
- package/dist/components/form/FormTimePicker.d.ts +8 -0
- package/dist/components/form/FormTimePicker.js +77 -0
- package/dist/components/form/FormTimePicker.js.map +1 -0
- package/dist/components/form/FormTimeRangePicker.d.ts +8 -0
- package/dist/components/form/FormTimeRangePicker.js +77 -0
- package/dist/components/form/FormTimeRangePicker.js.map +1 -0
- package/dist/components/router/RouterButton.d.ts +6 -0
- package/dist/components/router/RouterButton.js +35 -0
- package/dist/components/router/RouterButton.js.map +1 -0
- package/dist/components/router/RouterError.d.ts +7 -0
- package/dist/components/router/RouterError.js +62 -0
- package/dist/components/router/RouterError.js.map +1 -0
- package/dist/components/router/RouterGridActionsCellItem.d.ts +6 -0
- package/dist/components/router/RouterGridActionsCellItem.js +35 -0
- package/dist/components/router/RouterGridActionsCellItem.js.map +1 -0
- package/dist/components/router/RouterIconButton.d.ts +6 -0
- package/dist/components/router/RouterIconButton.js +35 -0
- package/dist/components/router/RouterIconButton.js.map +1 -0
- package/dist/components/router/RouterLink.d.ts +6 -0
- package/dist/components/router/RouterLink.js +35 -0
- package/dist/components/router/RouterLink.js.map +1 -0
- package/dist/components/router/RouterListItemButton.d.ts +6 -0
- package/dist/{RouterListItemButton-CagMd8F_.js → components/router/RouterListItemButton.js} +4 -4
- package/dist/components/router/RouterListItemButton.js.map +1 -0
- package/dist/components/router/RouterNotFound.d.ts +1 -0
- package/dist/components/router/RouterNotFound.js +53 -0
- package/dist/components/router/RouterNotFound.js.map +1 -0
- package/dist/components/router/RouterTab.d.ts +6 -0
- package/dist/components/router/RouterTab.js +35 -0
- package/dist/components/router/RouterTab.js.map +1 -0
- package/dist/components.js +15 -1486
- package/dist/components.js.map +1 -1
- package/dist/contexts/DialogsContext.d.ts +6 -0
- package/dist/contexts/DialogsContext.js +6 -0
- package/dist/contexts/DialogsContext.js.map +1 -0
- package/dist/contexts/FileContext.d.ts +13 -0
- package/dist/contexts/FileContext.js +14 -0
- package/dist/contexts/FileContext.js.map +1 -0
- package/dist/contexts/UserContext.d.ts +7 -0
- package/dist/contexts/UserContext.js +6 -0
- package/dist/contexts/UserContext.js.map +1 -0
- package/dist/env.d.ts +10 -0
- package/dist/env.js +26 -0
- package/dist/env.js.map +1 -0
- package/dist/exports/client.d.ts +4 -0
- package/dist/exports/components.d.ts +14 -0
- package/dist/exports/hooks.d.ts +5 -0
- package/dist/exports/index.d.ts +3 -0
- package/dist/exports/models.d.ts +24 -0
- package/dist/exports/queries.d.ts +4 -0
- package/dist/exports/server.d.ts +1 -0
- package/dist/exports/utils.d.ts +3 -0
- package/dist/exports/vite.d.ts +1 -0
- package/dist/hooks/DialogsHooks.d.ts +42 -0
- package/dist/{DialogsHooks-BEZgPVSk.js → hooks/DialogsHooks.js} +7 -4
- package/dist/hooks/DialogsHooks.js.map +1 -0
- package/dist/hooks/FormHooks.d.ts +52 -0
- package/dist/hooks/FormHooks.js +55 -0
- package/dist/hooks/FormHooks.js.map +1 -0
- package/dist/hooks/UseHook.d.ts +2 -0
- package/dist/hooks/UseHook.js +12 -0
- package/dist/hooks/UseHook.js.map +1 -0
- package/dist/hooks.js +5 -1002
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +3 -1962
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/client.d.ts +13 -0
- package/dist/lib/auth/client.js +63 -0
- package/dist/lib/auth/client.js.map +1 -0
- package/dist/lib/auth/server.d.ts +9 -0
- package/dist/lib/utils.d.ts +52 -0
- package/dist/{utils-CCjnelFb.js → lib/utils.js} +9 -24
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/vite-plugin.d.ts +2 -0
- package/dist/lib/vite-plugin.js +65 -0
- package/dist/lib/vite-plugin.js.map +1 -0
- package/dist/middleware/auth.d.ts +13 -0
- package/dist/models/Navigation.d.ts +18 -0
- package/dist/models/User.d.ts +11 -0
- package/dist/models/approval/Approval.d.ts +177 -0
- package/dist/models/approval/Approval.js +81 -0
- package/dist/models/approval/Approval.js.map +1 -0
- package/dist/models/approval/ApprovalEmployee.d.ts +7 -0
- package/dist/models/approval/ApprovalEmployee.js +10 -0
- package/dist/models/approval/ApprovalEmployee.js.map +1 -0
- package/dist/models/approval/ApprovalFlow.d.ts +49 -0
- package/dist/models/approval/ApprovalFlow.js +15 -0
- package/dist/models/approval/ApprovalFlow.js.map +1 -0
- package/dist/models/approval/ApprovalFlowStep.d.ts +29 -0
- package/dist/models/approval/ApprovalFlowStep.js +17 -0
- package/dist/models/approval/ApprovalFlowStep.js.map +1 -0
- package/dist/models/approval/ApprovalRequestType.d.ts +5 -0
- package/dist/models/approval/ApprovalRequestType.js +6 -0
- package/dist/models/approval/ApprovalRequestType.js.map +1 -0
- package/dist/models/approval/ApprovalStatus.d.ts +9 -0
- package/dist/models/approval/ApprovalStatus.js +6 -0
- package/dist/models/approval/ApprovalStatus.js.map +1 -0
- package/dist/models/approval/ApprovalStepResult.d.ts +11 -0
- package/dist/models/approval/ApprovalStepResult.js +6 -0
- package/dist/models/approval/ApprovalStepResult.js.map +1 -0
- package/dist/models/approval/StepApprovalOrder.d.ts +6 -0
- package/dist/models/approval/StepApprovalOrder.js +6 -0
- package/dist/models/approval/StepApprovalOrder.js.map +1 -0
- package/dist/models/email/Email.d.ts +13 -0
- package/dist/models/email/Email.js +14 -0
- package/dist/models/email/Email.js.map +1 -0
- package/dist/models/email/EmailAttachment.d.ts +6 -0
- package/dist/models/email/EmailAttachment.js +9 -0
- package/dist/models/email/EmailAttachment.js.map +1 -0
- package/dist/models/file/FileActions.d.ts +6 -0
- package/dist/models/file/FileMeta.d.ts +15 -0
- package/dist/{FileMeta-G1oT3mYK.js → models/file/FileMeta.js} +2 -2
- package/dist/models/file/FileMeta.js.map +1 -0
- package/dist/models/peoplesoft/Department.d.ts +58 -0
- package/dist/models/peoplesoft/Department.js +19 -0
- package/dist/models/peoplesoft/Department.js.map +1 -0
- package/dist/models/peoplesoft/Employee.d.ts +46 -0
- package/dist/models/peoplesoft/Employee.js +43 -0
- package/dist/models/peoplesoft/Employee.js.map +1 -0
- package/dist/models/peoplesoft/EmployeeCategoryGroup.d.ts +6 -0
- package/dist/models/peoplesoft/EmployeeCategoryGroup.js +6 -0
- package/dist/models/peoplesoft/EmployeeCategoryGroup.js.map +1 -0
- package/dist/models/peoplesoft/EmployeeStatus.d.ts +6 -0
- package/dist/models/peoplesoft/EmployeeStatus.js +6 -0
- package/dist/models/peoplesoft/EmployeeStatus.js.map +1 -0
- package/dist/models.js +10 -159
- package/dist/models.js.map +1 -1
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +22 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js.map +1 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js.map +1 -0
- package/dist/{DialogsContext-DMZRefiY.js → node_modules/react/cjs/react-jsx-runtime.development.js} +4 -48
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +33 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.js.map +1 -0
- package/dist/node_modules/react/compiler-runtime.js +18 -0
- package/dist/node_modules/react/compiler-runtime.js.map +1 -0
- package/dist/node_modules/react/jsx-runtime.js +18 -0
- package/dist/node_modules/react/jsx-runtime.js.map +1 -0
- package/dist/providers/DialogsProvider.d.ts +5 -0
- package/dist/providers/DialogsProvider.js +79 -0
- package/dist/providers/DialogsProvider.js.map +1 -0
- package/dist/providers/LayoutProvider.d.ts +11 -0
- package/dist/providers/LayoutProvider.js +101 -0
- package/dist/providers/LayoutProvider.js.map +1 -0
- package/dist/providers/UserProvider.d.ts +4 -0
- package/dist/providers/UserProvider.js +94 -0
- package/dist/providers/UserProvider.js.map +1 -0
- package/dist/queries/Approval.d.ts +585 -0
- package/dist/queries/Approval.js +91 -0
- package/dist/queries/Approval.js.map +1 -0
- package/dist/queries/ApprovalHooks.d.ts +315 -0
- package/dist/queries/ApprovalHooks.js +243 -0
- package/dist/queries/ApprovalHooks.js.map +1 -0
- package/dist/queries/FileHooks.d.ts +151 -0
- package/dist/{FileHooks-BJdvBvBr.js → queries/FileHooks.js} +14 -13
- package/dist/queries/FileHooks.js.map +1 -0
- package/dist/queries/PeopleSoftHooks.d.ts +537 -0
- package/dist/queries/PeopleSoftHooks.js +586 -0
- package/dist/queries/PeopleSoftHooks.js.map +1 -0
- package/dist/queries/UserHooks.d.ts +11 -0
- package/dist/queries/UserHooks.js +157 -0
- package/dist/queries/UserHooks.js.map +1 -0
- package/dist/queries.js +13 -886
- package/dist/queries.js.map +1 -1
- package/dist/utils.js +2 -2
- package/dist/vite.js +1 -61
- package/dist/vite.js.map +1 -1
- package/package.json +13 -11
- package/dist/ApprovalStatus-BtAVFn5p.js +0 -8
- package/dist/ApprovalStatus-BtAVFn5p.js.map +0 -1
- package/dist/DialogsContext-DMZRefiY.js.map +0 -1
- package/dist/DialogsHooks-BEZgPVSk.js.map +0 -1
- package/dist/FileHooks-BJdvBvBr.js.map +0 -1
- package/dist/FileMeta-G1oT3mYK.js.map +0 -1
- package/dist/RouterListItemButton-CagMd8F_.js.map +0 -1
- package/dist/UseHook-CGSDGsbk.js +0 -13
- package/dist/UseHook-CGSDGsbk.js.map +0 -1
- package/dist/client.d.ts +0 -20
- package/dist/compiler-runtime-BGHur82y.js +0 -46
- package/dist/compiler-runtime-BGHur82y.js.map +0 -1
- package/dist/components.d.ts +0 -134
- package/dist/hooks.d.ts +0 -208
- package/dist/index.d.ts +0 -74
- package/dist/models.d.ts +0 -467
- package/dist/queries.d.ts +0 -1956
- package/dist/server.d.ts +0 -5
- package/dist/utils-CCjnelFb.js.map +0 -1
- package/dist/utils.d.ts +0 -11
- package/dist/vite.d.ts +0 -5
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChipProps } from '@mui/material';
|
|
2
|
+
import { GridRenderCellParams, GridValidRowModel } from '@mui/x-data-grid-premium';
|
|
3
|
+
interface ChipInputCellProps<T extends GridValidRowModel> {
|
|
4
|
+
params: GridRenderCellParams<T>;
|
|
5
|
+
slotProps?: ChipProps;
|
|
6
|
+
getLabel?: (object: T) => string | number;
|
|
7
|
+
}
|
|
8
|
+
export declare const ChipInputCell: <T extends GridValidRowModel>({ params, slotProps, getLabel }: ChipInputCellProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { c as compilerRuntimeExports } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { Chip, Stack } from "@mui/material";
|
|
4
|
+
const isArray = (value) => Array.isArray(value);
|
|
5
|
+
const ChipInputCell = (t0) => {
|
|
6
|
+
const $ = compilerRuntimeExports.c(20);
|
|
7
|
+
const {
|
|
8
|
+
params,
|
|
9
|
+
slotProps,
|
|
10
|
+
getLabel
|
|
11
|
+
} = t0;
|
|
12
|
+
if (!params.value) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
let t1;
|
|
16
|
+
if ($[0] !== getLabel) {
|
|
17
|
+
t1 = (value) => {
|
|
18
|
+
if (getLabel) {
|
|
19
|
+
return getLabel(value);
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
$[0] = getLabel;
|
|
24
|
+
$[1] = t1;
|
|
25
|
+
} else {
|
|
26
|
+
t1 = $[1];
|
|
27
|
+
}
|
|
28
|
+
const getLabelValue = t1;
|
|
29
|
+
if (isArray(params.value)) {
|
|
30
|
+
let t22;
|
|
31
|
+
if ($[2] !== params.colDef.computedWidth) {
|
|
32
|
+
t22 = {
|
|
33
|
+
overflowX: "auto",
|
|
34
|
+
height: "100%",
|
|
35
|
+
width: params.colDef.computedWidth
|
|
36
|
+
};
|
|
37
|
+
$[2] = params.colDef.computedWidth;
|
|
38
|
+
$[3] = t22;
|
|
39
|
+
} else {
|
|
40
|
+
t22 = $[3];
|
|
41
|
+
}
|
|
42
|
+
let t32;
|
|
43
|
+
if ($[4] !== getLabelValue || $[5] !== params.value || $[6] !== slotProps) {
|
|
44
|
+
let t42;
|
|
45
|
+
if ($[8] !== getLabelValue || $[9] !== slotProps) {
|
|
46
|
+
t42 = (value_0, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { label: getLabelValue(value_0), ...slotProps }, `${index + 1}-chip-input-cell`);
|
|
47
|
+
$[8] = getLabelValue;
|
|
48
|
+
$[9] = slotProps;
|
|
49
|
+
$[10] = t42;
|
|
50
|
+
} else {
|
|
51
|
+
t42 = $[10];
|
|
52
|
+
}
|
|
53
|
+
t32 = params.value.map(t42);
|
|
54
|
+
$[4] = getLabelValue;
|
|
55
|
+
$[5] = params.value;
|
|
56
|
+
$[6] = slotProps;
|
|
57
|
+
$[7] = t32;
|
|
58
|
+
} else {
|
|
59
|
+
t32 = $[7];
|
|
60
|
+
}
|
|
61
|
+
let t4;
|
|
62
|
+
if ($[11] !== t22 || $[12] !== t32) {
|
|
63
|
+
t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { direction: "row", alignItems: "center", gap: 1, sx: t22, children: t32 });
|
|
64
|
+
$[11] = t22;
|
|
65
|
+
$[12] = t32;
|
|
66
|
+
$[13] = t4;
|
|
67
|
+
} else {
|
|
68
|
+
t4 = $[13];
|
|
69
|
+
}
|
|
70
|
+
return t4;
|
|
71
|
+
}
|
|
72
|
+
let t2;
|
|
73
|
+
if ($[14] !== getLabelValue || $[15] !== params.value) {
|
|
74
|
+
t2 = getLabelValue(params.value);
|
|
75
|
+
$[14] = getLabelValue;
|
|
76
|
+
$[15] = params.value;
|
|
77
|
+
$[16] = t2;
|
|
78
|
+
} else {
|
|
79
|
+
t2 = $[16];
|
|
80
|
+
}
|
|
81
|
+
let t3;
|
|
82
|
+
if ($[17] !== slotProps || $[18] !== t2) {
|
|
83
|
+
t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { label: t2, ...slotProps });
|
|
84
|
+
$[17] = slotProps;
|
|
85
|
+
$[18] = t2;
|
|
86
|
+
$[19] = t3;
|
|
87
|
+
} else {
|
|
88
|
+
t3 = $[19];
|
|
89
|
+
}
|
|
90
|
+
return t3;
|
|
91
|
+
};
|
|
92
|
+
export {
|
|
93
|
+
ChipInputCell
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=ChipInputCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChipInputCell.js","sources":["../../../src/components/data-grid/ChipInputCell.tsx"],"sourcesContent":["import { Chip, Stack } from \"@mui/material\";\nimport type { ChipProps} from \"@mui/material\";\nimport type { GridRenderCellParams, GridValidRowModel } from \"@mui/x-data-grid-premium\";\n\nconst isArray = (value: any) => Array.isArray(value);\n\ninterface ChipInputCellProps<T extends GridValidRowModel> {\n params: GridRenderCellParams<T>;\n slotProps?: ChipProps;\n getLabel?: (object: T) => string | number;\n}\n\nexport const ChipInputCell = <T extends GridValidRowModel>({ params, slotProps, getLabel }: ChipInputCellProps<T>) => {\n if (!params.value) return null;\n\n const getLabelValue = (value: any) => {\n if (getLabel) return getLabel(value);\n return value;\n };\n\n if (isArray(params.value))\n return (\n <Stack direction=\"row\" alignItems=\"center\" gap={1} sx={{ overflowX: \"auto\", height: \"100%\", width: params.colDef.computedWidth }}>\n {params.value.map((value: any, index) =>\n <Chip key={`${index + 1}-chip-input-cell`} label={getLabelValue(value)} {...slotProps} />\n )}\n </Stack>\n );\n\n return <Chip label={getLabelValue(params.value)} {...slotProps} />;\n};"],"names":["isArray","value","Array","ChipInputCell","t0","$","_c","params","slotProps","getLabel","t1","getLabelValue","t2","colDef","computedWidth","overflowX","height","width","t3","t4","value_0","index","map","jsx"],"mappings":";;;AAIA,MAAMA,UAAUA,CAACC,UAAeC,MAAMF,QAAQC,KAAK;AAQ5C,MAAME,gBAAgBC,CAAAA,OAAA;AAAA,QAAAC,IAAAC,uBAAAA,EAAA,EAAA;AAA8B,QAAA;AAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAAL;AACvD,MAAI,CAACG,OAAMN,OAAM;AAAA,WAAS;AAAA,EAAI;AAAC,MAAAS;AAAA,MAAAL,SAAAI,UAAA;AAETC,SAAAT,CAAAA,UAAA;AAClB,UAAIQ,UAA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DM,UAAAA,IAAAA,CAGL;AAAQb,cAAAO;AAAAP,cAAAa;AAAAb,cAAAc;AAAAA,IAAA,OAAA;AAAAA,WAAAd,EAAA,EAAA;AAAA,IAAA;AAAA,WAJRc;AAAAA,EAIQ;AACV,MAAAP;AAAA,MAAAP,UAAAM,iBAAAN,EAAA,EAAA,MAAAE,OAAAN,OAAA;AAEcW,SAAAD,cAAcJ,OAAMN,KAAM;AAACI,YAAAM;AAAAN,MAAA,EAAA,IAAAE,OAAAN;AAAAI,YAAAO;AAAAA,EAAA,OAAA;AAAAA,SAAAP,EAAA,EAAA;AAAA,EAAA;AAAA,MAAAa;AAAA,MAAAb,EAAA,EAAA,MAAAG,aAAAH,UAAAO,IAAA;AAAxCM,SAAAK,kCAAAA,IAAC,MAAA,EAAY,OAAAX,IAA2B,GAAMJ,WAAS;AAAIH,YAAAG;AAAAH,YAAAO;AAAAP,YAAAa;AAAAA,EAAA,OAAA;AAAAA,SAAAb,EAAA,EAAA;AAAA,EAAA;AAAA,SAA3Da;AAA2D;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { c as compilerRuntimeExports } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import Edit from "@mui/icons-material/Edit";
|
|
4
|
+
import { TypographyWithIcon } from "../core/TypographyWithIcon.js";
|
|
5
|
+
const EditableColumnHeader = (t0) => {
|
|
6
|
+
const $ = compilerRuntimeExports.c(3);
|
|
7
|
+
const {
|
|
8
|
+
colDef
|
|
9
|
+
} = t0;
|
|
10
|
+
let t1;
|
|
11
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12
|
+
t1 = /* @__PURE__ */ jsxRuntimeExports.jsx(Edit, { color: "disabled", fontSize: "small" });
|
|
13
|
+
$[0] = t1;
|
|
14
|
+
} else {
|
|
15
|
+
t1 = $[0];
|
|
16
|
+
}
|
|
17
|
+
let t2;
|
|
18
|
+
if ($[1] !== colDef.headerName) {
|
|
19
|
+
t2 = /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyWithIcon, { endIcon: t1, variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
|
|
20
|
+
$[1] = colDef.headerName;
|
|
21
|
+
$[2] = t2;
|
|
22
|
+
} else {
|
|
23
|
+
t2 = $[2];
|
|
24
|
+
}
|
|
25
|
+
return t2;
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
EditableColumnHeader
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=EditableColumnHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditableColumnHeader.js","sources":["../../../src/components/data-grid/EditableColumnHeader.tsx"],"sourcesContent":["import Edit from \"@mui/icons-material/Edit\";\nimport { TypographyWithIcon } from \"../core/TypographyWithIcon\";\nimport type { GridColumnHeaderParams, GridValidRowModel } from \"@mui/x-data-grid-premium\";\n\nexport const EditableColumnHeader = <T extends GridValidRowModel>({ colDef }: GridColumnHeaderParams<T>) => {\n return <TypographyWithIcon endIcon={<Edit color=\"disabled\" fontSize=\"small\" />} variant=\"body2\" className=\"MuiDataGrid-columnHeaderTitle\">{colDef.headerName}</TypographyWithIcon>;\n};"],"names":["EditableColumnHeader","t0","$","_c","colDef","t1","Symbol","for","jsx","t2","headerName"],"mappings":";;;;AAIO,MAAMA,uBAAuBC,CAAAA,OAAA;AAAA,QAAAC,IAAAC,uBAAAA,EAAA,CAAA;AAA8B,QAAA;AAAA,IAAAC;AAAAA,EAAAA,IAAAH;AAAqC,MAAAI;AAAA,MAAAH,EAAA,CAAA,MAAAI,OAAAC,IAAA,2BAAA,GAAA;AAC/DF,SAAAG,kCAAAA,IAAC,MAAA,EAAW,OAAA,YAAoB,UAAA,SAAO;AAAGN,WAAAG;AAAAA,EAAA,OAAA;AAAAA,SAAAH,EAAA,CAAA;AAAA,EAAA;AAAA,MAAAO;AAAA,MAAAP,EAAA,CAAA,MAAAE,OAAAM,YAAA;AAAvED,SAAAD,kCAAAA,IAAC,sBAA4B,SAAAH,IAAoD,SAAA,SAAkB,WAAA,iCAAiCD,UAAAA,OAAMM,WAAAA,CAAY;AAAqBR,MAAA,CAAA,IAAAE,OAAAM;AAAAR,WAAAO;AAAAA,EAAA,OAAA;AAAAA,SAAAP,EAAA,CAAA;AAAA,EAAA;AAAA,SAA3KO;AAA2K;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { DropzoneOptions } from 'react-dropzone';
|
|
4
|
+
interface DropzoneProps extends DropzoneOptions {
|
|
5
|
+
sx?: SxProps<Theme>;
|
|
6
|
+
}
|
|
7
|
+
export declare const Dropzone: FC<DropzoneProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { c as compilerRuntimeExports } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import CloudUpload from "@mui/icons-material/CloudUpload";
|
|
4
|
+
import { useTheme, Paper, Typography } from "@mui/material";
|
|
5
|
+
import { useDropzone } from "react-dropzone";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
7
|
+
const baseStyle = {
|
|
8
|
+
flex: 1,
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
padding: "20px",
|
|
13
|
+
borderWidth: 2,
|
|
14
|
+
borderRadius: 2,
|
|
15
|
+
borderStyle: "dashed",
|
|
16
|
+
outline: "none",
|
|
17
|
+
transition: "border .24s ease-in-out",
|
|
18
|
+
cursor: "pointer"
|
|
19
|
+
};
|
|
20
|
+
const Dropzone = (t0) => {
|
|
21
|
+
const $ = compilerRuntimeExports.c(28);
|
|
22
|
+
let props;
|
|
23
|
+
let sx;
|
|
24
|
+
if ($[0] !== t0) {
|
|
25
|
+
({
|
|
26
|
+
sx,
|
|
27
|
+
...props
|
|
28
|
+
} = t0);
|
|
29
|
+
$[0] = t0;
|
|
30
|
+
$[1] = props;
|
|
31
|
+
$[2] = sx;
|
|
32
|
+
} else {
|
|
33
|
+
props = $[1];
|
|
34
|
+
sx = $[2];
|
|
35
|
+
}
|
|
36
|
+
const {
|
|
37
|
+
getRootProps,
|
|
38
|
+
getInputProps,
|
|
39
|
+
isFocused,
|
|
40
|
+
isDragAccept,
|
|
41
|
+
isDragReject
|
|
42
|
+
} = useDropzone(props);
|
|
43
|
+
const {
|
|
44
|
+
t
|
|
45
|
+
} = useTranslation();
|
|
46
|
+
const theme = useTheme();
|
|
47
|
+
let T0;
|
|
48
|
+
let t1;
|
|
49
|
+
let t2;
|
|
50
|
+
if ($[3] !== getRootProps || $[4] !== isDragAccept || $[5] !== isDragReject || $[6] !== isFocused || $[7] !== theme) {
|
|
51
|
+
const style = {
|
|
52
|
+
...baseStyle,
|
|
53
|
+
...isFocused ? {
|
|
54
|
+
borderColor: theme.palette.primary.main
|
|
55
|
+
} : {},
|
|
56
|
+
...isDragAccept ? {
|
|
57
|
+
borderColor: theme.palette.success.main
|
|
58
|
+
} : {},
|
|
59
|
+
...isDragReject ? {
|
|
60
|
+
borderColor: theme.palette.error.main
|
|
61
|
+
} : {}
|
|
62
|
+
};
|
|
63
|
+
T0 = Paper;
|
|
64
|
+
t1 = "outlined";
|
|
65
|
+
t2 = getRootProps({
|
|
66
|
+
style
|
|
67
|
+
});
|
|
68
|
+
$[3] = getRootProps;
|
|
69
|
+
$[4] = isDragAccept;
|
|
70
|
+
$[5] = isDragReject;
|
|
71
|
+
$[6] = isFocused;
|
|
72
|
+
$[7] = theme;
|
|
73
|
+
$[8] = T0;
|
|
74
|
+
$[9] = t1;
|
|
75
|
+
$[10] = t2;
|
|
76
|
+
} else {
|
|
77
|
+
T0 = $[8];
|
|
78
|
+
t1 = $[9];
|
|
79
|
+
t2 = $[10];
|
|
80
|
+
}
|
|
81
|
+
let t3;
|
|
82
|
+
if ($[11] !== getInputProps) {
|
|
83
|
+
t3 = getInputProps();
|
|
84
|
+
$[11] = getInputProps;
|
|
85
|
+
$[12] = t3;
|
|
86
|
+
} else {
|
|
87
|
+
t3 = $[12];
|
|
88
|
+
}
|
|
89
|
+
let t4;
|
|
90
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
91
|
+
t4 = {
|
|
92
|
+
display: "none"
|
|
93
|
+
};
|
|
94
|
+
$[13] = t4;
|
|
95
|
+
} else {
|
|
96
|
+
t4 = $[13];
|
|
97
|
+
}
|
|
98
|
+
let t5;
|
|
99
|
+
if ($[14] !== t3) {
|
|
100
|
+
t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("input", { ...t3, style: t4 });
|
|
101
|
+
$[14] = t3;
|
|
102
|
+
$[15] = t5;
|
|
103
|
+
} else {
|
|
104
|
+
t5 = $[15];
|
|
105
|
+
}
|
|
106
|
+
let t6;
|
|
107
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
108
|
+
t6 = /* @__PURE__ */ jsxRuntimeExports.jsx(CloudUpload, {});
|
|
109
|
+
$[16] = t6;
|
|
110
|
+
} else {
|
|
111
|
+
t6 = $[16];
|
|
112
|
+
}
|
|
113
|
+
let t7;
|
|
114
|
+
if ($[17] !== t) {
|
|
115
|
+
t7 = t("Layout.File.DragSomeFilesHereOrClickToSelectThem");
|
|
116
|
+
$[17] = t;
|
|
117
|
+
$[18] = t7;
|
|
118
|
+
} else {
|
|
119
|
+
t7 = $[18];
|
|
120
|
+
}
|
|
121
|
+
let t8;
|
|
122
|
+
if ($[19] !== t7) {
|
|
123
|
+
t8 = /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { children: t7 });
|
|
124
|
+
$[19] = t7;
|
|
125
|
+
$[20] = t8;
|
|
126
|
+
} else {
|
|
127
|
+
t8 = $[20];
|
|
128
|
+
}
|
|
129
|
+
let t9;
|
|
130
|
+
if ($[21] !== T0 || $[22] !== sx || $[23] !== t1 || $[24] !== t2 || $[25] !== t5 || $[26] !== t8) {
|
|
131
|
+
t9 = /* @__PURE__ */ jsxRuntimeExports.jsxs(T0, { variant: t1, ...t2, sx, children: [
|
|
132
|
+
t5,
|
|
133
|
+
t6,
|
|
134
|
+
t8
|
|
135
|
+
] });
|
|
136
|
+
$[21] = T0;
|
|
137
|
+
$[22] = sx;
|
|
138
|
+
$[23] = t1;
|
|
139
|
+
$[24] = t2;
|
|
140
|
+
$[25] = t5;
|
|
141
|
+
$[26] = t8;
|
|
142
|
+
$[27] = t9;
|
|
143
|
+
} else {
|
|
144
|
+
t9 = $[27];
|
|
145
|
+
}
|
|
146
|
+
return t9;
|
|
147
|
+
};
|
|
148
|
+
export {
|
|
149
|
+
Dropzone
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=Dropzone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropzone.js","sources":["../../../src/components/file/Dropzone.tsx"],"sourcesContent":["import CloudUpload from \"@mui/icons-material/CloudUpload\";\nimport { Paper, Typography, useTheme } from \"@mui/material\";\nimport { useDropzone } from \"react-dropzone\";\nimport { useTranslation } from \"react-i18next\";\nimport type { SxProps, Theme} from \"@mui/material\";\nimport type { CSSProperties, FC } from \"react\";\nimport type { DropzoneOptions} from \"react-dropzone\";\n\nconst baseStyle: CSSProperties = {\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n padding: \"20px\",\n borderWidth: 2,\n borderRadius: 2,\n borderStyle: \"dashed\",\n outline: \"none\",\n transition: \"border .24s ease-in-out\",\n cursor: \"pointer\",\n};\n\ninterface DropzoneProps extends DropzoneOptions {\n sx?: SxProps<Theme>;\n}\n\nexport const Dropzone: FC<DropzoneProps> = ({ sx, ...props }) => {\n const { getRootProps, getInputProps, isFocused, isDragAccept, isDragReject, } = useDropzone(props);\n const { t } = useTranslation();\n const theme = useTheme();\n\n const style = {\n ...baseStyle,\n ...(isFocused ? { borderColor: theme.palette.primary.main } : {}),\n ...(isDragAccept ? { borderColor: theme.palette.success.main } : {}),\n ...(isDragReject ? { borderColor: theme.palette.error.main } : {})\n };\n\n return (\n <Paper variant=\"outlined\" {...getRootProps({ style })} sx={sx}>\n <input {...getInputProps()} style={{ display: \"none\" }} />\n <CloudUpload />\n <Typography>{t(\"Layout.File.DragSomeFilesHereOrClickToSelectThem\")}</Typography>\n </Paper>\n );\n};"],"names":["baseStyle","flex","display","flexDirection","alignItems","padding","borderWidth","borderRadius","borderStyle","outline","transition","cursor","Dropzone","t0","$","_c","props","sx","getRootProps","getInputProps","isFocused","isDragAccept","isDragReject","useDropzone","t","useTranslation","theme","useTheme","T0","t1","t2","style","borderColor","palette","primary","main","success","error","Paper","t3","t4","Symbol","for","t5","jsx","t6","t7","t8","t9"],"mappings":";;;;;;AAQA,MAAMA,YAA2B;AAAA,EAC7BC,MAAM;AAAA,EACNC,SAAS;AAAA,EACTC,eAAe;AAAA,EACfC,YAAY;AAAA,EACZC,SAAS;AAAA,EACTC,aAAa;AAAA,EACbC,cAAc;AAAA,EACdC,aAAa;AAAA,EACbC,SAAS;AAAA,EACTC,YAAY;AAAA,EACZC,QAAQ;AACZ;AAMO,MAAMC,WAA8BC,CAAAA,OAAA;AAAA,QAAAC,IAAAC,uBAAAA,EAAA,EAAA;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAH,SAAAD,IAAA;AAAC,KAAA;AAAA,MAAAI;AAAAA,MAAA,GAAAD;AAAAA,IAAAA,IAAAH;AAAgBC,WAAAD;AAAAC,WAAAE;AAAAF,WAAAG;AAAAA,EAAA,OAAA;AAAAD,YAAAF,EAAA,CAAA;AAAAG,SAAAH,EAAA,CAAA;AAAA,EAAA;AACxD,QAAA;AAAA,IAAAI;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAgFC,YAAYP,KAAK;AACjG,QAAA;A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,EAAA;AAAA,SAJRkC;AAIQ;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FileViewerGridProps } from './fileViewer/FileViewerGrid';
|
|
2
|
+
import { ComponentType, FC, ReactNode } from 'react';
|
|
3
|
+
import { FileMeta } from '../../models/file/FileMeta';
|
|
4
|
+
import { FileActions } from '../../models/file/FileActions';
|
|
5
|
+
import { FileViewerListProps } from './fileViewer/FileViewerList';
|
|
6
|
+
interface FileViewerComponent {
|
|
7
|
+
Grid: ComponentType<FileViewerGridProps>;
|
|
8
|
+
List: ComponentType<FileViewerListProps>;
|
|
9
|
+
}
|
|
10
|
+
interface FileViewerProps {
|
|
11
|
+
subId: string;
|
|
12
|
+
onDelete?: (params: {
|
|
13
|
+
remainingFileMetas: Array<FileMeta>;
|
|
14
|
+
deletedFileMeta: FileMeta;
|
|
15
|
+
}) => void;
|
|
16
|
+
actions?: FileActions;
|
|
17
|
+
children: (component: FileViewerComponent) => ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const FileViewer: FC<FileViewerProps>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { c as compilerRuntimeExports } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { FileViewerGrid } from "./fileViewer/FileViewerGrid.js";
|
|
5
|
+
import { FileViewerList } from "./fileViewer/FileViewerList.js";
|
|
6
|
+
import { ImageViewer } from "./fileViewer/ImageViewer.js";
|
|
7
|
+
import { FileContext } from "../../contexts/FileContext.js";
|
|
8
|
+
import { useGetFileMetas } from "../../queries/FileHooks.js";
|
|
9
|
+
const FileViewer = (t0) => {
|
|
10
|
+
const $ = compilerRuntimeExports.c(25);
|
|
11
|
+
const {
|
|
12
|
+
subId,
|
|
13
|
+
onDelete,
|
|
14
|
+
actions,
|
|
15
|
+
children
|
|
16
|
+
} = t0;
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] !== subId) {
|
|
19
|
+
t1 = {
|
|
20
|
+
subId
|
|
21
|
+
};
|
|
22
|
+
$[0] = subId;
|
|
23
|
+
$[1] = t1;
|
|
24
|
+
} else {
|
|
25
|
+
t1 = $[1];
|
|
26
|
+
}
|
|
27
|
+
const t2 = !!subId;
|
|
28
|
+
let t3;
|
|
29
|
+
if ($[2] !== t2) {
|
|
30
|
+
t3 = {
|
|
31
|
+
enabled: t2
|
|
32
|
+
};
|
|
33
|
+
$[2] = t2;
|
|
34
|
+
$[3] = t3;
|
|
35
|
+
} else {
|
|
36
|
+
t3 = $[3];
|
|
37
|
+
}
|
|
38
|
+
const {
|
|
39
|
+
data: t4
|
|
40
|
+
} = useGetFileMetas(t1, t3);
|
|
41
|
+
let t5;
|
|
42
|
+
if ($[4] !== t4) {
|
|
43
|
+
t5 = t4 === void 0 ? [] : t4;
|
|
44
|
+
$[4] = t4;
|
|
45
|
+
$[5] = t5;
|
|
46
|
+
} else {
|
|
47
|
+
t5 = $[5];
|
|
48
|
+
}
|
|
49
|
+
const fileMetas = t5;
|
|
50
|
+
const [imageId, setImageId] = useState("");
|
|
51
|
+
let T0;
|
|
52
|
+
let t6;
|
|
53
|
+
let t7;
|
|
54
|
+
let t8;
|
|
55
|
+
if ($[6] !== actions || $[7] !== children || $[8] !== fileMetas || $[9] !== onDelete) {
|
|
56
|
+
t8 = Symbol.for("react.early_return_sentinel");
|
|
57
|
+
bb0: {
|
|
58
|
+
const components = {
|
|
59
|
+
Grid: FileViewerGrid,
|
|
60
|
+
List: FileViewerList
|
|
61
|
+
};
|
|
62
|
+
if (fileMetas.length === 0) {
|
|
63
|
+
t8 = null;
|
|
64
|
+
break bb0;
|
|
65
|
+
}
|
|
66
|
+
T0 = FileContext.Provider;
|
|
67
|
+
if ($[14] !== actions || $[15] !== fileMetas || $[16] !== onDelete) {
|
|
68
|
+
t6 = {
|
|
69
|
+
fileMetas,
|
|
70
|
+
onDelete,
|
|
71
|
+
actions,
|
|
72
|
+
setImageId
|
|
73
|
+
};
|
|
74
|
+
$[14] = actions;
|
|
75
|
+
$[15] = fileMetas;
|
|
76
|
+
$[16] = onDelete;
|
|
77
|
+
$[17] = t6;
|
|
78
|
+
} else {
|
|
79
|
+
t6 = $[17];
|
|
80
|
+
}
|
|
81
|
+
t7 = children(components);
|
|
82
|
+
}
|
|
83
|
+
$[6] = actions;
|
|
84
|
+
$[7] = children;
|
|
85
|
+
$[8] = fileMetas;
|
|
86
|
+
$[9] = onDelete;
|
|
87
|
+
$[10] = T0;
|
|
88
|
+
$[11] = t6;
|
|
89
|
+
$[12] = t7;
|
|
90
|
+
$[13] = t8;
|
|
91
|
+
} else {
|
|
92
|
+
T0 = $[10];
|
|
93
|
+
t6 = $[11];
|
|
94
|
+
t7 = $[12];
|
|
95
|
+
t8 = $[13];
|
|
96
|
+
}
|
|
97
|
+
if (t8 !== Symbol.for("react.early_return_sentinel")) {
|
|
98
|
+
return t8;
|
|
99
|
+
}
|
|
100
|
+
let t9;
|
|
101
|
+
if ($[18] !== imageId) {
|
|
102
|
+
t9 = /* @__PURE__ */ jsxRuntimeExports.jsx(ImageViewer, { metaId: imageId });
|
|
103
|
+
$[18] = imageId;
|
|
104
|
+
$[19] = t9;
|
|
105
|
+
} else {
|
|
106
|
+
t9 = $[19];
|
|
107
|
+
}
|
|
108
|
+
let t10;
|
|
109
|
+
if ($[20] !== T0 || $[21] !== t6 || $[22] !== t7 || $[23] !== t9) {
|
|
110
|
+
t10 = /* @__PURE__ */ jsxRuntimeExports.jsxs(T0, { value: t6, children: [
|
|
111
|
+
t7,
|
|
112
|
+
t9
|
|
113
|
+
] });
|
|
114
|
+
$[20] = T0;
|
|
115
|
+
$[21] = t6;
|
|
116
|
+
$[22] = t7;
|
|
117
|
+
$[23] = t9;
|
|
118
|
+
$[24] = t10;
|
|
119
|
+
} else {
|
|
120
|
+
t10 = $[24];
|
|
121
|
+
}
|
|
122
|
+
return t10;
|
|
123
|
+
};
|
|
124
|
+
export {
|
|
125
|
+
FileViewer
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=FileViewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileViewer.js","sources":["../../../src/components/file/FileViewer.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { FileViewerGrid } from \"./fileViewer/FileViewerGrid\";\nimport { FileViewerList } from \"./fileViewer/FileViewerList\";\nimport { ImageViewer } from \"./fileViewer/ImageViewer\";\nimport type { FileViewerGridProps } from \"./fileViewer/FileViewerGrid\";\nimport type { ComponentType, FC, ReactNode } from \"react\";\nimport type { FileMeta } from \"~/models/file/FileMeta\";\nimport type { FileActions } from \"~/models/file/FileActions\";\nimport type { FileViewerListProps } from \"./fileViewer/FileViewerList\";\nimport { FileContext } from \"~/contexts/FileContext\";\nimport { useGetFileMetas } from \"~/queries/FileHooks\";\n\ninterface FileViewerComponent {\n Grid: ComponentType<FileViewerGridProps>;\n List: ComponentType<FileViewerListProps>;\n}\n\ninterface FileViewerProps {\n subId: string;\n onDelete?: (params: { remainingFileMetas: Array<FileMeta>; deletedFileMeta: FileMeta }) => void;\n actions?: FileActions;\n children: (component: FileViewerComponent) => ReactNode;\n}\n\nexport const FileViewer: FC<FileViewerProps> = ({ subId, onDelete, actions, children }) => {\n const { data: fileMetas = [] } = useGetFileMetas({ subId }, { enabled: !!subId });\n const [imageId, setImageId] = useState<string>(\"\");\n\n const components: FileViewerComponent = { Grid: FileViewerGrid, List: FileViewerList };\n\n if (fileMetas.length === 0) return null;\n\n return (\n <FileContext.Provider value={{ fileMetas, onDelete, actions, setImageId }}>\n {children(components)}\n <ImageViewer metaId={imageId} />\n </FileContext.Provider>\n );\n};\n"],"names":["FileViewer","t0","$","_c","subId","onDelete","actions","children","t1","t2","t3","enabled","data","t4","useGetFileMetas","t5","undefined","fileMetas","imageId","setImageId","useState","T0","t6","t7","t8","Symbol","for","bb0","components","Grid","FileViewerGrid","List","FileViewerList","length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,EAAA,OAAA;AAAAA,UAAAnC,EAAA,EAAA;AAAA,EAAA;AAAA,SAHvBmC;AAGuB;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
import { FileMeta } from '../../../models/file/FileMeta';
|
|
4
|
+
type FileViewerGridItemBar = "hidden" | "always" | "onMouseEnter";
|
|
5
|
+
export interface FileViewerGridProps {
|
|
6
|
+
size?: number;
|
|
7
|
+
itemBar?: FileViewerGridItemBar;
|
|
8
|
+
sx?: SxProps<Theme>;
|
|
9
|
+
}
|
|
10
|
+
export declare const FileViewerGrid: React.FC<FileViewerGridProps>;
|
|
11
|
+
interface GridFileViewerItemProps {
|
|
12
|
+
meta: FileMeta;
|
|
13
|
+
size?: number;
|
|
14
|
+
itemBar?: FileViewerGridItemBar;
|
|
15
|
+
}
|
|
16
|
+
export declare const GridFileViewerItem: React.FC<GridFileViewerItemProps>;
|
|
17
|
+
export {};
|