@genesislcap/pbc-notify-ui 1.0.41 → 1.0.42

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 +1 @@
1
- {"version":3,"file":"inbox-subscription.template.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/inbox-subscription/inbox-subscription.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,yBAAyB,wEA2CrC,CAAC"}
1
+ {"version":3,"file":"inbox-subscription.template.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/inbox-subscription/inbox-subscription.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,yBAAyB,wEA4CrC,CAAC"}
@@ -35,6 +35,7 @@ export declare class FoundationInboxBase extends GenesisElement {
35
35
  private filterAlerts;
36
36
  searchSubscribeChanged: () => void;
37
37
  dismissAlert(alertId: string): void;
38
+ dismissAllAlerts(): void;
38
39
  editAlert(): void;
39
40
  playPauseAlert(ruleClicked: Rule): Promise<void>;
40
41
  deleteAlert(ruleClicked: Rule): Promise<void>;
@@ -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;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAc,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,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BAAgB,uBAAiD;IAErD,cAAc,EAAE,MAAM,CAAM;IACxC,qBAAqB,aAEnB;IAEF,OAAO,CAAC,YAAY;IAUpB,sBAAsB,aASpB;IAIF,YAAY,CAAC,OAAO,EAAE,MAAM;IAI5B,gBAAgB;IAyBhB,SAAS;IAEH,cAAc,CAAC,WAAW,EAAE,IAAI;IAgBhC,WAAW,CAAC,WAAW,EAAE,IAAI;IAO7B,wBAAwB,CAAC,YAAY,EAAE,GAAG;CAWjD"}
@@ -1,3 +1,8 @@
1
+ export declare const inboxHeader: import("@microsoft/fast-element").ElementStyles;
2
+ export declare const alertsNewAndAlertsHistory: import("@microsoft/fast-element").ElementStyles;
3
+ export declare const subscriptions: import("@microsoft/fast-element").ElementStyles;
4
+ export declare const subscribe: import("@microsoft/fast-element").ElementStyles;
5
+ export declare const ruleAndTemplate: import("@microsoft/fast-element").ElementStyles;
1
6
  /**
2
7
  * @public
3
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"inbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.styles.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,qBAAqB,iDA2NjC,CAAC"}
1
+ {"version":3,"file":"inbox.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.styles.ts"],"names":[],"mappings":"AAoDA,eAAO,MAAM,WAAW,iDA+BvB,CAAC;AAEF,eAAO,MAAM,yBAAyB,iDAkDrC,CAAC;AAEF,eAAO,MAAM,aAAa,iDAYzB,CAAC;AAEF,eAAO,MAAM,SAAS,iDAYrB,CAAC;AAEF,eAAO,MAAM,eAAe,iDA0D3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,iDAuBjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAkD/C;;GAEG;AACH,eAAO,MAAM,uBAAuB,sEAiJnC,CAAC"}
1
+ {"version":3,"file":"inbox.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-inbox/inbox.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA8D/C;;GAEG;AACH,eAAO,MAAM,uBAAuB,sEAiJnC,CAAC"}
@@ -2,6 +2,7 @@ import { Message, SocketObservable } from '@genesislcap/foundation-comms';
2
2
  export interface AlertService {
3
3
  getAlerts(): SocketObservable<Message<any>>;
4
4
  dismissNotifyAlert(alertId: string): any;
5
+ dismissAllNotifyAlerts(): any;
5
6
  }
6
7
  export declare const AlertService: import("@microsoft/fast-foundation").InterfaceSymbol<AlertService>;
7
8
  //# sourceMappingURL=alert.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.service.d.ts","sourceRoot":"","sources":["../../../src/services/alert.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGnF,MAAM,WAAW,YAAY;IAC3B,SAAS,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,kBAAkB,CAAC,OAAO,EAAE,MAAM,OAAE;CACrC;AAwBD,eAAO,MAAM,YAAY,oEAAyE,CAAC"}
1
+ {"version":3,"file":"alert.service.d.ts","sourceRoot":"","sources":["../../../src/services/alert.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGnF,MAAM,WAAW,YAAY;IAC3B,SAAS,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,kBAAkB,CAAC,OAAO,EAAE,MAAM,OAAE;IACpC,sBAAsB,QAAG;CAC1B;AA4BD,eAAO,MAAM,YAAY,oEAAyE,CAAC"}
@@ -28,6 +28,7 @@ export const InboxSubscriptionTemplate = html `
28
28
  <div class="inbox-subscription-footer">
29
29
  <rapid-button
30
30
  class="subscribe"
31
+ appearance="primary"
31
32
  @click=${(x) => x.subscribeTemplate()}
32
33
  ?disabled=${(x) => x.subscribeDisabled}
33
34
  >
@@ -1,5 +1,6 @@
1
1
  import { __awaiter, __decorate } from "tslib";
2
2
  import { Auth } from '@genesislcap/foundation-comms';
3
+ import { showNotificationDialog } from '@genesislcap/foundation-notifications';
3
4
  import { GenesisElement, observable } from '@genesislcap/web-core';
4
5
  import { AlertService } from '../../../services/alert.service';
5
6
  import { FoundationInboxService } from '../../../services/inbox.service';
@@ -92,6 +93,24 @@ export class FoundationInboxBase extends GenesisElement {
92
93
  dismissAlert(alertId) {
93
94
  this.alertService.dismissNotifyAlert(alertId);
94
95
  }
96
+ dismissAllAlerts() {
97
+ showNotificationDialog({
98
+ title: 'Confirm Clear All',
99
+ body: `Do you really want to clear all the alerts? This action can't be undone.`,
100
+ dialog: {
101
+ dismissingAction: {
102
+ label: 'Dismiss',
103
+ action: () => null,
104
+ },
105
+ confirmingActions: [
106
+ {
107
+ label: 'Confirm',
108
+ action: () => this.alertService.dismissAllNotifyAlerts(),
109
+ },
110
+ ],
111
+ },
112
+ }, 'rapid');
113
+ }
95
114
  // #endregion
96
115
  // #region Subscriptions
97
116
  // TODO:
@@ -1,17 +1,5 @@
1
1
  import { css } from '@genesislcap/web-core';
2
- /**
3
- * @public
4
- */
5
- export const FoundationInboxStyles = css `
6
- .inbox {
7
- width: 100%;
8
- height: 100%;
9
- background: var(--neutral-layer-4);
10
- display: flex;
11
- flex-direction: column;
12
- }
13
-
14
- /* Tabs */
2
+ const tabs = css `
15
3
  rapid-tabs {
16
4
  display: flex;
17
5
  flex-direction: column;
@@ -31,22 +19,35 @@ export const FoundationInboxStyles = css `
31
19
  min-height: 0;
32
20
  }
33
21
 
34
- /* Search */
22
+ rapid-tab-panel {
23
+ padding: 0;
24
+ }
25
+ `;
26
+ const search = css `
35
27
  .search {
28
+ display: flex;
29
+ flex-direction: row;
30
+ flex: 0;
36
31
  padding: calc(var(--design-unit) * 3px) calc(var(--design-unit) * 3px);
37
32
  border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
38
- flex: 0;
33
+ gap: calc(var(--design-unit) * 2px);
39
34
  }
40
35
 
41
36
  .search-input {
42
37
  display: flex;
38
+ margin: 0;
39
+ width: 100%;
43
40
  }
44
41
 
45
42
  .search-input::part(root) {
46
43
  width: 100%;
47
44
  }
48
45
 
49
- /* Inbox Header */
46
+ .clear-all {
47
+ min-width: auto;
48
+ }
49
+ `;
50
+ export const inboxHeader = css `
50
51
  .inbox-header {
51
52
  display: flex;
52
53
  flex: 0;
@@ -77,16 +78,8 @@ export const FoundationInboxStyles = css `
77
78
  .inbox-header-close::part(start) {
78
79
  margin-inline-end: 0;
79
80
  }
80
-
81
- /* Inbox Content */
82
- .inbox-content {
83
- flex: 1;
84
- min-height: 0;
85
- display: flex;
86
- height: calc(100% - 54px);
87
- }
88
-
89
- /* Alert Log */
81
+ `;
82
+ export const alertsNewAndAlertsHistory = css `
90
83
  .alert-log-tab-panel {
91
84
  display: flex;
92
85
  flex-direction: column;
@@ -136,8 +129,8 @@ export const FoundationInboxStyles = css `
136
129
  color: var(--neutral-foreground-hint);
137
130
  font-size: calc(var(--design-unit) * 3px);
138
131
  }
139
-
140
- /* My Alerts */
132
+ `;
133
+ export const subscriptions = css `
141
134
  .my-alerts-tab-panel {
142
135
  display: flex;
143
136
  flex-direction: column;
@@ -149,8 +142,8 @@ export const FoundationInboxStyles = css `
149
142
  flex: 1;
150
143
  overflow: auto;
151
144
  }
152
-
153
- /* Subscribe */
145
+ `;
146
+ export const subscribe = css `
154
147
  .subscribe-tab-panel {
155
148
  display: flex;
156
149
  flex-direction: column;
@@ -162,8 +155,8 @@ export const FoundationInboxStyles = css `
162
155
  flex: 1;
163
156
  overflow: auto;
164
157
  }
165
-
166
- /* Rule and Template */
158
+ `;
159
+ export const ruleAndTemplate = css `
167
160
  .template {
168
161
  cursor: pointer;
169
162
  }
@@ -222,3 +215,30 @@ export const FoundationInboxStyles = css `
222
215
  cursor: pointer;
223
216
  }
224
217
  `;
218
+ /**
219
+ * @public
220
+ */
221
+ export const FoundationInboxStyles = css `
222
+ :host {
223
+ border-top: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
224
+ display: flex;
225
+ min-height: 0;
226
+ height: 100%;
227
+ }
228
+
229
+ ${tabs}
230
+ ${search}
231
+ ${inboxHeader}
232
+ ${alertsNewAndAlertsHistory}
233
+
234
+ .inbox-content {
235
+ flex: 1;
236
+ display: flex;
237
+ min-height: 0;
238
+ }
239
+
240
+ ${alertsNewAndAlertsHistory}
241
+ ${subscriptions}
242
+ ${subscribe}
243
+ ${ruleAndTemplate}
244
+ `;
@@ -17,6 +17,15 @@ const alertsTab = (tab) => html `
17
17
  placeholder="Search Alerts..."
18
18
  autocomplete="off"
19
19
  ></rapid-text-field>
20
+ ${when(() => tab === InboxTab.AlertsNew, html `
21
+ <rapid-button
22
+ class="clear-all"
23
+ appearance="primary"
24
+ @click=${(x) => x.dismissAllAlerts()}
25
+ >
26
+ Clear All
27
+ </rapid-button>
28
+ `)}
20
29
  </div>
21
30
  <div class="alert-log-tab-content">
22
31
  ${repeat((x) => x.alertsFilter, html `
@@ -110,7 +119,7 @@ export const FoundationInboxTemplate = html `
110
119
  <span class="rule-action-edit" @click=${(x, c) => c.parent.editAlert(x)}}>
111
120
  <rapid-icon name="gear"></rapid-icon>
112
121
  </span>
113
- -->
122
+ -->
114
123
  <span
115
124
  class="rule-action-enable-disable"
116
125
  @click=${(x, c) => c.parent.playPauseAlert(x)}
@@ -16,6 +16,11 @@ class AlertServiceImpl {
16
16
  });
17
17
  });
18
18
  }
19
+ dismissAllNotifyAlerts() {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ return this.connect.commitEvent('EVENT_DISMISS_ALL_NOTIFY_ALERT');
22
+ });
23
+ }
19
24
  }
20
25
  __decorate([
21
26
  Connect
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.41",
4
+ "version": "1.0.42",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "workspaces": [
7
7
  "client"