@commercetools-frontend/constants 22.9.1 → 22.11.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.9.1";
6
+ var version = "22.11.0";
7
7
 
8
8
  // DOM elements
9
9
  const PORTALS_CONTAINER_ID = 'portals-container';
@@ -139,6 +139,36 @@ const LOGIN_STRATEGY_DEFAULT = 'default';
139
139
  const LOGIN_STRATEGY_OIDC = 'oidc';
140
140
  const LOGIN_STRATEGY_SSO = 'sso';
141
141
 
142
+ /*
143
+ * This file contains a list of all feature toggles used within
144
+ * the app shell. Each feature toggle should be a constant.
145
+ *
146
+ * ```
147
+ * export const FEATURE_TOGGLE_NAME = 'featureToggleName';
148
+ * export const FLAGS = {
149
+ * [FEATURE_TOGGLE_NAME]: false,
150
+ * };
151
+ * ```
152
+ *
153
+ * NOTE:
154
+ * Default values are not yet passed to flopflip and it has to be decided
155
+ * how the integrate with the plugin API.
156
+ * The default values would be used whenever feature toggles have not been
157
+ * fetched from LaunchDarkly (without default values flopflip will default
158
+ * them to off until fetched).
159
+ */
160
+
161
+ const CUSTOM_VIEWS = 'enableCustomViews';
162
+ const FLAGS = {
163
+ [CUSTOM_VIEWS]: false
164
+ };
165
+
166
+ var featureToggles = /*#__PURE__*/Object.freeze({
167
+ __proto__: null,
168
+ CUSTOM_VIEWS: CUSTOM_VIEWS,
169
+ FLAGS: FLAGS
170
+ });
171
+
142
172
  exports.CUSTOM_VIEWS_EVENTS_META = CUSTOM_VIEWS_EVENTS_META;
143
173
  exports.CUSTOM_VIEWS_EVENTS_NAMES = CUSTOM_VIEWS_EVENTS_NAMES;
144
174
  exports.CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH = CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH;
@@ -164,4 +194,5 @@ exports.STATUS_CODES = STATUS_CODES;
164
194
  exports.STORAGE_KEYS = STORAGE_KEYS;
165
195
  exports.SUPPORTED_HEADERS = SUPPORTED_HEADERS;
166
196
  exports.SUPPORT_PORTAL_URL = SUPPORT_PORTAL_URL;
197
+ exports.featureFlags = featureToggles;
167
198
  exports.version = version;
@@ -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.9.1";
6
+ var version = "22.11.0";
7
7
 
8
8
  // DOM elements
9
9
  const PORTALS_CONTAINER_ID = 'portals-container';
@@ -139,6 +139,36 @@ const LOGIN_STRATEGY_DEFAULT = 'default';
139
139
  const LOGIN_STRATEGY_OIDC = 'oidc';
140
140
  const LOGIN_STRATEGY_SSO = 'sso';
141
141
 
142
+ /*
143
+ * This file contains a list of all feature toggles used within
144
+ * the app shell. Each feature toggle should be a constant.
145
+ *
146
+ * ```
147
+ * export const FEATURE_TOGGLE_NAME = 'featureToggleName';
148
+ * export const FLAGS = {
149
+ * [FEATURE_TOGGLE_NAME]: false,
150
+ * };
151
+ * ```
152
+ *
153
+ * NOTE:
154
+ * Default values are not yet passed to flopflip and it has to be decided
155
+ * how the integrate with the plugin API.
156
+ * The default values would be used whenever feature toggles have not been
157
+ * fetched from LaunchDarkly (without default values flopflip will default
158
+ * them to off until fetched).
159
+ */
160
+
161
+ const CUSTOM_VIEWS = 'enableCustomViews';
162
+ const FLAGS = {
163
+ [CUSTOM_VIEWS]: false
164
+ };
165
+
166
+ var featureToggles = /*#__PURE__*/Object.freeze({
167
+ __proto__: null,
168
+ CUSTOM_VIEWS: CUSTOM_VIEWS,
169
+ FLAGS: FLAGS
170
+ });
171
+
142
172
  exports.CUSTOM_VIEWS_EVENTS_META = CUSTOM_VIEWS_EVENTS_META;
143
173
  exports.CUSTOM_VIEWS_EVENTS_NAMES = CUSTOM_VIEWS_EVENTS_NAMES;
144
174
  exports.CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH = CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH;
@@ -164,4 +194,5 @@ exports.STATUS_CODES = STATUS_CODES;
164
194
  exports.STORAGE_KEYS = STORAGE_KEYS;
165
195
  exports.SUPPORTED_HEADERS = SUPPORTED_HEADERS;
166
196
  exports.SUPPORT_PORTAL_URL = SUPPORT_PORTAL_URL;
197
+ exports.featureFlags = featureToggles;
167
198
  exports.version = version;
@@ -1,5 +1,5 @@
1
1
  // NOTE: This string will be replaced on build time with the package version.
2
- var version = "22.9.1";
2
+ var version = "22.11.0";
3
3
 
4
4
  // DOM elements
5
5
  const PORTALS_CONTAINER_ID = 'portals-container';
@@ -135,4 +135,34 @@ const LOGIN_STRATEGY_DEFAULT = 'default';
135
135
  const LOGIN_STRATEGY_OIDC = 'oidc';
136
136
  const LOGIN_STRATEGY_SSO = 'sso';
137
137
 
138
- export { CUSTOM_VIEWS_EVENTS_META, CUSTOM_VIEWS_EVENTS_NAMES, CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH, DOMAINS, GRAPHQL_TARGETS, HIDE_ALL_PAGE_NOTIFICATIONS, HIDE_LOADING, HTTP_SECURITY_HEADERS, LOGIN_STRATEGY_DEFAULT, LOGIN_STRATEGY_OIDC, LOGIN_STRATEGY_SSO, LOGOUT_REASONS, MC_API_PROXY_TARGETS, NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_GLOBAL, NOTIFICATION_KINDS_PAGE, NOTIFICATION_KINDS_SIDE, NO_VALUE_FALLBACK, ORGANIZATION_GENERAL_ERROR, PORTALS_CONTAINER_ID, SHOW_LOADING, STATUS_CODES, STORAGE_KEYS, SUPPORTED_HEADERS, SUPPORT_PORTAL_URL, version };
138
+ /*
139
+ * This file contains a list of all feature toggles used within
140
+ * the app shell. Each feature toggle should be a constant.
141
+ *
142
+ * ```
143
+ * export const FEATURE_TOGGLE_NAME = 'featureToggleName';
144
+ * export const FLAGS = {
145
+ * [FEATURE_TOGGLE_NAME]: false,
146
+ * };
147
+ * ```
148
+ *
149
+ * NOTE:
150
+ * Default values are not yet passed to flopflip and it has to be decided
151
+ * how the integrate with the plugin API.
152
+ * The default values would be used whenever feature toggles have not been
153
+ * fetched from LaunchDarkly (without default values flopflip will default
154
+ * them to off until fetched).
155
+ */
156
+
157
+ const CUSTOM_VIEWS = 'enableCustomViews';
158
+ const FLAGS = {
159
+ [CUSTOM_VIEWS]: false
160
+ };
161
+
162
+ var featureToggles = /*#__PURE__*/Object.freeze({
163
+ __proto__: null,
164
+ CUSTOM_VIEWS: CUSTOM_VIEWS,
165
+ FLAGS: FLAGS
166
+ });
167
+
168
+ export { CUSTOM_VIEWS_EVENTS_META, CUSTOM_VIEWS_EVENTS_NAMES, CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH, DOMAINS, GRAPHQL_TARGETS, HIDE_ALL_PAGE_NOTIFICATIONS, HIDE_LOADING, HTTP_SECURITY_HEADERS, LOGIN_STRATEGY_DEFAULT, LOGIN_STRATEGY_OIDC, LOGIN_STRATEGY_SSO, LOGOUT_REASONS, MC_API_PROXY_TARGETS, NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_GLOBAL, NOTIFICATION_KINDS_PAGE, NOTIFICATION_KINDS_SIDE, NO_VALUE_FALLBACK, ORGANIZATION_GENERAL_ERROR, PORTALS_CONTAINER_ID, SHOW_LOADING, STATUS_CODES, STORAGE_KEYS, SUPPORTED_HEADERS, SUPPORT_PORTAL_URL, featureToggles as featureFlags, version };
@@ -0,0 +1,4 @@
1
+ export declare const CUSTOM_VIEWS = "enableCustomViews";
2
+ export declare const FLAGS: {
3
+ enableCustomViews: boolean;
4
+ };
@@ -1,2 +1,3 @@
1
1
  export { default as version } from './version';
2
2
  export * from './constants';
3
+ export * as featureFlags from './feature-toggles';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/constants",
3
- "version": "22.9.1",
3
+ "version": "22.11.0",
4
4
  "description": "Shared constants for MC applications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {