<commit_before>// @flow

import React from 'react';
import _ from "lodash";
import ProjectAPIUtils,{ProjectDetailsAPIData} from '../../utils/ProjectAPIUtils.js';
import ProjectDetails from '../../componentsBySection/FindProjects/ProjectDetails.jsx';
import ContactProjectButton from "./ContactProjectButton.jsx";
import ContactVolunteersButton from "./ContactVolunteersButton.jsx";
import ProjectVolunteerButton from "./ProjectVolunteerButton.jsx";
import ProjectVolunteerModal from "./ProjectVolunteerModal.jsx";
import ProjectCommitCard from "./ProjectCommitCard.jsx";
import AboutPositionEntry from "../positions/AboutPositionEntry.jsx";
import ProjectOwnersSection from "../owners/ProjectOwnersSection.jsx";
import VolunteerSection from "../volunteers/VolunteerSection.jsx";
import IconLinkDisplay from "../../componentsBySection/AboutProject/IconLinkDisplay.jsx";
import type {PositionInfo} from "../../forms/PositionInfo.jsx";
import CurrentUser from "../../utils/CurrentUser.js";
import Headers from "../Headers.jsx";
import Truncate from "../../utils/truncate.js";
import Sort from "../../utils/sort.js";
import {LinkTypes} from "../../constants/LinkConstants.js";
import InviteProjectToGroupButton from "./InviteProjectToGroupButton.jsx";
import ApproveGroupsSection from "./ApproveGroupsSection.jsx";
import url from "../../utils/url.js";
import Section from "../../enums/Section.js";
import {Glyph, GlyphStyles, GlyphSizes} from '../../utils/glyphs.js';
import EventCardsListings from "../../componentsBySection/FindEvents/EventCardsListings.jsx";



type Props = {|
  project: ?ProjectDetailsAPIData,
  viewOnly: boolean
|};

type State = {|
  project: ?ProjectDetailsAPIData,
  viewOnly: boolean,
  volunteers: ?$ReadOnlyArray<VolunteerDetailsAPIData>,
  showJoinModal: boolean,
  positionToJoin: ?PositionInfo,
  showPositionModal: boolean,
  shownPosition: ?PositionInfo,
  tabs: object,
  maxActivity: number
|};

class AboutProjectDisplay extends React.PureComponent<Props, State> {

  constructor(props: Props): void{
    super();
    this.state = {
      project: props.project,
      viewOnly: props.viewOnly || url.argument('embedded'),
      volunteers: props.project && props.project.project_volunteers,
      showContactModal: false,
      showPositionModal: false,
      shownPosition: null,
      tabs: {
        details: true,
        skills: false,
        activity: false,<commit_msg>Project Profile: Don't hide actions for embedded view<commit_after>// @flow

import React from 'react';
import _ from "lodash";
import ProjectAPIUtils,{ProjectDetailsAPIData} from '../../utils/ProjectAPIUtils.js';
import ProjectDetails from '../../componentsBySection/FindProjects/ProjectDetails.jsx';
import ContactProjectButton from "./ContactProjectButton.jsx";
import ContactVolunteersButton from "./ContactVolunteersButton.jsx";
import ProjectVolunteerButton from "./ProjectVolunteerButton.jsx";
import ProjectVolunteerModal from "./ProjectVolunteerModal.jsx";
import ProjectCommitCard from "./ProjectCommitCard.jsx";
import AboutPositionEntry from "../positions/AboutPositionEntry.jsx";
import ProjectOwnersSection from "../owners/ProjectOwnersSection.jsx";
import VolunteerSection from "../volunteers/VolunteerSection.jsx";
import IconLinkDisplay from "../../componentsBySection/AboutProject/IconLinkDisplay.jsx";
import type {PositionInfo} from "../../forms/PositionInfo.jsx";
import CurrentUser from "../../utils/CurrentUser.js";
import Headers from "../Headers.jsx";
import Truncate from "../../utils/truncate.js";
import Sort from "../../utils/sort.js";
import {LinkTypes} from "../../constants/LinkConstants.js";
import InviteProjectToGroupButton from "./InviteProjectToGroupButton.jsx";
import ApproveGroupsSection from "./ApproveGroupsSection.jsx";
import url from "../../utils/url.js";
import Section from "../../enums/Section.js";
import {Glyph, GlyphStyles, GlyphSizes} from '../../utils/glyphs.js';
import EventCardsListings from "../../componentsBySection/FindEvents/EventCardsListings.jsx";



type Props = {|
  project: ?ProjectDetailsAPIData,
  viewOnly: boolean
|};

type State = {|
  project: ?ProjectDetailsAPIData,
  viewOnly: boolean,
  volunteers: ?$ReadOnlyArray<VolunteerDetailsAPIData>,
  showJoinModal: boolean,
  positionToJoin: ?PositionInfo,
  showPositionModal: boolean,
  shownPosition: ?PositionInfo,
  tabs: object,
  maxActivity: number
|};

class AboutProjectDisplay extends React.PureComponent<Props, State> {

  constructor(props: Props): void{
    super();
    this.state = {
      project: props.project,
      viewOnly: props.viewOnly,
      volunteers: props.project && props.project.project_volunteers,
      showContactModal: false,
      showPositionModal: false,
      shownPosition: null,
      tabs: {
        details: true,
        skills: false,
        activity: false,
{'fraction_non_alphanumeric': 0.13166597767672591, 'fraction_numerical': 0.0, 'mean_word_length': 4.633294528521537, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1459443', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1371, 'n_words': 327}