@alauda-fe/dynamic-plugin-shared 0.0.1-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.
- package/README.md +7 -0
- package/array-form-table/base-string-map-form.component.d.ts +22 -0
- package/array-form-table/form/component.d.ts +106 -0
- package/array-form-table/form/index.d.ts +2 -0
- package/array-form-table/index.d.ts +10 -0
- package/array-form-table/key-value-form/component.d.ts +38 -0
- package/array-form-table/key-value-table/component.d.ts +9 -0
- package/array-form-table/string-array-form/component.d.ts +41 -0
- package/assets/images/abnormal.svg +1 -0
- package/assets/images/dark/disconnected.svg +1 -0
- package/assets/images/dark/license-abnormal.svg +1 -0
- package/assets/images/dark/network-abnormal.svg +1 -0
- package/assets/images/dark/no-data.svg +1 -0
- package/assets/images/dark/no-message.svg +1 -0
- package/assets/images/dark/no-permission.svg +1 -0
- package/assets/images/dark/no_realtime_alarm.svg +1 -0
- package/assets/images/dark/not-deployed.svg +1 -0
- package/assets/images/dark/not-found.svg +1 -0
- package/assets/images/dark/not-supported.svg +1 -0
- package/assets/images/dark/system-abnormal.svg +1 -0
- package/assets/images/light/disconnected.svg +1 -0
- package/assets/images/light/license-abnormal.svg +1 -0
- package/assets/images/light/network-abnormal.svg +1 -0
- package/assets/images/light/no-data.svg +1 -0
- package/assets/images/light/no-message.svg +1 -0
- package/assets/images/light/no-permission.svg +1 -0
- package/assets/images/light/no_realtime_alarm.svg +1 -0
- package/assets/images/light/not-deployed.svg +1 -0
- package/assets/images/light/not-found.svg +1 -0
- package/assets/images/light/not-supported.svg +1 -0
- package/assets/images/light/system-abnormal.svg +1 -0
- package/assets/images/no-data.png +0 -0
- package/async-data/async-data-loader.d.ts +31 -0
- package/async-data/error-page/component.d.ts +30 -0
- package/async-data/index.d.ts +13 -0
- package/async-data/page-state/component.d.ts +21 -0
- package/async-data/types.d.ts +29 -0
- package/code-editor/code-display-dialog/component.d.ts +17 -0
- package/code-editor/code-editor-configs.d.ts +19 -0
- package/code-editor/index.d.ts +10 -0
- package/code-editor/k8s-yaml-display-dialog/component.d.ts +16 -0
- package/code-editor/resource-yaml-display/component.d.ts +21 -0
- package/components/card-section/card-section.component.d.ts +9 -0
- package/components/confirm-delete/confirm-delete.component.d.ts +57 -0
- package/components/confirm-delete/utils.d.ts +25 -0
- package/components/current-time/component.d.ts +14 -0
- package/components/custom-columns-setting/component.d.ts +16 -0
- package/components/custom-columns-setting/index.d.ts +1 -0
- package/components/date-range-picker/component.d.ts +55 -0
- package/components/date-range-picker/index.d.ts +3 -0
- package/components/date-range-picker/type.d.ts +36 -0
- package/components/date-range-picker/util.d.ts +11 -0
- package/components/disabled-container/disabled-container.component.d.ts +21 -0
- package/components/disabled-container/index.d.ts +7 -0
- package/components/field-set/column/component.d.ts +10 -0
- package/components/field-set/group/component.d.ts +6 -0
- package/components/field-set/index.d.ts +7 -0
- package/components/field-set/item/component.d.ts +13 -0
- package/components/foldable-block/component.d.ts +17 -0
- package/components/foldable-item-in-table/component.d.ts +21 -0
- package/components/help-document/component.d.ts +29 -0
- package/components/help-document/directive.d.ts +20 -0
- package/components/help-document/index.d.ts +8 -0
- package/components/help-document/service.d.ts +20 -0
- package/components/index.d.ts +31 -0
- package/components/loading-mask/loading-mask.component.d.ts +13 -0
- package/components/page-guard/component/component.d.ts +40 -0
- package/components/page-guard/component/helper-directives.d.ts +17 -0
- package/components/page-guard/component/page-guard.type.d.ts +86 -0
- package/components/page-guard/index.d.ts +12 -0
- package/components/password-input/component.d.ts +39 -0
- package/components/pod-status/component.d.ts +25 -0
- package/components/pod-status/index.d.ts +3 -0
- package/components/pod-status/status.d.ts +4 -0
- package/components/pod-status/typings.d.ts +16 -0
- package/components/relative-time/component.d.ts +15 -0
- package/components/resource-label/component.d.ts +25 -0
- package/components/resource-multi-select/component.d.ts +41 -0
- package/components/resource-multi-select/util.d.ts +10 -0
- package/components/search-panel/component.d.ts +16 -0
- package/components/search-panel/helper.directive.d.ts +5 -0
- package/components/search-panel/search-item/component.d.ts +7 -0
- package/components/select-prefix-label/directive.d.ts +17 -0
- package/components/status-icon/status-icon.component.d.ts +16 -0
- package/components/tags-label/component.d.ts +56 -0
- package/components/terminating-tag/component.d.ts +7 -0
- package/components/text-ellipsis/component.d.ts +9 -0
- package/components/text-tooltip/directive.d.ts +21 -0
- package/components/text-with-url/component.d.ts +12 -0
- package/components/upload-file/component.d.ts +32 -0
- package/components/zero-state/zero-state.component.d.ts +16 -0
- package/constants/common.d.ts +64 -0
- package/constants/index.d.ts +6 -0
- package/constants/k8s.d.ts +12 -0
- package/constants/patterns.d.ts +124 -0
- package/constants/resource-definitions.d.ts +414 -0
- package/constants/status-icons.d.ts +34 -0
- package/constants/timezones.d.ts +6 -0
- package/directives/aui-code-editor.directive.d.ts +13 -0
- package/directives/click-outside.directive.d.ts +12 -0
- package/directives/declare.directive.d.ts +8 -0
- package/directives/disabled.directive.d.ts +28 -0
- package/directives/effect-directive/coerce-number.directive.d.ts +8 -0
- package/directives/effect-directive/e2e-attribute-binding.directive.d.ts +10 -0
- package/directives/effect-directive/event.directive.d.ts +47 -0
- package/directives/effect-directive/index.d.ts +12 -0
- package/directives/effect-directive/min-max.directive.d.ts +30 -0
- package/directives/effect-directive/trim.directive.d.ts +7 -0
- package/directives/effect-directive/validators.directive.d.ts +12 -0
- package/directives/feature-gate.directive.d.ts +31 -0
- package/directives/index.d.ts +12 -0
- package/directives/last-form-item.directive.d.ts +8 -0
- package/directives/readonly-field.directive.d.ts +39 -0
- package/directives/resize.directive.d.ts +17 -0
- package/directives/scroll-border-observer.directive.d.ts +23 -0
- package/directives/scroll-to-first-invalid.directive.d.ts +24 -0
- package/directives/value-trace.directive.d.ts +27 -0
- package/esm2022/alauda-fe-dynamic-plugin-shared.mjs +5 -0
- package/esm2022/array-form-table/base-string-map-form.component.mjs +92 -0
- package/esm2022/array-form-table/form/component.mjs +266 -0
- package/esm2022/array-form-table/form/index.mjs +12 -0
- package/esm2022/array-form-table/index.mjs +11 -0
- package/esm2022/array-form-table/key-value-form/component.mjs +135 -0
- package/esm2022/array-form-table/key-value-table/component.mjs +24 -0
- package/esm2022/array-form-table/string-array-form/component.mjs +168 -0
- package/esm2022/async-data/async-data-loader.mjs +63 -0
- package/esm2022/async-data/error-page/component.mjs +54 -0
- package/esm2022/async-data/index.mjs +18 -0
- package/esm2022/async-data/page-state/component.mjs +62 -0
- package/esm2022/async-data/types.mjs +6 -0
- package/esm2022/code-editor/code-display-dialog/component.mjs +35 -0
- package/esm2022/code-editor/code-editor-configs.mjs +66 -0
- package/esm2022/code-editor/index.mjs +11 -0
- package/esm2022/code-editor/k8s-yaml-display-dialog/component.mjs +26 -0
- package/esm2022/code-editor/resource-yaml-display/component.mjs +67 -0
- package/esm2022/components/card-section/card-section.component.mjs +24 -0
- package/esm2022/components/confirm-delete/confirm-delete.component.mjs +192 -0
- package/esm2022/components/confirm-delete/utils.mjs +8 -0
- package/esm2022/components/current-time/component.mjs +39 -0
- package/esm2022/components/custom-columns-setting/component.mjs +75 -0
- package/esm2022/components/custom-columns-setting/index.mjs +2 -0
- package/esm2022/components/date-range-picker/component.mjs +215 -0
- package/esm2022/components/date-range-picker/index.mjs +4 -0
- package/esm2022/components/date-range-picker/type.mjs +2 -0
- package/esm2022/components/date-range-picker/util.mjs +57 -0
- package/esm2022/components/disabled-container/disabled-container.component.mjs +81 -0
- package/esm2022/components/disabled-container/index.mjs +8 -0
- package/esm2022/components/field-set/column/component.mjs +25 -0
- package/esm2022/components/field-set/group/component.mjs +16 -0
- package/esm2022/components/field-set/index.mjs +14 -0
- package/esm2022/components/field-set/item/component.mjs +41 -0
- package/esm2022/components/foldable-block/component.mjs +60 -0
- package/esm2022/components/foldable-item-in-table/component.mjs +56 -0
- package/esm2022/components/help-document/component.mjs +69 -0
- package/esm2022/components/help-document/directive.mjs +70 -0
- package/esm2022/components/help-document/index.mjs +9 -0
- package/esm2022/components/help-document/service.mjs +43 -0
- package/esm2022/components/index.mjs +32 -0
- package/esm2022/components/loading-mask/loading-mask.component.mjs +35 -0
- package/esm2022/components/page-guard/component/component.mjs +101 -0
- package/esm2022/components/page-guard/component/helper-directives.mjs +51 -0
- package/esm2022/components/page-guard/component/page-guard.type.mjs +82 -0
- package/esm2022/components/page-guard/index.mjs +19 -0
- package/esm2022/components/password-input/component.mjs +143 -0
- package/esm2022/components/pod-status/component.mjs +49 -0
- package/esm2022/components/pod-status/index.mjs +4 -0
- package/esm2022/components/pod-status/status.mjs +84 -0
- package/esm2022/components/pod-status/typings.mjs +19 -0
- package/esm2022/components/relative-time/component.mjs +58 -0
- package/esm2022/components/resource-label/component.mjs +100 -0
- package/esm2022/components/resource-multi-select/component.mjs +152 -0
- package/esm2022/components/resource-multi-select/util.mjs +24 -0
- package/esm2022/components/search-panel/component.mjs +51 -0
- package/esm2022/components/search-panel/helper.directive.mjs +14 -0
- package/esm2022/components/search-panel/search-item/component.mjs +15 -0
- package/esm2022/components/select-prefix-label/directive.mjs +89 -0
- package/esm2022/components/status-icon/status-icon.component.mjs +56 -0
- package/esm2022/components/tags-label/component.mjs +224 -0
- package/esm2022/components/terminating-tag/component.mjs +16 -0
- package/esm2022/components/text-ellipsis/component.mjs +28 -0
- package/esm2022/components/text-tooltip/directive.mjs +71 -0
- package/esm2022/components/text-with-url/component.mjs +40 -0
- package/esm2022/components/upload-file/component.mjs +95 -0
- package/esm2022/components/zero-state/zero-state.component.mjs +51 -0
- package/esm2022/constants/common.mjs +86 -0
- package/esm2022/constants/index.mjs +7 -0
- package/esm2022/constants/k8s.mjs +13 -0
- package/esm2022/constants/patterns.mjs +142 -0
- package/esm2022/constants/resource-definitions.mjs +424 -0
- package/esm2022/constants/status-icons.mjs +65 -0
- package/esm2022/constants/timezones.mjs +234 -0
- package/esm2022/directives/aui-code-editor.directive.mjs +30 -0
- package/esm2022/directives/click-outside.directive.mjs +49 -0
- package/esm2022/directives/declare.directive.mjs +27 -0
- package/esm2022/directives/disabled.directive.mjs +76 -0
- package/esm2022/directives/effect-directive/coerce-number.directive.mjs +54 -0
- package/esm2022/directives/effect-directive/e2e-attribute-binding.directive.mjs +57 -0
- package/esm2022/directives/effect-directive/event.directive.mjs +129 -0
- package/esm2022/directives/effect-directive/index.mjs +21 -0
- package/esm2022/directives/effect-directive/min-max.directive.mjs +107 -0
- package/esm2022/directives/effect-directive/trim.directive.mjs +40 -0
- package/esm2022/directives/effect-directive/validators.directive.mjs +43 -0
- package/esm2022/directives/feature-gate.directive.mjs +90 -0
- package/esm2022/directives/index.mjs +13 -0
- package/esm2022/directives/last-form-item.directive.mjs +18 -0
- package/esm2022/directives/readonly-field.directive.mjs +145 -0
- package/esm2022/directives/resize.directive.mjs +39 -0
- package/esm2022/directives/scroll-border-observer.directive.mjs +77 -0
- package/esm2022/directives/scroll-to-first-invalid.directive.mjs +126 -0
- package/esm2022/directives/value-trace.directive.mjs +61 -0
- package/esm2022/form/base-form-container.mjs +126 -0
- package/esm2022/form/base-nested-form-control.mjs +190 -0
- package/esm2022/form/errors-mapper/base-errors-mapper.mjs +41 -0
- package/esm2022/form/errors-mapper/default-errors-mapper.service.mjs +65 -0
- package/esm2022/form/errors-mapper/errors-mapper-component/component.mjs +53 -0
- package/esm2022/form/errors-mapper/errors-mapper.directive.mjs +109 -0
- package/esm2022/form/errors-mapper/index.mjs +10 -0
- package/esm2022/form/errors-mapper/types.mjs +2 -0
- package/esm2022/form/index.mjs +6 -0
- package/esm2022/form/utils.mjs +61 -0
- package/esm2022/form/validators/async-function-validator.directive.mjs +49 -0
- package/esm2022/form/validators/dns1123-subdomain.mjs +42 -0
- package/esm2022/form/validators/function-validator.directive.mjs +49 -0
- package/esm2022/form/validators/index.mjs +10 -0
- package/esm2022/form/validators/maxlength-minlength-validator.directive.mjs +71 -0
- package/esm2022/form/validators/not-be-validator.directive.mjs +56 -0
- package/esm2022/form/validators/one-of-validator.directive.mjs +57 -0
- package/esm2022/form/validators/resource-limit.mjs +79 -0
- package/esm2022/form/validators/strong-password/index.mjs +4 -0
- package/esm2022/form/validators/strong-password/strong-password-tooltip/component.mjs +15 -0
- package/esm2022/form/validators/strong-password/strong-password-validator.directive.mjs +171 -0
- package/esm2022/form/validators/strong-password/strong-password-validator.module.mjs +36 -0
- package/esm2022/form/validators/utils.mjs +155 -0
- package/esm2022/index.mjs +15 -0
- package/esm2022/k8s-resource-list/footer/component.mjs +156 -0
- package/esm2022/k8s-resource-list/index.mjs +18 -0
- package/esm2022/k8s-resource-list/k8s-resource-list.mjs +224 -0
- package/esm2022/k8s-resource-list/k8s-resource-paged-list.mjs +174 -0
- package/esm2022/k8s-resource-list/types.mjs +11 -0
- package/esm2022/k8s-resource-list/utils.mjs +84 -0
- package/esm2022/k8s-shared/constants.mjs +53 -0
- package/esm2022/k8s-shared/index.mjs +12 -0
- package/esm2022/k8s-shared/k8s-resource-translate-key.pipe.mjs +31 -0
- package/esm2022/k8s-shared/k8s-shared-util.service.mjs +152 -0
- package/esm2022/k8s-shared/resource-mark/component.mjs +54 -0
- package/esm2022/k8s-shared/resource-mark/util.mjs +137 -0
- package/esm2022/k8s-shared/update-description-dialog/component.mjs +66 -0
- package/esm2022/k8s-shared/update-display-name-dialog/component.mjs +59 -0
- package/esm2022/k8s-shared/update-key-value-dialog/component.mjs +76 -0
- package/esm2022/page-deactivate/deactivate.directive.mjs +50 -0
- package/esm2022/page-deactivate/deactivate.guard.mjs +41 -0
- package/esm2022/page-deactivate/deactivate.service.mjs +78 -0
- package/esm2022/page-deactivate/index.mjs +4 -0
- package/esm2022/pipes/calc.pipe.mjs +21 -0
- package/esm2022/pipes/cron-human-readable.pipe.mjs +30 -0
- package/esm2022/pipes/crontab-next.pipe.mjs +67 -0
- package/esm2022/pipes/duration.pipe.mjs +51 -0
- package/esm2022/pipes/field-not-available.pipe.mjs +25 -0
- package/esm2022/pipes/img-header.pipe.mjs +18 -0
- package/esm2022/pipes/img-theme.pipe.mjs +38 -0
- package/esm2022/pipes/index.mjs +19 -0
- package/esm2022/pipes/keyvalue.pipe.mjs +20 -0
- package/esm2022/pipes/marked.pipe.mjs +18 -0
- package/esm2022/pipes/minimum-format.pipe.mjs +25 -0
- package/esm2022/pipes/page-env.pipe.mjs +69 -0
- package/esm2022/pipes/parse-json-translate.pipe.mjs +28 -0
- package/esm2022/pipes/parse-json.pipe.mjs +22 -0
- package/esm2022/pipes/pure.pipe.mjs +26 -0
- package/esm2022/pipes/safe.pipe.mjs +49 -0
- package/esm2022/pipes/sanitize.pipe.mjs +31 -0
- package/esm2022/pipes/time.pipe.mjs +113 -0
- package/esm2022/pipes/timezone-display.pipe.mjs +21 -0
- package/esm2022/services/form-row-duplicate/form-row-duplicate.service.mjs +280 -0
- package/esm2022/services/index.mjs +4 -0
- package/esm2022/services/on-resize.service.mjs +52 -0
- package/esm2022/services/yaml-util.service.mjs +99 -0
- package/esm2022/types/common.mjs +6 -0
- package/esm2022/types/helpers.mjs +12 -0
- package/esm2022/types/index.mjs +9 -0
- package/esm2022/types/k8s/core.mjs +2 -0
- package/esm2022/types/k8s/crd.mjs +57 -0
- package/esm2022/types/k8s/index.mjs +4 -0
- package/esm2022/types/k8s/raw.mjs +77 -0
- package/esm2022/types/schema.mjs +2 -0
- package/esm2022/utils/browser.mjs +21 -0
- package/esm2022/utils/cache-store.mjs +83 -0
- package/esm2022/utils/color-helpers.mjs +6 -0
- package/esm2022/utils/common.mjs +315 -0
- package/esm2022/utils/cron-util.mjs +44 -0
- package/esm2022/utils/decorators.mjs +137 -0
- package/esm2022/utils/disabled-state.mjs +47 -0
- package/esm2022/utils/format-number.mjs +227 -0
- package/esm2022/utils/index.mjs +24 -0
- package/esm2022/utils/local-storage-constants.mjs +2 -0
- package/esm2022/utils/node.mjs +18 -0
- package/esm2022/utils/observable.mjs +32 -0
- package/esm2022/utils/operators.mjs +38 -0
- package/esm2022/utils/request-pool.mjs +37 -0
- package/esm2022/utils/resources.mjs +66 -0
- package/esm2022/utils/router.mjs +20 -0
- package/esm2022/utils/sort-fn.mjs +7 -0
- package/esm2022/utils/tree.mjs +79 -0
- package/esm2022/utils/unit.mjs +191 -0
- package/esm2022/utils/version.mjs +76 -0
- package/esm2022/utils/with-load-state.mjs +21 -0
- package/esm2022/utils/workload.mjs +183 -0
- package/esm2022/utils/workspace.mjs +59 -0
- package/esm2022/utils/yaml.mjs +54 -0
- package/fesm2022/alauda-fe-dynamic-plugin-shared.mjs +11151 -0
- package/fesm2022/alauda-fe-dynamic-plugin-shared.mjs.map +1 -0
- package/form/base-form-container.d.ts +41 -0
- package/form/base-nested-form-control.d.ts +58 -0
- package/form/errors-mapper/base-errors-mapper.d.ts +13 -0
- package/form/errors-mapper/default-errors-mapper.service.d.ts +10 -0
- package/form/errors-mapper/errors-mapper-component/component.d.ts +19 -0
- package/form/errors-mapper/errors-mapper.directive.d.ts +39 -0
- package/form/errors-mapper/index.d.ts +6 -0
- package/form/errors-mapper/types.d.ts +16 -0
- package/form/index.d.ts +5 -0
- package/form/utils.d.ts +40 -0
- package/form/validators/async-function-validator.directive.d.ts +11 -0
- package/form/validators/dns1123-subdomain.d.ts +28 -0
- package/form/validators/function-validator.directive.d.ts +11 -0
- package/form/validators/index.d.ts +9 -0
- package/form/validators/maxlength-minlength-validator.directive.d.ts +20 -0
- package/form/validators/not-be-validator.directive.d.ts +12 -0
- package/form/validators/one-of-validator.directive.d.ts +12 -0
- package/form/validators/resource-limit.d.ts +17 -0
- package/form/validators/strong-password/index.d.ts +3 -0
- package/form/validators/strong-password/strong-password-tooltip/component.d.ts +6 -0
- package/form/validators/strong-password/strong-password-validator.directive.d.ts +34 -0
- package/form/validators/strong-password/strong-password-validator.module.d.ts +12 -0
- package/form/validators/utils.d.ts +67 -0
- package/index.d.ts +14 -0
- package/k8s-resource-list/footer/component.d.ts +42 -0
- package/k8s-resource-list/index.d.ts +13 -0
- package/k8s-resource-list/k8s-resource-list.d.ts +42 -0
- package/k8s-resource-list/k8s-resource-paged-list.d.ts +61 -0
- package/k8s-resource-list/types.d.ts +70 -0
- package/k8s-resource-list/utils.d.ts +19 -0
- package/k8s-shared/constants.d.ts +7 -0
- package/k8s-shared/index.d.ts +11 -0
- package/k8s-shared/k8s-resource-translate-key.pipe.d.ts +9 -0
- package/k8s-shared/k8s-shared-util.service.d.ts +48 -0
- package/k8s-shared/resource-mark/component.d.ts +16 -0
- package/k8s-shared/resource-mark/util.d.ts +2 -0
- package/k8s-shared/update-description-dialog/component.d.ts +33 -0
- package/k8s-shared/update-display-name-dialog/component.d.ts +27 -0
- package/k8s-shared/update-key-value-dialog/component.d.ts +38 -0
- package/package.json +56 -0
- package/page-deactivate/deactivate.directive.d.ts +18 -0
- package/page-deactivate/deactivate.guard.d.ts +13 -0
- package/page-deactivate/deactivate.service.d.ts +28 -0
- package/page-deactivate/index.d.ts +3 -0
- package/pipes/calc.pipe.d.ts +11 -0
- package/pipes/cron-human-readable.pipe.d.ts +9 -0
- package/pipes/crontab-next.pipe.d.ts +18 -0
- package/pipes/duration.pipe.d.ts +10 -0
- package/pipes/field-not-available.pipe.d.ts +13 -0
- package/pipes/img-header.pipe.d.ts +7 -0
- package/pipes/img-theme.pipe.d.ts +13 -0
- package/pipes/index.d.ts +18 -0
- package/pipes/keyvalue.pipe.d.ts +9 -0
- package/pipes/marked.pipe.d.ts +8 -0
- package/pipes/minimum-format.pipe.d.ts +10 -0
- package/pipes/page-env.pipe.d.ts +34 -0
- package/pipes/parse-json-translate.pipe.d.ts +8 -0
- package/pipes/parse-json.pipe.d.ts +7 -0
- package/pipes/pure.pipe.d.ts +17 -0
- package/pipes/safe.pipe.d.ts +10 -0
- package/pipes/sanitize.pipe.d.ts +10 -0
- package/pipes/time.pipe.d.ts +40 -0
- package/pipes/timezone-display.pipe.d.ts +10 -0
- package/services/form-row-duplicate/form-row-duplicate.service.d.ts +45 -0
- package/services/index.d.ts +3 -0
- package/services/on-resize.service.d.ts +20 -0
- package/services/yaml-util.service.d.ts +20 -0
- package/styles/ansi-color.scss +131 -0
- package/styles/global.scss +904 -0
- package/styles/lib.scss +1 -0
- package/styles/markdown-body.scss +107 -0
- package/styles/mixins.scss +710 -0
- package/styles/var.scss +30 -0
- package/types/common.d.ts +42 -0
- package/types/helpers.d.ts +35 -0
- package/types/index.d.ts +8 -0
- package/types/k8s/core.d.ts +100 -0
- package/types/k8s/crd.d.ts +497 -0
- package/types/k8s/index.d.ts +3 -0
- package/types/k8s/raw.d.ts +860 -0
- package/types/schema.d.ts +14 -0
- package/utils/browser.d.ts +4 -0
- package/utils/cache-store.d.ts +35 -0
- package/utils/color-helpers.d.ts +4 -0
- package/utils/common.d.ts +64 -0
- package/utils/cron-util.d.ts +8 -0
- package/utils/decorators.d.ts +14 -0
- package/utils/disabled-state.d.ts +20 -0
- package/utils/format-number.d.ts +11 -0
- package/utils/index.d.ts +23 -0
- package/utils/local-storage-constants.d.ts +1 -0
- package/utils/node.d.ts +8 -0
- package/utils/observable.d.ts +5 -0
- package/utils/operators.d.ts +22 -0
- package/utils/request-pool.d.ts +12 -0
- package/utils/resources.d.ts +19 -0
- package/utils/router.d.ts +3 -0
- package/utils/sort-fn.d.ts +2 -0
- package/utils/tree.d.ts +16 -0
- package/utils/unit.d.ts +21 -0
- package/utils/version.d.ts +39 -0
- package/utils/with-load-state.d.ts +11 -0
- package/utils/workload.d.ts +66 -0
- package/utils/workspace.d.ts +28 -0
- package/utils/yaml.d.ts +11 -0
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
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];
|
|
@@ -0,0 +1,16 @@
|
|
|
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
ADDED
package/form/utils.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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';
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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;
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { TranslateService } from '@alauda-fe/dynamic-plugin-sdk';
|
|
2
|
+
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
3
|
+
export declare const STRONG_PASSWORD_SPECIAL_CHARS = "~!@#$%^&*()-_=+?";
|
|
4
|
+
export declare function randomPassword({ length, symbols, }?: {
|
|
5
|
+
length?: number;
|
|
6
|
+
symbols?: string;
|
|
7
|
+
}): string;
|
|
8
|
+
export declare function k8sResourceLabelKeyValidator(control: AbstractControl): ValidationErrors | null;
|
|
9
|
+
export declare const k8sResourceAnnotationKeyValidator: typeof k8sResourceLabelKeyValidator;
|
|
10
|
+
export declare const k8sResourceLabelValueValidator: import("@angular/forms").ValidatorFn;
|
|
11
|
+
export declare const k8sResourceLabelValidator: {
|
|
12
|
+
key: typeof k8sResourceLabelKeyValidator;
|
|
13
|
+
value: import("@angular/forms").ValidatorFn;
|
|
14
|
+
};
|
|
15
|
+
export declare const k8sResourceAnnotationValidator: {
|
|
16
|
+
key: typeof k8sResourceLabelKeyValidator;
|
|
17
|
+
};
|
|
18
|
+
export declare const getK8sResourceLabelErrorMapper: (translate: TranslateService) => {
|
|
19
|
+
key: {
|
|
20
|
+
namePattern: string;
|
|
21
|
+
prefixPattern: string;
|
|
22
|
+
nameTooLong: string;
|
|
23
|
+
prefixTooLong: string;
|
|
24
|
+
};
|
|
25
|
+
value: {
|
|
26
|
+
pattern: string;
|
|
27
|
+
maxlength: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const getK8sResourceLabelErrorMapper$: (translate: TranslateService) => import("rxjs").Observable<{
|
|
31
|
+
key: {
|
|
32
|
+
namePattern: string;
|
|
33
|
+
prefixPattern: string;
|
|
34
|
+
nameTooLong: string;
|
|
35
|
+
prefixTooLong: string;
|
|
36
|
+
};
|
|
37
|
+
value: {
|
|
38
|
+
pattern: string;
|
|
39
|
+
maxlength: string;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
export declare const getK8sResourceAnnotationErrorMapper: (translate: TranslateService) => {
|
|
43
|
+
key: {
|
|
44
|
+
namePattern: string;
|
|
45
|
+
prefixPattern: string;
|
|
46
|
+
nameTooLong: string;
|
|
47
|
+
prefixTooLong: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export declare const getK8sResourceAnnotationErrorMapper$: (translate: TranslateService) => import("rxjs").Observable<{
|
|
51
|
+
key: {
|
|
52
|
+
namePattern: string;
|
|
53
|
+
prefixPattern: string;
|
|
54
|
+
nameTooLong: string;
|
|
55
|
+
prefixTooLong: string;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
export declare const CRON_FORMAT_ERROR = "cronFormatError";
|
|
59
|
+
export declare const CRON_MIN_INTERVAL_ERROR = "cronMinIntervalError";
|
|
60
|
+
export declare function cronValidator(minInterval?: number): (control: AbstractControl) => ValidationErrors | null;
|
|
61
|
+
export declare function cronValidatorBasic(value: string, minInterval?: number): {
|
|
62
|
+
cronFormatError: boolean;
|
|
63
|
+
cronMinIntervalError?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
cronMinIntervalError: boolean;
|
|
66
|
+
cronFormatError?: undefined;
|
|
67
|
+
};
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './constants';
|
|
3
|
+
export * from './utils';
|
|
4
|
+
export * from './services';
|
|
5
|
+
export * from './pipes';
|
|
6
|
+
export * from './directives';
|
|
7
|
+
export * from './components';
|
|
8
|
+
export * from './k8s-resource-list';
|
|
9
|
+
export * from './k8s-shared';
|
|
10
|
+
export * from './code-editor';
|
|
11
|
+
export * from './form';
|
|
12
|
+
export * from './array-form-table';
|
|
13
|
+
export * from './async-data';
|
|
14
|
+
export * from './page-deactivate';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TranslateService } from '@alauda-fe/dynamic-plugin-sdk';
|
|
2
|
+
import { OnDestroy, OnInit, TemplateRef, Injector } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { ScrollBorderObserverDirective } from '../../directives';
|
|
5
|
+
import { KubernetesResource, KubernetesResourceList } from '../../types';
|
|
6
|
+
import { StreamListLoader } from '../types';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class K8sListFooterNoDataDirective {
|
|
9
|
+
templateRef: TemplateRef<any>;
|
|
10
|
+
constructor(templateRef: TemplateRef<any>);
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<K8sListFooterNoDataDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<K8sListFooterNoDataDirective, "[aclK8sListFooterNoData]", never, {}, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
14
|
+
export declare class K8sListFooterLoadingErrorDirective {
|
|
15
|
+
templateRef: TemplateRef<any>;
|
|
16
|
+
constructor(templateRef: TemplateRef<any>);
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<K8sListFooterLoadingErrorDirective, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<K8sListFooterLoadingErrorDirective, "[aclK8sListFooterLoadingError]", never, {}, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
20
|
+
export declare class K8SResourceListFooterComponent extends ScrollBorderObserverDirective implements OnInit, OnDestroy {
|
|
21
|
+
private readonly translate;
|
|
22
|
+
list: StreamListLoader<KubernetesResourceList, KubernetesResource>;
|
|
23
|
+
autoLoad: boolean;
|
|
24
|
+
backTop: boolean;
|
|
25
|
+
bottomDistance: number;
|
|
26
|
+
resourceNameTranslated: string;
|
|
27
|
+
firstScrollLoad: number;
|
|
28
|
+
resourceNameTranslated$: Observable<string>;
|
|
29
|
+
resourceName: string;
|
|
30
|
+
resourceName$: Observable<string>;
|
|
31
|
+
noDataTemplate: TemplateRef<any>;
|
|
32
|
+
loadingErrorTemplate: TemplateRef<any>;
|
|
33
|
+
isEmptyList$: Observable<boolean>;
|
|
34
|
+
noDataHint$: Observable<string>;
|
|
35
|
+
loadingErrorCode$: Observable<number>;
|
|
36
|
+
window: Window & typeof globalThis;
|
|
37
|
+
constructor(injector: Injector, translate: TranslateService);
|
|
38
|
+
ngOnInit(): void;
|
|
39
|
+
retry(): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<K8SResourceListFooterComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<K8SResourceListFooterComponent, "acl-k8s-resource-list-footer", never, { "list": { "alias": "list"; "required": false; }; "autoLoad": { "alias": "autoLoad"; "required": false; }; "backTop": { "alias": "backTop"; "required": false; }; "bottomDistance": { "alias": "bottomDistance"; "required": false; }; "resourceNameTranslated": { "alias": "resourceNameTranslated"; "required": false; }; "firstScrollLoad": { "alias": "firstScrollLoad"; "required": false; }; "resourceName": { "alias": "resourceName"; "required": false; }; }, {}, ["noDataTemplate", "loadingErrorTemplate"], never, true, never>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [[include:k8s-resource-list/README.md]]
|
|
3
|
+
* @module k8s-resource-list
|
|
4
|
+
* @preferred
|
|
5
|
+
*/
|
|
6
|
+
/** imports */
|
|
7
|
+
import { K8SResourceListFooterComponent, K8sListFooterNoDataDirective, K8sListFooterLoadingErrorDirective } from './footer/component';
|
|
8
|
+
export * from './footer/component';
|
|
9
|
+
export * from './k8s-resource-list';
|
|
10
|
+
export * from './types';
|
|
11
|
+
export * from './utils';
|
|
12
|
+
export * from './k8s-resource-paged-list';
|
|
13
|
+
export declare const K8S_RESOURCE_LIST_MODULE: readonly [typeof K8SResourceListFooterComponent, typeof K8sListFooterNoDataDirective, typeof K8sListFooterLoadingErrorDirective];
|