@lm_fe/components 0.1.201 → 0.2.5
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/README.md +1 -1
- package/dist/keep-alive/common.d.ts +46 -0
- package/dist/keep-alive/components/AsyncComponent.d.ts +27 -0
- package/dist/keep-alive/components/Comment.d.ts +18 -0
- package/dist/keep-alive/components/Consumer.d.ts +20 -0
- package/dist/keep-alive/components/keepAlive.d.ts +4 -0
- package/dist/keep-alive/components/provider.d.ts +31 -0
- package/dist/keep-alive/contexts/IdentificationContext.d.ts +12 -0
- package/dist/keep-alive/contexts/KeepAliveContext.d.ts +5 -0
- package/dist/keep-alive/index.d.ts +7 -0
- package/dist/keep-alive/index.js +1901 -0
- package/dist/keep-alive/utils/bindLifecycle.d.ts +3 -0
- package/dist/keep-alive/utils/changePositionByComment.d.ts +1 -0
- package/dist/keep-alive/utils/createEventEmitter.d.ts +11 -0
- package/dist/keep-alive/utils/createStoreElement.d.ts +1 -0
- package/dist/keep-alive/utils/createUniqueIdentification.d.ts +8 -0
- package/dist/keep-alive/utils/debug.d.ts +3 -0
- package/dist/keep-alive/utils/getDisplayName.d.ts +2 -0
- package/dist/keep-alive/utils/getKeepAlive.d.ts +3 -0
- package/dist/keep-alive/utils/getKeyByFiberNode.d.ts +1 -0
- package/dist/keep-alive/utils/isRegExp.d.ts +1 -0
- package/dist/keep-alive/utils/keepAliveDecorator.d.ts +17 -0
- package/dist/keep-alive/utils/md5.d.ts +1 -0
- package/dist/keep-alive/utils/noop.d.ts +2 -0
- package/dist/keep-alive/utils/shallowEqual.d.ts +2 -0
- package/dist/keep-alive/utils/useKeepAliveEffect.d.ts +2 -0
- package/dist/keep-alive/utils/withIdentificationContextConsumer.d.ts +10 -0
- package/dist/keep-alive/utils/withKeepAliveContextConsumer.d.ts +10 -0
- package/dist/src/ArraySingle/Inner.d.ts +3 -0
- package/dist/src/ArraySingle/index.d.ts +2 -0
- package/dist/src/CaseTempleteEdit/Inner.d.ts +4 -0
- package/dist/src/CaseTempleteEdit/config.d.ts +20 -0
- package/dist/src/CaseTempleteEdit/index.d.ts +4 -0
- package/dist/src/CaseTempleteEdit/types.d.ts +19 -0
- package/dist/src/CaseTempleteEdit/utils.d.ts +2 -0
- package/dist/src/CaseTempleteEditEmr/Inner.d.ts +3 -0
- package/dist/src/CaseTempleteEditEmr/demo_text.d.ts +1 -0
- package/dist/src/CaseTempleteEditEmr/index.d.ts +2 -0
- package/dist/src/CaseTempleteEditEmr/types.d.ts +6 -0
- package/dist/src/CaseTempleteEditEmr/utils.d.ts +3 -0
- package/dist/{GlobalModal → src/GlobalModal}/index.d.ts +2 -1
- package/dist/src/LazyAntd/index.d.ts +17 -0
- package/dist/{Monaco → src/Monaco}/Inner.d.ts +1 -1
- package/dist/src/MyAddress/Inner.d.ts +3 -0
- package/dist/{MyImageEditor → src/MyImageEditor}/Inner.d.ts +1 -1
- package/dist/{MyImageEditor → src/MyImageEditor}/utils.d.ts +1 -1
- package/dist/{MyInput → src/MyInput}/index.d.ts +2 -2
- package/dist/{PDF_Frame_View → src/PDF_Frame_View}/utils.d.ts +1 -1
- package/dist/src/PatientSelect/Inner.d.ts +16 -0
- package/dist/src/PatientSelect/index.d.ts +3 -0
- package/dist/src/SimpleForm/Inner.d.ts +5 -0
- package/dist/{SimpleForm → src/SimpleForm}/components/TabForm/index.d.ts +3 -2
- package/dist/{SimpleForm → src/SimpleForm}/components/extra/Custom.d.ts +2 -1
- package/dist/{SimpleForm → src/SimpleForm}/components/index.d.ts +3 -6
- package/dist/src/SimpleForm/index.d.ts +17 -0
- package/dist/{SimpleForm/index.d.ts → src/SimpleForm/types.d.ts} +0 -14
- package/dist/src/a_chunks/ArraySingle.Inner.js +19 -0
- package/dist/src/a_chunks/CaseTempleteEdit.Inner.js +622 -0
- package/dist/src/a_chunks/CaseTempleteEditEmr.Inner.js +235 -0
- package/dist/{a_chunks/.root6.js → src/a_chunks/MyAddress.Inner.js} +38 -89
- package/dist/{a_chunks/.root4.js → src/a_chunks/MyImageEditor.Inner.js} +128 -179
- package/dist/{a_chunks/.root5.js → src/a_chunks/Old.InnerOld.js} +20 -59
- package/dist/{a_chunks/.root2.js → src/a_chunks/PDF_Frame_View.Inner.js} +11 -51
- package/dist/src/a_chunks/PatientSelect.Inner.js +281 -0
- package/dist/src/a_chunks/SimpleForm.Inner.js +318 -0
- package/dist/src/a_chunks/index.js +550 -0
- package/dist/src/a_chunks/style-inject.es.js +25 -0
- package/dist/src/config.d.ts +1 -0
- package/dist/{hooks → src/hooks}/index.d.ts +1 -0
- package/dist/src/hooks/use_fuck.d.ts +5 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/index.js +10 -0
- package/dist/src/pack_components.d.ts +213 -0
- package/dist/src/utils/getInputStyle.d.ts +1 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/other.d.ts +3 -0
- package/package.json +30 -26
- package/dist/ContainerDimensions2/index.d.ts +0 -10
- package/dist/LazyAntd/AutoComplete/Inner.d.ts +0 -4
- package/dist/LazyAntd/AutoComplete/index.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/Base/Calendar.d.ts +0 -3
- package/dist/LazyAntd/DatePicker/Base/DatePicker.d.ts +0 -11
- package/dist/LazyAntd/DatePicker/Base/index.d.ts +0 -12
- package/dist/LazyAntd/DatePicker/Base/props.d.ts +0 -14
- package/dist/LazyAntd/DatePicker/Calendar.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/DatePicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/MonthPicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/RangePicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/TimePicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/index.d.ts +0 -5
- package/dist/LazyAntd/Dropdown/Button.d.ts +0 -2
- package/dist/LazyAntd/Dropdown/Inner.d.ts +0 -3
- package/dist/LazyAntd/Dropdown/index.d.ts +0 -10
- package/dist/LazyAntd/Form/FormItemInner.d.ts +0 -2
- package/dist/LazyAntd/Form/Inner.d.ts +0 -3
- package/dist/LazyAntd/Form/index.d.ts +0 -9
- package/dist/LazyAntd/Modal/Inner.d.ts +0 -4
- package/dist/LazyAntd/Modal/index.d.ts +0 -3
- package/dist/LazyAntd/Pagination/Inner.d.ts +0 -3
- package/dist/LazyAntd/Pagination/index.d.ts +0 -3
- package/dist/LazyAntd/Select/Inner.d.ts +0 -3
- package/dist/LazyAntd/Select/OptionInner.d.ts +0 -2
- package/dist/LazyAntd/Select/index.d.ts +0 -10
- package/dist/LazyAntd/Table/Inner.d.ts +0 -3
- package/dist/LazyAntd/Table/index.d.ts +0 -3
- package/dist/LazyAntd/Tree/DirectoryTreeInner.d.ts +0 -3
- package/dist/LazyAntd/Tree/Inner.d.ts +0 -3
- package/dist/LazyAntd/Tree/TreeNodeInner.d.ts +0 -4
- package/dist/LazyAntd/Tree/index.d.ts +0 -12
- package/dist/LazyAntd/TreeSelect/Inner.d.ts +0 -3
- package/dist/LazyAntd/TreeSelect/index.d.ts +0 -3
- package/dist/LazyAntd/index.d.ts +0 -25
- package/dist/MyAddress/Inner.d.ts +0 -3
- package/dist/QRCode/Inner.d.ts +0 -3
- package/dist/QRCode/index.d.ts +0 -2
- package/dist/QRCode/types.d.ts +0 -68
- package/dist/a_chunks/.root.js +0 -805
- package/dist/a_chunks/.root.js.map +0 -1
- package/dist/a_chunks/.root10.js +0 -8
- package/dist/a_chunks/.root10.js.map +0 -1
- package/dist/a_chunks/.root11.js +0 -7
- package/dist/a_chunks/.root11.js.map +0 -1
- package/dist/a_chunks/.root12.js +0 -8
- package/dist/a_chunks/.root12.js.map +0 -1
- package/dist/a_chunks/.root13.js +0 -4
- package/dist/a_chunks/.root13.js.map +0 -1
- package/dist/a_chunks/.root14.js +0 -8
- package/dist/a_chunks/.root14.js.map +0 -1
- package/dist/a_chunks/.root15.js +0 -7
- package/dist/a_chunks/.root15.js.map +0 -1
- package/dist/a_chunks/.root16.js +0 -8
- package/dist/a_chunks/.root16.js.map +0 -1
- package/dist/a_chunks/.root17.js +0 -8
- package/dist/a_chunks/.root17.js.map +0 -1
- package/dist/a_chunks/.root18.js +0 -8
- package/dist/a_chunks/.root18.js.map +0 -1
- package/dist/a_chunks/.root19.js +0 -8
- package/dist/a_chunks/.root19.js.map +0 -1
- package/dist/a_chunks/.root2.js.map +0 -1
- package/dist/a_chunks/.root20.js +0 -6
- package/dist/a_chunks/.root20.js.map +0 -1
- package/dist/a_chunks/.root21.js +0 -5
- package/dist/a_chunks/.root21.js.map +0 -1
- package/dist/a_chunks/.root3.js +0 -7
- package/dist/a_chunks/.root3.js.map +0 -1
- package/dist/a_chunks/.root4.js.map +0 -1
- package/dist/a_chunks/.root5.js.map +0 -1
- package/dist/a_chunks/.root6.js.map +0 -1
- package/dist/a_chunks/.root7.js +0 -8
- package/dist/a_chunks/.root7.js.map +0 -1
- package/dist/a_chunks/.root8.js +0 -8
- package/dist/a_chunks/.root8.js.map +0 -1
- package/dist/a_chunks/.root9.js +0 -7
- package/dist/a_chunks/.root9.js.map +0 -1
- package/dist/a_chunks/index.js +0 -1238
- package/dist/a_chunks/index.js.map +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -45
- package/dist/index.js.map +0 -1
- package/dist/pack_components.d.ts +0 -17
- package/dist/utils/getInputStyle.d.ts +0 -11
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/other.d.ts +0 -4
- /package/dist/{ContainerDimensions → src/ContainerDimensions}/index.d.ts +0 -0
- /package/dist/{GlobalModal → src/GlobalModal}/utils.d.ts +0 -0
- /package/dist/{Monaco → src/Monaco}/index.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/Old/InnerOld.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/Old/index.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/Old/options.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/index.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/type.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/utils.d.ts +0 -0
- /package/dist/{MyImageEditor → src/MyImageEditor}/index.d.ts +0 -0
- /package/dist/{MyImageEditor → src/MyImageEditor}/init_delete_control.d.ts +0 -0
- /package/dist/{MyInput → src/MyInput}/types.d.ts +0 -0
- /package/dist/{MyLazyComponent → src/MyLazyComponent}/index.d.ts +0 -0
- /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/Inner.d.ts +0 -0
- /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/index.d.ts +0 -0
- /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/types.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/components/extra/MultiInput.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/components/extra/SimpleSelect.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/components/extra/SwitchSelect.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/types/help.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/types/metaTypes.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useMchcDriverStatus.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useMyEffect.d.ts +0 -0
- /package/dist/{style → src/style}/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare enum LIFECYCLE {
|
|
2
|
+
MOUNTED = 1,
|
|
3
|
+
UPDATING = 2,
|
|
4
|
+
UNMOUNTED = 3
|
|
5
|
+
}
|
|
6
|
+
export interface ICacheItem {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
keepAlive: boolean;
|
|
9
|
+
lifecycle: LIFECYCLE;
|
|
10
|
+
renderElement?: HTMLElement;
|
|
11
|
+
activated?: boolean;
|
|
12
|
+
ifStillActivate?: boolean;
|
|
13
|
+
reactivate?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface ICache {
|
|
16
|
+
[key: string]: ICacheItem;
|
|
17
|
+
}
|
|
18
|
+
export interface IKeepAliveProviderImpl {
|
|
19
|
+
storeElement: HTMLElement;
|
|
20
|
+
cache: ICache;
|
|
21
|
+
keys: string[];
|
|
22
|
+
eventEmitter: any;
|
|
23
|
+
existed: boolean;
|
|
24
|
+
providerIdentification: string;
|
|
25
|
+
setCache: (identification: string, value: ICacheItem) => void;
|
|
26
|
+
removeCache: (name: string) => void;
|
|
27
|
+
unactivate: (identification: string) => void;
|
|
28
|
+
isExisted: () => boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface IKeepAliveProviderProps {
|
|
31
|
+
include?: string | string[] | RegExp;
|
|
32
|
+
exclude?: string | string[] | RegExp;
|
|
33
|
+
max?: number;
|
|
34
|
+
}
|
|
35
|
+
export interface IKeepAliveProps {
|
|
36
|
+
_container?: any;
|
|
37
|
+
key?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
extra?: any;
|
|
41
|
+
}
|
|
42
|
+
export interface IKeepAliveInnerProps extends IKeepAliveProps {
|
|
43
|
+
_container: any;
|
|
44
|
+
}
|
|
45
|
+
export declare const keepAliveProviderTypeName = "$$KeepAliveProvider";
|
|
46
|
+
export declare const START_MOUNTING_DOM = "startMountingDOM";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
setMounted: (value: boolean) => void;
|
|
4
|
+
getMounted: () => boolean;
|
|
5
|
+
onUpdate: () => void;
|
|
6
|
+
}
|
|
7
|
+
interface IState {
|
|
8
|
+
component: any;
|
|
9
|
+
}
|
|
10
|
+
export default class AsyncComponent extends React.Component<IProps, IState> {
|
|
11
|
+
state: {
|
|
12
|
+
component: null;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Force update child nodes
|
|
16
|
+
*
|
|
17
|
+
* @private
|
|
18
|
+
* @returns
|
|
19
|
+
* @memberof AsyncComponent
|
|
20
|
+
*/
|
|
21
|
+
private forceUpdateChildren;
|
|
22
|
+
componentDidMount(): void;
|
|
23
|
+
componentDidUpdate(): void;
|
|
24
|
+
shouldComponentUpdate(): boolean;
|
|
25
|
+
render(): null;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IReactCommentProps {
|
|
3
|
+
onLoaded: () => void;
|
|
4
|
+
}
|
|
5
|
+
declare class ReactComment extends React.PureComponent<IReactCommentProps> {
|
|
6
|
+
static defaultProps: {
|
|
7
|
+
onLoaded: () => undefined;
|
|
8
|
+
};
|
|
9
|
+
private parentNode;
|
|
10
|
+
private currentNode;
|
|
11
|
+
private commentNode;
|
|
12
|
+
private content;
|
|
13
|
+
componentDidMount(): void;
|
|
14
|
+
componentWillUnmount(): void;
|
|
15
|
+
private createComment;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export default ReactComment;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ICache, ICacheItem } from '../common';
|
|
3
|
+
interface IConsumerProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
identification: string;
|
|
6
|
+
keepAlive: boolean;
|
|
7
|
+
cache: ICache;
|
|
8
|
+
setCache: (identification: string, value: ICacheItem) => void;
|
|
9
|
+
unactivate: (identification: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare class Consumer extends React.PureComponent<IConsumerProps> {
|
|
12
|
+
private renderElement;
|
|
13
|
+
private commentRef;
|
|
14
|
+
private identification;
|
|
15
|
+
componentDidMount(): void;
|
|
16
|
+
componentDidUpdate(): void;
|
|
17
|
+
componentWillUnmount(): void;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
export default Consumer;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ICache, ICacheItem, IKeepAliveProviderImpl, IKeepAliveProviderProps } from '../common';
|
|
3
|
+
export default class KeepAliveProvider extends React.PureComponent<IKeepAliveProviderProps> implements IKeepAliveProviderImpl {
|
|
4
|
+
static displayName: string;
|
|
5
|
+
static defaultProps: {
|
|
6
|
+
max: number;
|
|
7
|
+
};
|
|
8
|
+
storeElement: HTMLElement;
|
|
9
|
+
cache: ICache;
|
|
10
|
+
keys: string[];
|
|
11
|
+
eventEmitter: {
|
|
12
|
+
on: (eventNames: string | string[], listener: (...args: any) => void, direction?: boolean) => void;
|
|
13
|
+
off: (eventNames: string | string[], listener: (...args: any) => void) => void;
|
|
14
|
+
emit: (eventNames: string | string[], ...args: any) => void;
|
|
15
|
+
clear: () => void;
|
|
16
|
+
listenerCount: (eventNames: string | string[]) => number;
|
|
17
|
+
removeAllListeners: (eventNames: string | string[]) => void;
|
|
18
|
+
};
|
|
19
|
+
existed: boolean;
|
|
20
|
+
private needRerender;
|
|
21
|
+
providerIdentification: string;
|
|
22
|
+
componentDidMount(): void;
|
|
23
|
+
componentDidUpdate(): void;
|
|
24
|
+
componentWillUnmount(): void;
|
|
25
|
+
isExisted: () => boolean;
|
|
26
|
+
setCache: (identification: string, value: ICacheItem) => void;
|
|
27
|
+
removeCache: (name: string | string[]) => void;
|
|
28
|
+
unactivate: (identification: string) => void;
|
|
29
|
+
private startMountingDOM;
|
|
30
|
+
render(): React.JSX.Element | null;
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IIdentificationContextProps {
|
|
3
|
+
identification: string;
|
|
4
|
+
eventEmitter: any;
|
|
5
|
+
keepAlive: boolean;
|
|
6
|
+
getLifecycle: () => number;
|
|
7
|
+
isExisted: () => boolean;
|
|
8
|
+
activated: boolean;
|
|
9
|
+
extra: any;
|
|
10
|
+
}
|
|
11
|
+
declare const WithKeepAliveContext: React.Context<IIdentificationContextProps>;
|
|
12
|
+
export default WithKeepAliveContext;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IKeepAliveProviderImpl, IKeepAliveProviderProps } from '../components/Provider';
|
|
3
|
+
export type IKeepAliveContextProps = IKeepAliveProviderImpl & IKeepAliveProviderProps;
|
|
4
|
+
declare const KeepAliveContext: React.Context<any>;
|
|
5
|
+
export default KeepAliveContext;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Provider from './components/provider';
|
|
2
|
+
import KeepAlive from './components/keepAlive';
|
|
3
|
+
import bindLifecycle from './utils/bindLifecycle';
|
|
4
|
+
import useKeepAliveEffect from './utils/useKeepAliveEffect';
|
|
5
|
+
import { IKeepAliveProps } from './common';
|
|
6
|
+
export { Provider, KeepAlive, bindLifecycle, useKeepAliveEffect, };
|
|
7
|
+
export { IKeepAliveProps };
|