Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Commit

Permalink
reconfigured typedoc for 0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
dilan-dio4 committed May 4, 2021
1 parent 2d4faa5 commit 5367cc4
Show file tree
Hide file tree
Showing 6 changed files with 275 additions and 376 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "^3.4.1",
"typedoc": "^0.19.2",
"typedoc": "^0.20.36",
"typescript": "^3.7.5"
},
"files": [
Expand Down
8 changes: 3 additions & 5 deletions src/EasybaseContext.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { createContext } from "react";
import {
ContextValue
} from "./reactTypes";
import {
ConfigureFrameOptions,
StatusResponse,
AddRecordOptions,
UpdateRecordAttachmentOptions,
FrameConfiguration,
QueryOptions
} from "../node_modules/easybasejs/src/EasybaseProvider/types";
QueryOptions,
ContextValue
} from "./types";
import { SQW } from "EasyQB/types/sq";

function Frame(): Record<string, any>[];
Expand Down
34 changes: 26 additions & 8 deletions src/EasybaseProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import React, { useState, useEffect, Fragment, useRef } from "react";
import EasybaseContext from "./EasybaseContext";
import deepEqual from "fast-deep-equal";
import {
EasybaseProviderProps,
ContextValue
} from "./reactTypes";
import {
POST_TYPES,
FrameConfiguration,
Expand All @@ -13,8 +9,10 @@ import {
UpdateRecordAttachmentOptions,
StatusResponse,
ConfigureFrameOptions,
DeleteRecordOptions
} from "../node_modules/easybasejs/src/EasybaseProvider/types";
DeleteRecordOptions,
EasybaseProviderProps,
ContextValue
} from "./types";
import imageExtensions from "./assets/image-extensions.json";
import videoExtensions from "./assets/video-extensions.json";
import utilsFactory from "../node_modules/easybasejs/src/EasybaseProvider/utils";
Expand All @@ -24,6 +22,7 @@ import dbFactory from "../node_modules/easybasejs/src/EasybaseProvider/db";
import { gFactory } from "../node_modules/easybasejs/src/EasybaseProvider/g";
import { Observable } from "object-observer";
import * as cache from "./cache";
import { SQW } from "EasyQB/types/sq";

const g = gFactory();

Expand All @@ -40,7 +39,7 @@ const {

const { log } = utilsFactory(g);

const {
const {
Query,
fullTableSize,
tableTypes
Expand Down Expand Up @@ -133,7 +132,7 @@ const EasybaseProvider = ({ children, ebconfig, options }: EasybaseProviderProps
g.token = cacheToken;
g.refreshToken = cacheRefreshToken;
g.session = +cacheSession;

const fallbackMount = setTimeout(() => { setMounted(true) }, 2500);

const refreshTokenRes = await tokenPost(POST_TYPES.REQUEST_TOKEN, {
Expand Down Expand Up @@ -474,6 +473,25 @@ const EasybaseProvider = ({ children, ebconfig, options }: EasybaseProviderProps
}
}

// const useReturn = (dbInstance: SQW) => {
// const [currData, setCurrData] = useState<Record<string, any>[]>([]);
// useEffect(() => {
// const doFetch = async () => {
// const res = await dbInstance.all();
// if (Array.isArray(res)) {
// setCurrData(res as Record<string, any>[]);
// }
// }

// dbEventListener((status?: DB_STATUS, queryType?: string, executeCount?: EXECUTE_COUNT, tableName?: string | null, returned?: any) => {

// });

// doFetch();
// }, []);
// return currData;
// };

const c: ContextValue = {
configureFrame,
addRecord,
Expand Down
231 changes: 0 additions & 231 deletions src/reactTypes.tsx

This file was deleted.

Loading

0 comments on commit 5367cc4

Please sign in to comment.