@genesislcap/blank-app-seed 3.2.0 → 3.3.1
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.
- package/.genx/package.json +1 -1
- package/.genx/templates/route.template.hbs +1 -1
- package/.genx/versions.json +3 -3
- package/CHANGELOG.md +14 -0
- package/client/package.json +1 -1
- package/client/src/utils/formatters.ts +18 -0
- package/package.json +1 -1
package/.genx/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from '@microsoft/fast-element';
|
|
2
|
-
import { getNumberFormatter{{#if route.FDC3EventHandlersEnabled}}, sendEventOnChannel{{/if}} } from '../../utils';
|
|
2
|
+
import { getDateFormatter, getNumberFormatter{{#if route.FDC3EventHandlersEnabled}}, sendEventOnChannel{{/if}} } from '../../utils';
|
|
3
3
|
import type { {{pascalCase route.name}} } from './{{kebabCase route.name}}';
|
|
4
4
|
|
|
5
5
|
export const {{pascalCase route.name}}Template = html<{{pascalCase route.name}}>`
|
package/.genx/versions.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.3.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.3.0...v3.3.1) (2024-04-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add webpack to plugin ui command. (GENC-372) (#195) 930bab3
|
|
9
|
+
|
|
10
|
+
## [3.3.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.2.0...v3.3.0) (2024-04-23)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add getDateFormatter GENC-318 (#190) 2008ee6
|
|
16
|
+
|
|
3
17
|
## [3.2.0](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.1.0...v3.2.0) (2024-04-23)
|
|
4
18
|
|
|
5
19
|
|
package/client/package.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"clean": "genx clean dist node_modules",
|
|
29
29
|
"dev": "npm run dev:webpack",
|
|
30
30
|
"dev:docker": "npm run dev -- --host 0.0.0.0",
|
|
31
|
-
"dev:intellij": "genx dev -e ENABLE_SSO",
|
|
31
|
+
"dev:intellij": "genx dev -e ENABLE_SSO -b webpack",
|
|
32
32
|
"dev:no-open": "npm run dev -- --no-open",
|
|
33
33
|
"dev:https": "npm run dev -- --https",
|
|
34
34
|
"dev:vite": "genx dev -e API_HOST,ENABLE_SSO -b vite",
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import Numeral from 'numeral';
|
|
2
2
|
import 'numeral/locales';
|
|
3
3
|
|
|
4
|
+
const defaultDateOptions: Intl.DateTimeFormatOptions = {
|
|
5
|
+
year: 'numeric',
|
|
6
|
+
month: '2-digit',
|
|
7
|
+
day: '2-digit',
|
|
8
|
+
timeZone: 'UTC',
|
|
9
|
+
};
|
|
10
|
+
|
|
4
11
|
export function getNumberFormatter(format: string, locale?: string) {
|
|
5
12
|
return (params) => {
|
|
6
13
|
if (!(params && typeof params.value === 'number')) return '';
|
|
@@ -12,3 +19,14 @@ export function getNumberFormatter(format: string, locale?: string) {
|
|
|
12
19
|
return Numeral(params.value).format(format);
|
|
13
20
|
};
|
|
14
21
|
}
|
|
22
|
+
|
|
23
|
+
export function getDateFormatter(
|
|
24
|
+
locale: string = 'en-GB',
|
|
25
|
+
options: Intl.DateTimeFormatOptions = defaultDateOptions,
|
|
26
|
+
) {
|
|
27
|
+
return (params) => {
|
|
28
|
+
if (!(params && typeof params.value === 'number')) return '';
|
|
29
|
+
|
|
30
|
+
return new Intl.DateTimeFormat(locale, options).format(params.value);
|
|
31
|
+
};
|
|
32
|
+
}
|