@genesislcap/pbc-notify-ui 1.0.51 → 1.0.53
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/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts +2 -2
- package/dist/dts/components/foundation-inbox/inbox-base/inbox-base.d.ts.map +1 -1
- package/dist/esm/components/foundation-inbox/inbox-base/inbox-base.js +8 -12
- package/dist/esm/components/foundation-inbox/inbox.template.js +2 -2
- package/package.json +11 -12
|
@@ -38,6 +38,7 @@ export declare class FoundationInboxBase extends GenesisElement {
|
|
|
38
38
|
alertsChanged: () => Alert[];
|
|
39
39
|
rulesChanged: () => Rule[];
|
|
40
40
|
templatesChanged: () => RuleTemplate[];
|
|
41
|
+
debouncedFilterSearchAlertLog: any;
|
|
41
42
|
filterSearchAlertLog(): void;
|
|
42
43
|
reverseOrder(reverse: boolean): void;
|
|
43
44
|
filterSearchSubscribe(): void;
|
|
@@ -49,7 +50,6 @@ export declare class FoundationInboxBase extends GenesisElement {
|
|
|
49
50
|
playPauseAlert(ruleClicked: Rule): Promise<void>;
|
|
50
51
|
deleteAlert(ruleClicked: Rule): Promise<void>;
|
|
51
52
|
openTemplateSubscription(ruleTemplate: any): Promise<void>;
|
|
52
|
-
formatDateStrForMatchCriteria(date
|
|
53
|
-
formatDateForMatchCriteria(date: Date): string;
|
|
53
|
+
formatDateStrForMatchCriteria(date?: string): string;
|
|
54
54
|
}
|
|
55
55
|
//# sourceMappingURL=inbox-base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox-base.d.ts","sourceRoot":"","sources":["../../../../../src/components/foundation-inbox/inbox-base/inbox-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"inbox-base.d.ts","sourceRoot":"","sources":["../../../../../src/components/foundation-inbox/inbox-base/inbox-base.ts"],"names":[],"mappings":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;IACnC,iBAAiB,EAAE,MAAM,CAAQ;IAEjC,wBAAwB,EAAE,UAAU,CAAC;IACrC,OAAO,EAAE,OAAO,CAAS;IAE9B,IAAI,EAAE,IAAI,CAAC;IAEZ,iBAAiB;IAiBvB,oBAAoB;IAMd,eAAe,CAAC,QAAQ,EAAE,QAAQ;IA+BxC,aAAa,gBAA2C;IAExD,YAAY,eAAyC;IAErD,gBAAgB,uBAAiD;IAEjE,6BAA6B,MAAsD;IAEnF,oBAAoB;IA0DpB,YAAY,CAAC,OAAO,EAAE,OAAO;IAO7B,qBAAqB;IAWrB,WAAW;IAaX,YAAY,CAAC,OAAO,EAAE,MAAM;IAI5B,gBAAgB,CAAC,QAAQ,KAAA;IASzB,gBAAgB;IA4BhB,SAAS;IAEH,cAAc,CAAC,WAAW,EAAE,IAAI;IAgBhC,WAAW,CAAC,WAAW,EAAE,IAAI;IAO7B,wBAAwB,CAAC,YAAY,EAAE,GAAG;IAYhD,6BAA6B,CAAC,IAAI,CAAC,EAAE,MAAM;CAG5C"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { Auth } from '@genesislcap/foundation-comms';
|
|
3
|
+
import debounce from 'lodash.debounce';
|
|
3
4
|
import { CriteriaBuilder, ExpressionBuilder, Serialisers, } from '@genesislcap/foundation-criteria';
|
|
4
5
|
import { showNotificationDialog } from '@genesislcap/foundation-notifications';
|
|
5
6
|
import { GenesisElement, observable } from '@genesislcap/web-core';
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
|
+
import utc from 'dayjs/plugin/utc';
|
|
6
9
|
import { AlertService } from '../../../services/alert.service';
|
|
7
10
|
import { FoundationInboxService } from '../../../services/inbox.service';
|
|
8
11
|
import { RuleService } from '../../../services/rule.service';
|
|
@@ -10,6 +13,7 @@ import { TemplateService } from '../../../services/template.service';
|
|
|
10
13
|
import { logger } from '../../../utils';
|
|
11
14
|
import { showNotificationError } from '../../foundation-notification-dashboard/notification-dashboard.utils';
|
|
12
15
|
import { InboxTab, RuleStatus, } from '../inbox.types';
|
|
16
|
+
dayjs.extend(utc);
|
|
13
17
|
const criteriaBuilder = () => new CriteriaBuilder();
|
|
14
18
|
const expressionBuilder = (field, value, serialiser) => {
|
|
15
19
|
return new ExpressionBuilder()
|
|
@@ -18,6 +22,7 @@ const expressionBuilder = (field, value, serialiser) => {
|
|
|
18
22
|
.withSerialiser(serialiser)
|
|
19
23
|
.build();
|
|
20
24
|
};
|
|
25
|
+
const DEBOUNCE_TIME = 500;
|
|
21
26
|
export class FoundationInboxBase extends GenesisElement {
|
|
22
27
|
constructor() {
|
|
23
28
|
super(...arguments);
|
|
@@ -42,6 +47,7 @@ export class FoundationInboxBase extends GenesisElement {
|
|
|
42
47
|
this.alertsChanged = () => (this.alertsFilter = this.alerts);
|
|
43
48
|
this.rulesChanged = () => (this.rulesFilter = this.rules);
|
|
44
49
|
this.templatesChanged = () => (this.templatesFilter = this.templates);
|
|
50
|
+
this.debouncedFilterSearchAlertLog = debounce(this.filterSearchAlertLog, DEBOUNCE_TIME);
|
|
45
51
|
}
|
|
46
52
|
connectedCallback() {
|
|
47
53
|
const _super = Object.create(null, {
|
|
@@ -108,8 +114,7 @@ export class FoundationInboxBase extends GenesisElement {
|
|
|
108
114
|
}
|
|
109
115
|
else {
|
|
110
116
|
// if no toDate is set, then force it to be today
|
|
111
|
-
|
|
112
|
-
filterCriteria.withExpression(expressionBuilder('CREATED_AT', this.formatDateForMatchCriteria(today), Serialisers.dateIsLessEqual));
|
|
117
|
+
filterCriteria.withExpression(expressionBuilder('CREATED_AT', this.formatDateStrForMatchCriteria(), Serialisers.dateIsLessEqual));
|
|
113
118
|
}
|
|
114
119
|
// Refresh the data subscription
|
|
115
120
|
this.inboxService.unsubscribe(this.alertSubscription);
|
|
@@ -210,16 +215,7 @@ export class FoundationInboxBase extends GenesisElement {
|
|
|
210
215
|
}
|
|
211
216
|
// #endregion
|
|
212
217
|
formatDateStrForMatchCriteria(date) {
|
|
213
|
-
|
|
214
|
-
return this.formatDateForMatchCriteria(dateObj);
|
|
215
|
-
}
|
|
216
|
-
formatDateForMatchCriteria(date) {
|
|
217
|
-
const formattedDateString = date.getFullYear() +
|
|
218
|
-
'' +
|
|
219
|
-
('0' + (date.getMonth() + 1)).slice(-2) +
|
|
220
|
-
'' +
|
|
221
|
-
('0' + date.getDate()).slice(-2);
|
|
222
|
-
return formattedDateString;
|
|
218
|
+
return dayjs.utc(date).format('YYYYMMDD');
|
|
223
219
|
}
|
|
224
220
|
}
|
|
225
221
|
__decorate([
|
|
@@ -71,7 +71,7 @@ const alertsTab = (tab) => html `
|
|
|
71
71
|
:value=${(x) => x.titleSearchValue}
|
|
72
72
|
@input=${(x, c) => {
|
|
73
73
|
x.titleSearchValue = c.event.target.value;
|
|
74
|
-
x.
|
|
74
|
+
x.debouncedFilterSearchAlertLog();
|
|
75
75
|
}}
|
|
76
76
|
placeholder="Search by Title..."
|
|
77
77
|
autocomplete="off"
|
|
@@ -82,7 +82,7 @@ const alertsTab = (tab) => html `
|
|
|
82
82
|
:value=${(x) => x.bodySearchValue}
|
|
83
83
|
@input=${(x, c) => {
|
|
84
84
|
x.bodySearchValue = c.event.target.value;
|
|
85
|
-
x.
|
|
85
|
+
x.debouncedFilterSearchAlertLog();
|
|
86
86
|
}}
|
|
87
87
|
placeholder="Search by Body ..."
|
|
88
88
|
autocomplete="off"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/pbc-notify-ui",
|
|
3
3
|
"description": "Genesis PBC Notify UI",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.53",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"workspaces": [
|
|
7
7
|
"client"
|
|
@@ -68,9 +68,6 @@
|
|
|
68
68
|
"*.{ts,js}": "eslint",
|
|
69
69
|
"*.styles.ts": "stylelint"
|
|
70
70
|
},
|
|
71
|
-
"dependencies": {
|
|
72
|
-
"web-push": "^3.4.4"
|
|
73
|
-
},
|
|
74
71
|
"eslintConfig": {
|
|
75
72
|
"extends": "@genesislcap/eslint-config"
|
|
76
73
|
},
|
|
@@ -86,11 +83,11 @@
|
|
|
86
83
|
}
|
|
87
84
|
},
|
|
88
85
|
"devDependencies": {
|
|
89
|
-
"@genesiscommunitysuccess/cep-fast-plugin": "5.0.3",
|
|
90
|
-
"@genesiscommunitysuccess/custom-elements-lsp": "5.0.3",
|
|
91
86
|
"@commitlint/cli": "^19.2.1",
|
|
92
87
|
"@commitlint/config-conventional": "^19.1.0",
|
|
93
88
|
"@commitlint/format": "^19.0.3",
|
|
89
|
+
"@genesiscommunitysuccess/cep-fast-plugin": "5.0.3",
|
|
90
|
+
"@genesiscommunitysuccess/custom-elements-lsp": "5.0.3",
|
|
94
91
|
"@genesislcap/design-system-configurator": "~14",
|
|
95
92
|
"@genesislcap/eslint-config": "~14",
|
|
96
93
|
"@genesislcap/eslint-stylelint-builder": "~14",
|
|
@@ -101,32 +98,34 @@
|
|
|
101
98
|
"@genesislcap/vite-builder": "~14",
|
|
102
99
|
"@genesislcap/webpack-builder": "~14",
|
|
103
100
|
"conventional-changelog-conventionalcommits": "^6.1.0",
|
|
101
|
+
"dayjs": "^1.11.7",
|
|
104
102
|
"husky": "9.0.11",
|
|
105
103
|
"lint-prepush": "^2.2.1",
|
|
106
104
|
"lint-staged": "^15.2.2",
|
|
105
|
+
"lodash.debounce": "^4.0.8",
|
|
107
106
|
"playwright-lighthouse": "^3.1.0",
|
|
108
107
|
"rimraf": "^3.0.2",
|
|
109
108
|
"tslib": "^2.3.1"
|
|
110
109
|
},
|
|
111
110
|
"peerDependencies": {
|
|
112
111
|
"@genesislcap/foundation-comms": "~14",
|
|
113
|
-
"@genesislcap/foundation-
|
|
112
|
+
"@genesislcap/foundation-criteria": "~14",
|
|
114
113
|
"@genesislcap/foundation-entity-management": "~14",
|
|
114
|
+
"@genesislcap/foundation-events": "~14",
|
|
115
115
|
"@genesislcap/foundation-forms": "~14",
|
|
116
|
-
"@genesislcap/foundation-notifications": "~14",
|
|
117
116
|
"@genesislcap/foundation-layout": "~14",
|
|
118
117
|
"@genesislcap/foundation-logger": "~14",
|
|
118
|
+
"@genesislcap/foundation-notifications": "~14",
|
|
119
119
|
"@genesislcap/foundation-shell": "~14",
|
|
120
120
|
"@genesislcap/foundation-store": "~14",
|
|
121
121
|
"@genesislcap/foundation-ui": "~14",
|
|
122
122
|
"@genesislcap/foundation-utils": "~14",
|
|
123
123
|
"@genesislcap/foundation-zero": "~14",
|
|
124
124
|
"@genesislcap/foundation-zero-grid-pro": "~14",
|
|
125
|
-
"@genesislcap/rapid-grid-pro": "~14",
|
|
126
|
-
"@genesislcap/rapid-design-system": "~14",
|
|
127
125
|
"@genesislcap/g2plot-chart": "~14",
|
|
128
|
-
"@genesislcap/
|
|
129
|
-
"@genesislcap/
|
|
126
|
+
"@genesislcap/rapid-design-system": "~14",
|
|
127
|
+
"@genesislcap/rapid-grid-pro": "~14",
|
|
128
|
+
"@genesislcap/web-core": "~14"
|
|
130
129
|
},
|
|
131
130
|
"publishConfig": {
|
|
132
131
|
"access": "public"
|