@tak-ps/cloudtak 13.111.2 → 13.112.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.
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * A Device row as rendered in lists - built either from the Device API
3
+ * response or from the Device's locally cached CoT when offline
4
+ */
5
+ export type DeviceRow = {
6
+ id: string;
7
+ name: string;
8
+ type: string;
9
+ updated: string;
10
+ located: boolean;
11
+ stale: boolean;
12
+ simulated: boolean;
13
+ status?: string;
14
+ battery?: number;
15
+ hardware?: string;
16
+ source: 'api' | 'local';
17
+ icon: {
18
+ properties: Record<string, unknown>;
19
+ };
20
+ };
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
23
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
24
+ device: DeviceRow;
25
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
26
+ click: () => any;
27
+ }, string, import("vue").PublicProps, Readonly<{
28
+ device: DeviceRow;
29
+ }> & Readonly<{
30
+ onClick?: (() => any) | undefined;
31
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
32
+ actions?: (props: {}) => any;
33
+ }>;
34
+ type __VLS_WithSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };
@@ -0,0 +1,34 @@
1
+ export type CoreEntityKind = 'event' | 'device';
2
+ export type CoreEntityRef = {
3
+ kind: CoreEntityKind;
4
+ id: string;
5
+ };
6
+ type EntityLink = {
7
+ type?: string;
8
+ event?: string;
9
+ device?: string;
10
+ };
11
+ /**
12
+ * Core Entity a CoT is the projection of - carried on the `p` (parent) Link
13
+ * the API attaches when it broadcasts an Event or Device
14
+ */
15
+ export declare function entityLink(links: Array<EntityLink> | undefined): CoreEntityRef | undefined;
16
+ export declare function entityLabel(entity: CoreEntityRef): string;
17
+ export declare function entityRoute(entity: CoreEntityRef): string;
18
+ export declare function entityRouteName(entity: CoreEntityRef): string;
19
+ type MarkerSource = {
20
+ type: string;
21
+ name: string;
22
+ remarks: string;
23
+ style: {
24
+ icon?: string;
25
+ 'marker-color'?: string;
26
+ 'marker-opacity'?: number;
27
+ };
28
+ };
29
+ /**
30
+ * Mirror a saved Entity change onto its map marker's properties so it updates
31
+ * immediately rather than on the next Entity CoT broadcast
32
+ */
33
+ export declare function entityMarkerProperties<T extends Record<string, unknown>>(current: T, entity: MarkerSource): T;
34
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { Ref } from 'vue';
2
+ type Accessible = {
3
+ username: string | null;
4
+ editable: boolean;
5
+ };
6
+ /**
7
+ * Who may change a Core Entity - the creator (or a System Admin) always can,
8
+ * everyone else only while the creator leaves the editable flag set
9
+ */
10
+ export declare function useEntityAccess<T extends Accessible>(entity: Ref<T | undefined>): {
11
+ is_creator: import("vue").ComputedRef<boolean>;
12
+ is_editable: import("vue").ComputedRef<boolean>;
13
+ load: () => Promise<void>;
14
+ };
15
+ export {};
@@ -177,8 +177,8 @@ export default class AtlasDatabase {
177
177
  skipMissionLookup?: boolean;
178
178
  }): Promise<COT | void>;
179
179
  /**
180
- * PATCH a locally moved Core Event marker back to the Event API - a
181
- * failure is reverted on clients by the next Event rebroadcast
180
+ * PATCH a locally moved Core Entity marker back to the Entity API - a
181
+ * failure is reverted on clients by the next Entity rebroadcast
182
182
  */
183
183
  private syncCoreEntityGeometry;
184
184
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/cloudtak",
3
3
  "type": "module",
4
- "version": "13.111.2",
4
+ "version": "13.112.0",
5
5
  "types": "dist/types/plugin.d.ts",
6
6
  "files": [
7
7
  "dist/types"