@glissandoo/lib 1.61.2 → 1.62.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.
@@ -39,6 +39,7 @@ export declare namespace EventoFbFunctionsTypes {
39
39
  customAt: number | null;
40
40
  };
41
41
  selectionMode: EventSelectionMode | null;
42
+ sites?: boolean;
42
43
  }
43
44
  export type PublishResult = string[];
44
45
  interface EditParamsBase {
@@ -73,5 +73,6 @@ export default class Evento extends EventoPromoter<EventData> {
73
73
  get selectionModeClosedAt(): FirebaseFirestore.Timestamp | null;
74
74
  get isSelectionModeClosed(): boolean;
75
75
  get isSelectionModeOpen(): boolean;
76
+ get sites(): boolean;
76
77
  }
77
78
  export {};
@@ -195,5 +195,8 @@ class Evento extends promoter_1.default {
195
195
  get isSelectionModeOpen() {
196
196
  return (0, lodash_1.isNull)(this.selectionModeClosedAt) && this.selectionMode === types_1.EventSelectionMode.Open;
197
197
  }
198
+ get sites() {
199
+ return this.data.sites || false;
200
+ }
198
201
  }
199
202
  exports.default = Evento;
@@ -119,6 +119,7 @@ export interface EventData extends EventPromoterData {
119
119
  customAt: Timestamp | null;
120
120
  };
121
121
  selectionModeClosedAt: Timestamp | null;
122
+ sites: boolean;
122
123
  readonly owner: DocumentReference;
123
124
  readonly createdAt: Timestamp;
124
125
  readonly createdOn: EventCreatedOn;
@@ -46,6 +46,11 @@ export default class Group extends GroupBasic<GroupData> {
46
46
  includesMembersToEventsWhenJoined: boolean;
47
47
  showAttendanceToMembers: GroupConfigShowAttendanceToMembers;
48
48
  };
49
+ get configSites(): {
50
+ active: boolean;
51
+ showEvents: boolean;
52
+ showMembers: boolean;
53
+ };
49
54
  get status(): GroupStatus;
50
55
  get planId(): PlansGroup;
51
56
  get templates(): Record<string, import("./types").GroupTemplateData>;
@@ -123,6 +123,7 @@ class Group extends basic_1.default {
123
123
  [types_1.SocialNetwork.Twitter]: null,
124
124
  [types_1.SocialNetwork.Instagram]: null,
125
125
  [types_1.SocialNetwork.YouTube]: null,
126
+ [types_1.SocialNetwork.Web]: null,
126
127
  };
127
128
  }
128
129
  getSocialNetworkUrl(id) {
@@ -141,6 +142,19 @@ class Group extends basic_1.default {
141
142
  : types_1.GroupConfigShowAttendanceToMembers.None,
142
143
  };
143
144
  }
145
+ get configSites() {
146
+ return {
147
+ [types_1.GroupConfigSitesKey.Active]: types_1.GroupConfigSitesKey.Active in this.data.config
148
+ ? this.data.configSites[types_1.GroupConfigSitesKey.Active]
149
+ : false,
150
+ [types_1.GroupConfigSitesKey.ShowEvents]: types_1.GroupConfigSitesKey.ShowEvents in this.data.config
151
+ ? this.data.configSites[types_1.GroupConfigSitesKey.ShowEvents]
152
+ : true,
153
+ [types_1.GroupConfigSitesKey.ShowMembers]: types_1.GroupConfigSitesKey.ShowMembers in this.data.config
154
+ ? this.data.configSites[types_1.GroupConfigSitesKey.ShowMembers]
155
+ : false,
156
+ };
157
+ }
144
158
  get status() {
145
159
  return this.data.status;
146
160
  }
@@ -19,6 +19,11 @@ export declare enum GroupConfigKey {
19
19
  IncludesMembersToEventsWhenJoined = "includesMembersToEventsWhenJoined",
20
20
  ShowAttendanceToMembers = "showAttendanceToMembers"
21
21
  }
22
+ export declare enum GroupConfigSitesKey {
23
+ Active = "active",
24
+ ShowMembers = "showMembers",
25
+ ShowEvents = "showEvents"
26
+ }
22
27
  export declare enum GroupConfigShowAttendanceToMembers {
23
28
  None = "none",
24
29
  OnlyConfirmed = "onlyConfirmed",
@@ -35,7 +40,8 @@ export declare enum SocialNetwork {
35
40
  Facebook = "facebook",
36
41
  Twitter = "twitter",
37
42
  Instagram = "instagram",
38
- YouTube = "youtube"
43
+ YouTube = "youtube",
44
+ Web = "web"
39
45
  }
40
46
  export interface GroupAddressData {
41
47
  address: string;
@@ -69,6 +75,7 @@ export interface GroupAlgoliaData extends Omit<GroupBasicData, 'location'> {
69
75
  siChange: 'up' | 'down' | 'equal';
70
76
  createdAt: number;
71
77
  memberForecast: string;
78
+ sites: boolean;
72
79
  }
73
80
  export interface AGroupBasicData extends GroupBasicData {
74
81
  id: string;
@@ -97,6 +104,11 @@ export interface GroupConfig {
97
104
  [GroupConfigKey.IncludesMembersToEventsWhenJoined]: boolean;
98
105
  [GroupConfigKey.ShowAttendanceToMembers]: GroupConfigShowAttendanceToMembers;
99
106
  }
107
+ export interface GroupConfigSites {
108
+ [GroupConfigSitesKey.Active]: boolean;
109
+ [GroupConfigSitesKey.ShowMembers]: boolean;
110
+ [GroupConfigSitesKey.ShowEvents]: boolean;
111
+ }
100
112
  export interface GroupRepertoireTag {
101
113
  title: string;
102
114
  default: boolean;
@@ -134,6 +146,7 @@ export interface GroupData extends GroupBasicData {
134
146
  deletedAt: Timestamp | null;
135
147
  socialNetworks?: Record<SocialNetwork, string | null>;
136
148
  config: GroupConfig;
149
+ configSites: GroupConfigSites;
137
150
  satisfactionIndex: {
138
151
  current: number;
139
152
  last: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigKey = exports.GroupCreatedOn = void 0;
3
+ exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigSitesKey = exports.GroupConfigKey = exports.GroupCreatedOn = void 0;
4
4
  var GroupCreatedOn;
5
5
  (function (GroupCreatedOn) {
6
6
  GroupCreatedOn["Web"] = "web";
@@ -12,6 +12,12 @@ var GroupConfigKey;
12
12
  GroupConfigKey["IncludesMembersToEventsWhenJoined"] = "includesMembersToEventsWhenJoined";
13
13
  GroupConfigKey["ShowAttendanceToMembers"] = "showAttendanceToMembers";
14
14
  })(GroupConfigKey = exports.GroupConfigKey || (exports.GroupConfigKey = {}));
15
+ var GroupConfigSitesKey;
16
+ (function (GroupConfigSitesKey) {
17
+ GroupConfigSitesKey["Active"] = "active";
18
+ GroupConfigSitesKey["ShowMembers"] = "showMembers";
19
+ GroupConfigSitesKey["ShowEvents"] = "showEvents";
20
+ })(GroupConfigSitesKey = exports.GroupConfigSitesKey || (exports.GroupConfigSitesKey = {}));
15
21
  var GroupConfigShowAttendanceToMembers;
16
22
  (function (GroupConfigShowAttendanceToMembers) {
17
23
  GroupConfigShowAttendanceToMembers["None"] = "none";
@@ -32,6 +38,7 @@ var SocialNetwork;
32
38
  SocialNetwork["Twitter"] = "twitter";
33
39
  SocialNetwork["Instagram"] = "instagram";
34
40
  SocialNetwork["YouTube"] = "youtube";
41
+ SocialNetwork["Web"] = "web";
35
42
  })(SocialNetwork = exports.SocialNetwork || (exports.SocialNetwork = {}));
36
43
  var GroupRepertoireTagReserved;
37
44
  (function (GroupRepertoireTagReserved) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.61.2",
3
+ "version": "1.62.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",