New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@commercetools-frontend/constants

Package Overview
Dependencies
Maintainers
6
Versions
1198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-frontend/constants - npm Package Compare versions

Comparing version 14.1.1 to 14.2.1-alpha.0

60

dist/constants.cjs.js

@@ -6,38 +6,4 @@ 'use strict';

// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
var version = '14.1.1';
var version = '14.2.1-alpha.0';
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function (key) {
_defineProperty(target, key, source[key]);
});
}
return target;
}
// DOM elements

@@ -52,3 +18,3 @@ var PORTALS_CONTAINER_ID = 'portals-container'; // Links

var DOMAINS = {
var NOTIFICATION_DOMAINS = {
GLOBAL: 'global',

@@ -64,9 +30,20 @@ PAGE: 'page',

};
var NOTIFICATION_KINDS_GLOBAL = _objectSpread({}, NOTIFICATION_KINDS_SIDE, {
var NOTIFICATION_KINDS_GLOBAL = {
error: 'error',
warning: 'warning',
info: 'info',
success: 'success',
'unexpected-error': 'unexpected-error'
});
var NOTIFICATION_KINDS_PAGE = _objectSpread({}, NOTIFICATION_KINDS_GLOBAL, {
};
var NOTIFICATION_KINDS_PAGE = {
error: 'error',
warning: 'warning',
info: 'info',
success: 'success',
'unexpected-error': 'unexpected-error',
'api-error': 'api-error'
}); // Fallback string when there is no localized value
};
// Alias to `NOTIFICATION_DOMAINS` for backwards compatibility
var DOMAINS = NOTIFICATION_DOMAINS;
// Fallback string when there is no localized value
var NO_VALUE_FALLBACK = '- - - -'; // HTTP requests and responses

@@ -100,2 +77,3 @@

exports.LOGOUT_REASONS = LOGOUT_REASONS;
exports.NOTIFICATION_DOMAINS = NOTIFICATION_DOMAINS;
exports.NOTIFICATION_KINDS_GLOBAL = NOTIFICATION_KINDS_GLOBAL;

@@ -102,0 +80,0 @@ exports.NOTIFICATION_KINDS_PAGE = NOTIFICATION_KINDS_PAGE;

// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
var version = '14.1.1';
var version = '14.2.1-alpha.0';
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function (key) {
_defineProperty(target, key, source[key]);
});
}
return target;
}
// DOM elements

@@ -47,3 +13,3 @@ var PORTALS_CONTAINER_ID = 'portals-container'; // Links

var DOMAINS = {
var NOTIFICATION_DOMAINS = {
GLOBAL: 'global',

@@ -59,9 +25,20 @@ PAGE: 'page',

};
var NOTIFICATION_KINDS_GLOBAL = _objectSpread({}, NOTIFICATION_KINDS_SIDE, {
var NOTIFICATION_KINDS_GLOBAL = {
error: 'error',
warning: 'warning',
info: 'info',
success: 'success',
'unexpected-error': 'unexpected-error'
});
var NOTIFICATION_KINDS_PAGE = _objectSpread({}, NOTIFICATION_KINDS_GLOBAL, {
};
var NOTIFICATION_KINDS_PAGE = {
error: 'error',
warning: 'warning',
info: 'info',
success: 'success',
'unexpected-error': 'unexpected-error',
'api-error': 'api-error'
}); // Fallback string when there is no localized value
};
// Alias to `NOTIFICATION_DOMAINS` for backwards compatibility
var DOMAINS = NOTIFICATION_DOMAINS;
// Fallback string when there is no localized value
var NO_VALUE_FALLBACK = '- - - -'; // HTTP requests and responses

@@ -90,3 +67,3 @@

export { DOMAINS, GRAPHQL_TARGETS, HIDE_ALL_PAGE_NOTIFICATIONS, HIDE_LOADING, LOGOUT_REASONS, NOTIFICATION_KINDS_GLOBAL, NOTIFICATION_KINDS_PAGE, NOTIFICATION_KINDS_SIDE, NO_VALUE_FALLBACK, PORTALS_CONTAINER_ID, SHOW_LOADING, STATUS_CODES, SUPPORT_PORTAL_URL, version };
export { DOMAINS, GRAPHQL_TARGETS, HIDE_ALL_PAGE_NOTIFICATIONS, HIDE_LOADING, LOGOUT_REASONS, NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_GLOBAL, NOTIFICATION_KINDS_PAGE, NOTIFICATION_KINDS_SIDE, NO_VALUE_FALLBACK, PORTALS_CONTAINER_ID, SHOW_LOADING, STATUS_CODES, SUPPORT_PORTAL_URL, version };
//# sourceMappingURL=constants.es.js.map

@@ -6,10 +6,38 @@ export declare const PORTALS_CONTAINER_ID = "portals-container";

export declare const HIDE_ALL_PAGE_NOTIFICATIONS = "HIDE_ALL_PAGE_NOTIFICATIONS";
export declare type TAppNotificationDomain = 'global' | 'page' | 'side';
export declare const NOTIFICATION_DOMAINS: {
GLOBAL: 'global';
PAGE: 'page';
SIDE: 'side';
};
export declare const NOTIFICATION_KINDS_SIDE: {
error: 'error';
warning: 'warning';
info: 'info';
success: 'success';
};
export declare const NOTIFICATION_KINDS_GLOBAL: {
error: 'error';
warning: 'warning';
info: 'info';
success: 'success';
'unexpected-error': 'unexpected-error';
};
export declare const NOTIFICATION_KINDS_PAGE: {
error: 'error';
warning: 'warning';
info: 'info';
success: 'success';
'unexpected-error': 'unexpected-error';
'api-error': 'api-error';
};
export declare type TAppNotificationDomain = (typeof NOTIFICATION_DOMAINS)[keyof typeof NOTIFICATION_DOMAINS];
export declare const DOMAINS: {
[key: string]: TAppNotificationDomain;
GLOBAL: "global";
PAGE: "page";
SIDE: "side";
};
export declare type TAppNotificationKind = 'error' | 'warning' | 'info' | 'success' | 'api-error' | 'unexpected-error';
export declare type TAppNotificationKindSide = Omit<TAppNotificationKind, 'api-error' | 'unexpected-error'>;
export declare type TAppNotificationKindGlobal = Omit<TAppNotificationKind, 'unexpected-error'>;
export declare type TAppNotificationKindPage = TAppNotificationKind;
export declare type TAppNotificationKindSide = (typeof NOTIFICATION_KINDS_SIDE)[keyof typeof NOTIFICATION_KINDS_SIDE];
export declare type TAppNotificationKindGlobal = (typeof NOTIFICATION_KINDS_GLOBAL)[keyof typeof NOTIFICATION_KINDS_GLOBAL];
export declare type TAppNotificationKindPage = (typeof NOTIFICATION_KINDS_PAGE)[keyof typeof NOTIFICATION_KINDS_PAGE];
export declare type TAppNotificationKind = TAppNotificationKindSide | TAppNotificationKindGlobal | TAppNotificationKindPage;
export declare type TAppNotificationOfDomain = {

@@ -21,9 +49,9 @@ domain: TAppNotificationDomain;

};
export declare type TAppNotificationApiError = {
code: string;
export declare type TAppNotificationApiError<ExtraFields extends {} = {}> = {
message: string;
code?: string;
} & ExtraFields;
export declare type TAppNotificationValuesApiError<ExtraFields extends {} = {}> = {
errors: TAppNotificationApiError<ExtraFields>[];
};
export declare type TAppNotificationValuesApiError = {
errors: TAppNotificationApiError[];
};
export declare type TAppNotificationValuesUnexpectedError = {

@@ -33,26 +61,41 @@ errorId?: string;

export declare type TAppNotification<T extends TAppNotificationOfKind<T>> = TAppNotificationOfKind<T> & {
id: number;
text?: TAppNotificationKindSide extends T['kind'] ? string : never;
values?: 'api-error' extends T['kind'] ? TAppNotificationValuesApiError : 'unexpected-error' extends T['kind'] ? TAppNotificationValuesUnexpectedError : never;
};
export declare const NOTIFICATION_KINDS_SIDE: {
[key: string]: TAppNotificationKindSide;
};
export declare const NOTIFICATION_KINDS_GLOBAL: {
[key: string]: TAppNotificationKindGlobal;
};
export declare const NOTIFICATION_KINDS_PAGE: {
[key: string]: TAppNotificationKindPage;
};
export declare type TAppNotificationGlobal = TAppNotification<{
domain: typeof NOTIFICATION_DOMAINS.GLOBAL;
kind: TAppNotificationKindGlobal;
}>;
export declare type TAppNotificationPage = TAppNotification<{
domain: typeof NOTIFICATION_DOMAINS.PAGE;
kind: TAppNotificationKindPage;
}>;
export declare type TAppNotificationSide = TAppNotification<{
domain: typeof NOTIFICATION_DOMAINS.SIDE;
kind: TAppNotificationKindSide;
}>;
export declare const NO_VALUE_FALLBACK = "- - - -";
export declare type TStatusCode = 401 | 403 | 299 | 404;
export declare const STATUS_CODES: {
[key: string]: TStatusCode;
UNAUTHORIZED: 401;
FORBIDDEN: 403;
UNAUTHENTICATED: 299;
NOT_FOUND: 404;
};
export declare type TLogoutReasons = 'user' | 'unauthorized' | 'invalid' | 'deleted';
export declare type TStatusCode = (typeof STATUS_CODES)[keyof typeof STATUS_CODES];
export declare const LOGOUT_REASONS: {
[key: string]: TLogoutReasons;
USER: 'user';
UNAUTHORIZED: 'unauthorized';
INVALID: 'invalid';
DELETED: 'deleted';
};
export declare type TGraphQLTargets = 'mc' | 'ctp' | 'dashboard' | 'pim-indexer' | 'settings' | 'administration';
export declare type TLogoutReason = (typeof LOGOUT_REASONS)[keyof typeof LOGOUT_REASONS];
export declare const GRAPHQL_TARGETS: {
[key: string]: TGraphQLTargets;
MERCHANT_CENTER_BACKEND: 'mc';
COMMERCETOOLS_PLATFORM: 'ctp';
DASHBOARD_SERVICE: 'dashboard';
PIM_INDEXER: 'pim-indexer';
SETTINGS_SERVICE: 'settings';
ADMINISTRATION_SERVICE: 'administration';
};
export declare type TGraphQLTargets = (typeof GRAPHQL_TARGETS)[keyof typeof GRAPHQL_TARGETS];

@@ -1,2 +0,2 @@

declare const _default: "14.1.1";
declare const _default: "14.2.1-alpha.0";
export default _default;
{
"name": "@commercetools-frontend/constants",
"version": "14.1.1",
"version": "14.2.1-alpha.0",
"description": "Shared constants for MC applications",

@@ -40,3 +40,3 @@ "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",

},
"gitHead": "d9d7bc8a19629f5843e041220e9f40544967414f"
"gitHead": "bc2158f346029b5cc02d3b7d65887c96b5a6a632"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc