clickgo 5.19.2 → 6.0.0

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.
@@ -227,10 +227,29 @@ export interface IApp {
227
227
  'type': 'app';
228
228
  /** --- 控件对象配置文件 --- */
229
229
  'config': IAppConfig;
230
- /** --- 所有已加载的文件内容 --- */
231
- 'files': Record<string, Blob | string>;
232
230
  /** --- 应用图标 --- */
233
231
  'icon': string;
232
+ /** --- 新 CGA 的按需解密包读取器 --- */
233
+ 'package': IAppPackage;
234
+ }
235
+ /** --- CGA 包内项目 --- */
236
+ export interface IAppPackageEntry {
237
+ 'isDirectory': boolean;
238
+ 'isFile': boolean;
239
+ 'name': string;
240
+ }
241
+ /** --- CGA 包内项目属性 --- */
242
+ export interface IAppPackageStats {
243
+ 'isDirectory': boolean;
244
+ 'isFile': boolean;
245
+ 'size': number;
246
+ }
247
+ /** --- CGA 按需解密包读取器 --- */
248
+ export interface IAppPackage {
249
+ getContent(path: string): Promise<Blob | string | null>;
250
+ stats(path: string): IAppPackageStats | null;
251
+ readDir(path: string): IAppPackageEntry[];
252
+ clear(): void;
234
253
  }
235
254
  /** --- 应用文件包 config --- */
236
255
  export interface IAppConfig {
@@ -8,6 +8,8 @@ import * as lControl from './control';
8
8
  export declare function initSysId(id: string): void;
9
9
  /** --- Panel 与 Form 共用的抽象类 --- */
10
10
  declare abstract class AbstractCommon {
11
+ /** --- 当前视图内局部注册的应用组件 --- */
12
+ readonly components: Record<string, new () => AbstractComponent>;
11
13
  /** --- 当前文件在包内的路径 --- */
12
14
  get filename(): string;
13
15
  /** --- 当前控件的名字 --- */
@@ -122,6 +124,52 @@ export declare abstract class AbstractPanel extends AbstractCommon {
122
124
  /** --- 无论是 show 还是 qschange 都会触发,优先触发 show 或 qschange 事件本身,之后触发这个 --- */
123
125
  onQsChangeShow(e: IAbstractPanelQsChangeShowEvent): void | Promise<void>;
124
126
  }
127
+ /** --- Form/Panel 内使用的应用局部组件抽象类 --- */
128
+ export declare abstract class AbstractComponent extends AbstractCommon {
129
+ /** --- 当前组件内继续局部注册的应用组件 --- */
130
+ readonly components: Record<string, new () => AbstractComponent>;
131
+ /** --- 当前组件所在窗体的创建序号 --- */
132
+ get findex(): number;
133
+ /** --- 当前组件所在窗体的窗体对象 --- */
134
+ private _rootForm;
135
+ get rootForm(): AbstractForm & Record<string, any>;
136
+ /** --- 当前组件是否跟随宿主窗体获得焦点 --- */
137
+ get formFocus(): boolean;
138
+ /** --- 获取宿主 Form/Panel 的语言内容 --- */
139
+ get l(): (key: string, data?: string[]) => string;
140
+ /** --- 获取宿主窗体语言内容 --- */
141
+ get fl(): (key: string, data?: string[]) => string;
142
+ /** --- 应用组件动态 class 的隔离前缀 --- */
143
+ get classPrepend(): (cla: any) => string;
144
+ /** --- 组件内部文件,由系统重写 --- */
145
+ readonly packageFiles: Record<string, Blob | string>;
146
+ /** --- 组件参数,由用户定义重写 --- */
147
+ readonly props: {};
148
+ /** --- 组件事件,由用户定义重写 --- */
149
+ readonly emits: Record<string, null | ((payload: any) => boolean)>;
150
+ /** --- 组件的子插槽 --- */
151
+ readonly slots: Record<string, () => any[]>;
152
+ /** --- 获取某插槽所有子项 --- */
153
+ get slotsAll(): (name: string) => any[];
154
+ /** --- 获取 props 中的 boolean 类型值 --- */
155
+ get propBoolean(): (name: keyof this['props']) => boolean;
156
+ /** --- 获取 props 中的 number 类型值 --- */
157
+ get propNumber(): (name: keyof this['props']) => number;
158
+ /** --- 获取 props 中的 int 类型值 --- */
159
+ get propInt(): (name: keyof this['props']) => number;
160
+ /** --- 获取 props 中的 array 类型值 --- */
161
+ get propArray(): (name: keyof this['props']) => any[];
162
+ /** --- 向上触发组件事件 --- */
163
+ emit(name: string, ...v: any[]): void;
164
+ /** --- 获取上层控件或组件 --- */
165
+ get parent(): lControl.AbstractControl & AbstractComponent & AbstractForm & Record<string, any>;
166
+ /** --- 根据 controlName 查询上层对象 --- */
167
+ get parentByName(): (controlName: string) => Record<string, any> | null;
168
+ /** --- 根据 access 查询上层对象 --- */
169
+ get parentByAccess(): (name: string, val: string) => Record<string, any> | null;
170
+ /** --- 组件挂载好后触发 --- */
171
+ onMounted(): void | Promise<void>;
172
+ }
125
173
  /** --- 窗体的抽象类 --- */
126
174
  export declare abstract class AbstractForm extends AbstractCommon {
127
175
  /** --- 当前是否完全创建完毕 --- */
@@ -100,9 +100,9 @@ export declare function match(str: string, regs: RegExp[]): boolean;
100
100
  * --- 将 style 中的 url 转换成 base64 data url ---
101
101
  * @param path 路径基准或以文件的路径为基准,以 / 结尾
102
102
  * @param style 样式表
103
- * @param files 在此文件列表中查找
103
+ * @param files 在此文件列表或读取器中查找
104
104
  */
105
- export declare function styleUrl2DataUrl(path: string, style: string, files: Record<string, Blob | string>): Promise<string>;
105
+ export declare function styleUrl2DataUrl(path: string, style: string, files: Record<string, Blob | string> | ((path: string) => Promise<Blob | string | null>)): Promise<string>;
106
106
  /**
107
107
  * --- 给标签增加 tag-tagname 的 class,同时给标签增加 cg- 前导(仅字符串,不是操作真实 dom) ---
108
108
  * @param layout layout
Binary file
Binary file