@codezee/sixtify-brahma 0.2.49 → 0.2.51
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/package.json +1 -1
- package/packages/shared-components/dist/Actions/ColumnIconAction.d.ts +4 -0
- package/packages/shared-components/dist/Actions/ColumnIconAction.d.ts.map +1 -0
- package/packages/shared-components/dist/Actions/ColumnIconAction.js +11 -0
- package/packages/shared-components/dist/Actions/index.d.ts +1 -0
- package/packages/shared-components/dist/Actions/index.d.ts.map +1 -1
- package/packages/shared-components/dist/Actions/index.js +1 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnArranger.d.ts +13 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnArranger.d.ts.map +1 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnArranger.js +12 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnArrangerDialog.d.ts +23 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnArrangerDialog.d.ts.map +1 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnArrangerDialog.js +18 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnArrangerForm.d.ts +3 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnArrangerForm.d.ts.map +1 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnArrangerForm.js +30 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnItem.d.ts +13 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnItem.d.ts.map +1 -0
- package/packages/shared-components/dist/ColumnArranger/ColumnItem.js +13 -0
- package/packages/shared-components/dist/ColumnArranger/LockedColumnItem.d.ts +6 -0
- package/packages/shared-components/dist/ColumnArranger/LockedColumnItem.d.ts.map +1 -0
- package/packages/shared-components/dist/ColumnArranger/LockedColumnItem.js +15 -0
- package/packages/shared-components/dist/ColumnArranger/SortableColumnItem.d.ts +4 -0
- package/packages/shared-components/dist/ColumnArranger/SortableColumnItem.d.ts.map +1 -0
- package/packages/shared-components/dist/ColumnArranger/SortableColumnItem.js +8 -0
- package/packages/shared-components/dist/ColumnArranger/index.d.ts +7 -0
- package/packages/shared-components/dist/ColumnArranger/index.d.ts.map +1 -0
- package/packages/shared-components/dist/ColumnArranger/index.js +9 -0
- package/packages/shared-components/dist/FilterList/FilterListV2.js +2 -2
- package/packages/shared-components/dist/FilterList/FilterPopupWrapper.js +1 -1
- package/packages/shared-components/dist/FilterList/FilterTypeWrapper.js +2 -2
- package/packages/shared-components/dist/FormFields/SwitchField/Skeleton.d.ts.map +1 -0
- package/packages/shared-components/dist/FormFields/{Switch/Switch.d.ts → SwitchField/SwitchField.d.ts} +3 -3
- package/packages/shared-components/dist/FormFields/SwitchField/SwitchField.d.ts.map +1 -0
- package/packages/shared-components/dist/FormFields/SwitchField/SwitchField.js +51 -0
- package/packages/shared-components/dist/FormFields/SwitchField/index.d.ts +2 -0
- package/packages/shared-components/dist/FormFields/SwitchField/index.d.ts.map +1 -0
- package/packages/shared-components/dist/FormFields/{Switch → SwitchField}/index.js +1 -1
- package/packages/shared-components/dist/FormFields/index.d.ts +1 -1
- package/packages/shared-components/dist/FormFields/index.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/index.js +1 -1
- package/packages/shared-components/dist/Svgs/SvgColumn.d.ts +3 -0
- package/packages/shared-components/dist/Svgs/SvgColumn.d.ts.map +1 -0
- package/packages/shared-components/dist/Svgs/SvgColumn.js +8 -0
- package/packages/shared-components/dist/Svgs/index.d.ts +3 -2
- package/packages/shared-components/dist/Svgs/index.d.ts.map +1 -1
- package/packages/shared-components/dist/Svgs/index.js +3 -2
- package/packages/shared-components/dist/Timeline/AttendanceStatus.d.ts +3 -1
- package/packages/shared-components/dist/Timeline/AttendanceStatus.d.ts.map +1 -1
- package/packages/shared-components/dist/Timeline/AttendanceStatus.js +8 -6
- package/packages/shared-components/dist/Timeline/Timeline.d.ts +2 -0
- package/packages/shared-components/dist/Timeline/Timeline.d.ts.map +1 -1
- package/packages/shared-components/dist/Timeline/Timeline.js +1 -1
- package/packages/shared-components/dist/Timeline/TimelineTrackSegments.d.ts.map +1 -1
- package/packages/shared-components/dist/Timeline/TimelineTrackSegments.js +3 -2
- package/packages/shared-components/dist/index.d.ts +1 -0
- package/packages/shared-components/dist/index.d.ts.map +1 -1
- package/packages/shared-components/dist/index.js +1 -0
- package/packages/shared-components/dist/utils/colorVariant.d.ts +3 -3
- package/packages/shared-components/dist/utils/colorVariant.d.ts.map +1 -1
- package/packages/shared-components/dist/utils/colorVariant.js +35 -2
- package/packages/shared-components/dist/FormFields/Switch/Skeleton.d.ts.map +0 -1
- package/packages/shared-components/dist/FormFields/Switch/Switch.d.ts.map +0 -1
- package/packages/shared-components/dist/FormFields/Switch/Switch.js +0 -14
- package/packages/shared-components/dist/FormFields/Switch/index.d.ts +0 -2
- package/packages/shared-components/dist/FormFields/Switch/index.d.ts.map +0 -1
- /package/packages/shared-components/dist/FormFields/{Switch → SwitchField}/Skeleton.d.ts +0 -0
- /package/packages/shared-components/dist/FormFields/{Switch → SwitchField}/Skeleton.js +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnIconAction.d.ts","sourceRoot":"","sources":["../../src/Actions/ColumnIconAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAKrD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAEpD,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,4CAQ5D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColumnIconAction = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const Svgs_1 = require("../Svgs");
|
|
7
|
+
const Tooltip_1 = require("../Tooltip");
|
|
8
|
+
const ColumnIconAction = (props) => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(material_1.IconButton, { ...props, sx: { padding: 0 }, children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: "Column Chooser", children: (0, jsx_runtime_1.jsx)(Svgs_1.SvgColumn, {}) }) }));
|
|
10
|
+
};
|
|
11
|
+
exports.ColumnIconAction = ColumnIconAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AddIconAction"), exports);
|
|
18
18
|
__exportStar(require("./CalendarIconAction"), exports);
|
|
19
|
+
__exportStar(require("./ColumnIconAction"), exports);
|
|
19
20
|
__exportStar(require("./ConfigureIconAction"), exports);
|
|
20
21
|
__exportStar(require("./DeleteIconAction"), exports);
|
|
21
22
|
__exportStar(require("./DownloadIconAction"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Control, UseFieldArrayReturn } from "react-hook-form";
|
|
2
|
+
import type { SimpleColDef } from "./ColumnArrangerDialog";
|
|
3
|
+
export type ColumnArrangerProps = {
|
|
4
|
+
lockedColumns: SimpleColDef[];
|
|
5
|
+
fields: UseFieldArrayReturn<{
|
|
6
|
+
columns: SimpleColDef[];
|
|
7
|
+
}, "columns">["fields"];
|
|
8
|
+
control: Control<{
|
|
9
|
+
columns: SimpleColDef[];
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export declare function ColumnArranger({ lockedColumns, fields, control, }: Readonly<ColumnArrangerProps>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=ColumnArranger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnArranger.d.ts","sourceRoot":"","sources":["../../src/ColumnArranger/ColumnArranger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,MAAM,EAAE,mBAAmB,CAAC;QAAE,OAAO,EAAE,YAAY,EAAE,CAAA;KAAE,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC9E,OAAO,EAAE,OAAO,CAAC;QAAE,OAAO,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC,CAAC;CAC/C,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,aAAa,EACb,MAAM,EACN,OAAO,GACR,EAAE,QAAQ,CAAC,mBAAmB,CAAC,2CAqB/B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColumnArranger = ColumnArranger;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
/* eslint-disable import/no-unresolved */
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const LockedColumnItem_1 = require("./LockedColumnItem");
|
|
8
|
+
const SortableColumnItem_1 = require("./SortableColumnItem");
|
|
9
|
+
function ColumnArranger({ lockedColumns, fields, control, }) {
|
|
10
|
+
const ulStyleReset = { m: 0, p: 0 };
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [lockedColumns.map((column) => ((0, jsx_runtime_1.jsx)(LockedColumnItem_1.LockedColumnItem, { column: column }, column.field))), (0, jsx_runtime_1.jsx)(material_1.Stack, { component: "ul", sx: ulStyleReset, children: fields.map((field, index) => ((0, jsx_runtime_1.jsx)(SortableColumnItem_1.SortableColumnItem, { field: field, control: control, index: index }, field.id))) })] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ColDef } from "ag-grid-community";
|
|
2
|
+
export type SimpleColDef = Pick<ColDef, "field" | "headerName" | "hide" | "minWidth" | "filter" | "sortable" | "lockPosition">;
|
|
3
|
+
export type ColumnArrangerDialogProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
columns: SimpleColDef[];
|
|
6
|
+
onClose: (args: {
|
|
7
|
+
columns: SimpleColDef[];
|
|
8
|
+
}) => void;
|
|
9
|
+
title?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ColumnArrangerFormProps = {
|
|
12
|
+
columns: SimpleColDef[];
|
|
13
|
+
children: (args: {
|
|
14
|
+
lockedColumns: SimpleColDef[];
|
|
15
|
+
arranger: React.ReactNode;
|
|
16
|
+
reset: (values?: SimpleColDef | Record<string, unknown>) => void;
|
|
17
|
+
getValues: () => {
|
|
18
|
+
columns: SimpleColDef[];
|
|
19
|
+
};
|
|
20
|
+
}) => JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
export declare function ColumnArrangerDialog({ columns, open, onClose, title, }: Readonly<ColumnArrangerDialogProps>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=ColumnArrangerDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnArrangerDialog.d.ts","sourceRoot":"","sources":["../../src/ColumnArranger/ColumnArrangerDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhD,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,MAAM,EACJ,OAAO,GACP,YAAY,GACZ,MAAM,GACN,UAAU,GACV,QAAQ,GACR,UAAU,GACV,cAAc,CACjB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,CAAC,IAAI,EAAE;QACf,aAAa,EAAE,YAAY,EAAE,CAAC;QAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;QACjE,SAAS,EAAE,MAAM;YAAE,OAAO,EAAE,YAAY,EAAE,CAAA;SAAE,CAAC;KAC9C,KAAK,GAAG,CAAC,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,IAAI,EACJ,OAAO,EACP,KAAyB,GAC1B,EAAE,QAAQ,CAAC,yBAAyB,CAAC,2CAuCrC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColumnArrangerDialog = ColumnArrangerDialog;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
// components/ColumnArrangerDialog.tsx
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const Button_1 = require("../Button");
|
|
8
|
+
const Dialog_1 = require("../Dialog");
|
|
9
|
+
const ColumnArrangerForm_1 = require("./ColumnArrangerForm");
|
|
10
|
+
function ColumnArrangerDialog({ columns, open, onClose, title = "Arrange Columns", // Added default title
|
|
11
|
+
}) {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(ColumnArrangerForm_1.ColumnArrangerForm, { columns: columns, children: ({ arranger, reset, getValues, lockedColumns }) => ((0, jsx_runtime_1.jsx)(Dialog_1.Dialog, { title: title, open: open, onClose: () => onClose({ columns }), maxWidth: "xs", actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", sx: { width: "100%" }, children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "outlined", onClick: () => reset(), children: "Reset" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { "data-ptag": "submit", "data-cy": "submit", onClick: () => {
|
|
13
|
+
const values = getValues();
|
|
14
|
+
onClose({
|
|
15
|
+
columns: [...lockedColumns, ...values.columns],
|
|
16
|
+
});
|
|
17
|
+
}, children: "Save" })] }), children: arranger })) }));
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnArrangerForm.d.ts","sourceRoot":"","sources":["../../src/ColumnArranger/ColumnArrangerForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,wBAAwB,CAAC;AAMhC,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,GACT,EAAE,uBAAuB,eA2CzB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColumnArrangerForm = ColumnArrangerForm;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
7
|
+
const ColumnArranger_1 = require("./ColumnArranger");
|
|
8
|
+
function ColumnArrangerForm({ columns, children, }) {
|
|
9
|
+
const lockedColumns = (0, react_1.useMemo)(() => columns.filter((col) => "lockPosition" in col), [columns]);
|
|
10
|
+
const unlockedColumns = (0, react_1.useMemo)(() => columns.filter((col) => "hide" in col), [columns]);
|
|
11
|
+
const defaultValues = (0, react_1.useMemo)(() => ({ columns: unlockedColumns }), [unlockedColumns]);
|
|
12
|
+
const { control, reset, getValues } = (0, react_hook_form_1.useForm)({
|
|
13
|
+
defaultValues,
|
|
14
|
+
});
|
|
15
|
+
const { fields } = (0, react_hook_form_1.useFieldArray)({
|
|
16
|
+
name: "columns",
|
|
17
|
+
control,
|
|
18
|
+
});
|
|
19
|
+
const wrappedReset = (values) => {
|
|
20
|
+
reset({
|
|
21
|
+
columns: Array.isArray(values) ? values : [values],
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
return children({
|
|
25
|
+
lockedColumns,
|
|
26
|
+
reset: wrappedReset,
|
|
27
|
+
getValues,
|
|
28
|
+
arranger: ((0, jsx_runtime_1.jsx)(ColumnArranger_1.ColumnArranger, { fields: fields, lockedColumns: lockedColumns, control: control })),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Control, FieldArrayWithId } from "react-hook-form";
|
|
2
|
+
import type { SimpleColDef } from "./ColumnArrangerDialog";
|
|
3
|
+
export type ColumnItemProps = {
|
|
4
|
+
field: FieldArrayWithId<{
|
|
5
|
+
columns: SimpleColDef[];
|
|
6
|
+
}, "columns">;
|
|
7
|
+
control: Control<{
|
|
8
|
+
columns: SimpleColDef[];
|
|
9
|
+
}>;
|
|
10
|
+
index: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function ColumnItem({ field, control, index, }: Readonly<ColumnItemProps>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=ColumnItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnItem.d.ts","sourceRoot":"","sources":["../../src/ColumnArranger/ColumnItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,gBAAgB,CAAC;QAAE,OAAO,EAAE,YAAY,EAAE,CAAA;KAAE,EAAE,SAAS,CAAC,CAAC;IAChE,OAAO,EAAE,OAAO,CAAC;QAAE,OAAO,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,OAAO,EACP,KAAK,GACN,EAAE,QAAQ,CAAC,eAAe,CAAC,2CAyB3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColumnItem = ColumnItem;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const SwitchField_1 = require("../FormFields/SwitchField/SwitchField");
|
|
8
|
+
const PadBox_1 = require("../PadBox");
|
|
9
|
+
function ColumnItem({ field, control, index, }) {
|
|
10
|
+
const theme = (0, styles_1.useTheme)();
|
|
11
|
+
const { iron } = theme.palette.app.color;
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", component: "li", children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", border: "1px solid", flexGrow: 1, borderColor: iron[700], children: [(0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingLeft: "24px" }, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { flexGrow: 1 }, children: field.headerName }) }), (0, jsx_runtime_1.jsx)(SwitchField_1.SwitchField, { control: control, name: `columns.${index}.hide` })] }) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SimpleColDef } from "./ColumnArrangerDialog";
|
|
2
|
+
export type LockedColumnItemProps = {
|
|
3
|
+
column: SimpleColDef;
|
|
4
|
+
};
|
|
5
|
+
export declare function LockedColumnItem({ column }: Readonly<LockedColumnItemProps>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=LockedColumnItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LockedColumnItem.d.ts","sourceRoot":"","sources":["../../src/ColumnArranger/LockedColumnItem.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,MAAM,qBAAqB,GAAG;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,CAAC;AAE7D,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE,QAAQ,CAAC,qBAAqB,CAAC,2CA0B3E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LockedColumnItem = LockedColumnItem;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const Lock_1 = __importDefault(require("@mui/icons-material/Lock"));
|
|
9
|
+
const material_1 = require("@mui/material");
|
|
10
|
+
const PadBox_1 = require("../PadBox");
|
|
11
|
+
function LockedColumnItem({ column }) {
|
|
12
|
+
const theme = (0, material_1.useTheme)();
|
|
13
|
+
const { lightBlue, iron } = theme.palette.app.color;
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Stack, { border: "1px solid", width: "100%", bgcolor: lightBlue[100], borderColor: iron[700], children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { padding: "0px 24px" }, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", minHeight: "38px", children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: column.headerName }), (0, jsx_runtime_1.jsx)(Lock_1.default, { htmlColor: iron[800] })] }) }) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ColumnItemProps } from "./ColumnItem";
|
|
2
|
+
export type SortableColumnItemProps = Pick<ColumnItemProps, "field" | "control" | "index">;
|
|
3
|
+
export declare function SortableColumnItem({ field, control, index, }: Readonly<SortableColumnItemProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=SortableColumnItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SortableColumnItem.d.ts","sourceRoot":"","sources":["../../src/ColumnArranger/SortableColumnItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,eAAe,EACf,OAAO,GAAG,SAAS,GAAG,OAAO,CAC9B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,OAAO,EACP,KAAK,GACN,EAAE,QAAQ,CAAC,uBAAuB,CAAC,2CAEnC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SortableColumnItem = SortableColumnItem;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ColumnItem_1 = require("./ColumnItem");
|
|
6
|
+
function SortableColumnItem({ field, control, index, }) {
|
|
7
|
+
return (0, jsx_runtime_1.jsx)(ColumnItem_1.ColumnItem, { field: field, control: control, index: index });
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ColumnArranger } from "./ColumnArranger";
|
|
2
|
+
export type { ColumnArrangerProps } from "./ColumnArranger";
|
|
3
|
+
export { ColumnArrangerDialog } from "./ColumnArrangerDialog";
|
|
4
|
+
export type { ColumnArrangerDialogProps } from "./ColumnArrangerDialog";
|
|
5
|
+
export type { ColumnArrangerFormProps } from "./ColumnArrangerDialog";
|
|
6
|
+
export { ColumnArrangerForm } from "./ColumnArrangerForm";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ColumnArranger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,YAAY,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColumnArrangerForm = exports.ColumnArrangerDialog = exports.ColumnArranger = void 0;
|
|
4
|
+
var ColumnArranger_1 = require("./ColumnArranger");
|
|
5
|
+
Object.defineProperty(exports, "ColumnArranger", { enumerable: true, get: function () { return ColumnArranger_1.ColumnArranger; } });
|
|
6
|
+
var ColumnArrangerDialog_1 = require("./ColumnArrangerDialog");
|
|
7
|
+
Object.defineProperty(exports, "ColumnArrangerDialog", { enumerable: true, get: function () { return ColumnArrangerDialog_1.ColumnArrangerDialog; } });
|
|
8
|
+
var ColumnArrangerForm_1 = require("./ColumnArrangerForm");
|
|
9
|
+
Object.defineProperty(exports, "ColumnArrangerForm", { enumerable: true, get: function () { return ColumnArrangerForm_1.ColumnArrangerForm; } });
|
|
@@ -27,7 +27,7 @@ const Actions_1 = require("../Actions");
|
|
|
27
27
|
const Button_1 = require("../Button");
|
|
28
28
|
const FilterPill_1 = require("../Chips/FilterPill");
|
|
29
29
|
const FormFields_1 = require("../FormFields");
|
|
30
|
-
const
|
|
30
|
+
const SwitchField_1 = require("../FormFields/SwitchField");
|
|
31
31
|
const PadBox_1 = require("../PadBox");
|
|
32
32
|
const Toast_1 = require("../Toast");
|
|
33
33
|
const Tooltip_1 = require("../Tooltip");
|
|
@@ -278,7 +278,7 @@ const FilterListV2 = ({ filterListItems, isDisabled = false, filterListData, onA
|
|
|
278
278
|
}, children: [(0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { padding: "10px 30px" }, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", width: "100%", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", children: "Filter" }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
279
279
|
reset();
|
|
280
280
|
handleClose();
|
|
281
|
-
}, children: (0, jsx_runtime_1.jsx)(icons_1.ClearIcon, {}) })] }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: { width: "100%" } })] }), (0, jsx_runtime_1.jsx)(material_1.Stack, { flexGrow: 1, sx: { overflowX: "hidden" }, children: filterListItems.map((filter) => filter.type === "switch" ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", width: "80%", sx: { padding: "10px 5px 10px 20px ", margin: "auto" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: filter.label }), (0, jsx_runtime_1.jsx)(
|
|
281
|
+
}, children: (0, jsx_runtime_1.jsx)(icons_1.ClearIcon, {}) })] }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: { width: "100%" } })] }), (0, jsx_runtime_1.jsx)(material_1.Stack, { flexGrow: 1, sx: { overflowX: "hidden" }, children: filterListItems.map((filter) => filter.type === "switch" ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", width: "80%", sx: { padding: "10px 5px 10px 20px ", margin: "auto" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: filter.label }), (0, jsx_runtime_1.jsx)(SwitchField_1.SwitchField, { control: control, name: filter.key })] }, filter.key)) : ((0, jsx_runtime_1.jsxs)(material_1.Accordion, { defaultExpanded: !!filterListData?.[filter.key] || filter.required, disabled: filter.isDisabled, sx: {
|
|
282
282
|
"&.MuiAccordion-root.Mui-expanded": {
|
|
283
283
|
margin: "0 !important",
|
|
284
284
|
},
|
|
@@ -13,7 +13,7 @@ const FilterPopupWrapper = ({ open, anchorEl, filterItem, onClose, control, erro
|
|
|
13
13
|
selectedFilter: filterItem,
|
|
14
14
|
control,
|
|
15
15
|
errors,
|
|
16
|
-
})[filterItem.type], filterItem.type === "switch" && ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { padding: "10px 5px 10px 20px", margin: "auto" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: filterItem.label }), (0, jsx_runtime_1.jsx)(FormFields_1.
|
|
16
|
+
})[filterItem.type], filterItem.type === "switch" && ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { padding: "10px 5px 10px 20px", margin: "auto" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: filterItem.label }), (0, jsx_runtime_1.jsx)(FormFields_1.SwitchField, { control: control, name: filterItem.key })] }, filterItem.key))] }) }));
|
|
17
17
|
};
|
|
18
18
|
exports.FilterPopupWrapper = FilterPopupWrapper;
|
|
19
19
|
const FilterPopUpDateRangeWrapper = ({ open, anchorEl, filterItem, onClose, control, errors, onApply, }) => {
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FilterTypeWrapper = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
|
-
const
|
|
6
|
+
const SwitchField_1 = require("../FormFields/SwitchField");
|
|
7
7
|
const FilterTypeWrapper = ({ filter, control, }) => {
|
|
8
8
|
const getFilterByType = (type) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", width: "100%", justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: filter.label }), type === "switch" ? ((0, jsx_runtime_1.jsx)(
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", width: "100%", justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: filter.label }), type === "switch" ? ((0, jsx_runtime_1.jsx)(SwitchField_1.SwitchField, { control: control, name: filter.key })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: filter.menuInfo }))] }));
|
|
10
10
|
};
|
|
11
11
|
return (0, jsx_runtime_1.jsx)(material_1.ListItemButton, { children: getFilterByType(filter.type) });
|
|
12
12
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/SwitchField/Skeleton.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,+CASpB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type ControllerRenderProps, type FieldValues, type UseControllerProps } from "react-hook-form";
|
|
2
1
|
import type { SwitchProps } from "@mui/material";
|
|
2
|
+
import { type ControllerRenderProps, type FieldValues, type UseControllerProps } from "react-hook-form";
|
|
3
3
|
export type SwitchFieldProps<P extends FieldValues> = UseControllerProps<P> & Omit<Omit<SwitchProps, "checked">, keyof ControllerRenderProps<P>> & {
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare function
|
|
7
|
-
//# sourceMappingURL=
|
|
6
|
+
export declare function SwitchField<P extends FieldValues>({ name, rules, control, defaultValue, loading, ...restSwitchProps }: SwitchFieldProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=SwitchField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchField.d.ts","sourceRoot":"","sources":["../../../src/FormFields/SwitchField/SwitchField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,WAAW,IAAI,kBAAkB,CAAC,CAAC,CAAC,GACzE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEJ,wBAAgB,WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,EACjD,IAAI,EACJ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,OAAe,EACf,GAAG,eAAe,EACnB,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAwDrB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SwitchField = SwitchField;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
7
|
+
const Skeleton_1 = require("./Skeleton");
|
|
8
|
+
function SwitchField({ name, rules, control, defaultValue, loading = false, ...restSwitchProps }) {
|
|
9
|
+
const theme = (0, material_1.useTheme)();
|
|
10
|
+
const { butterflyBlue, iron } = theme.palette.app.color;
|
|
11
|
+
const { field: { value = false, ...restField }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
|
|
12
|
+
if (loading) {
|
|
13
|
+
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, {});
|
|
14
|
+
}
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Switch, { checked: value, ...restField, ...restSwitchProps, sx: {
|
|
16
|
+
padding: 1,
|
|
17
|
+
"& .MuiSwitch-track": {
|
|
18
|
+
borderRadius: 11,
|
|
19
|
+
backgroundColor: iron[900],
|
|
20
|
+
position: "relative",
|
|
21
|
+
"&::before": {
|
|
22
|
+
content: "unset",
|
|
23
|
+
position: "absolute",
|
|
24
|
+
top: "50%",
|
|
25
|
+
transform: "translateY(-50%)",
|
|
26
|
+
width: 16,
|
|
27
|
+
height: 16,
|
|
28
|
+
left: 12,
|
|
29
|
+
},
|
|
30
|
+
"&::after": {
|
|
31
|
+
content: "unset",
|
|
32
|
+
position: "absolute",
|
|
33
|
+
top: "50%",
|
|
34
|
+
transform: "translateY(-50%)",
|
|
35
|
+
width: 16,
|
|
36
|
+
height: 16,
|
|
37
|
+
right: 12,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
"& .MuiSwitch-thumb": {
|
|
41
|
+
boxShadow: "none",
|
|
42
|
+
width: 16,
|
|
43
|
+
height: 16,
|
|
44
|
+
margin: 0.15,
|
|
45
|
+
color: "white",
|
|
46
|
+
},
|
|
47
|
+
"& .Mui-checked + .MuiSwitch-track": {
|
|
48
|
+
backgroundColor: butterflyBlue[900],
|
|
49
|
+
},
|
|
50
|
+
} }));
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFields/SwitchField/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./SwitchField"), exports);
|
|
@@ -11,7 +11,7 @@ export * from "./PasswordField";
|
|
|
11
11
|
export * from "./PhoneInputField";
|
|
12
12
|
export * from "./RadioGroupField";
|
|
13
13
|
export * from "./SearchField";
|
|
14
|
-
export * from "./
|
|
14
|
+
export * from "./SwitchField";
|
|
15
15
|
export * from "./TextField";
|
|
16
16
|
export * from "./TimeField";
|
|
17
17
|
export * from "./TimePicker";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FormFields/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FormFields/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
|
@@ -27,7 +27,7 @@ __exportStar(require("./PasswordField"), exports);
|
|
|
27
27
|
__exportStar(require("./PhoneInputField"), exports);
|
|
28
28
|
__exportStar(require("./RadioGroupField"), exports);
|
|
29
29
|
__exportStar(require("./SearchField"), exports);
|
|
30
|
-
__exportStar(require("./
|
|
30
|
+
__exportStar(require("./SwitchField"), exports);
|
|
31
31
|
__exportStar(require("./TextField"), exports);
|
|
32
32
|
__exportStar(require("./TimeField"), exports);
|
|
33
33
|
__exportStar(require("./TimePicker"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SvgColumn.d.ts","sourceRoot":"","sources":["../../src/Svgs/SvgColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,eAAO,MAAM,SAAS,GAAI,OAAO,YAAY,4CAiC5C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SvgColumn = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const SvgColumn = (props) => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { width: 42, height: 43, viewBox: "0 0 42 43", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [(0, jsx_runtime_1.jsx)("rect", { x: 0.5, y: 1, width: 41, height: 41, rx: 3.5, fill: "white" }), (0, jsx_runtime_1.jsx)("rect", { x: 0.5, y: 1, width: 41, height: 41, rx: 3.5, stroke: "#BCBFC2" }), (0, jsx_runtime_1.jsx)("g", { clipPath: "url(#clip0_38460_84386)", children: (0, jsx_runtime_1.jsx)("path", { d: "M18 12.5V30.5M24 12.5V30.5M16.8 12.5H25.2C26.8802 12.5 27.7202 12.5 28.362 12.827C28.9265 13.1146 29.3854 13.5735 29.673 14.138C30 14.7798 30 15.6198 30 17.3V25.7C30 27.3802 30 28.2202 29.673 28.862C29.3854 29.4265 28.9265 29.8854 28.362 30.173C27.7202 30.5 26.8802 30.5 25.2 30.5H16.8C15.1198 30.5 14.2798 30.5 13.638 30.173C13.0735 29.8854 12.6146 29.4265 12.327 28.862C12 28.2202 12 27.3802 12 25.7V17.3C12 15.6198 12 14.7798 12.327 14.138C12.6146 13.5735 13.0735 13.1146 13.638 12.827C14.2798 12.5 15.1198 12.5 16.8 12.5Z", stroke: "#151E28", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }), (0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: "clip0_38460_84386", children: (0, jsx_runtime_1.jsx)("rect", { width: 20, height: 20, fill: "white", transform: "translate(11 11.5)" }) }) })] }));
|
|
7
|
+
};
|
|
8
|
+
exports.SvgColumn = SvgColumn;
|
|
@@ -5,15 +5,16 @@ export * from "./ImportExcelSuccessIcon";
|
|
|
5
5
|
export * from "./LogoIcon";
|
|
6
6
|
export * from "./SvgAdd";
|
|
7
7
|
export * from "./SvgCalendar";
|
|
8
|
+
export * from "./SvgColumn";
|
|
8
9
|
export * from "./SvgConfigure";
|
|
9
10
|
export * from "./SvgDelete";
|
|
10
11
|
export * from "./SvgDownload";
|
|
12
|
+
export * from "./SvgDrop";
|
|
11
13
|
export * from "./SvgExport";
|
|
14
|
+
export * from "./SvgHome";
|
|
12
15
|
export * from "./SvgImport";
|
|
13
16
|
export * from "./SvgNoLogo";
|
|
14
17
|
export * from "./SvgNoSign";
|
|
15
18
|
export * from "./SvgProfile";
|
|
16
|
-
export * from "./SvgDrop";
|
|
17
|
-
export * from "./SvgHome";
|
|
18
19
|
export * from "./SvgView";
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Svgs/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Svgs/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -21,14 +21,15 @@ __exportStar(require("./ImportExcelSuccessIcon"), exports);
|
|
|
21
21
|
__exportStar(require("./LogoIcon"), exports);
|
|
22
22
|
__exportStar(require("./SvgAdd"), exports);
|
|
23
23
|
__exportStar(require("./SvgCalendar"), exports);
|
|
24
|
+
__exportStar(require("./SvgColumn"), exports);
|
|
24
25
|
__exportStar(require("./SvgConfigure"), exports);
|
|
25
26
|
__exportStar(require("./SvgDelete"), exports);
|
|
26
27
|
__exportStar(require("./SvgDownload"), exports);
|
|
28
|
+
__exportStar(require("./SvgDrop"), exports);
|
|
27
29
|
__exportStar(require("./SvgExport"), exports);
|
|
30
|
+
__exportStar(require("./SvgHome"), exports);
|
|
28
31
|
__exportStar(require("./SvgImport"), exports);
|
|
29
32
|
__exportStar(require("./SvgNoLogo"), exports);
|
|
30
33
|
__exportStar(require("./SvgNoSign"), exports);
|
|
31
34
|
__exportStar(require("./SvgProfile"), exports);
|
|
32
|
-
__exportStar(require("./SvgDrop"), exports);
|
|
33
|
-
__exportStar(require("./SvgHome"), exports);
|
|
34
35
|
__exportStar(require("./SvgView"), exports);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type WorkDayType } from "../utils/colorVariant";
|
|
2
2
|
type AttendanceStatusProps = {
|
|
3
3
|
variant: WorkDayType;
|
|
4
|
+
leaveColor?: string;
|
|
5
|
+
toolTipLabel?: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const AttendanceStatus: ({ variant }: AttendanceStatusProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const AttendanceStatus: ({ variant, leaveColor, toolTipLabel, }: AttendanceStatusProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export {};
|
|
7
9
|
//# sourceMappingURL=AttendanceStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttendanceStatus.d.ts","sourceRoot":"","sources":["../../src/Timeline/AttendanceStatus.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttendanceStatus.d.ts","sourceRoot":"","sources":["../../src/Timeline/AttendanceStatus.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAE/B,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,wCAI9B,qBAAqB,4CA6CvB,CAAC"}
|
|
@@ -3,28 +3,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AttendanceStatus = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
|
+
const Tooltip_1 = require("../Tooltip");
|
|
6
7
|
const colorVariant_1 = require("../utils/colorVariant");
|
|
7
|
-
const AttendanceStatus = ({ variant }) => {
|
|
8
|
+
const AttendanceStatus = ({ variant, leaveColor, toolTipLabel, }) => {
|
|
8
9
|
const color = (0, colorVariant_1.getColorByVariant)(variant);
|
|
9
10
|
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { sx: { position: "relative", width: "100%", alignItems: "center" }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
10
11
|
position: "absolute",
|
|
11
12
|
backgroundColor: "#ffffff",
|
|
12
|
-
border: `1px solid ${color}`,
|
|
13
|
+
border: `1px solid ${leaveColor ?? color}`,
|
|
13
14
|
borderRadius: "7px",
|
|
14
15
|
padding: "0px 5px",
|
|
15
16
|
zIndex: 1,
|
|
16
|
-
color: `${color}`,
|
|
17
|
+
color: `${leaveColor ?? color}`,
|
|
17
18
|
height: "28px",
|
|
18
19
|
display: "flex",
|
|
19
20
|
alignItems: "center",
|
|
20
|
-
|
|
21
|
+
cursor: "pointer",
|
|
22
|
+
}, children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: toolTipLabel, children: (0, colorVariant_1.getStatusLabel)(variant) }) }), (0, jsx_runtime_1.jsx)(material_1.Slider, { valueLabelDisplay: "off", value: [0, 2], max: 2, step: 1, sx: {
|
|
21
23
|
"& .MuiSlider-track": {
|
|
22
|
-
background: `${color}`,
|
|
24
|
+
background: `${leaveColor ?? color}`,
|
|
23
25
|
height: "2px",
|
|
24
26
|
border: "none",
|
|
25
27
|
},
|
|
26
28
|
"& .MuiSlider-thumb": {
|
|
27
|
-
backgroundColor: `${color}`,
|
|
29
|
+
backgroundColor: `${leaveColor ?? color}`,
|
|
28
30
|
height: 8,
|
|
29
31
|
width: 8,
|
|
30
32
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../src/Timeline/Timeline.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../src/Timeline/Timeline.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,WAQzC,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,mFAMtB,aAAa,4CA0Hf,CAAC"}
|
|
@@ -53,7 +53,7 @@ const Timeline = ({ totalDots, highlightedIntervals, shiftStartTime, shiftEndTim
|
|
|
53
53
|
top: "12px",
|
|
54
54
|
zIndex: 2,
|
|
55
55
|
left: `${(((getArrowPosition(shiftStartTime, shiftEndTime, "END") - slotStartTime) % totalDots) / (totalDots - 0.5)) * 100}%`,
|
|
56
|
-
}, children: (0, jsx_runtime_1.jsx)(ArrowUp_1.ArrowUp, {}) }) }), (0, jsx_runtime_1.jsx)(material_1.Slider, { valueLabelDisplay: "off", marks: marks, max: totalDots - 1, step: 1, value: [], sx: {
|
|
56
|
+
}, children: (0, jsx_runtime_1.jsx)(ArrowUp_1.ArrowUp, {}) }) }), (0, jsx_runtime_1.jsx)(material_1.Slider, { disabled: true, valueLabelDisplay: "off", marks: marks, max: totalDots - 1, step: 1, value: [], sx: {
|
|
57
57
|
zIndex: 1,
|
|
58
58
|
"& .MuiSlider-track": {
|
|
59
59
|
background: "transparent",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimelineTrackSegments.d.ts","sourceRoot":"","sources":["../../src/Timeline/TimelineTrackSegments.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAErE,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,0CAInC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"TimelineTrackSegments.d.ts","sourceRoot":"","sources":["../../src/Timeline/TimelineTrackSegments.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAErE,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,0CAInC,0BAA0B,4CAoH5B,CAAC"}
|
|
@@ -32,8 +32,9 @@ const TimelineTrackSegments = ({ totalDots, intervals, startTimeline, }) => {
|
|
|
32
32
|
}
|
|
33
33
|
const startPercent = (((in_time - startTimeline) % totalDots) / (totalDots - 1)) * 100;
|
|
34
34
|
const endPercent = (((out_time - startTimeline) % totalDots) / (totalDots - 1)) * 100;
|
|
35
|
-
const labelText =
|
|
36
|
-
|
|
35
|
+
const labelText = interval?.name ??
|
|
36
|
+
`In/Out: ${(0, date_1.getTimeInHHmm)(interval.in_time)} - ${(0, date_1.getTimeInHHmm)(interval.out_time)} (${shiftHours})`;
|
|
37
|
+
const color = interval?.color ?? (0, colorVariant_1.getColorByVariant)(interval.status_type);
|
|
37
38
|
return (
|
|
38
39
|
// eslint-disable-next-line sonarjs/no-array-index-key
|
|
39
40
|
(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", children: [isValidInTime && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { arrow: true, title: inTimeLabel, placement: "top", children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./Button"), exports);
|
|
|
23
23
|
__exportStar(require("./Card"), exports);
|
|
24
24
|
__exportStar(require("./Charts"), exports);
|
|
25
25
|
__exportStar(require("./Chips"), exports);
|
|
26
|
+
__exportStar(require("./ColumnArranger"), exports);
|
|
26
27
|
__exportStar(require("./ContentBox"), exports);
|
|
27
28
|
__exportStar(require("./Dialog"), exports);
|
|
28
29
|
__exportStar(require("./Drawer"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type WorkDayType = "present" | "holiday" | "weekly_off" | "working" | "first_half_off" | "second_half_off" | "full_day_weekly_off" | "first_half_weekly_off" | "second_half_weekly_off" | "paid_leave" | "absent" | "late_in_early_out" | "unpaid_leave" | "loss_of_pay" | "penalty";
|
|
2
|
-
export type WorkDayTypeShort = "P" | "H" | "WO" | "HO" | "FHWO" | "SHWO" | "PL" | "A" | "LIEO" | "UPL" | "PEN" | "LOP";
|
|
1
|
+
export type WorkDayType = "present" | "holiday" | "weekly_off" | "working" | "first_half_off" | "second_half_off" | "full_day_weekly_off" | "first_half_weekly_off" | "second_half_weekly_off" | "paid_leave" | "absent" | "late_in_early_out" | "unpaid_leave" | "loss_of_pay" | "penalty" | "first_half_paid_leave" | "second_half_paid_leave" | "full_day_paid_leave" | "first_half_unpaid_leave" | "second_half_unpaid_leave" | "full_day_unpaid_leave" | "leave";
|
|
2
|
+
export type WorkDayTypeShort = "P" | "H" | "WO" | "HO" | "FHWO" | "SHWO" | "PL" | "A" | "LIEO" | "UPL" | "PEN" | "LOP" | "L";
|
|
3
3
|
export declare const serverityOptions: Record<WorkDayType, WorkDayTypeShort>;
|
|
4
4
|
export declare const getColorByVariant: (variant: WorkDayType, type?: string) => string | undefined;
|
|
5
|
-
export declare const getStatusLabel: (status: WorkDayType) => "Present" | "Absent" | "Weekly Off" | "Working" | "Holiday" | "Paid Leave" | "Unpaid Leave" | "First Half Weekly Off" | "Second Half Weekly Off" | "First Half Off" | "Second Half Off" | "Late In/Early Out" | "Loss of Pay" | "Penalty";
|
|
5
|
+
export declare const getStatusLabel: (status: WorkDayType) => "Present" | "Absent" | "Weekly Off" | "Working" | "Holiday" | "Paid Leave" | "Unpaid Leave" | "First Half Weekly Off" | "Second Half Weekly Off" | "First Half Off" | "Second Half Off" | "Late In/Early Out" | "Loss of Pay" | "Penalty" | "First Half Paid Leave" | "Second Half Paid Leave" | "Full Day Paid Leave" | "First Half Unpaid Leave" | "Second Half Unpaid Leave" | "Full Day Unpaid Leave" | "Leave";
|
|
6
6
|
//# sourceMappingURL=colorVariant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorVariant.d.ts","sourceRoot":"","sources":["../../src/utils/colorVariant.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,SAAS,GACT,YAAY,GACZ,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,uBAAuB,GACvB,wBAAwB,GACxB,YAAY,GACZ,QAAQ,GACR,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"colorVariant.d.ts","sourceRoot":"","sources":["../../src/utils/colorVariant.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,SAAS,GACT,YAAY,GACZ,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,uBAAuB,GACvB,wBAAwB,GACxB,YAAY,GACZ,QAAQ,GACR,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,SAAS,GACT,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,GACrB,yBAAyB,GACzB,0BAA0B,GAC1B,uBAAuB,GACvB,OAAO,CAAC;AAEZ,MAAM,MAAM,gBAAgB,GACxB,GAAG,GACH,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,MAAM,GACN,IAAI,GACJ,GAAG,GACH,MAAM,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,GAAG,CAAC;AAER,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE,gBAAgB,CAuBlE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,SAAS,WAAW,EAAE,aAAa,uBA4EpE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,QAAQ,WAAW,wZAuEjD,CAAC"}
|
|
@@ -10,14 +10,21 @@ exports.serverityOptions = {
|
|
|
10
10
|
first_half_off: "HO",
|
|
11
11
|
second_half_off: "HO",
|
|
12
12
|
full_day_weekly_off: "WO",
|
|
13
|
-
first_half_weekly_off: "
|
|
14
|
-
second_half_weekly_off: "
|
|
13
|
+
first_half_weekly_off: "WO",
|
|
14
|
+
second_half_weekly_off: "WO",
|
|
15
15
|
paid_leave: "PL",
|
|
16
16
|
absent: "A",
|
|
17
17
|
unpaid_leave: "UPL",
|
|
18
18
|
late_in_early_out: "LIEO",
|
|
19
19
|
loss_of_pay: "LOP",
|
|
20
20
|
penalty: "PEN",
|
|
21
|
+
first_half_paid_leave: "L",
|
|
22
|
+
second_half_paid_leave: "L",
|
|
23
|
+
full_day_paid_leave: "L",
|
|
24
|
+
first_half_unpaid_leave: "L",
|
|
25
|
+
second_half_unpaid_leave: "L",
|
|
26
|
+
full_day_unpaid_leave: "L",
|
|
27
|
+
leave: "L",
|
|
21
28
|
};
|
|
22
29
|
const getColorByVariant = (variant, type = "dark") => {
|
|
23
30
|
const theme = (0, material_1.useTheme)();
|
|
@@ -55,6 +62,18 @@ const getColorByVariant = (variant, type = "dark") => {
|
|
|
55
62
|
return lipstickRed[800];
|
|
56
63
|
case "penalty":
|
|
57
64
|
return lipstickRed[index];
|
|
65
|
+
case "first_half_paid_leave":
|
|
66
|
+
return orchid[index];
|
|
67
|
+
case "second_half_paid_leave":
|
|
68
|
+
return orchid[index];
|
|
69
|
+
case "full_day_paid_leave":
|
|
70
|
+
return orchid[index];
|
|
71
|
+
case "first_half_unpaid_leave":
|
|
72
|
+
return deepAqua[index];
|
|
73
|
+
case "second_half_unpaid_leave":
|
|
74
|
+
return deepAqua[index];
|
|
75
|
+
case "full_day_unpaid_leave":
|
|
76
|
+
return deepAqua[index];
|
|
58
77
|
default:
|
|
59
78
|
return lipstickRed[index];
|
|
60
79
|
}
|
|
@@ -92,6 +111,20 @@ const getStatusLabel = (status) => {
|
|
|
92
111
|
return "Loss of Pay";
|
|
93
112
|
case "penalty":
|
|
94
113
|
return "Penalty";
|
|
114
|
+
case "first_half_paid_leave":
|
|
115
|
+
return "First Half Paid Leave";
|
|
116
|
+
case "second_half_paid_leave":
|
|
117
|
+
return "Second Half Paid Leave";
|
|
118
|
+
case "full_day_paid_leave":
|
|
119
|
+
return "Full Day Paid Leave";
|
|
120
|
+
case "first_half_unpaid_leave":
|
|
121
|
+
return "First Half Unpaid Leave";
|
|
122
|
+
case "second_half_unpaid_leave":
|
|
123
|
+
return "Second Half Unpaid Leave";
|
|
124
|
+
case "full_day_unpaid_leave":
|
|
125
|
+
return "Full Day Unpaid Leave";
|
|
126
|
+
case "leave":
|
|
127
|
+
return "Leave";
|
|
95
128
|
default:
|
|
96
129
|
return "Absent";
|
|
97
130
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Switch/Skeleton.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,+CASpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,WAAW,IAAI,kBAAkB,CAAC,CAAC,CAAC,GACzE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEJ,wBAAgB,MAAM,CAAC,CAAC,SAAS,WAAW,EAAE,EAC5C,IAAI,EACJ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,OAAe,EACf,GAAG,eAAe,EACnB,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAUrB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Switch = Switch;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_hook_form_1 = require("react-hook-form");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const Skeleton_1 = require("./Skeleton");
|
|
8
|
-
function Switch({ name, rules, control, defaultValue, loading = false, ...restSwitchProps }) {
|
|
9
|
-
const { field: { value = false, ...restField }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
|
|
10
|
-
if (loading) {
|
|
11
|
-
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, {});
|
|
12
|
-
}
|
|
13
|
-
return (0, jsx_runtime_1.jsx)(material_1.Switch, { checked: value, ...restField, ...restSwitchProps });
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Switch/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
File without changes
|
|
File without changes
|