@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,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module k8s-resource-list
|
|
4
|
+
*/
|
|
5
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
6
|
+
import { Observable, ReplaySubject } from 'rxjs';
|
|
7
|
+
import { KubernetesResource, KubernetesResourceList, ResourceListParams, Status } from '../types';
|
|
8
|
+
import { ConfigWithParams, ConfigWithRoute, ItemsScanner, ListParams, LoadSnapshot, LoadState, StreamListLoader } from './types';
|
|
9
|
+
export declare class K8SResourceList<R extends KubernetesResource = KubernetesResource, Q extends object = ResourceListParams, P extends Q & ListParams = Q & ListParams> implements StreamListLoader<KubernetesResourceList<R>, R> {
|
|
10
|
+
private readonly reloadAction$$;
|
|
11
|
+
private readonly loadMoreAction$$;
|
|
12
|
+
private readonly itemsScanner$$;
|
|
13
|
+
private readonly destroy$$;
|
|
14
|
+
private readonly insertFn;
|
|
15
|
+
loadState$: Observable<LoadState<KubernetesResourceList<R>>>;
|
|
16
|
+
queryParams$: Observable<Q>;
|
|
17
|
+
rawResponse$: Observable<KubernetesResourceList<R>>;
|
|
18
|
+
loading$: Observable<boolean>;
|
|
19
|
+
loadingError$: Observable<HttpErrorResponse | Status>;
|
|
20
|
+
hasMore$: Observable<boolean>;
|
|
21
|
+
continueToken$: Observable<string>;
|
|
22
|
+
items$: Observable<R[]>;
|
|
23
|
+
bypassItems$: ReplaySubject<R[]>;
|
|
24
|
+
timer: number;
|
|
25
|
+
snapshot: LoadSnapshot<KubernetesResourceList<R>, R, Q>;
|
|
26
|
+
constructor({ fetcher, activatedRoute }: ConfigWithRoute<R, Q, P>);
|
|
27
|
+
constructor({ fetcher, fetchParams$ }: ConfigWithParams<R, Q, P>);
|
|
28
|
+
reload(silent?: boolean): void;
|
|
29
|
+
loadMore(): void;
|
|
30
|
+
scanItems(scanner: ItemsScanner<R>): void;
|
|
31
|
+
destroy(): void;
|
|
32
|
+
create(resource: R): void;
|
|
33
|
+
update(resource: R): void;
|
|
34
|
+
delete(resource?: R): void;
|
|
35
|
+
private _create;
|
|
36
|
+
private _update;
|
|
37
|
+
private _delete;
|
|
38
|
+
private buildLoadStateStream;
|
|
39
|
+
private extractContinueTokenFromState;
|
|
40
|
+
private initStreams;
|
|
41
|
+
private buildWatcher;
|
|
42
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { WatchAPIResponse } from '@alauda-fe/dynamic-plugin-sdk';
|
|
2
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
3
|
+
import { Signal } from '@angular/core';
|
|
4
|
+
import { Params } from '@angular/router';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import { KubernetesResource, KubernetesResourceList, Status } from '../types';
|
|
7
|
+
export declare class K8SResourcePagedList<R extends KubernetesResource = KubernetesResource, P = unknown> {
|
|
8
|
+
private readonly config;
|
|
9
|
+
private readonly reload$$;
|
|
10
|
+
private readonly addedUid;
|
|
11
|
+
private readonly deletedUid;
|
|
12
|
+
params$: Observable<ListFetchParams<P>>;
|
|
13
|
+
loadState$: Observable<LoadState<R>>;
|
|
14
|
+
loading$: Observable<boolean>;
|
|
15
|
+
items$: Observable<R[]>;
|
|
16
|
+
totalItems$: Observable<number>;
|
|
17
|
+
loadError$: Observable<Status | HttpErrorResponse>;
|
|
18
|
+
$loading: Signal<boolean>;
|
|
19
|
+
$items: Signal<R[]>;
|
|
20
|
+
$totalItems: Signal<number>;
|
|
21
|
+
$loadError: Signal<Status | HttpErrorResponse>;
|
|
22
|
+
constructor(config: PagedListConfig<R, P>);
|
|
23
|
+
reload(): void;
|
|
24
|
+
private sourceLoadState;
|
|
25
|
+
private loadStateWithPolling;
|
|
26
|
+
private loadStateWithWatcher;
|
|
27
|
+
}
|
|
28
|
+
export interface PagedListConfig<R, P> {
|
|
29
|
+
params: Signal<ListFetchParams<P>> | Observable<ListFetchParams<P>>;
|
|
30
|
+
fetcher: (listParams: FetchSeed, extraParams: P) => Observable<KubernetesResourceList<R>>;
|
|
31
|
+
watcher?: (listParams: FetchSeed, extraParams: P) => Observable<WatchAPIResponse<R>>;
|
|
32
|
+
polling?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface ListFetchParams<P = never> {
|
|
35
|
+
pageIndex?: number | string;
|
|
36
|
+
pageSize?: number | string;
|
|
37
|
+
sortField?: string;
|
|
38
|
+
sortOrder?: 'asc' | 'desc';
|
|
39
|
+
keyword?: string;
|
|
40
|
+
fieldSelector?: string;
|
|
41
|
+
labelSelector?: string;
|
|
42
|
+
extra?: P;
|
|
43
|
+
}
|
|
44
|
+
export interface FetchSeed extends Record<string, string> {
|
|
45
|
+
limit?: string;
|
|
46
|
+
continue?: string;
|
|
47
|
+
fieldSelector?: string;
|
|
48
|
+
}
|
|
49
|
+
interface LoadState<R> {
|
|
50
|
+
items: R[];
|
|
51
|
+
totalItems: number;
|
|
52
|
+
loading: boolean;
|
|
53
|
+
loadSuccess: boolean;
|
|
54
|
+
loadError?: HttpErrorResponse | Status;
|
|
55
|
+
}
|
|
56
|
+
export declare function extractPagedListParams<P>(defaultParams?: ListFetchParams, extraParams?: (queryParams: Params) => P): Readonly<{
|
|
57
|
+
stream: () => Observable<ListFetchParams<P>>;
|
|
58
|
+
signal: () => Signal<ListFetchParams<P>>;
|
|
59
|
+
}>;
|
|
60
|
+
export declare function queryListParams(): (queryParams: Params) => void;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module k8s-resource-list
|
|
4
|
+
*/
|
|
5
|
+
import { WatchAPIResponse } from '@alauda-fe/dynamic-plugin-sdk';
|
|
6
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
7
|
+
import { ActivatedRoute } from '@angular/router';
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
import { KubernetesResource, KubernetesResourceList, Status, StringMap } from '../types';
|
|
10
|
+
import { K8SResourceList } from './k8s-resource-list';
|
|
11
|
+
export type Watcher<R extends KubernetesResource, Q> = (seedVersion: string, params?: Q) => Observable<WatchAPIResponse<R>>;
|
|
12
|
+
export type InsertFn<R> = (items: R[], res: R, hasMore: boolean) => R[];
|
|
13
|
+
export interface WatcherParams<R extends KubernetesResource, Q> {
|
|
14
|
+
list: K8SResourceList<R>;
|
|
15
|
+
watcher: Watcher<R, Q>;
|
|
16
|
+
insertFn?: InsertFn<R>;
|
|
17
|
+
}
|
|
18
|
+
interface BaseConfig<R extends KubernetesResource, Q> {
|
|
19
|
+
watcher?: Watcher<R, Q>;
|
|
20
|
+
insertFn?: InsertFn<R>;
|
|
21
|
+
limit?: number;
|
|
22
|
+
polling?: number;
|
|
23
|
+
}
|
|
24
|
+
export type ItemsScanner<R> = (items: R[]) => R[];
|
|
25
|
+
export interface ConfigWithRoute<R, Q, P> extends BaseConfig<R, Q> {
|
|
26
|
+
fetcher: (params: P) => Observable<KubernetesResourceList<R>>;
|
|
27
|
+
activatedRoute?: ActivatedRoute;
|
|
28
|
+
}
|
|
29
|
+
export interface ConfigWithParams<R, Q, P> extends BaseConfig<R, Q> {
|
|
30
|
+
fetcher: (params: P) => Observable<KubernetesResourceList<R>>;
|
|
31
|
+
fetchParams$?: Observable<Q>;
|
|
32
|
+
}
|
|
33
|
+
export declare enum LoadAction {
|
|
34
|
+
Reload = "Reload",
|
|
35
|
+
SilentReload = "SilentReload",
|
|
36
|
+
LoadMore = "LoadMore"
|
|
37
|
+
}
|
|
38
|
+
export interface LoadState<R> {
|
|
39
|
+
action?: LoadAction;
|
|
40
|
+
rawResponse?: R;
|
|
41
|
+
loading?: boolean;
|
|
42
|
+
loadingError?: HttpErrorResponse | Status;
|
|
43
|
+
}
|
|
44
|
+
export interface ListParams extends StringMap {
|
|
45
|
+
limit: string;
|
|
46
|
+
continue: string;
|
|
47
|
+
}
|
|
48
|
+
export interface StreamListLoader<R, T> {
|
|
49
|
+
loadState$: Observable<LoadState<R>>;
|
|
50
|
+
loading$: Observable<boolean>;
|
|
51
|
+
loadingError$: Observable<HttpErrorResponse | Status>;
|
|
52
|
+
hasMore$: Observable<boolean>;
|
|
53
|
+
rawResponse$: Observable<R>;
|
|
54
|
+
items$: Observable<T[]>;
|
|
55
|
+
snapshot: StreamListLoaderSnapshot<R, T>;
|
|
56
|
+
loadMore(): void;
|
|
57
|
+
reload(): void;
|
|
58
|
+
}
|
|
59
|
+
export interface StreamListLoaderSnapshot<R, T> {
|
|
60
|
+
rawResponse?: R;
|
|
61
|
+
loading?: boolean;
|
|
62
|
+
loadingError?: HttpErrorResponse | Status;
|
|
63
|
+
hasMore?: boolean;
|
|
64
|
+
continueToken?: string;
|
|
65
|
+
items?: T[];
|
|
66
|
+
}
|
|
67
|
+
export interface LoadSnapshot<R, T, Q> extends StreamListLoaderSnapshot<R, T> {
|
|
68
|
+
queryParams?: Q;
|
|
69
|
+
}
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module k8s-resource-list
|
|
4
|
+
*/
|
|
5
|
+
import { ActivatedRoute } from '@angular/router';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { LabelSelectorRequirement, ResourceListParams, StringMap } from '../types';
|
|
8
|
+
/**
|
|
9
|
+
* convert selector.matchLabels to string
|
|
10
|
+
* refers to: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
|
11
|
+
*/
|
|
12
|
+
export declare function matchLabelsToString(params?: StringMap): string;
|
|
13
|
+
/**
|
|
14
|
+
* convert string to selector.matchLabels
|
|
15
|
+
*/
|
|
16
|
+
export declare function stringToMatchLabels(str?: string): Record<string, string>;
|
|
17
|
+
export declare function matchExpressionsToString(params: LabelSelectorRequirement[]): string;
|
|
18
|
+
export declare function extractListParamsFromRoute(route: ActivatedRoute): Observable<ResourceListParams>;
|
|
19
|
+
export declare function normalizeParams<P extends object>(params: P): P;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { K8sResourceDefinition } from '@alauda-fe/dynamic-plugin-sdk';
|
|
2
|
+
export interface ManageResourceType {
|
|
3
|
+
kind: string;
|
|
4
|
+
definition: K8sResourceDefinition;
|
|
5
|
+
kindAlias?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const CONTROLLED_RESOURCE_TRANSLATIONS: ManageResourceType[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module k8s-shared
|
|
4
|
+
* @preferred
|
|
5
|
+
*/
|
|
6
|
+
export * from './update-description-dialog/component';
|
|
7
|
+
export * from './update-display-name-dialog/component';
|
|
8
|
+
export * from './update-key-value-dialog/component';
|
|
9
|
+
export * from './k8s-shared-util.service';
|
|
10
|
+
export * from './k8s-resource-translate-key.pipe';
|
|
11
|
+
export * from './resource-mark/component';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InjectionToken, PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare const K8S_RESOURCE_TRANSLATE_KEY: InjectionToken<(type: string, apiGroup: string) => string>;
|
|
4
|
+
export declare class K8sResourceTranslateKeyPipe implements PipeTransform {
|
|
5
|
+
private getKey;
|
|
6
|
+
transform(type: string, apiGroup?: string): string;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<K8sResourceTranslateKeyPipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<K8sResourceTranslateKeyPipe, "aclK8sResourceTranslateKey", true>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { K8sResourceDefinition, ResourceWriteParams, K8sUtilService } from '@alauda-fe/dynamic-plugin-sdk';
|
|
2
|
+
import { Injector } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { ANNOTATIONS, LABELS } from '../constants';
|
|
5
|
+
import { KubernetesResource, StringMap } from '../types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class K8sSharedUtilService<R extends string = string> extends K8sUtilService<R> {
|
|
8
|
+
constructor(injector: Injector);
|
|
9
|
+
/**
|
|
10
|
+
* 更新 Annotation 或 Label
|
|
11
|
+
*/
|
|
12
|
+
updatePart<T extends KubernetesResource>(params: ResourceWriteParams<R, T> & {
|
|
13
|
+
readonlyKeys?: Array<string | RegExp>;
|
|
14
|
+
part: typeof ANNOTATIONS | typeof LABELS;
|
|
15
|
+
getResourceSpec?: (stringMap: StringMap) => Record<string, unknown>;
|
|
16
|
+
dialogClass?: string;
|
|
17
|
+
}): Observable<T>;
|
|
18
|
+
updateDisplayName<T extends KubernetesResource>({ type, cluster, resource, definition, }: {
|
|
19
|
+
definition?: K8sResourceDefinition;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated use `definition` instead
|
|
22
|
+
*/
|
|
23
|
+
type?: R;
|
|
24
|
+
cluster?: string;
|
|
25
|
+
resource: T;
|
|
26
|
+
}, validateMaxLength?: boolean): Observable<T>;
|
|
27
|
+
updateDescription<T extends KubernetesResource>({ type, cluster, resource, definition, }: {
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated use `definition` instead
|
|
30
|
+
*/
|
|
31
|
+
type?: R;
|
|
32
|
+
definition?: K8sResourceDefinition;
|
|
33
|
+
cluster?: string;
|
|
34
|
+
resource: T;
|
|
35
|
+
}): Observable<T>;
|
|
36
|
+
/**
|
|
37
|
+
* 单项目绑定切换至多项目绑定时,兼容之前的 project name 形式
|
|
38
|
+
* 老格式 cpaas.io/project: "ALL_ALL" 或者 project.cpaas.io/name: "ALL_ALL"
|
|
39
|
+
* 新格式 project.cpaas.io/ALL_ALL: "true"
|
|
40
|
+
* @param {(KubernetesResource | string[])} resource
|
|
41
|
+
* @returns
|
|
42
|
+
* @memberof K8sUtilService
|
|
43
|
+
*/
|
|
44
|
+
getProjectNames(resource: KubernetesResource | string[]): string[];
|
|
45
|
+
getProjectLabels(projects: string[], value?: string): StringMap;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<K8sSharedUtilService<any>, never>;
|
|
47
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<K8sSharedUtilService<any>>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ThemeService } from '@alauda/ui';
|
|
2
|
+
import { KubernetesResource } from '../../types/k8s/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class K8sResourceMarkComponent {
|
|
5
|
+
private theme;
|
|
6
|
+
size: 'small' | 'mini';
|
|
7
|
+
currentTheme: import("@angular/core").Signal<import("@alauda/ui").Theme>;
|
|
8
|
+
constructor(theme: ThemeService);
|
|
9
|
+
kind: import("@angular/core").InputSignal<string>;
|
|
10
|
+
apiVersion: import("@angular/core").InputSignal<string>;
|
|
11
|
+
resource: import("@angular/core").InputSignal<KubernetesResource>;
|
|
12
|
+
mark: import("@angular/core").Signal<string>;
|
|
13
|
+
color: import("@angular/core").Signal<string>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<K8sResourceMarkComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<K8sResourceMarkComponent, "acl-k8s-mark", never, { "size": { "alias": "size"; "required": false; }; "kind": { "alias": "kind"; "required": false; "isSignal": true; }; "apiVersion": { "alias": "apiVersion"; "required": false; "isSignal": true; }; "resource": { "alias": "resource"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DialogRef } from '@alauda/ui';
|
|
2
|
+
import { K8sApiService, K8sResourceDefinition, K8sUtilService, ResourceType } from '@alauda-fe/dynamic-plugin-sdk';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { KubernetesResource } from '../../types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class UpdateDescriptionDialogComponent<T extends KubernetesResource> {
|
|
7
|
+
private readonly dialogRef;
|
|
8
|
+
private readonly k8sApi;
|
|
9
|
+
private readonly k8sUtil;
|
|
10
|
+
data: {
|
|
11
|
+
definition?: K8sResourceDefinition;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated use `definition` instead
|
|
14
|
+
*/
|
|
15
|
+
type?: ResourceType;
|
|
16
|
+
cluster?: string;
|
|
17
|
+
resource: T;
|
|
18
|
+
};
|
|
19
|
+
description: string;
|
|
20
|
+
confirming$$: BehaviorSubject<boolean>;
|
|
21
|
+
constructor(dialogRef: DialogRef, k8sApi: K8sApiService, k8sUtil: K8sUtilService, data: {
|
|
22
|
+
definition?: K8sResourceDefinition;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated use `definition` instead
|
|
25
|
+
*/
|
|
26
|
+
type?: ResourceType;
|
|
27
|
+
cluster?: string;
|
|
28
|
+
resource: T;
|
|
29
|
+
});
|
|
30
|
+
confirm(): void;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UpdateDescriptionDialogComponent<any>, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UpdateDescriptionDialogComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DialogRef } from '@alauda/ui';
|
|
2
|
+
import { K8sApiService, K8sResourceDefinition, K8sUtilService } from '@alauda-fe/dynamic-plugin-sdk';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { KubernetesResource } from '../../types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class UpdateDisplayNameDialogComponent<T extends KubernetesResource> {
|
|
7
|
+
private readonly dialogRef;
|
|
8
|
+
private readonly k8sApi;
|
|
9
|
+
private readonly k8sUtil;
|
|
10
|
+
data: {
|
|
11
|
+
definition?: K8sResourceDefinition;
|
|
12
|
+
cluster?: string;
|
|
13
|
+
resource: T;
|
|
14
|
+
validateMaxLength?: boolean;
|
|
15
|
+
};
|
|
16
|
+
displayName: string;
|
|
17
|
+
confirming$$: BehaviorSubject<boolean>;
|
|
18
|
+
constructor(dialogRef: DialogRef, k8sApi: K8sApiService, k8sUtil: K8sUtilService, data: {
|
|
19
|
+
definition?: K8sResourceDefinition;
|
|
20
|
+
cluster?: string;
|
|
21
|
+
resource: T;
|
|
22
|
+
validateMaxLength?: boolean;
|
|
23
|
+
});
|
|
24
|
+
confirm(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UpdateDisplayNameDialogComponent<any>, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UpdateDisplayNameDialogComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DialogRef, MessageService } from '@alauda/ui';
|
|
2
|
+
import { StringMap, TranslateService } from '@alauda-fe/dynamic-plugin-sdk';
|
|
3
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
4
|
+
import { ValidatorFn } from '@angular/forms';
|
|
5
|
+
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export interface UpdateKeyValueDialogData<R = unknown, Context = unknown, T = StringMap> {
|
|
8
|
+
title?: string;
|
|
9
|
+
keyValues?: T;
|
|
10
|
+
confirmButton?: string;
|
|
11
|
+
readonlyKeys?: Array<string | RegExp>;
|
|
12
|
+
onUpdate?: (keyValues: T) => Promise<R> | Observable<R>;
|
|
13
|
+
context?: Context;
|
|
14
|
+
updateSuccessMsg?: string;
|
|
15
|
+
updateFailMsg?: string;
|
|
16
|
+
validator?: {
|
|
17
|
+
key: ValidatorFn | ValidatorFn[];
|
|
18
|
+
value?: ValidatorFn | ValidatorFn[];
|
|
19
|
+
};
|
|
20
|
+
errorMapper?: Record<string, unknown>;
|
|
21
|
+
showMessage?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class UpdateKeyValueDialogComponent<R = unknown, Context = unknown, T = StringMap> implements OnInit, OnDestroy {
|
|
24
|
+
private readonly dialogRef;
|
|
25
|
+
private readonly message;
|
|
26
|
+
private readonly translate;
|
|
27
|
+
data: UpdateKeyValueDialogData<R, Context, T>;
|
|
28
|
+
readonly onUpdate$$: Subject<void>;
|
|
29
|
+
readonly submitting$$: BehaviorSubject<boolean>;
|
|
30
|
+
private readonly originalKeyValues;
|
|
31
|
+
keyValues: T;
|
|
32
|
+
private readonly destroy$$;
|
|
33
|
+
constructor(dialogRef: DialogRef<UpdateKeyValueDialogComponent<R, Context, T>, UpdateKeyValueDialogData<R, Context, T>>, message: MessageService, translate: TranslateService, data?: UpdateKeyValueDialogData<R, Context, T>);
|
|
34
|
+
ngOnInit(): void;
|
|
35
|
+
ngOnDestroy(): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UpdateKeyValueDialogComponent<any, any, any>, [null, null, null, { optional: true; }]>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UpdateKeyValueDialogComponent<any, any, any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
38
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alauda-fe/dynamic-plugin-shared",
|
|
3
|
+
"version": "0.0.1-alpha.0",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@alauda-fe/i18n": "1.0.4",
|
|
6
|
+
"@alauda/chart": "^0.1.11",
|
|
7
|
+
"@alauda/code-editor": "^5.1.0",
|
|
8
|
+
"@alauda/ui": "^7.2.0",
|
|
9
|
+
"@alauda-fe/dynamic-plugin-sdk": "0.0.1",
|
|
10
|
+
"@angular/common": "^18.1.1",
|
|
11
|
+
"@angular/core": "^18.1.1",
|
|
12
|
+
"@angular/animations": "^18.1.1",
|
|
13
|
+
"@angular/cdk": "^16.2.2",
|
|
14
|
+
"@angular/compiler": "^18.1.1",
|
|
15
|
+
"@angular/forms": "^18.1.1",
|
|
16
|
+
"@angular/platform-browser": "^18.1.1",
|
|
17
|
+
"@angular/platform-browser-dynamic": "^18.1.1",
|
|
18
|
+
"@angular/router": "^18.1.1",
|
|
19
|
+
"ab64": "^0.1.1",
|
|
20
|
+
"compare-versions": "^6.1.0",
|
|
21
|
+
"cron-parser": "^4.9.0",
|
|
22
|
+
"d3": "^7.8.5",
|
|
23
|
+
"dayjs": "^1.11.9",
|
|
24
|
+
"lodash-es": "^4.17.21",
|
|
25
|
+
"marked": "^7.0.5",
|
|
26
|
+
"monaco-editor": "^0.39.0",
|
|
27
|
+
"ng-monaco-editor": "^5.1.0",
|
|
28
|
+
"ng-resource-form-util": "^6.1.0",
|
|
29
|
+
"ramda": "^0.29.0",
|
|
30
|
+
"rxjs": "^7.8.1",
|
|
31
|
+
"ts-md5": "^1.3.1",
|
|
32
|
+
"yaml": "^2.3.2",
|
|
33
|
+
"zone.js": "^0.13.1"
|
|
34
|
+
},
|
|
35
|
+
"private": false,
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"sideEffects": false,
|
|
40
|
+
"module": "fesm2022/alauda-fe-dynamic-plugin-shared.mjs",
|
|
41
|
+
"typings": "index.d.ts",
|
|
42
|
+
"exports": {
|
|
43
|
+
"./package.json": {
|
|
44
|
+
"default": "./package.json"
|
|
45
|
+
},
|
|
46
|
+
".": {
|
|
47
|
+
"types": "./index.d.ts",
|
|
48
|
+
"esm2022": "./esm2022/alauda-fe-dynamic-plugin-shared.mjs",
|
|
49
|
+
"esm": "./esm2022/alauda-fe-dynamic-plugin-shared.mjs",
|
|
50
|
+
"default": "./fesm2022/alauda-fe-dynamic-plugin-shared.mjs"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"tslib": "^2.3.0"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
|
+
import { InterceptDeactivateService } from './deactivate.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class InterceptDeactivateDirective implements AfterViewInit, OnDestroy {
|
|
6
|
+
private readonly elRef;
|
|
7
|
+
private readonly interceptDeactivate;
|
|
8
|
+
enabled: boolean | '';
|
|
9
|
+
enabled$$: Observable<boolean | ''>;
|
|
10
|
+
enabled$: Observable<boolean>;
|
|
11
|
+
destroy$$: Subject<void>;
|
|
12
|
+
constructor(elRef: ElementRef<HTMLElement>, interceptDeactivate: InterceptDeactivateService);
|
|
13
|
+
ngAfterViewInit(): void;
|
|
14
|
+
ngOnDestroy(): void;
|
|
15
|
+
onBeforeUnload(): boolean;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InterceptDeactivateDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<InterceptDeactivateDirective, "[aclInterceptDeactivate]", never, { "enabled": { "alias": "aclInterceptDeactivate"; "required": false; }; }, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { ActivatedRouteSnapshot, CanDeactivate, RouterStateSnapshot } from '@angular/router';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare const ESCAPE_DEACTIVATE_GUARD = "__ESCAPE_DEACTIVATE_GUARD__";
|
|
6
|
+
export declare const CURR_ESCAPE_DEACTIVATE_GUARD = "__CURR_ESCAPE_DEACTIVATE_GUARD__";
|
|
7
|
+
export declare class InterceptDeactivateGuard implements CanDeactivate<unknown> {
|
|
8
|
+
private readonly injector;
|
|
9
|
+
constructor(injector: Injector);
|
|
10
|
+
canDeactivate(component: object, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState: RouterStateSnapshot): Observable<boolean>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InterceptDeactivateGuard, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InterceptDeactivateGuard>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DialogService } from '@alauda/ui';
|
|
2
|
+
import { TranslateService } from '@alauda-fe/dynamic-plugin-sdk';
|
|
3
|
+
import { Location } from '@angular/common';
|
|
4
|
+
import { OnDestroy } from '@angular/core';
|
|
5
|
+
import { Router } from '@angular/router';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class InterceptDeactivateService implements OnDestroy {
|
|
9
|
+
private readonly location;
|
|
10
|
+
private readonly router;
|
|
11
|
+
private readonly dialog;
|
|
12
|
+
private readonly translate;
|
|
13
|
+
destroy$$: Subject<void>;
|
|
14
|
+
constructor(location: Location, router: Router, dialog: DialogService, translate: TranslateService);
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
intercept({ title, content, context, errorFallback, }?: {
|
|
17
|
+
title?: string;
|
|
18
|
+
content?: string;
|
|
19
|
+
context?: unknown;
|
|
20
|
+
errorFallback?: boolean;
|
|
21
|
+
}): import("rxjs").Observable<boolean>;
|
|
22
|
+
back(escape?: boolean): Promise<void>;
|
|
23
|
+
forward(escape?: boolean): Promise<void>;
|
|
24
|
+
searchParamsToQueryParams(searchParams: URLSearchParams): Record<string, string | string[]>;
|
|
25
|
+
escape(): Promise<void>;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InterceptDeactivateService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InterceptDeactivateService>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module utils
|
|
4
|
+
*/
|
|
5
|
+
import { PipeTransform } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class CalcPipe implements PipeTransform {
|
|
8
|
+
transform<T extends (...args: unknown[]) => unknown>(calc: T, ...args: Parameters<T>): ReturnType<T>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalcPipe, never>;
|
|
10
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CalcPipe, "calc", true>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import 'cronstrue/locales/zh_CN';
|
|
3
|
+
import 'cronstrue/locales/en';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class CronHumanReadablePipe implements PipeTransform {
|
|
6
|
+
transform(cronString: string, locale: string): any;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CronHumanReadablePipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CronHumanReadablePipe, "aclCronHumanReadable", false>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TimeService } from '@alauda-fe/dynamic-plugin-sdk';
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CrontabNextPipe implements PipeTransform {
|
|
5
|
+
private readonly time;
|
|
6
|
+
constructor(time: TimeService);
|
|
7
|
+
transform(rule: string, step?: number, { utc, showUtc, format, tz, formatTz, showLocalTz, parseInCurrentTz, }?: {
|
|
8
|
+
utc?: boolean;
|
|
9
|
+
showUtc?: boolean;
|
|
10
|
+
format?: string;
|
|
11
|
+
tz?: string;
|
|
12
|
+
formatTz?: string;
|
|
13
|
+
showLocalTz?: boolean;
|
|
14
|
+
parseInCurrentTz?: boolean;
|
|
15
|
+
}): string;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CrontabNextPipe, never>;
|
|
17
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CrontabNextPipe, "aclCrontabNext", true>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TranslateService } from '@alauda-fe/dynamic-plugin-sdk';
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DurationPipe implements PipeTransform {
|
|
5
|
+
private readonly translate;
|
|
6
|
+
constructor(translate: TranslateService);
|
|
7
|
+
transform(ms: any): string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DurationPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DurationPipe, "aclDuration", true>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @module utils
|
|
4
|
+
*/
|
|
5
|
+
import { PipeTransform } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare const FIELD_NOT_AVAILABLE_PLACEHOLDER = "-";
|
|
8
|
+
export declare const isFieldNotAvailable: (field: unknown) => boolean;
|
|
9
|
+
export declare class FieldNotAvailablePipe implements PipeTransform {
|
|
10
|
+
transform(field: unknown): string;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldNotAvailablePipe, never>;
|
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FieldNotAvailablePipe, "aclFieldNotAvailable", true>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ImgHeaderPipe implements PipeTransform {
|
|
4
|
+
transform(value: string, prefix?: string): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImgHeaderPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ImgHeaderPipe, "aclImageHeader", true>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ThemeService } from '@alauda/ui';
|
|
2
|
+
import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ImgThemePipe implements PipeTransform, OnDestroy {
|
|
5
|
+
private readonly theme;
|
|
6
|
+
private readonly cdr;
|
|
7
|
+
private readonly destroy$$;
|
|
8
|
+
constructor(theme: ThemeService, cdr: ChangeDetectorRef);
|
|
9
|
+
transform(value: string): string;
|
|
10
|
+
ngOnDestroy(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImgThemePipe, never>;
|
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ImgThemePipe, "aclImageTheme", true>;
|
|
13
|
+
}
|
package/pipes/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './crontab-next.pipe';
|
|
2
|
+
export * from './field-not-available.pipe';
|
|
3
|
+
export * from './img-header.pipe';
|
|
4
|
+
export * from './img-theme.pipe';
|
|
5
|
+
export * from './keyvalue.pipe';
|
|
6
|
+
export * from './safe.pipe';
|
|
7
|
+
export * from './sanitize.pipe';
|
|
8
|
+
export * from './time.pipe';
|
|
9
|
+
export * from './page-env.pipe';
|
|
10
|
+
export * from './marked.pipe';
|
|
11
|
+
export * from './parse-json-translate.pipe';
|
|
12
|
+
export * from './timezone-display.pipe';
|
|
13
|
+
export * from './cron-human-readable.pipe';
|
|
14
|
+
export { ParseJsonPipe } from './parse-json.pipe';
|
|
15
|
+
export { MinimumFormatPipe } from './minimum-format.pipe';
|
|
16
|
+
export * from './duration.pipe';
|
|
17
|
+
export * from './pure.pipe';
|
|
18
|
+
export * from './calc.pipe';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { KeyValuePipe as _KeyValuePipe } from '@angular/common';
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare const asIsComparator: (_a: unknown, _b: unknown) => number;
|
|
5
|
+
export declare class KeyValuePipe extends _KeyValuePipe implements PipeTransform {
|
|
6
|
+
transform<K extends keyof any, V>(input: Record<K, V>): import("@angular/common").KeyValue<string, V>[];
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KeyValuePipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<KeyValuePipe, "aclKeyvalue", true>;
|
|
9
|
+
}
|