contentoh-components-library 21.6.61 → 21.6.63

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.
Files changed (102) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/dist/ai/prompts/attribute.prompt.js +28 -0
  3. package/dist/ai/prompts/description.prompt.js +33 -0
  4. package/dist/ai/schemas/attribute.schema.js +35 -0
  5. package/dist/ai/schemas/description.schema.js +27 -0
  6. package/dist/components/atoms/MetricCard/index.js +3 -1
  7. package/dist/components/organisms/DashboardMetric/DashboardMetric.stories.js +12 -2
  8. package/dist/components/organisms/DashboardMetric/index.js +24 -1
  9. package/dist/components/organisms/DashboardMetric/styles.js +1 -1
  10. package/dist/components/pages/CreatorsProductEdition/CreatorsProductEditionView.js +11 -5
  11. package/dist/components/pages/CreatorsProductEdition/hooks/useCreatorsProductEdition.js +58 -31
  12. package/dist/components/pages/CreatorsProductEdition/mocks/api.fixtures.js +5 -1
  13. package/dist/components/pages/CreatorsProductEdition/mocks/mockApi.js +3 -40
  14. package/dist/components/pages/CreatorsProductEdition/sections/ImagesSection.js +18 -3
  15. package/dist/components/pages/CreatorsProductEdition/sections/StatusChip.js +4 -13
  16. package/dist/components/pages/CreatorsProductEdition/sections/TabsBar.js +10 -0
  17. package/dist/components/pages/CreatorsProductEdition/stories/CreatorsProductEdition.stories.js +10 -2
  18. package/dist/components/pages/Dashboard/dashboardUtils.js +3 -3
  19. package/dist/components/pages/Dashboard/index.js +102 -88
  20. package/dist/components/pages/Dashboard/styles.js +1 -1
  21. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -15
  22. package/dist/components/pages/RetailerProductEdition/index.js +40 -57
  23. package/dist/components/pages/RetailerProductEdition/utils.js +2 -6
  24. package/dist/index.js +0 -13
  25. package/package.json +1 -1
  26. package/src/components/atoms/MetricCard/index.js +2 -2
  27. package/src/components/organisms/DashboardMetric/DashboardMetric.stories.js +11 -0
  28. package/src/components/organisms/DashboardMetric/index.js +13 -1
  29. package/src/components/organisms/DashboardMetric/styles.js +13 -0
  30. package/src/components/pages/CreatorsProductEdition/CreatorsProductEditionView.jsx +22 -3
  31. package/src/components/pages/CreatorsProductEdition/hooks/useCreatorsProductEdition.js +36 -1
  32. package/src/components/pages/CreatorsProductEdition/mocks/api.fixtures.js +15 -3
  33. package/src/components/pages/CreatorsProductEdition/mocks/mockApi.js +8 -18
  34. package/src/components/pages/CreatorsProductEdition/sections/ImagesSection.jsx +24 -2
  35. package/src/components/pages/CreatorsProductEdition/sections/StatusChip.jsx +4 -8
  36. package/src/components/pages/CreatorsProductEdition/sections/TabsBar.jsx +9 -0
  37. package/src/components/pages/CreatorsProductEdition/stories/CreatorsProductEdition.stories.js +6 -0
  38. package/src/components/pages/Dashboard/dashboardUtils.js +3 -3
  39. package/src/components/pages/Dashboard/index.js +62 -106
  40. package/src/components/pages/Dashboard/styles.js +17 -12
  41. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +0 -12
  42. package/src/components/pages/RetailerProductEdition/index.js +3 -28
  43. package/src/components/pages/RetailerProductEdition/utils.js +0 -5
  44. package/src/index.js +0 -1
  45. package/dist/components/organisms/ServicesNavigation/ServiceToolbar.js +0 -210
  46. package/dist/components/organisms/ServicesNavigation/ServicesNavigation.stories.js +0 -138
  47. package/dist/components/organisms/ServicesNavigation/ServicesRail.js +0 -705
  48. package/dist/components/organisms/ServicesNavigation/catalog.js +0 -505
  49. package/dist/components/organisms/ServicesNavigation/index.js +0 -337
  50. package/dist/components/organisms/ServicesNavigation/model.js +0 -167
  51. package/dist/components/organisms/ServicesNavigation/ui.js +0 -371
  52. package/dist/components/organisms/ServicesNavigation/views.js +0 -1237
  53. package/dist/components/organisms/ServicesWorkspace/AssigneePicker.js +0 -459
  54. package/dist/components/organisms/ServicesWorkspace/ServicesWorkspace.stories.js +0 -119
  55. package/dist/components/organisms/ServicesWorkspace/demo.js +0 -137
  56. package/dist/components/organisms/ServicesWorkspace/index.js +0 -813
  57. package/dist/components/organisms/ServicesWorkspace/servicesModel.js +0 -351
  58. package/dist/components/organisms/ServicesWorkspace/tooltipStyles.js +0 -37
  59. package/dist/components/pages/CreatorsProductEdition/mocks/productServices.fixtures.js +0 -387
  60. package/dist/components/pages/ProductEdition/ProductEdition.stories.js +0 -148
  61. package/dist/components/pages/ProductEdition/ProductEditionView.js +0 -1355
  62. package/dist/components/pages/ProductEdition/ServiceHeader.js +0 -142
  63. package/dist/components/pages/ProductEdition/api.js +0 -256
  64. package/dist/components/pages/ProductEdition/index.js +0 -37
  65. package/dist/components/pages/ProductEdition/permissions.js +0 -200
  66. package/dist/components/pages/ProductEdition/permissions.test.js +0 -320
  67. package/dist/components/pages/ProductEdition/sections/CatalogServicePanel.js +0 -237
  68. package/dist/components/pages/ProductEdition/sections/EditionTopBar.js +0 -174
  69. package/dist/components/pages/ProductEdition/sections/ImagePanel.js +0 -440
  70. package/dist/components/pages/ProductEdition/sections/ServiceTeam.js +0 -275
  71. package/dist/components/pages/ProductEdition/sections/ServiceTools.js +0 -186
  72. package/dist/components/pages/ProductEdition/services.js +0 -233
  73. package/dist/components/pages/ProductEdition/services.test.js +0 -195
  74. package/src/components/organisms/ServicesNavigation/ServiceToolbar.jsx +0 -143
  75. package/src/components/organisms/ServicesNavigation/ServicesNavigation.stories.js +0 -101
  76. package/src/components/organisms/ServicesNavigation/ServicesRail.jsx +0 -591
  77. package/src/components/organisms/ServicesNavigation/catalog.js +0 -180
  78. package/src/components/organisms/ServicesNavigation/index.jsx +0 -232
  79. package/src/components/organisms/ServicesNavigation/model.js +0 -85
  80. package/src/components/organisms/ServicesNavigation/ui.jsx +0 -229
  81. package/src/components/organisms/ServicesNavigation/views.jsx +0 -705
  82. package/src/components/organisms/ServicesWorkspace/AssigneePicker.js +0 -348
  83. package/src/components/organisms/ServicesWorkspace/ServicesWorkspace.stories.js +0 -61
  84. package/src/components/organisms/ServicesWorkspace/demo.js +0 -58
  85. package/src/components/organisms/ServicesWorkspace/index.js +0 -556
  86. package/src/components/organisms/ServicesWorkspace/servicesModel.js +0 -203
  87. package/src/components/organisms/ServicesWorkspace/tooltipStyles.js +0 -27
  88. package/src/components/pages/CreatorsProductEdition/mocks/productServices.fixtures.js +0 -175
  89. package/src/components/pages/ProductEdition/ProductEdition.stories.js +0 -106
  90. package/src/components/pages/ProductEdition/ProductEditionView.jsx +0 -1142
  91. package/src/components/pages/ProductEdition/ServiceHeader.jsx +0 -104
  92. package/src/components/pages/ProductEdition/api.js +0 -84
  93. package/src/components/pages/ProductEdition/index.js +0 -21
  94. package/src/components/pages/ProductEdition/permissions.js +0 -128
  95. package/src/components/pages/ProductEdition/permissions.test.js +0 -249
  96. package/src/components/pages/ProductEdition/sections/CatalogServicePanel.jsx +0 -123
  97. package/src/components/pages/ProductEdition/sections/EditionTopBar.jsx +0 -134
  98. package/src/components/pages/ProductEdition/sections/ImagePanel.jsx +0 -342
  99. package/src/components/pages/ProductEdition/sections/ServiceTeam.jsx +0 -184
  100. package/src/components/pages/ProductEdition/sections/ServiceTools.jsx +0 -134
  101. package/src/components/pages/ProductEdition/services.js +0 -187
  102. package/src/components/pages/ProductEdition/services.test.js +0 -88
@@ -1,229 +0,0 @@
1
- import { Avatar, Box, Tooltip } from "@mui/material";
2
- import ListAltOutlinedIcon from "@mui/icons-material/ListAltOutlined";
3
- import LocalShippingOutlinedIcon from "@mui/icons-material/LocalShippingOutlined";
4
- import ShoppingCartOutlinedIcon from "@mui/icons-material/ShoppingCartOutlined";
5
- import ArticleOutlinedIcon from "@mui/icons-material/ArticleOutlined";
6
- import TitleOutlinedIcon from "@mui/icons-material/TitleOutlined";
7
- import TravelExploreOutlinedIcon from "@mui/icons-material/TravelExploreOutlined";
8
- import TranslateOutlinedIcon from "@mui/icons-material/TranslateOutlined";
9
- import ImageOutlinedIcon from "@mui/icons-material/ImageOutlined";
10
- import PhotoCameraOutlinedIcon from "@mui/icons-material/PhotoCameraOutlined";
11
- import AutoFixHighOutlinedIcon from "@mui/icons-material/AutoFixHighOutlined";
12
- import AspectRatioOutlinedIcon from "@mui/icons-material/AspectRatioOutlined";
13
- import DashboardCustomizeOutlinedIcon from "@mui/icons-material/DashboardCustomizeOutlined";
14
- import WorkspacePremiumOutlinedIcon from "@mui/icons-material/WorkspacePremiumOutlined";
15
- import MovieOutlinedIcon from "@mui/icons-material/MovieOutlined";
16
- import ViewInArOutlinedIcon from "@mui/icons-material/ViewInArOutlined";
17
- import StorefrontOutlinedIcon from "@mui/icons-material/StorefrontOutlined";
18
- import WebOutlinedIcon from "@mui/icons-material/WebOutlined";
19
- import InsertChartOutlinedIcon from "@mui/icons-material/InsertChartOutlined";
20
- import VerifiedOutlinedIcon from "@mui/icons-material/VerifiedOutlined";
21
- import FactCheckOutlinedIcon from "@mui/icons-material/FactCheckOutlined";
22
- import PlaylistAddCheckOutlinedIcon from "@mui/icons-material/PlaylistAddCheckOutlined";
23
- import PublishOutlinedIcon from "@mui/icons-material/PublishOutlined";
24
- import SpaceDashboardOutlinedIcon from "@mui/icons-material/SpaceDashboardOutlined";
25
- import InsertDriveFileOutlinedIcon from "@mui/icons-material/InsertDriveFileOutlined";
26
- import EventRepeatOutlinedIcon from "@mui/icons-material/EventRepeatOutlined";
27
- import BuildOutlinedIcon from "@mui/icons-material/BuildOutlined";
28
- import GTranslateOutlinedIcon from "@mui/icons-material/GTranslateOutlined";
29
- import AutoAwesomeOutlinedIcon from "@mui/icons-material/AutoAwesomeOutlined";
30
- import ChairOutlinedIcon from "@mui/icons-material/ChairOutlined";
31
- import RuleOutlinedIcon from "@mui/icons-material/RuleOutlined";
32
- import ThumbsUpDownOutlinedIcon from "@mui/icons-material/ThumbsUpDownOutlined";
33
- import FormatListBulletedOutlinedIcon from "@mui/icons-material/FormatListBulletedOutlined";
34
- import EmojiEventsOutlinedIcon from "@mui/icons-material/EmojiEventsOutlined";
35
- import ViewCarouselOutlinedIcon from "@mui/icons-material/ViewCarouselOutlined";
36
- import ThreeDRotationOutlinedIcon from "@mui/icons-material/ThreeDRotationOutlined";
37
- import ThreeSixtyOutlinedIcon from "@mui/icons-material/ThreeSixtyOutlined";
38
- import MenuBookOutlinedIcon from "@mui/icons-material/MenuBookOutlined";
39
- import CloudUploadOutlinedIcon from "@mui/icons-material/CloudUploadOutlined";
40
- import CameraEnhanceOutlinedIcon from "@mui/icons-material/CameraEnhanceOutlined";
41
- import PortraitOutlinedIcon from "@mui/icons-material/PortraitOutlined";
42
- import WeekendOutlinedIcon from "@mui/icons-material/WeekendOutlined";
43
- import HighQualityOutlinedIcon from "@mui/icons-material/HighQualityOutlined";
44
- import ImageSearchOutlinedIcon from "@mui/icons-material/ImageSearchOutlined";
45
- import HandymanOutlinedIcon from "@mui/icons-material/HandymanOutlined";
46
-
47
- /*
48
- Colores, tipografía y la etiqueta de estatus son los de la edición de
49
- Creators (CreatorsProductEdition), para que el prototipo se vea como ella.
50
- Si la propuesta se aprueba, estas piezas deberían salir de la página a un
51
- lugar compartido.
52
- */
53
- import { COLORS, FONTS, statusColor as statusColorOf } from "../../pages/CreatorsProductEdition/sections/tokens";
54
-
55
- export { COLORS, FONTS };
56
- export { StatusChip } from "../../pages/CreatorsProductEdition/sections/StatusChip";
57
-
58
- /**
59
- * Props de StatusChip para un servicio de la lista. Los de flujo simple del
60
- * catálogo (casilla, avance) muestran su nombre y su color en lugar del código.
61
- */
62
- export const serviceStatusColor = (service) =>
63
- (service?.status_flow_type === "simple" && service.status_color) || statusColorOf(service?.status);
64
-
65
- export const serviceStatusProps = (service) =>
66
- service?.status_flow_type === "simple"
67
- ? { status: service.status, label: service.status_label ?? service.status, color: service.status_color ?? undefined }
68
- : { status: service?.status };
69
- export { statusColor, statusName } from "../../pages/CreatorsProductEdition/sections/tokens";
70
-
71
- export const FONT_STACK = `${FONTS.Lato}, "Avenir Next", sans-serif`;
72
- export const TITLE_STACK = `${FONTS.Raleway}, ${FONTS.Lato}, sans-serif`;
73
-
74
- const ICONS = {
75
- summary: SpaceDashboardOutlinedIcon,
76
- // Logística: mismas llaves que cat_service.icon_name.
77
- pickup: LocalShippingOutlinedIcon,
78
- purchase: ShoppingCartOutlinedIcon,
79
- assembly: HandymanOutlinedIcon,
80
- datasheet: ListAltOutlinedIcon,
81
- description: ArticleOutlinedIcon,
82
- header: TitleOutlinedIcon,
83
- seo: TravelExploreOutlinedIcon,
84
- translation: TranslateOutlinedIcon,
85
- images: ImageOutlinedIcon,
86
- photo: PhotoCameraOutlinedIcon,
87
- edition: AutoFixHighOutlinedIcon,
88
- resize: AspectRatioOutlinedIcon,
89
- adaptations: DashboardCustomizeOutlinedIcon,
90
- premium: WorkspacePremiumOutlinedIcon,
91
- video: MovieOutlinedIcon,
92
- image360: ThreeSixtyOutlinedIcon,
93
- brandstore: StorefrontOutlinedIcon,
94
- aplus: WebOutlinedIcon,
95
- infographics: InsertChartOutlinedIcon,
96
- quality: VerifiedOutlinedIcon,
97
- audit: FactCheckOutlinedIcon,
98
- secodat: PlaylistAddCheckOutlinedIcon,
99
- upload: PublishOutlinedIcon,
100
- followUp: EventRepeatOutlinedIcon,
101
- maintenance: BuildOutlinedIcon,
102
- graphicTranslation: GTranslateOutlinedIcon,
103
- visualUpdate: AutoAwesomeOutlinedIcon,
104
- ambient: ChairOutlinedIcon,
105
- inputReview: RuleOutlinedIcon,
106
- clientReview: ThumbsUpDownOutlinedIcon,
107
- bullets: FormatListBulletedOutlinedIcon,
108
- specialPhoto: CameraEnhanceOutlinedIcon,
109
- modelPhoto: PortraitOutlinedIcon,
110
- premiumAmbient: WeekendOutlinedIcon,
111
- golden: EmojiEventsOutlinedIcon,
112
- banner: ViewCarouselOutlinedIcon,
113
- render: ThreeDRotationOutlinedIcon,
114
- arModel: ViewInArOutlinedIcon,
115
- manual: MenuBookOutlinedIcon,
116
- visualQuality: HighQualityOutlinedIcon,
117
- visualAudit: ImageSearchOutlinedIcon,
118
- gdsn: CloudUploadOutlinedIcon,
119
- visualMaintenance: HandymanOutlinedIcon,
120
- };
121
-
122
- export const ServiceIcon = ({ icon, sx }) => {
123
- const Icon = ICONS[icon] ?? InsertDriveFileOutlinedIcon;
124
- return <Icon sx={{ fontSize: 18, ...sx }} />;
125
- };
126
-
127
- /** Punto rosa: «te toca a ti». */
128
- export const PendingDot = ({ size = 8, withTooltip = true }) => {
129
- const dot = (
130
- <Box
131
- component="span"
132
- aria-label="Te toca a ti"
133
- sx={{
134
- width: size,
135
- height: size,
136
- borderRadius: "50%",
137
- bgcolor: COLORS.magenta_s2,
138
- flexShrink: 0,
139
- display: "inline-block",
140
- }}
141
- />
142
- );
143
- return withTooltip ? (
144
- <Tooltip title="Te toca a ti" arrow placement="top">
145
- {dot}
146
- </Tooltip>
147
- ) : (
148
- dot
149
- );
150
- };
151
-
152
- /** Iniciales de una persona; la persona que está viendo lleva borde rosa. */
153
- export const PersonAvatar = ({ user, isMe = false, size = 26, title }) => (
154
- <Tooltip title={title ?? ""} arrow placement="top" disableHoverListener={!title}>
155
- <Avatar
156
- sx={{
157
- width: size,
158
- height: size,
159
- fontSize: size * 0.42,
160
- fontFamily: FONT_STACK,
161
- fontWeight: 700,
162
- bgcolor: user ? COLORS.s2 : COLORS.white,
163
- color: user ? COLORS.s5 : COLORS.s3,
164
- border: `2px solid ${isMe ? COLORS.magenta_s2 : COLORS.white}`,
165
- outline: user ? "none" : `1px dashed ${COLORS.s3}`,
166
- outlineOffset: -3,
167
- }}
168
- >
169
- {user ? `${user.name?.[0] ?? ""}${user.last_name?.[0] ?? ""}`.toUpperCase() : "?"}
170
- </Avatar>
171
- </Tooltip>
172
- );
173
-
174
- /** Botones redondeados de la plataforma (rosa lleno y contorno). */
175
- export const pillButtonSx = {
176
- textTransform: "none",
177
- borderRadius: "20px",
178
- fontFamily: FONT_STACK,
179
- fontSize: 13,
180
- fontWeight: 700,
181
- height: 32,
182
- px: 2,
183
- boxShadow: "none",
184
- whiteSpace: "nowrap",
185
- };
186
-
187
- export const primaryButtonSx = {
188
- ...pillButtonSx,
189
- bgcolor: COLORS.magenta_s2,
190
- color: COLORS.white,
191
- "&:hover": { bgcolor: COLORS.secondary_magenta, boxShadow: "none" },
192
- };
193
-
194
- export const outlineButtonSx = {
195
- ...pillButtonSx,
196
- color: COLORS.s5,
197
- border: `1px solid ${COLORS.s3}`,
198
- bgcolor: COLORS.white,
199
- "&:hover": { bgcolor: COLORS.s2, borderColor: COLORS.s3 },
200
- "&.Mui-disabled": { color: COLORS.s3, borderColor: COLORS.s2 },
201
- };
202
-
203
- /** Campo de texto con el foco rosa de la plataforma. */
204
- export const fieldSx = {
205
- "& .MuiOutlinedInput-root": {
206
- borderRadius: "6px",
207
- fontFamily: FONT_STACK,
208
- fontSize: 14,
209
- color: COLORS.color_gray,
210
- bgcolor: COLORS.white,
211
- "& fieldset": { borderColor: COLORS.s3 },
212
- "&:hover fieldset": { borderColor: COLORS.s4 },
213
- "&.Mui-focused fieldset": { borderColor: COLORS.magenta_s2 },
214
- },
215
- };
216
-
217
- export const labelSx = {
218
- fontFamily: FONT_STACK,
219
- fontSize: 13,
220
- fontWeight: 700,
221
- color: COLORS.s5,
222
- mb: 0.5,
223
- };
224
-
225
- export const captionSx = {
226
- fontFamily: FONT_STACK,
227
- fontSize: 12,
228
- color: COLORS.s4,
229
- };