math-main-components 0.0.47 → 0.0.49
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/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/types/Category.d.ts +12 -0
- package/dist/types/Concept.d.ts +6 -0
- package/dist/types/Content.d.ts +14 -0
- package/dist/types/Course.d.ts +15 -0
- package/dist/types/CourseAnnouncement.d.ts +13 -0
- package/dist/types/CourseAnnouncementAssset.d.ts +21 -0
- package/dist/types/CourseMessage.d.ts +11 -0
- package/dist/types/CourseParticipant.d.ts +9 -0
- package/dist/types/CoursePin.d.ts +8 -0
- package/dist/types/File.d.ts +13 -0
- package/dist/types/HelpData.d.ts +7 -0
- package/dist/types/LicenseKey.d.ts +12 -0
- package/dist/types/Manager.d.ts +16 -0
- package/dist/types/Material.d.ts +17 -0
- package/dist/types/Organization.d.ts +15 -0
- package/dist/types/OrganizationMember.d.ts +12 -0
- package/dist/types/Page.d.ts +8 -0
- package/dist/types/Product.d.ts +16 -0
- package/dist/types/ProductFeature.d.ts +7 -0
- package/dist/types/PublicUser.d.ts +7 -0
- package/dist/types/Subscription.d.ts +33 -0
- package/dist/types/UploadSignature.d.ts +4 -0
- package/dist/types/Usage.d.ts +5 -0
- package/dist/types/User.d.ts +25 -0
- package/dist/types/marketing/BenefitForIndividuals.d.ts +8 -0
- package/dist/types/marketing/BenefitForSchools.d.ts +8 -0
- package/dist/types/marketing/Feature.d.ts +8 -0
- package/dist/types/marketing/FooterLink.d.ts +6 -0
- package/dist/types/marketing/News.d.ts +13 -0
- package/dist/types/marketing/Pricing.d.ts +16 -0
- package/dist/types/marketing/WebsiteData.d.ts +16 -0
- package/package.json +6 -2
@@ -1,7 +1,7 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { ChangeEvent, ReactNode } from 'react';
|
2
2
|
export declare function Checkbox({ text, name, defaultChecked, onInput, }: {
|
3
3
|
text: ReactNode;
|
4
4
|
name: string;
|
5
|
-
onInput?: (event:
|
5
|
+
onInput?: (event: ChangeEvent<HTMLInputElement>) => void;
|
6
6
|
defaultChecked?: boolean;
|
7
7
|
}): React.JSX.Element;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export interface Category {
|
2
|
+
_id: string;
|
3
|
+
title: string;
|
4
|
+
isTopLevel: boolean;
|
5
|
+
hasEBooks: boolean;
|
6
|
+
hasMovies: boolean;
|
7
|
+
hasWhy: boolean;
|
8
|
+
hasCalculators: boolean;
|
9
|
+
hasPoster: boolean;
|
10
|
+
childrenCategories: Category[];
|
11
|
+
relatedCategories: Category[];
|
12
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { PortableTextBlock } from "sanity";
|
2
|
+
export interface Content {
|
3
|
+
priority: number;
|
4
|
+
title: string;
|
5
|
+
subtitle: string;
|
6
|
+
iconName: string;
|
7
|
+
description: PortableTextBlock[];
|
8
|
+
contentBuckets: Array<ContentBucket>;
|
9
|
+
}
|
10
|
+
export interface ContentBucket {
|
11
|
+
title: string;
|
12
|
+
description: string;
|
13
|
+
bucket: string;
|
14
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { CourseParticipant } from "./CourseParticipant";
|
2
|
+
import { Organization } from "./Organization";
|
3
|
+
import { User } from "./User";
|
4
|
+
export interface Course {
|
5
|
+
id: string;
|
6
|
+
title: string;
|
7
|
+
content: Object;
|
8
|
+
userId: string;
|
9
|
+
user?: User;
|
10
|
+
organizationId: string;
|
11
|
+
organization: Organization;
|
12
|
+
courseParticipant: CourseParticipant[];
|
13
|
+
createdAt: string;
|
14
|
+
updatedAt: string;
|
15
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Course } from "./Course";
|
2
|
+
import { CourseAnnouncementAsset } from "./CourseAnnouncementAssset";
|
3
|
+
import { User } from "./User";
|
4
|
+
export interface CourseAnnouncement {
|
5
|
+
id: string;
|
6
|
+
author: User;
|
7
|
+
authorId: string;
|
8
|
+
course: Course;
|
9
|
+
courseId: string;
|
10
|
+
message: string;
|
11
|
+
CourseAnnouncementAsset: CourseAnnouncementAsset[];
|
12
|
+
createdAt: Date;
|
13
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export declare enum CourseAnnouncementAssetType {
|
2
|
+
file = "file",
|
3
|
+
calculator = "calculator",
|
4
|
+
video = "video",
|
5
|
+
material = "material",
|
6
|
+
ebook = "ebook",
|
7
|
+
test = "test",
|
8
|
+
link = "link"
|
9
|
+
}
|
10
|
+
export interface CourseAnnouncementAsset {
|
11
|
+
id?: string;
|
12
|
+
type: CourseAnnouncementAssetType;
|
13
|
+
link: string;
|
14
|
+
text: string;
|
15
|
+
file?: File;
|
16
|
+
fileName?: string;
|
17
|
+
fileType?: string;
|
18
|
+
fileId?: string;
|
19
|
+
fileExpire?: Date;
|
20
|
+
fileSize?: number;
|
21
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export interface S3File {
|
2
|
+
fileId: string;
|
3
|
+
updatedAt: Date;
|
4
|
+
title: string;
|
5
|
+
description: string;
|
6
|
+
category: S3FileCategory;
|
7
|
+
}
|
8
|
+
export declare enum S3FileCategory {
|
9
|
+
movies = "movies",
|
10
|
+
materials = "materials",
|
11
|
+
ebooks = "ebooks",
|
12
|
+
default = "file"
|
13
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export interface Manager {
|
2
|
+
id: string;
|
3
|
+
username: string;
|
4
|
+
firstName: string;
|
5
|
+
lastName: string;
|
6
|
+
permissions: string[];
|
7
|
+
createdAt: Date;
|
8
|
+
updateAt: Date;
|
9
|
+
}
|
10
|
+
export declare enum ManagerPermission {
|
11
|
+
content = "content",
|
12
|
+
subsription = "subscription",
|
13
|
+
manager = "manager",
|
14
|
+
license = "license",
|
15
|
+
file = "file"
|
16
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Category } from "./Category";
|
2
|
+
export interface Material {
|
3
|
+
_id: string;
|
4
|
+
title: string;
|
5
|
+
fileId: string;
|
6
|
+
fileExpire?: string;
|
7
|
+
fileUrl?: string;
|
8
|
+
fileType: string;
|
9
|
+
description: string;
|
10
|
+
previewImage: {
|
11
|
+
asset: {
|
12
|
+
_ref: string;
|
13
|
+
_type: string;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
categories: Category[];
|
17
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export interface Organization {
|
2
|
+
id: string;
|
3
|
+
name: string;
|
4
|
+
website: string;
|
5
|
+
place: string;
|
6
|
+
addressLine1: string;
|
7
|
+
addressLine2: string;
|
8
|
+
postcode: string;
|
9
|
+
state: string;
|
10
|
+
country: string;
|
11
|
+
level: string;
|
12
|
+
iconId: string;
|
13
|
+
iconUrl: string;
|
14
|
+
iconExpire: Date;
|
15
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Organization } from "./Organization";
|
2
|
+
import { User } from "./User";
|
3
|
+
export interface OrganizationMember {
|
4
|
+
id: string;
|
5
|
+
role: string;
|
6
|
+
createdAt: string;
|
7
|
+
updatedAt: string;
|
8
|
+
user: User;
|
9
|
+
userId: string;
|
10
|
+
organization: Organization;
|
11
|
+
organizationId: string;
|
12
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export interface Product {
|
2
|
+
_id: string;
|
3
|
+
title: string;
|
4
|
+
combinable: boolean;
|
5
|
+
enabled: boolean;
|
6
|
+
description: any;
|
7
|
+
unitPriceEuro: number;
|
8
|
+
recurringInterval: 'weekly' | 'monthly' | 'yearly';
|
9
|
+
trialPeriodDays: number;
|
10
|
+
minQuantity: number;
|
11
|
+
createdAt: string;
|
12
|
+
updatedAt: string;
|
13
|
+
features: any;
|
14
|
+
stripePriceId: string;
|
15
|
+
stripeProductId: string;
|
16
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import Stripe from "stripe";
|
2
|
+
import { Organization } from "./Organization";
|
3
|
+
import { Product } from "./Product";
|
4
|
+
import { User } from "./User";
|
5
|
+
export interface SubscriptionFeature {
|
6
|
+
limit: number;
|
7
|
+
isUnlimited: boolean;
|
8
|
+
type: string;
|
9
|
+
}
|
10
|
+
export interface Subscription {
|
11
|
+
id: string;
|
12
|
+
organization?: Organization;
|
13
|
+
organizationId: string;
|
14
|
+
product?: Product;
|
15
|
+
productId: string;
|
16
|
+
user?: User;
|
17
|
+
userId: string;
|
18
|
+
features?: SubscriptionFeature[];
|
19
|
+
currentPeriodPaid: boolean;
|
20
|
+
lastPeriodPaid: boolean;
|
21
|
+
cancelAtPeriodEnd: boolean;
|
22
|
+
currentPeriodStart: string;
|
23
|
+
currentPeriodEnd: string;
|
24
|
+
status: string;
|
25
|
+
quantity: number;
|
26
|
+
newQuantity: number;
|
27
|
+
trialEnd: string;
|
28
|
+
recurringInterval: string;
|
29
|
+
stripeSubscriptionId: string;
|
30
|
+
stripeSubscription: Stripe.Subscription;
|
31
|
+
stripePaymentMethod: Stripe.PaymentMethod;
|
32
|
+
notes: string[];
|
33
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { Course } from "./Course";
|
2
|
+
import { Organization } from "./Organization";
|
3
|
+
export interface User {
|
4
|
+
id: string;
|
5
|
+
email: string;
|
6
|
+
username: string;
|
7
|
+
firstName: string;
|
8
|
+
lastName: string;
|
9
|
+
newsletterEnabled: boolean;
|
10
|
+
initialPassword: string;
|
11
|
+
isPasswordEnabled: boolean;
|
12
|
+
emailVerified: boolean;
|
13
|
+
profileImageUrl: string;
|
14
|
+
settings: Object;
|
15
|
+
role: string;
|
16
|
+
courses: Course[];
|
17
|
+
appNotifications: Object;
|
18
|
+
emailNotifications: Object;
|
19
|
+
stripeCustomerId: string;
|
20
|
+
createdAt: string;
|
21
|
+
updatedAt: string;
|
22
|
+
organization: Organization;
|
23
|
+
organizationId: string;
|
24
|
+
organizationRole: string;
|
25
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { PortableTextBlock } from "sanity";
|
2
|
+
export interface News {
|
3
|
+
visible: boolean;
|
4
|
+
headline: string;
|
5
|
+
slug: {
|
6
|
+
current: string;
|
7
|
+
};
|
8
|
+
date: string;
|
9
|
+
image: string;
|
10
|
+
content: PortableTextBlock[];
|
11
|
+
short: PortableTextBlock[];
|
12
|
+
type: 'press' | 'update' | 'short';
|
13
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Product } from "../Product";
|
2
|
+
import { ProductFeature } from "../ProductFeature";
|
3
|
+
export interface Pricing {
|
4
|
+
_id: string;
|
5
|
+
title: string;
|
6
|
+
position: PricingPosition;
|
7
|
+
limitation: string;
|
8
|
+
subtitle: string;
|
9
|
+
slogan: string;
|
10
|
+
recommended: boolean;
|
11
|
+
features: ProductFeature[];
|
12
|
+
buttonText: string;
|
13
|
+
product: Product;
|
14
|
+
}
|
15
|
+
type PricingPosition = 'personal-left' | 'personal-right' | 'schools-left' | 'schools-right';
|
16
|
+
export {};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export interface WebsiteData {
|
2
|
+
heroDescription: string;
|
3
|
+
heroTitle: string;
|
4
|
+
title: string;
|
5
|
+
copyright: string;
|
6
|
+
footerLeftColumn: string;
|
7
|
+
footerMiddleColumn: string;
|
8
|
+
footerRightColumn: string;
|
9
|
+
textBelowSchoolPricing: [];
|
10
|
+
defaultPersonalProduct: {
|
11
|
+
_ref: string;
|
12
|
+
};
|
13
|
+
defaultOrganizationProduct: {
|
14
|
+
_ref: string;
|
15
|
+
};
|
16
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "math-main-components",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.49",
|
4
4
|
"author": "Emilian Scheel",
|
5
5
|
"files": [
|
6
6
|
"dist/**/*"
|
@@ -41,5 +41,9 @@
|
|
41
41
|
"build:js": "rollup -c",
|
42
42
|
"build:types": "tsc --emitDeclarationOnly --outDir dist"
|
43
43
|
},
|
44
|
-
"dependencies": {
|
44
|
+
"dependencies": {
|
45
|
+
"@sanity/types": "^3.20.1",
|
46
|
+
"sanity": "^3.20.1",
|
47
|
+
"stripe": "^14.5.0"
|
48
|
+
}
|
45
49
|
}
|