halo-fe 1.0.32 → 1.0.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +5588 -5347
- package/esm/@types/CreateFeOptions.d.ts +5 -2
- package/esm/@types/FeOptions.d.ts +32 -0
- package/esm/@types/index.d.ts +1 -2
- package/esm/apps/AppConstant.d.ts +1 -2
- package/esm/apps/index.d.ts +1 -2
- package/esm/coms/@types/ColumnEmit.d.ts +3 -0
- package/esm/coms/@types/ColumnProps.d.ts +5 -0
- package/esm/coms/@types/PagerEmit.d.ts +1 -2
- package/esm/coms/@types/PagerProps.d.ts +1 -2
- package/esm/coms/@types/ScrollerProps.d.ts +1 -2
- package/esm/coms/@types/SocketProgressProps.d.ts +1 -2
- package/esm/coms/@types/TabProps.d.ts +1 -2
- package/esm/coms/@types/TableEmit.d.ts +1 -2
- package/esm/coms/@types/TableProps.d.ts +1 -2
- package/esm/coms/@types/index.d.ts +9 -8
- package/esm/coms/Empty.vue.d.ts +3 -2
- package/esm/coms/Fill.vue.d.ts +3 -2
- package/esm/coms/Scroller.vue.d.ts +4 -3
- package/esm/coms/Timer.vue.d.ts +3 -2
- package/esm/coms/cards/Index.vue.d.ts +3 -2
- package/esm/coms/conditions/@types/ConditionGroupProps.d.ts +2 -3
- package/esm/coms/conditions/@types/ConditionProps.d.ts +1 -2
- package/esm/coms/conditions/@types/index.d.ts +2 -3
- package/esm/coms/conditions/Condition.vue.d.ts +1 -1
- package/esm/coms/conditions/Index.vue.d.ts +1 -1
- package/esm/coms/controls/@types/CodeEmit.d.ts +1 -2
- package/esm/coms/controls/@types/CodeIntelli.d.ts +1 -2
- package/esm/coms/controls/@types/CodeProps.d.ts +3 -4
- package/esm/coms/controls/@types/Range.d.ts +1 -2
- package/esm/coms/controls/@types/RichTextOptions.d.ts +0 -1
- package/esm/coms/controls/@types/RichTextProps.d.ts +1 -2
- package/esm/coms/controls/@types/index.d.ts +5 -6
- package/esm/coms/controls/Code.vue.d.ts +1 -1
- package/esm/coms/controls/Compare.vue.d.ts +1 -1
- package/esm/coms/controls/Input.vue.d.ts +1 -1
- package/esm/coms/controls/Option.vue.d.ts +1 -1
- package/esm/coms/controls/RichText.vue.d.ts +4 -2
- package/esm/coms/controls/Select.vue.d.ts +1 -1
- package/esm/coms/layouts/@types/RowProps.d.ts +1 -2
- package/esm/coms/layouts/@types/index.d.ts +1 -2
- package/esm/coms/layouts/Col.vue.d.ts +3 -2
- package/esm/coms/layouts/Container.vue.d.ts +3 -2
- package/esm/coms/layouts/Desc.vue.d.ts +1 -1
- package/esm/coms/layouts/Row.vue.d.ts +3 -2
- package/esm/coms/pagers/Index.vue.d.ts +1 -1
- package/esm/coms/progresses/Circle.vue.d.ts +1 -1
- package/esm/coms/progresses/Index.vue.d.ts +2 -2
- package/esm/coms/progresses/SocketProgress.vue.d.ts +3 -2
- package/esm/coms/tables/Column.vue.d.ts +22 -0
- package/esm/coms/tables/Index.vue.d.ts +9 -8
- package/esm/coms/tabs/Tab.vue.d.ts +1 -1
- package/esm/coms/tags/@types/TagProps.d.ts +1 -2
- package/esm/coms/tags/@types/index.d.ts +1 -2
- package/esm/coms/tags/Index.vue.d.ts +3 -2
- package/esm/coms/texts/@types/DanceProps.d.ts +1 -2
- package/esm/coms/texts/@types/index.d.ts +1 -2
- package/esm/coms/texts/Dance.vue.d.ts +1 -1
- package/esm/drivers/@types/IDispose.d.ts +1 -2
- package/esm/drivers/@types/IDriver.d.ts +1 -2
- package/esm/drivers/@types/IOpen.d.ts +1 -2
- package/esm/drivers/@types/index.d.ts +3 -4
- package/esm/drivers/bridges/IBridge.d.ts +1 -2
- package/esm/drivers/builders/Builder.d.ts +2 -3
- package/esm/drivers/builders/BuilderFactory.d.ts +3 -4
- package/esm/drivers/builders/IBuilder.d.ts +1 -2
- package/esm/drivers/builders/entities/ProviderTable.d.ts +1 -2
- package/esm/drivers/builders/entities/index.d.ts +1 -2
- package/esm/drivers/builders/implement/JsonBuilder.d.ts +2 -3
- package/esm/drivers/builders/implement/MongoBuilder.d.ts +2 -3
- package/esm/drivers/builders/implement/MySqlBuilder.d.ts +2 -3
- package/esm/drivers/builders/implement/SqlBuilder.d.ts +2 -3
- package/esm/drivers/builders/implement/index.d.ts +4 -0
- package/esm/drivers/builders/index.d.ts +2 -3
- package/esm/drivers/cdns/Cdn.d.ts +3 -7
- package/esm/drivers/cdns/CdnFactory.d.ts +3 -4
- package/esm/drivers/cdns/ICdn.d.ts +5 -2
- package/esm/drivers/cdns/implements/LocalCdn.d.ts +2 -3
- package/esm/drivers/cdns/implements/ThirdCdn.d.ts +2 -3
- package/esm/drivers/cdns/implements/index.d.ts +2 -0
- package/esm/drivers/cdns/index.d.ts +3 -4
- package/esm/drivers/cryptors/Cryptor.d.ts +4 -5
- package/esm/drivers/cryptors/CryptorFactory.d.ts +2 -3
- package/esm/drivers/cryptors/ICryptor.d.ts +2 -3
- package/esm/drivers/cryptors/implements/AesCryptor.d.ts +3 -4
- package/esm/drivers/cryptors/implements/PoJunCryptor.d.ts +13 -0
- package/esm/drivers/cryptors/implements/index.d.ts +2 -0
- package/esm/drivers/cryptors/index.d.ts +2 -3
- package/esm/drivers/encoders/Encoder.d.ts +2 -3
- package/esm/drivers/encoders/EncoderFactory.d.ts +3 -4
- package/esm/drivers/encoders/IEncoder.d.ts +1 -2
- package/esm/drivers/encoders/implement/Base64Encoder.d.ts +2 -3
- package/esm/drivers/encoders/implement/UrlEncoder.d.ts +2 -3
- package/esm/drivers/encoders/implement/index.d.ts +2 -0
- package/esm/drivers/encoders/index.d.ts +2 -3
- package/esm/drivers/excels/Excel.d.ts +2 -3
- package/esm/drivers/excels/ExcelFactory.d.ts +3 -4
- package/esm/drivers/excels/IExcel.d.ts +1 -2
- package/esm/drivers/excels/implements/XlsxExcel.d.ts +2 -3
- package/esm/drivers/excels/implements/index.d.ts +1 -0
- package/esm/drivers/excels/index.d.ts +2 -3
- package/esm/drivers/explainers/Explainer.d.ts +2 -3
- package/esm/drivers/explainers/ExplainerFactory.d.ts +3 -4
- package/esm/drivers/explainers/IExplainer.d.ts +1 -2
- package/esm/drivers/explainers/implement/JsonExplainer.d.ts +2 -3
- package/esm/drivers/explainers/implement/index.d.ts +1 -0
- package/esm/drivers/explainers/index.d.ts +1 -2
- package/esm/drivers/features/Feature.d.ts +2 -3
- package/esm/drivers/features/FeatureFactory.d.ts +3 -4
- package/esm/drivers/features/IFeature.d.ts +1 -2
- package/esm/drivers/features/implements/ExpressionFeature.d.ts +2 -3
- package/esm/drivers/features/implements/I18NFeature.d.ts +2 -3
- package/esm/drivers/features/implements/SortFeature.d.ts +2 -3
- package/esm/drivers/features/implements/index.d.ts +3 -0
- package/esm/drivers/features/index.d.ts +2 -3
- package/esm/drivers/hashers/Hasher.d.ts +2 -3
- package/esm/drivers/hashers/HasherFactory.d.ts +3 -4
- package/esm/drivers/hashers/IHasher.d.ts +1 -2
- package/esm/drivers/hashers/implement/Md5Hasher.d.ts +2 -3
- package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +2 -3
- package/esm/drivers/hashers/implement/index.d.ts +2 -0
- package/esm/drivers/hashers/index.d.ts +2 -3
- package/esm/drivers/https/Http.d.ts +3 -5
- package/esm/drivers/https/HttpFactory.d.ts +6 -6
- package/esm/drivers/https/IHttp.d.ts +3 -5
- package/esm/drivers/https/entities/HttpMessage.d.ts +3 -4
- package/esm/drivers/https/entities/HttpModel.d.ts +2 -3
- package/esm/drivers/https/entities/HttpProgress.d.ts +2 -3
- package/esm/drivers/https/entities/HttpRequest.d.ts +2 -3
- package/esm/drivers/https/entities/HttpResponse.d.ts +3 -4
- package/esm/drivers/https/entities/index.d.ts +4 -4
- package/esm/drivers/https/implements/DefaultHttp.d.ts +3 -5
- package/esm/drivers/https/implements/EiHttp.d.ts +13 -18
- package/esm/drivers/https/implements/FeiShuHttp.d.ts +2 -3
- package/esm/drivers/https/implements/HaloHttp.d.ts +4 -9
- package/esm/drivers/https/implements/MkHttp.d.ts +3 -4
- package/esm/drivers/https/implements/index.d.ts +5 -0
- package/esm/drivers/https/index.d.ts +3 -4
- package/esm/drivers/i18ns/I18n.d.ts +12 -13
- package/esm/drivers/i18ns/I18nFactory.d.ts +3 -4
- package/esm/drivers/i18ns/II18n.d.ts +11 -12
- package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +3 -4
- package/esm/drivers/i18ns/implements/index.d.ts +1 -0
- package/esm/drivers/i18ns/index.d.ts +2 -3
- package/esm/drivers/identities/IIdentity.d.ts +15 -0
- package/esm/drivers/identities/Identity.d.ts +11 -0
- package/esm/drivers/identities/IdentityFactory.d.ts +8 -0
- package/esm/drivers/identities/entities/IdentityPayload.d.ts +5 -0
- package/esm/drivers/identities/entities/index.d.ts +1 -0
- package/esm/drivers/identities/implements/DefaultIdentity.d.ts +9 -0
- package/esm/drivers/identities/implements/EiIdentity.d.ts +15 -0
- package/esm/drivers/identities/implements/index.d.ts +2 -0
- package/esm/drivers/identities/index.d.ts +3 -0
- package/esm/drivers/index.d.ts +1 -50
- package/esm/drivers/messengers/IMessenger.d.ts +1 -2
- package/esm/drivers/messengers/Messenger.d.ts +2 -3
- package/esm/drivers/messengers/MessengerFactory.d.ts +5 -6
- package/esm/drivers/messengers/implement/ConsoleMessenger.d.ts +2 -3
- package/esm/drivers/messengers/implement/index.d.ts +1 -0
- package/esm/drivers/messengers/index.d.ts +3 -4
- package/esm/drivers/providers/IProvider.d.ts +1 -2
- package/esm/drivers/providers/Provider.d.ts +2 -3
- package/esm/drivers/providers/ProviderFactory.d.ts +3 -4
- package/esm/drivers/providers/helpers/SqlHelper.d.ts +1 -2
- package/esm/drivers/providers/helpers/index.d.ts +1 -2
- package/esm/drivers/providers/implements/CookieProvider.d.ts +2 -3
- package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +2 -3
- package/esm/drivers/providers/implements/StorageProvider.d.ts +2 -3
- package/esm/drivers/providers/implements/index.d.ts +3 -0
- package/esm/drivers/providers/index.d.ts +2 -3
- package/esm/drivers/signers/ISigner.d.ts +10 -23
- package/esm/drivers/signers/Signer.d.ts +8 -11
- package/esm/drivers/signers/SignerFactory.d.ts +3 -4
- package/esm/drivers/signers/entities/SignerInfo.d.ts +13 -0
- package/esm/drivers/signers/entities/index.d.ts +1 -0
- package/esm/drivers/signers/implements/DefaultSigner.d.ts +11 -11
- package/esm/drivers/signers/implements/EiSigner.d.ts +21 -0
- package/esm/drivers/signers/implements/index.d.ts +2 -0
- package/esm/drivers/signers/index.d.ts +2 -3
- package/esm/drivers/sockets/@types/SubscribedWindow.d.ts +1 -2
- package/esm/drivers/sockets/@types/index.d.ts +1 -2
- package/esm/drivers/sockets/ISocket.d.ts +5 -6
- package/esm/drivers/sockets/Socket.d.ts +6 -7
- package/esm/drivers/sockets/SocketFactory.d.ts +6 -6
- package/esm/drivers/sockets/entities/SocketProgress.d.ts +1 -2
- package/esm/drivers/sockets/entities/SocketResponse.d.ts +1 -2
- package/esm/drivers/sockets/entities/index.d.ts +2 -3
- package/esm/drivers/sockets/implement/DefaultSocket.d.ts +30 -8
- package/esm/drivers/sockets/implement/index.d.ts +1 -0
- package/esm/drivers/sockets/index.d.ts +2 -3
- package/esm/drivers/ssos/ISso.d.ts +4 -12
- package/esm/drivers/ssos/Sso.d.ts +6 -10
- package/esm/drivers/ssos/SsoFactory.d.ts +3 -4
- package/esm/drivers/ssos/entities/SsoUser.d.ts +1 -2
- package/esm/drivers/ssos/entities/index.d.ts +1 -2
- package/esm/drivers/ssos/implements/AnonymousSso.d.ts +5 -10
- package/esm/drivers/ssos/implements/BearerSso.d.ts +4 -9
- package/esm/drivers/ssos/implements/NioSso.d.ts +4 -9
- package/esm/drivers/ssos/implements/SecretSso.d.ts +4 -9
- package/esm/drivers/ssos/implements/WeiXinSso.d.ts +3 -9
- package/esm/drivers/ssos/implements/index.d.ts +5 -0
- package/esm/drivers/ssos/index.d.ts +2 -3
- package/esm/drivers/tasks/ITask.d.ts +1 -2
- package/esm/drivers/tasks/Task.d.ts +2 -3
- package/esm/drivers/tasks/TaskFactory.d.ts +7 -4
- package/esm/drivers/tasks/implement/MemoryTask.d.ts +3 -4
- package/esm/drivers/tasks/implement/index.d.ts +1 -0
- package/esm/drivers/tasks/index.d.ts +2 -3
- package/esm/drivers/templates/ITemplate.d.ts +1 -2
- package/esm/drivers/templates/Template.d.ts +2 -3
- package/esm/drivers/templates/TemplateFactory.d.ts +7 -4
- package/esm/drivers/templates/implement/LiquidTemplate.d.ts +2 -3
- package/esm/drivers/templates/implement/index.d.ts +1 -0
- package/esm/drivers/templates/index.d.ts +2 -3
- package/esm/drivers/util/@types/JsonConfig.d.ts +1 -2
- package/esm/drivers/util/@types/TreeNodeProp.d.ts +1 -2
- package/esm/drivers/util/@types/index.d.ts +2 -3
- package/esm/drivers/util/IUtil.d.ts +1 -2
- package/esm/drivers/util/Util.d.ts +2 -3
- package/esm/drivers/util/UtilFactory.d.ts +4 -5
- package/esm/drivers/util/implements/ArrayUtil.d.ts +2 -3
- package/esm/drivers/util/implements/BrowserUtil.d.ts +2 -3
- package/esm/drivers/util/implements/ComponentUtil.d.ts +2 -3
- package/esm/drivers/util/implements/DictionaryUtil.d.ts +2 -3
- package/esm/drivers/util/implements/DomUtil.d.ts +2 -3
- package/esm/drivers/util/implements/EventUtil.d.ts +2 -3
- package/esm/drivers/util/implements/FileUtil.d.ts +2 -3
- package/esm/drivers/util/implements/HtmlUtil.d.ts +2 -3
- package/esm/drivers/util/implements/ImageUtil.d.ts +2 -3
- package/esm/drivers/util/implements/JsonUtil.d.ts +3 -4
- package/esm/drivers/util/implements/MathUtil.d.ts +2 -3
- package/esm/drivers/util/implements/MicroUtil.d.ts +2 -3
- package/esm/drivers/util/implements/MountUtil.d.ts +2 -3
- package/esm/drivers/util/implements/ObjectUtil.d.ts +2 -3
- package/esm/drivers/util/implements/ScrollUtil.d.ts +2 -3
- package/esm/drivers/util/implements/SignUtil.d.ts +2 -3
- package/esm/drivers/util/implements/StringUtil.d.ts +2 -3
- package/esm/drivers/util/implements/TaskUtil.d.ts +2 -3
- package/esm/drivers/util/implements/TimeUtil.d.ts +2 -3
- package/esm/drivers/util/implements/TreeUtil.d.ts +2 -3
- package/esm/drivers/util/implements/UrlUtil.d.ts +4 -5
- package/esm/drivers/util/implements/index.d.ts +21 -0
- package/esm/drivers/util/index.d.ts +2 -23
- package/esm/drivers/utilities/@types/DragEvent.d.ts +2 -3
- package/esm/drivers/utilities/@types/DragOptions.d.ts +3 -4
- package/esm/drivers/utilities/@types/Position.d.ts +1 -2
- package/esm/drivers/utilities/@types/Rect.d.ts +2 -3
- package/esm/drivers/utilities/@types/index.d.ts +4 -5
- package/esm/drivers/utilities/IUtility.d.ts +1 -2
- package/esm/drivers/utilities/Utility.d.ts +2 -3
- package/esm/drivers/utilities/UtilityFactory.d.ts +4 -11
- package/esm/drivers/utilities/implement/AffixUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/DeltaUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/EventUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/KeyboardUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/MouseUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/RandomUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/SaveUtility.d.ts +3 -8
- package/esm/drivers/utilities/implement/index.d.ts +7 -0
- package/esm/drivers/utilities/index.d.ts +2 -8
- package/esm/drivers/videos/IVideo.d.ts +1 -2
- package/esm/drivers/videos/VideoFactory.d.ts +3 -4
- package/esm/drivers/videos/index.d.ts +1 -2
- package/esm/drivers/voices/Voice.d.ts +1 -2
- package/esm/drivers/voices/VoiceFactory.d.ts +2 -3
- package/esm/drivers/voices/implement/DefaultVoice.d.ts +1 -2
- package/esm/drivers/voices/implement/TencentVoice.d.ts +1 -2
- package/esm/drivers/voices/implement/index.d.ts +2 -0
- package/esm/drivers/voices/index.d.ts +1 -2
- package/esm/factory/Drivers.d.ts +52 -0
- package/esm/factory/Factories.d.ts +8 -5
- package/esm/factory/Factory.d.ts +5 -6
- package/esm/factory/I18ns.d.ts +25 -0
- package/esm/factory/IFactory.d.ts +1 -2
- package/esm/factory/Repos.d.ts +22 -0
- package/esm/factory/Svcs.d.ts +85 -0
- package/esm/factory/Utils.d.ts +2 -3
- package/esm/factory/index.d.ts +7 -4
- package/esm/main.d.ts +3 -3
- package/esm/plugins/Ref.d.ts +1 -2
- package/esm/plugins/index.d.ts +1 -1
- package/esm/repos/IRepo.d.ts +1 -2
- package/esm/repos/Repo.d.ts +2 -3
- package/esm/repos/RepoFactory.d.ts +4 -7
- package/esm/repos/entities/KeyboardType.d.ts +1 -2
- package/esm/repos/entities/index.d.ts +1 -2
- package/esm/repos/implements/ModuleRepo.d.ts +11 -10
- package/esm/repos/implements/QueryRepo.d.ts +2 -3
- package/esm/repos/implements/SettingRepo.d.ts +1 -2
- package/esm/repos/implements/index.d.ts +3 -0
- package/esm/repos/index.d.ts +3 -12
- package/esm/svcs/ISvc.d.ts +1 -2
- package/esm/svcs/Svc.d.ts +2 -3
- package/esm/svcs/SvcFactory.d.ts +4 -5
- package/esm/svcs/entities/AppConfig.d.ts +1 -2
- package/esm/svcs/entities/SysConfig.d.ts +26 -5
- package/esm/svcs/entities/UserConfig.d.ts +1 -2
- package/esm/svcs/entities/index.d.ts +2 -4
- package/esm/svcs/implement/ConfigSvc.d.ts +5 -6
- package/esm/svcs/implement/DriverSvc.d.ts +2 -3
- package/esm/svcs/implement/EnvSvc.d.ts +1 -2
- package/esm/svcs/implement/LogSvc.d.ts +1 -2
- package/esm/svcs/implement/SettingSvc.d.ts +1 -2
- package/esm/svcs/implement/UserSvc.d.ts +1 -2
- package/esm/svcs/implement/index.d.ts +6 -1
- package/esm/svcs/index.d.ts +1 -51
- package/package.json +5 -5
@@ -1,8 +1,8 @@
|
|
1
|
-
import II18n from "./II18n";
|
1
|
+
import { II18n } from "./II18n";
|
2
2
|
/**
|
3
3
|
* 多语言翻译基类
|
4
4
|
*/
|
5
|
-
declare abstract class I18n implements II18n {
|
5
|
+
export declare abstract class I18n implements II18n {
|
6
6
|
type: string;
|
7
7
|
lang: string;
|
8
8
|
messages: {
|
@@ -15,16 +15,16 @@ declare abstract class I18n implements II18n {
|
|
15
15
|
openAsync(conn?: string): Promise<void>;
|
16
16
|
t: (key: string, params?: any) => string;
|
17
17
|
abstract translate(key: string, params: any): string;
|
18
|
-
abstract
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
abstract exists(key: string): boolean;
|
19
|
+
menu: (key: string) => string;
|
20
|
+
module: (type: string, key: string) => string;
|
21
|
+
table: (table: string) => string;
|
22
|
+
field: (table: string, field: string) => string;
|
23
|
+
enum: (name: string, value: string) => string;
|
24
|
+
field_placeholder: (table: string, field: string) => string;
|
25
|
+
field_choose_placeholder: (table: string, field: string) => string;
|
26
|
+
sys: (key: string) => string;
|
27
|
+
title: () => string;
|
28
28
|
/**
|
29
29
|
* 根据key设置多语言标题
|
30
30
|
*/
|
@@ -39,4 +39,3 @@ declare abstract class I18n implements II18n {
|
|
39
39
|
abstract loadAsync(lang: string): Promise<void>;
|
40
40
|
switch: (lang: string) => Promise<void>;
|
41
41
|
}
|
42
|
-
export default I18n;
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import Factory from "../../factory
|
2
|
-
import II18n from "./II18n";
|
1
|
+
import { Factory } from "../../factory";
|
2
|
+
import { II18n } from "./II18n";
|
3
3
|
/**
|
4
4
|
* 多语言工厂
|
5
5
|
*/
|
6
|
-
declare class I18nFactory extends Factory<II18n> {
|
6
|
+
export declare class I18nFactory extends Factory<II18n> {
|
7
7
|
type: string;
|
8
8
|
open(): void;
|
9
9
|
}
|
10
|
-
export default I18nFactory;
|
@@ -2,7 +2,7 @@ import { IDriver, IOpen } from "../@types";
|
|
2
2
|
/**
|
3
3
|
* 多语言翻译接口
|
4
4
|
*/
|
5
|
-
interface II18n extends IDriver, IOpen {
|
5
|
+
export interface II18n extends IDriver, IOpen {
|
6
6
|
/**
|
7
7
|
* 当前语言
|
8
8
|
*/
|
@@ -20,44 +20,44 @@ interface II18n extends IDriver, IOpen {
|
|
20
20
|
/**
|
21
21
|
* 判断指定key是否存在
|
22
22
|
*/
|
23
|
-
|
23
|
+
exists(key: any): boolean;
|
24
24
|
/**
|
25
25
|
* 业务翻译:菜单多语言、多个窗口的多语言同时切换,而不用重载接口
|
26
26
|
*/
|
27
|
-
|
27
|
+
menu(key: string): string;
|
28
28
|
/**
|
29
29
|
* 模块业务翻译
|
30
30
|
*/
|
31
|
-
|
31
|
+
module(type: string, key: string): string;
|
32
32
|
/**
|
33
33
|
* 业务翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
|
34
34
|
*/
|
35
|
-
|
35
|
+
table(table: string): string;
|
36
36
|
/**
|
37
37
|
* 业务翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
|
38
38
|
* 注意:如果结果返回未完毕},则vue编译异常
|
39
39
|
*/
|
40
|
-
|
40
|
+
field(table: string, field: string): string;
|
41
41
|
/**
|
42
42
|
* 枚举翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
|
43
43
|
*/
|
44
|
-
|
44
|
+
enum(name: string, value: string): string;
|
45
45
|
/**
|
46
46
|
* 字段占位符翻译
|
47
47
|
*/
|
48
|
-
|
48
|
+
field_placeholder(table: string, field: string): string;
|
49
49
|
/**
|
50
50
|
* 字段占位符翻译
|
51
51
|
*/
|
52
|
-
|
52
|
+
field_choose_placeholder(table: string, field: string): string;
|
53
53
|
/**
|
54
54
|
* 系统翻译
|
55
55
|
*/
|
56
|
-
|
56
|
+
sys(key: string): string;
|
57
57
|
/**
|
58
58
|
* 系统标题
|
59
59
|
*/
|
60
|
-
|
60
|
+
title(): string;
|
61
61
|
/**
|
62
62
|
* 设置多语言标题
|
63
63
|
*/
|
@@ -81,4 +81,3 @@ interface II18n extends IDriver, IOpen {
|
|
81
81
|
*/
|
82
82
|
switch(lang: string): Promise<void>;
|
83
83
|
}
|
84
|
-
export default II18n;
|
@@ -1,13 +1,12 @@
|
|
1
|
-
import I18n from "../I18n";
|
1
|
+
import { I18n } from "../I18n";
|
2
2
|
/**
|
3
3
|
* 默认翻译
|
4
4
|
* 不用vue-i18n的原因:对json内容的翻译报错无法消除,如:驱动Conn的多语言提示
|
5
5
|
*/
|
6
|
-
declare class DefaultI18n extends I18n {
|
6
|
+
export declare class DefaultI18n extends I18n {
|
7
7
|
type: string;
|
8
8
|
openAsync(conn?: string): Promise<void>;
|
9
9
|
translate: (key: string, params?: any) => string;
|
10
|
-
|
10
|
+
exists: (key: string) => boolean;
|
11
11
|
loadAsync: (lang: string) => Promise<void>;
|
12
12
|
}
|
13
|
-
export default DefaultI18n;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./DefaultI18n";
|
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export { type II18n, I18nFactory };
|
1
|
+
export * from "./II18n";
|
2
|
+
export * from "./I18nFactory";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { IDriver, IOpen } from "../@types";
|
2
|
+
import { HttpRequest } from "../https";
|
3
|
+
/**
|
4
|
+
* 身份认证接口
|
5
|
+
*/
|
6
|
+
export interface IIdentity extends IDriver, IOpen {
|
7
|
+
/**
|
8
|
+
* 加密身份信息,并记录到请求中
|
9
|
+
*/
|
10
|
+
encryptRequest(request: HttpRequest, authId: string, sessionId: string): void;
|
11
|
+
/**
|
12
|
+
* 解密得到身份认证信息实体
|
13
|
+
*/
|
14
|
+
decrypt(): string;
|
15
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { IIdentity } from "./IIdentity";
|
2
|
+
import { HttpRequest } from "../https";
|
3
|
+
/**
|
4
|
+
* 身份认证基类
|
5
|
+
*/
|
6
|
+
export declare abstract class Identity implements IIdentity {
|
7
|
+
type: string;
|
8
|
+
openAsync(conn: string): Promise<void>;
|
9
|
+
abstract encryptRequest(request: HttpRequest, authId: string, sessionId: string): void;
|
10
|
+
abstract decrypt(): string;
|
11
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./IdentityPayload";
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Identity } from "../Identity";
|
2
|
+
import { HttpRequest } from "../../https";
|
3
|
+
/**
|
4
|
+
* 默认身份认证
|
5
|
+
*/
|
6
|
+
export declare class DefaultIdentity extends Identity {
|
7
|
+
encryptRequest(request: HttpRequest, authId: string, sessionId: string): void;
|
8
|
+
decrypt(): string;
|
9
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Identity } from "../Identity";
|
2
|
+
import { ICryptor } from "../../cryptors";
|
3
|
+
import { HttpRequest } from "../../https";
|
4
|
+
/**
|
5
|
+
* EI身份认证
|
6
|
+
*/
|
7
|
+
export declare class EiIdentity extends Identity {
|
8
|
+
/**
|
9
|
+
* 加解密器
|
10
|
+
*/
|
11
|
+
cryptor: ICryptor;
|
12
|
+
openAsync(conn: string): Promise<void>;
|
13
|
+
encryptRequest(request: HttpRequest, authId: string, sessionId: string): void;
|
14
|
+
decrypt(): string;
|
15
|
+
}
|
package/esm/drivers/index.d.ts
CHANGED
@@ -1,53 +1,3 @@
|
|
1
|
-
import { IEncoder } from "./encoders";
|
2
|
-
import { ICdn } from "./cdns";
|
3
|
-
import { IHttp } from "./https";
|
4
|
-
import { II18n } from "./i18ns";
|
5
|
-
import { IHasher } from "./hashers";
|
6
|
-
import { ISocket } from "./sockets";
|
7
|
-
import { ITemplate } from "./templates";
|
8
|
-
import { IMessenger } from "./messengers";
|
9
|
-
import { CreateFeOptions } from "../@types";
|
10
|
-
/**
|
11
|
-
* 默认base64编码
|
12
|
-
*/
|
13
|
-
declare let base64: IEncoder;
|
14
|
-
/**
|
15
|
-
* CDN加载器
|
16
|
-
*/
|
17
|
-
declare let cdn: ICdn;
|
18
|
-
/**
|
19
|
-
* 默认Http请求对象
|
20
|
-
*/
|
21
|
-
declare let http: IHttp;
|
22
|
-
/**
|
23
|
-
* 多语言翻译对象
|
24
|
-
*/
|
25
|
-
declare let i18n: II18n;
|
26
|
-
/**
|
27
|
-
* MD5 hash计算
|
28
|
-
*/
|
29
|
-
declare let md5: IHasher;
|
30
|
-
/**
|
31
|
-
* Socket通信
|
32
|
-
*/
|
33
|
-
declare let socket: ISocket;
|
34
|
-
/**
|
35
|
-
* 默认模板引擎
|
36
|
-
*/
|
37
|
-
declare let template: ITemplate;
|
38
|
-
/**
|
39
|
-
* 初始化消息对象,保证后续更新能够被同步更新
|
40
|
-
*/
|
41
|
-
declare let messenger: IMessenger;
|
42
|
-
/**
|
43
|
-
* 初始化默认驱动实例
|
44
|
-
*/
|
45
|
-
declare let initDriverAsync: (options: CreateFeOptions) => Promise<void>;
|
46
|
-
/**
|
47
|
-
* 提取可导出的翻译方法,当i18n实例变化后,导出的方案会跟着变化?
|
48
|
-
*/
|
49
|
-
declare let t: typeof i18n.t, t_exists: typeof i18n.t_exists, t_sys: typeof i18n.t_sys, t_enum: typeof i18n.t_enum, t_field: typeof i18n.t_field, t_field_choose_placeholder: typeof i18n.t_field_choose_placeholder, t_field_placeholder: typeof i18n.t_field_placeholder, t_table: typeof i18n.t_table, t_module: typeof i18n.t_module, t_menu: typeof i18n.t_menu;
|
50
|
-
export { base64, cdn, http, i18n, md5, socket, template, messenger, initDriverAsync, t, t_exists, t_sys, t_enum, t_field, t_field_choose_placeholder, t_field_placeholder, t_table, t_module, t_menu };
|
51
1
|
export * from "./@types";
|
52
2
|
export * from "./bridges";
|
53
3
|
export * from "./builders";
|
@@ -60,6 +10,7 @@ export * from "./features";
|
|
60
10
|
export * from "./hashers";
|
61
11
|
export * from "./https";
|
62
12
|
export * from "./i18ns";
|
13
|
+
export * from "./identities";
|
63
14
|
export * from "./messengers";
|
64
15
|
export * from "./providers";
|
65
16
|
export * from "./signers";
|
@@ -2,7 +2,7 @@ import { IDriver } from "../@types";
|
|
2
2
|
/**
|
3
3
|
* 消息提示接口,下游自己定义
|
4
4
|
*/
|
5
|
-
interface IMessenger extends IDriver {
|
5
|
+
export interface IMessenger extends IDriver {
|
6
6
|
/**
|
7
7
|
* 显示全局成功消息
|
8
8
|
*/
|
@@ -32,4 +32,3 @@ interface IMessenger extends IDriver {
|
|
32
32
|
*/
|
33
33
|
notify(title: string, message: string, type: string): void;
|
34
34
|
}
|
35
|
-
export default IMessenger;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import IMessenger from "./IMessenger";
|
1
|
+
import { IMessenger } from "./IMessenger";
|
2
2
|
/**
|
3
3
|
* 消息提示基类
|
4
4
|
*/
|
5
|
-
declare abstract class Messenger implements IMessenger {
|
5
|
+
export declare abstract class Messenger implements IMessenger {
|
6
6
|
type: string;
|
7
7
|
abstract alert(title: string, message: string, options?: any): void;
|
8
8
|
abstract confirm(title: string, message: string, options?: any): Promise<any>;
|
@@ -12,4 +12,3 @@ declare abstract class Messenger implements IMessenger {
|
|
12
12
|
abstract success(message: string): void;
|
13
13
|
abstract warning(message: string | number): void;
|
14
14
|
}
|
15
|
-
export default Messenger;
|
@@ -1,14 +1,13 @@
|
|
1
|
-
import Factory from "../../factory
|
2
|
-
import IMessenger from "./IMessenger";
|
1
|
+
import { Factory } from "../../factory";
|
2
|
+
import { IMessenger } from "./IMessenger";
|
3
3
|
/**
|
4
4
|
* 消息工厂
|
5
5
|
*/
|
6
|
-
declare class MessengerFactory extends Factory<IMessenger> {
|
6
|
+
export declare class MessengerFactory extends Factory<IMessenger> {
|
7
7
|
type: string;
|
8
8
|
open(): void;
|
9
9
|
/**
|
10
|
-
*
|
10
|
+
* 创建控制台消息提示类型
|
11
11
|
*/
|
12
|
-
|
12
|
+
createConsole(): IMessenger;
|
13
13
|
}
|
14
|
-
export default MessengerFactory;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import Messenger from "../Messenger";
|
1
|
+
import { Messenger } from "../Messenger";
|
2
2
|
/**
|
3
3
|
* 控制台消息提示
|
4
4
|
*/
|
5
|
-
declare class ConsoleMessenger extends Messenger {
|
5
|
+
export declare class ConsoleMessenger extends Messenger {
|
6
6
|
type: string;
|
7
7
|
alert(title: string, message: string, options?: any): void;
|
8
8
|
confirm(title: string, message: string, options?: any): Promise<any>;
|
@@ -12,4 +12,3 @@ declare class ConsoleMessenger extends Messenger {
|
|
12
12
|
success(message: string): void;
|
13
13
|
warning(message: string | number): void;
|
14
14
|
}
|
15
|
-
export default ConsoleMessenger;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./ConsoleMessenger";
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
export { type IMessenger, Messenger, MessengerFactory };
|
1
|
+
export * from "./IMessenger";
|
2
|
+
export * from "./Messenger";
|
3
|
+
export * from "./MessengerFactory";
|
@@ -2,7 +2,7 @@ import { IDriver, IOpen } from "../@types";
|
|
2
2
|
/**
|
3
3
|
* 数据库提供程序接口
|
4
4
|
*/
|
5
|
-
interface IProvider extends IDriver, IOpen {
|
5
|
+
export interface IProvider extends IDriver, IOpen {
|
6
6
|
/**
|
7
7
|
* 类型
|
8
8
|
*/
|
@@ -56,4 +56,3 @@ interface IProvider extends IDriver, IOpen {
|
|
56
56
|
*/
|
57
57
|
dispose(): void;
|
58
58
|
}
|
59
|
-
export default IProvider;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import IProvider from "./IProvider";
|
1
|
+
import { IProvider } from "./IProvider";
|
2
2
|
/**
|
3
3
|
* 提供程序基类
|
4
4
|
*/
|
5
|
-
declare abstract class Provider implements IProvider {
|
5
|
+
export declare abstract class Provider implements IProvider {
|
6
6
|
type: string;
|
7
7
|
openAsync(conn: string): Promise<void>;
|
8
8
|
createAsync(table: string): Promise<any>;
|
@@ -18,4 +18,3 @@ declare abstract class Provider implements IProvider {
|
|
18
18
|
commit(): void;
|
19
19
|
dispose(): void;
|
20
20
|
}
|
21
|
-
export default Provider;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import IProvider from "./IProvider";
|
2
|
-
import Factory from "../../factory/Factory";
|
1
|
+
import { IProvider } from "./IProvider";
|
2
|
+
import { Factory } from "../../factory/Factory";
|
3
3
|
/**
|
4
4
|
* 数据库提供程序工厂类
|
5
5
|
*/
|
6
|
-
declare class ProviderFactory extends Factory<IProvider> {
|
6
|
+
export declare class ProviderFactory extends Factory<IProvider> {
|
7
7
|
type: string;
|
8
8
|
open(): void;
|
9
9
|
private _default;
|
@@ -16,4 +16,3 @@ declare class ProviderFactory extends Factory<IProvider> {
|
|
16
16
|
*/
|
17
17
|
getStorageAsync(): Promise<IProvider>;
|
18
18
|
}
|
19
|
-
export default ProviderFactory;
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export { SqlHelper };
|
1
|
+
export * from "./SqlHelper";
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import Provider from "../Provider";
|
1
|
+
import { Provider } from "../Provider";
|
2
2
|
/**
|
3
3
|
* Cookie提供程序
|
4
4
|
*/
|
5
|
-
declare class CookieProvider extends Provider {
|
5
|
+
export declare class CookieProvider extends Provider {
|
6
6
|
type: string;
|
7
7
|
getKeysAsync(table: string): Promise<any[]>;
|
8
8
|
deleteAsync(table: string, key: any): Promise<any>;
|
@@ -13,4 +13,3 @@ declare class CookieProvider extends Provider {
|
|
13
13
|
saveAsync(table: string, key: any, entity: any): Promise<any>;
|
14
14
|
updateAsync(table: string, key: any, entity: any): Promise<any>;
|
15
15
|
}
|
16
|
-
export default CookieProvider;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import Provider from "../Provider";
|
1
|
+
import { Provider } from "../Provider";
|
2
2
|
/**
|
3
3
|
* IndexedDB提供程序实现
|
4
4
|
*/
|
5
|
-
declare class IndexedDbProvider extends Provider {
|
5
|
+
export declare class IndexedDbProvider extends Provider {
|
6
6
|
type: string;
|
7
7
|
/**
|
8
8
|
* 静态版本,保证所有数据库实例拿到最新版本信息
|
@@ -61,4 +61,3 @@ declare class IndexedDbProvider extends Provider {
|
|
61
61
|
*/
|
62
62
|
openTransAsync(db: IDBDatabase, table: string, mode: IDBTransactionMode): Promise<IDBTransaction>;
|
63
63
|
}
|
64
|
-
export default IndexedDbProvider;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import Provider from "../Provider";
|
1
|
+
import { Provider } from "../Provider";
|
2
2
|
/**
|
3
3
|
* 本地存储提供程序
|
4
4
|
*/
|
5
|
-
declare class StorageProvider extends Provider {
|
5
|
+
export declare class StorageProvider extends Provider {
|
6
6
|
type: string;
|
7
7
|
getEntityAsync<T>(table: string, key: string): Promise<T>;
|
8
8
|
getAsync(table: string, key: any): Promise<any>;
|
@@ -25,4 +25,3 @@ declare class StorageProvider extends Provider {
|
|
25
25
|
*/
|
26
26
|
getKey(table: string, type: string): string;
|
27
27
|
}
|
28
|
-
export default StorageProvider;
|
@@ -1,33 +1,20 @@
|
|
1
|
+
import { IDriver, IOpen } from "../@types";
|
2
|
+
import { HttpRequest } from "../https";
|
3
|
+
import { SignerInfo } from "./entities";
|
1
4
|
/**
|
2
5
|
* 签名接口
|
3
6
|
*/
|
4
|
-
interface ISigner {
|
7
|
+
export interface ISigner extends IDriver, IOpen {
|
5
8
|
/**
|
6
|
-
*
|
9
|
+
* 计算签名,并记录到请求中
|
7
10
|
*/
|
8
|
-
|
11
|
+
computeRequestAsync(request: HttpRequest, authId: string): Promise<void>;
|
9
12
|
/**
|
10
|
-
*
|
13
|
+
* 计算并得到签名实体
|
11
14
|
*/
|
12
|
-
|
13
|
-
url: string;
|
14
|
-
app_id: string;
|
15
|
-
}): Promise<void>;
|
15
|
+
computeAsync(authId: string, url: string, body: string): Promise<SignerInfo>;
|
16
16
|
/**
|
17
|
-
*
|
17
|
+
* 验证签名
|
18
18
|
*/
|
19
|
-
|
20
|
-
/**
|
21
|
-
* 回调
|
22
|
-
*/
|
23
|
-
callback(token: string): void;
|
24
|
-
/**
|
25
|
-
* 获取签名
|
26
|
-
*/
|
27
|
-
getSign(userId: string, url: string, body: string, timestamp: number, secret: string): Promise<string>;
|
28
|
-
/**
|
29
|
-
* 释放资源
|
30
|
-
*/
|
31
|
-
dispose(): void;
|
19
|
+
verify(): boolean;
|
32
20
|
}
|
33
|
-
export default ISigner;
|
@@ -1,16 +1,13 @@
|
|
1
|
-
import ISigner from "./ISigner";
|
1
|
+
import { ISigner } from "./ISigner";
|
2
|
+
import { HttpRequest } from "../https";
|
3
|
+
import { SignerInfo } from "./entities";
|
2
4
|
/**
|
3
5
|
* 签名器基类
|
4
6
|
*/
|
5
|
-
declare abstract class Signer implements ISigner {
|
7
|
+
export declare abstract class Signer implements ISigner {
|
6
8
|
type: string;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
abstract callback(token: string): void;
|
12
|
-
abstract getSign(userId: string, url: string, body: string, timestamp: number, secret: string): Promise<string>;
|
13
|
-
abstract loginUrl(callback: string): string;
|
14
|
-
abstract dispose(): any;
|
9
|
+
openAsync(conn: string): Promise<void>;
|
10
|
+
abstract computeRequestAsync(request: HttpRequest, authId: string): Promise<void>;
|
11
|
+
abstract computeAsync(authId: string, url: string, body: string): Promise<SignerInfo>;
|
12
|
+
abstract verify(): boolean;
|
15
13
|
}
|
16
|
-
export default Signer;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import ISigner from "./ISigner";
|
2
|
-
import Factory from "../../factory
|
1
|
+
import { ISigner } from "./ISigner";
|
2
|
+
import { Factory } from "../../factory";
|
3
3
|
/**
|
4
4
|
* 签名工厂类
|
5
5
|
*/
|
6
|
-
declare class SignerFactory extends Factory<ISigner> {
|
6
|
+
export declare class SignerFactory extends Factory<ISigner> {
|
7
7
|
type: string;
|
8
8
|
open(): void;
|
9
9
|
/**
|
@@ -11,4 +11,3 @@ declare class SignerFactory extends Factory<ISigner> {
|
|
11
11
|
*/
|
12
12
|
createAsync(type: string, conn?: string): Promise<ISigner>;
|
13
13
|
}
|
14
|
-
export default SignerFactory;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./SignerInfo";
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import Signer from "../Signer";
|
1
|
+
import { Signer } from "../Signer";
|
2
|
+
import { HttpRequest } from "../../https";
|
3
|
+
import { SignerInfo } from "../entities";
|
2
4
|
/**
|
3
5
|
* 默认签名器
|
4
6
|
*/
|
5
|
-
declare class DefaultSigner extends Signer {
|
7
|
+
export declare class DefaultSigner extends Signer {
|
6
8
|
type: string;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
dispose(): void;
|
9
|
+
/**
|
10
|
+
* 验签密钥
|
11
|
+
*/
|
12
|
+
key: string;
|
13
|
+
computeRequestAsync(request: HttpRequest, authId: string): Promise<void>;
|
14
|
+
computeAsync: (authId: string, url: string, body: string) => Promise<SignerInfo>;
|
15
|
+
verify(): boolean;
|
15
16
|
}
|
16
|
-
export default DefaultSigner;
|