@acm-uiuc/js-shared 2.4.0 → 3.0.1

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.
Files changed (3) hide show
  1. package/dist/orgs.d.ts +149 -34
  2. package/dist/orgs.js +41 -59
  3. package/package.json +1 -1
package/dist/orgs.d.ts CHANGED
@@ -1,35 +1,150 @@
1
- export declare const SIGList: [string, ...string[]];
2
- export declare const CommitteeCoreList: [string, ...string[]];
3
- export declare const CommitteePartnerList: string[];
4
- export declare const CoreOrganizationList: [string, ...string[]];
5
- export declare const AllOrganizationList: [string, ...string[]];
6
- export type ACMOrganization = typeof AllOrganizationList[number];
7
- export declare const OrganizationShortIdentifierMapping: {
8
- readonly ACM: "acm";
9
- readonly SIGPwny: "sigpwny";
10
- readonly SIGCHI: "sigchi";
11
- readonly GameBuilders: "gamebuilders";
12
- readonly SIGAIDA: "sigaida";
13
- readonly SIGGRAPH: "siggraph";
14
- readonly ICPC: "icpc";
15
- readonly SIGMobile: "sigmobile";
16
- readonly SIGMusic: "sigmusic";
17
- readonly GLUG: "glug";
18
- readonly SIGNLL: "signll";
19
- readonly SIGma: "sigma";
20
- readonly SIGQuantum: "sigquantum";
21
- readonly SIGecom: "sigecom";
22
- readonly SIGPLAN: "sigplan";
23
- readonly SIGPolicy: "sigpolicy";
24
- readonly SIGARCH: "sigarch";
25
- readonly SIGRobotics: "sigrobotics";
26
- readonly SIGtricity: "sigtricity";
27
- readonly "Infrastructure Committee": "infra";
28
- readonly "Social Committee": "social";
29
- readonly "Mentorship Committee": "mentorship";
30
- readonly "Academic Committee": "academic";
31
- readonly "Corporate Committee": "corporate";
32
- readonly "Marketing Committee": "marketing";
33
- readonly "Reflections | Projections": "reflproj";
34
- readonly HackIllinois: "hackillinois";
1
+ export declare enum OrgType {
2
+ MAIN = "main",
3
+ SIG = "sig",
4
+ COMMITTEE = "committee",
5
+ MISC = "misc"
6
+ }
7
+ export declare const Organizations: {
8
+ readonly A01: {
9
+ readonly name: "ACM";
10
+ readonly type: OrgType.MAIN;
11
+ readonly shortcode: "acm";
12
+ };
13
+ readonly S01: {
14
+ readonly name: "SIGPwny";
15
+ readonly type: OrgType.SIG;
16
+ readonly shortcode: "sigpwny";
17
+ };
18
+ readonly S02: {
19
+ readonly name: "SIGCHI";
20
+ readonly type: OrgType.SIG;
21
+ readonly shortcode: "sigchi";
22
+ };
23
+ readonly S03: {
24
+ readonly name: "GameBuilders";
25
+ readonly type: OrgType.SIG;
26
+ readonly shortcode: "gamebuilders";
27
+ };
28
+ readonly S04: {
29
+ readonly name: "SIGAIDA";
30
+ readonly type: OrgType.SIG;
31
+ readonly shortcode: "sigaida";
32
+ };
33
+ readonly S05: {
34
+ readonly name: "SIGGRAPH";
35
+ readonly type: OrgType.SIG;
36
+ readonly shortcode: "siggraph";
37
+ };
38
+ readonly S06: {
39
+ readonly name: "ICPC";
40
+ readonly type: OrgType.SIG;
41
+ readonly shortcode: "icpc";
42
+ };
43
+ readonly S07: {
44
+ readonly name: "SIGMobile";
45
+ readonly type: OrgType.SIG;
46
+ readonly shortcode: "sigmobile";
47
+ };
48
+ readonly S08: {
49
+ readonly name: "SIGMusic";
50
+ readonly type: OrgType.SIG;
51
+ readonly shortcode: "sigmusic";
52
+ };
53
+ readonly S09: {
54
+ readonly name: "GLUG";
55
+ readonly type: OrgType.SIG;
56
+ readonly shortcode: "glug";
57
+ };
58
+ readonly S10: {
59
+ readonly name: "SIGNLL";
60
+ readonly type: OrgType.SIG;
61
+ readonly shortcode: "signll";
62
+ };
63
+ readonly S11: {
64
+ readonly name: "SIGma";
65
+ readonly type: OrgType.SIG;
66
+ readonly shortcode: "sigma";
67
+ };
68
+ readonly S12: {
69
+ readonly name: "SIGQuantum";
70
+ readonly type: OrgType.SIG;
71
+ readonly shortcode: "sigquantum";
72
+ };
73
+ readonly S13: {
74
+ readonly name: "SIGecom";
75
+ readonly type: OrgType.SIG;
76
+ readonly shortcode: "sigecom";
77
+ };
78
+ readonly S14: {
79
+ readonly name: "SIGPLAN";
80
+ readonly type: OrgType.SIG;
81
+ readonly shortcode: "sigplan";
82
+ };
83
+ readonly S15: {
84
+ readonly name: "SIGPolicy";
85
+ readonly type: OrgType.SIG;
86
+ readonly shortcode: "sigpolicy";
87
+ };
88
+ readonly S16: {
89
+ readonly name: "SIGARCH";
90
+ readonly type: OrgType.SIG;
91
+ readonly shortcode: "sigarch";
92
+ };
93
+ readonly S17: {
94
+ readonly name: "SIGRobotics";
95
+ readonly type: OrgType.SIG;
96
+ readonly shortcode: "sigrobotics";
97
+ };
98
+ readonly S18: {
99
+ readonly name: "SIGtricity";
100
+ readonly type: OrgType.SIG;
101
+ readonly shortcode: "sigtricity";
102
+ };
103
+ readonly C01: {
104
+ readonly name: "Infrastructure Committee";
105
+ readonly type: OrgType.COMMITTEE;
106
+ readonly shortcode: "infra";
107
+ };
108
+ readonly C02: {
109
+ readonly name: "Social Committee";
110
+ readonly type: OrgType.COMMITTEE;
111
+ readonly shortcode: "social";
112
+ };
113
+ readonly C03: {
114
+ readonly name: "Mentorship Committee";
115
+ readonly type: OrgType.COMMITTEE;
116
+ readonly shortcode: "mentorship";
117
+ };
118
+ readonly C04: {
119
+ readonly name: "Academic Committee";
120
+ readonly type: OrgType.COMMITTEE;
121
+ readonly shortcode: "academic";
122
+ };
123
+ readonly C05: {
124
+ readonly name: "Corporate Committee";
125
+ readonly type: OrgType.COMMITTEE;
126
+ readonly shortcode: "corporate";
127
+ };
128
+ readonly C06: {
129
+ readonly name: "Marketing Committee";
130
+ readonly type: OrgType.COMMITTEE;
131
+ readonly shortcode: "marketing";
132
+ };
133
+ readonly C07: {
134
+ readonly name: "Reflections | Projections";
135
+ readonly type: OrgType.COMMITTEE;
136
+ readonly shortcode: "reflproj";
137
+ };
138
+ readonly C08: {
139
+ readonly name: "HackIllinois";
140
+ readonly type: OrgType.COMMITTEE;
141
+ readonly shortcode: "hackillinois";
142
+ };
35
143
  };
144
+ export declare const AllOrganizationNameList: ("ACM" | "SIGPwny" | "SIGCHI" | "GameBuilders" | "SIGAIDA" | "SIGGRAPH" | "ICPC" | "SIGMobile" | "SIGMusic" | "GLUG" | "SIGNLL" | "SIGma" | "SIGQuantum" | "SIGecom" | "SIGPLAN" | "SIGPolicy" | "SIGARCH" | "SIGRobotics" | "SIGtricity" | "Infrastructure Committee" | "Social Committee" | "Mentorship Committee" | "Academic Committee" | "Corporate Committee" | "Marketing Committee" | "Reflections | Projections" | "HackIllinois")[];
145
+ export type OrganizationId = keyof typeof Organizations;
146
+ export type Organization = (typeof Organizations)[OrganizationId];
147
+ export type OrganizationName = Organization["name"];
148
+ export declare function getOrgsByType(type: OrgType): Array<Organization & {
149
+ id: OrganizationId;
150
+ }>;
package/dist/orgs.js CHANGED
@@ -1,60 +1,42 @@
1
- export const SIGList = [
2
- "SIGPwny",
3
- "SIGCHI",
4
- "GameBuilders",
5
- "SIGAIDA",
6
- "SIGGRAPH",
7
- "ICPC",
8
- "SIGMobile",
9
- "SIGMusic",
10
- "GLUG",
11
- "SIGNLL",
12
- "SIGma",
13
- "SIGQuantum",
14
- "SIGecom",
15
- "SIGPLAN",
16
- "SIGPolicy",
17
- "SIGARCH",
18
- "SIGRobotics",
19
- "SIGtricity",
20
- ];
21
- export const CommitteeCoreList = [
22
- "Infrastructure Committee",
23
- "Social Committee",
24
- "Mentorship Committee",
25
- "Academic Committee",
26
- "Corporate Committee",
27
- "Marketing Committee",
28
- ];
29
- export const CommitteePartnerList = ["Reflections | Projections", "HackIllinois"];
30
- export const CoreOrganizationList = ["ACM", ...SIGList, ...CommitteeCoreList];
31
- export const AllOrganizationList = [...CoreOrganizationList, ...CommitteePartnerList];
32
- export const OrganizationShortIdentifierMapping = {
33
- "ACM": "acm",
34
- "SIGPwny": "sigpwny",
35
- "SIGCHI": "sigchi",
36
- "GameBuilders": "gamebuilders",
37
- "SIGAIDA": "sigaida",
38
- "SIGGRAPH": "siggraph",
39
- "ICPC": "icpc",
40
- "SIGMobile": "sigmobile",
41
- "SIGMusic": "sigmusic",
42
- "GLUG": "glug",
43
- "SIGNLL": "signll",
44
- "SIGma": "sigma",
45
- "SIGQuantum": "sigquantum",
46
- "SIGecom": "sigecom",
47
- "SIGPLAN": "sigplan",
48
- "SIGPolicy": "sigpolicy",
49
- "SIGARCH": "sigarch",
50
- "SIGRobotics": "sigrobotics",
51
- "SIGtricity": "sigtricity",
52
- "Infrastructure Committee": "infra",
53
- "Social Committee": "social",
54
- "Mentorship Committee": "mentorship",
55
- "Academic Committee": "academic",
56
- "Corporate Committee": "corporate",
57
- "Marketing Committee": "marketing",
58
- "Reflections | Projections": "reflproj",
59
- "HackIllinois": "hackillinois",
1
+ export var OrgType;
2
+ (function (OrgType) {
3
+ OrgType["MAIN"] = "main";
4
+ OrgType["SIG"] = "sig";
5
+ OrgType["COMMITTEE"] = "committee";
6
+ OrgType["MISC"] = "misc";
7
+ })(OrgType || (OrgType = {}));
8
+ export const Organizations = {
9
+ "A01": { name: "ACM", type: OrgType.MAIN, shortcode: "acm" },
10
+ "S01": { name: "SIGPwny", type: OrgType.SIG, shortcode: "sigpwny" },
11
+ "S02": { name: "SIGCHI", type: OrgType.SIG, shortcode: "sigchi" },
12
+ "S03": { name: "GameBuilders", type: OrgType.SIG, shortcode: "gamebuilders" },
13
+ "S04": { name: "SIGAIDA", type: OrgType.SIG, shortcode: "sigaida" },
14
+ "S05": { name: "SIGGRAPH", type: OrgType.SIG, shortcode: "siggraph" },
15
+ "S06": { name: "ICPC", type: OrgType.SIG, shortcode: "icpc" },
16
+ "S07": { name: "SIGMobile", type: OrgType.SIG, shortcode: "sigmobile" },
17
+ "S08": { name: "SIGMusic", type: OrgType.SIG, shortcode: "sigmusic" },
18
+ "S09": { name: "GLUG", type: OrgType.SIG, shortcode: "glug" },
19
+ "S10": { name: "SIGNLL", type: OrgType.SIG, shortcode: "signll" },
20
+ "S11": { name: "SIGma", type: OrgType.SIG, shortcode: "sigma" },
21
+ "S12": { name: "SIGQuantum", type: OrgType.SIG, shortcode: "sigquantum" },
22
+ "S13": { name: "SIGecom", type: OrgType.SIG, shortcode: "sigecom" },
23
+ "S14": { name: "SIGPLAN", type: OrgType.SIG, shortcode: "sigplan" },
24
+ "S15": { name: "SIGPolicy", type: OrgType.SIG, shortcode: "sigpolicy" },
25
+ "S16": { name: "SIGARCH", type: OrgType.SIG, shortcode: "sigarch" },
26
+ "S17": { name: "SIGRobotics", type: OrgType.SIG, shortcode: "sigrobotics" },
27
+ "S18": { name: "SIGtricity", type: OrgType.SIG, shortcode: "sigtricity" },
28
+ "C01": { name: "Infrastructure Committee", type: OrgType.COMMITTEE, shortcode: "infra" },
29
+ "C02": { name: "Social Committee", type: OrgType.COMMITTEE, shortcode: "social" },
30
+ "C03": { name: "Mentorship Committee", type: OrgType.COMMITTEE, shortcode: "mentorship" },
31
+ "C04": { name: "Academic Committee", type: OrgType.COMMITTEE, shortcode: "academic" },
32
+ "C05": { name: "Corporate Committee", type: OrgType.COMMITTEE, shortcode: "corporate" },
33
+ "C06": { name: "Marketing Committee", type: OrgType.COMMITTEE, shortcode: "marketing" },
34
+ "C07": { name: "Reflections | Projections", type: OrgType.COMMITTEE, shortcode: "reflproj" },
35
+ "C08": { name: "HackIllinois", type: OrgType.COMMITTEE, shortcode: "hackillinois" },
60
36
  };
37
+ export const AllOrganizationNameList = Object.values(Organizations).map(x => x.name);
38
+ export function getOrgsByType(type) {
39
+ return Object.entries(Organizations)
40
+ .filter(([_, org]) => org.type === type)
41
+ .map(([id, org]) => ({ ...org, id }));
42
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acm-uiuc/js-shared",
3
- "version": "2.4.0",
3
+ "version": "3.0.1",
4
4
  "description": "ACM UIUC Shared JS code",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",