2.3.4 • Published 1 year ago

@influitive/profile-card v2.3.4

Weekly downloads
334
License
ISC
Repository
github
Last release
1 year ago

Profile Card

A pop over card component that displays user information and provides some relevant links.

###Installation Add "@influitive/profile-card": "X.X.XX" to the projects package JSON ( replaces X.X.XX with the version you want to use)

Run npm install

###Usage In your component:

import ProfileCard from '@influitive/profile-card/lib';

<ProfileCard
  id={contactUUID}
  disableViewProfile={aBooleanProp}
  anonymous={aBooleanProp}
  disableMessage={aBooleanProp}
  children={wrappedElement} />

###Props

  • id (Uuid) of the user whose information is to be display in the card.
  • disableViewProfile (bool) When true hides the link to the user public profile.
  • disableMessage (bool) When true hides the link to message that contact.
  • anonymous (bool) when true renders the generic anonymous advocate information.
  • children (node) Corresponds to the element to be wrapped. The profile card will toggle when clicking on this element.

Extra Considerations: You will need to style the element that is being wrapped, as the profile-card does not make assumptions about its children. E.g for avatar images we are normally using:

.profile {
  width: 32px;
  border-radius: 100%;
}

###How it works profile-card is just a regular component built using react-redux. When the children element is clicked an ajax call is fired to the hub's /api/people/${id}.jsonto retrieve that especific user information.

RELEASING

We currently maintain 2 versions of profile card due to mismatched deps that break in one of the places we use this repo. The master branch is v2 while there is also a v3 branch. Changes need to be duplicated in both branches.

  • before releasing, make sure you remove node_modules and re-install. There seems to be an error when publishing where there is no lib folder, but getting fresh node_modules seems to somehow fix it. This is because each version has diff package.json.

  • you can try npm publish --dry-run, I haven't tested this yet, but it should list all the files without actually publishing.

Infl-fe

To run locally in infl-fe for testing purposes, follow these steps: 1. In Profile Card (v3), run:

  • npm run buildmodule
  • npm pack
  • copy resulting .tgz file name
  1. In Infl-fe stop it running then run:
  • rm -rf node_modules
  • yarn cache clean
  • `yarn add ../profile-card/ --ignore-engines
  • yarn install --ignore-engines
  • yarn start
2.3.2

1 year ago

2.3.4

1 year ago

2.3.3

1 year ago

3.1.6

1 year ago

3.1.5

1 year ago

2.3.1

3 years ago

3.1.3

3 years ago

3.1.2

3 years ago

3.1.4

3 years ago

3.1.1

3 years ago

2.3.0

3 years ago

3.1.0

3 years ago

3.0.19

4 years ago

2.2.12

4 years ago

3.0.18

4 years ago

2.2.10

4 years ago

3.0.17

4 years ago

3.0.16

4 years ago

2.2.9

4 years ago

2.2.8

5 years ago

3.0.15

5 years ago

2.2.7

5 years ago

3.0.14

5 years ago

3.0.13

5 years ago

3.0.12

5 years ago

2.2.6

5 years ago

3.0.11

5 years ago

3.0.10

5 years ago

3.0.9

5 years ago

3.0.8

5 years ago

3.0.7

5 years ago

3.0.6

5 years ago

2.2.5

5 years ago

2.2.4

5 years ago

3.0.5

5 years ago

2.2.3

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.2.0

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago

0.0.34

8 years ago

0.0.33

8 years ago

0.0.32

8 years ago

0.0.31

8 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago