移除 src下 exceptionHandlers
This commit is contained in:
parent
e79e7aec00
commit
5b9dee2768
|
|
@ -1,34 +0,0 @@
|
|||
"use strict";
|
||||
// import { ExceptionHandlerDict } from "oak-frontend-base/es/types/ExceptionHandler";
|
||||
// import { OakUnloggedInException } from "oak-domain/lib/types/Exception";
|
||||
// import { EntityDict } from './oak-app-domain';
|
||||
// import { GeneralFeatures } from './features/index';
|
||||
// import { OakTokenExpiredException } from "./types/Exception";
|
||||
// import { BRC, FRC, FrcAspectDict } from './types/RuntimeCxt';
|
||||
// export const handlerDict: ExceptionHandlerDict<
|
||||
// EntityDict,
|
||||
// BRC,
|
||||
// FRC,
|
||||
// FrcAspectDict,
|
||||
// GeneralFeatures<EntityDict, BRC, FRC, FrcAspectDict>> = {
|
||||
// [OakUnloggedInException.name]: async (features) => {
|
||||
// await features.token.logout();
|
||||
// features.navigator.navigateTo(
|
||||
// {
|
||||
// url: '/mobile/login',
|
||||
// },
|
||||
// undefined,
|
||||
// true
|
||||
// );
|
||||
// },
|
||||
// [OakTokenExpiredException.name]: async (features) => {
|
||||
// await features.token.logout();
|
||||
// features.navigator.navigateTo(
|
||||
// {
|
||||
// url: '/mobile/login',
|
||||
// },
|
||||
// undefined,
|
||||
// true
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
// export * from './exceptionHandlers';
|
||||
import { registerMessageNotificationConverters } from './triggers/message';
|
||||
import { registerWeChatPublicEventCallback } from './endpoints';
|
||||
export { registerMessageNotificationConverters, registerWeChatPublicEventCallback, };
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { AsyncRowStore } from 'oak-domain/lib/store/AsyncRowStore';
|
|||
import { BackendRuntimeContext } from './context/BackendRuntimeContext';
|
||||
import { FrontendRuntimeContext } from './context/FrontendRuntimeContext';
|
||||
import { GAD, GFD } from './types/Page';
|
||||
import GeneralAspectDict from './aspects/AspectDict';
|
||||
import type GeneralAspectDict from './aspects/AspectDict';
|
||||
import { AppType } from './oak-app-domain/Application/Schema';
|
||||
import { InitializeOptions } from 'oak-frontend-base';
|
||||
export declare function initialize<ED extends EntityDict & BaseEntityDict, Cxt extends BackendRuntimeContext<ED>, AD extends Record<string, Aspect<ED, Cxt>>, FrontCxt extends FrontendRuntimeContext<ED, Cxt, AD & GAD<ED, Cxt>>>(type: AppType, domain: string, storageSchema: StorageSchema<ED>, frontendContextBuilder: () => (store: CacheStore<ED, FrontCxt>) => FrontCxt, backendContextBuilder: (contextStr?: string) => (store: AsyncRowStore<ED, Cxt>) => Promise<Cxt>, aspectDict: AD, triggers: Array<Trigger<ED, keyof ED, Cxt>>, checkers: Array<Checker<ED, keyof ED, FrontCxt | Cxt>>, watchers: Array<Watcher<ED, keyof ED, Cxt>>, timers: Array<Timer<ED, Cxt>>, startRoutines: Array<Routine<ED, Cxt>>, initialData: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ActionDefDict as generalActionDefDict } from './oak-app-domain';
|
||||
import { intersection } from 'oak-domain/lib/utils/lodash';
|
||||
import { initialize as initDev } from 'oak-frontend-base/es/initialize-dev';
|
||||
import { intersection } from 'oak-domain/lib/utils/lodash';
|
||||
import generalWatchers from './watchers';
|
||||
import generalCheckers from './checkers';
|
||||
import generalTriggers from './triggers';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { initialize as initProd } from 'oak-frontend-base/es/initialize-prod';
|
||||
import { ActionDefDict as generalActionDefDict } from './oak-app-domain';
|
||||
import { intersection } from 'oak-domain/lib/utils/lodash';
|
||||
import { initialize as initProd } from 'oak-frontend-base/es/initialize-prod';
|
||||
import generalCheckers from './checkers';
|
||||
import { initialize as initGeneralFeatures } from './features';
|
||||
import { rewriteSelection, rewriteOperation } from './utils/selectionRewriter';
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
import { ButtonProps, SpaceProps } from 'antd';
|
||||
declare type Item = {
|
||||
icon?: string | React.ReactNode;
|
||||
label?: string;
|
||||
action?: string;
|
||||
auth: boolean;
|
||||
type?: 'a' | 'button';
|
||||
index?: number;
|
||||
alerted?: boolean;
|
||||
alertTitle?: string;
|
||||
alertContent?: string;
|
||||
confirmText?: string;
|
||||
cancelText?: string;
|
||||
render?: React.ReactNode;
|
||||
beforeAction?: (item: Item) => boolean | Promise<boolean>;
|
||||
afterAction?: (item: Item) => void;
|
||||
onClick?: (item: Item) => void | Promise<void>;
|
||||
buttonProps?: Omit<ButtonProps, 'onClick'>;
|
||||
filter?: () => boolean;
|
||||
};
|
||||
export declare type ActionBtnPanelProps = {
|
||||
entity: string;
|
||||
items: Item[];
|
||||
spaceProps?: SpaceProps;
|
||||
mode?: 'cell' | 'table-cell';
|
||||
column?: 3;
|
||||
};
|
||||
export {};
|
||||
|
|
@ -1 +0,0 @@
|
|||
export {};
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
"use strict";
|
||||
// import { ExceptionHandlerDict } from "oak-frontend-base/es/types/ExceptionHandler";
|
||||
// import { OakUnloggedInException } from "oak-domain/lib/types/Exception";
|
||||
// import { EntityDict } from './oak-app-domain';
|
||||
// import { GeneralFeatures } from './features/index';
|
||||
// import { OakTokenExpiredException } from "./types/Exception";
|
||||
// import { BRC, FRC, FrcAspectDict } from './types/RuntimeCxt';
|
||||
// export const handlerDict: ExceptionHandlerDict<
|
||||
// EntityDict,
|
||||
// BRC,
|
||||
// FRC,
|
||||
// FrcAspectDict,
|
||||
// GeneralFeatures<EntityDict, BRC, FRC, FrcAspectDict>> = {
|
||||
// [OakUnloggedInException.name]: async (features) => {
|
||||
// await features.token.logout();
|
||||
// features.navigator.navigateTo(
|
||||
// {
|
||||
// url: '/mobile/login',
|
||||
// },
|
||||
// undefined,
|
||||
// true
|
||||
// );
|
||||
// },
|
||||
// [OakTokenExpiredException.name]: async (features) => {
|
||||
// await features.token.logout();
|
||||
// features.navigator.navigateTo(
|
||||
// {
|
||||
// url: '/mobile/login',
|
||||
// },
|
||||
// undefined,
|
||||
// true
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.registerUploader = exports.registerWechatPublicTags = exports.FrontendRuntimeContext = exports.BackendRuntimeContext = exports.getStreamObj = exports.getPlayBackUrl = exports.getLivestream = exports.decomposeFileUrl = exports.composeFileUrl = exports.registerWeChatPublicEventCallback = exports.registerMessageNotificationConverters = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
// export * from './exceptionHandlers';
|
||||
var message_1 = require("./triggers/message");
|
||||
Object.defineProperty(exports, "registerMessageNotificationConverters", { enumerable: true, get: function () { return message_1.registerMessageNotificationConverters; } });
|
||||
var endpoints_1 = require("./endpoints");
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { AsyncRowStore } from 'oak-domain/lib/store/AsyncRowStore';
|
|||
import { BackendRuntimeContext } from './context/BackendRuntimeContext';
|
||||
import { FrontendRuntimeContext } from './context/FrontendRuntimeContext';
|
||||
import { GAD, GFD } from './types/Page';
|
||||
import GeneralAspectDict from './aspects/AspectDict';
|
||||
import type GeneralAspectDict from './aspects/AspectDict';
|
||||
import { AppType } from './oak-app-domain/Application/Schema';
|
||||
import { InitializeOptions } from 'oak-frontend-base';
|
||||
export declare function initialize<ED extends EntityDict & BaseEntityDict, Cxt extends BackendRuntimeContext<ED>, AD extends Record<string, Aspect<ED, Cxt>>, FrontCxt extends FrontendRuntimeContext<ED, Cxt, AD & GAD<ED, Cxt>>>(type: AppType, domain: string, storageSchema: StorageSchema<ED>, frontendContextBuilder: () => (store: CacheStore<ED, FrontCxt>) => FrontCxt, backendContextBuilder: (contextStr?: string) => (store: AsyncRowStore<ED, Cxt>) => Promise<Cxt>, aspectDict: AD, triggers: Array<Trigger<ED, keyof ED, Cxt>>, checkers: Array<Checker<ED, keyof ED, FrontCxt | Cxt>>, watchers: Array<Watcher<ED, keyof ED, Cxt>>, timers: Array<Timer<ED, Cxt>>, startRoutines: Array<Routine<ED, Cxt>>, initialData: {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
exports.initialize = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
var oak_app_domain_1 = require("./oak-app-domain");
|
||||
var lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
var initialize_dev_1 = require("oak-frontend-base/es/initialize-dev");
|
||||
var lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
var watchers_1 = tslib_1.__importDefault(require("./watchers"));
|
||||
var checkers_1 = tslib_1.__importDefault(require("./checkers"));
|
||||
var triggers_1 = tslib_1.__importDefault(require("./triggers"));
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.initialize = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
var initialize_prod_1 = require("oak-frontend-base/es/initialize-prod");
|
||||
var oak_app_domain_1 = require("./oak-app-domain");
|
||||
var lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
var initialize_prod_1 = require("oak-frontend-base/es/initialize-prod");
|
||||
var checkers_1 = tslib_1.__importDefault(require("./checkers"));
|
||||
var features_1 = require("./features");
|
||||
var selectionRewriter_1 = require("./utils/selectionRewriter");
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
// import { ExceptionHandlerDict } from "oak-frontend-base/es/types/ExceptionHandler";
|
||||
// import { OakUnloggedInException } from "oak-domain/lib/types/Exception";
|
||||
// import { EntityDict } from './oak-app-domain';
|
||||
// import { GeneralFeatures } from './features/index';
|
||||
// import { OakTokenExpiredException } from "./types/Exception";
|
||||
// import { BRC, FRC, FrcAspectDict } from './types/RuntimeCxt';
|
||||
|
||||
|
||||
// export const handlerDict: ExceptionHandlerDict<
|
||||
// EntityDict,
|
||||
// BRC,
|
||||
// FRC,
|
||||
// FrcAspectDict,
|
||||
// GeneralFeatures<EntityDict, BRC, FRC, FrcAspectDict>> = {
|
||||
// [OakUnloggedInException.name]: async (features) => {
|
||||
// await features.token.logout();
|
||||
// features.navigator.navigateTo(
|
||||
// {
|
||||
// url: '/mobile/login',
|
||||
// },
|
||||
// undefined,
|
||||
// true
|
||||
// );
|
||||
// },
|
||||
// [OakTokenExpiredException.name]: async (features) => {
|
||||
// await features.token.logout();
|
||||
// features.navigator.navigateTo(
|
||||
// {
|
||||
// url: '/mobile/login',
|
||||
// },
|
||||
// undefined,
|
||||
// true
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
|
||||
import { OpSchema as ExtraFile } from '../oak-app-domain/ExtraFile/Schema';
|
||||
import useFeatures from './useFeatures';
|
||||
|
||||
export default function useMyInfo() {
|
||||
|
|
@ -12,7 +11,7 @@ export default function useMyInfo() {
|
|||
userInfo?.mobile$user && userInfo?.mobile$user[0]?.mobile || '';
|
||||
|
||||
const extraFile = userInfo?.extraFile$entity?.find(
|
||||
(ele: ExtraFile) => ele.tag1 === 'avatar'
|
||||
(ele) => ele.tag1 === 'avatar'
|
||||
);
|
||||
const avatarUrl = features.extraFile.getUrl(extraFile);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
// export * from './exceptionHandlers';
|
||||
import { registerMessageNotificationConverters } from './triggers/message';
|
||||
import { registerWeChatPublicEventCallback } from './endpoints';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,31 @@
|
|||
import { AuthCascadePath, EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import { ColorDict } from 'oak-domain/lib/types/Style';
|
||||
import { ActionDictOfEntityDict, Aspect, AuthDefDict, CascadeRemoveDefDict, Checker, Exportation, Importation, Routine, StorageSchema, Timer, Trigger, Watcher } from 'oak-domain/lib/types';
|
||||
import {
|
||||
ActionDictOfEntityDict,
|
||||
Aspect,
|
||||
AuthDefDict,
|
||||
CascadeRemoveDefDict,
|
||||
Checker,
|
||||
Exportation,
|
||||
Importation,
|
||||
Routine,
|
||||
StorageSchema,
|
||||
Timer,
|
||||
Trigger,
|
||||
Watcher,
|
||||
} from 'oak-domain/lib/types';
|
||||
import { EntityDict, ActionDefDict as generalActionDefDict } from './oak-app-domain';
|
||||
import { CacheStore } from 'oak-frontend-base';
|
||||
import { initialize as initDev } from 'oak-frontend-base/es/initialize-dev';
|
||||
import { AsyncRowStore } from 'oak-domain/lib/store/AsyncRowStore';
|
||||
import { intersection } from 'oak-domain/lib/utils/lodash';
|
||||
import { BackendRuntimeContext } from './context/BackendRuntimeContext';
|
||||
import { FrontendRuntimeContext } from './context/FrontendRuntimeContext';
|
||||
import { GAD, GFD } from './types/Page';
|
||||
import { initialize as initDev } from 'oak-frontend-base/es/initialize-dev';
|
||||
import generalWatchers from './watchers';
|
||||
import generalCheckers from './checkers';
|
||||
import generalTriggers from './triggers';
|
||||
import generalAspectDict from './aspects';
|
||||
import GeneralAspectDict from './aspects/AspectDict';
|
||||
import type GeneralAspectDict from './aspects/AspectDict';
|
||||
import generalStartRoutines from './routines/start';
|
||||
import generalData from './data';
|
||||
import { initialize as initGeneralFeatures } from './features';
|
||||
|
|
|
|||
|
|
@ -1,13 +1,18 @@
|
|||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import { InitializeOptions } from 'oak-frontend-base';
|
||||
import { ActionDictOfEntityDict, Aspect, AuthDefDict, CascadeRemoveDefDict, Checker, Connector, StorageSchema } from 'oak-domain/lib/types';
|
||||
import { initialize as initProd } from 'oak-frontend-base/es/initialize-prod';
|
||||
import {
|
||||
Aspect,
|
||||
Checker,
|
||||
Connector,
|
||||
StorageSchema,
|
||||
} from 'oak-domain/lib/types';
|
||||
import { EntityDict, ActionDefDict as generalActionDefDict } from './oak-app-domain';
|
||||
import { CacheStore } from 'oak-frontend-base';
|
||||
import { intersection } from 'oak-domain/lib/utils/lodash';
|
||||
import { BackendRuntimeContext } from './context/BackendRuntimeContext';
|
||||
import { FrontendRuntimeContext } from './context/FrontendRuntimeContext';
|
||||
import { GAD, GFD } from './types/Page';
|
||||
import { initialize as initProd } from 'oak-frontend-base/es/initialize-prod';
|
||||
import generalCheckers from './checkers';
|
||||
import { initialize as initGeneralFeatures } from './features';
|
||||
import { AppType } from './oak-app-domain/Application/Schema';
|
||||
|
|
|
|||
Loading…
Reference in New Issue