2.0.3 • Published 1 month ago

@startinblox/component-communities v2.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

Solid Communities

How to use

Once the package is installed, you can use the solid-communities component:

<html>
  <head>
    <!-- import the module in the head of the page -->
    <script
      type="module"
      src="https://cdn.skypack.dev/@startinblox/component-communities"
    ></script>
  </head>

  <body>
    <!-- use the component -->
    <solid-communities
      data-src="/server/communities/"
      addresses="/server/community-addresses/"
      uploads="/server/upload/"
    ></solid-communities>
  </body>
</html>

Parameters

NameDefaultDescription
data-srcundefinedData source of your communities container
addressesundefinedData source of your communities' addresses container
uploadsundefinedWhere to upload files, like community pictures
paginate-by20How many cards per page
allow-community-creationfalseAllow users to create their own communities
allow-community-list-membersfalseAllow users to see all community's members
allow-community-add-memberfalseAllow users to add other users to their communities, require list-members
range-userundefinedData source of your user container
allow-community-join-leavefalseAllow users to join/leave a community by themselves
display-*undefinedSee below
form-*undefinedSee below
search-*undefinedSee below
extra-context{}Custom extra context
disable-community-map-displayfalseDisable the display of the community map ?
disable-community-picture-displayfalseDisable the display of the profile picture

display-* - Customize community display

With a display-* you can add your own fields to a community display.

A display-extra-* will add values to the default attribute instead of replacing it.

Examples:

Display a some_extra_field with a solid-display-markdown widget:

    <solid-communities
      ...
      display-extra-fields="some_extra_field"
      display-widget-some_extra_field="solid-display-markdown"
      ...

Replace all displayed fields with a custom set with no social profile icons and no pictures:

    <solid-communities
      ...
      display-fields="segment0(segment1(community-picture(logo)), segment2(segment3(segment4(name), segment6(profile.shortDescription), segment8(addresses, members, profile.website, profile.email, profile.phone), segment9(profile.description), segment10(edit)))"
      ...

Add text-color-secondary class to profile.shortdescription field:

    <solid-communities
      ...
      display-extra-class-profile.shortdescription="text-color-secondary"
      ...

form-* - Customize community edition form

With a form-* you can add your own fields to a community edition form.

A form-extra-* will add values to the default attribute instead of replacing it.

See display-* for examples.

search-* - Customize community list and map search form

With a search-* you can add your own fields to a community edition form.

A search-extra-* will add values to the default attribute instead of replacing it.

See display-* for examples.

Troubleshooting

  • I don't see the community creation button even with allow-community-creation="true"

Ensure that your server have proper permissions on the community endpoint.

Developpers

Installation:

npm install

Build with:

npm run build

Watch files & rebuild on change with this command:

npm run watch
2.0.3

1 month ago

2.0.3-beta.1

2 months ago

2.0.2

2 months ago

2.0.2-beta.1

2 months ago

2.0.0-alpha.1

3 months ago

2.0.0-beta.1

3 months ago

2.0.1-beta.1

3 months ago

2.0.1

3 months ago

2.0.0

3 months ago

1.2.1-alpha.7

4 months ago

1.2.1-alpha.6

4 months ago

1.2.1-alpha.5

4 months ago

1.2.1-alpha.4

4 months ago

1.2.1-alpha.3

4 months ago

1.2.1-alpha.2

4 months ago

1.2.1-alpha.1

4 months ago

1.2.1-beta.1

5 months ago

1.2.0

6 months ago

1.2.0-beta.1

6 months ago

1.1.16-beta.4

1 year ago

1.1.16-beta.6

1 year ago

1.1.16-beta.1

1 year ago

1.1.16-beta.3

1 year ago

1.1.16-beta.2

1 year ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago