frst-components 0.28.5 → 0.28.6

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/index.js CHANGED
@@ -24538,11 +24538,7 @@ function abbreviateMiddleSurnames(fullName) {
24538
24538
  }
24539
24539
  }
24540
24540
 
24541
- function NewChallengeCard({ selected, avatar, name, role, description, lastStep, cardID, goalUUID, authorUUID, userLoggedUUID, group_uuid, type_challenge = "original", isIterator, isVisibleHeaderTypeChallenge = false, indicatorStart, indicatorCurrent, indicatorGoal, impact, relevance, handleSelected, handleClickChallenge, handleClickPresentation, onClickAvatar, goalExecutionGroup, handleGroupExecution, iteratorNumber, isCompanyAbleGroupExecution, resultNumber, showCheckbox }) {
24542
- const isAuthor = userLoggedUUID === authorUUID;
24543
- const isGroupExecution = !!goalExecutionGroup?.room_uuid;
24544
- const showExecutionGroupButton = isCompanyAbleGroupExecution && ((isAuthor && !isGroupExecution) || isGroupExecution);
24545
- const isMemberGroup = goalExecutionGroup?.users_room_uuid?.some(userRoom => userRoom?.uuid === userLoggedUUID);
24541
+ function NewChallengeCard({ selected, avatar, name, role, description, lastStep, cardID, type_challenge = "original", isIterator, isVisibleHeaderTypeChallenge = false, indicatorStart, indicatorCurrent, indicatorGoal, impact, relevance, handleSelected, handleClickChallenge, handleClickPresentation, onClickAvatar, handleGroupExecution, iteratorNumber, resultNumber, showCheckbox, showExecutionGroup, }) {
24546
24542
  const options = [
24547
24543
  {
24548
24544
  description: 'Ver desafio',
@@ -24554,71 +24550,35 @@ function NewChallengeCard({ selected, avatar, name, role, description, lastStep,
24554
24550
  startIcon: jsxRuntime.jsx(PresentationIcon, {}),
24555
24551
  onClick: handleClickPresentation
24556
24552
  },
24557
- showExecutionGroupButton && {
24553
+ showExecutionGroup && {
24558
24554
  description: 'Grupo de execução',
24559
24555
  startIcon: jsxRuntime.jsx(RoomGroupIcon, {}),
24560
- onClick: () => handleGroupExecution({ isGroup: !!goalExecutionGroup?.room_uuid, isMemberGroup: isMemberGroup, goalTitle: description, goalUuid: goalUUID, isAuthor: isAuthor, executionDetails: goalExecutionGroup })
24556
+ onClick: handleGroupExecution
24561
24557
  }
24562
24558
  ]?.filter(Boolean);
24563
24559
  const getStepName = (step) => {
24564
- const GroupUuids = [
24565
- "b1005836-b0a6-4a50-8147-537ebdc64a75",
24566
- "f280489d-2997-4d47-a2ab-47f85c54c72a",
24567
- "ef205633-b90d-4331-ad67-064355bb85d9",
24568
- "cb67cb4b-5209-4f3b-88cb-d612829735a9",
24569
- 'd99a6401-330b-48b8-8a01-85205fcfeff7',
24570
- 'dd9a9f20-8481-4f32-9562-6f0ddf80cd91',
24571
- '67ae3079-521a-4747-852d-8b3601c46e24'
24572
- ];
24573
- let steps;
24574
- if (GroupUuids.includes(group_uuid)) {
24575
- steps = {
24576
- '0-problema': {
24577
- name: 'Fase 1 - Definição (meta)',
24578
- color: '#F2CEE4'
24579
- },
24580
- '1-hipotese': {
24581
- name: 'Fase 2 - Plano de ação',
24582
- color: '#FCDFA6'
24583
- },
24584
- '2-testes': {
24585
- name: 'Fase 3 - Execução',
24586
- color: '#DACEF2'
24587
- },
24588
- '3-aprendizados-e-resultados': {
24589
- name: 'Fase 4 - Resultado',
24590
- color: '#EBEBEB'
24591
- },
24592
- '4-proximos-passos': {
24593
- name: 'Desafio finalizado',
24594
- color: '#BDE3B9'
24595
- }
24596
- };
24597
- }
24598
- else {
24599
- steps = {
24600
- '0-problema': {
24601
- name: 'Fase 1: Definição',
24602
- color: '#EBEBEB'
24603
- },
24604
- '1-hipotese': {
24605
- name: 'Fase 2: Hipóteses',
24606
- color: '#FCDFA6'
24607
- },
24608
- '2-testes': {
24609
- name: 'Fase 3: Testes',
24610
- color: '#DACEF2'
24611
- },
24612
- '3-aprendizados-e-resultados': {
24613
- name: 'Fase 4: Resultados',
24614
- color: '#F2CEE4'
24615
- },
24616
- '4-proximos-passos': {
24617
- name: 'Desafio finalizado',
24618
- color: '#BDE3B9'
24619
- }
24620
- };
24621
- }
24560
+ let steps = {
24561
+ '0-problema': {
24562
+ name: 'Fase 1 - Definição da meta',
24563
+ color: '#F2CEE4'
24564
+ },
24565
+ '1-hipotese': {
24566
+ name: 'Fase 2 - Plano de ação',
24567
+ color: '#FCDFA6'
24568
+ },
24569
+ '2-testes': {
24570
+ name: 'Fase 3 - Execução',
24571
+ color: '#DACEF2'
24572
+ },
24573
+ '3-aprendizados-e-resultados': {
24574
+ name: 'Fase 4 - Resultado',
24575
+ color: '#EBEBEB'
24576
+ },
24577
+ '4-proximos-passos': {
24578
+ name: 'Desafio finalizado',
24579
+ color: '#BDE3B9'
24580
+ }
24581
+ };
24622
24582
  return steps[step];
24623
24583
  };
24624
24584
  return (jsxRuntime.jsxs(cardWrapper, { id: cardID, children: [isVisibleHeaderTypeChallenge ? jsxRuntime.jsxs(tagTypeChallenge, { isIterator: isIterator, children: [jsxRuntime.jsx("div", { style: { marginTop: "6px" }, children: type_challenge == "duplicated" ?
@@ -6,10 +6,6 @@ interface ChallengeCardProps {
6
6
  description?: string;
7
7
  lastStep?: string;
8
8
  cardID: string;
9
- goalUUID?: string;
10
- authorUUID?: string;
11
- userLoggedUUID?: string;
12
- group_uuid: string;
13
9
  type_challenge?: string;
14
10
  isIterator?: boolean;
15
11
  indicatorStart?: number;
@@ -23,12 +19,11 @@ interface ChallengeCardProps {
23
19
  onClickAvatar?: () => void;
24
20
  isVisibleHeaderTypeChallenge?: boolean;
25
21
  handleGroupExecution: (params: any) => void;
26
- goalExecutionGroup: any;
27
22
  iteratorNumber?: number;
28
- isCompanyAbleGroupExecution: boolean;
29
23
  resultNumber?: number;
30
24
  showCheckbox?: boolean;
25
+ showExecutionGroup: boolean;
31
26
  }
32
- export default function NewChallengeCard({ selected, avatar, name, role, description, lastStep, cardID, goalUUID, authorUUID, userLoggedUUID, group_uuid, type_challenge, isIterator, isVisibleHeaderTypeChallenge, indicatorStart, indicatorCurrent, indicatorGoal, impact, relevance, handleSelected, handleClickChallenge, handleClickPresentation, onClickAvatar, goalExecutionGroup, handleGroupExecution, iteratorNumber, isCompanyAbleGroupExecution, resultNumber, showCheckbox }: ChallengeCardProps): import("react/jsx-runtime").JSX.Element;
27
+ export default function NewChallengeCard({ selected, avatar, name, role, description, lastStep, cardID, type_challenge, isIterator, isVisibleHeaderTypeChallenge, indicatorStart, indicatorCurrent, indicatorGoal, impact, relevance, handleSelected, handleClickChallenge, handleClickPresentation, onClickAvatar, handleGroupExecution, iteratorNumber, resultNumber, showCheckbox, showExecutionGroup, }: ChallengeCardProps): import("react/jsx-runtime").JSX.Element;
33
28
  export {};
34
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DS/newCards/challenge/index.tsx"],"names":[],"mappings":"AASA,UAAU,kBAAkB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAC,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAC,MAAM,CAAA;IACxB,aAAa,CAAC,EAAC,MAAM,CAAA;IACrB,MAAM,CAAC,EAAC,MAAM,CAAA;IACd,SAAS,CAAC,EAAC,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,CAAC,CAAC,KAAA,KAAK,IAAI,CAAA;IAC5B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAA;IACpC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,oBAAoB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5C,kBAAkB,EAAE,GAAG,CAAC;IACxB,cAAc,CAAC,EAAC,MAAM,CAAA;IACtB,2BAA2B,EAAE,OAAO,CAAC;IACrC,YAAY,CAAC,EAAC,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,EACtC,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,UAAU,EACV,cAAc,EACd,UAAU,EACV,cAA2B,EAC3B,UAAU,EACV,4BAAoC,EACpC,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,2BAA2B,EAC3B,YAAY,EACZ,YAAY,EACf,EAAE,kBAAkB,2CAyMpB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DS/newCards/challenge/index.tsx"],"names":[],"mappings":"AASA,UAAU,kBAAkB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAC,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAC,MAAM,CAAA;IACxB,aAAa,CAAC,EAAC,MAAM,CAAA;IACrB,MAAM,CAAC,EAAC,MAAM,CAAA;IACd,SAAS,CAAC,EAAC,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,CAAC,CAAC,KAAA,KAAK,IAAI,CAAA;IAC5B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAA;IACpC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,oBAAoB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAC,MAAM,CAAA;IACtB,YAAY,CAAC,EAAC,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,EAAE,OAAO,CAAA;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,EACtC,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,MAAM,EACN,cAA2B,EAC3B,UAAU,EACV,4BAAoC,EACpC,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,MAAM,EACN,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,kBAAkB,GACrB,EAAE,kBAAkB,2CAiKpB"}
@@ -15,7 +15,7 @@ export declare const LoginIconCustom: import("styled-components").StyledComponen
15
15
  muiName: string;
16
16
  }, any, {}, never>;
17
17
  export declare const FormControlSelect: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material/FormControl").FormControlTypeMap<{}, "div">>, any, {}, never>;
18
- export declare const DropDownList: import("styled-components").StyledComponent<(<Value = unknown>(props: import("@mui/material/Select").SelectProps<Value>) => JSX.Element) & {
18
+ export declare const DropDownList: import("styled-components").StyledComponent<(<Value = unknown>(props: import("@mui/material/Select").SelectProps<Value>) => import("react").JSX.Element) & {
19
19
  muiName: string;
20
20
  }, any, {}, never>;
21
21
  export declare const LabelDateStepper: import("styled-components").StyledComponent<"label", any, {}, never>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frst-components",
3
3
  "homepage": "http://FRST-Falconi.github.io/storybook.frstfalconi.com",
4
- "version": "0.28.5",
4
+ "version": "0.28.6",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",