@marcoappio/marco-config 11.0.14 → 11.0.15

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.
@@ -0,0 +1,8 @@
1
+ import type { LabelSpecialUse } from '../../../types';
2
+ type Label = {
3
+ specialUse: LabelSpecialUse | null;
4
+ unreadCount: number;
5
+ };
6
+ export declare const getInboxUnreadTotal: (labels: readonly Label[]) => number;
7
+ export {};
8
+ //# sourceMappingURL=getInboxUnreadTotal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInboxUnreadTotal.d.ts","sourceRoot":"","sources":["../../../../src/utils/labels/getInboxUnreadTotal/getInboxUnreadTotal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,eAAe,GAAG,IAAI,CAAA;IAClC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,mBAAmB,WAAY,SAAS,KAAK,EAAE,KAAG,MAC0B,CAAA"}
@@ -0,0 +1 @@
1
+ export const getInboxUnreadTotal = (labels) => labels.filter(x => x.specialUse === 'INBOX').reduce((acc, x) => acc + x.unreadCount, 0);
@@ -0,0 +1,2 @@
1
+ export { getInboxUnreadTotal } from './getInboxUnreadTotal';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/labels/getInboxUnreadTotal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA"}
@@ -0,0 +1 @@
1
+ export { getInboxUnreadTotal } from './getInboxUnreadTotal';
@@ -1,4 +1,9 @@
1
+ import type { LabelSpecialUse } from '../../types';
1
2
  export declare const labelUtils: {
3
+ getInboxUnreadTotal: (labels: readonly {
4
+ specialUse: LabelSpecialUse | null;
5
+ unreadCount: number;
6
+ }[]) => number;
2
7
  isGmailMailboxLocation: (gmailLabelId: string) => boolean;
3
8
  specialUseOrdering: ("ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH")[];
4
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/labels/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;CAGtB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/labels/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAO1D,eAAO,MAAM,UAAU;;;;;;;CAItB,CAAA"}
@@ -1,6 +1,8 @@
1
+ import { getInboxUnreadTotal } from './getInboxUnreadTotal';
1
2
  import { isGmailMailboxLocation } from './isGmailMailboxLocation';
2
3
  const labelSpecialUseOrdering = ['INBOX', 'SENT', 'SPAM', 'TRASH', 'ARCHIVE'];
3
4
  export const labelUtils = {
5
+ getInboxUnreadTotal,
4
6
  isGmailMailboxLocation,
5
7
  specialUseOrdering: labelSpecialUseOrdering,
6
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "11.0.14",
3
+ "version": "11.0.15",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",