@devtron-labs/devtron-fe-common-lib 1.22.0-beta-0 → 1.22.0-pre-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.
@@ -1,7 +1,7 @@
1
1
  import { j as n, aM as v, aO as J, aN as K } from "./@vendor-BsABdDGm.js";
2
2
  import V, { useState as q, useEffect as Y, forwardRef as G, useMemo as E } from "react";
3
3
  import z, { getDefaultRegistry as Q } from "@rjsf/core";
4
- import { T as O, j as w, c as N, b as F, S as X, i as Z, g as ee, a as te, d as R, e as ne } from "./@code-editor-umdiXXey.js";
4
+ import { T as O, j as w, c as N, b as F, S as X, i as Z, g as ee, a as te, d as R, e as ne } from "./@code-editor-KCsZ23LP.js";
5
5
  import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as re, ADDITIONAL_PROPERTY_FLAG as L, errorId as se, englishStringTranslator as ae, TranslatableString as oe, titleId as le, canExpand as ie, deepEquals as ce } from "@rjsf/utils";
6
6
  import { ReactComponent as de } from "./assets/ic-add.cfaa779b.svg";
7
7
  import { ReactComponent as ue } from "./assets/ic-warning.ecf7ff97.svg";
@@ -1,13 +1,9 @@
1
1
  import { IllustrationBaseProps } from './types';
2
2
  export declare const illustrationMap: {
3
- 'img-celebration': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
4
3
  'img-folder-empty': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
5
- 'img-install-freemium-saas': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
6
- 'img-install-via-aws-marketplace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
7
4
  'img-mechanical-operation': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
8
5
  'img-no-backup-location': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
9
6
  'img-no-restores': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
10
- 'img-page-not-found': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
11
7
  'create-backup-schedule': string;
12
8
  'create-backup-snapshot': string;
13
9
  'img-code': string;
@@ -1,3 +1,3 @@
1
1
  import { DevtronLicenseCardProps } from './types';
2
- export declare const DevtronLicenseCard: ({ enterpriseName, licenseKey, licenseSuffix, expiryDate, licenseStatus, isTrial, isFreemium, ttl, appTheme, handleCopySuccess, licenseStatusError, isSaasInstance, }: DevtronLicenseCardProps) => JSX.Element;
2
+ export declare const DevtronLicenseCard: ({ enterpriseName, licenseKey, licenseSuffix, expiryDate, licenseStatus, isTrial, isFreemium, ttl, appTheme, handleCopySuccess, licenseStatusError, }: DevtronLicenseCardProps) => JSX.Element;
3
3
  export default DevtronLicenseCard;
@@ -1,6 +1,5 @@
1
1
  export { default as ActivateLicenseDialog } from './ActivateLicenseDialog';
2
2
  export { default as DevtronLicenseCard } from './DevtronLicenseCard';
3
3
  export { ICDevtronWithBorder, default as InstallationFingerprintInfo } from './License.components';
4
- export { activateLicense } from './services';
5
4
  export * from './types';
6
5
  export { parseDevtronLicenseData, parseDevtronLicenseDTOIntoLicenseCardData } from './utils';
@@ -14,7 +14,6 @@ export type DevtronLicenseCardProps = {
14
14
  isFreemium: boolean;
15
15
  appTheme: AppThemeType;
16
16
  licenseStatusError: LicenseErrorStruct;
17
- isSaasInstance: boolean;
18
17
  } & ({
19
18
  licenseKey: string;
20
19
  handleCopySuccess?: () => void;
@@ -24,9 +23,6 @@ export type DevtronLicenseCardProps = {
24
23
  handleCopySuccess?: never;
25
24
  licenseSuffix: string;
26
25
  });
27
- export interface LicenseCardSubTextProps extends Pick<DevtronLicenseCardProps, 'isFreemium' | 'licenseStatus' | 'licenseStatusError'> {
28
- isFreeForever: boolean;
29
- }
30
26
  export type DevtronLicenseInfo = Omit<DevtronLicenseCardProps, 'appTheme'> & Pick<DevtronLicenseDTO, 'fingerprint' | 'showLicenseData' | 'licenseStatusError' | 'moduleLimits'>;
31
27
  export interface ActivateLicenseDialogProps extends Pick<DevtronLicenseBaseDTO, 'fingerprint'> {
32
28
  enterpriseName: string;
@@ -1,6 +1,6 @@
1
1
  import { DevtronLicenseDTO } from '../../types';
2
2
  import { DevtronLicenseCardProps, DevtronLicenseInfo } from './types';
3
- export declare const getLicenseColorsAccordingToStatus: ({ isFreemium, licenseStatus, licenseStatusError, isSaasInstance, }: Pick<DevtronLicenseCardProps, "licenseStatus" | "isFreemium" | "licenseStatusError" | "isSaasInstance">) => {
3
+ export declare const getLicenseColorsAccordingToStatus: ({ isFreemium, licenseStatus, licenseStatusError, }: Pick<DevtronLicenseCardProps, "licenseStatus" | "isFreemium" | "licenseStatusError">) => {
4
4
  bgColor: string;
5
5
  textColor: string;
6
6
  };
@@ -419,6 +419,5 @@ export declare const PROGRESSING_DEPLOYMENT_STATUS_POLLING_INTERVAL = 10000;
419
419
  export declare const STRATEGY_TYPE_TO_TITLE_MAP: Record<DeploymentStrategyTypeWithDefault, string>;
420
420
  export declare const CUBIC_BEZIER_CURVE: [number, number, number, number];
421
421
  export declare const ALLOW_ACTION_OUTSIDE_FOCUS_TRAP = "allow-action-outside-focus-trap";
422
- export declare const LICENSE_KEY_QUERY_PARAM = "licenseKey";
423
422
  export declare const REMOTE_CONNECTION_TYPE_LABEL_MAP: Record<RemoteConnectionType, string>;
424
423
  export declare const TARGET_K8S_VERSION_SEARCH_KEY = "targetK8sVersion";
@@ -941,10 +941,18 @@ export interface LicenseErrorStruct {
941
941
  code: LicensingErrorCodes;
942
942
  userMessage: string;
943
943
  }
944
- export type DevtronLicenseBaseDTO = {
944
+ export interface DevtronLicenseBaseDTO {
945
945
  fingerprint: string | null;
946
946
  isTrial: boolean | null;
947
947
  isFreemium: boolean | null;
948
+ /**
949
+ * In timestamp format
950
+ */
951
+ expiry: string | null;
952
+ /**
953
+ * Can be negative, depicts time left in seconds for license to expire
954
+ */
955
+ ttl: number | null;
948
956
  /**
949
957
  * Show a reminder after these many DAYS left for license to expire, i.e,
950
958
  * Show if `ttl` is less than `reminderThreshold` [converted to seconds]
@@ -955,28 +963,7 @@ export type DevtronLicenseBaseDTO = {
955
963
  domain: string | null;
956
964
  } | null;
957
965
  license: string | null;
958
- } & ({
959
- isSaasInstance: true;
960
- /**
961
- * In seconds
962
- */
963
- timeElapsedSinceCreation: number;
964
- creationTime: string;
965
- ttl?: never;
966
- expiry?: never;
967
- } | {
968
- isSaasInstance?: false;
969
- timeElapsedSinceCreation?: never;
970
- creationTime?: never;
971
- /**
972
- * Can be negative, depicts time left in seconds for license to expire
973
- */
974
- ttl: number | null;
975
- /**
976
- * In timestamp format
977
- */
978
- expiry: string | null;
979
- });
966
+ }
980
967
  export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = DevtronLicenseBaseDTO & (isCentralDashboard extends true ? {
981
968
  claimedByUserDetails: {
982
969
  firstName: string | null;
@@ -986,13 +973,8 @@ export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = Devt
986
973
  showLicenseData?: never;
987
974
  licenseStatusError?: never;
988
975
  moduleLimits?: never;
989
- instanceData: {
990
- devtronUrl: string;
991
- devtronPassword: string;
992
- } | null;
993
976
  } : {
994
977
  claimedByUserDetails?: never;
995
- instanceData?: never;
996
978
  showLicenseData: boolean;
997
979
  licenseStatusError?: LicenseErrorStruct;
998
980
  moduleLimits: {