orc-shared 5.8.0-dev.19 → 5.8.0-dev.20

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/dist/constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.validationErrorTypes = exports.taskStatuses = exports.serializationTypeKey = exports.scopeTypes = exports.scopeConfirmationDialogTypes = exports.roleGroups = exports.requestStates = exports.requestStateOperations = exports.requestStateOperationMap = exports.propertyBagPrimitiveDataType = exports.platformRoles = exports.overtureModule = exports.jsonCargoType = exports.infoBar = exports.dotNetDataTypes = exports.displayMode = exports.definitionType = exports.choiceControlOrientation = exports.attributeDataType = exports.allValue = void 0;
4
+ exports.validationErrorTypes = exports.taskStatuses = exports.serializationTypeKey = exports.scopeTypes = exports.scopeConfirmationDialogTypes = exports.roleGroups = exports.requestStates = exports.requestStateOperations = exports.requestStateOperationMap = exports.propertyBagPrimitiveDataType = exports.platformRoles = exports.overtureModule = exports.jsonCargoType = exports.infoBar = exports.dotNetDataTypes = exports.displayMode = exports.definitionType = exports.choiceControlOrientation = exports.attributeDataType = exports.applications = exports.allValue = void 0;
5
5
  (function () {
6
6
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
7
7
  enterModule && enterModule(module);
@@ -17,6 +17,10 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
17
17
  return a;
18
18
  };
19
19
  var infoBar = exports.infoBar = "infoBar";
20
+ var applications = exports.applications = {
21
+ oms: "oms",
22
+ pim: "pim"
23
+ };
20
24
  var scopeTypes = exports.scopeTypes = {
21
25
  global: "Global",
22
26
  virtual: "Virtual",
@@ -186,6 +190,7 @@ var choiceControlOrientation = exports.choiceControlOrientation = {
186
190
  return;
187
191
  }
188
192
  reactHotLoader.register(infoBar, "infoBar", "/home/vsts/work/1/s/src/constants.js");
193
+ reactHotLoader.register(applications, "applications", "/home/vsts/work/1/s/src/constants.js");
189
194
  reactHotLoader.register(scopeTypes, "scopeTypes", "/home/vsts/work/1/s/src/constants.js");
190
195
  reactHotLoader.register(platformRoles, "platformRoles", "/home/vsts/work/1/s/src/constants.js");
191
196
  reactHotLoader.register(roleGroups, "roleGroups", "/home/vsts/work/1/s/src/constants.js");
@@ -218,6 +223,7 @@ var choiceControlOrientation = exports.choiceControlOrientation = {
218
223
  return;
219
224
  }
220
225
  reactHotLoader.register(infoBar, "infoBar", "/home/vsts/work/1/s/src/constants.js");
226
+ reactHotLoader.register(applications, "applications", "/home/vsts/work/1/s/src/constants.js");
221
227
  reactHotLoader.register(scopeTypes, "scopeTypes", "/home/vsts/work/1/s/src/constants.js");
222
228
  reactHotLoader.register(platformRoles, "platformRoles", "/home/vsts/work/1/s/src/constants.js");
223
229
  reactHotLoader.register(roleGroups, "roleGroups", "/home/vsts/work/1/s/src/constants.js");
@@ -2,6 +2,7 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.resetConfig = exports.loadConfig = exports.buildUrl = exports.buildExternalAppUrl = void 0;
5
+ var _constants = require("../constants");
5
6
  (function () {
6
7
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
7
8
  enterModule && enterModule(module);
@@ -64,8 +65,8 @@ var buildExternalAppUrl = exports.buildExternalAppUrl = function buildExternalAp
64
65
  var url = relativeUrl[0] === "/" ? relativeUrl.substring(1) : relativeUrl;
65
66
  var lowercaseApp = app.toLowerCase();
66
67
  switch (lowercaseApp) {
67
- case "oms":
68
- case "pim":
68
+ case _constants.applications.oms:
69
+ case _constants.applications.pim:
69
70
  return "/".concat(lowercaseApp, "/app/").concat(url);
70
71
  default:
71
72
  throw new Error("Not implemented app '" + app + "'");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orc-shared",
3
- "version": "5.8.0-dev.19",
3
+ "version": "5.8.0-dev.20",
4
4
  "description": "Shared code for Orckestra applications",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
package/src/constants.js CHANGED
@@ -1,5 +1,10 @@
1
1
  export const infoBar = "infoBar";
2
2
 
3
+ export const applications = {
4
+ oms: "oms",
5
+ pim: "pim",
6
+ };
7
+
3
8
  export const scopeTypes = {
4
9
  global: "Global",
5
10
  virtual: "Virtual",
@@ -1,3 +1,5 @@
1
+ import { applications } from "../constants";
2
+
1
3
  /* Constructs a URL search string from an object with key value pairs */
2
4
  const buildParamString = params =>
3
5
  Object.entries(params)
@@ -37,8 +39,8 @@ export const buildExternalAppUrl = (app, relativeUrl) => {
37
39
 
38
40
  let lowercaseApp = app.toLowerCase();
39
41
  switch (lowercaseApp) {
40
- case "oms":
41
- case "pim":
42
+ case applications.oms:
43
+ case applications.pim:
42
44
  return `/${lowercaseApp}/app/${url}`;
43
45
  default:
44
46
  throw new Error("Not implemented app '" + app + "'");