@genesislcap/blank-app-seed 3.20.0 → 3.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed-config",
3
3
  "description": "Genesis Blank App Seed Configuration",
4
- "version": "3.20.0",
4
+ "version": "3.20.2",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "lint": "eslint .",
@@ -1,5 +1,8 @@
1
1
  import {Component, CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
2
2
  import {CommonModule} from '@angular/common';
3
+ {{#if route.tiles}}
4
+ import { getDateFormatter, getNumberFormatter } from '../../utils';
5
+ {{/if}}
3
6
 
4
7
  @Component({
5
8
  selector: 'app-{{pascalCase route.name}}',
@@ -1,4 +1,7 @@
1
- const {gridOptionsSerializer, gridColumnsSerializer } = require('./gridSerializers');
1
+ const {
2
+ gridOptionsSerializer,
3
+ gridColumnsSerializer,
4
+ } = require('./gridSerializers');
2
5
  const formatJSONValue = require('./formatJSONValue');
3
6
  const getLayoutType = require('./getLayoutType');
4
7
 
@@ -7,15 +7,14 @@ function gridColumnsSerializer(columns, pad = ' ') {
7
7
 
8
8
  try {
9
9
  const columnsSerialized = columns.map((column) => {
10
- return gridOptionsSerializer(column)
11
- }
12
- );
10
+ return gridOptionsSerializer(column);
11
+ });
13
12
  return `[\n${pad}${columnsSerialized}]`;
14
13
  } catch (e) {
15
- throw e
14
+ console.error('Error serializing grid columns:', e.message);
15
+ throw e;
16
16
  }
17
- };
18
-
17
+ }
19
18
 
20
19
  function gridOptionsSerializer(options, pad = ' ') {
21
20
  if (!options) {
@@ -43,8 +42,9 @@ function gridOptionsSerializer(options, pad = ' ') {
43
42
  output += `${pad}}\n`;
44
43
  return output;
45
44
  } catch (e) {
45
+ console.error('Error serializing grid options:', e.message);
46
46
  throw e;
47
47
  }
48
- };
48
+ }
49
49
 
50
- module.exports = {gridColumnsSerializer, gridOptionsSerializer} ;
50
+ module.exports = { gridColumnsSerializer, gridOptionsSerializer };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.20.2](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.20.1...v3.20.2) (2024-07-03)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update PROFILE_USER.csv GENC-606 (#271) 51f558e
9
+
10
+ ## [3.20.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.20.0...v3.20.1) (2024-07-02)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * adding missing formatting helpers GENC-547 (#269) b8c0e8c
16
+
3
17
  ## [3.20.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.19.0...v3.20.0) (2024-07-01)
4
18
 
5
19
 
@@ -4,7 +4,7 @@
4
4
  "scripts": {
5
5
  "ng": "ng",
6
6
  "bootstrap": "npm install --no-fund --no-audit",
7
- "dev": "ng serve --configuration=development",
7
+ "dev": "ng serve --configuration=development --open",
8
8
  "build": "ng build --configuration=production",
9
9
  "watch": "ng build --watch --configuration development",
10
10
  "test": "ng test"
@@ -28,6 +28,7 @@
28
28
  "@genesislcap/rapid-grid-pro": "{{versions.UI}}",
29
29
  "@genesislcap/foundation-layout": "{{versions.UI}}",
30
30
  "@genesislcap/g2plot-chart": "{{versions.UI}}",
31
+ "numeral": "2.0.6",
31
32
  "rxjs": "~7.8.0",
32
33
  "tslib": "^2.3.0",
33
34
  "zone.js": "~0.14.3"
@@ -39,6 +40,7 @@
39
40
  "@angular/compiler-cli": "^18.0.4",
40
41
  "@genesislcap/build-kit": "{{versions.UI}}",
41
42
  "@types/jasmine": "~5.1.0",
43
+ "@types/numeral": "^2.0.5",
42
44
  "file-loader": "^6.2.0",
43
45
  "jasmine-core": "~5.1.0",
44
46
  "karma": "~6.4.0",
@@ -5,8 +5,7 @@ import { AuthLoginComponent } from './pages/auth-login/auth-login.component';
5
5
  {{#each routes}}
6
6
  import { {{pascalCase this.name}}Component } from './pages/{{kebabCase this.name}}/{{kebabCase this.name}}.component';
7
7
  {{/each}}
8
-
9
- export const AUTH_PATH = 'login'
8
+ import { AUTH_PATH } from './app.config';
10
9
 
11
10
  export const routes: Routes = [
12
11
  {
@@ -1,6 +1,7 @@
1
1
  import type { MainMenu } from './types/menu'
2
2
  import type { LayoutComponentName } from './types/layout';
3
- import { AUTH_PATH } from './app-routing.module';
3
+
4
+ export const AUTH_PATH = 'login'
4
5
 
5
6
  export const layoutComponentName = {
6
7
  default: 'DefaultLayoutComponent',
@@ -1,8 +1,7 @@
1
1
  import { Injectable } from '@angular/core';
2
2
  import { CanActivate, Router } from '@angular/router';
3
3
  import { AuthService } from '../services/auth.service';
4
- import { AUTH_PATH } from '../app-routing.module';
5
-
4
+ import { AUTH_PATH } from '../app.config';
6
5
 
7
6
  @Injectable({
8
7
  providedIn: 'root',
@@ -1,6 +1,6 @@
1
1
  import {configure, define} from '@genesislcap/foundation-login';
2
2
  import type { Router } from '@angular/router';
3
- import { AUTH_PATH } from '../app-routing.module';
3
+ import { AUTH_PATH } from '../app.config';
4
4
  import { DI } from '@microsoft/fast-foundation';
5
5
 
6
6
  const ssoSettings =
@@ -0,0 +1,35 @@
1
+ import Numeral from 'numeral';
2
+ import 'numeral/locales';
3
+
4
+ const defaultDateOptions: Intl.DateTimeFormatOptions = {
5
+ year: 'numeric',
6
+ month: '2-digit',
7
+ day: '2-digit',
8
+ timeZone: 'UTC',
9
+ };
10
+
11
+ export function getNumberFormatter(format: string, locale?: string | null) {
12
+ return (params: any) => {
13
+ // bigdecimals are sent as strings
14
+ if (!(params && (typeof params.value === 'number' || typeof params.value === 'string'))) {
15
+ return '';
16
+ }
17
+
18
+ if (locale) {
19
+ Numeral.locale(locale);
20
+ }
21
+
22
+ return Numeral(params.value).format(format);
23
+ };
24
+ }
25
+
26
+ export function getDateFormatter(
27
+ locale: string = 'en-GB',
28
+ options: Intl.DateTimeFormatOptions = defaultDateOptions,
29
+ ) {
30
+ return (params: any) => {
31
+ if (!(params && typeof params.value === 'number')) return '';
32
+
33
+ return new Intl.DateTimeFormat(locale, options).format(params.value);
34
+ };
35
+ }
@@ -0,0 +1,2 @@
1
+ export * from './formatters';
2
+ export * from './getLayoutNameByRoute';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/blank-app-seed",
3
3
  "description": "Genesis Blank App Seed",
4
- "version": "3.20.0",
4
+ "version": "3.20.2",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
7
7
  "release": "semantic-release"
@@ -8,3 +8,4 @@
8
8
  "NOTIFICATION_USER","admin"
9
9
  "FILE_STORAGE_USER","admin"
10
10
  "FILE_STORAGE_ADMIN","admin"
11
+ "RECONCILIATION_USER","admin"