@alauda-fe/dynamic-plugin-shared 0.0.1-alpha.8 → 0.0.3-alpha.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 (395) hide show
  1. package/assets/i18n/en/dynamic-plugin-shared.json +3 -0
  2. package/assets/images/overview-banner.svg +1 -0
  3. package/fesm2022/alauda-fe-dynamic-plugin-shared.mjs +3038 -1828
  4. package/fesm2022/alauda-fe-dynamic-plugin-shared.mjs.map +1 -1
  5. package/package.json +15 -17
  6. package/styles/lib.scss +1 -1
  7. package/styles/mixins.scss +1 -210
  8. package/styles/var.scss +1 -26
  9. package/types/alauda-fe-dynamic-plugin-shared.d.ts +5692 -0
  10. package/array-form-table/base-string-map-form.component.d.ts +0 -22
  11. package/array-form-table/form/component.d.ts +0 -106
  12. package/array-form-table/form/index.d.ts +0 -3
  13. package/array-form-table/index.d.ts +0 -10
  14. package/array-form-table/key-value-form/component.d.ts +0 -38
  15. package/array-form-table/key-value-table/component.d.ts +0 -9
  16. package/array-form-table/string-array-form/component.d.ts +0 -41
  17. package/async-data/async-data-loader.d.ts +0 -31
  18. package/async-data/error-page/component.d.ts +0 -30
  19. package/async-data/index.d.ts +0 -13
  20. package/async-data/page-state/component.d.ts +0 -21
  21. package/async-data/types.d.ts +0 -29
  22. package/code-editor/code-display-dialog/component.d.ts +0 -17
  23. package/code-editor/code-editor-configs.d.ts +0 -19
  24. package/code-editor/index.d.ts +0 -10
  25. package/code-editor/k8s-yaml-display-dialog/component.d.ts +0 -16
  26. package/code-editor/resource-yaml-display/component.d.ts +0 -21
  27. package/components/card-section/card-section.component.d.ts +0 -9
  28. package/components/confirm-delete/confirm-delete.component.d.ts +0 -57
  29. package/components/confirm-delete/utils.d.ts +0 -25
  30. package/components/current-time/component.d.ts +0 -14
  31. package/components/custom-columns-setting/component.d.ts +0 -16
  32. package/components/custom-columns-setting/index.d.ts +0 -1
  33. package/components/date-range-picker/component.d.ts +0 -55
  34. package/components/date-range-picker/index.d.ts +0 -3
  35. package/components/date-range-picker/type.d.ts +0 -36
  36. package/components/date-range-picker/util.d.ts +0 -11
  37. package/components/disabled-container/disabled-container.component.d.ts +0 -21
  38. package/components/disabled-container/index.d.ts +0 -7
  39. package/components/field-set/column/component.d.ts +0 -10
  40. package/components/field-set/group/component.d.ts +0 -6
  41. package/components/field-set/index.d.ts +0 -7
  42. package/components/field-set/item/component.d.ts +0 -13
  43. package/components/foldable-block/component.d.ts +0 -17
  44. package/components/foldable-item-in-table/component.d.ts +0 -21
  45. package/components/help-document/component.d.ts +0 -29
  46. package/components/help-document/directive.d.ts +0 -20
  47. package/components/help-document/index.d.ts +0 -8
  48. package/components/help-document/service.d.ts +0 -20
  49. package/components/index.d.ts +0 -32
  50. package/components/loading-mask/loading-mask.component.d.ts +0 -13
  51. package/components/page-guard/component/component.d.ts +0 -40
  52. package/components/page-guard/component/helper-directives.d.ts +0 -17
  53. package/components/page-guard/component/page-guard.type.d.ts +0 -86
  54. package/components/page-guard/index.d.ts +0 -12
  55. package/components/password-input/component.d.ts +0 -39
  56. package/components/pod-status/component.d.ts +0 -25
  57. package/components/pod-status/index.d.ts +0 -3
  58. package/components/pod-status/status.d.ts +0 -4
  59. package/components/pod-status/typings.d.ts +0 -16
  60. package/components/relative-time/component.d.ts +0 -15
  61. package/components/resource-label/component.d.ts +0 -25
  62. package/components/resource-multi-select/component.d.ts +0 -41
  63. package/components/resource-multi-select/util.d.ts +0 -10
  64. package/components/search-panel/component.d.ts +0 -16
  65. package/components/search-panel/helper.directive.d.ts +0 -5
  66. package/components/search-panel/search-item/component.d.ts +0 -7
  67. package/components/select-prefix-label/directive.d.ts +0 -17
  68. package/components/status-icon/status-icon.component.d.ts +0 -16
  69. package/components/tags-label/component.d.ts +0 -56
  70. package/components/terminating-tag/component.d.ts +0 -7
  71. package/components/text-ellipsis/component.d.ts +0 -9
  72. package/components/text-tooltip/directive.d.ts +0 -21
  73. package/components/text-with-url/component.d.ts +0 -12
  74. package/components/upload-file/component.d.ts +0 -32
  75. package/components/workload-status/component.d.ts +0 -37
  76. package/components/workload-status/index.d.ts +0 -1
  77. package/components/zero-state/zero-state.component.d.ts +0 -17
  78. package/constants/common.d.ts +0 -64
  79. package/constants/index.d.ts +0 -6
  80. package/constants/k8s.d.ts +0 -12
  81. package/constants/patterns.d.ts +0 -124
  82. package/constants/resource-definitions.d.ts +0 -414
  83. package/constants/status-icons.d.ts +0 -34
  84. package/constants/timezones.d.ts +0 -6
  85. package/directives/aui-code-editor.directive.d.ts +0 -13
  86. package/directives/click-outside.directive.d.ts +0 -12
  87. package/directives/declare.directive.d.ts +0 -8
  88. package/directives/disabled.directive.d.ts +0 -28
  89. package/directives/effect-directive/coerce-number.directive.d.ts +0 -8
  90. package/directives/effect-directive/e2e-attribute-binding.directive.d.ts +0 -10
  91. package/directives/effect-directive/event.directive.d.ts +0 -47
  92. package/directives/effect-directive/index.d.ts +0 -12
  93. package/directives/effect-directive/min-max.directive.d.ts +0 -30
  94. package/directives/effect-directive/trim.directive.d.ts +0 -7
  95. package/directives/effect-directive/validators.directive.d.ts +0 -12
  96. package/directives/feature-gate.directive.d.ts +0 -31
  97. package/directives/index.d.ts +0 -12
  98. package/directives/last-form-item.directive.d.ts +0 -8
  99. package/directives/readonly-field.directive.d.ts +0 -39
  100. package/directives/resize.directive.d.ts +0 -17
  101. package/directives/scroll-border-observer.directive.d.ts +0 -23
  102. package/directives/scroll-to-first-invalid.directive.d.ts +0 -24
  103. package/directives/value-trace.directive.d.ts +0 -27
  104. package/esm2022/alauda-fe-dynamic-plugin-shared.mjs +0 -5
  105. package/esm2022/array-form-table/base-string-map-form.component.mjs +0 -92
  106. package/esm2022/array-form-table/form/component.mjs +0 -266
  107. package/esm2022/array-form-table/form/index.mjs +0 -13
  108. package/esm2022/array-form-table/index.mjs +0 -11
  109. package/esm2022/array-form-table/key-value-form/component.mjs +0 -135
  110. package/esm2022/array-form-table/key-value-table/component.mjs +0 -24
  111. package/esm2022/array-form-table/string-array-form/component.mjs +0 -168
  112. package/esm2022/async-data/async-data-loader.mjs +0 -63
  113. package/esm2022/async-data/error-page/component.mjs +0 -54
  114. package/esm2022/async-data/index.mjs +0 -18
  115. package/esm2022/async-data/page-state/component.mjs +0 -62
  116. package/esm2022/async-data/types.mjs +0 -6
  117. package/esm2022/code-editor/code-display-dialog/component.mjs +0 -35
  118. package/esm2022/code-editor/code-editor-configs.mjs +0 -66
  119. package/esm2022/code-editor/index.mjs +0 -11
  120. package/esm2022/code-editor/k8s-yaml-display-dialog/component.mjs +0 -26
  121. package/esm2022/code-editor/resource-yaml-display/component.mjs +0 -67
  122. package/esm2022/components/card-section/card-section.component.mjs +0 -24
  123. package/esm2022/components/confirm-delete/confirm-delete.component.mjs +0 -192
  124. package/esm2022/components/confirm-delete/utils.mjs +0 -8
  125. package/esm2022/components/current-time/component.mjs +0 -39
  126. package/esm2022/components/custom-columns-setting/component.mjs +0 -75
  127. package/esm2022/components/custom-columns-setting/index.mjs +0 -2
  128. package/esm2022/components/date-range-picker/component.mjs +0 -215
  129. package/esm2022/components/date-range-picker/index.mjs +0 -4
  130. package/esm2022/components/date-range-picker/type.mjs +0 -2
  131. package/esm2022/components/date-range-picker/util.mjs +0 -57
  132. package/esm2022/components/disabled-container/disabled-container.component.mjs +0 -81
  133. package/esm2022/components/disabled-container/index.mjs +0 -8
  134. package/esm2022/components/field-set/column/component.mjs +0 -25
  135. package/esm2022/components/field-set/group/component.mjs +0 -16
  136. package/esm2022/components/field-set/index.mjs +0 -14
  137. package/esm2022/components/field-set/item/component.mjs +0 -41
  138. package/esm2022/components/foldable-block/component.mjs +0 -60
  139. package/esm2022/components/foldable-item-in-table/component.mjs +0 -56
  140. package/esm2022/components/help-document/component.mjs +0 -69
  141. package/esm2022/components/help-document/directive.mjs +0 -70
  142. package/esm2022/components/help-document/index.mjs +0 -9
  143. package/esm2022/components/help-document/service.mjs +0 -43
  144. package/esm2022/components/index.mjs +0 -33
  145. package/esm2022/components/loading-mask/loading-mask.component.mjs +0 -35
  146. package/esm2022/components/page-guard/component/component.mjs +0 -101
  147. package/esm2022/components/page-guard/component/helper-directives.mjs +0 -51
  148. package/esm2022/components/page-guard/component/page-guard.type.mjs +0 -82
  149. package/esm2022/components/page-guard/index.mjs +0 -19
  150. package/esm2022/components/password-input/component.mjs +0 -143
  151. package/esm2022/components/pod-status/component.mjs +0 -49
  152. package/esm2022/components/pod-status/index.mjs +0 -4
  153. package/esm2022/components/pod-status/status.mjs +0 -84
  154. package/esm2022/components/pod-status/typings.mjs +0 -19
  155. package/esm2022/components/relative-time/component.mjs +0 -58
  156. package/esm2022/components/resource-label/component.mjs +0 -100
  157. package/esm2022/components/resource-multi-select/component.mjs +0 -152
  158. package/esm2022/components/resource-multi-select/util.mjs +0 -24
  159. package/esm2022/components/search-panel/component.mjs +0 -51
  160. package/esm2022/components/search-panel/helper.directive.mjs +0 -14
  161. package/esm2022/components/search-panel/search-item/component.mjs +0 -15
  162. package/esm2022/components/select-prefix-label/directive.mjs +0 -89
  163. package/esm2022/components/status-icon/status-icon.component.mjs +0 -56
  164. package/esm2022/components/tags-label/component.mjs +0 -224
  165. package/esm2022/components/terminating-tag/component.mjs +0 -16
  166. package/esm2022/components/text-ellipsis/component.mjs +0 -28
  167. package/esm2022/components/text-tooltip/directive.mjs +0 -71
  168. package/esm2022/components/text-with-url/component.mjs +0 -40
  169. package/esm2022/components/upload-file/component.mjs +0 -95
  170. package/esm2022/components/workload-status/component.mjs +0 -33
  171. package/esm2022/components/workload-status/index.mjs +0 -2
  172. package/esm2022/components/zero-state/zero-state.component.mjs +0 -56
  173. package/esm2022/constants/common.mjs +0 -86
  174. package/esm2022/constants/index.mjs +0 -7
  175. package/esm2022/constants/k8s.mjs +0 -13
  176. package/esm2022/constants/patterns.mjs +0 -142
  177. package/esm2022/constants/resource-definitions.mjs +0 -424
  178. package/esm2022/constants/status-icons.mjs +0 -65
  179. package/esm2022/constants/timezones.mjs +0 -234
  180. package/esm2022/directives/aui-code-editor.directive.mjs +0 -30
  181. package/esm2022/directives/click-outside.directive.mjs +0 -49
  182. package/esm2022/directives/declare.directive.mjs +0 -27
  183. package/esm2022/directives/disabled.directive.mjs +0 -76
  184. package/esm2022/directives/effect-directive/coerce-number.directive.mjs +0 -54
  185. package/esm2022/directives/effect-directive/e2e-attribute-binding.directive.mjs +0 -57
  186. package/esm2022/directives/effect-directive/event.directive.mjs +0 -129
  187. package/esm2022/directives/effect-directive/index.mjs +0 -21
  188. package/esm2022/directives/effect-directive/min-max.directive.mjs +0 -107
  189. package/esm2022/directives/effect-directive/trim.directive.mjs +0 -40
  190. package/esm2022/directives/effect-directive/validators.directive.mjs +0 -43
  191. package/esm2022/directives/feature-gate.directive.mjs +0 -90
  192. package/esm2022/directives/index.mjs +0 -13
  193. package/esm2022/directives/last-form-item.directive.mjs +0 -18
  194. package/esm2022/directives/readonly-field.directive.mjs +0 -145
  195. package/esm2022/directives/resize.directive.mjs +0 -39
  196. package/esm2022/directives/scroll-border-observer.directive.mjs +0 -77
  197. package/esm2022/directives/scroll-to-first-invalid.directive.mjs +0 -126
  198. package/esm2022/directives/value-trace.directive.mjs +0 -61
  199. package/esm2022/form/base-form-container.mjs +0 -126
  200. package/esm2022/form/base-nested-form-control.mjs +0 -190
  201. package/esm2022/form/errors-mapper/base-errors-mapper.mjs +0 -41
  202. package/esm2022/form/errors-mapper/default-errors-mapper.service.mjs +0 -65
  203. package/esm2022/form/errors-mapper/errors-mapper-component/component.mjs +0 -53
  204. package/esm2022/form/errors-mapper/errors-mapper.directive.mjs +0 -109
  205. package/esm2022/form/errors-mapper/index.mjs +0 -10
  206. package/esm2022/form/errors-mapper/types.mjs +0 -2
  207. package/esm2022/form/index.mjs +0 -6
  208. package/esm2022/form/utils.mjs +0 -61
  209. package/esm2022/form/validators/async-function-validator.directive.mjs +0 -49
  210. package/esm2022/form/validators/dns1123-subdomain.mjs +0 -42
  211. package/esm2022/form/validators/function-validator.directive.mjs +0 -49
  212. package/esm2022/form/validators/index.mjs +0 -10
  213. package/esm2022/form/validators/maxlength-minlength-validator.directive.mjs +0 -71
  214. package/esm2022/form/validators/not-be-validator.directive.mjs +0 -56
  215. package/esm2022/form/validators/one-of-validator.directive.mjs +0 -57
  216. package/esm2022/form/validators/resource-limit.mjs +0 -79
  217. package/esm2022/form/validators/strong-password/index.mjs +0 -4
  218. package/esm2022/form/validators/strong-password/strong-password-tooltip/component.mjs +0 -15
  219. package/esm2022/form/validators/strong-password/strong-password-validator.directive.mjs +0 -171
  220. package/esm2022/form/validators/strong-password/strong-password-validator.module.mjs +0 -36
  221. package/esm2022/form/validators/utils.mjs +0 -155
  222. package/esm2022/index.mjs +0 -15
  223. package/esm2022/k8s-resource-list/footer/component.mjs +0 -161
  224. package/esm2022/k8s-resource-list/index.mjs +0 -18
  225. package/esm2022/k8s-resource-list/k8s-resource-list.mjs +0 -224
  226. package/esm2022/k8s-resource-list/k8s-resource-paged-list.mjs +0 -174
  227. package/esm2022/k8s-resource-list/types.mjs +0 -11
  228. package/esm2022/k8s-resource-list/utils.mjs +0 -84
  229. package/esm2022/k8s-shared/constants.mjs +0 -53
  230. package/esm2022/k8s-shared/index.mjs +0 -12
  231. package/esm2022/k8s-shared/k8s-resource-translate-key.pipe.mjs +0 -31
  232. package/esm2022/k8s-shared/k8s-shared-util.service.mjs +0 -152
  233. package/esm2022/k8s-shared/resource-mark/component.mjs +0 -54
  234. package/esm2022/k8s-shared/resource-mark/util.mjs +0 -137
  235. package/esm2022/k8s-shared/update-description-dialog/component.mjs +0 -66
  236. package/esm2022/k8s-shared/update-display-name-dialog/component.mjs +0 -59
  237. package/esm2022/k8s-shared/update-key-value-dialog/component.mjs +0 -76
  238. package/esm2022/page-deactivate/deactivate.directive.mjs +0 -50
  239. package/esm2022/page-deactivate/deactivate.guard.mjs +0 -41
  240. package/esm2022/page-deactivate/deactivate.service.mjs +0 -78
  241. package/esm2022/page-deactivate/index.mjs +0 -4
  242. package/esm2022/pipes/calc.pipe.mjs +0 -21
  243. package/esm2022/pipes/cron-human-readable.pipe.mjs +0 -30
  244. package/esm2022/pipes/crontab-next.pipe.mjs +0 -67
  245. package/esm2022/pipes/duration.pipe.mjs +0 -51
  246. package/esm2022/pipes/field-not-available.pipe.mjs +0 -25
  247. package/esm2022/pipes/img-header.pipe.mjs +0 -18
  248. package/esm2022/pipes/img-theme.pipe.mjs +0 -38
  249. package/esm2022/pipes/index.mjs +0 -19
  250. package/esm2022/pipes/keyvalue.pipe.mjs +0 -20
  251. package/esm2022/pipes/marked.pipe.mjs +0 -18
  252. package/esm2022/pipes/minimum-format.pipe.mjs +0 -25
  253. package/esm2022/pipes/page-env.pipe.mjs +0 -69
  254. package/esm2022/pipes/parse-json-translate.pipe.mjs +0 -28
  255. package/esm2022/pipes/parse-json.pipe.mjs +0 -22
  256. package/esm2022/pipes/pure.pipe.mjs +0 -26
  257. package/esm2022/pipes/safe.pipe.mjs +0 -49
  258. package/esm2022/pipes/sanitize.pipe.mjs +0 -31
  259. package/esm2022/pipes/time.pipe.mjs +0 -113
  260. package/esm2022/pipes/timezone-display.pipe.mjs +0 -21
  261. package/esm2022/services/form-row-duplicate/form-row-duplicate.service.mjs +0 -280
  262. package/esm2022/services/index.mjs +0 -4
  263. package/esm2022/services/on-resize.service.mjs +0 -52
  264. package/esm2022/services/yaml-util.service.mjs +0 -99
  265. package/esm2022/types/common.mjs +0 -6
  266. package/esm2022/types/helpers.mjs +0 -12
  267. package/esm2022/types/index.mjs +0 -9
  268. package/esm2022/types/k8s/core.mjs +0 -2
  269. package/esm2022/types/k8s/crd.mjs +0 -57
  270. package/esm2022/types/k8s/index.mjs +0 -4
  271. package/esm2022/types/k8s/raw.mjs +0 -77
  272. package/esm2022/types/schema.mjs +0 -2
  273. package/esm2022/utils/browser.mjs +0 -21
  274. package/esm2022/utils/cache-store.mjs +0 -83
  275. package/esm2022/utils/color-helpers.mjs +0 -6
  276. package/esm2022/utils/common.mjs +0 -315
  277. package/esm2022/utils/cron-util.mjs +0 -44
  278. package/esm2022/utils/decorators.mjs +0 -137
  279. package/esm2022/utils/disabled-state.mjs +0 -47
  280. package/esm2022/utils/format-number.mjs +0 -227
  281. package/esm2022/utils/index.mjs +0 -24
  282. package/esm2022/utils/local-storage-constants.mjs +0 -2
  283. package/esm2022/utils/node.mjs +0 -18
  284. package/esm2022/utils/observable.mjs +0 -32
  285. package/esm2022/utils/operators.mjs +0 -38
  286. package/esm2022/utils/request-pool.mjs +0 -37
  287. package/esm2022/utils/resources.mjs +0 -66
  288. package/esm2022/utils/router.mjs +0 -20
  289. package/esm2022/utils/sort-fn.mjs +0 -7
  290. package/esm2022/utils/tree.mjs +0 -79
  291. package/esm2022/utils/unit.mjs +0 -191
  292. package/esm2022/utils/version.mjs +0 -76
  293. package/esm2022/utils/with-load-state.mjs +0 -21
  294. package/esm2022/utils/workload.mjs +0 -183
  295. package/esm2022/utils/workspace.mjs +0 -59
  296. package/esm2022/utils/yaml.mjs +0 -54
  297. package/form/base-form-container.d.ts +0 -41
  298. package/form/base-nested-form-control.d.ts +0 -58
  299. package/form/errors-mapper/base-errors-mapper.d.ts +0 -13
  300. package/form/errors-mapper/default-errors-mapper.service.d.ts +0 -10
  301. package/form/errors-mapper/errors-mapper-component/component.d.ts +0 -19
  302. package/form/errors-mapper/errors-mapper.directive.d.ts +0 -39
  303. package/form/errors-mapper/index.d.ts +0 -6
  304. package/form/errors-mapper/types.d.ts +0 -16
  305. package/form/index.d.ts +0 -5
  306. package/form/utils.d.ts +0 -40
  307. package/form/validators/async-function-validator.directive.d.ts +0 -11
  308. package/form/validators/dns1123-subdomain.d.ts +0 -28
  309. package/form/validators/function-validator.directive.d.ts +0 -11
  310. package/form/validators/index.d.ts +0 -9
  311. package/form/validators/maxlength-minlength-validator.directive.d.ts +0 -20
  312. package/form/validators/not-be-validator.directive.d.ts +0 -12
  313. package/form/validators/one-of-validator.directive.d.ts +0 -12
  314. package/form/validators/resource-limit.d.ts +0 -17
  315. package/form/validators/strong-password/index.d.ts +0 -3
  316. package/form/validators/strong-password/strong-password-tooltip/component.d.ts +0 -6
  317. package/form/validators/strong-password/strong-password-validator.directive.d.ts +0 -34
  318. package/form/validators/strong-password/strong-password-validator.module.d.ts +0 -12
  319. package/form/validators/utils.d.ts +0 -67
  320. package/index.d.ts +0 -14
  321. package/k8s-resource-list/footer/component.d.ts +0 -43
  322. package/k8s-resource-list/index.d.ts +0 -13
  323. package/k8s-resource-list/k8s-resource-list.d.ts +0 -42
  324. package/k8s-resource-list/k8s-resource-paged-list.d.ts +0 -61
  325. package/k8s-resource-list/types.d.ts +0 -70
  326. package/k8s-resource-list/utils.d.ts +0 -19
  327. package/k8s-shared/constants.d.ts +0 -7
  328. package/k8s-shared/index.d.ts +0 -11
  329. package/k8s-shared/k8s-resource-translate-key.pipe.d.ts +0 -9
  330. package/k8s-shared/k8s-shared-util.service.d.ts +0 -48
  331. package/k8s-shared/resource-mark/component.d.ts +0 -16
  332. package/k8s-shared/resource-mark/util.d.ts +0 -2
  333. package/k8s-shared/update-description-dialog/component.d.ts +0 -33
  334. package/k8s-shared/update-display-name-dialog/component.d.ts +0 -27
  335. package/k8s-shared/update-key-value-dialog/component.d.ts +0 -38
  336. package/page-deactivate/deactivate.directive.d.ts +0 -18
  337. package/page-deactivate/deactivate.guard.d.ts +0 -13
  338. package/page-deactivate/deactivate.service.d.ts +0 -28
  339. package/page-deactivate/index.d.ts +0 -3
  340. package/pipes/calc.pipe.d.ts +0 -11
  341. package/pipes/cron-human-readable.pipe.d.ts +0 -9
  342. package/pipes/crontab-next.pipe.d.ts +0 -18
  343. package/pipes/duration.pipe.d.ts +0 -10
  344. package/pipes/field-not-available.pipe.d.ts +0 -13
  345. package/pipes/img-header.pipe.d.ts +0 -7
  346. package/pipes/img-theme.pipe.d.ts +0 -13
  347. package/pipes/index.d.ts +0 -18
  348. package/pipes/keyvalue.pipe.d.ts +0 -9
  349. package/pipes/marked.pipe.d.ts +0 -8
  350. package/pipes/minimum-format.pipe.d.ts +0 -10
  351. package/pipes/page-env.pipe.d.ts +0 -34
  352. package/pipes/parse-json-translate.pipe.d.ts +0 -8
  353. package/pipes/parse-json.pipe.d.ts +0 -7
  354. package/pipes/pure.pipe.d.ts +0 -17
  355. package/pipes/safe.pipe.d.ts +0 -10
  356. package/pipes/sanitize.pipe.d.ts +0 -10
  357. package/pipes/time.pipe.d.ts +0 -40
  358. package/pipes/timezone-display.pipe.d.ts +0 -10
  359. package/services/form-row-duplicate/form-row-duplicate.service.d.ts +0 -45
  360. package/services/index.d.ts +0 -3
  361. package/services/on-resize.service.d.ts +0 -20
  362. package/services/yaml-util.service.d.ts +0 -20
  363. package/styles/global.scss +0 -904
  364. package/types/common.d.ts +0 -42
  365. package/types/helpers.d.ts +0 -35
  366. package/types/index.d.ts +0 -8
  367. package/types/k8s/core.d.ts +0 -100
  368. package/types/k8s/crd.d.ts +0 -497
  369. package/types/k8s/index.d.ts +0 -3
  370. package/types/k8s/raw.d.ts +0 -860
  371. package/types/schema.d.ts +0 -14
  372. package/utils/browser.d.ts +0 -4
  373. package/utils/cache-store.d.ts +0 -35
  374. package/utils/color-helpers.d.ts +0 -4
  375. package/utils/common.d.ts +0 -64
  376. package/utils/cron-util.d.ts +0 -8
  377. package/utils/decorators.d.ts +0 -14
  378. package/utils/disabled-state.d.ts +0 -20
  379. package/utils/format-number.d.ts +0 -11
  380. package/utils/index.d.ts +0 -23
  381. package/utils/local-storage-constants.d.ts +0 -1
  382. package/utils/node.d.ts +0 -8
  383. package/utils/observable.d.ts +0 -5
  384. package/utils/operators.d.ts +0 -22
  385. package/utils/request-pool.d.ts +0 -12
  386. package/utils/resources.d.ts +0 -19
  387. package/utils/router.d.ts +0 -3
  388. package/utils/sort-fn.d.ts +0 -2
  389. package/utils/tree.d.ts +0 -16
  390. package/utils/unit.d.ts +0 -21
  391. package/utils/version.d.ts +0 -39
  392. package/utils/with-load-state.d.ts +0 -11
  393. package/utils/workload.d.ts +0 -66
  394. package/utils/workspace.d.ts +0 -28
  395. package/utils/yaml.d.ts +0 -11
@@ -1,59 +0,0 @@
1
- import { ActivatedRoute, } from '@angular/router';
2
- export function parseWorkspace(workspace) {
3
- if (!workspace) {
4
- return null;
5
- }
6
- const [project, cluster, namespace] = workspace.split('~');
7
- const workspaceObj = { project, cluster, namespace };
8
- return isValidWorkspace(workspaceObj) ? workspaceObj : null;
9
- }
10
- export function stringifyWorkspace(workspace, strict = true) {
11
- if (!strict && !workspace.project) {
12
- Object.assign(workspace, { project: 'default' });
13
- }
14
- return isValidWorkspace(workspace)
15
- ? `${workspace.project}~${workspace.cluster}~${workspace.namespace}`
16
- : '';
17
- }
18
- export function isValidWorkspace(obj) {
19
- return !!(obj?.project && obj?.cluster && obj?.namespace);
20
- }
21
- export function parseRID(rid) {
22
- if (!rid) {
23
- return null;
24
- }
25
- const [project, cluster, namespace, name] = rid.split('~');
26
- const ridObj = { project, cluster, namespace, name };
27
- return isValidRID(ridObj) ? ridObj : null;
28
- }
29
- export function stringifyRID(p1, p2) {
30
- return isValidWorkspace(p1) && p2
31
- ? `${p1.project}~${p1.cluster}~${p1.namespace}~${p2}`
32
- : isValidRID(p1)
33
- ? `${p1.project}~${p1.cluster}~${p1.namespace}~${p1.name}`
34
- : '';
35
- }
36
- export function isValidRID(obj) {
37
- return !!(obj?.project && obj?.cluster && obj?.namespace && obj?.name);
38
- }
39
- export function extractWorkspace(params) {
40
- return params.get && params.get instanceof Function
41
- ? parseWorkspace(params.get('workspace'))
42
- : parseWorkspace(params.workspace);
43
- }
44
- export function extractWorkspaceFromRoute(route) {
45
- const snapshot = route instanceof ActivatedRoute ? route.snapshot : route;
46
- return parseWorkspace(snapshot.paramMap.get('workspace'));
47
- }
48
- // owner: ait
49
- export const workspaceToPath = (workspace) => {
50
- if (!workspace) {
51
- return '';
52
- }
53
- const { project, namespace, cluster } = workspace;
54
- const p = project ? `/projects/${project}` : '';
55
- const c = cluster ? `/clusters/${cluster}` : '';
56
- const n = namespace ? `/namespaces/${namespace}` : '';
57
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zLyR7bmFtZXNwYWNlfWAgOiAnJztcbiAgcmV0dXJuIGAke3B9JHtjfSR7bn1gO1xufTtcbiJdfQ==
@@ -1,54 +0,0 @@
1
- import { cloneDeep, get, has, unset } from 'lodash-es';
2
- import { dissocPath } from 'ramda';
3
- import { parse as parseYaml, parseAllDocuments, } from 'yaml';
4
- export { stringify } from 'yaml';
5
- export const parse = (yaml, options) => parseYaml(yaml, options);
6
- export const safeParseYaml = (yaml, defaultValue = null, options) => {
7
- try {
8
- return parse(yaml, options);
9
- }
10
- catch {
11
- return defaultValue;
12
- }
13
- };
14
- export const parseAll = (yaml) => {
15
- const docs = parseAllDocuments(yaml);
16
- return docs.map(doc => doc.toJS());
17
- };
18
- export function yamlFilterField(resource, filterList, deepClone = true) {
19
- let cloneResource = deepClone ? cloneDeep(resource) : resource;
20
- filterList.forEach(pathOrFunction => {
21
- if (typeof pathOrFunction === 'string') {
22
- if (has(cloneResource, pathOrFunction)) {
23
- unset(cloneResource, pathOrFunction);
24
- }
25
- }
26
- else {
27
- const list = pathOrFunction(cloneResource);
28
- cloneResource = yamlFilterField(cloneResource, list, false);
29
- }
30
- });
31
- return cloneResource;
32
- }
33
- export const removeDirtyFieldsBeforeUpdate = dissocPath(['metadata', 'managedFields']);
34
- export function prefixFilterRuleFactory(prefix, path, includeOrStartsWith = 'includes') {
35
- return (resource) => {
36
- if (!has(resource, path)) {
37
- return [];
38
- }
39
- const obj = get(resource, path);
40
- return Object.keys(obj)
41
- .filter(item => item[includeOrStartsWith](prefix))
42
- .map(item => [...path, `['${item}']`].join('.'));
43
- };
44
- }
45
- export function emptyObjectRemoveRuleFactory(path) {
46
- return (resource) => {
47
- if (!has(resource, path)) {
48
- return [];
49
- }
50
- const obj = get(resource, path);
51
- return Object.keys(obj).length ? [] : [path.join('.')];
52
- };
53
- }
54
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieWFtbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb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icpXTtcbiAgfTtcbn1cbiJdfQ==
@@ -1,41 +0,0 @@
1
- import { NotificationService } from '@alauda/ui';
2
- import { Location } from '@angular/common';
3
- import { Injector, OnInit } from '@angular/core';
4
- import { FormBuilder, FormGroup } from '@angular/forms';
5
- import { Observable } from 'rxjs';
6
- import { InterceptDeactivateService } from '../page-deactivate';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * http://confluence.alauda.cn/display/FRON/Issue-Angular+related
10
- * 由于formControl存在内存泄漏问题,内部 form 展示-隐藏切换应当采用 hidden 进行控制
11
- */
12
- export declare abstract class BaseFormContainer<T = any> implements OnInit {
13
- isUpdate: boolean;
14
- initResource: T;
15
- initResource$: Observable<T>;
16
- private readonly ngForm;
17
- codeEditorOptions: import("../code-editor/code-editor-configs").IEditorConstructionOptions;
18
- actionsConfig: import("@alauda/code-editor").CodeEditorActionsConfig;
19
- formView: 'UI' | 'YAML';
20
- submitting: boolean;
21
- resource: T;
22
- yaml: string;
23
- originalYaml: string;
24
- fb: FormBuilder;
25
- interceptDeactivate: InterceptDeactivateService;
26
- form: FormGroup;
27
- protected notification: NotificationService;
28
- protected location: Location;
29
- protected fillResource: (resource: T) => T;
30
- abstract submit(params?: unknown): void;
31
- constructor(injector: Injector);
32
- ngOnInit(): void;
33
- switchFormView(view: 'YAML' | 'UI'): void;
34
- cancel(escape?: boolean): void;
35
- protected checkForm(): boolean;
36
- protected yamlToResource(yaml: string): T;
37
- protected resourceToYaml(resource: T): string;
38
- protected updateResource(resource: T): void;
39
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormContainer<any>, never>;
40
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormContainer<any>, never, never, { "isUpdate": { "alias": "isUpdate"; "required": false; }; "initResource": { "alias": "initResource"; "required": false; }; }, {}, never, never, false, never>;
41
- }
@@ -1,58 +0,0 @@
1
- import { AfterViewInit, ChangeDetectorRef, OnDestroy, QueryList } from '@angular/core';
2
- import { AbstractControl, ControlValueAccessor, FormGroupDirective, NgControl, NgForm, ValidationErrors } from '@angular/forms';
3
- import { ReplaySubject, Subject, Observable } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- export declare function createNestedFormControl<V, M = V>({ autoEmitChange, asyncValidator, }?: {
6
- autoEmitChange?: boolean;
7
- asyncValidator?: boolean;
8
- }): new () => BaseNestedFormControl<V, M>;
9
- export declare class BaseNestedFormControl<V, M = V> implements AfterViewInit, OnDestroy, ControlValueAccessor {
10
- protected controls: QueryList<NgControl>;
11
- get disabled(): boolean | '';
12
- set disabled(val: boolean | '');
13
- private _disabled;
14
- onValidatorChange: () => void;
15
- onChange: (_: V) => void;
16
- onTouched: () => void;
17
- onSubmitted: () => void;
18
- model: M;
19
- submitted: boolean;
20
- protected autoEmitChange: boolean;
21
- protected asyncValidator: boolean;
22
- protected cdr: ChangeDetectorRef;
23
- protected destroy$$: Subject<void>;
24
- protected hostForm: NgForm | FormGroupDirective;
25
- constructor();
26
- ngAfterViewInit(): void;
27
- ngOnDestroy(): void;
28
- registerOnValidatorChange(fn: () => void): void;
29
- registerOnChange(fn: (_: V) => void): void;
30
- registerOnTouched(fn: () => void): void;
31
- setDisabledState(isDisabled: boolean): void;
32
- writeValue(value: V): void;
33
- validate(_control?: AbstractControl): ValidationErrors | null | Observable<ValidationErrors | null>;
34
- emitModel(model?: M): void;
35
- emitValue(value: V): void;
36
- protected valueIn(value: V): M;
37
- protected modelOut(model: M): V;
38
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseNestedFormControl<any, any>, never>;
39
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseNestedFormControl<any, any>, never, never, { "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
40
- }
41
- /**
42
- * @deprecated use {@link BaseNestedFormControl} instead.
43
- */
44
- export declare class BaseNestedFormControlPure<V, M = V> extends BaseNestedFormControl<V, M> {
45
- model$: ReplaySubject<M>;
46
- constructor();
47
- writeValue(value: V): void;
48
- emitValue(value: V): void;
49
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseNestedFormControlPure<any, any>, never>;
50
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseNestedFormControlPure<any, any>, never, never, {}, {}, never, never, false, never>;
51
- }
52
- type Path = string | Array<string | number>;
53
- interface Mapper {
54
- [x: string]: Mapper | Path;
55
- }
56
- export declare function dataTransfer<S extends object, T extends object, M extends Record<keyof T, Path | Mapper> = Record<keyof T, Path | Mapper>>(mapper: M): [(source: S) => T, (target: T) => S];
57
- export declare function copyValue<T extends object>(from: Path, to: Path, mapper?: (v: any) => any): (object: T) => T;
58
- export {};
@@ -1,13 +0,0 @@
1
- import { TranslateService } from '@alauda-fe/dynamic-plugin-sdk';
2
- import { Injector } from '@angular/core';
3
- import { StringMap } from '../../types';
4
- import { ErrorMapperInterface, ErrorsMapperFn } from './types';
5
- import * as i0 from "@angular/core";
6
- export declare abstract class BaseErrorsMapper {
7
- translate: TranslateService;
8
- mapperService: ErrorMapperInterface;
9
- protected getErrorMessage(errors: Record<string, any>, errorsMapper?: StringMap, errorsMapperFn?: ErrorsMapperFn, namePrefix?: string, ignoreUnknownError?: boolean): string;
10
- constructor(injector: Injector);
11
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseErrorsMapper, never>;
12
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseErrorsMapper, never, never, {}, {}, never, never, false, never>;
13
- }
@@ -1,10 +0,0 @@
1
- import { TranslateService } from '@alauda-fe/dynamic-plugin-sdk';
2
- import { ErrorMapperInterface } from './types';
3
- import * as i0 from "@angular/core";
4
- export declare class DefaultErrorsMapperService implements ErrorMapperInterface {
5
- private readonly translate;
6
- constructor(translate: TranslateService);
7
- map(key: string, error: any): string;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<DefaultErrorsMapperService, never>;
9
- static ɵprov: i0.ɵɵInjectableDeclaration<DefaultErrorsMapperService>;
10
- }
@@ -1,19 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { StringMap } from '../../../types';
3
- import { BaseErrorsMapper } from '../base-errors-mapper';
4
- import { ErrorsMapperFn } from '../types';
5
- import * as i0 from "@angular/core";
6
- export declare class ErrorsMapperComponent extends BaseErrorsMapper {
7
- errors: Record<string, boolean>;
8
- readonly errors$: Observable<Record<string, boolean>>;
9
- errorsMapper: StringMap;
10
- readonly errorsMapper$: Observable<StringMap>;
11
- errorsMapperFn: ErrorsMapperFn;
12
- readonly errorsMapperFn$: Observable<ErrorsMapperFn>;
13
- controlName: string;
14
- readonly controlName$: Observable<string>;
15
- ignoreUnknownError: boolean;
16
- readonly errorMessage$: Observable<string>;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorsMapperComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<ErrorsMapperComponent, "acl-errors-mapper", never, { "errors": { "alias": "errors"; "required": false; }; "errorsMapper": { "alias": "errorsMapper"; "required": false; }; "errorsMapperFn": { "alias": "errorsMapperFn"; "required": false; }; "controlName": { "alias": "controlName"; "required": false; }; "ignoreUnknownError": { "alias": "ignoreUnknownError"; "required": false; }; }, {}, never, ["*"], true, never>;
19
- }
@@ -1,39 +0,0 @@
1
- import { AfterViewInit, ApplicationRef, ChangeDetectorRef, ComponentFactoryResolver, Injector, OnDestroy } from '@angular/core';
2
- import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
3
- import { Observable } from 'rxjs';
4
- import { StringMap } from '../../types';
5
- import { BaseErrorsMapper } from './base-errors-mapper';
6
- import { ErrorsMapperFn } from './types';
7
- import * as i0 from "@angular/core";
8
- export declare class ErrorsMapperDirective extends BaseErrorsMapper implements AfterViewInit, OnDestroy {
9
- injector: Injector;
10
- private readonly cdr;
11
- private readonly cfr;
12
- private readonly appRef;
13
- private readonly control;
14
- private readonly ngForm;
15
- private readonly formGroup;
16
- aclErrorsMapper: StringMap | '';
17
- aclErrorsMapperFn: ErrorsMapperFn;
18
- aclErrorsMapperDisabled: boolean;
19
- /**
20
- * disable errors mapper
21
- */
22
- aclErrorsMapperDisabled$: Observable<boolean>;
23
- /**
24
- * specify outlet, consider this other than specific control entity to make sure di can always get ngForm
25
- */
26
- aclErrorsMapperOutlet: Element;
27
- aclErrorsMapperControlName: string;
28
- private portal;
29
- private portalHost;
30
- private portalAttach;
31
- private readonly destroy$;
32
- constructor(injector: Injector, cdr: ChangeDetectorRef, cfr: ComponentFactoryResolver, appRef: ApplicationRef, control: NgControl, ngForm: NgForm, formGroup: FormGroupDirective);
33
- ngAfterViewInit(): void;
34
- updateContent(content: string): void;
35
- initPortal(): void;
36
- ngOnDestroy(): void;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorsMapperDirective, [null, null, null, null, { self: true; }, { optional: true; }, { optional: true; }]>;
38
- static ɵdir: i0.ɵɵDirectiveDeclaration<ErrorsMapperDirective, "[aclErrorsMapper]", never, { "aclErrorsMapper": { "alias": "aclErrorsMapper"; "required": false; }; "aclErrorsMapperFn": { "alias": "aclErrorsMapperFn"; "required": false; }; "aclErrorsMapperDisabled": { "alias": "aclErrorsMapperDisabled"; "required": false; }; "aclErrorsMapperOutlet": { "alias": "aclErrorsMapperOutlet"; "required": false; }; "aclErrorsMapperControlName": { "alias": "aclErrorsMapperControlName"; "required": false; }; }, {}, never, never, true, never>;
39
- }
@@ -1,6 +0,0 @@
1
- import { ErrorsMapperComponent } from './errors-mapper-component/component';
2
- import { ErrorsMapperDirective } from './errors-mapper.directive';
3
- export * from './errors-mapper-component/component';
4
- export * from './errors-mapper.directive';
5
- export * from './types';
6
- export declare const ERRORS_MAPPER_MODULE: readonly [typeof ErrorsMapperComponent, typeof ErrorsMapperDirective];
@@ -1,16 +0,0 @@
1
- import { StringMap } from '../../types';
2
- /**
3
- * Defines how a error object (validator key, error object, the control object) should be mapped to string.
4
- */
5
- export interface ErrorMapperInterface {
6
- /**
7
- * Maps an error to a string.
8
- * @param {string} key the error key. i.e., required, etc
9
- * @param error the error object
10
- * @param control control Object (AbstractControl for Angular, NgModel for AngularJS)
11
- * @returns {string}
12
- */
13
- map(key: string, error?: unknown, control?: unknown): string;
14
- }
15
- export type ErrorsMapperFn = (error: Record<string, unknown>) => string;
16
- export type ErrorMapper = ErrorMapperInterface | StringMap;
package/form/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export * from './validators';
2
- export * from './errors-mapper';
3
- export { genControlDepsMap } from './utils';
4
- export * from './base-form-container';
5
- export * from './base-nested-form-control';
package/form/utils.d.ts DELETED
@@ -1,40 +0,0 @@
1
- import { FormGroup } from '@angular/forms';
2
- import { Observable } from 'rxjs';
3
- interface Rule<T> {
4
- source: T;
5
- deps: string[];
6
- isEnable: (...deps: unknown[]) => boolean;
7
- }
8
- /**
9
- * @description
10
- * 创建集群中存在大量的 control 依赖的情形,同时,由于业务特殊性,在 ipv4,ipv6 时要对表单控件进行不同外观的展示,因此控件的 disabled 变得很复杂
11
- * 如果是在 ts 里通过 valueChanges 写:每个影响源都要写自己的 subscription,且某个 control 可能会收到多个其他 control 影响,届时逻辑组织会复杂很多,
12
- * 如果是在模板里通过 aluControlDisabled 去写,可能会存在多个 control 要重复同一套逻辑,这点在创建集群中很常见,因此提供了如下方案,可以以声明式写法去描述依赖关系
13
- *
14
- * @usageNotes
15
- * For example, for the following `FormGroup`:
16
- * ```
17
- * [
18
- {
19
- source: 'joinCIDR',
20
- deps: ['networkType'],
21
- isEnable: networkType => networkType === 'kube-ovn',
22
- },
23
- {
24
- source: 'gatewayIPv6',
25
- deps: ['networkType', 'transmitType', 'ipv6DualStack'],
26
- isEnable: (networkType, transmitType, ipv6DualStack: boolean) =>
27
- networkType === 'kube-ovn' &&
28
- transmitType === 'underlay' &&
29
- ipv6DualStack,
30
- },
31
- {
32
- source: ['clusterCIDRIPv6', 'serviceCIDRIPv6'],
33
- deps: ['ipv6DualStack'],
34
- isEnable: (ipv6DualStack: boolean) => ipv6DualStack,
35
- },
36
- ]
37
- * ```
38
- */
39
- export declare function genControlDepsMap(context: FormGroup, rules: Array<Rule<string | string[]>>, destroy$: Observable<unknown>): void;
40
- export {};
@@ -1,11 +0,0 @@
1
- import { AbstractControl, AsyncValidator, AsyncValidatorFn } from '@angular/forms';
2
- import * as i0 from "@angular/core";
3
- export declare class AsyncFunctionValidatorDirective implements AsyncValidator {
4
- aclAsyncValidateFn: AsyncValidatorFn | AsyncValidatorFn[];
5
- get asyncValidateFn(): AsyncValidatorFn;
6
- onValidatorChange: () => void;
7
- validate(control: AbstractControl): Promise<import("@angular/forms").ValidationErrors> | import("rxjs").Observable<import("@angular/forms").ValidationErrors>;
8
- registerOnValidatorChange(fn: () => void): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<AsyncFunctionValidatorDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<AsyncFunctionValidatorDirective, "[aclAsyncValidateFn][ngModel],[aclAsyncValidateFn][formControl],[aclAsyncValidateFn][formControlName]", never, { "aclAsyncValidateFn": { "alias": "aclAsyncValidateFn"; "required": false; }; }, {}, never, never, true, never>;
11
- }
@@ -1,28 +0,0 @@
1
- import { AbstractControl } from '@angular/forms';
2
- /**
3
- * https://kubernetes.io/zh/docs/concepts/overview/working-with-objects/names/
4
- const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
5
- const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*"
6
- const dns1123SubdomainErrorMsg string = "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character"
7
-
8
- // DNS1123SubdomainMaxLength is a subdomain's max length in DNS (RFC 1123)
9
- const DNS1123SubdomainMaxLength int = 253
10
-
11
- var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$")
12
-
13
- // IsDNS1123Subdomain tests for a string that conforms to the definition of a
14
- // subdomain in DNS (RFC 1123).
15
- func IsDNS1123Subdomain(value string) []string {
16
- var errs []string
17
- if len(value) > DNS1123SubdomainMaxLength {
18
- errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength))
19
- }
20
- if !dns1123SubdomainRegexp.MatchString(value) {
21
- errs = append(errs, RegexError(dns1123SubdomainErrorMsg, dns1123SubdomainFmt, "example.com"))
22
- }
23
- return errs
24
- }
25
- */
26
- export declare function DNS1123SubdomainValidator(ctrl: AbstractControl): {
27
- domain: boolean;
28
- };
@@ -1,11 +0,0 @@
1
- import { AbstractControl, Validator, ValidatorFn } from '@angular/forms';
2
- import * as i0 from "@angular/core";
3
- export declare class FunctionValidatorDirective implements Validator {
4
- aclValidateFn: ValidatorFn | ValidatorFn[];
5
- get validateFn(): ValidatorFn;
6
- onValidatorChange: () => void;
7
- validate(control: AbstractControl): import("@angular/forms").ValidationErrors;
8
- registerOnValidatorChange(fn: () => void): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<FunctionValidatorDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<FunctionValidatorDirective, "[aclValidateFn][ngModel],[aclValidateFn][formControl],[aclValidateFn][formControlName]", never, { "aclValidateFn": { "alias": "aclValidateFn"; "required": false; }; }, {}, never, never, true, never>;
11
- }
@@ -1,9 +0,0 @@
1
- export * from './utils';
2
- export * from './dns1123-subdomain';
3
- export * from './resource-limit';
4
- export * from './strong-password';
5
- export * from './not-be-validator.directive';
6
- export * from './one-of-validator.directive';
7
- export * from './function-validator.directive';
8
- export * from './async-function-validator.directive';
9
- export * from './maxlength-minlength-validator.directive';
@@ -1,20 +0,0 @@
1
- import { MaxLengthValidator, MinLengthValidator } from '@angular/forms';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * 功能和 MaxLengthValidator 完全一样,唯一的区别就是不设置 host maxlength attribute
5
- * 使用场景:ngModel 的表单希望设置 maxlength validator 但不相限制输入框输入的字符。
6
- * 比如产品希望最长 20 个字符,超过 20 个字符红色提醒
7
- * https://github.com/angular/angular/blob/main/packages/forms/src/directives/validators.ts#L591
8
- */
9
- export declare class MaxLengthValidatorDirective extends MaxLengthValidator {
10
- aclMaxlength: string | number;
11
- inputName: string;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<MaxLengthValidatorDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<MaxLengthValidatorDirective, "[aclMaxlength][formControlName],[aclMaxlength][formControl],[aclMaxlength][ngModel]", never, { "aclMaxlength": { "alias": "aclMaxlength"; "required": false; }; }, {}, never, never, true, never>;
14
- }
15
- export declare class MinLengthValidatorDirective extends MinLengthValidator {
16
- aclMinlength: string | number;
17
- inputName: string;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<MinLengthValidatorDirective, never>;
19
- static ɵdir: i0.ɵɵDirectiveDeclaration<MinLengthValidatorDirective, "[aclMinlength][formControlName],[aclMinlength][formControl],[aclMinlength][ngModel]", never, { "aclMinlength": { "alias": "aclMinlength"; "required": false; }; }, {}, never, never, true, never>;
20
- }
@@ -1,12 +0,0 @@
1
- import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
2
- import * as i0 from "@angular/core";
3
- export type NotBeValue = string | RegExp;
4
- export declare class NotBeValidatorDirective implements Validator {
5
- aclNotBe: NotBeValue | NotBeValue[];
6
- notBeValues: NotBeValue[];
7
- onValidatorChange: () => void;
8
- validate(control: AbstractControl): ValidationErrors;
9
- registerOnValidatorChange(fn: () => void): void;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<NotBeValidatorDirective, never>;
11
- static ɵdir: i0.ɵɵDirectiveDeclaration<NotBeValidatorDirective, "[aclNotBe][ngModel],[aclNotBe][formControl],[aclNotBe][formControlName]", never, { "aclNotBe": { "alias": "aclNotBe"; "required": false; }; }, {}, never, never, true, never>;
12
- }
@@ -1,12 +0,0 @@
1
- import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
2
- import * as i0 from "@angular/core";
3
- export type OneOfValue = string | RegExp;
4
- export declare class OneOfValidatorDirective implements Validator {
5
- aclOneOf: OneOfValue | OneOfValue[];
6
- oneOfValues: OneOfValue[];
7
- onValidatorChange: () => void;
8
- validate(control: AbstractControl): ValidationErrors;
9
- registerOnValidatorChange(fn: () => void): void;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<OneOfValidatorDirective, never>;
11
- static ɵdir: i0.ɵɵDirectiveDeclaration<OneOfValidatorDirective, "[aclOneOf][ngModel],[aclOneOf][formControl],[aclOneOf][formControlName]", never, { "aclOneOf": { "alias": "aclOneOf"; "required": false; }; }, {}, never, never, true, never>;
12
- }
@@ -1,17 +0,0 @@
1
- import { TranslateService } from '@alauda-fe/dynamic-plugin-sdk';
2
- import { AbstractControl, AsyncValidatorFn, ValidatorFn } from '@angular/forms';
3
- import { Observable } from 'rxjs';
4
- import { LimitRange, LimitRangeItem } from '../../types';
5
- import { RESOURCE_MAC_TYPES } from '../../utils';
6
- export type AvailableResourceType = (typeof RESOURCE_MAC_TYPES)[number];
7
- export interface ResourceControl {
8
- value: string;
9
- unit: string;
10
- }
11
- export declare function setupErrorMapper(resource: LimitRange, translate: TranslateService): {
12
- cpu_max: string;
13
- memory_max: string;
14
- };
15
- export declare const getResourceLimitValidatorFn: (type: AvailableResourceType, limitRange: Omit<LimitRangeItem, "type">, unit?: string) => ValidatorFn;
16
- export declare function getResourceLimitAsyncValidatorFn(type: AvailableResourceType, limitRange$: Observable<LimitRange>, unit?: string): AsyncValidatorFn;
17
- export declare const initGreaterValidator: (type: AvailableResourceType, control: AbstractControl) => import("rxjs").Subscription;
@@ -1,3 +0,0 @@
1
- export * from './strong-password-tooltip/component';
2
- export * from './strong-password-validator.directive';
3
- export * from './strong-password-validator.module';
@@ -1,6 +0,0 @@
1
- import { TooltipComponent } from '@alauda/ui';
2
- import * as i0 from "@angular/core";
3
- export declare class StrongPasswordTooltipComponent extends TooltipComponent {
4
- static ɵfac: i0.ɵɵFactoryDeclaration<StrongPasswordTooltipComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<StrongPasswordTooltipComponent, "ng-component", never, {}, {}, never, never, false, never>;
6
- }
@@ -1,34 +0,0 @@
1
- import { BaseTooltip } from '@alauda/ui';
2
- import { Overlay } from '@angular/cdk/overlay';
3
- import { ChangeDetectorRef, ElementRef, NgZone, Renderer2, ViewContainerRef, OnChanges } from '@angular/core';
4
- import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
5
- import { StrongPasswordTooltipComponent } from './strong-password-tooltip/component';
6
- import * as i0 from "@angular/core";
7
- export declare class StrongPasswordDirective extends BaseTooltip implements Validator, OnChanges {
8
- private _enabled;
9
- set aclStrongPassword(enabled: boolean | '');
10
- get aclStrongPassword(): boolean;
11
- private _required;
12
- set required(required: boolean | '');
13
- get required(): boolean;
14
- specialChars: string;
15
- minlength: number;
16
- maxlength: number;
17
- notStartsWith: string;
18
- protected componentClass: typeof StrongPasswordTooltipComponent;
19
- registerOnValidatorChange(fn: () => void): void;
20
- ngOnChanges(): void;
21
- onValidatorChange: () => void;
22
- constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, elRef: ElementRef<HTMLInputElement>, renderer: Renderer2, cdr: ChangeDetectorRef, ngZone: NgZone);
23
- protected onFocus(): void;
24
- validate: (control: AbstractControl) => ValidationErrors;
25
- private resetContext;
26
- private readonly validatePattern;
27
- private readonly validateLength;
28
- private readonly validateEnglishChar;
29
- private readonly validateNumber;
30
- private readonly validateSpecialChar;
31
- private readonly validateNotStartsWith;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<StrongPasswordDirective, never>;
33
- static ɵdir: i0.ɵɵDirectiveDeclaration<StrongPasswordDirective, "input[aclStrongPassword][ngModel],input[aclStrongPassword][formControl],input[aclStrongPassword][formControlName]", never, { "aclStrongPassword": { "alias": "aclStrongPassword"; "required": false; }; "required": { "alias": "required"; "required": false; }; "specialChars": { "alias": "specialChars"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "notStartsWith": { "alias": "notStartsWith"; "required": false; }; }, {}, never, never, false, never>;
34
- }
@@ -1,12 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./strong-password-tooltip/component";
3
- import * as i2 from "./strong-password-validator.directive";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/forms";
6
- import * as i5 from "@alauda/ui";
7
- import * as i6 from "@alauda-fe/dynamic-plugin-sdk";
8
- export declare class StrongPasswordValidatorModule {
9
- static ɵfac: i0.ɵɵFactoryDeclaration<StrongPasswordValidatorModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<StrongPasswordValidatorModule, [typeof i1.StrongPasswordTooltipComponent, typeof i2.StrongPasswordDirective], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.IconModule, typeof i6.TranslatePipe], [typeof i1.StrongPasswordTooltipComponent, typeof i2.StrongPasswordDirective]>;
11
- static ɵinj: i0.ɵɵInjectorDeclaration<StrongPasswordValidatorModule>;
12
- }