@trackunit/iris-app-runtime-core-api 1.9.10 → 1.9.13
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/index.cjs.js +18 -11
- package/index.esm.js +17 -10
- package/package.json +3 -3
- package/src/NavigationRuntime.d.ts +12 -6
package/index.cjs.js
CHANGED
|
@@ -295,19 +295,26 @@ const isSiteHomeOptions = (options) => {
|
|
|
295
295
|
siteHomePageIds.includes(options.page));
|
|
296
296
|
};
|
|
297
297
|
/**
|
|
298
|
-
* type guard for
|
|
298
|
+
* type guard for GroupHomeOptions
|
|
299
299
|
*/
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
300
|
+
const isGroupHomeOptions = (options) => {
|
|
301
|
+
return Boolean(typeof options === "object" &&
|
|
302
|
+
"groupId" in options &&
|
|
303
|
+
Boolean(options.groupId) &&
|
|
304
|
+
typeof options.page === "string" &&
|
|
305
|
+
!isIrisOptions(options) &&
|
|
306
|
+
groupHomePageIds.includes(options.page));
|
|
303
307
|
};
|
|
304
308
|
/**
|
|
305
|
-
* type guard for
|
|
309
|
+
* type guard for CustomerHomeOptions
|
|
306
310
|
*/
|
|
307
|
-
const
|
|
308
|
-
return Boolean(
|
|
309
|
-
|
|
310
|
-
|
|
311
|
+
const isCustomerHomeOptions = (options) => {
|
|
312
|
+
return Boolean(typeof options === "object" &&
|
|
313
|
+
"customerId" in options &&
|
|
314
|
+
Boolean(options.customerId) &&
|
|
315
|
+
typeof options.page === "string" &&
|
|
316
|
+
!isIrisOptions(options) &&
|
|
317
|
+
customerHomePageIds.includes(options.page));
|
|
311
318
|
};
|
|
312
319
|
|
|
313
320
|
exports.BodyType = void 0;
|
|
@@ -349,9 +356,9 @@ exports.createEvent = createEvent;
|
|
|
349
356
|
exports.customerHomePageIds = customerHomePageIds;
|
|
350
357
|
exports.groupHomePageIds = groupHomePageIds;
|
|
351
358
|
exports.isAssetHomeOptions = isAssetHomeOptions;
|
|
352
|
-
exports.
|
|
359
|
+
exports.isCustomerHomeOptions = isCustomerHomeOptions;
|
|
353
360
|
exports.isFleetAppStandardOptions = isFleetAppStandardOptions;
|
|
354
|
-
exports.
|
|
361
|
+
exports.isGroupHomeOptions = isGroupHomeOptions;
|
|
355
362
|
exports.isIrisOptions = isIrisOptions;
|
|
356
363
|
exports.isSiteHomeOptions = isSiteHomeOptions;
|
|
357
364
|
exports.mainApps = mainApps;
|
package/index.esm.js
CHANGED
|
@@ -293,19 +293,26 @@ const isSiteHomeOptions = (options) => {
|
|
|
293
293
|
siteHomePageIds.includes(options.page));
|
|
294
294
|
};
|
|
295
295
|
/**
|
|
296
|
-
* type guard for
|
|
296
|
+
* type guard for GroupHomeOptions
|
|
297
297
|
*/
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
|
|
298
|
+
const isGroupHomeOptions = (options) => {
|
|
299
|
+
return Boolean(typeof options === "object" &&
|
|
300
|
+
"groupId" in options &&
|
|
301
|
+
Boolean(options.groupId) &&
|
|
302
|
+
typeof options.page === "string" &&
|
|
303
|
+
!isIrisOptions(options) &&
|
|
304
|
+
groupHomePageIds.includes(options.page));
|
|
301
305
|
};
|
|
302
306
|
/**
|
|
303
|
-
* type guard for
|
|
307
|
+
* type guard for CustomerHomeOptions
|
|
304
308
|
*/
|
|
305
|
-
const
|
|
306
|
-
return Boolean(
|
|
307
|
-
|
|
308
|
-
|
|
309
|
+
const isCustomerHomeOptions = (options) => {
|
|
310
|
+
return Boolean(typeof options === "object" &&
|
|
311
|
+
"customerId" in options &&
|
|
312
|
+
Boolean(options.customerId) &&
|
|
313
|
+
typeof options.page === "string" &&
|
|
314
|
+
!isIrisOptions(options) &&
|
|
315
|
+
customerHomePageIds.includes(options.page));
|
|
309
316
|
};
|
|
310
317
|
|
|
311
318
|
var BodyType;
|
|
@@ -335,4 +342,4 @@ const UserSubscriptionPackage = {
|
|
|
335
342
|
CUSTOMER_PORTAL: "Customer Portal",
|
|
336
343
|
};
|
|
337
344
|
|
|
338
|
-
export { AssetSortByProperty, BodyType, SortOrder, SystemOfMeasurement, TimeZonePreference, UnitOfMeasurement, UnitSi, UnitUs, UserSubscriptionPackage, allPages, assetHomePageIds, createEvent, customerHomePageIds, groupHomePageIds, isAssetHomeOptions,
|
|
345
|
+
export { AssetSortByProperty, BodyType, SortOrder, SystemOfMeasurement, TimeZonePreference, UnitOfMeasurement, UnitSi, UnitUs, UserSubscriptionPackage, allPages, assetHomePageIds, createEvent, customerHomePageIds, groupHomePageIds, isAssetHomeOptions, isCustomerHomeOptions, isFleetAppStandardOptions, isGroupHomeOptions, isIrisOptions, isSiteHomeOptions, mainApps, siteHomePageIds, validateStringAsAssetSortByProperty };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-runtime-core-api",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.13",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
11
|
-
"@trackunit/shared-utils": "1.11.
|
|
12
|
-
"@trackunit/geo-json-utils": "1.9.
|
|
11
|
+
"@trackunit/shared-utils": "1.11.10",
|
|
12
|
+
"@trackunit/geo-json-utils": "1.9.10"
|
|
13
13
|
},
|
|
14
14
|
"module": "./index.esm.js",
|
|
15
15
|
"main": "./index.cjs.js",
|
|
@@ -19,7 +19,7 @@ type NeverIrisApp = {
|
|
|
19
19
|
};
|
|
20
20
|
export type IrisAppOptions = {
|
|
21
21
|
irisAppId: string;
|
|
22
|
-
extensionId
|
|
22
|
+
extensionId?: string;
|
|
23
23
|
} & SubPage & Search & FragmentIdentifier & NeverPage;
|
|
24
24
|
export declare const mainApps: readonly ["myhome", "map", "assets", "sites", "customers", "groups", "reports"];
|
|
25
25
|
export type MainFleetApp = (typeof mainApps)[number];
|
|
@@ -48,7 +48,13 @@ export type AssetHomeOptions = AssetHomeStandardOptions & {
|
|
|
48
48
|
export type SiteHomeOptions = SiteHomeStandardOptions & {
|
|
49
49
|
siteId: string;
|
|
50
50
|
};
|
|
51
|
-
export type
|
|
51
|
+
export type CustomerHomeOptions = CustomerHomeStandardOptions & {
|
|
52
|
+
customerId: string;
|
|
53
|
+
};
|
|
54
|
+
export type GroupHomeOptions = GroupHomeStandardOptions & {
|
|
55
|
+
groupId: string;
|
|
56
|
+
};
|
|
57
|
+
export type HasAccessToOptions = IrisAppOptions | AssetHomeOptions | SiteHomeOptions | GroupHomeOptions | CustomerHomeOptions | FleetAppStandardOptions;
|
|
52
58
|
/**
|
|
53
59
|
* type guard for IrisAppOptions
|
|
54
60
|
*/
|
|
@@ -66,13 +72,13 @@ export declare const isAssetHomeOptions: (options: HasAccessToOptions) => option
|
|
|
66
72
|
*/
|
|
67
73
|
export declare const isSiteHomeOptions: (options: HasAccessToOptions) => options is SiteHomeOptions;
|
|
68
74
|
/**
|
|
69
|
-
* type guard for
|
|
75
|
+
* type guard for GroupHomeOptions
|
|
70
76
|
*/
|
|
71
|
-
export declare const
|
|
77
|
+
export declare const isGroupHomeOptions: (options: HasAccessToOptions) => options is GroupHomeOptions;
|
|
72
78
|
/**
|
|
73
|
-
* type guard for
|
|
79
|
+
* type guard for CustomerHomeOptions
|
|
74
80
|
*/
|
|
75
|
-
export declare const
|
|
81
|
+
export declare const isCustomerHomeOptions: (options: HasAccessToOptions) => options is CustomerHomeOptions;
|
|
76
82
|
export interface NavigationRuntimeApi {
|
|
77
83
|
hasAccessTo: (options: HasAccessToOptions) => Promise<boolean>;
|
|
78
84
|
gotoAssetHome: (assetId: string, options?: IrisAppOptions | AssetHomeStandardOptions) => Promise<boolean>;
|