wenum 1.51.0 → 1.52.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.
- package/dist/index.d.mts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +88 -0
- package/dist/index.mjs +79 -0
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/meta/collection/index.ts +3 -0
- package/src/meta/collection/label.ts +6 -0
- package/src/meta/collection/pets/index.ts +2 -0
- package/src/meta/collection/pets/label.ts +11 -0
- package/src/meta/collection/pets/type.ts +8 -0
- package/src/meta/collection/type.ts +3 -0
- package/src/meta/common/index.ts +2 -0
- package/src/meta/common/label.ts +7 -0
- package/src/meta/common/type.ts +5 -0
- package/src/meta/index.ts +6 -0
- package/src/meta/label.ts +11 -0
- package/src/meta/type.ts +9 -0
- package/src/meta/uoi/index.ts +3 -0
- package/src/meta/uoi/label.ts +6 -0
- package/src/meta/uoi/sports/basketball/index.ts +2 -0
- package/src/meta/uoi/sports/basketball/label.ts +8 -0
- package/src/meta/uoi/sports/basketball/type.ts +3 -0
- package/src/meta/uoi/sports/index.ts +4 -0
- package/src/meta/uoi/sports/label.ts +8 -0
- package/src/meta/uoi/sports/tennis/index.ts +2 -0
- package/src/meta/uoi/sports/tennis/label.ts +7 -0
- package/src/meta/uoi/sports/tennis/type.ts +5 -0
- package/src/meta/uoi/sports/type.ts +6 -0
- package/src/meta/uoi/type.ts +3 -0
- package/src/meta/util.ts +25 -0
- package/tsconfig.json +1 -2
package/dist/index.d.mts
CHANGED
|
@@ -302,4 +302,43 @@ declare enum NotificationType {
|
|
|
302
302
|
}
|
|
303
303
|
declare const getNotificationTypeName: (type: NotificationType) => "AddBuddy" | "AcceptBuddy" | "UoiJoinCircle" | "AcceptUoiJoinCircle" | "InviteUoiToCircle" | "AcceptInviteUoiToCircle" | "TeamJoinCircle" | "AcceptTeamJoinCircle" | "InviteTeamToCircle" | "AcceptInviteTeamToCircle" | "AddGameToLeaderboard" | "AcceptAddGameToLeaderboard" | "InviteGameToLeaderboard" | "AcceptInviteGameToLeaderboard" | "CreatePost" | "Unknown";
|
|
304
304
|
|
|
305
|
-
|
|
305
|
+
type AttributeTypeCommon = 'handedness' | 'gender' | 'dob';
|
|
306
|
+
|
|
307
|
+
declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
|
|
308
|
+
|
|
309
|
+
type AttributeTypeUoiSportsTennis = 'level' | 'backhand' | 'handedness';
|
|
310
|
+
|
|
311
|
+
declare const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string>;
|
|
312
|
+
|
|
313
|
+
type AttributeTypeUoiSportsBasketball = 'positions';
|
|
314
|
+
|
|
315
|
+
declare const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<AttributeTypeUoiSportsBasketball, string>;
|
|
316
|
+
|
|
317
|
+
declare const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>>;
|
|
318
|
+
|
|
319
|
+
type AttributeTypeUoiSports = AttributeTypeUoiSportsTennis | AttributeTypeUoiSportsBasketball;
|
|
320
|
+
|
|
321
|
+
declare const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>>;
|
|
322
|
+
|
|
323
|
+
type AttributeTypeUoi = AttributeTypeUoiSports;
|
|
324
|
+
|
|
325
|
+
type AttributeTypeCollectionPets = 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
|
|
326
|
+
|
|
327
|
+
declare const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string>;
|
|
328
|
+
|
|
329
|
+
type AttributeTypeCollection = AttributeTypeCollectionPets;
|
|
330
|
+
|
|
331
|
+
declare const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>>;
|
|
332
|
+
|
|
333
|
+
declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
|
|
334
|
+
|
|
335
|
+
type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
|
|
336
|
+
|
|
337
|
+
declare const getProfileAttributeLabel: ({ profileType, categoryType, interestType, attributeType }: {
|
|
338
|
+
profileType: ProfileType;
|
|
339
|
+
categoryType?: CategoryType;
|
|
340
|
+
interestType?: InterestType;
|
|
341
|
+
attributeType: AttributeType;
|
|
342
|
+
}) => any;
|
|
343
|
+
|
|
344
|
+
export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, ATTRIBUTE_LABEL_COLLECTION_PETS, ATTRIBUTE_LABEL_COMMON, ATTRIBUTE_LABEL_UOI, ATTRIBUTE_LABEL_UOI_SPORTS, ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL, ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS, AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID, getProfileTypeName, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
package/dist/index.d.ts
CHANGED
|
@@ -302,4 +302,43 @@ declare enum NotificationType {
|
|
|
302
302
|
}
|
|
303
303
|
declare const getNotificationTypeName: (type: NotificationType) => "AddBuddy" | "AcceptBuddy" | "UoiJoinCircle" | "AcceptUoiJoinCircle" | "InviteUoiToCircle" | "AcceptInviteUoiToCircle" | "TeamJoinCircle" | "AcceptTeamJoinCircle" | "InviteTeamToCircle" | "AcceptInviteTeamToCircle" | "AddGameToLeaderboard" | "AcceptAddGameToLeaderboard" | "InviteGameToLeaderboard" | "AcceptInviteGameToLeaderboard" | "CreatePost" | "Unknown";
|
|
304
304
|
|
|
305
|
-
|
|
305
|
+
type AttributeTypeCommon = 'handedness' | 'gender' | 'dob';
|
|
306
|
+
|
|
307
|
+
declare const ATTRIBUTE_LABEL_COMMON: Record<AttributeTypeCommon, string>;
|
|
308
|
+
|
|
309
|
+
type AttributeTypeUoiSportsTennis = 'level' | 'backhand' | 'handedness';
|
|
310
|
+
|
|
311
|
+
declare const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Record<AttributeTypeUoiSportsTennis, string>;
|
|
312
|
+
|
|
313
|
+
type AttributeTypeUoiSportsBasketball = 'positions';
|
|
314
|
+
|
|
315
|
+
declare const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Record<AttributeTypeUoiSportsBasketball, string>;
|
|
316
|
+
|
|
317
|
+
declare const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>>;
|
|
318
|
+
|
|
319
|
+
type AttributeTypeUoiSports = AttributeTypeUoiSportsTennis | AttributeTypeUoiSportsBasketball;
|
|
320
|
+
|
|
321
|
+
declare const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryType, any>>;
|
|
322
|
+
|
|
323
|
+
type AttributeTypeUoi = AttributeTypeUoiSports;
|
|
324
|
+
|
|
325
|
+
type AttributeTypeCollectionPets = 'breed' | 'father' | 'mother' | 'gender' | 'height' | 'weight' | 'children';
|
|
326
|
+
|
|
327
|
+
declare const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string>;
|
|
328
|
+
|
|
329
|
+
type AttributeTypeCollection = AttributeTypeCollectionPets;
|
|
330
|
+
|
|
331
|
+
declare const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryType, any>>;
|
|
332
|
+
|
|
333
|
+
declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
|
|
334
|
+
|
|
335
|
+
type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
|
|
336
|
+
|
|
337
|
+
declare const getProfileAttributeLabel: ({ profileType, categoryType, interestType, attributeType }: {
|
|
338
|
+
profileType: ProfileType;
|
|
339
|
+
categoryType?: CategoryType;
|
|
340
|
+
interestType?: InterestType;
|
|
341
|
+
attributeType: AttributeType;
|
|
342
|
+
}) => any;
|
|
343
|
+
|
|
344
|
+
export { ATTRIBUTE_LABEL, ATTRIBUTE_LABEL_COLLECTION, ATTRIBUTE_LABEL_COLLECTION_PETS, ATTRIBUTE_LABEL_COMMON, ATTRIBUTE_LABEL_UOI, ATTRIBUTE_LABEL_UOI_SPORTS, ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL, ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS, AccountStatus, AdminAccountStatus, AttendanceStatus, type AttributeType, type AttributeTypeCollection, type AttributeTypeCollectionPets, type AttributeTypeCommon, type AttributeTypeUoi, type AttributeTypeUoiSports, type AttributeTypeUoiSportsBasketball, type AttributeTypeUoiSportsTennis, AvatarType, BasketballPosition, BuddyingStatus, type CardGamesInterestType, type CategoryType, ChallengeStatus, CollectionMetaStatus, type CollectionType, DuelGameResultType, FollowingStatus, type GameType, Gender, Handedness, type InterestType, LeaderboardType, LengthUnit, LocationType, MarketMetaStatus, type MarketType, MemberingStatus, type MusicInterestType, NotificationType, type PIDPrefixType, PID_LENGTH, PID_PREFIX_LENGTH, PageType, type PetsInterestType, PostPrivacy, PostType, ProfileJoiningType, ProfilePermission, ProfilePrivacy, ProfileStatus, ProfileType, type SportsInterestType, SubjectType, TennisBackhand, TennisLevel, UserPronoun, WeightUnit, getBuddyingStatusName, getMemberingStatusName, getNotificationTypeName, getPIDPrefixByProfileType, getProfileAttributeLabel, getProfileTypeByPID, getProfileTypeName, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
ATTRIBUTE_LABEL: () => ATTRIBUTE_LABEL,
|
|
24
|
+
ATTRIBUTE_LABEL_COLLECTION: () => ATTRIBUTE_LABEL_COLLECTION,
|
|
25
|
+
ATTRIBUTE_LABEL_COLLECTION_PETS: () => ATTRIBUTE_LABEL_COLLECTION_PETS,
|
|
26
|
+
ATTRIBUTE_LABEL_COMMON: () => ATTRIBUTE_LABEL_COMMON,
|
|
27
|
+
ATTRIBUTE_LABEL_UOI: () => ATTRIBUTE_LABEL_UOI,
|
|
28
|
+
ATTRIBUTE_LABEL_UOI_SPORTS: () => ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
29
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: () => ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
30
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: () => ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
23
31
|
AccountStatus: () => AccountStatus,
|
|
24
32
|
AdminAccountStatus: () => AdminAccountStatus,
|
|
25
33
|
AttendanceStatus: () => AttendanceStatus,
|
|
@@ -57,6 +65,7 @@ __export(index_exports, {
|
|
|
57
65
|
getMemberingStatusName: () => getMemberingStatusName,
|
|
58
66
|
getNotificationTypeName: () => getNotificationTypeName,
|
|
59
67
|
getPIDPrefixByProfileType: () => getPIDPrefixByProfileType,
|
|
68
|
+
getProfileAttributeLabel: () => getProfileAttributeLabel,
|
|
60
69
|
getProfileTypeByPID: () => getProfileTypeByPID,
|
|
61
70
|
getProfileTypeName: () => getProfileTypeName,
|
|
62
71
|
isGamePID: () => isGamePID,
|
|
@@ -540,8 +549,86 @@ var getNotificationTypeName = (type) => {
|
|
|
540
549
|
return "Unknown";
|
|
541
550
|
}
|
|
542
551
|
};
|
|
552
|
+
|
|
553
|
+
// src/meta/common/label.ts
|
|
554
|
+
var ATTRIBUTE_LABEL_COMMON = {
|
|
555
|
+
handedness: "Handedness",
|
|
556
|
+
gender: "Gender",
|
|
557
|
+
dob: "Date of Birth"
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
// src/meta/uoi/sports/tennis/label.ts
|
|
561
|
+
var ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS = {
|
|
562
|
+
level: "Level",
|
|
563
|
+
backhand: "Backhand",
|
|
564
|
+
handedness: "Handedness"
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
// src/meta/uoi/sports/basketball/label.ts
|
|
568
|
+
var ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL = {
|
|
569
|
+
positions: "Positions"
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
// src/meta/uoi/sports/label.ts
|
|
573
|
+
var ATTRIBUTE_LABEL_UOI_SPORTS = {
|
|
574
|
+
tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
575
|
+
basketball: ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
// src/meta/uoi/label.ts
|
|
579
|
+
var ATTRIBUTE_LABEL_UOI = {
|
|
580
|
+
sports: ATTRIBUTE_LABEL_UOI_SPORTS
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
// src/meta/collection/pets/label.ts
|
|
584
|
+
var ATTRIBUTE_LABEL_COLLECTION_PETS = {
|
|
585
|
+
breed: "Breed",
|
|
586
|
+
father: "Father",
|
|
587
|
+
mother: "Mother",
|
|
588
|
+
gender: "Gender",
|
|
589
|
+
height: "Height",
|
|
590
|
+
weight: "Weight",
|
|
591
|
+
children: "Children"
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
// src/meta/collection/label.ts
|
|
595
|
+
var ATTRIBUTE_LABEL_COLLECTION = {
|
|
596
|
+
pets: ATTRIBUTE_LABEL_COLLECTION_PETS
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
// src/meta/label.ts
|
|
600
|
+
var ATTRIBUTE_LABEL = {
|
|
601
|
+
[2 /* Uoi */]: ATTRIBUTE_LABEL_UOI,
|
|
602
|
+
[5 /* Collection */]: ATTRIBUTE_LABEL_COLLECTION,
|
|
603
|
+
[0 /* None */]: ATTRIBUTE_LABEL_COMMON
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
// src/meta/util.ts
|
|
607
|
+
var getProfileAttributeLabel = ({
|
|
608
|
+
profileType,
|
|
609
|
+
categoryType,
|
|
610
|
+
interestType,
|
|
611
|
+
attributeType
|
|
612
|
+
}) => {
|
|
613
|
+
let titles = ATTRIBUTE_LABEL[profileType];
|
|
614
|
+
if (categoryType) {
|
|
615
|
+
titles = (titles == null ? void 0 : titles[categoryType]) || {};
|
|
616
|
+
}
|
|
617
|
+
if (interestType) {
|
|
618
|
+
titles = (titles == null ? void 0 : titles[interestType]) || {};
|
|
619
|
+
}
|
|
620
|
+
return (titles == null ? void 0 : titles[attributeType]) || "";
|
|
621
|
+
};
|
|
543
622
|
// Annotate the CommonJS export names for ESM import in node:
|
|
544
623
|
0 && (module.exports = {
|
|
624
|
+
ATTRIBUTE_LABEL,
|
|
625
|
+
ATTRIBUTE_LABEL_COLLECTION,
|
|
626
|
+
ATTRIBUTE_LABEL_COLLECTION_PETS,
|
|
627
|
+
ATTRIBUTE_LABEL_COMMON,
|
|
628
|
+
ATTRIBUTE_LABEL_UOI,
|
|
629
|
+
ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
630
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
631
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
545
632
|
AccountStatus,
|
|
546
633
|
AdminAccountStatus,
|
|
547
634
|
AttendanceStatus,
|
|
@@ -579,6 +666,7 @@ var getNotificationTypeName = (type) => {
|
|
|
579
666
|
getMemberingStatusName,
|
|
580
667
|
getNotificationTypeName,
|
|
581
668
|
getPIDPrefixByProfileType,
|
|
669
|
+
getProfileAttributeLabel,
|
|
582
670
|
getProfileTypeByPID,
|
|
583
671
|
getProfileTypeName,
|
|
584
672
|
isGamePID,
|
package/dist/index.mjs
CHANGED
|
@@ -472,7 +472,85 @@ var getNotificationTypeName = (type) => {
|
|
|
472
472
|
return "Unknown";
|
|
473
473
|
}
|
|
474
474
|
};
|
|
475
|
+
|
|
476
|
+
// src/meta/common/label.ts
|
|
477
|
+
var ATTRIBUTE_LABEL_COMMON = {
|
|
478
|
+
handedness: "Handedness",
|
|
479
|
+
gender: "Gender",
|
|
480
|
+
dob: "Date of Birth"
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
// src/meta/uoi/sports/tennis/label.ts
|
|
484
|
+
var ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS = {
|
|
485
|
+
level: "Level",
|
|
486
|
+
backhand: "Backhand",
|
|
487
|
+
handedness: "Handedness"
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
// src/meta/uoi/sports/basketball/label.ts
|
|
491
|
+
var ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL = {
|
|
492
|
+
positions: "Positions"
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
// src/meta/uoi/sports/label.ts
|
|
496
|
+
var ATTRIBUTE_LABEL_UOI_SPORTS = {
|
|
497
|
+
tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
498
|
+
basketball: ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
// src/meta/uoi/label.ts
|
|
502
|
+
var ATTRIBUTE_LABEL_UOI = {
|
|
503
|
+
sports: ATTRIBUTE_LABEL_UOI_SPORTS
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
// src/meta/collection/pets/label.ts
|
|
507
|
+
var ATTRIBUTE_LABEL_COLLECTION_PETS = {
|
|
508
|
+
breed: "Breed",
|
|
509
|
+
father: "Father",
|
|
510
|
+
mother: "Mother",
|
|
511
|
+
gender: "Gender",
|
|
512
|
+
height: "Height",
|
|
513
|
+
weight: "Weight",
|
|
514
|
+
children: "Children"
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
// src/meta/collection/label.ts
|
|
518
|
+
var ATTRIBUTE_LABEL_COLLECTION = {
|
|
519
|
+
pets: ATTRIBUTE_LABEL_COLLECTION_PETS
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
// src/meta/label.ts
|
|
523
|
+
var ATTRIBUTE_LABEL = {
|
|
524
|
+
[2 /* Uoi */]: ATTRIBUTE_LABEL_UOI,
|
|
525
|
+
[5 /* Collection */]: ATTRIBUTE_LABEL_COLLECTION,
|
|
526
|
+
[0 /* None */]: ATTRIBUTE_LABEL_COMMON
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
// src/meta/util.ts
|
|
530
|
+
var getProfileAttributeLabel = ({
|
|
531
|
+
profileType,
|
|
532
|
+
categoryType,
|
|
533
|
+
interestType,
|
|
534
|
+
attributeType
|
|
535
|
+
}) => {
|
|
536
|
+
let titles = ATTRIBUTE_LABEL[profileType];
|
|
537
|
+
if (categoryType) {
|
|
538
|
+
titles = (titles == null ? void 0 : titles[categoryType]) || {};
|
|
539
|
+
}
|
|
540
|
+
if (interestType) {
|
|
541
|
+
titles = (titles == null ? void 0 : titles[interestType]) || {};
|
|
542
|
+
}
|
|
543
|
+
return (titles == null ? void 0 : titles[attributeType]) || "";
|
|
544
|
+
};
|
|
475
545
|
export {
|
|
546
|
+
ATTRIBUTE_LABEL,
|
|
547
|
+
ATTRIBUTE_LABEL_COLLECTION,
|
|
548
|
+
ATTRIBUTE_LABEL_COLLECTION_PETS,
|
|
549
|
+
ATTRIBUTE_LABEL_COMMON,
|
|
550
|
+
ATTRIBUTE_LABEL_UOI,
|
|
551
|
+
ATTRIBUTE_LABEL_UOI_SPORTS,
|
|
552
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
553
|
+
ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
476
554
|
AccountStatus,
|
|
477
555
|
AdminAccountStatus,
|
|
478
556
|
AttendanceStatus,
|
|
@@ -510,6 +588,7 @@ export {
|
|
|
510
588
|
getMemberingStatusName,
|
|
511
589
|
getNotificationTypeName,
|
|
512
590
|
getPIDPrefixByProfileType,
|
|
591
|
+
getProfileAttributeLabel,
|
|
513
592
|
getProfileTypeByPID,
|
|
514
593
|
getProfileTypeName,
|
|
515
594
|
isGamePID,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AttributeTypeCollectionPets } from './type';
|
|
2
|
+
|
|
3
|
+
export const ATTRIBUTE_LABEL_COLLECTION_PETS: Record<AttributeTypeCollectionPets, string> = {
|
|
4
|
+
breed: 'Breed',
|
|
5
|
+
father: 'Father',
|
|
6
|
+
mother: 'Mother',
|
|
7
|
+
gender: 'Gender',
|
|
8
|
+
height: 'Height',
|
|
9
|
+
weight: 'Weight',
|
|
10
|
+
children: 'Children'
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { ProfileType } from 'src/page';
|
|
3
|
+
import { ATTRIBUTE_LABEL_COLLECTION } from './collection';
|
|
4
|
+
import { ATTRIBUTE_LABEL_COMMON } from './common';
|
|
5
|
+
import { ATTRIBUTE_LABEL_UOI } from './uoi';
|
|
6
|
+
|
|
7
|
+
export const ATTRIBUTE_LABEL:Partial<Record<ProfileType, any>> = {
|
|
8
|
+
[ProfileType.Uoi]: ATTRIBUTE_LABEL_UOI,
|
|
9
|
+
[ProfileType.Collection]: ATTRIBUTE_LABEL_COLLECTION,
|
|
10
|
+
[ProfileType.None]: ATTRIBUTE_LABEL_COMMON,
|
|
11
|
+
};
|
package/src/meta/type.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SportsInterestType } from 'src/interest';
|
|
2
|
+
import { ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL } from './basketball';
|
|
3
|
+
import { ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS } from './tennis';
|
|
4
|
+
|
|
5
|
+
export const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestType, any>> = {
|
|
6
|
+
tennis: ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS,
|
|
7
|
+
basketball: ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL,
|
|
8
|
+
};
|
package/src/meta/util.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CategoryType, InterestType } from 'src/interest';
|
|
2
|
+
import { ProfileType } from 'src/page';
|
|
3
|
+
import { ATTRIBUTE_LABEL } from './label';
|
|
4
|
+
import { AttributeType } from './type';
|
|
5
|
+
|
|
6
|
+
export const getProfileAttributeLabel = ({
|
|
7
|
+
profileType,
|
|
8
|
+
categoryType,
|
|
9
|
+
interestType,
|
|
10
|
+
attributeType
|
|
11
|
+
}:{
|
|
12
|
+
profileType: ProfileType,
|
|
13
|
+
categoryType?: CategoryType,
|
|
14
|
+
interestType?: InterestType,
|
|
15
|
+
attributeType: AttributeType,
|
|
16
|
+
}) => {
|
|
17
|
+
let titles: any = ATTRIBUTE_LABEL[profileType];
|
|
18
|
+
if (categoryType) {
|
|
19
|
+
titles = titles?.[categoryType] || {};
|
|
20
|
+
}
|
|
21
|
+
if (interestType) {
|
|
22
|
+
titles = titles?.[interestType] || {};
|
|
23
|
+
}
|
|
24
|
+
return titles?.[attributeType as any] || '';
|
|
25
|
+
};
|
package/tsconfig.json
CHANGED
|
@@ -27,9 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
/* Modules */
|
|
29
29
|
"module": "commonjs", /* Specify what module code is generated. */
|
|
30
|
-
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
31
30
|
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
32
|
-
|
|
31
|
+
"baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
33
32
|
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
34
33
|
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
35
34
|
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|