contentoh-components-library 21.6.61 → 21.6.62

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 (88) 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/pages/CreatorsProductEdition/CreatorsProductEditionView.js +11 -5
  7. package/dist/components/pages/CreatorsProductEdition/hooks/useCreatorsProductEdition.js +58 -31
  8. package/dist/components/pages/CreatorsProductEdition/mocks/api.fixtures.js +5 -1
  9. package/dist/components/pages/CreatorsProductEdition/mocks/mockApi.js +3 -40
  10. package/dist/components/pages/CreatorsProductEdition/sections/ImagesSection.js +18 -3
  11. package/dist/components/pages/CreatorsProductEdition/sections/StatusChip.js +4 -13
  12. package/dist/components/pages/CreatorsProductEdition/sections/TabsBar.js +10 -0
  13. package/dist/components/pages/CreatorsProductEdition/stories/CreatorsProductEdition.stories.js +10 -2
  14. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -15
  15. package/dist/components/pages/RetailerProductEdition/index.js +40 -57
  16. package/dist/components/pages/RetailerProductEdition/utils.js +2 -6
  17. package/dist/index.js +0 -13
  18. package/package.json +1 -1
  19. package/src/components/pages/CreatorsProductEdition/CreatorsProductEditionView.jsx +22 -3
  20. package/src/components/pages/CreatorsProductEdition/hooks/useCreatorsProductEdition.js +36 -1
  21. package/src/components/pages/CreatorsProductEdition/mocks/api.fixtures.js +15 -3
  22. package/src/components/pages/CreatorsProductEdition/mocks/mockApi.js +8 -18
  23. package/src/components/pages/CreatorsProductEdition/sections/ImagesSection.jsx +24 -2
  24. package/src/components/pages/CreatorsProductEdition/sections/StatusChip.jsx +4 -8
  25. package/src/components/pages/CreatorsProductEdition/sections/TabsBar.jsx +9 -0
  26. package/src/components/pages/CreatorsProductEdition/stories/CreatorsProductEdition.stories.js +6 -0
  27. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +0 -12
  28. package/src/components/pages/RetailerProductEdition/index.js +3 -28
  29. package/src/components/pages/RetailerProductEdition/utils.js +0 -5
  30. package/src/index.js +0 -1
  31. package/dist/components/organisms/ServicesNavigation/ServiceToolbar.js +0 -210
  32. package/dist/components/organisms/ServicesNavigation/ServicesNavigation.stories.js +0 -138
  33. package/dist/components/organisms/ServicesNavigation/ServicesRail.js +0 -705
  34. package/dist/components/organisms/ServicesNavigation/catalog.js +0 -505
  35. package/dist/components/organisms/ServicesNavigation/index.js +0 -337
  36. package/dist/components/organisms/ServicesNavigation/model.js +0 -167
  37. package/dist/components/organisms/ServicesNavigation/ui.js +0 -371
  38. package/dist/components/organisms/ServicesNavigation/views.js +0 -1237
  39. package/dist/components/organisms/ServicesWorkspace/AssigneePicker.js +0 -459
  40. package/dist/components/organisms/ServicesWorkspace/ServicesWorkspace.stories.js +0 -119
  41. package/dist/components/organisms/ServicesWorkspace/demo.js +0 -137
  42. package/dist/components/organisms/ServicesWorkspace/index.js +0 -813
  43. package/dist/components/organisms/ServicesWorkspace/servicesModel.js +0 -351
  44. package/dist/components/organisms/ServicesWorkspace/tooltipStyles.js +0 -37
  45. package/dist/components/pages/CreatorsProductEdition/mocks/productServices.fixtures.js +0 -387
  46. package/dist/components/pages/ProductEdition/ProductEdition.stories.js +0 -148
  47. package/dist/components/pages/ProductEdition/ProductEditionView.js +0 -1355
  48. package/dist/components/pages/ProductEdition/ServiceHeader.js +0 -142
  49. package/dist/components/pages/ProductEdition/api.js +0 -256
  50. package/dist/components/pages/ProductEdition/index.js +0 -37
  51. package/dist/components/pages/ProductEdition/permissions.js +0 -200
  52. package/dist/components/pages/ProductEdition/permissions.test.js +0 -320
  53. package/dist/components/pages/ProductEdition/sections/CatalogServicePanel.js +0 -237
  54. package/dist/components/pages/ProductEdition/sections/EditionTopBar.js +0 -174
  55. package/dist/components/pages/ProductEdition/sections/ImagePanel.js +0 -440
  56. package/dist/components/pages/ProductEdition/sections/ServiceTeam.js +0 -275
  57. package/dist/components/pages/ProductEdition/sections/ServiceTools.js +0 -186
  58. package/dist/components/pages/ProductEdition/services.js +0 -233
  59. package/dist/components/pages/ProductEdition/services.test.js +0 -195
  60. package/src/components/organisms/ServicesNavigation/ServiceToolbar.jsx +0 -143
  61. package/src/components/organisms/ServicesNavigation/ServicesNavigation.stories.js +0 -101
  62. package/src/components/organisms/ServicesNavigation/ServicesRail.jsx +0 -591
  63. package/src/components/organisms/ServicesNavigation/catalog.js +0 -180
  64. package/src/components/organisms/ServicesNavigation/index.jsx +0 -232
  65. package/src/components/organisms/ServicesNavigation/model.js +0 -85
  66. package/src/components/organisms/ServicesNavigation/ui.jsx +0 -229
  67. package/src/components/organisms/ServicesNavigation/views.jsx +0 -705
  68. package/src/components/organisms/ServicesWorkspace/AssigneePicker.js +0 -348
  69. package/src/components/organisms/ServicesWorkspace/ServicesWorkspace.stories.js +0 -61
  70. package/src/components/organisms/ServicesWorkspace/demo.js +0 -58
  71. package/src/components/organisms/ServicesWorkspace/index.js +0 -556
  72. package/src/components/organisms/ServicesWorkspace/servicesModel.js +0 -203
  73. package/src/components/organisms/ServicesWorkspace/tooltipStyles.js +0 -27
  74. package/src/components/pages/CreatorsProductEdition/mocks/productServices.fixtures.js +0 -175
  75. package/src/components/pages/ProductEdition/ProductEdition.stories.js +0 -106
  76. package/src/components/pages/ProductEdition/ProductEditionView.jsx +0 -1142
  77. package/src/components/pages/ProductEdition/ServiceHeader.jsx +0 -104
  78. package/src/components/pages/ProductEdition/api.js +0 -84
  79. package/src/components/pages/ProductEdition/index.js +0 -21
  80. package/src/components/pages/ProductEdition/permissions.js +0 -128
  81. package/src/components/pages/ProductEdition/permissions.test.js +0 -249
  82. package/src/components/pages/ProductEdition/sections/CatalogServicePanel.jsx +0 -123
  83. package/src/components/pages/ProductEdition/sections/EditionTopBar.jsx +0 -134
  84. package/src/components/pages/ProductEdition/sections/ImagePanel.jsx +0 -342
  85. package/src/components/pages/ProductEdition/sections/ServiceTeam.jsx +0 -184
  86. package/src/components/pages/ProductEdition/sections/ServiceTools.jsx +0 -134
  87. package/src/components/pages/ProductEdition/services.js +0 -187
  88. 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
- };