@spinnaker/core 2025.0.6 → 2025.1.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/dist/api/ApiService.d.ts +2 -2
- package/dist/api/mock/mockHttpUtils.d.ts +2 -2
- package/dist/application/listExtractor/AppListExtractor.d.ts +2 -2
- package/dist/bootstrap/paramChangedHelper.d.ts +1 -1
- package/dist/cloudProvider/providerSelection/ProviderSelectionService.d.ts +1 -1
- package/dist/cluster/filter/ClusterFilterService.d.ts +1 -1
- package/dist/cluster/task.matcher.d.ts +1 -1
- package/dist/domain/IManagedEntity.d.ts +8 -8
- package/dist/domain/IServerGroup.d.ts +1 -0
- package/dist/domain/IStageTypeConfig.d.ts +1 -1
- package/dist/entityTag/notifications/NotificationsPopover.d.ts +1 -1
- package/dist/image/image.reader.d.ts +2 -2
- package/dist/index.js +1726 -1521
- package/dist/index.js.map +1 -1
- package/dist/managed/config/Configuration.d.ts +1 -1
- package/dist/managed/config/GitIntegration.d.ts +1 -1
- package/dist/managed/constraints/registry.d.ts +2 -2
- package/dist/managed/graphql/graphql-sdk.d.ts +137 -137
- package/dist/managed/managed.states.d.ts +1 -1
- package/dist/managed/overview/artifact/ArtifactActionModal.d.ts +1 -1
- package/dist/managed/overview/artifact/VersionOperation.d.ts +3 -3
- package/dist/managed/overview/artifact/utils.d.ts +2 -2
- package/dist/managed/overview/types.d.ts +9 -9
- package/dist/managed/resourceHistory/ManagedResourceHistoryModal.d.ts +1 -1
- package/dist/managed/resources/ResourceDefinitionModal.d.ts +1 -1
- package/dist/managed/resources/resourceRegistry.d.ts +1 -1
- package/dist/managed/versionMetadata/MetadataComponents.d.ts +1 -1
- package/dist/managed/versionsHistory/types.d.ts +6 -6
- package/dist/manifest/ManifestYaml.d.ts +1 -1
- package/dist/modal/wizard/WizardPage.d.ts +1 -1
- package/dist/navigation/urlParser.d.ts +1 -1
- package/dist/pagerDuty/Pager.d.ts +1 -1
- package/dist/pipeline/config/actions/pipelineJson/EditPipelineJsonModal.d.ts +1 -1
- package/dist/pipeline/config/stages/FormikStageConfig.d.ts +2 -2
- package/dist/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.d.ts +1 -0
- package/dist/pipeline/config/stages/common/ExecutionDetailsSection.d.ts +1 -1
- package/dist/pipeline/config/stages/entityTags/TagEditor.d.ts +1 -1
- package/dist/pipeline/config/templates/PipelineTemplateReader.d.ts +1 -1
- package/dist/pipeline/config/triggers/artifacts/helm-image/HelmImageArtifactEditor.d.ts +3 -0
- package/dist/pipeline/config/validation/anyFieldRequired.validator.d.ts +1 -1
- package/dist/pipeline/config/validation/requiredField.validator.d.ts +1 -1
- package/dist/plugins/plugin.registry.d.ts +1 -1
- package/dist/presentation/Placement.d.ts +1 -1
- package/dist/presentation/Popover.d.ts +1 -1
- package/dist/presentation/details/Details.d.ts +7 -0
- package/dist/presentation/forms/fields/FormField.d.ts +1 -1
- package/dist/presentation/forms/fields/FormikExpressionField.d.ts +1 -1
- package/dist/presentation/forms/fields/FormikExpressionRegexField.d.ts +1 -1
- package/dist/presentation/forms/fields/FormikFormField.d.ts +1 -1
- package/dist/presentation/forms/inputs/interface.d.ts +2 -2
- package/dist/presentation/forms/validation/categories.d.ts +3 -3
- package/dist/presentation/forms/validation/validation.d.ts +3 -3
- package/dist/presentation/hooks/useLatestPromise.hook.d.ts +1 -1
- package/dist/presentation/modal/showModal.d.ts +1 -1
- package/dist/presentation/tables/Table.d.ts +1 -1
- package/dist/presentation/tables/TableCell.d.ts +1 -1
- package/dist/presentation/tables/TableRow.d.ts +1 -1
- package/dist/presentation/tables/standardGridTableLayout.d.ts +1 -1
- package/dist/projects/Projects.d.ts +2 -0
- package/dist/projects/index.d.ts +1 -0
- package/dist/projects/projects.module.d.ts +3 -2
- package/dist/reactShims/AngularJSAdapter.d.ts +3 -3
- package/dist/search/infrastructure/SearchResultPods.d.ts +1 -1
- package/dist/search/infrastructure/infrastructureSearch.service.d.ts +1 -1
- package/dist/serverGroup/details/ServerGroupDetailsWrapper.d.ts +1 -1
- package/dist/serverGroupManager/index.d.ts +1 -0
- package/dist/serverGroupManager/serverGroupManager.states.d.ts +1 -1
- package/dist/utils/Logger.d.ts +1 -1
- package/dist/utils/feature/Feature.d.ts +58 -0
- package/dist/utils/feature/FeatureContext.d.ts +24 -0
- package/dist/utils/feature/index.d.ts +3 -0
- package/dist/utils/feature/useFeature.hook.d.ts +15 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/json/traverseObject.d.ts +1 -1
- package/dist/utils/parseNum.d.ts +1 -0
- package/dist/utils/testUtils/index.d.ts +7 -0
- package/dist/utils/workerPool.d.ts +1 -1
- package/package.json +3 -3
- package/src/artifact/ArtifactIconService.ts +1 -0
- package/src/artifact/ArtifactTypes.ts +1 -0
- package/src/artifact/ExpectedArtifactSelectorViewController.ts +1 -1
- package/src/config/VersionChecker.tsx +1 -1
- package/src/domain/IServerGroup.ts +1 -0
- package/src/help/help.contents.ts +1 -1
- package/src/navigation/UrlBuilder.ts +15 -0
- package/src/notification/NotificationsList.tsx +12 -8
- package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.tsx +8 -2
- package/src/pipeline/config/triggers/artifacts/helm-image/HelmImageArtifactEditor.tsx +169 -0
- package/src/pipeline/config/triggers/artifacts/index.ts +3 -0
- package/src/pipeline/config/validation/PipelineConfigValidator.ts +2 -2
- package/src/pipeline/executions/executionGroup/ExecutionGroups.tsx +37 -2
- package/src/pipeline/filter/executionFilter.service.ts +50 -5
- package/src/presentation/details/Details.tsx +18 -1
- package/src/presentation/forms/FormikForm.tsx +1 -1
- package/src/projects/ProjectHeader.tsx +12 -9
- package/src/projects/Projects.spec.tsx +141 -0
- package/src/projects/Projects.tsx +148 -0
- package/src/projects/index.ts +1 -0
- package/src/projects/{projects.module.js → projects.module.ts} +0 -2
- package/src/projects/projects.states.ts +4 -6
- package/src/serverGroup/details/ServerGroupDetails.tsx +1 -1
- package/src/serverGroupManager/ServerGroupManager.tsx +2 -0
- package/src/serverGroupManager/ServerGroupManagerTag.tsx +1 -1
- package/src/serverGroupManager/index.ts +1 -0
- package/src/serverGroupManager/serverGroupManager.states.ts +3 -3
- package/src/utils/feature/Feature.tsx +98 -0
- package/src/utils/feature/FeatureContext.tsx +49 -0
- package/src/utils/feature/index.ts +3 -0
- package/src/utils/feature/useFeature.hook.tsx +25 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/parseNum.ts +2 -0
- package/src/utils/testUtils/index.tsx +30 -0
- package/dist/projects/projects.controller.d.ts +0 -2
- package/src/projects/projects.controller.js +0 -112
- package/src/projects/projects.controller.spec.js +0 -86
- package/src/projects/projects.html +0 -87
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Routes = 'overview' | 'config' | 'history';
|
|
2
2
|
export declare const MANAGED_STATES = "spinnaker.core.managed.states";
|
|
@@ -12,7 +12,7 @@ export interface IVersionActionsProps {
|
|
|
12
12
|
isVetoed?: boolean;
|
|
13
13
|
isCurrent?: boolean;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
type InternalModalProps<T = any> = Omit<IArtifactActionModalProps, 'logCategory'> & {
|
|
16
16
|
actionProps: IVersionActionsProps & T;
|
|
17
17
|
};
|
|
18
18
|
export declare const PinActionModal: ({ actionProps, ...props }: InternalModalProps<IVersionActionsProps & {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { QueryArtifactVersionTaskStatus, QueryConstraint } from '../types';
|
|
3
3
|
import './VersionOperationIcon.less';
|
|
4
|
-
|
|
4
|
+
type AllStatuses = QueryConstraint['status'] | QueryArtifactVersionTaskStatus;
|
|
5
5
|
export declare const ACTION_DISPLAY_NAMES: readonly ["passed", "overridden", "pending", "failed"];
|
|
6
|
-
export
|
|
7
|
-
|
|
6
|
+
export type ActionDisplayName = typeof ACTION_DISPLAY_NAMES[number];
|
|
7
|
+
type ActionStatusUtils = {
|
|
8
8
|
[key in AllStatuses]: {
|
|
9
9
|
className?: string;
|
|
10
10
|
displayName: ActionDisplayName;
|
|
@@ -19,8 +19,8 @@ export interface LifecycleEventSummary {
|
|
|
19
19
|
export declare const getLifecycleEventSummary: (version: QueryArtifactVersion | undefined, type: QueryLifecycleStep['type']) => LifecycleEventSummary | undefined;
|
|
20
20
|
export declare const isVersionVetoed: (version?: QueryArtifactVersion | SingleVersionArtifactVersion) => boolean;
|
|
21
21
|
export declare const isVersionPending: (version?: QueryArtifactVersion | SingleVersionArtifactVersion) => boolean;
|
|
22
|
-
export
|
|
23
|
-
export
|
|
22
|
+
export type ICurrentVersion = NonNullable<NonNullable<NonNullable<FetchCurrentVersionQuery['application']>['environments'][number]['state']['artifacts']>[number]['versions']>[number];
|
|
23
|
+
export type IVersionRelativeAgeToCurrent = 'CURRENT' | 'NEWER' | 'OLDER';
|
|
24
24
|
export declare const getRelativeAgeToCurrent: ({ isCurrent, createdAt, currentVersion, }: {
|
|
25
25
|
isCurrent?: boolean;
|
|
26
26
|
createdAt?: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { FetchApplicationQuery } from '../graphql/graphql-sdk';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
2
|
+
export type QueryEnvironment = NonNullable<FetchApplicationQuery['application']>['environments'][number];
|
|
3
|
+
export type QueryArtifact = NonNullable<QueryEnvironment['state']['artifacts']>[number];
|
|
4
|
+
export type QueryResource = NonNullable<QueryEnvironment['state']['resources']>[number];
|
|
5
|
+
export type QueryArtifactVersion = NonNullable<QueryArtifact['versions']>[number];
|
|
6
|
+
export type QueryLifecycleStep = NonNullable<QueryArtifactVersion['lifecycleSteps']>[number];
|
|
7
|
+
export type QueryGitMetadata = QueryArtifactVersion['gitMetadata'];
|
|
8
|
+
export type QueryConstraint = NonNullable<QueryArtifactVersion['constraints']>[number];
|
|
9
|
+
export type QueryArtifactVersionTask = NonNullable<QueryArtifactVersion['verifications']>[number] | NonNullable<QueryArtifactVersion['postDeploy']>[number];
|
|
10
|
+
export type QueryArtifactVersionTaskStatus = QueryArtifactVersionTask['status'];
|
|
11
11
|
export interface ArtifactVersionProps {
|
|
12
12
|
environment: string;
|
|
13
13
|
reference: string;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import type { IManagedResourceSummary } from '../../domain';
|
|
3
3
|
import type { IModalComponentProps } from '../../presentation/modal';
|
|
4
4
|
import './ManagedResourceHistoryModal.less';
|
|
5
|
-
export
|
|
5
|
+
export type IManagedResourceHistoryModalProps = IModalComponentProps & Pick<IManagedResourceSummary, 'id' | 'displayName'>;
|
|
6
6
|
export declare const showManagedResourceHistoryModal: (props: IManagedResourceHistoryModalProps) => Promise<import("../../presentation/modal").IModalResult<any, any>>;
|
|
7
7
|
export declare const ManagedResourceHistoryModal: ({ id, displayName, dismissModal }: IManagedResourceHistoryModalProps) => JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { QueryResource } from '../overview/types';
|
|
3
3
|
import type { IModalComponentProps } from '../../presentation/modal';
|
|
4
4
|
import './ResourceDefinitionModal.less';
|
|
5
|
-
export
|
|
5
|
+
export type IResourceDefinitionModalProps = IModalComponentProps & {
|
|
6
6
|
resource: QueryResource;
|
|
7
7
|
};
|
|
8
8
|
export declare const showResourceDefinitionModal: (props: IResourceDefinitionModalProps) => Promise<import("../../presentation/modal").IModalResult<any, any>>;
|
|
@@ -13,7 +13,7 @@ export interface IResourceLinkProps {
|
|
|
13
13
|
displayName?: string;
|
|
14
14
|
}
|
|
15
15
|
declare class ResourcesManager extends BasePluginManager<IResourceKindConfig> {
|
|
16
|
-
getIcon(kind: string): "placeholder" | "menu" | "close" | "play" | "add" | "done" | "environment" | "artifact" | "config" | "bake" | "plus" | "accordionCollapse" | "accordionExpand" | "accordionExpandAll" | "artifactApproved" | "artifactBad" | "artifactPending" | "artifactSkipped" | "build" | "buildFail" | "buildSuccess" | "canaryConfig" | "canaryFail" | "canaryRunning" | "canaryPass" | "canaryMarginal" | "caretRight" | "checkBadge" | "checkboxIndeterminate" | "checkboxChecked" | "checkboxUnchecked" | "closeSmall" | "cloudDeployed" | "cloudError" | "cloudProgress" | "cloudDecommissioned" | "cloudWaiting" | "cluster" | "configJ" | "configM" | "configS" | "copyClipboard" | "duplicate" | "edit" | "fileJson" | "fn" | "fnNew" | "formDrag" | "formError" | "formInfo" | "formNetworkBad" | "formNetworkGood" | "formRefresh" | "formWarning" | "heart" | "history" | "
|
|
16
|
+
getIcon(kind: string): "placeholder" | "menu" | "close" | "play" | "add" | "done" | "environment" | "artifact" | "config" | "instances" | "loadBalancer" | "securityGroup" | "bake" | "plus" | "accordionCollapse" | "accordionExpand" | "accordionExpandAll" | "artifactApproved" | "artifactBad" | "artifactPending" | "artifactSkipped" | "build" | "buildFail" | "buildSuccess" | "canaryConfig" | "canaryFail" | "canaryRunning" | "canaryPass" | "canaryMarginal" | "caretRight" | "checkBadge" | "checkboxIndeterminate" | "checkboxChecked" | "checkboxUnchecked" | "closeSmall" | "cloudDeployed" | "cloudError" | "cloudProgress" | "cloudDecommissioned" | "cloudWaiting" | "cluster" | "configJ" | "configM" | "configS" | "copyClipboard" | "duplicate" | "edit" | "fileJson" | "fn" | "fnNew" | "formDrag" | "formError" | "formInfo" | "formNetworkBad" | "formNetworkGood" | "formRefresh" | "formWarning" | "heart" | "history" | "manualJudgement" | "manualJudgementApproved" | "manualJudgementRejected" | "mdActuating" | "mdActuationLaunched" | "mdCreated" | "mdDelay" | "mdDeltaDetected" | "mdDeltaResolved" | "mdDiff" | "mdError" | "mdUnhappy" | "mdPaused" | "mdResumed" | "mdUnknown" | "mdConstraintGeneric" | "mdConstraintDependsOn" | "mdConstraintAllowedTimes" | "md" | "mdVerification" | "menuClose" | "minus" | "pin" | "resourceT" | "servergroupAws" | "spCIBranch" | "spCIBuild" | "spCICommit" | "spCIMaster" | "spCIMerged" | "spCIPullRequest" | "spCIPullRequestClosed" | "spEnvironments" | "spMenuAppInSync" | "spMenuAppUnsynced" | "spMenuCanaryConfig" | "spMenuCanaryReport" | "spMenuClusters" | "spMenuConfig" | "spMenuFunctions" | "spMenuK8s" | "spMenuLoadBalancers" | "spMenuMeme" | "spMenuPager" | "spMenuPipelines" | "spMenuProperties" | "spMenuSecurityGroups" | "spMenuTasks" | "spMenuTimeline" | "spMenuZuul" | "spel" | "templateFull" | "templateS" | "templateWorkflow" | "toggleOff" | "toggleOn" | "trash" | "unpin";
|
|
17
17
|
getExperimentalDisplayLink(resource: IResourceLinkProps): string | undefined;
|
|
18
18
|
getSpinnakerType(kind: string): string;
|
|
19
19
|
getNativeResourceRoutingInfo({ kind, account, stack, detail, displayName, }: IResourceLinkProps): {
|
|
@@ -95,6 +95,6 @@ interface ILifecycleEventDetailsProps extends Partial<LifecycleEventSummary> {
|
|
|
95
95
|
version?: string;
|
|
96
96
|
}
|
|
97
97
|
export declare const LifecycleEventDetails: ({ version, duration, link, startedAt, title, showLink, }: ILifecycleEventDetailsProps) => JSX.Element;
|
|
98
|
-
|
|
98
|
+
type IDeploymentStatusProps = Pick<IVersionMetadataProps, 'deployedAt' | 'isPending' | 'isCurrent' | 'isDeploying'>;
|
|
99
99
|
export declare const DeploymentStatus: ({ deployedAt, isCurrent, isPending, isDeploying }: IDeploymentStatusProps) => JSX.Element;
|
|
100
100
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { DateTime } from 'luxon';
|
|
2
2
|
import type { FetchVersionQuery, FetchVersionsHistoryQuery } from '../graphql/graphql-sdk';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
3
|
+
export type HistoryEnvironment = NonNullable<FetchVersionsHistoryQuery['application']>['environments'][number];
|
|
4
|
+
export type HistoryArtifact = NonNullable<HistoryEnvironment['state']['artifacts']>[number];
|
|
5
|
+
export type HistoryArtifactVersion = NonNullable<HistoryArtifact['versions']>[number];
|
|
6
|
+
export type SingleVersionEnvironment = NonNullable<FetchVersionQuery['application']>['environments'][number];
|
|
7
|
+
export type SingleVersionArtifact = NonNullable<SingleVersionEnvironment['state']['artifacts']>[number];
|
|
8
|
+
export type SingleVersionArtifactVersion = NonNullable<SingleVersionArtifact['versions']>[number];
|
|
9
9
|
export interface HistoryArtifactVersionExtended extends HistoryArtifactVersion {
|
|
10
10
|
reference: string;
|
|
11
11
|
type: string;
|
|
@@ -22,7 +22,7 @@ interface IWizardPageState {
|
|
|
22
22
|
isLoading: boolean;
|
|
23
23
|
status: WizardPageStatus;
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export type WizardPageStatus = 'default' | 'error' | 'loading';
|
|
26
26
|
export declare class WizardPage<T> extends React.Component<IWizardPageProps, IWizardPageState> {
|
|
27
27
|
state: IWizardPageState;
|
|
28
28
|
ref: React.RefObject<HTMLDivElement>;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import type { IApplicationSummary } from '../application';
|
|
4
4
|
import type { IPagerDutyService } from './pagerDuty.read.service';
|
|
5
5
|
import './pager.less';
|
|
6
|
-
|
|
6
|
+
type SortDirectionType = 'ASC' | 'DESC';
|
|
7
7
|
export interface IUserDisplay {
|
|
8
8
|
level: number;
|
|
9
9
|
name: string;
|
|
@@ -14,7 +14,7 @@ export interface IEditPipelineJsonModalState {
|
|
|
14
14
|
isStrategy: boolean;
|
|
15
15
|
activeTab: mode;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
type mode = 'pipeline' | 'renderedPipeline';
|
|
18
18
|
export declare class EditPipelineJsonModal extends React.Component<IEditPipelineJsonModalProps, IEditPipelineJsonModalState> {
|
|
19
19
|
static defaultProps: Partial<IEditPipelineJsonModalProps>;
|
|
20
20
|
constructor(props: IEditPipelineJsonModalProps);
|
|
@@ -7,7 +7,7 @@ export interface IFormikStageConfigInjectedProps {
|
|
|
7
7
|
pipeline: IPipeline;
|
|
8
8
|
formik: FormikProps<IStage>;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type IContextualValidator = (values: IStage | ITrigger, context: any) => FormikErrors<IStage> | Promise<FormikErrors<IStage>>;
|
|
11
11
|
export interface IFormikStageConfigProps {
|
|
12
12
|
application: Application;
|
|
13
13
|
stage: IStage;
|
|
@@ -16,7 +16,7 @@ export interface IFormikStageConfigProps {
|
|
|
16
16
|
render: (props: IFormikStageConfigInjectedProps) => React.ReactNode;
|
|
17
17
|
onChange?: (values: IStage) => void;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type IStageValidator = (values: IStage) => void | object | Promise<FormikErrors<IStage>>;
|
|
20
20
|
export declare class FormikStageConfig extends React.Component<IFormikStageConfigProps> {
|
|
21
21
|
render(): JSX.Element;
|
|
22
22
|
}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { IFormikStageConfigInjectedProps } from '../../FormikStageConfig';
|
|
3
3
|
export interface IBakeHelmConfigFormState {
|
|
4
4
|
gitRepoArtifactAccountNames: string[];
|
|
5
|
+
helmImageArtifactAccountNames: string[];
|
|
5
6
|
}
|
|
6
7
|
export declare class BakeHelmConfigForm extends React.Component<IFormikStageConfigInjectedProps, IBakeHelmConfigFormState> {
|
|
7
8
|
constructor(props: IFormikStageConfigInjectedProps);
|
|
@@ -5,5 +5,5 @@ export interface IExecutionDetailsSectionWrapperProps {
|
|
|
5
5
|
name: string;
|
|
6
6
|
current: string;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type IExecutionDetailsSectionProps = IExecutionDetailsSectionWrapperProps & IExecutionDetailsProps;
|
|
9
9
|
export declare const ExecutionDetailsSection: (props: IExecutionDetailsSectionWrapperProps) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IEntityTag } from '../../../../domain';
|
|
3
3
|
import './TagEditor.less';
|
|
4
|
-
export
|
|
4
|
+
export type EntityTagType = 'notice' | 'alert' | 'custom';
|
|
5
5
|
export interface ITagEditorProps {
|
|
6
6
|
onChange: (tag: IEntityTag) => void;
|
|
7
7
|
tag: IEntityTag;
|
|
@@ -24,7 +24,7 @@ export interface IVariableMetadata {
|
|
|
24
24
|
name: string;
|
|
25
25
|
type: VariableType;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type VariableType = 'int' | 'float' | 'list' | 'object' | 'string' | 'boolean';
|
|
28
28
|
export interface ITemplateStage {
|
|
29
29
|
dependsOn: string[];
|
|
30
30
|
id: string;
|
|
@@ -5,7 +5,7 @@ import type { IPipeline, IStage, IStageOrTriggerTypeConfig, ITrigger } from '../
|
|
|
5
5
|
export interface IMultiRequiredField extends IBaseRequiredFieldValidationConfig {
|
|
6
6
|
fields: IRequiredField[];
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type IAnyFieldRequiredValidationConfig = IBaseRequiredFieldValidationConfig & IMultiRequiredField;
|
|
9
9
|
export declare class AnyFieldRequiredValidator extends BaseRequiredFieldValidator {
|
|
10
10
|
protected passesValidation(pipeline: IPipeline, stage: IStage | ITrigger, validationConfig: IAnyFieldRequiredValidationConfig): boolean;
|
|
11
11
|
protected validationMessage(validationConfig: IAnyFieldRequiredValidationConfig, config: IStageOrTriggerTypeConfig): string;
|
|
@@ -2,7 +2,7 @@ import type { IRequiredField } from './baseRequiredField.validator';
|
|
|
2
2
|
import { BaseRequiredFieldValidator } from './baseRequiredField.validator';
|
|
3
3
|
import type { IBaseRequiredFieldValidationConfig } from './baseRequiredField.validator';
|
|
4
4
|
import type { IPipeline, IStage, IStageOrTriggerTypeConfig, ITrigger } from '../../../domain';
|
|
5
|
-
export
|
|
5
|
+
export type IRequiredFieldValidationConfig = IBaseRequiredFieldValidationConfig & IRequiredField;
|
|
6
6
|
export declare class RequiredFieldValidator extends BaseRequiredFieldValidator {
|
|
7
7
|
protected passesValidation(pipeline: IPipeline, stage: IStage | ITrigger, validationConfig: IRequiredFieldValidationConfig): boolean;
|
|
8
8
|
protected validationMessage(validationConfig: IRequiredFieldValidationConfig, config: IStageOrTriggerTypeConfig): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Placement = 'top' | 'right' | 'bottom' | 'left';
|
|
@@ -5,9 +5,16 @@ interface IDetailsProps {
|
|
|
5
5
|
interface IDetailsHeaderProps {
|
|
6
6
|
icon: React.ReactNode;
|
|
7
7
|
name: string;
|
|
8
|
+
notifications?: React.ReactNode;
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
interface IDetailsContentProps {
|
|
12
|
+
loading: boolean;
|
|
13
|
+
children: React.ReactNode;
|
|
8
14
|
}
|
|
9
15
|
interface IDetailsSFCWithExtras extends React.SFC<IDetailsProps> {
|
|
10
16
|
Header: React.SFC<IDetailsHeaderProps>;
|
|
17
|
+
Content: React.FunctionComponent<IDetailsContentProps>;
|
|
11
18
|
}
|
|
12
19
|
declare const Details: IDetailsSFCWithExtras;
|
|
13
20
|
export { Details };
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import type { IControlledInputProps } from '../inputs';
|
|
3
3
|
import type { ICommonFormFieldProps } from './interface';
|
|
4
4
|
import '../forms.less';
|
|
5
|
-
export
|
|
5
|
+
export type IFormFieldProps = ICommonFormFieldProps & Partial<IControlledInputProps>;
|
|
6
6
|
export declare function FormField(props: IFormFieldProps): JSX.Element;
|
|
@@ -8,7 +8,7 @@ export interface IExpressionFieldProps {
|
|
|
8
8
|
context: object;
|
|
9
9
|
layout?: ICommonFormFieldProps['layout'];
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type IFormikExpressionFieldProps = IExpressionFieldProps & IFormikFormFieldProps<string>;
|
|
12
12
|
export interface IFormikExpressionFieldState {
|
|
13
13
|
spelPreview: string;
|
|
14
14
|
spelError: ISpelError;
|
|
@@ -6,7 +6,7 @@ export interface IRegexpProps {
|
|
|
6
6
|
regexName: string;
|
|
7
7
|
replaceName: string;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type IFormikExpressionRegexFieldProps = IFormikExpressionFieldProps & IRegexpProps;
|
|
10
10
|
export interface IFormikExpressionRegexFieldState {
|
|
11
11
|
spelPreview: string;
|
|
12
12
|
spelError: ISpelError;
|
|
@@ -22,7 +22,7 @@ export interface IFormikFieldProps<T> {
|
|
|
22
22
|
*/
|
|
23
23
|
spelAware?: boolean;
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export type IFormikFormFieldProps<T> = ICommonFormFieldProps & IFormikFieldProps<T>;
|
|
26
26
|
/** Returns a Validator composed of all the `validate` functions (and `isRequired` if `required` is truthy) */
|
|
27
27
|
export declare function createFieldValidator<T>(label: IFormikFormFieldProps<T>['label'], required: boolean, validate: IValidator[]): IValidator;
|
|
28
28
|
export declare function FormikFormField<T = any>(props: IFormikFormFieldProps<T>): JSX.Element;
|
|
@@ -11,8 +11,8 @@ export interface IControlledInputProps {
|
|
|
11
11
|
onBlur: FieldProps['field']['onBlur'];
|
|
12
12
|
name: FieldProps['field']['name'];
|
|
13
13
|
}
|
|
14
|
-
export
|
|
15
|
-
export
|
|
14
|
+
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
15
|
+
export type OmitControlledInputPropsFrom<T> = Omit<T, keyof IControlledInputProps>;
|
|
16
16
|
/** These props are used by Input components, such as TextInput */
|
|
17
17
|
export interface IFormInputValidation {
|
|
18
18
|
touched: boolean;
|
|
@@ -6,9 +6,9 @@ export declare const categoryLabels: {
|
|
|
6
6
|
success: string;
|
|
7
7
|
warning: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export
|
|
9
|
+
type ICategoryLabels = typeof categoryLabels;
|
|
10
|
+
export type IValidationCategory = keyof typeof categoryLabels;
|
|
11
|
+
export type ICategorizedErrors = {
|
|
12
12
|
[P in keyof ICategoryLabels]: any;
|
|
13
13
|
};
|
|
14
14
|
export declare const asyncMessage: (message: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type IValidatorResult = undefined | string;
|
|
2
|
+
export type IValidator = (value: any, label?: string) => IValidatorResult;
|
|
3
3
|
export interface IFormValidator {
|
|
4
4
|
/**
|
|
5
5
|
* Defines a new form field to validate
|
|
@@ -30,7 +30,7 @@ export interface IFormValidatorField {
|
|
|
30
30
|
/** Adds additional validators */
|
|
31
31
|
withValidators(...validators: IValidator[]): IFormValidatorField;
|
|
32
32
|
}
|
|
33
|
-
export
|
|
33
|
+
export type IArrayItemValidator = (itemBuilder: IArrayItemValidationBuilder, item: any, index: number, array: any[], arrayLabel: string) => void;
|
|
34
34
|
export interface IArrayItemValidationBuilder extends IFormValidator {
|
|
35
35
|
item: (label: string) => IFormValidatorField;
|
|
36
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DependencyList } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type IRequestStatus = 'NONE' | 'PENDING' | 'REJECTED' | 'RESOLVED';
|
|
3
3
|
export interface IUseLatestPromiseResult<T> {
|
|
4
4
|
result: T;
|
|
5
5
|
status: IRequestStatus;
|
|
@@ -13,7 +13,7 @@ interface ModalDismissResult<T> {
|
|
|
13
13
|
status: 'DISMISSED';
|
|
14
14
|
dismissResult?: T;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type IModalResult<C, D> = ModalCloseResult<C> | ModalDismissResult<D>;
|
|
17
17
|
/**
|
|
18
18
|
* An imperative API for showing a react component as a modal.
|
|
19
19
|
*
|
|
@@ -6,7 +6,7 @@ export interface ITableColumn {
|
|
|
6
6
|
sortDirection?: 'ascending' | 'descending';
|
|
7
7
|
onSort?: () => any;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type ITableColumns = Readonly<Array<string | ITableColumn>>;
|
|
10
10
|
export interface ITableLayoutProps {
|
|
11
11
|
columns: ITableColumn[];
|
|
12
12
|
isMobile: boolean;
|
|
@@ -7,5 +7,5 @@ export interface ITableCellProps {
|
|
|
7
7
|
export interface ITableCellPropsWithInternalFields extends ITableCellProps {
|
|
8
8
|
index: number;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type ITableCellLayoutProps = ITableCellPropsWithInternalFields & Pick<ITableContext, 'expandable' | 'isMobile' | 'columns'>;
|
|
11
11
|
export declare const TableCell: (props: ITableCellProps) => JSX.Element;
|
|
@@ -5,7 +5,7 @@ export interface ITableRowProps {
|
|
|
5
5
|
renderExpandedContent?: () => React.ReactNode;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type ITableRowLayoutProps = ITableRowProps & Pick<ITableContext, 'isMobile' | 'columns'> & Pick<ITableRowProps, 'renderExpandedContent'> & {
|
|
9
9
|
tableExpandable: boolean;
|
|
10
10
|
rowExpandable: boolean;
|
|
11
11
|
expanded: boolean;
|
|
@@ -7,7 +7,7 @@ export interface ITableColumnSize {
|
|
|
7
7
|
size: number;
|
|
8
8
|
unit: 'fr' | '%' | 'px' | 'em' | 'rem' | 'vh' | 'vw' | 'vmin' | 'vmax';
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type ITableColumnSizes = Readonly<Array<number | ITableColumnSize | [ITableColumnSize, ITableColumnSize]>>;
|
|
11
11
|
export declare const getGridColumnsStyle: (sizes: readonly (number | ITableColumnSize | [ITableColumnSize, ITableColumnSize])[], expandable: boolean, isMobile: boolean) => string;
|
|
12
12
|
export declare const standardGridTableLayout: (sizes: readonly (number | ITableColumnSize | [ITableColumnSize, ITableColumnSize])[]) => {
|
|
13
13
|
TableLayout: (props: ITableLayoutProps) => JSX.Element;
|
package/dist/projects/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export const
|
|
1
|
+
import './projectSearchResultType';
|
|
2
|
+
export declare const CORE_PROJECTS_PROJECTS_MODULE = "spinnaker.projects";
|
|
3
|
+
export declare const name = "spinnaker.projects";
|
|
@@ -6,13 +6,13 @@ export interface IRenderAngularJSBaseProps extends React.HTMLProps<HTMLDivElemen
|
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type IRenderAngularJSTemplateProps = IRenderAngularJSBaseProps & {
|
|
10
10
|
template: string;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type IRenderAngularJSTemplateUrlProps = IRenderAngularJSBaseProps & {
|
|
13
13
|
templateUrl: string;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type IRenderAngularJSProps = IRenderAngularJSTemplateProps | IRenderAngularJSTemplateUrlProps;
|
|
16
16
|
export declare class AngularJSAdapter extends React.Component<IRenderAngularJSProps> {
|
|
17
17
|
static defaultProps: Partial<IRenderAngularJSProps>;
|
|
18
18
|
private $scope;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IRecentHistoryEntry } from '../../history';
|
|
3
3
|
import type { SearchResultType } from '../searchResult/searchResultType';
|
|
4
|
-
export
|
|
4
|
+
export type ISearchResult = IRecentHistoryEntry & {
|
|
5
5
|
displayName: string;
|
|
6
6
|
account?: string;
|
|
7
7
|
};
|
|
@@ -11,7 +11,7 @@ export interface ISearchResultSet<T extends ISearchResult = ISearchResult> {
|
|
|
11
11
|
error?: any;
|
|
12
12
|
query?: string;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type ISearchResultFormatter = (entry: ISearchResult, fromRoute?: boolean) => string | PromiseLike<string>;
|
|
15
15
|
export interface IProviderResultFormatter {
|
|
16
16
|
[category: string]: ISearchResultFormatter;
|
|
17
17
|
}
|
|
@@ -10,7 +10,7 @@ export interface IServerGroupDetailsWrapperProps {
|
|
|
10
10
|
region: string;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type DetailsGetter = (props: IServerGroupDetailsProps, autoClose: () => void) => Observable<IServerGroup>;
|
|
14
14
|
export interface IServerGroupDetailsWrapperState {
|
|
15
15
|
angular: {
|
|
16
16
|
template: string;
|
package/dist/utils/Logger.d.ts
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { FeatureFlags } from './FeatureContext';
|
|
3
|
+
interface FeatureProps {
|
|
4
|
+
feature: keyof FeatureFlags;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
render?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Renders content conditionally based on the specified feature flag.
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} props - The properties for the Feature component.
|
|
12
|
+
* @param {keyof FeatureFlags} props.feature - The name of the feature flag to check.
|
|
13
|
+
* @param {React.ReactNode} [props.children] - The content to render if the feature is enabled.
|
|
14
|
+
* @param {React.ReactNode} [props.render=children] - Optional custom render content; defaults to `children`.
|
|
15
|
+
*
|
|
16
|
+
* @returns {JSX.Element | null} - The rendered content if the feature is enabled; otherwise, `null`.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* // Example usage with children
|
|
20
|
+
* <Feature feature="slack">
|
|
21
|
+
* <SlackComponent />
|
|
22
|
+
* </Feature>
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Example usage with a custom render prop
|
|
26
|
+
* <Feature
|
|
27
|
+
* feature="entityTags"
|
|
28
|
+
* render={<EntityTagsComponent />}
|
|
29
|
+
* />
|
|
30
|
+
*/
|
|
31
|
+
export declare function Feature({ feature, children, render }: FeatureProps): JSX.Element | null;
|
|
32
|
+
/**
|
|
33
|
+
* An alias of the `<Feature />` component.
|
|
34
|
+
* Renders the provided content if the specified feature is enabled.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <IfFeatureEnabled feature="slack">
|
|
38
|
+
* <SlackComponent />
|
|
39
|
+
* </IfFeatureEnabled>
|
|
40
|
+
*/
|
|
41
|
+
export declare function IfFeatureEnabled({ feature, children, render }: FeatureProps): JSX.Element | null;
|
|
42
|
+
/**
|
|
43
|
+
* Higher-order function to wrap a component with a feature flag check.
|
|
44
|
+
* Ensures that the component only renders if the specified feature is enabled.
|
|
45
|
+
*
|
|
46
|
+
* @template Props
|
|
47
|
+
* @param {keyof FeatureFlags} feature - The name of the feature flag to check.
|
|
48
|
+
* @returns {(Component: React.ComponentType<Props>) => React.ComponentType<Props>} -
|
|
49
|
+
* A higher-order component (HOC) that conditionally renders the wrapped component.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* // Example usage
|
|
53
|
+
* const EnhancedComponent = withFeature('newFeature')(MyComponent);
|
|
54
|
+
*
|
|
55
|
+
* <EnhancedComponent someProp="value" />;
|
|
56
|
+
*/
|
|
57
|
+
export declare function withFeature<Props extends object>(feature: keyof FeatureFlags): (Component: React.ComponentType<Props>) => React.ComponentType<Props>;
|
|
58
|
+
export {};
|