@genesislcap/foundation-notifications 14.53.1-alpha-75e4b06.0 → 14.54.0

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.
@@ -7,6 +7,7 @@ import { NotificationStructure, Banner, Dialog, Toast, Snackbar } from './types'
7
7
  export declare class NotificationBuilder {
8
8
  private title;
9
9
  private body;
10
+ private createdAt;
10
11
  private logLevel;
11
12
  private alert;
12
13
  private toast;
@@ -27,6 +28,13 @@ export declare class NotificationBuilder {
27
28
  * @returns
28
29
  */
29
30
  withBody(body: string): NotificationBuilder;
31
+ /**
32
+ * Add the creation date to notification
33
+ * @public
34
+ * @param createdAt - Date
35
+ * @returns
36
+ */
37
+ withCreatedAt(createdAt: Date): NotificationBuilder;
30
38
  /**
31
39
  * Add log level to notification
32
40
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"notification-builder.d.ts","sourceRoot":"","sources":["../../src/notification-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEjF;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,MAAM,CAAS;IAEvB;;;;;OAKG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB;IAKpD;;;;;OAKG;IACI,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB;IAKlD;;;;OAIG;IACI,YAAY,CAAC,QAAQ,EAAE,QAAQ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,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,mBAAmB;IAK5D;;;;;OAKG;IACI,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB;IAKrD;;;;;OAKG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,mBAAmB;IAKnD;;;;;OAKG;IACI,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;IAKtD;;;;;OAKG;IACI,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,mBAAmB;IAK5D;;;;;OAKG;IACI,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;IAKtD;;;;OAIG;IACI,KAAK,IAAI,qBAAqB;CAmDtC;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,mBAAgD,CAAC"}
@@ -118,6 +118,7 @@ export interface Snackbar {
118
118
  export interface NotificationStructure {
119
119
  readonly title: string;
120
120
  readonly body: string;
121
+ readonly createdAt?: Date;
121
122
  readonly logLevel?: LogLevel;
122
123
  readonly config?: {
123
124
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,kBAAkB,uBAAuB;CAC1C;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAEtF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtF;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAA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AAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CACtD;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB;;WAEG;QACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;QAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;QAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG;IAAE,YAAY,EAAE,qBAAqB,CAAA;CAAE,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC"}
@@ -24,6 +24,16 @@ export class NotificationBuilder {
24
24
  this.body = body;
25
25
  return this;
26
26
  }
27
+ /**
28
+ * Add the creation date to notification
29
+ * @public
30
+ * @param createdAt - Date
31
+ * @returns
32
+ */
33
+ withCreatedAt(createdAt) {
34
+ this.createdAt = createdAt;
35
+ return this;
36
+ }
27
37
  /**
28
38
  * Add log level to notification
29
39
  * @public
@@ -100,6 +110,9 @@ export class NotificationBuilder {
100
110
  body: this.body,
101
111
  };
102
112
  let config = {};
113
+ if (this.createdAt) {
114
+ notificationStructure = Object.assign({ createdAt: this.createdAt }, notificationStructure);
115
+ }
103
116
  if (this.logLevel in LogLevel) {
104
117
  notificationStructure = Object.assign({ logLevel: this.logLevel }, notificationStructure);
105
118
  }
@@ -7,7 +7,7 @@ import { getNotificationContainer } from '../notification-util';
7
7
  * @returns
8
8
  * */
9
9
  export const showToast = (notificationStructure, tagName) => {
10
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
10
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
11
11
  const tagPrefix = tagName.split('-')[0];
12
12
  const container = getNotificationContainer('notify-container', tagName);
13
13
  if (container) {
@@ -39,10 +39,10 @@ export const showToast = (notificationStructure, tagName) => {
39
39
  toastDetails.textContent = (notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.body) || '';
40
40
  const toastDate = document.createElement('div');
41
41
  toastDate.setAttribute('slot', 'date');
42
- toastDate.textContent = new Date().toLocaleTimeString();
42
+ toastDate.textContent = ((_c = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.createdAt) === null || _c === void 0 ? void 0 : _c.toLocaleTimeString()) || '';
43
43
  let toastBottom;
44
- if (((_d = (_c = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _c === void 0 ? void 0 : _c.toast) === null || _d === void 0 ? void 0 : _d.buttons) &&
45
- ((_g = (_f = (_e = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _e === void 0 ? void 0 : _e.toast) === null || _f === void 0 ? void 0 : _f.buttons) === null || _g === void 0 ? void 0 : _g.length)) {
44
+ if (((_e = (_d = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _d === void 0 ? void 0 : _d.toast) === null || _e === void 0 ? void 0 : _e.buttons) &&
45
+ ((_h = (_g = (_f = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _f === void 0 ? void 0 : _f.toast) === null || _g === void 0 ? void 0 : _g.buttons) === null || _h === void 0 ? void 0 : _h.length)) {
46
46
  toastBottom = document.createElement('div');
47
47
  toastBottom.setAttribute('slot', 'bottom');
48
48
  notificationStructure.config.toast.buttons.forEach((button) => {
@@ -60,12 +60,12 @@ export const showToast = (notificationStructure, tagName) => {
60
60
  toastBottom.appendChild(buttonElement);
61
61
  });
62
62
  }
63
- toastNotify.setAttribute('notify', ((_j = (_h = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _h === void 0 ? void 0 : _h.toast) === null || _j === void 0 ? void 0 : _j.type) || '');
64
- ((_l = (_k = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _k === void 0 ? void 0 : _k.toast) === null || _l === void 0 ? void 0 : _l.autoClose)
65
- ? toastNotify.setAttribute('auto-close', `${(_o = (_m = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _m === void 0 ? void 0 : _m.toast) === null || _o === void 0 ? void 0 : _o.autoClose}`)
63
+ toastNotify.setAttribute('notify', ((_k = (_j = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _j === void 0 ? void 0 : _j.toast) === null || _k === void 0 ? void 0 : _k.type) || '');
64
+ ((_m = (_l = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _l === void 0 ? void 0 : _l.toast) === null || _m === void 0 ? void 0 : _m.autoClose)
65
+ ? toastNotify.setAttribute('auto-close', `${(_p = (_o = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _o === void 0 ? void 0 : _o.toast) === null || _p === void 0 ? void 0 : _p.autoClose}`)
66
66
  : '';
67
- ((_q = (_p = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _p === void 0 ? void 0 : _p.toast) === null || _q === void 0 ? void 0 : _q.closeTimeout)
68
- ? toastNotify.setAttribute('close-timeout', `${(_s = (_r = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _r === void 0 ? void 0 : _r.toast) === null || _s === void 0 ? void 0 : _s.closeTimeout}`)
67
+ ((_r = (_q = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _q === void 0 ? void 0 : _q.toast) === null || _r === void 0 ? void 0 : _r.closeTimeout)
68
+ ? toastNotify.setAttribute('close-timeout', `${(_t = (_s = notificationStructure === null || notificationStructure === void 0 ? void 0 : notificationStructure.config) === null || _s === void 0 ? void 0 : _s.toast) === null || _t === void 0 ? void 0 : _t.closeTimeout}`)
69
69
  : '';
70
70
  toastNotify.appendChild(toastTitle);
71
71
  toastNotify.appendChild(toastDetails);
@@ -1270,6 +1270,56 @@
1270
1270
  "isAbstract": false,
1271
1271
  "name": "withBody"
1272
1272
  },
1273
+ {
1274
+ "kind": "Method",
1275
+ "canonicalReference": "@genesislcap/foundation-notifications!NotificationBuilder#withCreatedAt:member(1)",
1276
+ "docComment": "/**\n * Add the creation date to notification\n *\n * @param createdAt - Date\n *\n * @returns \n *\n * @public\n */\n",
1277
+ "excerptTokens": [
1278
+ {
1279
+ "kind": "Content",
1280
+ "text": "withCreatedAt(createdAt: "
1281
+ },
1282
+ {
1283
+ "kind": "Reference",
1284
+ "text": "Date",
1285
+ "canonicalReference": "!Date:interface"
1286
+ },
1287
+ {
1288
+ "kind": "Content",
1289
+ "text": "): "
1290
+ },
1291
+ {
1292
+ "kind": "Reference",
1293
+ "text": "NotificationBuilder",
1294
+ "canonicalReference": "@genesislcap/foundation-notifications!NotificationBuilder:class"
1295
+ },
1296
+ {
1297
+ "kind": "Content",
1298
+ "text": ";"
1299
+ }
1300
+ ],
1301
+ "isStatic": false,
1302
+ "returnTypeTokenRange": {
1303
+ "startIndex": 3,
1304
+ "endIndex": 4
1305
+ },
1306
+ "releaseTag": "Public",
1307
+ "isProtected": false,
1308
+ "overloadIndex": 1,
1309
+ "parameters": [
1310
+ {
1311
+ "parameterName": "createdAt",
1312
+ "parameterTypeTokenRange": {
1313
+ "startIndex": 1,
1314
+ "endIndex": 2
1315
+ },
1316
+ "isOptional": false
1317
+ }
1318
+ ],
1319
+ "isOptional": false,
1320
+ "isAbstract": false,
1321
+ "name": "withCreatedAt"
1322
+ },
1273
1323
  {
1274
1324
  "kind": "Method",
1275
1325
  "canonicalReference": "@genesislcap/foundation-notifications!NotificationBuilder#withDialog:member(1)",
@@ -1962,6 +2012,34 @@
1962
2012
  "endIndex": 12
1963
2013
  }
1964
2014
  },
2015
+ {
2016
+ "kind": "PropertySignature",
2017
+ "canonicalReference": "@genesislcap/foundation-notifications!NotificationStructure#createdAt:member",
2018
+ "docComment": "",
2019
+ "excerptTokens": [
2020
+ {
2021
+ "kind": "Content",
2022
+ "text": "readonly createdAt?: "
2023
+ },
2024
+ {
2025
+ "kind": "Reference",
2026
+ "text": "Date",
2027
+ "canonicalReference": "!Date:interface"
2028
+ },
2029
+ {
2030
+ "kind": "Content",
2031
+ "text": ";"
2032
+ }
2033
+ ],
2034
+ "isReadonly": true,
2035
+ "isOptional": true,
2036
+ "releaseTag": "Public",
2037
+ "name": "createdAt",
2038
+ "propertyTypeTokenRange": {
2039
+ "startIndex": 1,
2040
+ "endIndex": 2
2041
+ }
2042
+ },
1965
2043
  {
1966
2044
  "kind": "PropertySignature",
1967
2045
  "canonicalReference": "@genesislcap/foundation-notifications!NotificationStructure#logLevel:member",
@@ -171,6 +171,7 @@ export declare const getToastBuilder: () => ToastBuilder;
171
171
  export declare class NotificationBuilder {
172
172
  private title;
173
173
  private body;
174
+ private createdAt;
174
175
  private logLevel;
175
176
  private alert;
176
177
  private toast;
@@ -191,6 +192,13 @@ export declare class NotificationBuilder {
191
192
  * @returns
192
193
  */
193
194
  withBody(body: string): NotificationBuilder;
195
+ /**
196
+ * Add the creation date to notification
197
+ * @public
198
+ * @param createdAt - Date
199
+ * @returns
200
+ */
201
+ withCreatedAt(createdAt: Date): NotificationBuilder;
194
202
  /**
195
203
  * Add log level to notification
196
204
  * @public
@@ -287,6 +295,7 @@ export declare type NotificationSeverity = 'Information' | 'Warning' | 'Serious'
287
295
  export declare interface NotificationStructure {
288
296
  readonly title: string;
289
297
  readonly body: string;
298
+ readonly createdAt?: Date;
290
299
  readonly logLevel?: LogLevel;
291
300
  readonly config?: {
292
301
  /**
@@ -20,6 +20,7 @@ export declare class NotificationBuilder
20
20
  | [withAlert(alert)](./foundation-notifications.notificationbuilder.withalert.md) | | Add alert to notification |
21
21
  | [withBanner(banner)](./foundation-notifications.notificationbuilder.withbanner.md) | | Add banner to notification |
22
22
  | [withBody(body)](./foundation-notifications.notificationbuilder.withbody.md) | | Add body details to notification |
23
+ | [withCreatedAt(createdAt)](./foundation-notifications.notificationbuilder.withcreatedat.md) | | Add the creation date to notification |
23
24
  | [withDialog(dialog)](./foundation-notifications.notificationbuilder.withdialog.md) | | Add dialog to notification |
24
25
  | [withLogLevel(logLevel)](./foundation-notifications.notificationbuilder.withloglevel.md) | | Add log level to notification |
25
26
  | [withSnackbar(snackbar)](./foundation-notifications.notificationbuilder.withsnackbar.md) | | Add snackbar to notification |
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-notifications](./foundation-notifications.md) &gt; [NotificationBuilder](./foundation-notifications.notificationbuilder.md) &gt; [withCreatedAt](./foundation-notifications.notificationbuilder.withcreatedat.md)
4
+
5
+ ## NotificationBuilder.withCreatedAt() method
6
+
7
+ Add the creation date to notification
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ withCreatedAt(createdAt: Date): NotificationBuilder;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | createdAt | Date | Date |
20
+
21
+ **Returns:**
22
+
23
+ [NotificationBuilder](./foundation-notifications.notificationbuilder.md)
24
+
25
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-notifications](./foundation-notifications.md) &gt; [NotificationStructure](./foundation-notifications.notificationstructure.md) &gt; [createdAt](./foundation-notifications.notificationstructure.createdat.md)
4
+
5
+ ## NotificationStructure.createdAt property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ readonly createdAt?: Date;
11
+ ```
@@ -18,6 +18,7 @@ export interface NotificationStructure
18
18
  | --- | --- | --- | --- |
19
19
  | [body](./foundation-notifications.notificationstructure.body.md) | <code>readonly</code> | string | |
20
20
  | [config?](./foundation-notifications.notificationstructure.config.md) | <code>readonly</code> | { readonly logLevel?: LogLevel; readonly alert?: boolean; readonly toast?: [Toast](./foundation-notifications.toast.md)<!-- -->; readonly banner?: [Banner](./foundation-notifications.banner.md)<!-- -->; readonly snackbar?: [Snackbar](./foundation-notifications.snackbar.md)<!-- -->; readonly dialog?: [Dialog](./foundation-notifications.dialog.md)<!-- -->; } | _(Optional)_ |
21
+ | [createdAt?](./foundation-notifications.notificationstructure.createdat.md) | <code>readonly</code> | Date | _(Optional)_ |
21
22
  | [logLevel?](./foundation-notifications.notificationstructure.loglevel.md) | <code>readonly</code> | LogLevel | _(Optional)_ |
22
23
  | [title](./foundation-notifications.notificationstructure.title.md) | <code>readonly</code> | string | |
23
24
 
@@ -92,6 +92,7 @@ export class NotificationBuilder {
92
92
  withAlert(alert: boolean): NotificationBuilder;
93
93
  withBanner(banner: Banner): NotificationBuilder;
94
94
  withBody(body: string): NotificationBuilder;
95
+ withCreatedAt(createdAt: Date): NotificationBuilder;
95
96
  withDialog(dialog: Dialog): NotificationBuilder;
96
97
  withLogLevel(logLevel: LogLevel): NotificationBuilder;
97
98
  withSnackbar(snackbar: Snackbar): NotificationBuilder;
@@ -154,6 +155,8 @@ export interface NotificationStructure {
154
155
  readonly dialog?: Dialog;
155
156
  };
156
157
  // (undocumented)
158
+ readonly createdAt?: Date;
159
+ // (undocumented)
157
160
  readonly logLevel?: LogLevel;
158
161
  // (undocumented)
159
162
  readonly title: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-notifications",
3
3
  "description": "Genesis Foundation UI Notifications Utils",
4
- "version": "14.53.1-alpha-75e4b06.0",
4
+ "version": "14.54.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -37,11 +37,11 @@
37
37
  "test:debug": "genx test --debug"
38
38
  },
39
39
  "devDependencies": {
40
- "@genesislcap/foundation-testing": "14.53.1-alpha-75e4b06.0",
41
- "@genesislcap/genx": "14.53.1-alpha-75e4b06.0"
40
+ "@genesislcap/foundation-testing": "14.54.0",
41
+ "@genesislcap/genx": "14.54.0"
42
42
  },
43
43
  "dependencies": {
44
- "@genesislcap/foundation-utils": "14.53.1-alpha-75e4b06.0",
44
+ "@genesislcap/foundation-utils": "14.54.0",
45
45
  "@microsoft/fast-element": "^1.7.0",
46
46
  "tslib": "^2.3.1"
47
47
  },
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
- "gitHead": "696d59a549ce02baeed1e8df3bbbb9cfac1a3b60"
56
+ "gitHead": "94c44096e99b607294d9fb9bbd6b6b71bb6389d4"
57
57
  }