Skip to main content

angular-expanders-runtime


0.5.0 (2024-09-02)

Added

  • Added <nsc-rich-text-editor>component that can be used in forms. This is a QuillJs based WYSIWYG editor that fits our styling. With the RICH_TEXT_EDITOR_CONFIG injection token you can define some configuration of the editor. This can be provided using the provideRichTextEditorConfig function. Otherwise, the default value are used:
const DEFAULT_RICH_TEXT_EDITOR_CONFIG: NscRichTextEditorConfig = {
enableToolbar: true,
toolbarConfig: {
enableColorControls: true,
enableTextDecorationsControls: true,
enableAlignmentControls: true,
enableListControls: true,
enableFontControls: true,
},
};
  • Added Quill peer dependency: quill: ^2.0.2
  • Added placeholder input attribute to nsc-filter component. This can be used to customise shown placeholder when no filters are active.
  • Added blob-error-interceptor. This interceptor will check if the response of an http call is a blob, but actually should be a json and convert it to json.

Changed

  • Update to angular 18. Kept material design 2.
  • Rejuvenations:
    • @angular/*: ^17.x.x -> ^18.2.2
    • @ng-matero/extensions: 17.3.5 -> 18.2.0
    • @ng-matero/extensions-date-fns-adapter: 17.1.2 -> 18.0.0
    • zone.js: ~0.14.8 -> ~0.14.10
    • tslib: ^2.6.2 -> ^2.6.3
    • uuid: ^9.0.1 -> ^10.0.0
    • @angular-eslint/*: 17.5.2 -> 18.3.0
    • @types/uuid: ^9.0.8 -> ^10.0.0
    • @typescript-eslint/*: 7.18.0 -> ^8.2.0
    • eslint: ^8.57.0 -> ^9.9.1
    • karma: ~6.4.3 -> ~6.4.4
    • ng-packagr: ^17.3.0 -> ^18.2.1
    • typescript: ~5.4.5 -> ~5.5.4

Fixed

  • fixed #116: nsc-filter component does not alter all filters anymore when one entry gets deleted.
  • fixed #117: nsc-filter component does not have a hardcoded 'Search on' string anymore for the placeholder. Instead, only the searhKey is translated, or it can be customised with placeholder input attribute.
  • fixed #131a: Changed sort behaviour back to old behaviour. Original test has been adopted.
  • fixed #131b: Made sidebar able to scroll vertically again.

0.4.0 (2024-08-14)

Added

  • File IO components and helpers:
    • Added <nsc-file-input> component that can be used in forms. It can be linked with a FormControl that has FileModel as value. When a downloadUrl is present on the FileModel then a download button will be shown. Validation is present with the attributes:
      • allowedFileTypes?: string[]: Allows a list of file extensions to be given on which can be filtered and validated. An error is given named fileInputInvalidType with the allowed extensions as parameter named allowedFileTypes.
      • allowedFileSize?: number: Allows a size in bytes to be given on which to validate. An error is given named fileInputInvalidSize accompanied by the parameters actualSize and allowedFileSize. A file can be added by opening a file window or by dropping a file in the dropzone. The upload and download functionality is based on the FileUploadSource and FileDownloadSource interfaces. You can give an implementation by providing the uploadSource and downloadSource attributes.
    • Added <nsc-file-detail> component that can be used in readonly pages. This component also relies on a FileModel. It will show the file name, and add a download button when the FileModel has a downloadUrl and a downloadSource has been provided.
    • Added <nsc-table-file-column> component that can be used in tables. This component also relies on a FileModel. It will show the file name and add a download button when the FileModel has a downloadUrl and a downloadSource has been provided.
    • Added file-size service and pipe to transform bytes to a more human-readable format of kB, MB, GB, etc.
    • Added file-name-parser function to extract file name from Content-Disposition header. If it cannot be extracted an uuid v4 will be returned instead.
    • Added save-file function to make a browser save a blob correctly to a file when is has been downloaded using a http call that has headers.
  • Added ESlint and prettier setup.

Changed

  • Reformated all code with new linter and formatter.

Fixed

  • Added a null/empty check that returns false to instanceOfReference function.

0.3.0 (2024-07-25)

Added

  • Added a <nsc-field-errors> component that can be used together with the form fields. This component will accept a form control as input attribute and will call a FORM_FIELD_ERROR_PARSER service to parse the present errors. An own implementation of the service needs to implement the FormFieldErrorParser interface and can be provided with the FORM_FIELD_ERROR_PARSER token.
  • Added description attribute to <date-picker> component.
  • Added <date-time-picker> component to be used in forms. A default locale, parse- and displayFormat can be provided by using provideNscDateFormats.
  • Added logging interface and a console logging service.
  • Added duration visualization of <alert> component. Also added redirect capabilities to the component.
  • Added NscDatePipe and NscDateTimePipe that formats dates based on the set formats in the NSC_DATE_ADAPTER.
  • The alert service now returns an observable to indicate when the triggered alert has been closed.

Changed

  • Breaking Change: Changed provideNscDateFormat to provideNscDateFormats that accepts the interface NscDateFormats which is extended to also accept a date time format.
  • <yes-no-toggle> component can now handle errors. The component has also got some visual tweaks to fit the styling better.
  • Made some visual tweaks to <alert> component and set default alert duration to 5 seconds.
  • The table component now allows horizontal scrolling when the content of columns gets to wide.
  • Made width and collapsed width of sidebar in to variables and exposed them.
  • Rejuvenations:
    • @angular/*: ^17.3.9 -> ^17.3.12
    • @angular/cdk: ^17.3.9 -> ^17.3.10
    • @angular/material: ^17.3.9 -> ^17.3.10
    • @angular-devkit/build-angular: ^17.3.7 -> ^17.3.8
    • @angular/cli: ^17.3.7 -> ^17.3.8
    • @ng-doc/*: ^17.6.8 -> ^17.6.16
    • zone.js: ~0.14.6 -> ~0.14.8
    • jasmine-core: ~5.1.12 -> ~5.2.0

Fixed

  • <select> and <multi-select> components do not try to focus on search anymore when search is disabled.
  • <select> and <multi-select> components now allow the use of the spacebar in the search.

0.2.0 (2024-07-09)

Added

  • Added click and double click events to table with TableCellInformation object als content of the output event.
  • Added functionality to adjust height of select and multi-select viewport depending on the number of items available. When no entries are present it shows a default 'Nothing found for "{{value}}"' message. The maximum number of items shown at once is 4. The default translation key for this can be overridden by providing SELECT_TRANSLATION_CONFIG in your application.
  • Added feature to disable search for select and multi-select. Use the searchDisabled input attribute for this.
  • Added <date-picker> component to be used in forms. A default locale, parse- and displayFormat can be provided by using provideNscDateFormat. Other formats can be instantiated with an object of type NscDateFormat and given to the provide function as argument. The formats can be built using unicode tokens. Afterwards, these values can be changed by injecting NSC_DATE_ADAPTER and using the methods:
    • updateParseFormat({value}: { value: string | string [] }): void;
    • updateDisplayFormat({value}: { value: string }): void;
    • updateLocale({value}: { value: string }): void;
    • formatDate({value, displayFormat} : {value: Date, displayFormat: string}): string;
  • Added <date-range-picker> component to be used in forms.

Fixed

  • Changed overlay close logic of filter.component. This co-operates better with other components using an overlay, e.g. date-picker.
  • Disabled reset button for select and multi-select when form control is disabled.
  • Fixed value not being displayed issue when select and multi-select are instantiated with a value, but the value is not present in the current data stream.
  • Made select and multi-select not override all the filters when a search is applied. Instead, now it appends the search filter to the current active filters.
  • Made <filter> component display boolean and dates correctly.

Changed

  • Changed scroll behaviour of filter form overlay. When overlay is shown, scrolling is now blocked.
  • Changed default value for isDummyShown variable in select to true.

0.1.1 (2024-06-17)

Added

  • Added ordering attribute to MenuItem which allows the sidebar component to take into account the order of the MenuItem array as well as the set preferred ordering.

Changed

  • Clear icon of select and multi-select has been reverted to cross.
  • Search field is focussed when select and multi-select opens.
  • Default "none" option in select has been removed. This still can be added custom with SelectNoneOptionDirective.

Fixed

  • Account for the possible 'overflow' (text that is too long) of items in the menu.
  • Clear functionality of select and multi-select does not error anymore when item is cleared that was not rendered.

0.1.0 (2024-06-11)

Added

  • Added pagination$ observable to NscPaginatedDataSource interface.
  • Added searchKey input attribute to select and multi-select to set used filter key. This attribute can only be set OnInit and cannot change anymore, otherwise an error is thrown.
  • Added index as an available context variable to TableCellDirective. This allows components within an nsc-table that use the *nscTableCell directive to access the zero-based index of the row that the templateRef is in.
  • Added SelectNoSelectableOptionsDirective and rendering capability in select and multi-select for this directive if no data is present when filtered.

Changed

  • Default filter key of select and multi-select is displaylabel instead of displayLabel.
  • Clearing a select or multi-select resets the form control now instead of setting an empty string/array. This change in behaviour is also represented with a different icon now. When a form control is made with {nonNullable:true} and a default starting value. The control is reset to this default value.

Fixed

  • Fixed clear select button position when scrolling.

0.0.6 (2024-05-21)

Added

  • Added <nsc-select> component to be used in forms. The component allows a NscSelectDataSource<D> input as well as an Array<D>. The latter will be wrapped in the provided SelectArrayDatasource<D>. There are 3 directives to allow customizations.
    • SelectNoneOptionDirective: Customize how the clear option looks like.
    • SelectOptionDirective: Customize how options look like.
    • SelectValueDirective: Customize how the selected option looks like.
  • Added <nsc-multi-select> component to be used in forms.
  • Added NscInfiniteDataSource interface.

Changed

  • Rejuvenations:
    • @angular/*: ^17.3.0 -> ^17.3.9
    • @angular-devkit/build-angular: ^17.3.0 -> ^17.3.7
    • @angular/cli: ^17.3.0 -> ^17.3.7
    • @ng-doc/*: ^17.5.5 -> ^17.6.8
    • typescript: ~5.4.2 -> ~5.4.5
    • zone.js: ~0.14.4 -> ~0.14.6
  • Refactored file names of models to have kebab-case name with .model suffix:
    • Alert.ts -> alert.model.ts
    • Breadcrumb.ts -> breadcrumb.model.ts
    • BreadcrumbsIconConfig.ts -> breadcrumbs-icon-config.model.ts
    • Filter.ts -> filter.model.ts
    • NscFilterSource.ts -> filter-source.model.ts
    • FilterTranslationConfig.ts -> filter-translation-config.model.ts
    • NscSelectDataSource.ts -> select-data-source.model.ts
    • Paginator.ts -> paginator.model.ts
    • PaginatorTranslationConfig.ts -> paginator-translation-config.model.ts
    • Reference.ts -> reference.model.ts
    • NscDataSource.ts -> data-source.model.ts
    • MenuItem.ts -> menu-item.model.ts
    • HomeItem.ts -> home-item.model.ts
    • SidebarMenuIconConfig.ts -> sidebar-menu-icon-config.model.ts
    • Sorting.ts -> sorting.model.ts
    • Alert.ts -> alert.model.ts
    • Alert.ts -> alert.model.ts
    • Alert.ts -> alert.model.ts
  • Location of NscDataSource interfaces has changed from @nsx/ns-core/table to @nsx/ns-core.

0.0.5 (2024-03-20)

Changed

  • Made <sidebar-menu-navigation-item> an <a> tag instead of a <div>, which enables right click functionalities like "open in new tab".
  • Fixed border issue with divider.

0.0.4 (2024-03-18)

Added

  • Added <yes-no-toggle> component to be used in forms.
  • Created <table-row-action-menu> and <table-row-action-menu-item> components that can be used together with the table component to add a row specific action menu.
  • Created demo pages for form components.

Changed

  • Split up library in sub-entries to lower initial load size.
  • Refactored <text-area-field>:
    • Added auto resize capabilities
    • Added warning icon when invalid
    • Made subscriptSizing dynamic
  • Optimized routing of demo application.
  • Rejuvenations:
    • @angular/*: ^17.2.* -> ^17.3.0
    • @ng-doc/*: ^17.5.1 -> ^17.5.5
    • ng-packagr: ^17.2.0 -> ^17.3.0
    • typescript: ~5.3.3 -> ~5.4.2

0.0.3 (2024-02-29)

Added

  • ngx-ns-core
    • FilterModel:
      • FilterModel component <nsc-filter>: Displays active filters as chips, can add a text filter and allows a dropdown form with more filters. Component has optional translation capabilities, that can be configured using FilterTranslationConfigModel.
      • FilterModel interface.
      • FilterSourceModel interface: Holds filter state.
      • FilterModel form directive [nscFilterForm]: Used to enable form dropdown capabilities.
    • Forms:
      • Focus directive [nscFocusFormField]: Used to autofocus on a form control.
      • Form directive [nscFormFieldHostControl]: Implementation of ControlValueAccessor interface and can be used on filter field components to add formControl, formControlName, ... capabilities more easily.
      • Text-field component <nsc-text-field>
      • Text-area-field component <nsc-text-area-field>
    • PaginatorModel:
      • PaginatorModel component <nsc-paginator>: Component has optional translation capabilities, that can be configured using PaginatorTranslationConfigModel.
      • PaginatorModel interface.
    • Table:
      • Table component <nsc-table>: Accepts DataSourceModel or array as data input. Has multi sort capabilities. Expects <nsc-table-column> components as content to define how to render the data.
      • Table-column component <nsc-table-column> and table-cell directive [nscTableCell]: Describes how the header and content of a column should look like.
      • Sorting interface.
      • DataSourceModel, NscFilterableDataSource, NscSortableDataSource, NscPaginatedDataSource interfaces: Holds data state.

Changed

  • Refactored breadcrumbs and sidebar translations.
  • Added 'identifier' field as id for SidebarMenuNavigationItem.
  • Rejuvenation:
    • @angular/*: ^17.0.* -> ^17.2.2
    • @angular/material: ^17.0.4 -> ^17.2.1
    • @angular/cdk: ^17.0.4 -> ^17.2.1
    • @ng-doc/*: ^17.2.2 -> ^17.5.1
    • @angular-devkit/build-angular: ^17.0.10 -> ^17.2.1
    • @angular/cli: ^17.0.10 -> ^17.2.1
    • @types/uuid: ^9.0.7 -> ^9.0.8
    • karma-coverage: ~2.2.0 -> ~2.2.1
    • karma: ~6.4.2 -> ~6.4.3
    • ng-packagr: ^17.0.3 -> ^17.2.0
    • typescript: ~5.2.2 -> ~5.3.3
    • zone.js: ~0.14.3 -> ~0.14.4

0.0.2 (2024-01-11)

Added

  • ngx-ns-core
    • AlertModel service AlertService and interface AlertModel
    • Breadcrumbs:
      • component <nsc-breadcrumbs> and interface BreadcrumbModel
      • service BreadcrumbsRouteService: Retrieves breadcrumbs from angular routing data
      • service BreadcrumbsIconService: Allows to change the icon font set and used icons of <nsc-breadcrumbs>
    • Service SidebarMenuRouteService: Retrieves active MenuItemModel from angular routing data
    • Translation tests for components using translation service
    • Material theming default variables

Changed

  • Upgrade to Angular 17 and Angular Material 17
    • Documentation framework needed adjustments to work with Angular 17
    • Deployment is changed for Angular 17
  • Rejuvenation:
    • org.apache.maven.plugins:maven-clean-plugin: 3.3.1 -> 3.3.2
  • Jenkinsfile: no more publication for renovate branches and PRs

Fixed

  • Translate tooltip of sidebar correctly
  • Translation issue in demo + documentation
  • nsc prefix was missing for sidebar css theming variables

0.0.1 (2023-12-08)

Added

  • ngx-ns-core
    • Divider component <nsc-divider>
    • Header component <nsc-header>
    • Sidebar-menu component <nsc-sidebar-menu>
    • Translation classes:
      • Json5HttpTranslateLoader: adds possibility to load json5 translation files for @ngx-translate.
      • WarningMissingTranslationHandler: adds possibility to show a console warning when a translation is missing for @ngx-translate.
    • Commonly used SASS variables and mixins
  • ns-core-demo
    • Demo Angular application showcasing the content of the ngx-ns-core library.
  • ns-core-doc
    • Documentation Angular application built with @ng-doc to showcase the different components, directives, services, API of ngx-ns-core. It has a markdown style for documentation enhanced with interactive demonstration environments.