@candulabs/core
Advanced tools
Comparing version 0.8.0-alpha.12 to 0.8.0-alpha.13
@@ -6,2 +6,10 @@ # Change Log | ||
# 0.8.0-alpha.13 (2021-07-15) | ||
**Note:** Version bump only for package @candulabs/core | ||
# 0.8.0-alpha.12 (2021-07-09) | ||
@@ -8,0 +16,0 @@ |
@@ -8,4 +8,4 @@ import { CheckListItemStatus } from '../models'; | ||
export declare type ItemStates = Record<string, ItemState>; | ||
export declare const getFirstNotStartedItem: (items: Record<string, ItemState>, totalItems: number) => number | undefined; | ||
export declare const calculateGroupCompletion: (items: Record<string, ItemState>, totalItems: number) => { | ||
export declare const getFirstNotStartedItem: (items: ItemStates, totalItems: number) => number | undefined; | ||
export declare const calculateGroupCompletion: (items: ItemStates, totalItems: number) => { | ||
completedItems: number; | ||
@@ -18,3 +18,3 @@ percComplete: number; | ||
*/ | ||
export declare const getInitialItems: (providers: StateProviderInstance<CheckListResolverInstance>[]) => Record<string, ItemState>; | ||
export declare const getInitialItems: (providers: StateProviderInstance<CheckListResolverInstance>[]) => ItemStates; | ||
export {}; |
import { FetchState } from '../../store'; | ||
import { ContentDocument } from '../../models'; | ||
export declare const contentFlux: import("../../store").Flux<Record<string, FetchState<ContentDocument>>>; | ||
declare type ContentState = Record<string, FetchState<ContentDocument>>; | ||
export declare const contentFlux: import("../../store").Flux<ContentState>; | ||
export {}; |
import { CanduTutorialDocumentContextType } from '../contexts'; | ||
export declare const createTutorialDocumentContext: (id: number, parentContext: CanduTutorialDocumentContextType | null) => CanduTutorialDocumentContextType; | ||
export declare const checkCyclicAndAdd: (context: CanduTutorialDocumentContextType, tutorialId: number) => boolean; | ||
import { TutorialId } from '../models'; | ||
export declare const createTutorialDocumentContext: (id: TutorialId, parentContext: CanduTutorialDocumentContextType | null) => CanduTutorialDocumentContextType; | ||
export declare const checkCyclicAndAdd: (context: CanduTutorialDocumentContextType, tutorialId: TutorialId) => boolean; |
@@ -17,3 +17,3 @@ import { Eventing } from '@candulabs/eventing'; | ||
} | ||
export declare const providerValidation: <T extends ProviderProps>({ clientToken, userId, traits, options, styleguide, ...otherProps }: T) => Pick<T, Exclude<keyof T, "clientToken" | "userId" | "traits" | "options" | "styleguide">> & { | ||
export declare const providerValidation: <T extends ProviderProps>({ clientToken, userId, traits, options, styleguide, ...otherProps }: T) => Omit<T, "clientToken" | "userId" | "traits" | "options" | "styleguide"> & { | ||
clientToken: string; | ||
@@ -40,3 +40,3 @@ traits: Record<string, unknown>; | ||
} | ||
export declare const tutorialValidation: <T extends TutorialProps>({ slug, styleguide, contentHashId, tutorialId, tutorialDocument, renderedByClient, ...otherProps }: T) => Pick<T, Exclude<keyof T, "styleguide" | "slug" | "contentHashId" | "tutorialId" | "tutorialDocument" | "renderedByClient">> & { | ||
export declare const tutorialValidation: <T extends TutorialProps>({ slug, styleguide, contentHashId, tutorialId, tutorialDocument, renderedByClient, ...otherProps }: T) => Omit<T, "styleguide" | "slug" | "contentHashId" | "tutorialId" | "tutorialDocument" | "renderedByClient"> & { | ||
slug: string | undefined; | ||
@@ -43,0 +43,0 @@ styleguide: object; |
export declare const LOGGER: { | ||
error: { | ||
(...data: any[]): void; | ||
(message?: any, ...optionalParams: any[]): void; | ||
(message?: any, ...optionalParams: any[]): void; | ||
}; | ||
warning: { | ||
(...data: any[]): void; | ||
(message?: any, ...optionalParams: any[]): void; | ||
(message?: any, ...optionalParams: any[]): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { UserId } from '../eventing'; | ||
import { ClientToken, UserId } from '../eventing'; | ||
import { PreviewContent } from '../sdk'; | ||
@@ -18,3 +18,3 @@ export declare enum MESSAGES { | ||
export declare const messages: { | ||
bootstrap: (clientToken: string, userId: UserId, version?: string | undefined, preview?: string | undefined) => { | ||
bootstrap: (clientToken: ClientToken, userId: UserId, version?: string | undefined, preview?: string | undefined) => { | ||
type: MESSAGES; | ||
@@ -21,0 +21,0 @@ }; |
@@ -1,6 +0,6 @@ | ||
import { ApiError, TutorialDocumentType } from '../models'; | ||
import { ApiError, ClientToken, TutorialDocumentType } from '../models'; | ||
export declare const fetchURL: (url: string, headers?: any) => Promise<any>; | ||
export declare const fetchFromApi: (endpoint: string) => Promise<any>; | ||
export declare const fetchFromCdn: (endpoint: string) => Promise<any>; | ||
export declare const getTutorialDocument: (clientToken: string) => { | ||
export declare const getTutorialDocument: (clientToken: ClientToken) => { | ||
byId: (tutorialId: number) => Promise<TutorialDocumentType | ApiError>; | ||
@@ -7,0 +7,0 @@ bySlug: (slug: string) => Promise<TutorialDocumentType | ApiError>; |
import { Eventing } from '@candulabs/eventing'; | ||
import { TutorialDocumentType, UserId, ContentDocument, ApiError, PortalAsset } from '../models'; | ||
import { ClientToken, TutorialId, TutorialDocumentType, UserId, ContentDocument, ApiError, PortalAsset } from '../models'; | ||
import { TutorialProps } from '../inputValidation'; | ||
export declare const RESOURCES: { | ||
tutorialDocumentLatestSaved: (clientToken: string, tutorialId: number) => Promise<any>; | ||
portalAsset: (clientToken: string, slug: string, segmentIds: string[]) => Promise<TutorialDocumentType | PortalAsset | ApiError | null>; | ||
contentDocument: (clientToken: string, slug: string, segmentIds?: string[] | undefined) => Promise<ApiError | ContentDocument | null>; | ||
segmentMembership: (clientToken: string, userId: UserId) => Promise<any>; | ||
segmentDefinition: (clientToken: string) => Promise<any>; | ||
tutorialMetadata: (clientToken: string) => Promise<any>; | ||
tutorialDocumentLatestSaved: (clientToken: ClientToken, tutorialId: TutorialId) => Promise<any>; | ||
portalAsset: (clientToken: ClientToken, slug: string, segmentIds: string[]) => Promise<TutorialDocumentType | PortalAsset | ApiError | null>; | ||
contentDocument: (clientToken: ClientToken, slug: string, segmentIds?: string[] | undefined) => Promise<ContentDocument | ApiError | null>; | ||
segmentMembership: (clientToken: ClientToken, userId: UserId) => Promise<any>; | ||
segmentDefinition: (clientToken: ClientToken) => Promise<any>; | ||
tutorialMetadata: (clientToken: ClientToken) => Promise<any>; | ||
/** composite methods */ | ||
tutorialDocument: (tutorialProps: TutorialProps, clientToken: string, eventing: Eventing) => Promise<TutorialDocumentType | ApiError> | null; | ||
tutorialDocument: (tutorialProps: TutorialProps, clientToken: ClientToken, eventing: Eventing) => Promise<TutorialDocumentType | ApiError> | null; | ||
}; |
@@ -16,4 +16,4 @@ import React from 'preact/compat'; | ||
componentDidCatch(error: any, errorInfo: any): void; | ||
render(): string | number | bigint | boolean | object | null | undefined; | ||
render(): import("preact").ComponentChildren; | ||
} | ||
export {}; |
import React from 'preact/compat'; | ||
import { StyleguideProps } from '../../../types'; | ||
export declare const CheckList: ({ attributes: { children, ...attributes } }: StyleguideProps<null>) => React.JSX.Element; | ||
export declare const CheckList: ({ attributes: { children, ...attributes } }: StyleguideProps) => React.JSX.Element; |
@@ -9,3 +9,3 @@ import React from 'preact/compat'; | ||
*/ | ||
export declare const Flex: ({ attributes }: StyleguideProps<null>) => React.JSX.Element; | ||
export declare const Flex: ({ attributes }: StyleguideProps) => React.JSX.Element; | ||
/** | ||
@@ -17,2 +17,2 @@ * FlexItem flex child -> can position iteslf within container | ||
*/ | ||
export declare const FlexItem: ({ attributes }: StyleguideProps<null>) => React.JSX.Element; | ||
export declare const FlexItem: ({ attributes }: StyleguideProps) => React.JSX.Element; |
@@ -1,3 +0,3 @@ | ||
import React from 'preact/compat'; | ||
import { FunctionComponent } from 'preact/compat'; | ||
import { StyleguideProps } from '../../types'; | ||
export declare const HtmlComponent: (Component: any) => React.FunctionComponent<StyleguideProps<null>>; | ||
export declare const HtmlComponent: (Component: any) => FunctionComponent<StyleguideProps>; |
@@ -8,3 +8,3 @@ import React from 'preact/compat'; | ||
*/ | ||
export declare const List: ({ attributes, api }: StyleguideProps<null>) => React.JSX.Element; | ||
export declare const List: ({ attributes, api }: StyleguideProps) => React.JSX.Element; | ||
/** | ||
@@ -16,2 +16,2 @@ * A ListItem. | ||
*/ | ||
export declare const ListItem: ({ attributes }: StyleguideProps<null>) => React.JSX.Element; | ||
export declare const ListItem: ({ attributes }: StyleguideProps) => React.JSX.Element; |
@@ -8,2 +8,2 @@ import React from 'preact/compat'; | ||
*/ | ||
export declare const Spacing: ({ attributes }: StyleguideProps<null>) => React.JSX.Element; | ||
export declare const Spacing: ({ attributes }: StyleguideProps) => React.JSX.Element; |
import React from 'preact/compat'; | ||
import { Variable } from '../../models'; | ||
import { StyleguideProps } from '../../styleguide'; | ||
export declare const VariableWrapper: (Component: any, variables: Record<string, Variable>) => (props: StyleguideProps<null>) => React.JSX.Element; | ||
import { StyleguideComponent, StyleguideProps } from '../../styleguide'; | ||
export declare const VariableWrapper: (Component: StyleguideComponent, variables: Record<string, Variable>) => (props: StyleguideProps) => React.JSX.Element; |
@@ -16,4 +16,4 @@ import { DBValue } from '../../storage'; | ||
type: StateResolverType; | ||
} & Pick<R, Exclude<keyof R, "type">>; | ||
} & ResolverOptions<R>; | ||
} | ||
export declare type StateForResolverInstance<R extends StateResolverInstance> = R['state']; |
@@ -10,4 +10,10 @@ interface Store { | ||
* We uses this object to know which stores we need to create. | ||
* | ||
* We must ensure we update STORES_VERSION when adding to STORES | ||
* | ||
* WARNING: The only type of upgrade we currently support is adding new stores | ||
* Modifications to options are unsupported | ||
*/ | ||
export declare const STORES_VERSION = 2; | ||
export declare const STORES: IndexedDBStores; | ||
export {}; |
import { StateProviderInstance } from '../../state'; | ||
export declare const stateProvidersFlux: import("../../store").Flux<Record<string, StateProviderInstance<any>>>; | ||
declare type StateProviderState = Record<string, StateProviderInstance>; | ||
export declare const stateProvidersFlux: import("../../store").Flux<StateProviderState>; | ||
export {}; |
import { TutorialDocumentType } from '../../models'; | ||
import { FetchState } from '../../store'; | ||
export declare const tutorialDocumentsFlux: import("../../store").Flux<Record<string, FetchState<TutorialDocumentType>>>; | ||
declare type TutorialDocumentsState = Record<string, FetchState<TutorialDocumentType>>; | ||
export declare const tutorialDocumentsFlux: import("../../store").Flux<TutorialDocumentsState>; | ||
export {}; |
@@ -12,3 +12,3 @@ { | ||
}, | ||
"version": "0.8.0-alpha.12", | ||
"version": "0.8.0-alpha.13", | ||
"main": "dist/index.js", | ||
@@ -30,3 +30,3 @@ "module": "dist/index.es.js", | ||
"dependencies": { | ||
"@candulabs/eventing": "^0.8.0-alpha.12", | ||
"@candulabs/eventing": "^0.8.0-alpha.13", | ||
"dataloader": "^2.0.0", | ||
@@ -37,3 +37,3 @@ "preact": "10.5.13", | ||
}, | ||
"gitHead": "014867cd06b2de3352281b2fc0f3b33012093fe7" | ||
"gitHead": "0d48e979a12a33869603b3f10c8e2995126d4a76" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
572600
3750