@advocu/cdk
v17.0.0
Published
Components development kit for advocu organization
Downloads
157
Readme
@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
- Upgrade Angular to 17.x version, ref https://update.angular.io/.
- Upgrade NGRX to 17.x version, ref https://next.ngrx.io/guide/migration/v17
16.4.0
IMPORTANT! Requires ng-zorro 17+
auth
auth.guard.fn
now accepts optional parameteronErrorNavigateUrl
. 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
toAdvFiltersComponent
. It can be passed as queryParam, to open filters on a page - added new optional
contentAlign
paramAdvNgxMasonryGridComponent
- use
advocu-activities-list
selector as scrolling element for virtual scroller
- added
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
- added
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 toAdvStateLoadingStatus
- added
Document
type - added
Collection
type - added
Collection
type - added
UserCollection
type
- added permissions:
skeletons
- added
AdvFormSkeletonComponent
- added optional field
primary
toAdvRowsSkeletonComponent
- added
utils
- added
AdvStateLoadingStatusHelper
withrequiresReload
that indicates if we should reload state or not - added
isBefore
andisAfter
methods todate-helper
- added
getBooleanFromParams
method torouter-helper
- added sentry
breadcrumbHandler
function from saas core - added
SentryErrorHandler
class from saas core - added
logErrorToSentry
function from saas core
- added
mocks
- added
select
function toadvStoreMock
- added
getCurrentNavigation
function toadvRouterMock
- added
BREAKING CHANGES
components
replaced
AdvTableSkeletonComponent
withAdvRowsSkeletonComponent
removed
AdvSchemaPreviewComponent
removed old
AdvSchemaPreviewItemComponent
added
schemaLoadingStatus
required field toAdvActivitiesListComponent
added new
AdvSchemaPreviewItemComponent
, imported fromimport { AdvSchemaPreviewItemComponent } from '@advocu/cdk/display/schema-preview-item';
which is designed to be used withAdvDisplaySchemaItemsPipe
. 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';
toimport { AdvEnumTitleCasePipe } from '@advocu/cdk/pipes/enum-titlecase';
- added
AdvDisplaySchemaItemsPipe
. It is designed to be used with newAdvocuSchemaPreviewItemComponent
for rendering schema items.
- changed import for
mocks
- all mocks start now with
adv
prefix, for ex.modalRefMockProvider
->advModalRefMockProvider
- renamed
changeDetectorRefMock
toadvCdrMock
- all mocks start now with
helpers
submitLoading
is now signal inAdvDialogFormHelper
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 withadv-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
- added
types
- added permissions:
REVIEW_SESSION_PROPOSAL
,VIEW_ALL_SESSION_PROPOSALS
,VIEW_WONSESSION_PROPOSALS
- added
AdvProcessStatus
type
- added permissions:
utils
- added generic
advAppStoreMock
for mocking given app state in unit tests - Fix
AdvResponseHandlerService
handleError method that was ignoring themessage
field from config when the error had the message value
- added generic
BREAKING CHANGES
pipes
- removed
gde
fromadvCommunityUrl
pipe
- removed
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
- added
skeletons
- added
activities-list-skeleton
- added
pipes
- added
advDifferenceBy
pipe for excluding entries from list
- added
display
- added
AdvTableDirection
- added
advocu-anchor-icon
- added
types
- added
RequiredFields
type - updated
permission.ts
- added
BREAKING CHANGES
components
advocu-user-panel
now accepts parameteruserCommunitySpaces
of typeAdvCommunitySpaceInfo
and does not useAdvCommunityName
pipe
pipes
- removed
AdvCommunityName
pipe - removed
AdvCase
pipe -> introducedAdvEnumTitleCasePipe
pipe
- removed
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
- added
pipes
- added
advDisplayUserName
pipe - added
advFilterUsers
pipe - added
advOrderBy
pipe
- added
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 extendsPersonalData
withuserId
property
- Added
display
- Added
cards-list-skeleton
component - Added
summary-tiles-skeleton
component
- Added
testing
- Added
modalRefMock
which can be imported into unit test without being a provider - Added
changeDetectionRefMock
- Added
routerMock
- Added
advTitleStoreMock
- Added
skeletons
- Added
application-form-skeleton
component
- Added
BREAKING CHANGES
utils
- removed
preloader service
- removed
TitleStore
- removed
components
adv-search-box
now supports two-way data binding using fieldsearchQuery
. This field is also marked as{ required: true }
- renamed
link-button
directory toanchor-button
for AdvAnchorButtonComponent - renamed
ApplicationsListSkeletonComponent
toAdvApplicationsListSkeletonComponent
- renamed
SummaryTilesSkeletonComponent
toAdvSummaryTilesSkeletonComponent
pipes
- updated
substring-dots
pipe, so it no longer breaks words
- updated
testing
- all testing mocks can be imported with the following way:
import { X } from '@advocu/cdk/testing'
- all testing mocks can be imported with the following way:
sentry
- narrowed type of
logErrorToSentry
error – now itsHttpErrorResponse | undefined
- narrowed type of
display
- moved all skeletons from
/display
to/skeletons
directory
- moved all skeletons from
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
, nowWritableNonFunctionalPart<AdvAuthProfile>
is used as a return type from repository, as parameter forgetCommunityAuthDataFromProfile
and as a parameter forAdvAuthProfile
constructor - updated error messages for register and login flow
- reverted adding
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
- new
pipes
advSaveNull
now comes with default value-
forreplaceStr
misc
- drop support for NG 14
types
- introduced new
Tag
interface
- introduced new
utils
- added
removeItemFromEntities
method totransform-helper
- added
15.0.1
pipes
- changed
Google Developers Dev Library
toGoogle Dev Library
inAdvCommunityNamePipe
- changed
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 forclass AdvAuthProfile
constructor - introduced new action
initializeMember
pipes
- 'AdvCommunityUrlPipe' is now required
saasSlugUrl
property fromAdvAuthConfig
interface
- 'AdvCommunityUrlPipe' is now required
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 – AdvAuthProfileDtogetCommunityAuthDataFromProfile
now takesAdvAuthProfileDto
as a second parameter, instead of instance ofAdvAuthProfile
class- updated
fetchProfileAndUpdateLS
method. If logged user has permissionINITIALIZE_MEMBER
it dispatchesinitializeMember
action - add
saasSlugUrl
property toadvAuthConfig
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
toGoogle Women Techmakers
andAndroid Enterprise
toAndroid Enterprise Advocacy
- changed
14.16.1
pipes
- reverted change in
14.16.0
fromGoogle Mentoring
toGoogle Mentors
- reverted change in
14.16.0
components
- added
target="_blank"
to social icon inschema-preview-item
component
- added
pipes
- added
advNzColorToHex"
which is used to map colors from NzPresetColor to hardcoded string values - updated
Woman Tech Makers
toWoman Techmakers
andGoogle Mentors
toGoogle Mentoring
- added
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
- Urls per environment in
BREAKING CHANGES
- Add
classicSlugUrl
toadvAuthConfig
- needed foradvocu-user-panel
14.14.0
Features
components
- added
table-skeleton
component - removed community logo from current workspace in
advocu-user-panel
- added
14.13.1
Bugfixes
components
- fix
communities
type inadvocu-user-panel
component
- fix
14.13.0
Features
components
- added optional property
submittingEnabled
tocomments.component
. If set to false, input and button for comment submit won't be visible - added new component
advocu-user-panel
with community switcher
- added optional property
pipes
- added
advCommunityName
pipe for transforming community slug into full name - added
advCommunityUrl
pipe for transforming community slug into production url
- added
types
- removed unused permission
PREVIEW_APPLICATION
- added permission
VIEW_APPLICATION
- added role
VIEWER
- added readonly
currentCommunity
property toAdvAuthProfile
class
- removed unused permission
auth
- added
advAuthGuardCanActivateFn
which can be used instead of deprecated class-basedAdvAuthGuard
, however compatibility still remains.
- added
utils
- added
replaceObjectInList
method
- added
misc
- added support for NG 15
14.12.0
BREAKING CHANGES
types
- removed
avatar
property fromAdvApplicationMetadata
- moved toPersonalData
- removed
components
- removed
avatarUrl
fromuser-badge.component
- avatar is now part ofPersonalData
interface
- removed
Features
types
- added optional property
avatar?: string
to interfaceCommentator
andPersonalData
- added optional property
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
- updated
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 astop, right, bottom, left
- added
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 ofuser.hasPermission()
- added
types
- changed
AdvAuthProfile
– instead of finding community index on each call tohasPermission
, know community index is calculated once in a constructor and assigned tocurrentCommunityIndex
- changed
store
- added
sentry
module, with custom effects for handling error action. Module contains custom actionlogErrorToSentry
, which takes action name and error as arguments. Effect callscaptureMessage
method from@sentry/angular
- added
14.10.1
Bug Fixes
- router: use optional in
selectRouterState
14.10.0
Features
auth: Add
reloadProfile
actiontypes:
added
COMPACT_NUMER_I18N
toAdvPreviewSchemaDisplayType
for displaying compact numbers with i18n plural. It requires different dictionary thanTEXT_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
inschema-preview-item.component
- added handling
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
toadvAuthConfig
- changed token from
14.8.0
BREAKING CHANGES
components:
- changed name of
elementExpanded
event emitter inapplications-list.component
, so know it indicates, when row is collapsed or expanded.
Now emittingtrue
if row is being expanded,false
if being collapsed.
<advocu-applications-list - (elementExpanded)="onElementExpandClick()" + (elementExpandClick)="onElementExpandClick($event)" ></advocu-applications-list>
- changed name of
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' });