@yelon/util 19.2.0 → 20.0.0-beta.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.
Files changed (121) hide show
  1. package/array/index.d.ts +149 -2
  2. package/browser/index.d.ts +134 -5
  3. package/config/index.d.ts +1423 -14
  4. package/date-time/index.d.ts +115 -2
  5. package/decorator/index.d.ts +37 -2
  6. package/fesm2022/array.mjs +9 -8
  7. package/fesm2022/array.mjs.map +1 -1
  8. package/fesm2022/browser.mjs +7 -6
  9. package/fesm2022/browser.mjs.map +1 -1
  10. package/fesm2022/config.mjs +3 -3
  11. package/fesm2022/config.mjs.map +1 -1
  12. package/fesm2022/date-time.mjs.map +1 -1
  13. package/fesm2022/decorator.mjs +1 -66
  14. package/fesm2022/decorator.mjs.map +1 -1
  15. package/fesm2022/form.mjs.map +1 -1
  16. package/fesm2022/format.mjs +8 -7
  17. package/fesm2022/format.mjs.map +1 -1
  18. package/fesm2022/math.mjs.map +1 -1
  19. package/fesm2022/mcache.mjs.map +1 -1
  20. package/fesm2022/mtypes.mjs.map +1 -1
  21. package/fesm2022/other.mjs +6 -6
  22. package/fesm2022/other.mjs.map +1 -1
  23. package/fesm2022/pipe-currency.mjs +13 -13
  24. package/fesm2022/pipe-currency.mjs.map +1 -1
  25. package/fesm2022/pipe-filter.mjs +7 -7
  26. package/fesm2022/pipe-filter.mjs.map +1 -1
  27. package/fesm2022/pipe-format.mjs +7 -7
  28. package/fesm2022/pipe-format.mjs.map +1 -1
  29. package/fesm2022/token.mjs.map +1 -1
  30. package/form/index.d.ts +80 -2
  31. package/format/index.d.ts +239 -4
  32. package/math/index.d.ts +50 -2
  33. package/mcache/index.d.ts +21 -1
  34. package/mtypes/index.d.ts +197 -9
  35. package/other/index.d.ts +154 -7
  36. package/package.json +12 -12
  37. package/pipes/currency/index.d.ts +52 -4
  38. package/pipes/filter/index.d.ts +21 -2
  39. package/pipes/format/index.d.ts +36 -2
  40. package/token/index.d.ts +18 -2
  41. package/array/array-type.service.d.ts +0 -68
  42. package/array/array.service.d.ts +0 -78
  43. package/browser/cookie.service.d.ts +0 -62
  44. package/browser/copy.d.ts +0 -6
  45. package/browser/is-empty.d.ts +0 -6
  46. package/browser/scroll.service.d.ts +0 -34
  47. package/browser/style.d.ts +0 -19
  48. package/config/abc/cell.type.d.ts +0 -118
  49. package/config/abc/date-picker.type.d.ts +0 -49
  50. package/config/abc/error-collect.type.d.ts +0 -10
  51. package/config/abc/exception.type.d.ts +0 -7
  52. package/config/abc/image.type.d.ts +0 -15
  53. package/config/abc/index.d.ts +0 -17
  54. package/config/abc/loading.type.d.ts +0 -29
  55. package/config/abc/lodop.type.d.ts +0 -33
  56. package/config/abc/media.type.d.ts +0 -10
  57. package/config/abc/onboarding.type.d.ts +0 -4
  58. package/config/abc/page-header.type.d.ts +0 -39
  59. package/config/abc/pdf.type.d.ts +0 -35
  60. package/config/abc/se.type.d.ts +0 -32
  61. package/config/abc/sg.type.d.ts +0 -10
  62. package/config/abc/st.type.d.ts +0 -464
  63. package/config/abc/sv.type.d.ts +0 -14
  64. package/config/abc/xlsx.type.d.ts +0 -12
  65. package/config/abc/zip.type.d.ts +0 -10
  66. package/config/acl/acl.type.d.ts +0 -31
  67. package/config/auth/auth.type.d.ts +0 -55
  68. package/config/bis/bis.type.d.ts +0 -11
  69. package/config/cache/cache.type.d.ts +0 -66
  70. package/config/chart/chart.type.d.ts +0 -30
  71. package/config/config.service.d.ts +0 -14
  72. package/config/config.types.d.ts +0 -51
  73. package/config/mock/mock.type.d.ts +0 -14
  74. package/config/sf/sf.type.d.ts +0 -130
  75. package/config/socket/socket.type.d.ts +0 -4
  76. package/config/theme/http.type.d.ts +0 -15
  77. package/config/theme/i18n.type.d.ts +0 -14
  78. package/config/theme/index.d.ts +0 -4
  79. package/config/theme/pipe.type.d.ts +0 -7
  80. package/config/theme/responsive.type.d.ts +0 -10
  81. package/config/util/array.type.d.ts +0 -22
  82. package/config/util/currency.type.d.ts +0 -39
  83. package/date-time/picker.d.ts +0 -68
  84. package/date-time/time.d.ts +0 -42
  85. package/decorator/convert.d.ts +0 -31
  86. package/decorator/zone-outside.d.ts +0 -35
  87. package/form/match-control.d.ts +0 -15
  88. package/form/validators.d.ts +0 -62
  89. package/format/currency.service.d.ts +0 -38
  90. package/format/currency.types.d.ts +0 -82
  91. package/format/string.d.ts +0 -41
  92. package/format/validate.d.ts +0 -72
  93. package/math/in-range.d.ts +0 -14
  94. package/math/round.d.ts +0 -33
  95. package/mcache/localStorageUtils.d.ts +0 -19
  96. package/mtypes/authority.type.d.ts +0 -3
  97. package/mtypes/header-menu.type.d.ts +0 -12
  98. package/mtypes/menu.type.d.ts +0 -40
  99. package/mtypes/nav.types.d.ts +0 -29
  100. package/mtypes/page.d.ts +0 -46
  101. package/mtypes/project-info.types.d.ts +0 -22
  102. package/mtypes/response.d.ts +0 -7
  103. package/mtypes/role.type.d.ts +0 -10
  104. package/mtypes/user.types.d.ts +0 -22
  105. package/other/assert.d.ts +0 -36
  106. package/other/deep.d.ts +0 -32
  107. package/other/favicon.d.ts +0 -2
  108. package/other/lazy.service.d.ts +0 -44
  109. package/other/logger.d.ts +0 -4
  110. package/other/path-to-regexp.service.d.ts +0 -26
  111. package/other/resize.d.ts +0 -1
  112. package/pipes/currency/cny.pipe.d.ts +0 -14
  113. package/pipes/currency/mega.pipe.d.ts +0 -15
  114. package/pipes/currency/module.d.ts +0 -9
  115. package/pipes/currency/price.pipe.d.ts +0 -18
  116. package/pipes/filter/filter.pipe.d.ts +0 -12
  117. package/pipes/filter/module.d.ts +0 -7
  118. package/pipes/format/mask.pipe.d.ts +0 -27
  119. package/pipes/format/module.d.ts +0 -7
  120. package/token/page-visibility.d.ts +0 -8
  121. package/token/window.d.ts +0 -7
@@ -1,464 +0,0 @@
1
- import { HttpHeaders, HttpParams } from '@angular/common/http';
2
- import { TemplateRef, TrackByFunction } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
5
- import type { NzDrawerOptions } from 'ng-zorro-antd/drawer';
6
- import type { ModalOptions } from 'ng-zorro-antd/modal';
7
- import type { PaginationItemRenderContext } from 'ng-zorro-antd/pagination';
8
- import type { NzTableSortOrder } from 'ng-zorro-antd/table';
9
- export interface YunzaiSTConfig {
10
- /**
11
- * 起始页码,默认为:`1`
12
- */
13
- pi?: number;
14
- /**
15
- * 每页数量,默认:`10`
16
- */
17
- ps?: number;
18
- /**
19
- * 是否显示边框,默认:`false`
20
- */
21
- bordered?: boolean;
22
- /**
23
- * table大小,默认:`default`
24
- */
25
- size?: 'small' | 'middle' | 'default';
26
- /**
27
- * 是否开启响应式,默认:`true`
28
- */
29
- responsive?: boolean;
30
- /**
31
- * 是否在小屏幕下才显示顶部与底部,默认:`false`
32
- */
33
- responsiveHideHeaderFooter?: boolean;
34
- /** 请求体配置 */
35
- req?: {
36
- /**
37
- * 分页类型,默认:`page`
38
- * - `page` 使用 `pi`,`ps` 组合
39
- * - `skip` 使用 `skip`,`limit` 组合
40
- */
41
- type?: 'page' | 'skip';
42
- /**
43
- * Whether to ignore `null` or `unfind` values in parameters
44
- *
45
- * 是否忽略参数中 `null` 或 `undefind` 值
46
- */
47
- ignoreParamNull?: boolean;
48
- /** 请求方法,默认:`GET` */
49
- method?: string;
50
- /** 请求体 `Header` */
51
- headers?: NzSafeAny;
52
- /**
53
- * 重命名参数 `pi`、`ps`,默认:`{ pi: 'pi', ps: 'ps', skip: 'skip', limit: 'limit' }`
54
- * - `{ pi: 'Page' }` => `pi` 会被替换成 Page
55
- */
56
- reName?: {
57
- pi?: string;
58
- ps?: string;
59
- skip?: string;
60
- limit?: string;
61
- };
62
- /**
63
- * 是否将请求所有参数数据都放入 `body` 当中(`url` 地址本身参数除外),仅当 `method: 'POST'` 时有效,默认:`false`
64
- */
65
- allInBody?: boolean;
66
- /**
67
- * 是否延迟加载数据,即渲染结束后不会主动发起请求,默认:`false`
68
- */
69
- lazyLoad?: boolean;
70
- /**
71
- * 请求前数据处理
72
- */
73
- process?: (requestOptions: NzSafeAny) => NzSafeAny;
74
- };
75
- /** 返回体配置 */
76
- res?: {
77
- /**
78
- * 重命名返回参数 `total`、`list`,默认:`{ list: ['list'], total: ['total'] }`
79
- * - `{ total: 'Total' }` => Total 会被当作 `total`
80
- */
81
- reName?: {
82
- total?: string | string[];
83
- list?: string | string[];
84
- } | ((result: NzSafeAny, options: {
85
- pi: number;
86
- ps: number;
87
- total: number;
88
- }) => {
89
- total: number;
90
- list: NzSafeAny[];
91
- });
92
- /**
93
- * 数据预处理
94
- */
95
- process?: (data: NzSafeAny[], rawData?: NzSafeAny) => NzSafeAny[];
96
- };
97
- /** 返回体配置 */
98
- page?: {
99
- /**
100
- * 前端分页,当 `data` 为`any[]` 或 `Observable<any[]>` 有效,默认:`true`
101
- * - `true` 由 `st` 根据 `data` 长度受控分页,包括:排序、过滤等
102
- * - `false` 由用户通过 `total` 和 `data` 参数受控分页,并维护 `(change)` 当分页变更时重新加载数据
103
- */
104
- front?: boolean;
105
- /**
106
- * 后端分页是否采用`0`基索引,只在`data`类型为`string`时有效,默认:`false`
107
- */
108
- zeroIndexed?: boolean;
109
- /**
110
- * 指定分页显示的位置,默认:`bottom`
111
- */
112
- position?: 'top' | 'bottom' | 'both';
113
- /**
114
- * 指定分页分页方向,默认:`right`
115
- */
116
- placement?: 'left' | 'center' | 'right';
117
- /**
118
- * 是否显示分页器,默认:`true`
119
- */
120
- show?: boolean;
121
- /**
122
- * 是否显示分页器中改变页数,默认:`false`
123
- */
124
- showSize?: boolean;
125
- /**
126
- * 分页器中每页显示条目数下拉框值,默认:`[10, 20, 30, 40, 50]`
127
- */
128
- pageSizes?: number[];
129
- /**
130
- * 是否显示分页器中快速跳转,默认:`false`
131
- */
132
- showQuickJumper?: boolean;
133
- /**
134
- * 是否显示总数据量,默认:`true`
135
- * - `boolean` 类型显示与否,默认模板:`共 {{total}} 条`
136
- * - `string` 自定义模板,模板变量:
137
- * - `{{total}}` 表示数据总量
138
- * - `{{range[0]}}` 表示当前页开始数量值
139
- * - `{{range[1]}}` 表示当前页结束数量值
140
- */
141
- total?: string | boolean;
142
- /**
143
- * 用于自定义页码的结构,用法参照 Pagination 组件
144
- */
145
- itemRender?: TemplateRef<PaginationItemRenderContext> | null;
146
- /**
147
- * 当添加该属性时,显示为简单分页,默认:`false`
148
- */
149
- simple?: boolean;
150
- /**
151
- * 切换分页时返回顶部,默认:`true`
152
- */
153
- toTop?: boolean;
154
- /**
155
- * 返回顶部偏移值,默认:`100`
156
- */
157
- toTopOffset?: number;
158
- };
159
- /**
160
- * 重命名排序值,`columns` 的重命名高于属性
161
- */
162
- sortReName?: {
163
- ascend?: string;
164
- descend?: string;
165
- };
166
- /**
167
- * 排序状态
168
- */
169
- sortDirections?: NzTableSortOrder[];
170
- /**
171
- * 单排序规则
172
- * - 若不指定,则返回:`columnName=ascend|descend`
173
- * - 若指定,则返回:`sort=columnName.(ascend|descend)`
174
- */
175
- singleSort?: {
176
- /** 请求参数名,默认:`sort` */
177
- key?: string;
178
- /** 列名与状态间分隔符,默认:`.` */
179
- nameSeparator?: string;
180
- };
181
- /**
182
- * 是否多排序,当 `sort` 多个相同值时自动合并,建议后端支持时使用
183
- */
184
- multiSort?: {
185
- /** 请求参数名,默认:`sort` */
186
- key?: string;
187
- /** 不同属性间分隔符,默认:`-` */
188
- separator?: string;
189
- /** 列名与状态间分隔符,默认:`.` */
190
- nameSeparator?: string;
191
- /**
192
- * 是否以数组的形式传递参数
193
- * - `true` 表示使用 `url?sort=name.asc&sort=age.desc` 形式
194
- * - `false` 表示使用 `url?sort=name.asc-age.desc` 形式
195
- */
196
- arrayParam?: boolean;
197
- /**
198
- * 是否全局多排序模式,默认:`true`
199
- * - `true` 表示所有 `st` 默认为多排序
200
- * - `false` 表示需要为每个 `st` 添加 `multiSort` 才会视为多排序模式
201
- */
202
- global?: boolean;
203
- /**
204
- * 是否保持空值的键名,默认:`true`
205
- * - `true` 表示不管是否有排序都会发送 `key` 键名
206
- * - `false` 表示无排序动作时不会发送 `key` 键名
207
- */
208
- keepEmptyKey?: boolean;
209
- };
210
- /**
211
- * 按钮模态框配置
212
- */
213
- modal?: {
214
- /**
215
- * 是否只传递纯净数据
216
- */
217
- pureRecoard?: boolean;
218
- /**
219
- * 指定模态框目标组件的接收参数名,默认:`record`
220
- */
221
- paramsName?: string;
222
- /** 大小;例如:lg、600,默认:`lg` */
223
- size?: 'sm' | 'md' | 'lg' | 'xl' | '' | number;
224
- /** 对话框 [ModalOptions](https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/modal/modal-types.ts) 参数 */
225
- modalOptions?: ModalOptions;
226
- /** 是否精准(默认:`true`),若返回值非空值(`null`或`undefined`)视为成功,否则视为错误 */
227
- exact?: boolean;
228
- };
229
- /**
230
- * 按钮抽屉配置
231
- */
232
- drawer?: {
233
- /**
234
- * 是否只传递纯净数据
235
- */
236
- pureRecoard?: boolean;
237
- /**
238
- * 抽屉目标组件的接收参数名,默认:`record`
239
- */
240
- paramsName?: string;
241
- /**
242
- * 大小;例如:lg、600,默认:`md`
243
- *
244
- * | 类型 | 默认大小 |
245
- * | --- | ------ |
246
- * | `sm` | `300` |
247
- * | `md` | `600` |
248
- * | `lg` | `900` |
249
- * | `xl` | `1200` |
250
- *
251
- * > 以上值,可通过覆盖相应的LESS参数自行调整
252
- */
253
- size?: 'sm' | 'md' | 'lg' | 'xl' | number;
254
- /**
255
- * 是否包含底部工具条,默认:`true`
256
- */
257
- footer?: boolean;
258
- /**
259
- * 底部工具条高度,默认:`55`
260
- */
261
- footerHeight?: number;
262
- /** 抽屉 [NzDrawerOptions](https://ng.ant.design/components/drawer/zh#nzdraweroptions) 参数 */
263
- drawerOptions?: NzDrawerOptions;
264
- };
265
- /**
266
- * 气泡参数
267
- */
268
- pop?: {
269
- /**
270
- * Title of the popover, default: `确认删除吗?`
271
- */
272
- title?: string;
273
- /**
274
- * Popover trigger mode, default: `click`
275
- */
276
- trigger?: 'click' | 'focus' | 'hover';
277
- /**
278
- * The position of the popover relative to the target, default: `top`
279
- */
280
- placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
281
- /**
282
- * Class name of the popover card
283
- */
284
- overlayClassName?: string;
285
- /**
286
- * Style of the popover card
287
- */
288
- overlayStyle?: Record<string, string>;
289
- /**
290
- * Text of the Cancel button
291
- */
292
- cancelText?: string;
293
- /**
294
- * Text of the Confirm button
295
- */
296
- okText?: string;
297
- /**
298
- * Button `type` of the Confirm button
299
- */
300
- okType?: 'primary' | 'ghost' | 'dashed' | 'danger' | 'default';
301
- /**
302
- * Customize icon of confirmation
303
- */
304
- icon?: string;
305
- };
306
- /**
307
- * 过滤按钮确认文本
308
- */
309
- filterConfirmText?: string;
310
- /**
311
- * 过滤按钮重置文本
312
- */
313
- filterClearText?: string;
314
- /**
315
- * 按钮图标
316
- */
317
- btnIcon?: {
318
- /** 图标主题风格,默认:`outline` */
319
- theme?: 'outline' | 'twotone' | 'fill';
320
- /** 是否有旋转动画,默认:`false` */
321
- spin?: boolean;
322
- /** 仅适用双色图标,设置双色图标的主要颜色,仅对当前 icon 生效 */
323
- twoToneColor?: string;
324
- /** 指定来自 IconFont 的图标类型 */
325
- iconfont?: string;
326
- };
327
- /**
328
- * 行号索引,默认:`1`
329
- * - 计算规则为:`index + noIndex`
330
- */
331
- noIndex?: number;
332
- /**
333
- * 表格行的类名
334
- */
335
- rowClassName?: (record: NzSafeAny, index: number) => string;
336
- /**
337
- * 通过点击行来展开子行,Default: `false`
338
- */
339
- expandRowByClick?: boolean;
340
- /**
341
- * 手风琴模式,Default: `false`
342
- */
343
- expandAccordion?: boolean;
344
- /**
345
- * 指定 `width` 模式
346
- */
347
- widthMode?: {
348
- /**
349
- * 宽度类型,默认:`default`
350
- * - `default` 默认行为
351
- * - `strict` 严格模式,即强制按 `width` 指定的宽度呈现,并根据 `strictBehavior` 类型处理
352
- */
353
- type?: 'strict' | 'default';
354
- /**
355
- * 严格模式的处理行为,默认:`truncate`
356
- * - `wrap` 强制换行
357
- * - `truncate` 截短
358
- */
359
- strictBehavior?: 'wrap' | 'truncate';
360
- };
361
- /**
362
- * Default: `54`
363
- */
364
- virtualItemSize?: number;
365
- /**
366
- * Default: `200`
367
- */
368
- virtualMaxBufferPx?: number;
369
- /**
370
- * Default: `100`
371
- */
372
- virtualMinBufferPx?: number;
373
- /**
374
- * The TrackByFunction to use for tracking changes
375
- */
376
- virtualForTrackBy?: TrackByFunction<unknown>;
377
- /**
378
- * Conditional expression rendering behavior, can be set to `hide` (default) or `disabled`, Default: `hide`
379
- */
380
- iifBehavior?: 'hide' | 'disabled';
381
- /**
382
- * The spinning indicator
383
- */
384
- loadingIndicator?: TemplateRef<void>;
385
- /**
386
- * Specifies a delay in milliseconds for loading state (prevent flush)
387
- */
388
- loadingDelay?: number;
389
- /**
390
- * Custom no result content
391
- */
392
- noResult?: string | TemplateRef<void>;
393
- /**
394
- * Safe rendering type, default: `safeHtml`
395
- *
396
- * 安全渲染方式,默认:`safeHtml`
397
- */
398
- safeType?: 'text' | 'html' | 'safeHtml';
399
- /**
400
- * Override the default request behavior, you can customize your own request implementation, for example: Graphql
401
- *
402
- * 覆盖默认的请求行为,可以自定义自己的请求实现,例如:Graphql
403
- */
404
- customRequest?: (options: {
405
- method: string;
406
- url: string;
407
- options: {
408
- body?: unknown;
409
- headers?: HttpHeaders | Record<string, string | string[]>;
410
- params?: HttpParams | Record<string, string | string[]>;
411
- };
412
- }) => Observable<NzSafeAny>;
413
- /**
414
- * Date format
415
- *
416
- * 日期格式化
417
- */
418
- date?: {
419
- /**
420
- * Format string, default: `yyyy-MM-dd HH:mm`
421
- *
422
- * 格式化字符串,默认:`yyyy-MM-dd HH:mm`
423
- */
424
- format: string;
425
- };
426
- yn?: {
427
- /**
428
- * 真值条件,(默认:`true`)
429
- */
430
- truth?: unknown;
431
- /**
432
- * 徽章 `true` 时文本,(默认:`是`)
433
- */
434
- yes?: string;
435
- /**
436
- * 徽章 `false` 时文本,(默认:`否`)
437
- */
438
- no?: string;
439
- /**
440
- * 徽章显示风格,默认:`icon`
441
- * - `full` 图标和文本
442
- * - `icon` 图标
443
- * - `text` 文本
444
- */
445
- mode?: 'full' | 'icon' | 'text';
446
- };
447
- /**
448
- * Max button option can be showed, and the extra part are auto generated under `more`
449
- *
450
- * 配置最多显示多少个按钮,多余部分自动生成至 `更多` 下面
451
- *
452
- * > 注意:若在 `buttons` 下配置过按钮组会导致其失效
453
- */
454
- maxMultipleButton?: {
455
- /**
456
- * 更多按钮文本,默认:`更多`
457
- */
458
- text?: string;
459
- /**
460
- * 超出数量自动合并,默认:`2`
461
- */
462
- count?: number;
463
- };
464
- }
@@ -1,14 +0,0 @@
1
- export declare class YunzaiSVConfig {
2
- /** 大小,默认:`large` */
3
- size?: 'small' | 'large';
4
- /** 间距,默认:`32` */
5
- gutter?: number;
6
- /** 布局,默认:`horizontal` */
7
- layout?: 'horizontal' | 'vertical';
8
- /** 列数,默认:`3` */
9
- col?: number;
10
- /** 是否显示默认值,当内容为空值时显示 `-`,默认:`true` */
11
- default?: boolean;
12
- /** `label` 固定宽度,若 `null` 或 `undefined` 表示非固定,默认:`null` */
13
- labelWidth?: number;
14
- }
@@ -1,12 +0,0 @@
1
- export interface YunzaiXlsxConfig {
2
- /**
3
- * Xlsx library path, default: `//cdn.bootcss.com/xlsx/0.15.6/xlsx.full.min.js`
4
- */
5
- url?: string;
6
- /**
7
- * Defines which Xlsx optional modules should get loaded, e.g:
8
- *
9
- * `[ '//cdn.bootcss.com/xlsx/0.15.6/cpexcel.js' ]`
10
- */
11
- modules?: string[];
12
- }
@@ -1,10 +0,0 @@
1
- export interface YunzaiZipConfig {
2
- /**
3
- * Zip library path, Default: `//cdn.bootcss.com/jszip/3.3.0/jszip.min.js`
4
- */
5
- url?: string;
6
- /**
7
- * Defines which zip optional utils should get loaded
8
- */
9
- utils?: string[];
10
- }
@@ -1,31 +0,0 @@
1
- export interface YunzaiACLConfig {
2
- /**
3
- * Router URL when guard fail, default: `/403`
4
- */
5
- guard_url?: string;
6
- /**
7
- * `can` before execution callback
8
- */
9
- preCan?: ((roleOrAbility: number | number[] | string | string[] | YunzaiACLType) => YunzaiACLType | null) | null;
10
- }
11
- export interface YunzaiACLType {
12
- /**
13
- * 角色
14
- */
15
- role?: string[];
16
- /**
17
- * 权限点
18
- */
19
- ability?: number[] | string[];
20
- /**
21
- * Validated against, default: `oneOf`
22
- * - `allOf` the value validates against all the roles or abilities
23
- * - `oneOf` the value validates against exactly one of the roles or abilities
24
- */
25
- mode?: 'allOf' | 'oneOf';
26
- /**
27
- * 是否取反,即结果为 `true` 时表示未授权
28
- */
29
- except?: boolean;
30
- [key: string]: any;
31
- }
@@ -1,55 +0,0 @@
1
- export interface YunzaiAuthConfig {
2
- /**
3
- * 是否自动完成认证流程
4
- */
5
- auto?: boolean;
6
- /**
7
- * 存储KEY值,默认:`_token`
8
- */
9
- store_key?: string;
10
- /**
11
- * 无效时跳转至登录页,默认:`true`,包括:
12
- * - 无效token值
13
- * - token已过期(限JWT)
14
- */
15
- token_invalid_redirect?: boolean;
16
- /**
17
- * token过期时间偏移值,默认:`10` 秒(单位:秒)
18
- */
19
- token_exp_offset?: number;
20
- /**
21
- * 发送token参数名,默认:·
22
- */
23
- token_send_key?: string;
24
- /**
25
- * 发送token模板(默认为:`'${token}'`),使用 `${token}` 表示token点位符(**注意:**请务必使用 \`\` 包裹),例如:
26
- *
27
- * - `Bearer ${token}`
28
- */
29
- token_send_template?: string;
30
- /**
31
- * 发送token参数位置,默认:`header`
32
- */
33
- token_send_place?: 'header' | 'body' | 'url';
34
- /**
35
- * 登录页路由地址,默认:`/login`
36
- */
37
- login_url?: string;
38
- /**
39
- * 忽略TOKEN的URL地址列表,默认值为:`[/\/assets\//]`
40
- */
41
- ignores?: RegExp[];
42
- /**
43
- * 允许匿名登录KEY,若请求参数中带有该KEY表示忽略TOKEN,默认:`_allow_anonymous`
44
- */
45
- allow_anonymous_key?: string;
46
- /**
47
- * 刷新间隔时长(单位:ms),默认:`3000`
48
- */
49
- refreshTime?: number;
50
- /**
51
- * 过期计算偏移值(单位:ms),默认:`6000`
52
- * - **建议**根据 `refreshTime` 倍数来设置
53
- */
54
- refreshOffset?: number;
55
- }
@@ -1,11 +0,0 @@
1
- export interface YunzaiBusinessConfig {
2
- baseUrl?: string;
3
- systemCode?: string;
4
- loginForm?: FormData | null;
5
- refreshTokenEnabled?: boolean;
6
- refreshTokenType?: 're-request' | 'auth-refresh';
7
- nav?: {
8
- mine?: boolean;
9
- all?: boolean;
10
- };
11
- }
@@ -1,66 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- export interface YunzaiCacheConfig {
3
- /**
4
- * Cache mode, default: `promise`
5
- * - `promise` Convention mode, allowing `key` to get data as http
6
- * - `none` Normal mode
7
- */
8
- mode?: 'promise' | 'none';
9
- /**
10
- * Rename the return parameters, default: ``, for example:
11
- * - `null` The response body is content
12
- * - `list` The response body should be `{ list: [] }`
13
- * - `result.list` The response body should be `{ result: { list: [] } }`
14
- */
15
- reName?: string | string[];
16
- /**
17
- * Set the default storage type
18
- * - `m` Storage via memory
19
- * - `s` Storage via `localStorage`
20
- */
21
- type?: 'm' | 's';
22
- /**
23
- * Set the default expire time (Unit: second)
24
- */
25
- expire?: number;
26
- /**
27
- * Key prefix of persistent data, default: ``
28
- */
29
- prefix?: string;
30
- /**
31
- * Key name of persistent data metadata storage, default: `__cache_meta`
32
- */
33
- meta_key?: string;
34
- /**
35
- * 自定义请求体
36
- *
37
- * Custom request
38
- */
39
- request?: (key: string) => Observable<unknown>;
40
- /**
41
- * Default configuration of interceptor
42
- *
43
- * 拦截器默认配置项
44
- */
45
- interceptor?: YunzaiCacheInterceptor;
46
- }
47
- export interface YunzaiCacheInterceptor {
48
- /**
49
- * Whether to enable, default `true`
50
- *
51
- * 是否启用,默认 `true`
52
- */
53
- enabled?: boolean;
54
- /**
55
- * Specify the storage method, `m` means memory, `s` means persistence; default: `m`
56
- *
57
- * 指定存储方式,`m` 表示内存,`s` 表示持久化;默认:`m`
58
- */
59
- saveType?: 'm' | 's';
60
- /**
61
- * Whether to trigger a notification, default: `true`
62
- *
63
- * 是否触发通知,默认:`true`
64
- */
65
- emitNotify?: boolean;
66
- }
@@ -1,30 +0,0 @@
1
- export interface YunzaiChartConfig {
2
- /**
3
- * [G2](https://g2.antv.vision/zh/docs/manual/getting-started) library path
4
- * default: `[
5
- * "https://gw.alipayobjects.com/os/lib/antv/g2/4.1.14/dist/g2.min.js",
6
- * "https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.8/dist/data-set.js",
7
- * ]`
8
- */
9
- libs?: string[];
10
- theme?: string | Record<string, any>;
11
- /**
12
- * [ECharts](https://echarts.apache.org/) library path
13
- * default: `[
14
- * "https://cdnjs.cloudflare.com/ajax/libs/echarts/5.1.0/echarts.min.js",
15
- * "https://cdnjs.cloudflare.com/ajax/libs/echarts/5.1.0/i18n/langZH.min.js",
16
- * "https://cdnjs.cloudflare.com/ajax/libs/echarts/5.1.0/theme/dark.min.js"
17
- * ]`
18
- */
19
- echartsLib?: string;
20
- /**
21
- * [ECharts](https://echarts.apache.org/zh/download-extension.html) library path, like i18n, theme etc
22
- */
23
- echartsExtensions?: string[];
24
- /**
25
- * Theme configuration item, you can load the default theme file with `echartsExtensions`
26
- *
27
- * 主题配置项,可以配合 `echartsExtensions` 加载默认的主题文件
28
- */
29
- echartsTheme?: string | Record<string, unknown> | null;
30
- }