@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,211 @@
|
|
|
1
|
+
import { jsxs as a, jsx as m, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as q } from "react";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import w from "@mui/material/List";
|
|
5
|
+
import A from "@mui/material/ListSubheader";
|
|
6
|
+
import F from "@mui/material/Typography";
|
|
7
|
+
import { styled as N } from "@mui/material/styles";
|
|
8
|
+
import c from "@vidispine/proptypes";
|
|
9
|
+
import { uuidv4 as l } from "../../_utils/uuidv4.js";
|
|
10
|
+
import "clsx";
|
|
11
|
+
import { showSlot as $ } from "../../_utils/showSlot.js";
|
|
12
|
+
import z from "../../collection/CollectionListItem/index.js";
|
|
13
|
+
import p from "../../item/ItemListItem/index.js";
|
|
14
|
+
function B() {
|
|
15
|
+
return /* @__PURE__ */ m(F, { children: "No entities found..." });
|
|
16
|
+
}
|
|
17
|
+
const G = N(w)(() => ({
|
|
18
|
+
width: "100%"
|
|
19
|
+
})), H = {
|
|
20
|
+
Root: G,
|
|
21
|
+
ListSubheader: A,
|
|
22
|
+
CollectionListItem: z,
|
|
23
|
+
ItemListItem: p,
|
|
24
|
+
LoadingListItem: p
|
|
25
|
+
};
|
|
26
|
+
function d({
|
|
27
|
+
entities: s,
|
|
28
|
+
header: f,
|
|
29
|
+
primary: u,
|
|
30
|
+
secondary: y,
|
|
31
|
+
avatarVariant: L,
|
|
32
|
+
dense: I,
|
|
33
|
+
amountLoading: h,
|
|
34
|
+
isLoading: n,
|
|
35
|
+
onListItemClick: O,
|
|
36
|
+
onListItemDelete: b,
|
|
37
|
+
emptySlot: g,
|
|
38
|
+
components: T,
|
|
39
|
+
componentsProps: e
|
|
40
|
+
}) {
|
|
41
|
+
const {
|
|
42
|
+
Root: S,
|
|
43
|
+
ListSubheader: C,
|
|
44
|
+
CollectionListItem: j,
|
|
45
|
+
ItemListItem: v,
|
|
46
|
+
LoadingListItem: k
|
|
47
|
+
} = T, M = [...Array(Math.max(h, 0)).keys()].map(() => ({
|
|
48
|
+
key: l()
|
|
49
|
+
})), r = q(() => s.map(({
|
|
50
|
+
item: i,
|
|
51
|
+
collection: o
|
|
52
|
+
}) => ({
|
|
53
|
+
key: l(),
|
|
54
|
+
itemType: i,
|
|
55
|
+
collectionType: o
|
|
56
|
+
})) || [], [s]), x = ({
|
|
57
|
+
itemType: i,
|
|
58
|
+
collectionType: o
|
|
59
|
+
}) => i ? {
|
|
60
|
+
component: v,
|
|
61
|
+
props: {
|
|
62
|
+
itemType: i,
|
|
63
|
+
...e.listItem,
|
|
64
|
+
...e.itemListItem
|
|
65
|
+
}
|
|
66
|
+
} : o ? {
|
|
67
|
+
component: j,
|
|
68
|
+
props: {
|
|
69
|
+
collectionType: o,
|
|
70
|
+
...e.listItem,
|
|
71
|
+
...e.collectionListItem
|
|
72
|
+
}
|
|
73
|
+
} : {
|
|
74
|
+
// Default to an ItemListItem (use it as loading list)
|
|
75
|
+
component: k,
|
|
76
|
+
props: {
|
|
77
|
+
collectionType: o,
|
|
78
|
+
...e.listItem,
|
|
79
|
+
...e.loadingListItem
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ a(S, { dense: I, ...e.root, children: [
|
|
83
|
+
/* @__PURE__ */ m(C, { ...e.listSubheader, children: f }),
|
|
84
|
+
/* @__PURE__ */ a(V, { children: [
|
|
85
|
+
!n && r.length === 0 && $(g),
|
|
86
|
+
(n ? M : r).map(({
|
|
87
|
+
key: i,
|
|
88
|
+
itemType: o,
|
|
89
|
+
collectionType: E
|
|
90
|
+
}) => {
|
|
91
|
+
const {
|
|
92
|
+
component: D,
|
|
93
|
+
props: R
|
|
94
|
+
} = x({
|
|
95
|
+
itemType: o,
|
|
96
|
+
collectionType: E
|
|
97
|
+
});
|
|
98
|
+
return /* @__PURE__ */ m(D, { primary: u, secondary: y, avatarVariant: L, isLoading: n, onClick: O, onDelete: b, ...R }, i);
|
|
99
|
+
})
|
|
100
|
+
] })
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
const J = t.shape({
|
|
104
|
+
item: c.ItemType
|
|
105
|
+
}), K = t.shape({
|
|
106
|
+
collection: c.CollectionType
|
|
107
|
+
});
|
|
108
|
+
d.propTypes = {
|
|
109
|
+
/**
|
|
110
|
+
* The entities to show in the list
|
|
111
|
+
*
|
|
112
|
+
* `EntityItemType = { item: VidispinePropTypes.ItemType }`
|
|
113
|
+
* `EntityCollectionType = { collection: VidispinePropTypes.CollectionType }`
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
entities: t.arrayOf(t.objectOf(t.oneOfType([J, K]))),
|
|
117
|
+
/**
|
|
118
|
+
* Add a list header
|
|
119
|
+
*/
|
|
120
|
+
header: t.string,
|
|
121
|
+
/**
|
|
122
|
+
* Primary text for the list item
|
|
123
|
+
*
|
|
124
|
+
* Set to *field name* the value should be extracted from
|
|
125
|
+
* or set *function* which will get entity as argument
|
|
126
|
+
*
|
|
127
|
+
* Defaults to id of entity
|
|
128
|
+
*/
|
|
129
|
+
primary: t.oneOfType([t.string, t.func]),
|
|
130
|
+
/**
|
|
131
|
+
* Secondary text for the list item
|
|
132
|
+
*
|
|
133
|
+
* Set to *field name* the value should be extracted from
|
|
134
|
+
* or set *function* which will get entity as argument
|
|
135
|
+
*
|
|
136
|
+
* Defaults to undefined
|
|
137
|
+
*/
|
|
138
|
+
secondary: t.oneOfType([t.string, t.func]),
|
|
139
|
+
/**
|
|
140
|
+
* Variant/shapes for the list item avatars
|
|
141
|
+
*/
|
|
142
|
+
avatarVariant: t.oneOf(["circular", "rounded", "square"]),
|
|
143
|
+
/**
|
|
144
|
+
* If list should be displayed as dense
|
|
145
|
+
*/
|
|
146
|
+
dense: t.bool,
|
|
147
|
+
/**
|
|
148
|
+
* Show skeleton list items as loading state
|
|
149
|
+
*/
|
|
150
|
+
isLoading: t.bool,
|
|
151
|
+
/**
|
|
152
|
+
* amount of list items to show when loading
|
|
153
|
+
*/
|
|
154
|
+
amountLoading: t.number,
|
|
155
|
+
/**
|
|
156
|
+
* Callback for ListItem click event
|
|
157
|
+
*
|
|
158
|
+
* Set to `undefined` to disable
|
|
159
|
+
*/
|
|
160
|
+
onListItemClick: t.func,
|
|
161
|
+
/**
|
|
162
|
+
* Callback for ListItem click event
|
|
163
|
+
*
|
|
164
|
+
* Set to `undefined` to disable
|
|
165
|
+
*/
|
|
166
|
+
onListItemDelete: t.func,
|
|
167
|
+
/**
|
|
168
|
+
* Shown when list is empty
|
|
169
|
+
*/
|
|
170
|
+
emptySlot: t.oneOfType([t.elementType, t.node]),
|
|
171
|
+
// Overrides
|
|
172
|
+
/**
|
|
173
|
+
* Replace internal components
|
|
174
|
+
*/
|
|
175
|
+
components: t.shape({
|
|
176
|
+
Root: t.elementType,
|
|
177
|
+
ListSubheader: t.elementType,
|
|
178
|
+
CollectionListItem: t.elementType,
|
|
179
|
+
ItemListItem: t.elementType,
|
|
180
|
+
LoadingListItem: t.elementType
|
|
181
|
+
}),
|
|
182
|
+
/**
|
|
183
|
+
* Add internal component props
|
|
184
|
+
*/
|
|
185
|
+
componentsProps: t.shape({
|
|
186
|
+
root: t.instanceOf(Object),
|
|
187
|
+
listSubheader: t.instanceOf(Object),
|
|
188
|
+
collectionListItem: t.instanceOf(Object),
|
|
189
|
+
itemListItem: t.instanceOf(Object),
|
|
190
|
+
loadingListItem: t.instanceOf(Object),
|
|
191
|
+
listItem: t.instanceOf(Object)
|
|
192
|
+
})
|
|
193
|
+
};
|
|
194
|
+
d.defaultProps = {
|
|
195
|
+
entities: [],
|
|
196
|
+
header: void 0,
|
|
197
|
+
primary: void 0,
|
|
198
|
+
secondary: void 0,
|
|
199
|
+
avatarVariant: "square",
|
|
200
|
+
dense: !1,
|
|
201
|
+
isLoading: !1,
|
|
202
|
+
amountLoading: 3,
|
|
203
|
+
onListItemClick: void 0,
|
|
204
|
+
onListItemDelete: void 0,
|
|
205
|
+
emptySlot: B,
|
|
206
|
+
components: H,
|
|
207
|
+
componentsProps: void 0
|
|
208
|
+
};
|
|
209
|
+
export {
|
|
210
|
+
d as default
|
|
211
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled as r } from "@mui/material/styles";
|
|
2
|
+
import { withOverrides as i } from "../../_utils/withOverrides.js";
|
|
3
|
+
import n from "./EntityList.js";
|
|
4
|
+
const t = "EntityList", o = `Vdt${t}`, s = i(o)(n), m = r(s, {
|
|
5
|
+
name: o,
|
|
6
|
+
overridesResolver: (d, e) => e.root
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
m.displayName = t;
|
|
9
|
+
export {
|
|
10
|
+
m as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import y from "@mui/material/ListItemAvatar";
|
|
3
|
+
import { parseMetadataType as l } from "@vidispine/vdt-js";
|
|
4
|
+
import c from "../../EntityAvatar/index.js";
|
|
5
|
+
function x({
|
|
6
|
+
itemType: t,
|
|
7
|
+
collectionType: e,
|
|
8
|
+
isLoading: r,
|
|
9
|
+
variant: m,
|
|
10
|
+
entityAvatar: o,
|
|
11
|
+
...n
|
|
12
|
+
}) {
|
|
13
|
+
const {
|
|
14
|
+
metadata: p
|
|
15
|
+
} = t || e || {}, s = t && "item" || e && "collection", {
|
|
16
|
+
mediaType: d,
|
|
17
|
+
mimeType: a
|
|
18
|
+
} = l(p, {
|
|
19
|
+
flat: !0,
|
|
20
|
+
arrayOnSingleValue: !1
|
|
21
|
+
}), f = typeof a == "string" ? a.split("/")[0] : void 0;
|
|
22
|
+
return /* @__PURE__ */ i(y, { ...n, children: /* @__PURE__ */ i(c, { entityType: s, mediaType: d || f, isLoading: r, variant: m, ...o }) });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
x as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as a } from "react";
|
|
3
|
+
import f from "@mui/material/ListItemButton";
|
|
4
|
+
import { getEntityProp as d } from "../../_utils/getEntityProp.js";
|
|
5
|
+
import "@vidispine/vdt-js";
|
|
6
|
+
function y({
|
|
7
|
+
itemType: i,
|
|
8
|
+
collectionType: m,
|
|
9
|
+
onClick: o,
|
|
10
|
+
isLoading: r,
|
|
11
|
+
...t
|
|
12
|
+
}) {
|
|
13
|
+
const n = !r && !!o, e = n ? f : a, l = n ? {
|
|
14
|
+
role: void 0,
|
|
15
|
+
onClick: (c) => o(c, d({
|
|
16
|
+
itemType: i,
|
|
17
|
+
collectionType: m
|
|
18
|
+
})),
|
|
19
|
+
...t
|
|
20
|
+
} : {
|
|
21
|
+
children: t == null ? void 0 : t.children
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ u(e, { ...l });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
y as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import c from "@mui/icons-material/esm/Delete";
|
|
3
|
+
import d from "@mui/material/IconButton";
|
|
4
|
+
import l from "@mui/material/ListItemSecondaryAction";
|
|
5
|
+
import p from "@mui/material/Skeleton";
|
|
6
|
+
import { getEntityProp as a } from "../../_utils/getEntityProp.js";
|
|
7
|
+
import "@vidispine/vdt-js";
|
|
8
|
+
function f() {
|
|
9
|
+
return /* @__PURE__ */ t("div", { style: {
|
|
10
|
+
paddingRight: 10
|
|
11
|
+
}, children: /* @__PURE__ */ t(p, { width: 18, height: 36 }) });
|
|
12
|
+
}
|
|
13
|
+
function S({
|
|
14
|
+
itemType: r,
|
|
15
|
+
collectionType: n,
|
|
16
|
+
onDelete: e,
|
|
17
|
+
isLoading: i,
|
|
18
|
+
...m
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ t(l, { ...m, children: e && (i ? /* @__PURE__ */ t(f, {}) : /* @__PURE__ */ t(d, { onClick: (o) => (o.stopPropagation(), o.preventDefault(), e(o, a({
|
|
21
|
+
itemType: r,
|
|
22
|
+
collectionType: n
|
|
23
|
+
}))), children: /* @__PURE__ */ t(c, {}) })) });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
S as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import p from "@mui/material/ListItemText";
|
|
3
|
+
import i from "@mui/material/Skeleton";
|
|
4
|
+
import { getEntityText as n } from "../../_utils/getEntityText.js";
|
|
5
|
+
function y({
|
|
6
|
+
itemType: t,
|
|
7
|
+
collectionType: r,
|
|
8
|
+
primary: s,
|
|
9
|
+
secondary: e,
|
|
10
|
+
isLoading: m,
|
|
11
|
+
...x
|
|
12
|
+
}) {
|
|
13
|
+
const {
|
|
14
|
+
id: f
|
|
15
|
+
} = t || r || {}, a = n(s, {
|
|
16
|
+
itemType: t,
|
|
17
|
+
collectionType: r
|
|
18
|
+
}), d = n(e, {
|
|
19
|
+
itemType: t,
|
|
20
|
+
collectionType: r
|
|
21
|
+
});
|
|
22
|
+
return /* @__PURE__ */ o(p, { primary: m ? /* @__PURE__ */ o(i, { width: 60 }) : a || f, secondary: m ? /* @__PURE__ */ o(i, { width: 120 }) : d, ...x });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
y as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import f from "@mui/material/TableCell";
|
|
3
|
+
import { parseMetadataType as y } from "@vidispine/vdt-js";
|
|
4
|
+
import c from "../../EntityAvatar/index.js";
|
|
5
|
+
function x({
|
|
6
|
+
itemType: e,
|
|
7
|
+
collectionType: t,
|
|
8
|
+
isLoading: i,
|
|
9
|
+
variant: r,
|
|
10
|
+
entityAvatar: m,
|
|
11
|
+
...n
|
|
12
|
+
}) {
|
|
13
|
+
const {
|
|
14
|
+
metadata: l
|
|
15
|
+
} = e || t || {}, p = e && "item" || t && "collection", {
|
|
16
|
+
mediaType: d,
|
|
17
|
+
mimeType: a
|
|
18
|
+
} = y(l, {
|
|
19
|
+
flat: !0,
|
|
20
|
+
arrayOnSingleValue: !1
|
|
21
|
+
}), s = typeof a == "string" ? a.split("/")[0] : void 0;
|
|
22
|
+
return /* @__PURE__ */ o(f, { padding: "checkbox", ...n, children: /* @__PURE__ */ o(c, { entityType: p, mediaType: d || s, variant: r, isLoading: i, ...m || {} }) });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
x as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import r from "@mui/material/TableCell";
|
|
3
|
+
import l from "@mui/material/Skeleton";
|
|
4
|
+
function c({
|
|
5
|
+
isLoading: t,
|
|
6
|
+
checkbox: m,
|
|
7
|
+
itemType: p,
|
|
8
|
+
children: o,
|
|
9
|
+
...i
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ e(r, { padding: "checkbox", ...i, children: t ? /* @__PURE__ */ e(l, { sx: {
|
|
12
|
+
width: "18px",
|
|
13
|
+
height: "36px",
|
|
14
|
+
margin: "auto"
|
|
15
|
+
} }) : o });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
c as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { parseMetadataType as e } from "@vidispine/vdt-js";
|
|
2
|
+
const i = (t, {
|
|
3
|
+
itemType: n,
|
|
4
|
+
collectionType: r
|
|
5
|
+
}) => {
|
|
6
|
+
const f = typeof t == "function" && t;
|
|
7
|
+
if (f)
|
|
8
|
+
return n ? f({
|
|
9
|
+
itemType: n
|
|
10
|
+
}) : r ? f({
|
|
11
|
+
collectionType: r
|
|
12
|
+
}) : void 0;
|
|
13
|
+
const a = typeof t == "string" && t;
|
|
14
|
+
if (a) {
|
|
15
|
+
const {
|
|
16
|
+
metadata: u
|
|
17
|
+
} = n || r || {}, {
|
|
18
|
+
[a]: s
|
|
19
|
+
} = e(u, {
|
|
20
|
+
flat: !0,
|
|
21
|
+
arrayOnSingleValue: !1
|
|
22
|
+
});
|
|
23
|
+
return s;
|
|
24
|
+
}
|
|
25
|
+
if (a === "id") {
|
|
26
|
+
const {
|
|
27
|
+
id: u
|
|
28
|
+
} = n || r || {};
|
|
29
|
+
return u;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
i as getEntityText
|
|
34
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { jsxs as A, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I } from "react";
|
|
3
|
+
import e from "prop-types";
|
|
4
|
+
import T from "@mui/material/Box";
|
|
5
|
+
import x from "@mui/material/Menu";
|
|
6
|
+
import { styled as l, darken as j } from "@mui/material/styles";
|
|
7
|
+
import S from "./components/Avatar.js";
|
|
8
|
+
import W from "./components/MenuItem.js";
|
|
9
|
+
const P = l(S)(({
|
|
10
|
+
theme: t,
|
|
11
|
+
characters: o
|
|
12
|
+
}) => ({
|
|
13
|
+
transition: "color .2s ease-out",
|
|
14
|
+
backgroundColor: t.palette.primary.main,
|
|
15
|
+
"&:hover": {
|
|
16
|
+
backgroundColor: j(t.palette.primary.main, 0.3)
|
|
17
|
+
},
|
|
18
|
+
...(o == null ? void 0 : o.length) > 1 ? {
|
|
19
|
+
fontSize: `${(o == null ? void 0 : o.length) === 2 ? "16" : "12"}px`,
|
|
20
|
+
lineHeight: 0,
|
|
21
|
+
fontWeight: 600
|
|
22
|
+
} : {
|
|
23
|
+
fontWeight: 500
|
|
24
|
+
}
|
|
25
|
+
})), z = l(W, {
|
|
26
|
+
shouldForwardProp: (t) => t !== "minWidth"
|
|
27
|
+
})(({
|
|
28
|
+
minWidth: t
|
|
29
|
+
}) => ({
|
|
30
|
+
minWidth: t
|
|
31
|
+
})), B = l(x)({
|
|
32
|
+
"& .MuiPaper-root": {
|
|
33
|
+
// Reduce the "opacity"
|
|
34
|
+
backgroundImage: "linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))"
|
|
35
|
+
}
|
|
36
|
+
}), R = {
|
|
37
|
+
Root: T,
|
|
38
|
+
Avatar: P,
|
|
39
|
+
Menu: B,
|
|
40
|
+
MenuItem: z
|
|
41
|
+
};
|
|
42
|
+
function c({
|
|
43
|
+
type: t,
|
|
44
|
+
characters: o,
|
|
45
|
+
variant: f,
|
|
46
|
+
minWidth: g,
|
|
47
|
+
options: v,
|
|
48
|
+
onAvatarClick: m,
|
|
49
|
+
onOptionClick: u,
|
|
50
|
+
components: y,
|
|
51
|
+
componentsProps: r
|
|
52
|
+
}) {
|
|
53
|
+
const {
|
|
54
|
+
Root: O,
|
|
55
|
+
Avatar: h,
|
|
56
|
+
Menu: M,
|
|
57
|
+
MenuItem: b
|
|
58
|
+
} = y, [s, p] = I(null), k = (n) => {
|
|
59
|
+
p(n.currentTarget), m && m(n);
|
|
60
|
+
}, d = () => {
|
|
61
|
+
p(null);
|
|
62
|
+
}, C = (n, i) => {
|
|
63
|
+
u && u(n, i), d();
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ A(O, { ...r.root, children: [
|
|
66
|
+
/* @__PURE__ */ a(h, { onClick: k, type: t, variant: f, characters: o, ...r.avatar }),
|
|
67
|
+
/* @__PURE__ */ a(M, { anchorEl: s, keepMounted: !0, open: !!s, onClose: d, PaperProps: {
|
|
68
|
+
square: !0,
|
|
69
|
+
...r.menu.PaperProps || {}
|
|
70
|
+
}, anchorOrigin: {
|
|
71
|
+
vertical: "bottom",
|
|
72
|
+
horizontal: "center",
|
|
73
|
+
...r.menu.anchorOrigin || {}
|
|
74
|
+
}, transformOrigin: {
|
|
75
|
+
vertical: "top",
|
|
76
|
+
horizontal: "center",
|
|
77
|
+
...r.menu.transformOrigin || {}
|
|
78
|
+
}, ...r.menu, children: v.map((n) => /* @__PURE__ */ a(b, { onClick: (i) => C(i, n), option: n, minWidth: g, ...r.menuItem }, n.name || n.label)) })
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
c.propTypes = {
|
|
82
|
+
/**
|
|
83
|
+
* Type for avatar button icons
|
|
84
|
+
*/
|
|
85
|
+
type: e.oneOf(["dots", "lines", "user"]),
|
|
86
|
+
/**
|
|
87
|
+
* Up to 3 characters to show inside avatar button (instead of icon)
|
|
88
|
+
*/
|
|
89
|
+
characters: e.string,
|
|
90
|
+
/**
|
|
91
|
+
* Variant/shapes for the list item avatars
|
|
92
|
+
*/
|
|
93
|
+
variant: e.oneOf(["circular", "rounded", "square"]),
|
|
94
|
+
/**
|
|
95
|
+
* Set min width of menu items
|
|
96
|
+
*/
|
|
97
|
+
minWidth: e.string,
|
|
98
|
+
/**
|
|
99
|
+
* The menu options
|
|
100
|
+
*/
|
|
101
|
+
options: e.arrayOf(e.shape({
|
|
102
|
+
icon: e.elementType,
|
|
103
|
+
name: e.string,
|
|
104
|
+
label: e.string,
|
|
105
|
+
secondaryLabel: e.string
|
|
106
|
+
})),
|
|
107
|
+
// Callbacks
|
|
108
|
+
/**
|
|
109
|
+
* Callback for clicking on the avatar
|
|
110
|
+
*
|
|
111
|
+
* Note: Will open menu when clicked
|
|
112
|
+
*/
|
|
113
|
+
onAvatarClick: e.func,
|
|
114
|
+
/**
|
|
115
|
+
* Callback for clicking on an option
|
|
116
|
+
*
|
|
117
|
+
* Note: Will close menu when an option is clicked
|
|
118
|
+
*/
|
|
119
|
+
onOptionClick: e.func,
|
|
120
|
+
// Overrides
|
|
121
|
+
/**
|
|
122
|
+
* Replace internal components
|
|
123
|
+
*/
|
|
124
|
+
components: e.shape({
|
|
125
|
+
Root: e.elementType,
|
|
126
|
+
Avatar: e.elementType,
|
|
127
|
+
Menu: e.elementType,
|
|
128
|
+
MenuItem: e.elementType
|
|
129
|
+
}),
|
|
130
|
+
/**
|
|
131
|
+
* Add internal component props
|
|
132
|
+
*/
|
|
133
|
+
componentsProps: e.shape({
|
|
134
|
+
root: e.instanceOf(Object),
|
|
135
|
+
avatar: e.instanceOf(Object),
|
|
136
|
+
menu: e.instanceOf(Object),
|
|
137
|
+
menuItem: e.instanceOf(Object)
|
|
138
|
+
})
|
|
139
|
+
};
|
|
140
|
+
c.defaultProps = {
|
|
141
|
+
type: "dots",
|
|
142
|
+
characters: void 0,
|
|
143
|
+
variant: "circular",
|
|
144
|
+
minWidth: "200px",
|
|
145
|
+
options: [],
|
|
146
|
+
onAvatarClick: void 0,
|
|
147
|
+
onOptionClick: void 0,
|
|
148
|
+
components: R,
|
|
149
|
+
componentsProps: void 0
|
|
150
|
+
};
|
|
151
|
+
export {
|
|
152
|
+
c as default
|
|
153
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import i from "@mui/icons-material/esm/MoreVert";
|
|
3
|
+
import m from "@mui/icons-material/esm/Menu";
|
|
4
|
+
import s from "@mui/icons-material/esm/Person";
|
|
5
|
+
import a from "@mui/material/Avatar";
|
|
6
|
+
import f from "@mui/material/IconButton";
|
|
7
|
+
function b({
|
|
8
|
+
type: e,
|
|
9
|
+
characters: r,
|
|
10
|
+
...n
|
|
11
|
+
}) {
|
|
12
|
+
let o;
|
|
13
|
+
switch (e) {
|
|
14
|
+
case "dots": {
|
|
15
|
+
o = i;
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
case "lines": {
|
|
19
|
+
o = m;
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
case "user":
|
|
23
|
+
default:
|
|
24
|
+
o = s;
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ t(a, { component: f, ...n, children: r && typeof r == "string" ? r.substring(0, 3) : /* @__PURE__ */ t(o, {}) });
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
b as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import c from "@mui/material/MenuItem";
|
|
3
|
+
import a from "@mui/material/ListItemIcon";
|
|
4
|
+
import l from "@mui/material/ListItemText";
|
|
5
|
+
import s from "@mui/material/Typography";
|
|
6
|
+
import { styled as p } from "@mui/material/styles";
|
|
7
|
+
const d = p(s)(({
|
|
8
|
+
theme: r
|
|
9
|
+
}) => ({
|
|
10
|
+
marginLeft: r.spacing(3)
|
|
11
|
+
}));
|
|
12
|
+
function g({
|
|
13
|
+
option: r,
|
|
14
|
+
...n
|
|
15
|
+
}) {
|
|
16
|
+
const {
|
|
17
|
+
icon: t,
|
|
18
|
+
label: i,
|
|
19
|
+
secondaryLabel: e
|
|
20
|
+
} = r || {};
|
|
21
|
+
return /* @__PURE__ */ m(c, { ...n, children: [
|
|
22
|
+
t && /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(t, { fontSize: "small" }) }),
|
|
23
|
+
/* @__PURE__ */ o(l, { children: i }),
|
|
24
|
+
e && /* @__PURE__ */ o(d, { variant: "body2", color: "text.secondary", children: e })
|
|
25
|
+
] });
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
g as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled as r } from "@mui/material/styles";
|
|
2
|
+
import { withOverrides as n } from "../../_utils/withOverrides.js";
|
|
3
|
+
import m from "./AvatarMenu.js";
|
|
4
|
+
const o = "AvatarMenu", e = `Vdt${o}`, s = n(e)(m), a = r(s, {
|
|
5
|
+
name: e,
|
|
6
|
+
overridesResolver: (i, t) => t.root
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
a.displayName = o;
|
|
9
|
+
export {
|
|
10
|
+
a as default
|
|
11
|
+
};
|