wafields 0.3.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.
Files changed (81) hide show
  1. package/README.md +2 -0
  2. package/dist/attributes/components/AttributeField.d.ts +13 -0
  3. package/dist/attributes/components/AttributeUnspecified.d.ts +1 -0
  4. package/dist/attributes/components/AttributeUpdater.d.ts +10 -0
  5. package/dist/attributes/components/index.d.ts +5 -0
  6. package/dist/attributes/components/profile/common/gender/AttributeCommonGenderDisplay.d.ts +4 -0
  7. package/dist/attributes/components/profile/common/gender/AttributeCommonGenderEdit.d.ts +4 -0
  8. package/dist/attributes/components/profile/common/gender/AttributeCommonGenderField.d.ts +4 -0
  9. package/dist/attributes/components/profile/common/gender/index.d.ts +2 -0
  10. package/dist/attributes/components/profile/common/gender/util.d.ts +6 -0
  11. package/dist/attributes/components/profile/common/handedness/AttributeCommonHandednessDisplay.d.ts +4 -0
  12. package/dist/attributes/components/profile/common/handedness/AttributeCommonHandednessEdit.d.ts +4 -0
  13. package/dist/attributes/components/profile/common/handedness/AttributeCommonHandednessField.d.ts +4 -0
  14. package/dist/attributes/components/profile/common/handedness/index.d.ts +3 -0
  15. package/dist/attributes/components/profile/common/handedness/util.d.ts +10 -0
  16. package/dist/attributes/components/profile/common/index.d.ts +2 -0
  17. package/dist/attributes/components/profile/index.d.ts +3 -0
  18. package/dist/attributes/components/profile/uoi/index.d.ts +1 -0
  19. package/dist/attributes/components/profile/uoi/sports/index.d.ts +1 -0
  20. package/dist/attributes/components/profile/uoi/sports/tennis/backhand/AttributeUoiTennisBackhandDisplay.d.ts +3 -0
  21. package/dist/attributes/components/profile/uoi/sports/tennis/backhand/AttributeUoiTennisBackhandEdit.d.ts +4 -0
  22. package/dist/attributes/components/profile/uoi/sports/tennis/backhand/index.d.ts +2 -0
  23. package/dist/attributes/components/profile/uoi/sports/tennis/backhand/util.d.ts +11 -0
  24. package/dist/attributes/components/profile/uoi/sports/tennis/index.d.ts +2 -0
  25. package/dist/attributes/components/profile/uoi/sports/tennis/level/AttributeUoiTennisLevelDisplay.d.ts +3 -0
  26. package/dist/attributes/components/profile/uoi/sports/tennis/level/AttributeUoiTennisLevelEdit.d.ts +3 -0
  27. package/dist/attributes/components/profile/uoi/sports/tennis/level/index.d.ts +2 -0
  28. package/dist/attributes/components/profile/uoi/sports/tennis/level/util.d.ts +17 -0
  29. package/dist/attributes/components/profile/user/index.d.ts +1 -0
  30. package/dist/attributes/components/profile/user/pronoun/PronounDisplay.d.ts +4 -0
  31. package/dist/attributes/components/profile/user/pronoun/PronounPicker.d.ts +4 -0
  32. package/dist/attributes/components/profile/user/pronoun/index.d.ts +2 -0
  33. package/dist/attributes/components/profile/user/pronoun/util.d.ts +6 -0
  34. package/dist/attributes/components/util.d.ts +11 -0
  35. package/dist/attributes/constants/collection/index.d.ts +3 -0
  36. package/dist/attributes/constants/collection/label.d.ts +2 -0
  37. package/dist/attributes/constants/collection/pets/index.d.ts +1 -0
  38. package/dist/attributes/constants/collection/pets/type.d.ts +10 -0
  39. package/dist/attributes/constants/collection/type.d.ts +2 -0
  40. package/dist/attributes/constants/common/index.d.ts +2 -0
  41. package/dist/attributes/constants/common/label.d.ts +2 -0
  42. package/dist/attributes/constants/common/type.d.ts +4 -0
  43. package/dist/attributes/constants/index.d.ts +6 -0
  44. package/dist/attributes/constants/label.d.ts +2 -0
  45. package/dist/attributes/constants/type.d.ts +4 -0
  46. package/dist/attributes/constants/uoi/index.d.ts +3 -0
  47. package/dist/attributes/constants/uoi/label.d.ts +2 -0
  48. package/dist/attributes/constants/uoi/sports/basketball/index.d.ts +2 -0
  49. package/dist/attributes/constants/uoi/sports/basketball/label.d.ts +2 -0
  50. package/dist/attributes/constants/uoi/sports/basketball/type.d.ts +3 -0
  51. package/dist/attributes/constants/uoi/sports/index.d.ts +4 -0
  52. package/dist/attributes/constants/uoi/sports/label.d.ts +2 -0
  53. package/dist/attributes/constants/uoi/sports/tennis/index.d.ts +2 -0
  54. package/dist/attributes/constants/uoi/sports/tennis/label.d.ts +2 -0
  55. package/dist/attributes/constants/uoi/sports/tennis/type.d.ts +4 -0
  56. package/dist/attributes/constants/uoi/sports/type.d.ts +3 -0
  57. package/dist/attributes/constants/uoi/type.d.ts +2 -0
  58. package/dist/attributes/constants/util.d.ts +8 -0
  59. package/dist/attributes/index.d.ts +2 -0
  60. package/dist/index-DOMGuu4c.mjs +44338 -0
  61. package/dist/index-gs6n0WKD.js +375 -0
  62. package/dist/index.d.ts +2 -0
  63. package/dist/main/components/PagePID.d.ts +5 -0
  64. package/dist/main/components/index.d.ts +3 -0
  65. package/dist/main/components/post/index.d.ts +1 -0
  66. package/dist/main/components/post/privacy/PostPrivacyDisplay.d.ts +4 -0
  67. package/dist/main/components/post/privacy/PostPrivacyEdit.d.ts +4 -0
  68. package/dist/main/components/post/privacy/index.d.ts +2 -0
  69. package/dist/main/components/post/privacy/util.d.ts +6 -0
  70. package/dist/main/components/profile/index.d.ts +1 -0
  71. package/dist/main/components/profile/privacy/ProfilePrivacyDisplay.d.ts +4 -0
  72. package/dist/main/components/profile/privacy/ProfilePrivacyEdit.d.ts +4 -0
  73. package/dist/main/components/profile/privacy/index.d.ts +2 -0
  74. package/dist/main/components/profile/privacy/util.d.ts +6 -0
  75. package/dist/main/index.d.ts +1 -0
  76. package/dist/mapbox-gl-BhYwNP0S-DWucTnVq.js +2986 -0
  77. package/dist/mapbox-gl-BhYwNP0S-V8rnqmTY.mjs +35566 -0
  78. package/dist/wafields.cjs.js +1 -0
  79. package/dist/wafields.css +1 -0
  80. package/dist/wafields.es.js +34 -0
  81. package/package.json +70 -0
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # wafields
2
+ attributes components and utils
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ import { CategoryName, InterestName, ProfileType } from 'wenum';
3
+ import { AttributeType } from '../constants';
4
+ interface AttributeFieldProps {
5
+ profileType: ProfileType;
6
+ categoryName?: CategoryName;
7
+ interestName?: InterestName;
8
+ attributeType: AttributeType;
9
+ className?: string;
10
+ value: ReactNode;
11
+ }
12
+ declare function AttributeField({ profileType, categoryName, interestName, attributeType, className, value }: AttributeFieldProps): import("react/jsx-runtime").JSX.Element;
13
+ export default AttributeField;
@@ -0,0 +1 @@
1
+ export default function AttributeUnspecified(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { ElementType } from 'react';
2
+ interface AttributeUpdaterProps {
3
+ label: string;
4
+ value: any;
5
+ onSave: (v: any) => void;
6
+ AttributeEdit: ElementType;
7
+ AttributeDisplay: ElementType;
8
+ }
9
+ declare function AttributeUpdater({ label, value: valueInit, onSave, AttributeEdit, AttributeDisplay }: AttributeUpdaterProps): import("react/jsx-runtime").JSX.Element;
10
+ export default AttributeUpdater;
@@ -0,0 +1,5 @@
1
+ export { default as AttributeUpdater } from './AttributeUpdater';
2
+ export { default as AttributeField } from './AttributeField';
3
+ export { default as AttributeUnspecified } from './AttributeUnspecified';
4
+ export * from './profile';
5
+ export * from './util';
@@ -0,0 +1,4 @@
1
+ import { Gender } from 'wenum';
2
+ import { AttributeDisplayProps } from '../../../..';
3
+ declare function AttributeCommonGenderDisplay({ value }: AttributeDisplayProps<Gender>): import("react/jsx-runtime").JSX.Element;
4
+ export default AttributeCommonGenderDisplay;
@@ -0,0 +1,4 @@
1
+ import { Gender } from 'wenum';
2
+ import { AttributeEditProps } from '../../../..';
3
+ declare function AttributeCommonGenderEdit({ onChange, className, value }: AttributeEditProps<Gender>): import("react/jsx-runtime").JSX.Element;
4
+ export default AttributeCommonGenderEdit;
@@ -0,0 +1,4 @@
1
+ import { Gender } from 'wenum';
2
+ import { AttributeFieldProps } from '../../../..';
3
+ declare function AttributeCommonGenderField({ value }: AttributeFieldProps<Gender>): import("react/jsx-runtime").JSX.Element;
4
+ export default AttributeCommonGenderField;
@@ -0,0 +1,2 @@
1
+ export { default as AttributeCommonGenderEdit } from './AttributeCommonGenderEdit';
2
+ export { default as AttributeCommonGenderDisplay } from './AttributeCommonGenderDisplay';
@@ -0,0 +1,6 @@
1
+ import { Gender } from 'wenum';
2
+ export declare const GenderLabel: Record<Gender, string>;
3
+ export declare const genderOptions: {
4
+ value: Gender;
5
+ label: string;
6
+ }[];
@@ -0,0 +1,4 @@
1
+ import { Handedness } from 'wenum';
2
+ import { AttributeDisplayProps } from '../../../..';
3
+ declare function AttributeCommonHandednessDisplay({ value }: AttributeDisplayProps<Handedness>): import("react/jsx-runtime").JSX.Element;
4
+ export default AttributeCommonHandednessDisplay;
@@ -0,0 +1,4 @@
1
+ import { Handedness } from 'wenum';
2
+ import { AttributeEditProps } from '../../../..';
3
+ declare function AttributeCommonHandednessEdit({ onChange, className, value }: AttributeEditProps<Handedness>): import("react/jsx-runtime").JSX.Element;
4
+ export default AttributeCommonHandednessEdit;
@@ -0,0 +1,4 @@
1
+ import { Handedness } from 'wenum';
2
+ import { AttributeFieldProps } from '../../../..';
3
+ declare function AttributeCommonHandednessField({ value }: AttributeFieldProps<Handedness>): import("react/jsx-runtime").JSX.Element;
4
+ export default AttributeCommonHandednessField;
@@ -0,0 +1,3 @@
1
+ export { default as AttributeCommonHandednessEdit } from './AttributeCommonHandednessEdit';
2
+ export { default as AttributeCommonHandednessDisplay } from './AttributeCommonHandednessDisplay';
3
+ export { default as AttributeCommonHandednessField } from './AttributeCommonHandednessField';
@@ -0,0 +1,10 @@
1
+ import { Handedness } from 'wenum';
2
+ export declare const HandednessLabel: {
3
+ 0: string;
4
+ 1: string;
5
+ 2: string;
6
+ };
7
+ export declare const handednessOptions: {
8
+ value: Handedness;
9
+ label: string;
10
+ }[];
@@ -0,0 +1,2 @@
1
+ export * from './gender';
2
+ export * from './handedness';
@@ -0,0 +1,3 @@
1
+ export * from './user';
2
+ export * from './common';
3
+ export * from './uoi';
@@ -0,0 +1 @@
1
+ export * from './sports';
@@ -0,0 +1 @@
1
+ export * from './tennis';
@@ -0,0 +1,3 @@
1
+ import { TennisBackhand } from 'wenum';
2
+ import { AttributeDisplayProps } from '../../../../../..';
3
+ export default function AttributeUoiTennisBackhandDisplay({ value }: AttributeDisplayProps<TennisBackhand>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { TennisBackhand } from 'wenum';
2
+ import { AttributeEditProps } from '../../../../../..';
3
+ declare function AttributeUoiTennisBackhandEdit({ onChange, className, value }: AttributeEditProps<TennisBackhand>): import("react/jsx-runtime").JSX.Element;
4
+ export default AttributeUoiTennisBackhandEdit;
@@ -0,0 +1,2 @@
1
+ export { default as AttributeUoiTennisBackhandEdit } from './AttributeUoiTennisBackhandEdit';
2
+ export { default as AttributeUoiTennisBackhandDisplay } from './AttributeUoiTennisBackhandDisplay';
@@ -0,0 +1,11 @@
1
+ import { TennisBackhand } from 'wenum';
2
+ export declare const TennisBackhandLabel: {
3
+ 1: string;
4
+ 2: string;
5
+ 3: string;
6
+ 0: string;
7
+ };
8
+ export declare const tennisBackhandOptions: {
9
+ value: TennisBackhand;
10
+ label: string;
11
+ }[];
@@ -0,0 +1,2 @@
1
+ export * from './backhand';
2
+ export * from './level';
@@ -0,0 +1,3 @@
1
+ import { TennisLevel } from 'wenum';
2
+ import { AttributeDisplayProps } from '../../../../../..';
3
+ export default function AttributeUoiTennisLevelDisplay({ value }: AttributeDisplayProps<TennisLevel>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { TennisLevel } from 'wenum';
2
+ import { AttributeEditProps } from '../../../../../..';
3
+ export default function AttributeUoiTennisLevelEdit({ onChange, className, value }: AttributeEditProps<TennisLevel>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default as AttributeUoiTennisLevelEdit } from './AttributeUoiTennisLevelEdit';
2
+ export { default as AttributeUoiTennisLevelDisplay } from './AttributeUoiTennisLevelDisplay';
@@ -0,0 +1,17 @@
1
+ import { TennisLevel } from 'wenum';
2
+ export declare const TennisLevelLabels: {
3
+ 0: string;
4
+ 1: string;
5
+ 2: string;
6
+ 3: string;
7
+ 4: string;
8
+ 5: string;
9
+ 6: string;
10
+ 7: string;
11
+ 8: string;
12
+ 9: string;
13
+ };
14
+ export declare const tennisLevelOptions: {
15
+ value: TennisLevel;
16
+ label: string;
17
+ }[];
@@ -0,0 +1 @@
1
+ export * from './pronoun';
@@ -0,0 +1,4 @@
1
+ import { Pronoun } from 'wenum';
2
+ import { AttributeDisplayProps } from '../../../..';
3
+ declare function PronounDisplay({ value }: AttributeDisplayProps<Pronoun>): import("react/jsx-runtime").JSX.Element | null;
4
+ export default PronounDisplay;
@@ -0,0 +1,4 @@
1
+ import { Pronoun } from 'wenum';
2
+ import { AttributeEditProps } from '../../../..';
3
+ declare function PronounPicker({ onChange, className, value }: AttributeEditProps<Pronoun>): import("react/jsx-runtime").JSX.Element;
4
+ export default PronounPicker;
@@ -0,0 +1,2 @@
1
+ export { default as PronounPicker } from './PronounPicker';
2
+ export { default as PronounDisplay } from './PronounDisplay';
@@ -0,0 +1,6 @@
1
+ import { Pronoun } from 'wenum';
2
+ export declare const PronounLabel: Record<Pronoun, string>;
3
+ export declare const pronounOptions: {
4
+ value: Pronoun;
5
+ label: string;
6
+ }[];
@@ -0,0 +1,11 @@
1
+ export interface AttributeEditProps<T> {
2
+ value: T;
3
+ onChange: (value: T) => void;
4
+ className?: string;
5
+ }
6
+ export interface AttributeDisplayProps<T> {
7
+ value: T;
8
+ }
9
+ export interface AttributeFieldProps<T> {
10
+ value: T;
11
+ }
@@ -0,0 +1,3 @@
1
+ export * from './pets';
2
+ export * from './type';
3
+ export * from './label';
@@ -0,0 +1,2 @@
1
+ import { CategoryName } from 'wenum';
2
+ export declare const ATTRIBUTE_LABEL_COLLECTION: Partial<Record<CategoryName, any>>;
@@ -0,0 +1 @@
1
+ export * from './type';
@@ -0,0 +1,10 @@
1
+ export declare enum AttributeTypeCollectionPets {
2
+ Breed = 0,
3
+ Dob = 1,
4
+ Father = 2,
5
+ Mother = 3,
6
+ Gender = 4,
7
+ Height = 5,
8
+ Weight = 6,
9
+ Children = 7
10
+ }
@@ -0,0 +1,2 @@
1
+ import { AttributeTypeCollectionPets } from './pets';
2
+ export type AttributeTypeCollection = AttributeTypeCollectionPets;
@@ -0,0 +1,2 @@
1
+ export * from './label';
2
+ export * from './type';
@@ -0,0 +1,2 @@
1
+ import { AttributeTypeCommon } from './type';
2
+ export declare const ATTRIBUTE_LABEL_COMMON: Partial<Record<AttributeTypeCommon, any>>;
@@ -0,0 +1,4 @@
1
+ export declare enum AttributeTypeCommon {
2
+ Handedness = 0,
3
+ Gender = 1
4
+ }
@@ -0,0 +1,6 @@
1
+ export * from './common';
2
+ export * from './uoi';
3
+ export * from './collection';
4
+ export * from './label';
5
+ export * from './type';
6
+ export * from './util';
@@ -0,0 +1,2 @@
1
+ import { ProfileType } from 'wenum';
2
+ export declare const ATTRIBUTE_LABEL: Partial<Record<ProfileType, any>>;
@@ -0,0 +1,4 @@
1
+ import { AttributeTypeCollection } from './collection';
2
+ import { AttributeTypeCommon } from './common';
3
+ import { AttributeTypeUoi } from './uoi';
4
+ export type AttributeType = AttributeTypeUoi | AttributeTypeCollection | AttributeTypeCommon;
@@ -0,0 +1,3 @@
1
+ export * from './sports';
2
+ export * from './label';
3
+ export * from './type';
@@ -0,0 +1,2 @@
1
+ import { CategoryName } from 'wenum';
2
+ export declare const ATTRIBUTE_LABEL_UOI: Partial<Record<CategoryName, any>>;
@@ -0,0 +1,2 @@
1
+ export * from './label';
2
+ export * from './type';
@@ -0,0 +1,2 @@
1
+ import { AttributeTypeUoiSportsBasketball } from './type';
2
+ export declare const ATTRIBUTE_LABEL_UOI_SPORTS_BASKETBALL: Partial<Record<AttributeTypeUoiSportsBasketball, any>>;
@@ -0,0 +1,3 @@
1
+ export declare enum AttributeTypeUoiSportsBasketball {
2
+ Positions = 0
3
+ }
@@ -0,0 +1,4 @@
1
+ export * from './tennis';
2
+ export * from './basketball';
3
+ export * from './label';
4
+ export * from './type';
@@ -0,0 +1,2 @@
1
+ import { SportsInterestName } from 'wenum';
2
+ export declare const ATTRIBUTE_LABEL_UOI_SPORTS: Partial<Record<SportsInterestName, any>>;
@@ -0,0 +1,2 @@
1
+ export * from './label';
2
+ export * from './type';
@@ -0,0 +1,2 @@
1
+ import { AttributeTypeUoiSportsTennis } from './type';
2
+ export declare const ATTRIBUTE_LABEL_UOI_SPORTS_TENNIS: Partial<Record<AttributeTypeUoiSportsTennis, any>>;
@@ -0,0 +1,4 @@
1
+ export declare enum AttributeTypeUoiSportsTennis {
2
+ Level = 0,
3
+ Backhand = 1
4
+ }
@@ -0,0 +1,3 @@
1
+ import { AttributeTypeUoiSportsBasketball } from './basketball/type';
2
+ import { AttributeTypeUoiSportsTennis } from './tennis/type';
3
+ export type AttributeTypeUoiSports = AttributeTypeUoiSportsTennis | AttributeTypeUoiSportsBasketball;
@@ -0,0 +1,2 @@
1
+ import { AttributeTypeUoiSports } from './sports';
2
+ export type AttributeTypeUoi = AttributeTypeUoiSports;
@@ -0,0 +1,8 @@
1
+ import { CategoryName, InterestName, ProfileType } from 'wenum';
2
+ import { AttributeType } from './type';
3
+ export declare const getProfileAttributeLabel: ({ profileType, categoryName, interestName, attributeType }: {
4
+ profileType: ProfileType;
5
+ categoryName?: CategoryName;
6
+ interestName?: InterestName;
7
+ attributeType: AttributeType;
8
+ }) => any;
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export * from './constants';