@trackunit/iris-app-runtime-core-api 1.16.5 → 1.16.7

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 CHANGED
@@ -131,6 +131,29 @@ exports.SortOrder = void 0;
131
131
  SortOrder["Desc"] = "DESC";
132
132
  })(exports.SortOrder || (exports.SortOrder = {}));
133
133
 
134
+ /**
135
+ * Canonical penpal channel names used by `@trackunit/iris-app-runtime-core`.
136
+ *
137
+ * External iris-app publishers building against `@trackunit/iris-app-runtime-core`
138
+ * must pass one of these strings to `useSubscribeToHostChanges(methods, channel)`
139
+ * so the child connection lines up with the host's `usePenpalIframe({ channel })`.
140
+ *
141
+ * The module-level singleton connector uses {@link Channels.HostRuntime}; the
142
+ * remaining channels are dedicated to the five subscription providers
143
+ * (token, time-range, filter bar, widget config, asset sorting).
144
+ *
145
+ * Channel strings outside this set are reserved for future use and should not
146
+ * be passed to penpal `connect({ channel })` today.
147
+ */
148
+ const Channels = {
149
+ HostRuntime: "host-runtime",
150
+ TokenSubscription: "token-subscription",
151
+ TimeRangeSubscription: "time-range-subscription",
152
+ FilterBarSubscription: "filter-bar-subscription",
153
+ WidgetConfigSubscription: "widget-config-subscription",
154
+ AssetSortingSubscription: "asset-sorting-subscription",
155
+ };
156
+
134
157
  const SystemOfMeasurement = {
135
158
  Si: "SI",
136
159
  UsCustomary: "US_CUSTOMARY",
@@ -358,6 +381,7 @@ const UserSubscriptionPackage = {
358
381
  CUSTOMER_PORTAL: "Customer Portal",
359
382
  };
360
383
 
384
+ exports.Channels = Channels;
361
385
  exports.SystemOfMeasurement = SystemOfMeasurement;
362
386
  exports.TimeZonePreference = TimeZonePreference;
363
387
  exports.UnitOfMeasurement = UnitOfMeasurement;
package/index.esm.js CHANGED
@@ -129,6 +129,29 @@ var SortOrder;
129
129
  SortOrder["Desc"] = "DESC";
130
130
  })(SortOrder || (SortOrder = {}));
131
131
 
132
+ /**
133
+ * Canonical penpal channel names used by `@trackunit/iris-app-runtime-core`.
134
+ *
135
+ * External iris-app publishers building against `@trackunit/iris-app-runtime-core`
136
+ * must pass one of these strings to `useSubscribeToHostChanges(methods, channel)`
137
+ * so the child connection lines up with the host's `usePenpalIframe({ channel })`.
138
+ *
139
+ * The module-level singleton connector uses {@link Channels.HostRuntime}; the
140
+ * remaining channels are dedicated to the five subscription providers
141
+ * (token, time-range, filter bar, widget config, asset sorting).
142
+ *
143
+ * Channel strings outside this set are reserved for future use and should not
144
+ * be passed to penpal `connect({ channel })` today.
145
+ */
146
+ const Channels = {
147
+ HostRuntime: "host-runtime",
148
+ TokenSubscription: "token-subscription",
149
+ TimeRangeSubscription: "time-range-subscription",
150
+ FilterBarSubscription: "filter-bar-subscription",
151
+ WidgetConfigSubscription: "widget-config-subscription",
152
+ AssetSortingSubscription: "asset-sorting-subscription",
153
+ };
154
+
132
155
  const SystemOfMeasurement = {
133
156
  Si: "SI",
134
157
  UsCustomary: "US_CUSTOMARY",
@@ -356,4 +379,4 @@ const UserSubscriptionPackage = {
356
379
  CUSTOMER_PORTAL: "Customer Portal",
357
380
  };
358
381
 
359
- export { AggregationPeriod, AssetSortByProperty, BodyType, SortOrder, SystemOfMeasurement, TimeZonePreference, UnitOfMeasurement, UnitSi, UnitUs, UserSubscriptionPackage, allPages, assetHomePageIds, createEvent, customerHomePageIds, groupHomePageIds, isAssetHomeOptions, isCustomerHomeOptions, isFleetAppStandardOptions, isGroupHomeOptions, isIrisOptions, isSiteHomeOptions, mainApps, siteHomePageIds, validateStringAsAssetSortByProperty };
382
+ export { AggregationPeriod, AssetSortByProperty, BodyType, Channels, 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.16.5",
3
+ "version": "1.16.7",
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.15.5",
12
- "@trackunit/geo-json-utils": "1.14.5"
11
+ "@trackunit/shared-utils": "1.15.7",
12
+ "@trackunit/geo-json-utils": "1.14.7"
13
13
  },
14
14
  "module": "./index.esm.js",
15
15
  "main": "./index.cjs.js",
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Canonical penpal channel names used by `@trackunit/iris-app-runtime-core`.
3
+ *
4
+ * External iris-app publishers building against `@trackunit/iris-app-runtime-core`
5
+ * must pass one of these strings to `useSubscribeToHostChanges(methods, channel)`
6
+ * so the child connection lines up with the host's `usePenpalIframe({ channel })`.
7
+ *
8
+ * The module-level singleton connector uses {@link Channels.HostRuntime}; the
9
+ * remaining channels are dedicated to the five subscription providers
10
+ * (token, time-range, filter bar, widget config, asset sorting).
11
+ *
12
+ * Channel strings outside this set are reserved for future use and should not
13
+ * be passed to penpal `connect({ channel })` today.
14
+ */
15
+ export declare const Channels: {
16
+ readonly HostRuntime: "host-runtime";
17
+ readonly TokenSubscription: "token-subscription";
18
+ readonly TimeRangeSubscription: "time-range-subscription";
19
+ readonly FilterBarSubscription: "filter-bar-subscription";
20
+ readonly WidgetConfigSubscription: "widget-config-subscription";
21
+ readonly AssetSortingSubscription: "asset-sorting-subscription";
22
+ };
23
+ /**
24
+ * String-literal union of the canonical penpal channel names exported by
25
+ * {@link Channels}.
26
+ *
27
+ * External iris-app publishers must pass a value of this type to
28
+ * `useSubscribeToHostChanges(methods, channel)`; the module-level singleton
29
+ * uses `Channels.HostRuntime`. Custom channel strings outside this set are
30
+ * reserved for future use.
31
+ */
32
+ export type Channel = (typeof Channels)[keyof typeof Channels];
package/src/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from "./AnalyticsRuntime";
2
2
  export * from "./AssetRuntime";
3
3
  export * from "./AssetSortingRuntime";
4
+ export * from "./channels";
4
5
  export * from "./ChildConnector";
5
6
  export * from "./ConfirmationDialogRuntime";
6
7
  export * from "./CurrentUserPreferenceRuntime";