17.0.0 • Published 3 months ago

@advocu/cdk v17.0.0

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

@advocu/cdk

Components development kit for advocu organization

Running unit tests

Run nx test cdk to execute the unit tests.

Advocu CDK Changelog

17.0.0

BREAKING CHANGES

16.4.0

IMPORTANT! Requires ng-zorro 17+

  • auth

    • auth.guard.fn now accepts optional parameter onErrorNavigateUrl. If provided, on access denied user will be navigated to this url
  • components

    • added advocu-filters component
    • fixed advocu-search-box clean button that was not working on initial values
    • fixed advocu-retention-funnel to correctly calculate onboarding bar width
    • updated advocu-sneak-peak – removed skeleton text and added "Read less" button
    • added tag-with-color-select component
    • added advocu-select-with-loading component that allows to pass loading status
    • added advocu-tree-select-with-loading component that allows to pass loading status
    • added new url param filtersOpened to AdvFiltersComponent. It can be passed as queryParam, to open filters on a page
    • added new optional contentAlign param AdvNgxMasonryGridComponent
    • use advocu-activities-list selector as scrolling element for virtual scroller
  • pipes

    • added advHasAnyPermissionFromPipe used for checking if user has at least one permission from given array
    • added advCamelCaseToReadable pipe for transforming camel case strings to human-readable format
  • types

    • added permissions: CREATE_SESSION_DRAFT, DELETE_SESSION_DRAFT, EDIT_SESSION_DRAFT, INVITE_SPEAKER, SUBMIT_FEEDBACK_FOR_EVENT, SUBMIT_FEEDBACK_FOR_SPEAKER, VIEW_ALL_FEEDBACKS_FOR_EVENT, VIEW_ALL_FEEDBACKS_FOR_SPEAKER, VIEW_ALL_SESSION_DRAFTS, VIEW_EVENT_DETAILS, VIEW_MY_EVENT_SESSION_PROPOSALS, VIEW_OWN_FEEDBACK_FOR_EVENT, VIEW_OWN_FEEDBACK_FOR_SPEAKER, VIEW_OWN_SESSION_DRAFTS
    • added AdvUrlParamName type
    • added AdvOrderValues type
    • added AdvFilterType type
    • added AdvFilterBase type
    • added AdvFilterSelect type
    • added AdvFilterTreeSelect type
    • added AdvFilterDateRange type
    • added AdvFilters type
    • added AdvJsonFormsSummary type
    • added EXPIRED status to AdvStateLoadingStatus
    • added Document type
    • added Collection type
    • added Collection type
    • added UserCollection type
  • skeletons

    • added AdvFormSkeletonComponent
    • added optional field primary to AdvRowsSkeletonComponent
  • utils

    • added AdvStateLoadingStatusHelper with requiresReload that indicates if we should reload state or not
    • added isBefore and isAfter methods to date-helper
    • added getBooleanFromParams method to router-helper
    • added sentry breadcrumbHandler function from saas core
    • added SentryErrorHandler class from saas core
    • added logErrorToSentry function from saas core
  • mocks

    • added select function to advStoreMock
    • added getCurrentNavigation function to advRouterMock

BREAKING CHANGES

  • components

    • replaced AdvTableSkeletonComponent with AdvRowsSkeletonComponent
    • removed AdvSchemaPreviewComponent
    • removed old AdvSchemaPreviewItemComponent
    • added schemaLoadingStatus required field to AdvActivitiesListComponent
    • added new AdvSchemaPreviewItemComponent, imported from import { AdvSchemaPreviewItemComponent } from '@advocu/cdk/display/schema-preview-item'; which is designed to be used with AdvDisplaySchemaItemsPipe. Example below:

      <advocu-schema-preview-item
          *ngFor='let item of elements | advDisplaySchemaItems : data'
          [element]='item.element'
          [fieldValue]='item.value'
      ></advocu-schema-preview-item>
  • pipes

    • changed import for enum-titlecase.pipe from '@advocu/cdk/pipes/human-underscore-string'; to import { AdvEnumTitleCasePipe } from '@advocu/cdk/pipes/enum-titlecase';
    • added AdvDisplaySchemaItemsPipe. It is designed to be used with new AdvocuSchemaPreviewItemComponent for rendering schema items.
  • mocks

    • all mocks start now with adv prefix, for ex. modalRefMockProvider -> advModalRefMockProvider
    • renamed changeDetectorRefMock to advCdrMock
  • helpers

    • submitLoading is now signal in AdvDialogFormHelper

16.3.0

  • pipes

    • added advNzTableFilter pipe for filtering tables by given nz-table queryParams
    • added advNzTableOrder pipe for ordering tables by given nz-table queryParams
    • added advArrayToFilterValue pipe for transforming arrays into type safe text, value pairs
    • added advProcessStatusColor pipe for receiving status color based on given status
    • added advDisplaySchemaItem which is meant to be used with adv-schema-preview-item to hide empty containers
    • added advHasAnyPermissionFromPipe used for checking if user has at least one permission from given array
    • added advHideRemainingItems which is used to reduce amount of items in array and display how many of them are left
  • types

    • added permissions: REVIEW_SESSION_PROPOSAL, VIEW_ALL_SESSION_PROPOSALS, VIEW_WONSESSION_PROPOSALS
    • added AdvProcessStatus type
  • utils

    • added generic advAppStoreMock for mocking given app state in unit tests
    • Fix AdvResponseHandlerService handleError method that was ignoring the message field from config when the error had the message value

BREAKING CHANGES

  • pipes

    • removed gde from advCommunityUrl pipe

16.2.0

  • components

    • added advocu-upload component
    • added advocu-thumbnail component
    • added advocu-routing-search-box component that will perform routing change event during search
    • added activities-list component
    • added jsonforms-summary component
    • added need-help-button component
  • skeletons

    • added activities-list-skeleton
  • pipes

    • added advDifferenceBy pipe for excluding entries from list
  • display

    • added AdvTableDirection
    • added advocu-anchor-icon
  • types

    • added RequiredFields type
    • updated permission.ts

BREAKING CHANGES

  • components

    • advocu-user-panel now accepts parameter userCommunitySpaces of type AdvCommunitySpaceInfo and does not use AdvCommunityName pipe
  • pipes

    • removed AdvCommunityName pipe
    • removed AdvCase pipe -> introduced AdvEnumTitleCasePipe pipe

16.1.0

  • utils

    • added dialogHelper class: submitFormHandlerPipe handles submitLoading after finalize, close the dialog on success and cdr on error, handleCancel for closing the dialog
  • pipes

    • added advDisplayUserName pipe
    • added advFilterUsers pipe
    • added advOrderBy pipe
  • types

    • Added AdvComponentStoreProperties generic interface for type-check mocking component store
    • Added HTMLString generic interface
    • Added MANAGE_ALL_USERS permission
    • Added TRACK_GITHUB_REPOSITORY permission
    • Added VIEW_TRACKED_GITHUB_REPOSITORIES permission
    • Added Many generic pipe that returns single or read-only list of given type objects
    • Added UserData interface, which extends PersonalData with userId property
  • display

    • Added cards-list-skeleton component
    • Added summary-tiles-skeleton component
  • testing

    • Added modalRefMock which can be imported into unit test without being a provider
    • Added changeDetectionRefMock
    • Added routerMock
    • Added advTitleStoreMock
  • skeletons

    • Added application-form-skeleton component

BREAKING CHANGES

  • utils

    • removed preloader service
    • removed TitleStore
  • components

    • adv-search-box now supports two-way data binding using field searchQuery. This field is also marked as { required: true }
    • renamed link-button directory to anchor-button for AdvAnchorButtonComponent
    • renamed ApplicationsListSkeletonComponent to AdvApplicationsListSkeletonComponent
    • renamed SummaryTilesSkeletonComponent to AdvSummaryTilesSkeletonComponent
  • pipes

    • updated substring-dots pipe, so it no longer breaks words
  • testing

    • all testing mocks can be imported with the following way: import { X } from '@advocu/cdk/testing'
  • sentry

    • narrowed type of logErrorToSentry error – now its HttpErrorResponse | undefined
  • display

    • moved all skeletons from /display to /skeletons directory

16.0.0

  • store

    • add title store using signals

BREAKING CHANGES

  • requires angular version 16 or above, dropped support for angular 15 due to multiple angular breaking changes

  • types

    • OFFBOARD_MEMBER permission removed
    • introduced MANAGE_MEMBER permission

15.1.0

  • auth

    • reverted adding AdvAuthProfileDto, now WritableNonFunctionalPart<AdvAuthProfile> is used as a return type from repository, as parameter for getCommunityAuthDataFromProfile and as a parameter for AdvAuthProfile constructor
    • updated error messages for register and login flow
  • components

    • new adv-bar-chart component in @advocu/cdk/visualization package
    • added clear icon to adv-search-box. It appears when query is written in input. After click it sets query to null and emits null to clear search results
    • new grid layout component with masonry grid layout - demo
    • added anchor-button, which looks like button but its anchor
  • pipes

    • advSaveNull now comes with default value - for replaceStr
  • misc

    • drop support for NG 14
  • types

    • introduced new Tag interface
  • utils

    • added removeItemFromEntities method to transform-helper

15.0.1

  • pipes

    • changed Google Developers Dev Library to Google Dev Library in AdvCommunityNamePipe

15.0.0

  • auth

    • getAuthProfile will send communitySlug as query parameter if exists
    • redirect to 401 if user registers via SSO without /join link
    • extend loginFail action with HttpErrorResponse
    • introduced new interface AdvAuthProfileDto, which is now props parameter for class AdvAuthProfile constructor
    • introduced new action initializeMember
  • pipes

    • 'AdvCommunityUrlPipe' is now required saasSlugUrl property from AdvAuthConfig interface
  • misc

    • add support for NG 16
    • sentry has moved to ivy version

BREAKING CHANGES

  • Change in loginFail action from {error: string} to { customErrorMessage: string; error?: HttpErrorResponse}
  • To use sentry you have to install @sentry/angular-ivy package, @sentry/angular package can be removed
  • Change sentry imports from @sentry/angular to @sentry/angular-ivy
  • getAuthProfile method no longer returns AdvAuthProfile. New interface was introduced – AdvAuthProfileDto
  • getCommunityAuthDataFromProfile now takes AdvAuthProfileDto as a second parameter, instead of instance of AdvAuthProfile class
  • updated fetchProfileAndUpdateLS method. If logged user has permission INITIALIZE_MEMBER it dispatches initializeMember action
  • add saasSlugUrl property to advAuthConfig provider
  • Minimum version of NG and NGRX is 15.0.0, please update. NG 14 support will be dropped in 15.1.0

14.6.2

  • pipes

    • changed Woman Techmakers to Google Women Techmakers and Android Enterprise to Android Enterprise Advocacy

14.16.1

  • pipes

    • reverted change in 14.16.0 from Google Mentoring to Google Mentors

14.16.0

  • components

    • added target="_blank" to social icon in schema-preview-item component
  • pipes

    • added advNzColorToHex" which is used to map colors from NzPresetColor to hardcoded string values
    • updated Woman Tech Makers to Woman Techmakers and Google Mentors to Google Mentoring

14.15.1

  • core

    • fix breaking router selector

14.15.0

Features

  • components

    • Urls per environment in advocu-user-panel.
    • Added email to advocu-user-panel
    • Display all roles in expanded panel
    • Increase size of panel
    • added applications-list-skeleton component

BREAKING CHANGES

  • Add classicSlugUrl to advAuthConfig - needed for advocu-user-panel

14.14.0

Features

  • components

    • added table-skeleton component
    • removed community logo from current workspace in advocu-user-panel

14.13.1

Bugfixes

  • components

    • fix communities type in advocu-user-panel component

14.13.0

Features

  • components

    • added optional property submittingEnabled to comments.component. If set to false, input and button for comment submit won't be visible
    • added new component advocu-user-panel with community switcher
  • pipes

    • added advCommunityName pipe for transforming community slug into full name
    • added advCommunityUrl pipe for transforming community slug into production url
  • types

    • removed unused permission PREVIEW_APPLICATION
    • added permission VIEW_APPLICATION
    • added role VIEWER
    • added readonly currentCommunity property to AdvAuthProfile class
  • auth

    • added advAuthGuardCanActivateFn which can be used instead of deprecated class-based AdvAuthGuard, however compatibility still remains.
  • utils

    • added replaceObjectInList method
  • misc

    • added support for NG 15

14.12.0

BREAKING CHANGES

  • types

    • removed avatar property from AdvApplicationMetadata - moved to PersonalData
  • components

    • removed avatarUrl from user-badge.component - avatar is now part of PersonalData interface

Features

  • types

    • added optional property avatar?: string to interface Commentator and PersonalData
  • components

    • updated comments.component to display commentator avatar if provided
    • added error handling in avatar.component if server responds with 4XX status instead of image

14.11.0

Features

  • components

    • added advocu-divider – simple and lightweight divider, can be used in vertical or horizontal mode
    • added sticky-button – button that can be placed at any given position by defining values such as top, right, bottom, left
  • pipes

    • added safe-null – allows to replace null, undefined or empty string in template with given replace string, for ex: {{field | advSafeNull:"-"}}, field is null, will result in - displayed in template. No more need to {{ field || '-'}} in template, which was evaluated every change detection cycle
    • added substring-dots – extracts substring of given length and adds ... at the end. If string length is shorter than given substring length, initial string is returned without ...
    • added has-permission – checks if user has given permission. Should be used in templates, instead of user.hasPermission()
  • types

    • changed AdvAuthProfile – instead of finding community index on each call to hasPermission, know community index is calculated once in a constructor and assigned to currentCommunityIndex
  • store

    • added sentry module, with custom effects for handling error action. Module contains custom action logErrorToSentry, which takes action name and error as arguments. Effect calls captureMessage method from @sentry/angular

14.10.1

Bug Fixes

  • router: use optional in selectRouterState

14.10.0

Features

  • auth: Add reloadProfile action

  • types:

    • added COMPACT_NUMER_I18N to AdvPreviewSchemaDisplayType for displaying compact numbers with i18n plural. It requires different dictionary than TEXT_I18N – it must not have # in definition. Details below:

      TEXT_I18N:
      { '=0': 'No attendees', '=1': '1 atteendee', other: '# attendees' }
      
      COMPACT_NUMBER_I18N:
      { '=1': 'attendee', other: 'attendees' }
  • components:

    • added handling COMPACT_NUMBER_I18N in schema-preview-item.component
  • pipes:

    • added advCompactNumber pipe for transforming large numbers into human-friendly format, for ex:

      852 -> 852
      1200 -> 1.2k
      450300 -> 450.3k
      1200400 -> 1.2m

Bug Fixes

  • auth: Fix breaking register with SSO when user is already registered in another program

14.9.0

Features

  • auth: allow use open registration using SSO login via advAuthConfig.keycloak.openSSORegistration

BREAKING CHANGES

  • auth:

    • changed token from environment to advAuthConfig

14.8.0

BREAKING CHANGES

  • components:

    • changed name of elementExpanded event emitter in applications-list.component, so know it indicates, when row is collapsed or expanded. \ Now emitting true if row is being expanded, false if being collapsed.
    <advocu-applications-list
    - (elementExpanded)="onElementExpandClick()"
    + (elementExpandClick)="onElementExpandClick($event)"
    ></advocu-applications-list>

14.7.4

Features

  • store: allow to extend store effects and repositories

14.7.2

Bug Fixes

  • Core: Fix missing backwards compatibility imports

14.7.1

Features

  • Changelog: include changelog in library assets

14.7.0

Bug Fixes

  • packages: add missing keycloak packages

Features

  • ngrx: upgraded to standalone api

Added *.providers.ts files using standalone ngrx API in legacy modules. For ex.:

+ import { provideEffects } from '@ngrx/effects';
+ import { provideState } from '@ngrx/store';
+
+ import { TitleEffects } from '@advocu/cdk/store/title/title.effects';
+ import { titleReducer } from '@advocu/cdk/store/title/title.reducer';
+
+ export const advTitleStoreProviders = [provideState('title', titleReducer), provideEffects([TitleEffects])];

Backward compatibility remains. It is possible to import provider or @NgModule depending on need.

14.6.0

BREAKING CHANGES

  • Error Handler: change config #2zj37nn
- handleError('Could not fetch applications statistics overview');
+ handleError({ message: 'Could not fetch applications statistics overview' });
17.0.0

3 months ago

16.4.0-beta.2

3 months ago

16.4.0-beta.3

3 months ago

16.4.0-beta

3 months ago

16.4.0

3 months ago

16.3.0

5 months ago

16.2.0

6 months ago

15.1.1

8 months ago

15.1.0

8 months ago

15.0.2-beta

8 months ago

16.1.0

9 months ago

15.0.21-beta

8 months ago

15.0.23-beta

8 months ago

15.0.1

11 months ago

16.0.0-beta

12 months ago

16.0.0

11 months ago

14.16.1

1 year ago

14.16.0

1 year ago

14.16.2

1 year ago

15.0.0

1 year ago

14.15.1

1 year ago

14.15.0

1 year ago

14.14.0

1 year ago

14.13.1

1 year ago

14.13.0

1 year ago

14.10.1

1 year ago

14.10.0

1 year ago

14.7.2

1 year ago

14.7.3

1 year ago

14.7.4

1 year ago

14.3.0

2 years ago

14.4.0

2 years ago

14.5.0

1 year ago

14.6.0

1 year ago

14.7.0

1 year ago

14.9.0

1 year ago

14.8.0

1 year ago

14.7.1

1 year ago

14.2.0

2 years ago

0.1.0

2 years ago

0.1.1

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.108

2 years ago

0.0.107

2 years ago

0.0.106

2 years ago

0.0.105

2 years ago

0.0.104

2 years ago

0.0.103

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago