@vidispine/vdt-mui 23.2.0-pre.2 → 23.2.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/cjs/_utils/generateBadges.js +1 -0
- package/dist/cjs/_utils/isDefinedValue.js +1 -0
- package/dist/cjs/_utils/omit.js +1 -0
- package/dist/cjs/_utils/showSlot.js +1 -0
- package/dist/cjs/_utils/uuidv4.js +1 -0
- package/dist/cjs/_utils/withOverrides.js +1 -0
- package/dist/cjs/collection/CollectionCard/CollectionCard.js +1 -0
- package/dist/cjs/collection/CollectionCard/components/CollectionCardMedia.js +1 -0
- package/dist/cjs/collection/CollectionCard/index.js +1 -0
- package/dist/cjs/collection/CollectionList/CollectionList.js +1 -0
- package/dist/cjs/collection/CollectionList/index.js +1 -0
- package/dist/cjs/collection/CollectionListItem/CollectionListItem.js +1 -0
- package/dist/cjs/collection/CollectionListItem/index.js +1 -0
- package/dist/cjs/collection/CollectionRepresentativeThumbnail/CollectionRepresentativeThumbnail.js +1 -0
- package/dist/cjs/collection/CollectionRepresentativeThumbnail/index.js +1 -0
- package/dist/cjs/entity/EntityAvatar/EntityAvatar.js +1 -0
- package/dist/cjs/entity/EntityAvatar/index.js +1 -0
- package/dist/cjs/entity/EntityCard/components/EntityCardActions.js +1 -0
- package/dist/cjs/entity/EntityCard/components/EntityCardBase.js +1 -0
- package/dist/cjs/entity/EntityCard/components/EntityCardContent.js +1 -0
- package/dist/cjs/entity/EntityCard/components/EntityCardHeader.js +1 -0
- package/dist/cjs/entity/EntityIcon/EntityIcon.js +1 -0
- package/dist/cjs/entity/EntityIcon/index.js +1 -0
- package/dist/cjs/entity/EntityList/EntityList.js +1 -0
- package/dist/cjs/entity/EntityList/index.js +1 -0
- package/dist/cjs/entity/EntityListItem/components/EntityListItemAvatar.js +1 -0
- package/dist/cjs/entity/EntityListItem/components/EntityListItemButton.js +1 -0
- package/dist/cjs/entity/EntityListItem/components/EntityListItemSecondaryAction.js +1 -0
- package/dist/cjs/entity/EntityListItem/components/EntityListItemText.js +1 -0
- package/dist/cjs/entity/EntityTableRow/components/EntityTableCellAvatar.js +1 -0
- package/dist/cjs/entity/EntityTableRow/components/EntityTableCellCheckbox.js +1 -0
- package/dist/cjs/entity/_utils/getEntityProp.js +1 -0
- package/dist/cjs/entity/_utils/getEntityText.js +1 -0
- package/dist/cjs/general/AvatarMenu/AvatarMenu.js +1 -0
- package/dist/cjs/general/AvatarMenu/components/Avatar.js +1 -0
- package/dist/cjs/general/AvatarMenu/components/MenuItem.js +1 -0
- package/dist/cjs/general/AvatarMenu/index.js +1 -0
- package/dist/cjs/general/BlurredBackground/BlurredBackground.js +1 -0
- package/dist/cjs/general/BlurredBackground/index.js +1 -0
- package/dist/cjs/general/CalendarPicker/CalendarPicker.js +1 -0
- package/dist/cjs/general/CalendarPicker/components/PickersDay.js +1 -0
- package/dist/cjs/general/CalendarPicker/index.js +1 -0
- package/dist/cjs/general/CalendarPicker/utils/index.js +1 -0
- package/dist/cjs/general/CompactBadge/CompactBadge.js +1 -0
- package/dist/cjs/general/CompactBadge/index.js +1 -0
- package/dist/cjs/general/CompactLabel/CompactLabel.js +1 -0
- package/dist/cjs/general/CompactLabel/index.js +1 -0
- package/dist/cjs/general/CornerLabelPlacer/CornerLabelPlacer.js +1 -0
- package/dist/cjs/general/CornerLabelPlacer/index.js +1 -0
- package/dist/cjs/general/ExpandButton/ExpandButton.js +1 -0
- package/dist/cjs/general/ExpandButton/index.js +1 -0
- package/dist/cjs/general/Form/Form.js +1 -0
- package/dist/cjs/general/Form/index.js +1 -0
- package/dist/cjs/general/ImageCollage/ImageCollage.js +1 -0
- package/dist/cjs/general/ImageCollage/index.js +1 -0
- package/dist/cjs/general/MediaIcon/MediaIcon.js +1 -0
- package/dist/cjs/general/MediaIcon/index.js +1 -0
- package/dist/cjs/general/MenuItem/MenuItem.js +1 -0
- package/dist/cjs/general/MenuItem/index.js +1 -0
- package/dist/cjs/general/ScrubLine/ScrubLine.js +1 -0
- package/dist/cjs/general/ScrubLine/index.js +1 -0
- package/dist/cjs/general/Sort/Sort.js +1 -0
- package/dist/cjs/general/Sort/components/ButtonBase.js +1 -0
- package/dist/cjs/general/Sort/components/MenuItem.js +1 -0
- package/dist/cjs/general/Sort/index.js +1 -0
- package/dist/cjs/general/TablePagination/TablePagination.js +1 -0
- package/dist/cjs/general/TablePagination/index.js +1 -0
- package/dist/cjs/general/ThemeContext/ThemeContext.js +1 -0
- package/dist/cjs/inputs/BasicDateTimeInput/BasicDateTimeInput.js +1 -0
- package/dist/cjs/inputs/BasicDateTimeInput/index.js +1 -0
- package/dist/cjs/inputs/BooleanInput/BooleanInput.js +1 -0
- package/dist/cjs/inputs/BooleanInput/index.js +1 -0
- package/dist/cjs/inputs/CheckboxGroupInput/CheckboxGroupInput.js +1 -0
- package/dist/cjs/inputs/CheckboxGroupInput/components/CheckboxGroup.js +1 -0
- package/dist/cjs/inputs/CheckboxGroupInput/index.js +1 -0
- package/dist/cjs/inputs/DateRangeInput/DateRangeInput.js +1 -0
- package/dist/cjs/inputs/DateRangeInput/components/utils/valueManagers.js +1 -0
- package/dist/cjs/inputs/DateRangeInput/index.js +1 -0
- package/dist/cjs/inputs/DateRangeInput/utils/dateHelpers.js +1 -0
- package/dist/cjs/inputs/DateTimeInput/DateTimeInput.js +1 -0
- package/dist/cjs/inputs/DateTimeInput/index.js +1 -0
- package/dist/cjs/inputs/MaskedTextInput/MaskedTextInput.js +1 -0
- package/dist/cjs/inputs/MaskedTextInput/components/MaskedInputComponent.js +1 -0
- package/dist/cjs/inputs/MaskedTextInput/index.js +1 -0
- package/dist/cjs/inputs/NumberInput/NumberInput.js +1 -0
- package/dist/cjs/inputs/NumberInput/index.js +1 -0
- package/dist/cjs/inputs/RadioGroupInput/RadioGroupInput.js +1 -0
- package/dist/cjs/inputs/RadioGroupInput/components/RadioGroup.js +1 -0
- package/dist/cjs/inputs/RadioGroupInput/index.js +1 -0
- package/dist/cjs/inputs/SelectInput/SelectInput.js +1 -0
- package/dist/cjs/inputs/SelectInput/index.js +1 -0
- package/dist/cjs/inputs/SliderInput/SliderInput.js +1 -0
- package/dist/cjs/inputs/SliderInput/components/Slider.js +1 -0
- package/dist/cjs/inputs/SliderInput/index.js +1 -0
- package/dist/cjs/inputs/TagInput/TagInput.js +1 -0
- package/dist/cjs/inputs/TagInput/index.js +1 -0
- package/dist/cjs/inputs/TextInput/TextInput.js +1 -0
- package/dist/cjs/inputs/TextInput/index.js +1 -0
- package/dist/cjs/inputs/_components/FormControlLabel.js +1 -0
- package/dist/cjs/inputs/_components/MenuItem.js +1 -0
- package/dist/cjs/item/ItemCard/ItemCard.js +1 -0
- package/dist/cjs/item/ItemCard/components/ItemCardMedia.js +1 -0
- package/dist/cjs/item/ItemCard/index.js +1 -0
- package/dist/cjs/item/ItemList/ItemList.js +1 -0
- package/dist/cjs/item/ItemList/index.js +1 -0
- package/dist/cjs/item/ItemListItem/ItemListItem.js +1 -0
- package/dist/cjs/item/ItemListItem/index.js +1 -0
- package/dist/cjs/item/ItemPoster/ItemPoster.js +1 -0
- package/dist/cjs/item/ItemPoster/index.js +1 -0
- package/dist/cjs/item/ItemPosterList/ItemPosterList.js +1 -0
- package/dist/cjs/item/ItemPosterList/index.js +1 -0
- package/dist/cjs/item/ItemPosterViewer/ItemPosterViewer.js +1 -0
- package/dist/cjs/item/ItemPosterViewer/components/Toolbar.js +1 -0
- package/dist/cjs/item/ItemPosterViewer/index.js +1 -0
- package/dist/cjs/item/ItemTable/ItemTable.js +1 -0
- package/dist/cjs/item/ItemTable/components/ItemTableHead.js +1 -0
- package/dist/cjs/item/ItemTable/index.js +1 -0
- package/dist/cjs/item/ItemTableRow/ItemTableRow.js +1 -0
- package/dist/cjs/item/ItemTableRow/index.js +1 -0
- package/dist/cjs/item/ItemThumbnail/ItemThumbnail.js +1 -0
- package/dist/cjs/item/ItemThumbnail/index.js +1 -0
- package/dist/cjs/search/SearchFilterForm/SearchFilterForm.js +1 -0
- package/dist/cjs/search/SearchFilterForm/hooks/UseSearchFilterFormInputs.js +1 -0
- package/dist/cjs/search/SearchFilterForm/index.js +1 -0
- package/dist/cjs/search/SearchFilterForm/utils/mapValuesToFilter.js +1 -0
- package/dist/cjs/shape/ShapeMediaBadges/ShapeMediaBadges.js +1 -0
- package/dist/cjs/shape/ShapeMediaBadges/index.js +1 -0
- package/dist/cjs/transcode/TranscodePresetMediaBadges/TranscodePresetMediaBadges.js +1 -0
- package/dist/cjs/transcode/TranscodePresetMediaBadges/index.js +1 -0
- package/dist/es/_utils/generateBadges.js +75 -0
- package/dist/es/_utils/isDefinedValue.js +6 -0
- package/dist/es/_utils/omit.js +9 -0
- package/dist/es/_utils/showSlot.js +4 -0
- package/dist/es/_utils/uuidv4.js +7 -0
- package/dist/es/_utils/withOverrides.js +37 -0
- package/dist/es/collection/CollectionCard/CollectionCard.js +292 -0
- package/dist/es/collection/CollectionCard/components/CollectionCardMedia.js +14 -0
- package/dist/es/collection/CollectionCard/index.js +11 -0
- package/dist/es/collection/CollectionList/CollectionList.js +159 -0
- package/dist/es/collection/CollectionList/index.js +11 -0
- package/dist/es/collection/CollectionListItem/CollectionListItem.js +122 -0
- package/dist/es/collection/CollectionListItem/index.js +11 -0
- package/dist/es/collection/CollectionRepresentativeThumbnail/CollectionRepresentativeThumbnail.js +169 -0
- package/dist/es/collection/CollectionRepresentativeThumbnail/index.js +11 -0
- package/dist/es/entity/EntityAvatar/EntityAvatar.js +102 -0
- package/dist/es/entity/EntityAvatar/index.js +11 -0
- package/dist/es/entity/EntityCard/components/EntityCardActions.js +68 -0
- package/dist/es/entity/EntityCard/components/EntityCardBase.js +43 -0
- package/dist/es/entity/EntityCard/components/EntityCardContent.js +34 -0
- package/dist/es/entity/EntityCard/components/EntityCardHeader.js +115 -0
- package/dist/es/entity/EntityIcon/EntityIcon.js +107 -0
- package/dist/es/entity/EntityIcon/index.js +11 -0
- package/dist/es/entity/EntityList/EntityList.js +211 -0
- package/dist/es/entity/EntityList/index.js +11 -0
- package/dist/es/entity/EntityListItem/components/EntityListItemAvatar.js +26 -0
- package/dist/es/entity/EntityListItem/components/EntityListItemButton.js +27 -0
- package/dist/es/entity/EntityListItem/components/EntityListItemSecondaryAction.js +27 -0
- package/dist/es/entity/EntityListItem/components/EntityListItemText.js +26 -0
- package/dist/es/entity/EntityTableRow/components/EntityTableCellAvatar.js +26 -0
- package/dist/es/entity/EntityTableRow/components/EntityTableCellCheckbox.js +19 -0
- package/dist/es/entity/_utils/getEntityProp.js +11 -0
- package/dist/es/entity/_utils/getEntityText.js +34 -0
- package/dist/es/general/AvatarMenu/AvatarMenu.js +153 -0
- package/dist/es/general/AvatarMenu/components/Avatar.js +30 -0
- package/dist/es/general/AvatarMenu/components/MenuItem.js +29 -0
- package/dist/es/general/AvatarMenu/index.js +11 -0
- package/dist/es/general/BlurredBackground/BlurredBackground.js +85 -0
- package/dist/es/general/BlurredBackground/index.js +11 -0
- package/dist/es/general/CalendarPicker/CalendarPicker.js +397 -0
- package/dist/es/general/CalendarPicker/components/PickersDay.js +71 -0
- package/dist/es/general/CalendarPicker/index.js +11 -0
- package/dist/es/general/CalendarPicker/utils/index.js +17 -0
- package/dist/es/general/CompactBadge/CompactBadge.js +65 -0
- package/dist/es/general/CompactBadge/index.js +11 -0
- package/dist/es/general/CompactLabel/CompactLabel.js +70 -0
- package/dist/es/general/CompactLabel/index.js +11 -0
- package/dist/es/general/CornerLabelPlacer/CornerLabelPlacer.js +105 -0
- package/dist/es/general/CornerLabelPlacer/index.js +11 -0
- package/dist/es/general/ExpandButton/ExpandButton.js +81 -0
- package/dist/es/general/ExpandButton/index.js +11 -0
- package/dist/es/general/Form/Form.js +230 -0
- package/dist/es/general/Form/index.js +11 -0
- package/dist/es/general/ImageCollage/ImageCollage.js +151 -0
- package/dist/es/general/ImageCollage/index.js +11 -0
- package/dist/es/general/MediaIcon/MediaIcon.js +101 -0
- package/dist/es/general/MediaIcon/index.js +11 -0
- package/dist/es/general/MenuItem/MenuItem.js +91 -0
- package/dist/es/general/MenuItem/index.js +11 -0
- package/dist/es/general/ScrubLine/ScrubLine.js +141 -0
- package/dist/es/general/ScrubLine/index.js +11 -0
- package/dist/es/general/Sort/Sort.js +179 -0
- package/dist/es/general/Sort/components/ButtonBase.js +19 -0
- package/dist/es/general/Sort/components/MenuItem.js +15 -0
- package/dist/es/general/Sort/index.js +11 -0
- package/dist/es/general/TablePagination/TablePagination.js +104 -0
- package/dist/es/general/TablePagination/index.js +11 -0
- package/dist/es/general/ThemeContext/ThemeContext.js +96 -0
- package/dist/es/inputs/BasicDateTimeInput/BasicDateTimeInput.js +133 -0
- package/dist/es/inputs/BasicDateTimeInput/index.js +11 -0
- package/dist/es/inputs/BooleanInput/BooleanInput.js +196 -0
- package/dist/es/inputs/BooleanInput/index.js +11 -0
- package/dist/es/inputs/CheckboxGroupInput/CheckboxGroupInput.js +292 -0
- package/dist/es/inputs/CheckboxGroupInput/components/CheckboxGroup.js +81 -0
- package/dist/es/inputs/CheckboxGroupInput/index.js +11 -0
- package/dist/es/inputs/DateRangeInput/DateRangeInput.js +362 -0
- package/dist/es/inputs/DateRangeInput/components/utils/valueManagers.js +20 -0
- package/dist/es/inputs/DateRangeInput/index.js +11 -0
- package/dist/es/inputs/DateRangeInput/utils/dateHelpers.js +31 -0
- package/dist/es/inputs/DateTimeInput/DateTimeInput.js +250 -0
- package/dist/es/inputs/DateTimeInput/index.js +11 -0
- package/dist/es/inputs/MaskedTextInput/MaskedTextInput.js +235 -0
- package/dist/es/inputs/MaskedTextInput/components/MaskedInputComponent.js +13 -0
- package/dist/es/inputs/MaskedTextInput/index.js +11 -0
- package/dist/es/inputs/NumberInput/NumberInput.js +134 -0
- package/dist/es/inputs/NumberInput/index.js +11 -0
- package/dist/es/inputs/RadioGroupInput/RadioGroupInput.js +287 -0
- package/dist/es/inputs/RadioGroupInput/components/RadioGroup.js +72 -0
- package/dist/es/inputs/RadioGroupInput/index.js +11 -0
- package/dist/es/inputs/SelectInput/SelectInput.js +195 -0
- package/dist/es/inputs/SelectInput/index.js +11 -0
- package/dist/es/inputs/SliderInput/SliderInput.js +350 -0
- package/dist/es/inputs/SliderInput/components/Slider.js +124 -0
- package/dist/es/inputs/SliderInput/index.js +11 -0
- package/dist/es/inputs/TagInput/TagInput.js +356 -0
- package/dist/es/inputs/TagInput/index.js +11 -0
- package/dist/es/inputs/TextInput/TextInput.js +154 -0
- package/dist/es/inputs/TextInput/index.js +11 -0
- package/dist/es/inputs/_components/FormControlLabel.js +60 -0
- package/dist/es/inputs/_components/MenuItem.js +23 -0
- package/dist/es/item/ItemCard/ItemCard.js +293 -0
- package/dist/es/item/ItemCard/components/ItemCardMedia.js +20 -0
- package/dist/es/item/ItemCard/index.js +11 -0
- package/dist/es/item/ItemList/ItemList.js +158 -0
- package/dist/es/item/ItemList/index.js +11 -0
- package/dist/es/item/ItemListItem/ItemListItem.js +122 -0
- package/dist/es/item/ItemListItem/index.js +11 -0
- package/dist/es/item/ItemPoster/ItemPoster.js +132 -0
- package/dist/es/item/ItemPoster/index.js +11 -0
- package/dist/es/item/ItemPosterList/ItemPosterList.js +99 -0
- package/dist/es/item/ItemPosterList/index.js +11 -0
- package/dist/es/item/ItemPosterViewer/ItemPosterViewer.js +190 -0
- package/dist/es/item/ItemPosterViewer/components/Toolbar.js +27 -0
- package/dist/es/item/ItemPosterViewer/index.js +11 -0
- package/dist/es/item/ItemTable/ItemTable.js +201 -0
- package/dist/es/item/ItemTable/components/ItemTableHead.js +35 -0
- package/dist/es/item/ItemTable/index.js +11 -0
- package/dist/es/item/ItemTableRow/ItemTableRow.js +150 -0
- package/dist/es/item/ItemTableRow/index.js +11 -0
- package/dist/es/item/ItemThumbnail/ItemThumbnail.js +210 -0
- package/dist/es/item/ItemThumbnail/index.js +11 -0
- package/dist/es/search/SearchFilterForm/SearchFilterForm.js +138 -0
- package/dist/es/search/SearchFilterForm/hooks/UseSearchFilterFormInputs.js +130 -0
- package/dist/es/search/SearchFilterForm/index.js +12 -0
- package/dist/es/search/SearchFilterForm/utils/mapValuesToFilter.js +84 -0
- package/dist/es/shape/ShapeMediaBadges/ShapeMediaBadges.js +78 -0
- package/dist/es/shape/ShapeMediaBadges/index.js +11 -0
- package/dist/es/transcode/TranscodePresetMediaBadges/TranscodePresetMediaBadges.js +78 -0
- package/dist/es/transcode/TranscodePresetMediaBadges/index.js +11 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.es.js +93 -0
- package/package.json +35 -19
- package/dist/index.js +0 -13109
- package/dist/index.umd.cjs +0 -6
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled as m } from "@mui/material/styles";
|
|
2
|
+
import { withOverrides as r } from "../../_utils/withOverrides.js";
|
|
3
|
+
import s from "./ItemListItem.js";
|
|
4
|
+
const t = "ItemListItem", e = `Vdt${t}`, i = r(e)(s), n = m(i, {
|
|
5
|
+
name: e,
|
|
6
|
+
overridesResolver: (d, o) => o.root
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
n.displayName = t;
|
|
9
|
+
export {
|
|
10
|
+
n as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { jsxs as x, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import o from "prop-types";
|
|
3
|
+
import a from "@mui/material/Box";
|
|
4
|
+
import { styled as n } from "@mui/material/styles";
|
|
5
|
+
import b from "@vidispine/proptypes";
|
|
6
|
+
import "../../general/AvatarMenu/index.js";
|
|
7
|
+
import y from "../../general/BlurredBackground/index.js";
|
|
8
|
+
import "../../general/CalendarPicker/index.js";
|
|
9
|
+
import "../../general/CompactBadge/index.js";
|
|
10
|
+
import "../../general/CompactLabel/index.js";
|
|
11
|
+
import "../../general/CornerLabelPlacer/index.js";
|
|
12
|
+
import "../../general/ExpandButton/index.js";
|
|
13
|
+
import "../../general/ImageCollage/index.js";
|
|
14
|
+
import "../../general/MediaIcon/index.js";
|
|
15
|
+
import "../../general/MenuItem/index.js";
|
|
16
|
+
import "../../general/ScrubLine/index.js";
|
|
17
|
+
import "../../general/Sort/index.js";
|
|
18
|
+
import "../../general/TablePagination/index.js";
|
|
19
|
+
import "../../general/ThemeContext/ThemeContext.js";
|
|
20
|
+
const I = n(a)(({
|
|
21
|
+
onClick: e
|
|
22
|
+
}) => ({
|
|
23
|
+
height: "100%",
|
|
24
|
+
width: "100%",
|
|
25
|
+
position: "relative",
|
|
26
|
+
...e && {
|
|
27
|
+
cursor: "pointer"
|
|
28
|
+
}
|
|
29
|
+
})), v = n(y)(() => ({
|
|
30
|
+
height: "100%",
|
|
31
|
+
width: "100%",
|
|
32
|
+
position: "absolute",
|
|
33
|
+
zIndex: 0,
|
|
34
|
+
top: 0
|
|
35
|
+
})), T = n(a, {
|
|
36
|
+
shouldForwardProp: (e) => !["image", "backgroundSize"].includes(e)
|
|
37
|
+
})(({
|
|
38
|
+
image: e,
|
|
39
|
+
backgroundSize: t
|
|
40
|
+
}) => ({
|
|
41
|
+
height: "inherit",
|
|
42
|
+
width: "inherit",
|
|
43
|
+
position: "relative",
|
|
44
|
+
zIndex: 5,
|
|
45
|
+
transition: "all .3s ease-in",
|
|
46
|
+
background: e ? `url(${e})` : "none",
|
|
47
|
+
backgroundPosition: "center",
|
|
48
|
+
backgroundRepeat: "no-repeat",
|
|
49
|
+
backgroundSize: t
|
|
50
|
+
})), S = {
|
|
51
|
+
Root: I,
|
|
52
|
+
BlurredBackground: v,
|
|
53
|
+
ImageBox: T
|
|
54
|
+
};
|
|
55
|
+
function s({
|
|
56
|
+
itemType: e,
|
|
57
|
+
posterIndex: t,
|
|
58
|
+
showBlurredBackground: u,
|
|
59
|
+
backgroundSize: l,
|
|
60
|
+
onClick: p,
|
|
61
|
+
components: g,
|
|
62
|
+
componentsProps: r
|
|
63
|
+
}) {
|
|
64
|
+
var m;
|
|
65
|
+
const {
|
|
66
|
+
Root: B,
|
|
67
|
+
BlurredBackground: h,
|
|
68
|
+
ImageBox: k
|
|
69
|
+
} = g, {
|
|
70
|
+
posters: i
|
|
71
|
+
} = e || {}, d = (m = i == null ? void 0 : i.uri) == null ? void 0 : m[t];
|
|
72
|
+
return /* @__PURE__ */ x(B, { onClick: typeof p != "function" ? void 0 : (f) => {
|
|
73
|
+
p(f, {
|
|
74
|
+
itemType: e,
|
|
75
|
+
posterIndex: t
|
|
76
|
+
});
|
|
77
|
+
}, ...r.root, children: [
|
|
78
|
+
u && /* @__PURE__ */ c(h, { image: d, ...r.blurredBackground }),
|
|
79
|
+
/* @__PURE__ */ c(k, { component: "div", image: d, backgroundSize: l, ...r.imageBox })
|
|
80
|
+
] });
|
|
81
|
+
}
|
|
82
|
+
s.propTypes = {
|
|
83
|
+
/**
|
|
84
|
+
* The ItemType to display as a list item
|
|
85
|
+
*/
|
|
86
|
+
itemType: b.ItemType,
|
|
87
|
+
/**
|
|
88
|
+
* The index of the poster
|
|
89
|
+
*/
|
|
90
|
+
posterIndex: o.number,
|
|
91
|
+
/**
|
|
92
|
+
* Cover the whole width/height of container
|
|
93
|
+
*/
|
|
94
|
+
backgroundSize: o.string,
|
|
95
|
+
/**
|
|
96
|
+
* Whether to show a blurred background behind the thumbnail or not
|
|
97
|
+
*/
|
|
98
|
+
showBlurredBackground: o.bool,
|
|
99
|
+
/**
|
|
100
|
+
* A function that handles the poster being clicked
|
|
101
|
+
*/
|
|
102
|
+
onClick: o.func,
|
|
103
|
+
// Overrides
|
|
104
|
+
/**
|
|
105
|
+
* Replace internal components
|
|
106
|
+
*/
|
|
107
|
+
components: o.shape({
|
|
108
|
+
Root: o.elementType,
|
|
109
|
+
BlurredBackground: o.elementType,
|
|
110
|
+
ImageBox: o.elementType
|
|
111
|
+
}),
|
|
112
|
+
/**
|
|
113
|
+
* Add internal component props
|
|
114
|
+
*/
|
|
115
|
+
componentsProps: o.shape({
|
|
116
|
+
root: o.instanceOf(Object),
|
|
117
|
+
blurredBackground: o.instanceOf(Object),
|
|
118
|
+
imageBox: o.instanceOf(Object)
|
|
119
|
+
})
|
|
120
|
+
};
|
|
121
|
+
s.defaultProps = {
|
|
122
|
+
itemType: void 0,
|
|
123
|
+
posterIndex: 0,
|
|
124
|
+
showBlurredBackground: !1,
|
|
125
|
+
backgroundSize: "cover",
|
|
126
|
+
onClick: void 0,
|
|
127
|
+
components: S,
|
|
128
|
+
componentsProps: void 0
|
|
129
|
+
};
|
|
130
|
+
export {
|
|
131
|
+
s as default
|
|
132
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled as r } from "@mui/material/styles";
|
|
2
|
+
import { withOverrides as m } from "../../_utils/withOverrides.js";
|
|
3
|
+
import s from "./ItemPoster.js";
|
|
4
|
+
const o = "ItemPoster", e = `Vdt${o}`, n = m(e)(s), i = r(n, {
|
|
5
|
+
name: e,
|
|
6
|
+
overridesResolver: (d, t) => t.root
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
i.displayName = o;
|
|
9
|
+
export {
|
|
10
|
+
i as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import L from "@mui/material/ImageList";
|
|
4
|
+
import P from "@mui/material/ImageListItem";
|
|
5
|
+
import { styled as m } from "@mui/material/styles";
|
|
6
|
+
import h from "@vidispine/proptypes";
|
|
7
|
+
import T from "../ItemPoster/index.js";
|
|
8
|
+
const O = m(L)({
|
|
9
|
+
width: "100%",
|
|
10
|
+
margin: "auto"
|
|
11
|
+
}), b = m(P)({
|
|
12
|
+
cursor: "default"
|
|
13
|
+
}), v = m(T)({
|
|
14
|
+
objectFit: "cover"
|
|
15
|
+
}), j = {
|
|
16
|
+
Root: O,
|
|
17
|
+
ImageListItem: b,
|
|
18
|
+
ItemPoster: v
|
|
19
|
+
};
|
|
20
|
+
function i({
|
|
21
|
+
itemType: s,
|
|
22
|
+
cols: r,
|
|
23
|
+
gap: n,
|
|
24
|
+
rowHeight: a,
|
|
25
|
+
variant: p,
|
|
26
|
+
onClick: c,
|
|
27
|
+
components: d,
|
|
28
|
+
componentsProps: e
|
|
29
|
+
}) {
|
|
30
|
+
const {
|
|
31
|
+
Root: I,
|
|
32
|
+
ImageListItem: l,
|
|
33
|
+
ItemPoster: u
|
|
34
|
+
} = d, {
|
|
35
|
+
posters: {
|
|
36
|
+
uri: f = []
|
|
37
|
+
} = {}
|
|
38
|
+
} = s || {};
|
|
39
|
+
return /* @__PURE__ */ o(I, { cols: r, gap: n, rowHeight: a || "auto", variant: p, ...e.root, children: f.map((g, y) => /* @__PURE__ */ o(l, { ...e.imageListItem, children: /* @__PURE__ */ o(u, { itemType: s, posterIndex: y, onClick: c, ...e.itemPoster }) }, g)) });
|
|
40
|
+
}
|
|
41
|
+
i.propTypes = {
|
|
42
|
+
/**
|
|
43
|
+
* The ItemType to display as a list item
|
|
44
|
+
*/
|
|
45
|
+
itemType: h.ItemType,
|
|
46
|
+
/**
|
|
47
|
+
* Number of columns.
|
|
48
|
+
*/
|
|
49
|
+
cols: t.number,
|
|
50
|
+
/**
|
|
51
|
+
* The gap between items in px.
|
|
52
|
+
*/
|
|
53
|
+
gap: t.number,
|
|
54
|
+
/**
|
|
55
|
+
* Set row height
|
|
56
|
+
*
|
|
57
|
+
* _Note: Mui's ImageList only support pixels or 'auto'_
|
|
58
|
+
*/
|
|
59
|
+
rowHeight: t.string,
|
|
60
|
+
/**
|
|
61
|
+
* The variant to use.
|
|
62
|
+
*/
|
|
63
|
+
variant: t.oneOf(["masonry", "standard"]),
|
|
64
|
+
// Callbacks
|
|
65
|
+
/**
|
|
66
|
+
* A function that handles a poster being clicked
|
|
67
|
+
*/
|
|
68
|
+
onClick: t.func,
|
|
69
|
+
// Overrides
|
|
70
|
+
/**
|
|
71
|
+
* Replace internal components
|
|
72
|
+
*/
|
|
73
|
+
components: t.shape({
|
|
74
|
+
Root: t.elementType,
|
|
75
|
+
ImageListItem: t.elementType,
|
|
76
|
+
ItemPoster: t.elementType
|
|
77
|
+
}),
|
|
78
|
+
/**
|
|
79
|
+
* Add internal component props
|
|
80
|
+
*/
|
|
81
|
+
componentsProps: t.shape({
|
|
82
|
+
root: t.instanceOf(Object),
|
|
83
|
+
imageListItem: t.instanceOf(Object),
|
|
84
|
+
itemPoster: t.instanceOf(Object)
|
|
85
|
+
})
|
|
86
|
+
};
|
|
87
|
+
i.defaultProps = {
|
|
88
|
+
itemType: void 0,
|
|
89
|
+
cols: 2,
|
|
90
|
+
gap: 4,
|
|
91
|
+
rowHeight: "auto",
|
|
92
|
+
variant: "standard",
|
|
93
|
+
onClick: void 0,
|
|
94
|
+
components: j,
|
|
95
|
+
componentsProps: void 0
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
i as default
|
|
99
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled as r } from "@mui/material/styles";
|
|
2
|
+
import { withOverrides as s } from "../../_utils/withOverrides.js";
|
|
3
|
+
import m from "./ItemPosterList.js";
|
|
4
|
+
const t = "ItemPosterList", o = `Vdt${t}`, i = s(o)(m), n = r(i, {
|
|
5
|
+
name: o,
|
|
6
|
+
overridesResolver: (d, e) => e.root
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
n.displayName = t;
|
|
9
|
+
export {
|
|
10
|
+
n as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { jsxs as j, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as z } from "react";
|
|
3
|
+
import o from "prop-types";
|
|
4
|
+
import R from "@mui/material/Paper";
|
|
5
|
+
import C from "@mui/material/Box";
|
|
6
|
+
import { styled as l } from "@mui/material/styles";
|
|
7
|
+
import V from "@vidispine/proptypes";
|
|
8
|
+
import "../../general/AvatarMenu/index.js";
|
|
9
|
+
import A from "../../general/BlurredBackground/index.js";
|
|
10
|
+
import "../../general/CalendarPicker/index.js";
|
|
11
|
+
import "../../general/CompactBadge/index.js";
|
|
12
|
+
import "../../general/CompactLabel/index.js";
|
|
13
|
+
import "../../general/CornerLabelPlacer/index.js";
|
|
14
|
+
import "../../general/ExpandButton/index.js";
|
|
15
|
+
import "../../general/ImageCollage/index.js";
|
|
16
|
+
import "../../general/MediaIcon/index.js";
|
|
17
|
+
import "../../general/MenuItem/index.js";
|
|
18
|
+
import "../../general/ScrubLine/index.js";
|
|
19
|
+
import "../../general/Sort/index.js";
|
|
20
|
+
import "../../general/TablePagination/index.js";
|
|
21
|
+
import "../../general/ThemeContext/ThemeContext.js";
|
|
22
|
+
import K from "./components/Toolbar.js";
|
|
23
|
+
const M = l(R, {
|
|
24
|
+
shouldForwardProp: (e) => e !== "toolbarOnBottom"
|
|
25
|
+
})(({
|
|
26
|
+
toolbarOnBottom: e
|
|
27
|
+
}) => ({
|
|
28
|
+
display: "grid",
|
|
29
|
+
gridTemplateAreas: e ? '"poster" "toolbar"' : '"toolbar" "poster"',
|
|
30
|
+
gridTemplateRows: e ? "auto min-content" : "min-content auto",
|
|
31
|
+
maxWidth: "100%",
|
|
32
|
+
width: "100%",
|
|
33
|
+
height: "100%",
|
|
34
|
+
position: "relative"
|
|
35
|
+
})), F = l(K)({
|
|
36
|
+
gridArea: "toolbar",
|
|
37
|
+
maxHeight: "48px",
|
|
38
|
+
zIndex: 25,
|
|
39
|
+
"&:focus-visible": {
|
|
40
|
+
outline: "none"
|
|
41
|
+
}
|
|
42
|
+
}), N = l(A, {
|
|
43
|
+
shouldForwardProp: (e) => e !== "toolbarOnBottom"
|
|
44
|
+
})(({
|
|
45
|
+
toolbarOnBottom: e
|
|
46
|
+
}) => ({
|
|
47
|
+
height: "calc(100% - 48px)",
|
|
48
|
+
width: "100%",
|
|
49
|
+
position: "absolute",
|
|
50
|
+
zIndex: 0,
|
|
51
|
+
...e ? {
|
|
52
|
+
top: 0
|
|
53
|
+
} : {
|
|
54
|
+
bottom: 0
|
|
55
|
+
}
|
|
56
|
+
})), L = l(C, {
|
|
57
|
+
shouldForwardProp: (e) => !["image", "backgroundSize"].includes(e)
|
|
58
|
+
})(({
|
|
59
|
+
image: e,
|
|
60
|
+
backgroundSize: r
|
|
61
|
+
}) => ({
|
|
62
|
+
height: "inherit",
|
|
63
|
+
width: "inherit",
|
|
64
|
+
position: "relative",
|
|
65
|
+
zIndex: 5,
|
|
66
|
+
transition: "all .3s ease-in-out",
|
|
67
|
+
background: e ? `url(${e})` : "none",
|
|
68
|
+
backgroundPosition: "center",
|
|
69
|
+
backgroundRepeat: "no-repeat",
|
|
70
|
+
backgroundSize: r,
|
|
71
|
+
"&:focus-visible": {
|
|
72
|
+
outline: "none"
|
|
73
|
+
}
|
|
74
|
+
})), H = {
|
|
75
|
+
Root: M,
|
|
76
|
+
Toolbar: F,
|
|
77
|
+
BlurredBackground: N,
|
|
78
|
+
ImageBox: L
|
|
79
|
+
};
|
|
80
|
+
function B({
|
|
81
|
+
itemType: e,
|
|
82
|
+
index: r,
|
|
83
|
+
showBlurredBackground: y,
|
|
84
|
+
backgroundSize: w,
|
|
85
|
+
onPrevious: u,
|
|
86
|
+
onNext: g,
|
|
87
|
+
onClose: v,
|
|
88
|
+
onDownload: T,
|
|
89
|
+
toolbarOnBottom: b,
|
|
90
|
+
components: k,
|
|
91
|
+
componentsProps: i
|
|
92
|
+
}) {
|
|
93
|
+
const {
|
|
94
|
+
Root: P,
|
|
95
|
+
Toolbar: I,
|
|
96
|
+
BlurredBackground: O,
|
|
97
|
+
ImageBox: S
|
|
98
|
+
} = k, {
|
|
99
|
+
posters: {
|
|
100
|
+
uri: n = []
|
|
101
|
+
} = {}
|
|
102
|
+
} = e || {}, s = r !== void 0, [D, f] = z(0), a = s ? r : D, h = (t) => {
|
|
103
|
+
s || f((d) => d > 0 ? d - 1 : n.length - 1), u && u(t, a > 0 ? a - 1 : n.length - 1);
|
|
104
|
+
}, x = (t) => {
|
|
105
|
+
s || f((d) => (d + 1) % n.length), g && g(t, (a + 1) % n.length);
|
|
106
|
+
}, p = (t) => {
|
|
107
|
+
t.stopPropagation(), t.code === "ArrowRight" && x(t), t.code === "ArrowLeft" && h(t);
|
|
108
|
+
}, m = n[a];
|
|
109
|
+
return /* @__PURE__ */ j(P, { toolbarOnBottom: b, onKeyDown: p, ...i.root, children: [
|
|
110
|
+
/* @__PURE__ */ c(I, { onPrevious: h, onNext: x, onClose: v, onDownload: (t) => T(t, {
|
|
111
|
+
url: m,
|
|
112
|
+
itemType: e
|
|
113
|
+
}), tabIndex: -1, onKeyDown: p, ...i.toolbar }),
|
|
114
|
+
y && /* @__PURE__ */ c(O, { image: m, toolbarOnBottom: b, ...i.blurredBackground }),
|
|
115
|
+
/* @__PURE__ */ c(S, { component: "div", image: m, backgroundSize: w, tabIndex: -1, onKeyDown: p, ...i.imageBox })
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
B.propTypes = {
|
|
119
|
+
/**
|
|
120
|
+
* The ItemType to display as a list item
|
|
121
|
+
*/
|
|
122
|
+
itemType: V.ItemType,
|
|
123
|
+
/**
|
|
124
|
+
* The index of the current poster
|
|
125
|
+
*/
|
|
126
|
+
index: o.number,
|
|
127
|
+
/**
|
|
128
|
+
* Whether to show a blurred background behind the thumbnail or not
|
|
129
|
+
*/
|
|
130
|
+
showBlurredBackground: o.bool,
|
|
131
|
+
/**
|
|
132
|
+
* Set perspective of the poster image
|
|
133
|
+
*/
|
|
134
|
+
backgroundSize: o.oneOf(["auto", "contain", "cover"]),
|
|
135
|
+
/**
|
|
136
|
+
* A function that handles clicking the previous button
|
|
137
|
+
*/
|
|
138
|
+
onPrevious: o.func,
|
|
139
|
+
/**
|
|
140
|
+
* A function that handles clicking the next button
|
|
141
|
+
*/
|
|
142
|
+
onNext: o.func,
|
|
143
|
+
/**
|
|
144
|
+
* A function that handles clicking the close button
|
|
145
|
+
*/
|
|
146
|
+
onClose: o.func,
|
|
147
|
+
/**
|
|
148
|
+
* A function that handles clicking the download button
|
|
149
|
+
*/
|
|
150
|
+
onDownload: o.func,
|
|
151
|
+
/**
|
|
152
|
+
* Whether to put the toolbar on the bottom or not
|
|
153
|
+
*/
|
|
154
|
+
toolbarOnBottom: o.bool,
|
|
155
|
+
// Overrides
|
|
156
|
+
/**
|
|
157
|
+
* Replace internal components
|
|
158
|
+
*/
|
|
159
|
+
components: o.shape({
|
|
160
|
+
Root: o.elementType,
|
|
161
|
+
Toolbar: o.elementType,
|
|
162
|
+
BlurredBackground: o.elementType,
|
|
163
|
+
ImageBox: o.elementType
|
|
164
|
+
}),
|
|
165
|
+
/**
|
|
166
|
+
* Add internal component props
|
|
167
|
+
*/
|
|
168
|
+
componentsProps: o.shape({
|
|
169
|
+
root: o.instanceOf(Object),
|
|
170
|
+
toolbar: o.instanceOf(Object),
|
|
171
|
+
blurredBackground: o.instanceOf(Object),
|
|
172
|
+
imageBox: o.instanceOf(Object)
|
|
173
|
+
})
|
|
174
|
+
};
|
|
175
|
+
B.defaultProps = {
|
|
176
|
+
itemType: void 0,
|
|
177
|
+
index: void 0,
|
|
178
|
+
showBlurredBackground: !1,
|
|
179
|
+
backgroundSize: "auto",
|
|
180
|
+
onPrevious: void 0,
|
|
181
|
+
onNext: void 0,
|
|
182
|
+
onClose: void 0,
|
|
183
|
+
onDownload: void 0,
|
|
184
|
+
toolbarOnBottom: !1,
|
|
185
|
+
components: H,
|
|
186
|
+
componentsProps: void 0
|
|
187
|
+
};
|
|
188
|
+
export {
|
|
189
|
+
B as default
|
|
190
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as o, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import a from "@mui/icons-material/esm/Close";
|
|
3
|
+
import d from "@mui/icons-material/esm/NavigateBefore";
|
|
4
|
+
import f from "@mui/icons-material/esm/NavigateNext";
|
|
5
|
+
import p from "@mui/icons-material/esm/SaveAlt";
|
|
6
|
+
import s from "@mui/material/Toolbar";
|
|
7
|
+
import n from "@mui/material/Box";
|
|
8
|
+
import r from "@mui/material/IconButton";
|
|
9
|
+
function j({
|
|
10
|
+
onPrevious: c,
|
|
11
|
+
onNext: l,
|
|
12
|
+
onClose: e,
|
|
13
|
+
onDownload: i,
|
|
14
|
+
...m
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ o(s, { ...m, children: /* @__PURE__ */ t(n, { display: "flex", justifyContent: "space-between", width: "100%", children: [
|
|
17
|
+
e ? /* @__PURE__ */ o(r, { edge: "start", onClick: e, children: /* @__PURE__ */ o(a, {}) }) : /* @__PURE__ */ o("span", {}),
|
|
18
|
+
/* @__PURE__ */ t(n, { children: [
|
|
19
|
+
/* @__PURE__ */ o(r, { onClick: c, children: /* @__PURE__ */ o(d, {}) }),
|
|
20
|
+
/* @__PURE__ */ o(r, { onClick: l, children: /* @__PURE__ */ o(f, {}) })
|
|
21
|
+
] }),
|
|
22
|
+
i ? /* @__PURE__ */ o(r, { edge: "end", onClick: i, children: /* @__PURE__ */ o(p, {}) }) : /* @__PURE__ */ o("span", {})
|
|
23
|
+
] }) });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
j as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled as r } from "@mui/material/styles";
|
|
2
|
+
import { withOverrides as m } from "../../_utils/withOverrides.js";
|
|
3
|
+
import s from "./ItemPosterViewer.js";
|
|
4
|
+
const e = "ItemPosterViewer", o = `Vdt${e}`, i = m(o)(s), n = r(i, {
|
|
5
|
+
name: o,
|
|
6
|
+
overridesResolver: (d, t) => t.root
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
n.displayName = e;
|
|
9
|
+
export {
|
|
10
|
+
n as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { jsxs as k, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as D, useState as F } from "react";
|
|
3
|
+
import e from "prop-types";
|
|
4
|
+
import G from "@mui/material/Table";
|
|
5
|
+
import J from "@mui/material/TableBody";
|
|
6
|
+
import K from "@mui/material/TableRow";
|
|
7
|
+
import Q from "@mui/material/TableCell";
|
|
8
|
+
import y from "@vidispine/proptypes";
|
|
9
|
+
import "clsx";
|
|
10
|
+
import "@mui/material/styles";
|
|
11
|
+
import { showSlot as U } from "../../_utils/showSlot.js";
|
|
12
|
+
import W from "../ItemTableRow/index.js";
|
|
13
|
+
import X from "./components/ItemTableHead.js";
|
|
14
|
+
function Y({
|
|
15
|
+
rows: t,
|
|
16
|
+
onCheck: l
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ f(K, { children: /* @__PURE__ */ f(Q, { colSpan: t.length + (l ? 1 : 0), sx: {
|
|
19
|
+
borderBottom: "none"
|
|
20
|
+
}, children: "No items found..." }) });
|
|
21
|
+
}
|
|
22
|
+
const Z = {
|
|
23
|
+
Root: G,
|
|
24
|
+
TableHead: X,
|
|
25
|
+
TableBody: J,
|
|
26
|
+
TableRow: W
|
|
27
|
+
};
|
|
28
|
+
function O({
|
|
29
|
+
itemListType: t,
|
|
30
|
+
rows: l,
|
|
31
|
+
size: w,
|
|
32
|
+
avatarVariant: R,
|
|
33
|
+
stickyHeader: C,
|
|
34
|
+
showAvatar: b,
|
|
35
|
+
onRowClick: T,
|
|
36
|
+
checked: i,
|
|
37
|
+
onCheck: d,
|
|
38
|
+
isLoading: c,
|
|
39
|
+
amountLoading: g,
|
|
40
|
+
emptySlot: H,
|
|
41
|
+
components: S,
|
|
42
|
+
componentsProps: j
|
|
43
|
+
}) {
|
|
44
|
+
const {
|
|
45
|
+
Root: x,
|
|
46
|
+
TableHead: B,
|
|
47
|
+
TableBody: I,
|
|
48
|
+
TableRow: A
|
|
49
|
+
} = S, M = [...Array(Math.max(g, 0)).keys()].map((a) => ({
|
|
50
|
+
key: a
|
|
51
|
+
})), u = D(() => {
|
|
52
|
+
var a;
|
|
53
|
+
return ((a = t == null ? void 0 : t.item) == null ? void 0 : a.map((o) => ({
|
|
54
|
+
key: o == null ? void 0 : o.id,
|
|
55
|
+
itemType: o
|
|
56
|
+
}))) || [];
|
|
57
|
+
}, [t]), [P, h] = F([]), n = i === void 0 ? P : i, V = d ? (a, {
|
|
58
|
+
value: o
|
|
59
|
+
}) => {
|
|
60
|
+
const {
|
|
61
|
+
item: r = []
|
|
62
|
+
} = t || {}, m = o === !0 ? [...n, ...r].filter(
|
|
63
|
+
// Remove duplicates
|
|
64
|
+
(s, p, E) => p === E.findIndex(({
|
|
65
|
+
id: N
|
|
66
|
+
}) => s.id === N)
|
|
67
|
+
) : n.filter(({
|
|
68
|
+
id: s
|
|
69
|
+
}) => !r.some((p) => p.id === s));
|
|
70
|
+
i === void 0 && h(() => m), d(a, {
|
|
71
|
+
itemListType: {
|
|
72
|
+
item: m
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
} : void 0, q = d ? (a, {
|
|
76
|
+
value: o,
|
|
77
|
+
itemType: r
|
|
78
|
+
}) => {
|
|
79
|
+
const m = o === !0 ? [...n, r] : n.filter(({
|
|
80
|
+
id: s
|
|
81
|
+
}) => r.id !== s);
|
|
82
|
+
i === void 0 && h(() => m), d(a, {
|
|
83
|
+
itemListType: {
|
|
84
|
+
item: m
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
} : void 0, v = (n == null ? void 0 : n.length) > 0 && ((t == null ? void 0 : t.item) || []).every((a) => n.some((o) => a.id === o.id)), z = !v && (n == null ? void 0 : n.length) > 0 && ((t == null ? void 0 : t.item) || []).some((a) => n.some((o) => a.id === o.id));
|
|
88
|
+
return /* @__PURE__ */ k(x, { size: w, stickyHeader: C, ...j.root, children: [
|
|
89
|
+
/* @__PURE__ */ f(B, { rows: l, isLoading: c, checked: v, showAvatar: b, indeterminate: z, onCheck: V }),
|
|
90
|
+
/* @__PURE__ */ k(I, { children: [
|
|
91
|
+
!c && u.length === 0 && U(H, {
|
|
92
|
+
onCheck: d,
|
|
93
|
+
rows: l
|
|
94
|
+
}),
|
|
95
|
+
(c ? M : u).map(({
|
|
96
|
+
key: a,
|
|
97
|
+
itemType: o
|
|
98
|
+
}) => /* @__PURE__ */ f(A, { itemType: o, rows: l, isLoading: c, onClick: T, showAvatar: b, avatarVariant: R, checked: Array.isArray(n) && n.some(({
|
|
99
|
+
id: r
|
|
100
|
+
}) => r === o.id), onCheck: q }, a))
|
|
101
|
+
] })
|
|
102
|
+
] });
|
|
103
|
+
}
|
|
104
|
+
O.propTypes = {
|
|
105
|
+
/**
|
|
106
|
+
* The `ItemListType` to show in the table
|
|
107
|
+
*/
|
|
108
|
+
itemListType: y.ItemListType,
|
|
109
|
+
/**
|
|
110
|
+
* List of header labels and values for table columns
|
|
111
|
+
*
|
|
112
|
+
* Set value to the *field name* it should be extracted from
|
|
113
|
+
* or a *function* which will get itemType as argument
|
|
114
|
+
*
|
|
115
|
+
* Defaults to empty list
|
|
116
|
+
*/
|
|
117
|
+
rows: e.arrayOf(e.shape({
|
|
118
|
+
label: e.string,
|
|
119
|
+
value: e.oneOfType([e.node, e.func])
|
|
120
|
+
})),
|
|
121
|
+
/**
|
|
122
|
+
* Set size of table
|
|
123
|
+
*/
|
|
124
|
+
size: e.oneOf(["medium", "small"]),
|
|
125
|
+
/**
|
|
126
|
+
* Variant/shapes for the Avatar
|
|
127
|
+
*/
|
|
128
|
+
avatarVariant: e.oneOf(["circular", "rounded", "square"]),
|
|
129
|
+
/**
|
|
130
|
+
* Set the header to stick at top when scrolled
|
|
131
|
+
*/
|
|
132
|
+
stickyHeader: e.bool,
|
|
133
|
+
/**
|
|
134
|
+
* A list of string ids for which items are checked.
|
|
135
|
+
*/
|
|
136
|
+
checked: e.arrayOf(y.ItemType),
|
|
137
|
+
/**
|
|
138
|
+
* Set if table row avatar should be shown
|
|
139
|
+
*/
|
|
140
|
+
showAvatar: e.bool,
|
|
141
|
+
/**
|
|
142
|
+
* Show skeleton table items as loading state
|
|
143
|
+
*/
|
|
144
|
+
isLoading: e.bool,
|
|
145
|
+
/**
|
|
146
|
+
* Amount of table items to show when loading
|
|
147
|
+
*/
|
|
148
|
+
amountLoading: e.number,
|
|
149
|
+
// Callbacks
|
|
150
|
+
/**
|
|
151
|
+
* A function that handles a checkbox being clicked.
|
|
152
|
+
*/
|
|
153
|
+
onCheck: e.func,
|
|
154
|
+
/**
|
|
155
|
+
* A function that handles an item being clicked.
|
|
156
|
+
*/
|
|
157
|
+
onRowClick: e.func,
|
|
158
|
+
// Slots
|
|
159
|
+
/**
|
|
160
|
+
* Shown when the table is empty
|
|
161
|
+
*/
|
|
162
|
+
emptySlot: e.oneOfType([e.elementType, e.node]),
|
|
163
|
+
// Overrides
|
|
164
|
+
/**
|
|
165
|
+
* Replace internal components
|
|
166
|
+
*/
|
|
167
|
+
components: e.shape({
|
|
168
|
+
Root: e.elementType,
|
|
169
|
+
TableHead: e.elementType,
|
|
170
|
+
TableBody: e.elementType,
|
|
171
|
+
TableRow: e.elementType
|
|
172
|
+
}),
|
|
173
|
+
/**
|
|
174
|
+
* Add internal component props
|
|
175
|
+
*/
|
|
176
|
+
componentsProps: e.shape({
|
|
177
|
+
root: e.instanceOf(Object),
|
|
178
|
+
tableHead: e.instanceOf(Object),
|
|
179
|
+
tableBody: e.instanceOf(Object),
|
|
180
|
+
tableRow: e.instanceOf(Object)
|
|
181
|
+
})
|
|
182
|
+
};
|
|
183
|
+
O.defaultProps = {
|
|
184
|
+
itemListType: void 0,
|
|
185
|
+
rows: [],
|
|
186
|
+
size: "medium",
|
|
187
|
+
avatarVariant: "square",
|
|
188
|
+
stickyHeader: !1,
|
|
189
|
+
checked: void 0,
|
|
190
|
+
showAvatar: !0,
|
|
191
|
+
isLoading: !1,
|
|
192
|
+
amountLoading: 3,
|
|
193
|
+
onCheck: void 0,
|
|
194
|
+
onRowClick: void 0,
|
|
195
|
+
emptySlot: Y,
|
|
196
|
+
components: Z,
|
|
197
|
+
componentsProps: void 0
|
|
198
|
+
};
|
|
199
|
+
export {
|
|
200
|
+
O as default
|
|
201
|
+
};
|