@commercetools-frontend/constants 22.30.3 → 22.32.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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  // NOTE: This string will be replaced on build time with the package version.
6
- var version = "22.30.3";
6
+ var version = "22.32.0";
7
7
 
8
8
  /**
9
9
  * The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
@@ -198,18 +198,23 @@ const LOGIN_STRATEGY_SSO = 'sso';
198
198
  */
199
199
 
200
200
  const CUSTOM_VIEWS = 'enableCustomViews';
201
+ const ENABLE_WORKSPACES_UI = 'enableWorkspacesUi';
201
202
  const FLAGS = {};
202
203
 
203
204
  // Long-lived feature flags, defined in the MC API.
204
205
  const DEFAULT_FLAGS = {
205
206
  [CUSTOM_VIEWS]: {
206
207
  value: true
208
+ },
209
+ [ENABLE_WORKSPACES_UI]: {
210
+ value: false
207
211
  }
208
212
  };
209
213
 
210
214
  var featureToggles = /*#__PURE__*/Object.freeze({
211
215
  __proto__: null,
212
216
  CUSTOM_VIEWS: CUSTOM_VIEWS,
217
+ ENABLE_WORKSPACES_UI: ENABLE_WORKSPACES_UI,
213
218
  FLAGS: FLAGS,
214
219
  DEFAULT_FLAGS: DEFAULT_FLAGS
215
220
  });
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  // NOTE: This string will be replaced on build time with the package version.
6
- var version = "22.30.3";
6
+ var version = "22.32.0";
7
7
 
8
8
  /**
9
9
  * The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
@@ -198,18 +198,23 @@ const LOGIN_STRATEGY_SSO = 'sso';
198
198
  */
199
199
 
200
200
  const CUSTOM_VIEWS = 'enableCustomViews';
201
+ const ENABLE_WORKSPACES_UI = 'enableWorkspacesUi';
201
202
  const FLAGS = {};
202
203
 
203
204
  // Long-lived feature flags, defined in the MC API.
204
205
  const DEFAULT_FLAGS = {
205
206
  [CUSTOM_VIEWS]: {
206
207
  value: true
208
+ },
209
+ [ENABLE_WORKSPACES_UI]: {
210
+ value: false
207
211
  }
208
212
  };
209
213
 
210
214
  var featureToggles = /*#__PURE__*/Object.freeze({
211
215
  __proto__: null,
212
216
  CUSTOM_VIEWS: CUSTOM_VIEWS,
217
+ ENABLE_WORKSPACES_UI: ENABLE_WORKSPACES_UI,
213
218
  FLAGS: FLAGS,
214
219
  DEFAULT_FLAGS: DEFAULT_FLAGS
215
220
  });
@@ -1,5 +1,5 @@
1
1
  // NOTE: This string will be replaced on build time with the package version.
2
- var version = "22.30.3";
2
+ var version = "22.32.0";
3
3
 
4
4
  /**
5
5
  * The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
@@ -194,18 +194,23 @@ const LOGIN_STRATEGY_SSO = 'sso';
194
194
  */
195
195
 
196
196
  const CUSTOM_VIEWS = 'enableCustomViews';
197
+ const ENABLE_WORKSPACES_UI = 'enableWorkspacesUi';
197
198
  const FLAGS = {};
198
199
 
199
200
  // Long-lived feature flags, defined in the MC API.
200
201
  const DEFAULT_FLAGS = {
201
202
  [CUSTOM_VIEWS]: {
202
203
  value: true
204
+ },
205
+ [ENABLE_WORKSPACES_UI]: {
206
+ value: false
203
207
  }
204
208
  };
205
209
 
206
210
  var featureToggles = /*#__PURE__*/Object.freeze({
207
211
  __proto__: null,
208
212
  CUSTOM_VIEWS: CUSTOM_VIEWS,
213
+ ENABLE_WORKSPACES_UI: ENABLE_WORKSPACES_UI,
209
214
  FLAGS: FLAGS,
210
215
  DEFAULT_FLAGS: DEFAULT_FLAGS
211
216
  });
@@ -1,6 +1,36 @@
1
1
  import type { TCustomView } from './types/generated/settings';
2
+ /**
3
+ * The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
4
+ * up to two consecutive underscores (_) and hyphens (-). Leading and trailing underscore and hyphens are also not allowed.
5
+ *
6
+ * This regular expression has been generated using ChatGPT.
7
+ * Explanation of the regular expression:
8
+ * 1. ^: Asserts the start of the string.
9
+ * 2. (?!.*(?:[-_]{3}|^[-_]|[-_]$)): Negative lookahead assertion ensures that there are no three consecutive hyphens or underscores ([-_]{3}), no leading hyphen or underscore (^[-_]), and no trailing hyphen or underscore ([-_]$).
10
+ * 3. (?=.{2,36}$): Positive lookahead assertion ensures that the length of the string is between 2 and 36 characters.
11
+ * 4. (?:[a-z1-9][a-z0-9]*)?: Non-capturing group matches an optional first character that cannot be '0' ([a-z1-9]) followed by zero or more lowercase alphanumeric characters ([a-z0-9]*).
12
+ * 5. (?:[-_]{0,2}[a-z0-9]+)*: Non-capturing group matches zero, one, or two hyphens or underscores followed by one or more lowercase alphanumeric characters. This group can repeat zero or more times.
13
+ * 6. $: Asserts the end of the string.
14
+ */
2
15
  export declare const PROJECT_KEY_REGEX: RegExp;
16
+ /**
17
+ * The entryPointUriPath may be between 2 and 64 characters and only contain alphabetic lowercase characters,
18
+ * non-consecutive underscores and hyphens. Leading and trailing underscore and hyphens are also not allowed.
19
+ *
20
+ * This regular expression has been generated using ChatGPT.
21
+ * Explanation of the regular expression:
22
+ * 1. ^: Asserts the start of the string.
23
+ * 2. (?!.*(?:[-_]{2}|^[-_]|[-_]$)): Negative lookahead assertion ensures that there are no two consecutive hyphens or underscores ([-_]{2}), no leading hyphen or underscore (^[-_]), and no trailing hyphen or underscore ([-_]$).
24
+ * 3. (?=.{2,64}$): Positive lookahead assertion ensures that the length of the string is between 2 and 64 characters.
25
+ * 4. (?:[a-z1-9][a-z0-9]*)?: Non-capturing group matches an optional first character that cannot be '0' ([a-z1-9]) followed by zero or more lowercase alphanumeric characters ([a-z0-9]*).
26
+ * 5. (?:[-_]{0,1}[a-z0-9]+)*: Non-capturing group matches zero, or one hyphen or underscore followed by one or more lowercase alphanumeric characters. This group can repeat zero or more times.
27
+ * 6. $: Asserts the end of the string.
28
+ */
3
29
  export declare const ENTRY_POINT_URI_PATH_REGEX: RegExp;
30
+ /**
31
+ * The permission group name may be between 2 and 64 characters and only contain alphanumeric lowercase characters and non-consecutive hyphens.
32
+ * Leading and trailing hyphens are also not allowed.
33
+ */
4
34
  export declare const PERMISSION_GROUP_NAME_REGEX: RegExp;
5
35
  export declare const PORTALS_CONTAINER_ID = "portals-container";
6
36
  export declare const PORTALS_CONTAINER_INDENTATION_SIZE = "48px";
@@ -52,6 +82,7 @@ export type TAppNotificationOfKind<T extends TAppNotificationOfDomain> = TAppNot
52
82
  };
53
83
  export type TAppNotificationApiError<ExtraFields extends {} = {}> = {
54
84
  message: string;
85
+ /** @deprecated Use `extensions.code` */
55
86
  code?: string;
56
87
  extensions?: {
57
88
  code?: string;
@@ -1,7 +1,11 @@
1
1
  export declare const CUSTOM_VIEWS = "enableCustomViews";
2
+ export declare const ENABLE_WORKSPACES_UI = "enableWorkspacesUi";
2
3
  export declare const FLAGS: {};
3
4
  export declare const DEFAULT_FLAGS: {
4
5
  enableCustomViews: {
5
6
  value: boolean;
6
7
  };
8
+ enableWorkspacesUi: {
9
+ value: boolean;
10
+ };
7
11
  };
@@ -11,6 +11,7 @@ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
11
11
  export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
12
12
  [SubKey in K]: Maybe<T[SubKey]>;
13
13
  };
14
+ /** All built-in and custom scalars, mapped to their actual values */
14
15
  export type Scalars = {
15
16
  ID: string;
16
17
  String: string;
@@ -169,11 +170,14 @@ export type TCustomApplicationMenuLink = {
169
170
  __typename?: 'CustomApplicationMenuLink';
170
171
  createdAt: Scalars['DateTime'];
171
172
  defaultLabel: Scalars['String'];
173
+ /** @deprecated This field has been moved outside of the menu link. */
172
174
  icon: Scalars['String'];
175
+ /** @deprecated This field has been renamed to icon. */
173
176
  iconName?: Maybe<Scalars['String']>;
174
177
  id: Scalars['ID'];
175
178
  labelAllLocales: Array<TLocalizedField>;
176
179
  permissions: Array<Scalars['String']>;
180
+ /** @deprecated This field has been moved outside of the menu link and is now a top level field. */
177
181
  submenuLinks: Array<TCustomApplicationSubmenuLink>;
178
182
  updatedAt: Scalars['DateTime'];
179
183
  };
@@ -267,6 +271,10 @@ export type TCustomViewDraftDataInput = {
267
271
  locators: Array<Scalars['String']>;
268
272
  permissions: Array<TCustomViewPermissionDataInput>;
269
273
  type: TCustomViewType;
274
+ /**
275
+ * The value of this property depends on the value of the 'type' property value.
276
+ * In case the `type` value is `CustomPanel`, you are supposed to provide it's size.
277
+ */
270
278
  typeSettings?: InputMaybe<TCustomViewTypeSettingsInput>;
271
279
  url: Scalars['String'];
272
280
  };
@@ -1104,6 +1112,7 @@ export type TProductTypeAttributesViewUpdateInput = {
1104
1112
  };
1105
1113
  export type TProjectExtension = {
1106
1114
  __typename?: 'ProjectExtension';
1115
+ /** @deprecated Feature not available anymore */
1107
1116
  applications?: Maybe<Array<TApplicationExtension>>;
1108
1117
  categoryRecommendationSettings?: Maybe<TCategoryRecommendationSettings>;
1109
1118
  createdAt: Scalars['DateTime'];
@@ -1167,16 +1176,20 @@ export type TQuery = {
1167
1176
  activePimSearchListView?: Maybe<TPimSearchListView>;
1168
1177
  activeProductDiscountsCustomView?: Maybe<TDiscountsCustomView>;
1169
1178
  activeProductTypeAttributesView?: Maybe<TProductTypeAttributesView>;
1179
+ /** @deprecated Experimental feature - For internal usage only */
1170
1180
  allAppliedCustomApplicationPermissions: Array<TCustomApplicationInstallationPermission>;
1181
+ /** @deprecated Experimental feature - For internal usage only */
1171
1182
  allCustomApplications: TCustomApplicationsPagedQueryResult;
1172
1183
  allCustomViewInstallationByOrganization?: Maybe<TCustomViewInstallation>;
1173
1184
  allCustomViewsByOrganization: Array<Maybe<TCustomView>>;
1174
1185
  allFeatures: Array<TFeature>;
1186
+ /** @deprecated Experimental feature - For internal usage only */
1175
1187
  allOrganizationExtensions: Array<TOrganizationExtension>;
1176
1188
  allProjectExtensions: Array<TProjectExtension>;
1177
1189
  allPublicCustomApplicationsDevelopedByCommercetools: Array<TPublicCustomApplicationDevelopedByCommercetools>;
1178
1190
  cartDiscountsCustomView?: Maybe<TDiscountsCustomView>;
1179
1191
  cartDiscountsCustomViews: Array<Maybe<TDiscountsCustomView>>;
1192
+ /** @deprecated Experimental feature - For internal usage only */
1180
1193
  customApplication?: Maybe<TCustomApplication>;
1181
1194
  customView?: Maybe<TCustomView>;
1182
1195
  customViewInstallation?: Maybe<TCustomViewInstallation>;
@@ -1186,6 +1199,7 @@ export type TQuery = {
1186
1199
  dashboardViews: Array<Maybe<TDashboardView>>;
1187
1200
  discountCodesCustomView?: Maybe<TDiscountsCustomView>;
1188
1201
  discountCodesCustomViews: Array<Maybe<TDiscountsCustomView>>;
1202
+ /** @deprecated Experimental feature - For internal usage only */
1189
1203
  globalOrganizationExtension?: Maybe<TOrganizationExtension>;
1190
1204
  myCustomApplications: Array<TMyCustomApplication>;
1191
1205
  ordersListView?: Maybe<TOrdersListView>;
@@ -1330,6 +1344,7 @@ export type TRestrictedCustomApplicationForProject = {
1330
1344
  icon: Scalars['String'];
1331
1345
  id: Scalars['ID'];
1332
1346
  mainMenuLink: TCustomApplicationMenuLink;
1347
+ /** @deprecated This field has been renamed to mainMenuLink field. The nested submenuLinks is also now a top level field. */
1333
1348
  menuLinks?: Maybe<TCustomApplicationMenuLink>;
1334
1349
  name: Scalars['String'];
1335
1350
  permissions: Array<TCustomApplicationPermission>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/constants",
3
- "version": "22.30.3",
3
+ "version": "22.32.0",
4
4
  "description": "Shared constants for MC applications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {