@esri/hub-common 14.61.0 → 14.62.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.
- package/dist/esm/core/getEntityDefaultWorkspacePane.js +7 -0
- package/dist/esm/core/getEntityDefaultWorkspacePane.js.map +1 -0
- package/dist/esm/core/getRelativeWorkspaceUrl.js +4 -1
- package/dist/esm/core/getRelativeWorkspaceUrl.js.map +1 -1
- package/dist/esm/core/index.js +1 -0
- package/dist/esm/core/index.js.map +1 -1
- package/dist/node/core/getEntityDefaultWorkspacePane.js +10 -0
- package/dist/node/core/getEntityDefaultWorkspacePane.js.map +1 -0
- package/dist/node/core/getRelativeWorkspaceUrl.js +4 -1
- package/dist/node/core/getRelativeWorkspaceUrl.js.map +1 -1
- package/dist/node/core/index.js +1 -0
- package/dist/node/core/index.js.map +1 -1
- package/dist/types/core/getEntityDefaultWorkspacePane.d.ts +1 -0
- package/dist/types/core/getRelativeWorkspaceUrl.d.ts +1 -1
- package/dist/types/core/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEntityDefaultWorkspacePane.js","sourceRoot":"","sources":["../../../src/core/getEntityDefaultWorkspacePane.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,UAAkB,EAAU,EAAE;IAC1E,MAAM,aAAa,GAA2B;QAC5C,UAAU,EAAE,SAAS;KACtB,CAAC;IACF,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { isValidEntityType } from "./isValidEntityType";
|
|
|
7
7
|
* @param type entity type
|
|
8
8
|
* @param identifier entity id or slug
|
|
9
9
|
*/
|
|
10
|
-
export const getRelativeWorkspaceUrl = (type, identifier) => {
|
|
10
|
+
export const getRelativeWorkspaceUrl = (type, identifier, pane) => {
|
|
11
11
|
let url = "/";
|
|
12
12
|
const entityType = getTypeFromEntity({ type });
|
|
13
13
|
/**
|
|
@@ -21,6 +21,9 @@ export const getRelativeWorkspaceUrl = (type, identifier) => {
|
|
|
21
21
|
typeSegment = `${typeSegment}s`;
|
|
22
22
|
}
|
|
23
23
|
url = `/workspace/${typeSegment}/${identifier}`;
|
|
24
|
+
if (pane) {
|
|
25
|
+
url += `/${pane}`;
|
|
26
|
+
}
|
|
24
27
|
}
|
|
25
28
|
return url;
|
|
26
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRelativeWorkspaceUrl.js","sourceRoot":"","sources":["../../../src/core/getRelativeWorkspaceUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,IAAY,EACZ,UAAkB,
|
|
1
|
+
{"version":3,"file":"getRelativeWorkspaceUrl.js","sourceRoot":"","sources":["../../../src/core/getRelativeWorkspaceUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,IAAY,EACZ,UAAkB,EAClB,IAAa,EACL,EAAE;IACV,IAAI,GAAG,GAAG,GAAG,CAAC;IACd,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,IAAI,EAAe,CAAC,CAAC;IAE5D;;;;OAIG;IACH,IAAI,iBAAiB,CAAC,UAAU,CAAC,EAAE;QACjC,IAAI,WAAW,GAAG,UAAoB,CAAC;QACvC,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,WAAW,GAAG,GAAG,WAAW,GAAG,CAAC;SACjC;QACD,GAAG,GAAG,cAAc,WAAW,IAAI,UAAU,EAAE,CAAC;QAChD,IAAI,IAAI,EAAE;YACR,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;SACnB;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
package/dist/esm/core/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./types";
|
|
|
3
3
|
export * from "./behaviors";
|
|
4
4
|
export * from "./schemas";
|
|
5
5
|
export * from "./fetchHubEntity";
|
|
6
|
+
export * from "./getEntityDefaultWorkspacePane";
|
|
6
7
|
export * from "./getTypeFromEntity";
|
|
7
8
|
export * from "./getRelativeWorkspaceUrl";
|
|
8
9
|
export * from "./isValidEntityType";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AAErC,uDAAuD;AACvD,oDAAoD;AACpD,qCAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AAErC,uDAAuD;AACvD,oDAAoD;AACpD,qCAAqC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEntityDefaultWorkspacePane = void 0;
|
|
4
|
+
exports.getEntityDefaultWorkspacePane = (entityType) => {
|
|
5
|
+
const DEFAULT_PANES = {
|
|
6
|
+
discussion: "details",
|
|
7
|
+
};
|
|
8
|
+
return DEFAULT_PANES[entityType];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=getEntityDefaultWorkspacePane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEntityDefaultWorkspacePane.js","sourceRoot":"","sources":["../../../src/core/getEntityDefaultWorkspacePane.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG,CAAC,UAAkB,EAAU,EAAE;IAC1E,MAAM,aAAa,GAA2B;QAC5C,UAAU,EAAE,SAAS;KACtB,CAAC;IACF,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC,CAAC"}
|
|
@@ -10,7 +10,7 @@ const isValidEntityType_1 = require("./isValidEntityType");
|
|
|
10
10
|
* @param type entity type
|
|
11
11
|
* @param identifier entity id or slug
|
|
12
12
|
*/
|
|
13
|
-
exports.getRelativeWorkspaceUrl = (type, identifier) => {
|
|
13
|
+
exports.getRelativeWorkspaceUrl = (type, identifier, pane) => {
|
|
14
14
|
let url = "/";
|
|
15
15
|
const entityType = getTypeFromEntity_1.getTypeFromEntity({ type });
|
|
16
16
|
/**
|
|
@@ -24,6 +24,9 @@ exports.getRelativeWorkspaceUrl = (type, identifier) => {
|
|
|
24
24
|
typeSegment = `${typeSegment}s`;
|
|
25
25
|
}
|
|
26
26
|
url = `/workspace/${typeSegment}/${identifier}`;
|
|
27
|
+
if (pane) {
|
|
28
|
+
url += `/${pane}`;
|
|
29
|
+
}
|
|
27
30
|
}
|
|
28
31
|
return url;
|
|
29
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRelativeWorkspaceUrl.js","sourceRoot":"","sources":["../../../src/core/getRelativeWorkspaceUrl.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AACxD,2DAAwD;AAGxD;;;;;;GAMG;AACU,QAAA,uBAAuB,GAAG,CACrC,IAAY,EACZ,UAAkB,
|
|
1
|
+
{"version":3,"file":"getRelativeWorkspaceUrl.js","sourceRoot":"","sources":["../../../src/core/getRelativeWorkspaceUrl.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AACxD,2DAAwD;AAGxD;;;;;;GAMG;AACU,QAAA,uBAAuB,GAAG,CACrC,IAAY,EACZ,UAAkB,EAClB,IAAa,EACL,EAAE;IACV,IAAI,GAAG,GAAG,GAAG,CAAC;IACd,MAAM,UAAU,GAAG,qCAAiB,CAAC,EAAE,IAAI,EAAe,CAAC,CAAC;IAE5D;;;;OAIG;IACH,IAAI,qCAAiB,CAAC,UAAU,CAAC,EAAE;QACjC,IAAI,WAAW,GAAG,UAAoB,CAAC;QACvC,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,WAAW,GAAG,GAAG,WAAW,GAAG,CAAC;SACjC;QACD,GAAG,GAAG,cAAc,WAAW,IAAI,UAAU,EAAE,CAAC;QAChD,IAAI,IAAI,EAAE;YACR,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;SACnB;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
package/dist/node/core/index.js
CHANGED
|
@@ -6,6 +6,7 @@ tslib_1.__exportStar(require("./types"), exports);
|
|
|
6
6
|
tslib_1.__exportStar(require("./behaviors"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./schemas"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./fetchHubEntity"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./getEntityDefaultWorkspacePane"), exports);
|
|
9
10
|
tslib_1.__exportStar(require("./getTypeFromEntity"), exports);
|
|
10
11
|
tslib_1.__exportStar(require("./getRelativeWorkspaceUrl"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./isValidEntityType"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,kDAAwB;AACxB,sDAA4B;AAC5B,oDAA0B;AAC1B,2DAAiC;AACjC,8DAAoC;AACpC,oEAA0C;AAC1C,8DAAoC;AACpC,+DAAqC;AAErC,uDAAuD;AACvD,oDAAoD;AACpD,qCAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,kDAAwB;AACxB,sDAA4B;AAC5B,oDAA0B;AAC1B,2DAAiC;AACjC,0EAAgD;AAChD,8DAAoC;AACpC,oEAA0C;AAC1C,8DAAoC;AACpC,+DAAqC;AAErC,uDAAuD;AACvD,oDAAoD;AACpD,qCAAqC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getEntityDefaultWorkspacePane: (entityType: string) => string;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* @param type entity type
|
|
6
6
|
* @param identifier entity id or slug
|
|
7
7
|
*/
|
|
8
|
-
export declare const getRelativeWorkspaceUrl: (type: string, identifier: string) => string;
|
|
8
|
+
export declare const getRelativeWorkspaceUrl: (type: string, identifier: string, pane?: string) => string;
|
|
@@ -3,6 +3,7 @@ export * from "./types";
|
|
|
3
3
|
export * from "./behaviors";
|
|
4
4
|
export * from "./schemas";
|
|
5
5
|
export * from "./fetchHubEntity";
|
|
6
|
+
export * from "./getEntityDefaultWorkspacePane";
|
|
6
7
|
export * from "./getTypeFromEntity";
|
|
7
8
|
export * from "./getRelativeWorkspaceUrl";
|
|
8
9
|
export * from "./isValidEntityType";
|