@digital-ai/dot-components 3.20.2 → 3.21.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/index.esm.js CHANGED
@@ -31,7 +31,7 @@ function useStylesWithRootClass(name, className, ...args) {
31
31
  }
32
32
 
33
33
  const checkIfOverflowPresentInElementTree = element => {
34
- if (element.scrollWidth > element.clientWidth) {
34
+ if (element.scrollWidth > element.clientWidth || element.scrollHeight > element.clientHeight) {
35
35
  return true;
36
36
  }
37
37
  for (const child of Array.from(element.children)) {
@@ -7654,7 +7654,8 @@ const DotCardFooter = ({
7654
7654
  const rootClassName$Q = 'dot-card-header';
7655
7655
  const StyledCardHeader = styled(CardHeader)`
7656
7656
  ${({
7657
- theme
7657
+ theme,
7658
+ $maxTitleLines
7658
7659
  }) => css`
7659
7660
  &.${rootClassName$Q} {
7660
7661
  .MuiCardHeader-content {
@@ -7663,6 +7664,14 @@ const StyledCardHeader = styled(CardHeader)`
7663
7664
  .dot-card-subheader {
7664
7665
  color: ${theme.palette.figma.typography.gray};
7665
7666
  }
7667
+
7668
+ .dot-card-header-title {
7669
+ display: -webkit-box;
7670
+ -webkit-line-clamp: ${$maxTitleLines};
7671
+ -webkit-box-orient: vertical;
7672
+ white-space: normal;
7673
+ overflow-wrap: break-word;
7674
+ }
7666
7675
  }
7667
7676
  }
7668
7677
  `}
@@ -7677,6 +7686,7 @@ const DotCardHeader = ({
7677
7686
  subheader,
7678
7687
  subheaderSize = 'large',
7679
7688
  title,
7689
+ titleMaxLines = 1,
7680
7690
  titleSize = 'large'
7681
7691
  }) => {
7682
7692
  const rootClasses = useStylesWithRootClass(rootClassName$Q, className);
@@ -7710,7 +7720,8 @@ const DotCardHeader = ({
7710
7720
  noWrap: true,
7711
7721
  variant: titleVariant
7712
7722
  })
7713
- })
7723
+ }),
7724
+ "$maxTitleLines": titleMaxLines
7714
7725
  });
7715
7726
  };
7716
7727
 
@@ -9029,7 +9040,7 @@ class DashboardsService {
9029
9040
  * @param isOotbDashboard Boolean match on Dashboard OOTB status.
9030
9041
  * @param lifecycleState String match on Dashboard lifecycle state - 'DRAFT' or 'PUBLISHED'.
9031
9042
  * @param name String match on Dashboard name.
9032
- * @param targetApp String match on the Dashboard target application - 'AGILITY', 'CONTINUOUSTEST', 'DEPLOY' or 'RELEASE'.
9043
+ * @param targetApp String match on the Dashboard target application - 'AGILITY', 'CONTINUOUSTEST', 'DEPLOY', 'RELEASE', 'TEAMFORGE', 'CHANGERISKPREDICTION', or APPLICATIONSECURITY.
9033
9044
  * @returns DashboardViewPagedResponse OK
9034
9045
  * @returns Error Default error response
9035
9046
  * @throws ApiError
@@ -9264,7 +9275,7 @@ class DashboardsService {
9264
9275
  * * **Filterable field names**: author_fullname, bi_type, categories, created_dt, description, is_ootb_dashboard, lifecycle_state, name, updated_by_fullname, updated_dt
9265
9276
  * * **Searchable field names**: author_fullname, categories, description, name
9266
9277
  *
9267
- * @param targetApp String match on the Dashboard target application - 'AGILITY', 'CONTINUOUSTEST', 'DEPLOY', 'RELEASE' or 'TEAMFORGE'.
9278
+ * @param targetApp String match on the Dashboard target application - 'AGILITY', 'CONTINUOUSTEST', 'DEPLOY', 'RELEASE', 'TEAMFORGE', 'CHANGERISKPREDICTION', or 'APPLICATIONSECURITY'.
9268
9279
  * @param biType String match on Dashboard bi type - 'MICROSTRATEGY'.
9269
9280
  * @param isOotbDashboard Boolean match on Dashboard OOTB status.
9270
9281
  * @param lifecycleState String match on Dashboard lifecycle state - 'DRAFT' or 'PUBLISHED'.
@@ -9567,7 +9578,8 @@ const getCategoriesMock = {
9567
9578
  DEPLOY: [],
9568
9579
  RELEASE: ['DevOps COE', 'Engineering Manager', 'Release Manager', 'Platform Engineer', 'Platform Product Manager'],
9569
9580
  TEAMFORGE: ['Scrum Master'],
9570
- CHANGERISKPREDICTION: []
9581
+ CHANGERISKPREDICTION: [],
9582
+ APPLICATIONSECURITY: []
9571
9583
  }
9572
9584
  };
9573
9585
  const getAuthorsMock = [{
@@ -10666,6 +10678,9 @@ const DashboardAppTypeOptions = [
10666
10678
  }, {
10667
10679
  option: 'Change Risk Prediction',
10668
10680
  value: 'CHANGERISKPREDICTION'
10681
+ }, {
10682
+ option: 'Application Security',
10683
+ value: 'APPLICATIONSECURITY'
10669
10684
  }];
10670
10685
  const initialFormState = {
10671
10686
  categories: [],
@@ -11369,7 +11384,7 @@ function DotDashboardPublishConfirm({
11369
11384
  setPublished(false);
11370
11385
  } else {
11371
11386
  setPublishCategories(dashboardToPublish.categories || []);
11372
- setRequiresApplication(!(dashboardToPublish.target_apps.includes('CHANGERISKPREDICTION') && dashboardToPublish.target_apps.length === 1));
11387
+ setRequiresApplication(dashboardToPublish.target_apps.includes('AGILITY') || dashboardToPublish.target_apps.includes('RELEASE') || dashboardToPublish.target_apps.includes('CONTINUOUSTEST') || dashboardToPublish.target_apps.includes('TEAMFORGE') || dashboardToPublish.target_apps.includes('DEPLOY'));
11373
11388
  setRequiresCategories(dashboardToPublish.target_apps.includes('AGILITY') || dashboardToPublish.target_apps.includes('RELEASE') || dashboardToPublish.target_apps.includes('CONTINUOUSTEST') || dashboardToPublish.target_apps.includes('TEAMFORGE'));
11374
11389
  }
11375
11390
  }, [dashboardToPublish]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "3.20.2",
3
+ "version": "3.21.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -6,7 +6,7 @@ export type DashboardCreateBody = {
6
6
  /**
7
7
  * App types that can be targeted by the dashboard.
8
8
  */
9
- target_apps: Array<'AGILITY' | 'RELEASE' | 'DEPLOY' | 'CONTINUOUSTEST' | 'TEAMFORGE' | 'CHANGERISKPREDICTION'>;
9
+ target_apps: Array<'AGILITY' | 'RELEASE' | 'DEPLOY' | 'CONTINUOUSTEST' | 'TEAMFORGE' | 'CHANGERISKPREDICTION' | 'APPLICATIONSECURITY'>;
10
10
  /**
11
11
  * Description of the dashboard.
12
12
  */
@@ -22,7 +22,7 @@ export type DashboardPatchBody = {
22
22
  /**
23
23
  * App types that can be targeted by the dashboard.
24
24
  */
25
- target_apps?: Array<'AGILITY' | 'RELEASE' | 'DEPLOY' | 'CONTINUOUSTEST' | 'TEAMFORGE' | 'CHANGERISKPREDICTION'> | null;
25
+ target_apps?: Array<'AGILITY' | 'RELEASE' | 'DEPLOY' | 'CONTINUOUSTEST' | 'TEAMFORGE' | 'CHANGERISKPREDICTION' | 'APPLICATIONSECURITY'> | null;
26
26
  /**
27
27
  * (Internal) BI type of the dashboard.
28
28
  */
@@ -22,7 +22,7 @@ export type DashboardPutBody = {
22
22
  /**
23
23
  * App types that can be targeted by the dashboard.
24
24
  */
25
- target_apps: Array<'AGILITY' | 'RELEASE' | 'DEPLOY' | 'CONTINUOUSTEST' | 'TEAMFORGE'>;
25
+ target_apps: Array<'AGILITY' | 'RELEASE' | 'DEPLOY' | 'CONTINUOUSTEST' | 'TEAMFORGE' | 'CHANGERISKPREDICTION' | 'APPLICATIONSECURITY'>;
26
26
  /**
27
27
  * (Internal) BI type of the dashboard.
28
28
  */
@@ -18,7 +18,7 @@ export type DashboardView = {
18
18
  /**
19
19
  * App types that can be targeted by the dashboard.
20
20
  */
21
- target_apps: Array<'AGILITY' | 'RELEASE' | 'DEPLOY' | 'CONTINUOUSTEST' | 'TEAMFORGE' | 'CHANGERISKPREDICTION'>;
21
+ target_apps: Array<'AGILITY' | 'RELEASE' | 'DEPLOY' | 'CONTINUOUSTEST' | 'TEAMFORGE' | 'CHANGERISKPREDICTION' | 'APPLICATIONSECURITY'>;
22
22
  /**
23
23
  * Description of the dashboard.
24
24
  */
@@ -28,7 +28,7 @@ export declare class DashboardsService {
28
28
  * @param isOotbDashboard Boolean match on Dashboard OOTB status.
29
29
  * @param lifecycleState String match on Dashboard lifecycle state - 'DRAFT' or 'PUBLISHED'.
30
30
  * @param name String match on Dashboard name.
31
- * @param targetApp String match on the Dashboard target application - 'AGILITY', 'CONTINUOUSTEST', 'DEPLOY' or 'RELEASE'.
31
+ * @param targetApp String match on the Dashboard target application - 'AGILITY', 'CONTINUOUSTEST', 'DEPLOY', 'RELEASE', 'TEAMFORGE', 'CHANGERISKPREDICTION', or APPLICATIONSECURITY.
32
32
  * @returns DashboardViewPagedResponse OK
33
33
  * @returns Error Default error response
34
34
  * @throws ApiError
@@ -118,7 +118,7 @@ export declare class DashboardsService {
118
118
  * * **Filterable field names**: author_fullname, bi_type, categories, created_dt, description, is_ootb_dashboard, lifecycle_state, name, updated_by_fullname, updated_dt
119
119
  * * **Searchable field names**: author_fullname, categories, description, name
120
120
  *
121
- * @param targetApp String match on the Dashboard target application - 'AGILITY', 'CONTINUOUSTEST', 'DEPLOY', 'RELEASE' or 'TEAMFORGE'.
121
+ * @param targetApp String match on the Dashboard target application - 'AGILITY', 'CONTINUOUSTEST', 'DEPLOY', 'RELEASE', 'TEAMFORGE', 'CHANGERISKPREDICTION', or 'APPLICATIONSECURITY'.
122
122
  * @param biType String match on Dashboard bi type - 'MICROSTRATEGY'.
123
123
  * @param isOotbDashboard Boolean match on Dashboard OOTB status.
124
124
  * @param lifecycleState String match on Dashboard lifecycle state - 'DRAFT' or 'PUBLISHED'.
@@ -13,7 +13,9 @@ export interface CardHeaderProps extends CommonProps {
13
13
  subheaderSize?: SubheaderSize;
14
14
  /** Card title */
15
15
  title?: string;
16
+ /** Card title maximum number of lines (default is 1) */
17
+ titleMaxLines?: number;
16
18
  /** Card title size */
17
19
  titleSize?: TitleSize;
18
20
  }
19
- export declare const DotCardHeader: ({ action, ariaLabel, avatar, className, "data-testid": dataTestId, subheader, subheaderSize, title, titleSize, }: CardHeaderProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const DotCardHeader: ({ action, ariaLabel, avatar, className, "data-testid": dataTestId, subheader, subheaderSize, title, titleMaxLines, titleSize, }: CardHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,6 @@
1
1
  export declare const rootClassName = "dot-card-header";
2
- export declare const StyledCardHeader: import("styled-components").StyledComponent<import("@mui/material").OverridableCardHeader, any, {}, never>;
2
+ interface StyledCardHeaderProps {
3
+ $maxTitleLines: number;
4
+ }
5
+ export declare const StyledCardHeader: import("styled-components").StyledComponent<import("@mui/material").OverridableCardHeader, any, StyledCardHeaderProps, never>;
6
+ export {};