@trackunit/iris-app-api 0.0.34
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/CHANGELOG.md +5 -0
- package/package.json +12 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +5 -0
- package/src/index.js.map +1 -0
- package/src/types/index.d.ts +2 -0
- package/src/types/index.js +6 -0
- package/src/types/index.js.map +1 -0
- package/src/types/irisAppManifest.d.ts +247 -0
- package/src/types/irisAppManifest.js +48 -0
- package/src/types/irisAppManifest.js.map +1 -0
- package/src/types/modulefederation.d.ts +92 -0
- package/src/types/modulefederation.js +4 -0
- package/src/types/modulefederation.js.map +1 -0
package/CHANGELOG.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trackunit/iris-app-api",
|
|
3
|
+
"version": "0.0.34",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"repository": "https://github.com/Trackunit/manager",
|
|
6
|
+
"main": "./src/index.js",
|
|
7
|
+
"typings": "./src/index.d.ts",
|
|
8
|
+
"dependencies": {},
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"tslib": "^2.3.1"
|
|
11
|
+
}
|
|
12
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|
package/src/index.js
ADDED
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-api/src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB","sourcesContent":["export * from \"./types\";\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./irisAppManifest"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./modulefederation"), exports);
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,6DAAmC","sourcesContent":["export * from \"./irisAppManifest\";\nexport * from \"./modulefederation\";\n"]}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
export interface IrisAppManifest {
|
|
2
|
+
/**
|
|
3
|
+
* A spec version for the manifest.
|
|
4
|
+
* This should not be changed manually.
|
|
5
|
+
*/
|
|
6
|
+
specVersion: "1.0";
|
|
7
|
+
/**
|
|
8
|
+
* The name of the exposed module from module federation build into the remoteEntry.js.
|
|
9
|
+
*/
|
|
10
|
+
moduleFederationName: string;
|
|
11
|
+
/**
|
|
12
|
+
* Should this be enabled by default.
|
|
13
|
+
*/
|
|
14
|
+
enabledByDefault?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* A list of any external domains that the Tile needs to communicate with.
|
|
17
|
+
*/
|
|
18
|
+
validDomains: string[];
|
|
19
|
+
/**
|
|
20
|
+
* A list of any account ids that can enable this Tile, or empty array if available for all customers.
|
|
21
|
+
*/
|
|
22
|
+
validForAccountIds: "ALL_ACCOUNTS" | string[];
|
|
23
|
+
/**
|
|
24
|
+
* A configuration object for the Marketplace entry
|
|
25
|
+
*/
|
|
26
|
+
marketplace: Marketplace;
|
|
27
|
+
/**
|
|
28
|
+
* A full list of runtime dependencies for the Tile.
|
|
29
|
+
* Used for performance optimization and security scans.
|
|
30
|
+
*/
|
|
31
|
+
dependencies: Dependencies;
|
|
32
|
+
/**
|
|
33
|
+
* A full list of dev dependencies for the Tile.
|
|
34
|
+
* Used for security scans.
|
|
35
|
+
*/
|
|
36
|
+
devDependencies: Dependencies;
|
|
37
|
+
/**
|
|
38
|
+
* A list of extensions to the UI that this app manifest exposes
|
|
39
|
+
*/
|
|
40
|
+
extensions: IrisAppExtension[];
|
|
41
|
+
/**
|
|
42
|
+
* A list of custom field definitions.
|
|
43
|
+
*/
|
|
44
|
+
customFieldDefinitions?: CustomFieldDefinition[];
|
|
45
|
+
}
|
|
46
|
+
export interface AbstractExtensionManifest {
|
|
47
|
+
/** The id of the app extension, will be part of the URL in the manager */
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* The path to the main entry point for the extension.
|
|
51
|
+
* @default "index.tsx"
|
|
52
|
+
*/
|
|
53
|
+
main?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The relative path from the NX workspace to this projects source Root.
|
|
56
|
+
*/
|
|
57
|
+
sourceRoot: string;
|
|
58
|
+
/** The type of the app extension */
|
|
59
|
+
type: IrisAppExtensionType;
|
|
60
|
+
}
|
|
61
|
+
export declare type CustomFieldDefinitionType = "STRING" | "NUMBER" | "DATE" | "BOOLEAN" | "DROPDOWN" | "EMAIL" | "PHONE_NUMBER" | "WEB_ADDRESS";
|
|
62
|
+
export declare type EntityType = "ASSET";
|
|
63
|
+
export interface AbstractCustomFieldDefinition {
|
|
64
|
+
/**
|
|
65
|
+
* The key is the name you use to get the custom field.
|
|
66
|
+
*/
|
|
67
|
+
key: string;
|
|
68
|
+
/**
|
|
69
|
+
* The type of the entity to attach this custom field on.
|
|
70
|
+
*/
|
|
71
|
+
entityType: EntityType;
|
|
72
|
+
/**
|
|
73
|
+
* The human readable translation of the key. So what the end customer will see.
|
|
74
|
+
*/
|
|
75
|
+
title: string;
|
|
76
|
+
/**
|
|
77
|
+
* Should this be visible in the generic UI in Manager.
|
|
78
|
+
*/
|
|
79
|
+
uiVisible: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.
|
|
82
|
+
*/
|
|
83
|
+
uiEditable: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The type of this custom field definition
|
|
86
|
+
*/
|
|
87
|
+
type: CustomFieldDefinitionType;
|
|
88
|
+
}
|
|
89
|
+
export interface StringFieldDefinition extends AbstractCustomFieldDefinition {
|
|
90
|
+
type: "STRING";
|
|
91
|
+
minimumLength?: number;
|
|
92
|
+
maximumLength?: number;
|
|
93
|
+
pattern?: string;
|
|
94
|
+
defaultValue?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface EmailFieldDefinition extends AbstractCustomFieldDefinition {
|
|
97
|
+
type: "EMAIL";
|
|
98
|
+
defaultValue?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {
|
|
101
|
+
type: "WEB_ADDRESS";
|
|
102
|
+
defaultValue?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {
|
|
105
|
+
type: "PHONE_NUMBER";
|
|
106
|
+
defaultValue?: string;
|
|
107
|
+
}
|
|
108
|
+
export interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {
|
|
109
|
+
type: "BOOLEAN";
|
|
110
|
+
defaultValue?: boolean;
|
|
111
|
+
}
|
|
112
|
+
export interface DateFieldDefinition extends AbstractCustomFieldDefinition {
|
|
113
|
+
type: "DATE";
|
|
114
|
+
defaultValue?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {
|
|
117
|
+
type: "DROPDOWN";
|
|
118
|
+
defaultValue?: string | string[];
|
|
119
|
+
multiSelect?: boolean;
|
|
120
|
+
allValues?: string[];
|
|
121
|
+
dropDownValueReplacements: Record<string, string>;
|
|
122
|
+
}
|
|
123
|
+
export declare enum UnitUs {
|
|
124
|
+
"mi" = "mi",
|
|
125
|
+
"yd" = "yd",
|
|
126
|
+
"ft" = "ft",
|
|
127
|
+
"in" = "in",
|
|
128
|
+
"ac" = "ac",
|
|
129
|
+
"ha" = "ha",
|
|
130
|
+
"ft_2" = "ft\u00B2",
|
|
131
|
+
"gal" = "gal",
|
|
132
|
+
"ft_3" = "ft\u00B3",
|
|
133
|
+
"ton_us" = "ton_us",
|
|
134
|
+
"lb" = "lb",
|
|
135
|
+
"oz" = "oz",
|
|
136
|
+
"mph" = "mph",
|
|
137
|
+
"lb_h" = "lb/h",
|
|
138
|
+
"lb_s" = "lb/s"
|
|
139
|
+
}
|
|
140
|
+
export declare enum UnitSi {
|
|
141
|
+
"km" = "km",
|
|
142
|
+
"m" = "m",
|
|
143
|
+
"cm" = "cm",
|
|
144
|
+
"mm" = "mm",
|
|
145
|
+
"l" = "l",
|
|
146
|
+
"kg" = "kg",
|
|
147
|
+
"g" = "g",
|
|
148
|
+
"ton" = "ton",
|
|
149
|
+
"N" = "N",
|
|
150
|
+
"kW" = "kW",
|
|
151
|
+
"W" = "W",
|
|
152
|
+
"kWh" = "kWh",
|
|
153
|
+
"kPa" = "kPa",
|
|
154
|
+
"Pa" = "Pa",
|
|
155
|
+
"bar" = "bar",
|
|
156
|
+
"m_s" = "m/s",
|
|
157
|
+
"kg_h" = "kg/h",
|
|
158
|
+
"kg_s" = "kg/s",
|
|
159
|
+
"km_h" = "km/h",
|
|
160
|
+
"km_2" = "km\u00B2",
|
|
161
|
+
"m_2" = "m\u00B2",
|
|
162
|
+
"m_3" = "m\u00B3",
|
|
163
|
+
"m_s_2" = "m/s\u00B2"
|
|
164
|
+
}
|
|
165
|
+
export interface NumberFieldDefinition extends AbstractCustomFieldDefinition {
|
|
166
|
+
type: "NUMBER";
|
|
167
|
+
defaultValue?: number;
|
|
168
|
+
minimum?: number;
|
|
169
|
+
maximum?: number;
|
|
170
|
+
unitSi?: UnitSi;
|
|
171
|
+
unitUs?: UnitUs;
|
|
172
|
+
isInteger: boolean;
|
|
173
|
+
}
|
|
174
|
+
export declare type CustomFieldDefinition = BooleanFieldDefinition | NumberFieldDefinition | DateFieldDefinition | DropDownFieldDefinition | StringFieldDefinition | EmailFieldDefinition | PhoneNumberFieldDefinition | WebAddressFieldDefinition;
|
|
175
|
+
export interface AssetHomeExtensionManifest extends AbstractExtensionManifest {
|
|
176
|
+
type: "ASSET_HOME_EXTENSION";
|
|
177
|
+
/**
|
|
178
|
+
* Conditions for the asset home app to be shown.
|
|
179
|
+
* It is case insensitive so does not matter how you write the brand.
|
|
180
|
+
* brand: "trackunit" and brand: "Trackunit" will be the same.
|
|
181
|
+
*
|
|
182
|
+
* If both model and brand are used/filled out then asset needs to match both model and brand.
|
|
183
|
+
* If only brand or model is used/filled out then the asset needs to match the filled out property.
|
|
184
|
+
**/
|
|
185
|
+
conditions?: {
|
|
186
|
+
model?: string[] | string;
|
|
187
|
+
brand?: string[] | string;
|
|
188
|
+
};
|
|
189
|
+
menuItem: {
|
|
190
|
+
name: string;
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
export interface FleetExtensionManifest extends AbstractExtensionManifest {
|
|
194
|
+
type: "FLEET_EXTENSION";
|
|
195
|
+
/**
|
|
196
|
+
* Conditions for the asset home app to be shown.
|
|
197
|
+
* It is case insensitive so does not matter how you write the brand.
|
|
198
|
+
* brand: "trackunit" and brand: "Trackunit" will be the same.
|
|
199
|
+
*
|
|
200
|
+
* If both model and brand are used/filled out then asset needs to match both model and brand.
|
|
201
|
+
* If only brand or model is used/filled out then the asset needs to match the filled out property.
|
|
202
|
+
**/
|
|
203
|
+
conditions?: {
|
|
204
|
+
model?: string[] | string;
|
|
205
|
+
brand?: string[] | string;
|
|
206
|
+
};
|
|
207
|
+
menuItem: {
|
|
208
|
+
name: string;
|
|
209
|
+
icon: string;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
export interface ReportExtensionManifest extends AbstractExtensionManifest {
|
|
213
|
+
type: "REPORT_EXTENSION";
|
|
214
|
+
}
|
|
215
|
+
export declare type IrisAppExtension = AssetHomeExtensionManifest | FleetExtensionManifest | ReportExtensionManifest;
|
|
216
|
+
export interface Marketplace {
|
|
217
|
+
/**
|
|
218
|
+
* Name used for the marketplace.
|
|
219
|
+
*/
|
|
220
|
+
name: string;
|
|
221
|
+
/**
|
|
222
|
+
* Description used for the marketplace.
|
|
223
|
+
*/
|
|
224
|
+
description: string;
|
|
225
|
+
/**
|
|
226
|
+
* Tags used for describing the marketplace.
|
|
227
|
+
*/
|
|
228
|
+
tags: string[];
|
|
229
|
+
/**
|
|
230
|
+
* Defines what subscription packages the Tile is available at.
|
|
231
|
+
*/
|
|
232
|
+
allowForPackage: SubscriptionPackage[];
|
|
233
|
+
/**
|
|
234
|
+
* Homepage of the company building the app for the marketplace.
|
|
235
|
+
*/
|
|
236
|
+
homePageUrl?: string;
|
|
237
|
+
/**
|
|
238
|
+
* The direct support page for this app.
|
|
239
|
+
*/
|
|
240
|
+
supportUrl?: string;
|
|
241
|
+
}
|
|
242
|
+
export declare type SubscriptionPackage = "VIEW" | "COLLECT" | "INSIGHT";
|
|
243
|
+
export declare type IrisAppExtensionType = "REPORT_EXTENSION" | "FLEET_EXTENSION" | "ASSET_HOME_EXTENSION";
|
|
244
|
+
interface Dependencies {
|
|
245
|
+
[packageName: string]: string;
|
|
246
|
+
}
|
|
247
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnitSi = exports.UnitUs = void 0;
|
|
4
|
+
var UnitUs;
|
|
5
|
+
(function (UnitUs) {
|
|
6
|
+
UnitUs["mi"] = "mi";
|
|
7
|
+
UnitUs["yd"] = "yd";
|
|
8
|
+
UnitUs["ft"] = "ft";
|
|
9
|
+
UnitUs["in"] = "in";
|
|
10
|
+
UnitUs["ac"] = "ac";
|
|
11
|
+
UnitUs["ha"] = "ha";
|
|
12
|
+
UnitUs["ft_2"] = "ft\u00B2";
|
|
13
|
+
UnitUs["gal"] = "gal";
|
|
14
|
+
UnitUs["ft_3"] = "ft\u00B3";
|
|
15
|
+
UnitUs["ton_us"] = "ton_us";
|
|
16
|
+
UnitUs["lb"] = "lb";
|
|
17
|
+
UnitUs["oz"] = "oz";
|
|
18
|
+
UnitUs["mph"] = "mph";
|
|
19
|
+
UnitUs["lb_h"] = "lb/h";
|
|
20
|
+
UnitUs["lb_s"] = "lb/s";
|
|
21
|
+
})(UnitUs = exports.UnitUs || (exports.UnitUs = {}));
|
|
22
|
+
var UnitSi;
|
|
23
|
+
(function (UnitSi) {
|
|
24
|
+
UnitSi["km"] = "km";
|
|
25
|
+
UnitSi["m"] = "m";
|
|
26
|
+
UnitSi["cm"] = "cm";
|
|
27
|
+
UnitSi["mm"] = "mm";
|
|
28
|
+
UnitSi["l"] = "l";
|
|
29
|
+
UnitSi["kg"] = "kg";
|
|
30
|
+
UnitSi["g"] = "g";
|
|
31
|
+
UnitSi["ton"] = "ton";
|
|
32
|
+
UnitSi["N"] = "N";
|
|
33
|
+
UnitSi["kW"] = "kW";
|
|
34
|
+
UnitSi["W"] = "W";
|
|
35
|
+
UnitSi["kWh"] = "kWh";
|
|
36
|
+
UnitSi["kPa"] = "kPa";
|
|
37
|
+
UnitSi["Pa"] = "Pa";
|
|
38
|
+
UnitSi["bar"] = "bar";
|
|
39
|
+
UnitSi["m_s"] = "m/s";
|
|
40
|
+
UnitSi["kg_h"] = "kg/h";
|
|
41
|
+
UnitSi["kg_s"] = "kg/s";
|
|
42
|
+
UnitSi["km_h"] = "km/h";
|
|
43
|
+
UnitSi["km_2"] = "km\u00B2";
|
|
44
|
+
UnitSi["m_2"] = "m\u00B2";
|
|
45
|
+
UnitSi["m_3"] = "m\u00B3";
|
|
46
|
+
UnitSi["m_s_2"] = "m/s\u00B2";
|
|
47
|
+
})(UnitSi = exports.UnitSi || (exports.UnitSi = {}));
|
|
48
|
+
//# sourceMappingURL=irisAppManifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"irisAppManifest.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppManifest.ts"],"names":[],"mappings":";;;AAuJA,IAAY,MAgBX;AAhBD,WAAY,MAAM;IAChB,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,2BAAc,CAAA;IACd,qBAAa,CAAA;IACb,2BAAc,CAAA;IACd,2BAAmB,CAAA;IACnB,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,qBAAa,CAAA;IACb,uBAAe,CAAA;IACf,uBAAe,CAAA;AACjB,CAAC,EAhBW,MAAM,GAAN,cAAM,KAAN,cAAM,QAgBjB;AAED,IAAY,MAwBX;AAxBD,WAAY,MAAM;IAChB,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,mBAAW,CAAA;IACX,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,qBAAa,CAAA;IACb,iBAAS,CAAA;IACT,mBAAW,CAAA;IACX,iBAAS,CAAA;IACT,qBAAa,CAAA;IACb,qBAAa,CAAA;IACb,mBAAW,CAAA;IACX,qBAAa,CAAA;IACb,qBAAa,CAAA;IACb,uBAAe,CAAA;IACf,uBAAe,CAAA;IACf,uBAAe,CAAA;IACf,2BAAc,CAAA;IACd,yBAAY,CAAA;IACZ,yBAAY,CAAA;IACZ,6BAAgB,CAAA;AAClB,CAAC,EAxBW,MAAM,GAAN,cAAM,KAAN,cAAM,QAwBjB","sourcesContent":["export interface IrisAppManifest {\n /**\n * A spec version for the manifest.\n * This should not be changed manually.\n */\n specVersion: \"1.0\";\n /**\n * The name of the exposed module from module federation build into the remoteEntry.js.\n */\n moduleFederationName: string;\n /**\n * Should this be enabled by default.\n */\n enabledByDefault?: boolean;\n /**\n * A list of any external domains that the Tile needs to communicate with.\n */\n validDomains: string[];\n /**\n * A list of any account ids that can enable this Tile, or empty array if available for all customers.\n */\n validForAccountIds: \"ALL_ACCOUNTS\" | string[];\n /**\n * A configuration object for the Marketplace entry\n */\n marketplace: Marketplace;\n /**\n * A full list of runtime dependencies for the Tile.\n * Used for performance optimization and security scans.\n */\n dependencies: Dependencies;\n\n /**\n * A full list of dev dependencies for the Tile.\n * Used for security scans.\n */\n devDependencies: Dependencies;\n\n /**\n * A list of extensions to the UI that this app manifest exposes\n */\n extensions: IrisAppExtension[];\n\n /**\n * A list of custom field definitions.\n */\n customFieldDefinitions?: CustomFieldDefinition[];\n}\nexport interface AbstractExtensionManifest {\n /** The id of the app extension, will be part of the URL in the manager */\n id: string;\n\n /**\n * The path to the main entry point for the extension.\n * @default \"index.tsx\"\n */\n main?: string;\n\n /**\n * The relative path from the NX workspace to this projects source Root.\n */\n sourceRoot: string;\n\n /** The type of the app extension */\n type: IrisAppExtensionType;\n}\n\nexport declare type CustomFieldDefinitionType =\n | \"STRING\"\n | \"NUMBER\"\n | \"DATE\"\n | \"BOOLEAN\"\n | \"DROPDOWN\"\n | \"EMAIL\"\n | \"PHONE_NUMBER\"\n | \"WEB_ADDRESS\";\n\nexport declare type EntityType = \"ASSET\";\n\nexport interface AbstractCustomFieldDefinition {\n /**\n * The key is the name you use to get the custom field.\n */\n key: string;\n\n /**\n * The type of the entity to attach this custom field on.\n */\n entityType: EntityType;\n\n /**\n * The human readable translation of the key. So what the end customer will see.\n */\n title: string;\n\n /**\n * Should this be visible in the generic UI in Manager.\n */\n uiVisible: boolean;\n\n /**\n * Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.\n */\n uiEditable: boolean;\n\n /**\n * The type of this custom field definition\n */\n type: CustomFieldDefinitionType;\n}\n\nexport interface StringFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING\";\n minimumLength?: number;\n maximumLength?: number;\n pattern?: string;\n defaultValue?: string;\n}\n\nexport interface EmailFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"EMAIL\";\n defaultValue?: string;\n}\n\nexport interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"WEB_ADDRESS\";\n defaultValue?: string;\n}\n\nexport interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"PHONE_NUMBER\";\n defaultValue?: string;\n}\nexport interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"BOOLEAN\";\n defaultValue?: boolean;\n}\n\nexport interface DateFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DATE\";\n defaultValue?: string;\n}\n\nexport interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DROPDOWN\";\n defaultValue?: string | string[];\n multiSelect?: boolean;\n allValues?: string[];\n dropDownValueReplacements: Record<string, string>;\n}\n\nexport enum UnitUs {\n \"mi\" = \"mi\",\n \"yd\" = \"yd\",\n \"ft\" = \"ft\",\n \"in\" = \"in\",\n \"ac\" = \"ac\",\n \"ha\" = \"ha\",\n \"ft_2\" = \"ft²\",\n \"gal\" = \"gal\",\n \"ft_3\" = \"ft³\",\n \"ton_us\" = \"ton_us\",\n \"lb\" = \"lb\",\n \"oz\" = \"oz\",\n \"mph\" = \"mph\",\n \"lb_h\" = \"lb/h\",\n \"lb_s\" = \"lb/s\",\n}\n\nexport enum UnitSi {\n \"km\" = \"km\",\n \"m\" = \"m\",\n \"cm\" = \"cm\",\n \"mm\" = \"mm\",\n \"l\" = \"l\",\n \"kg\" = \"kg\",\n \"g\" = \"g\",\n \"ton\" = \"ton\",\n \"N\" = \"N\",\n \"kW\" = \"kW\",\n \"W\" = \"W\",\n \"kWh\" = \"kWh\",\n \"kPa\" = \"kPa\",\n \"Pa\" = \"Pa\",\n \"bar\" = \"bar\",\n \"m_s\" = \"m/s\",\n \"kg_h\" = \"kg/h\",\n \"kg_s\" = \"kg/s\",\n \"km_h\" = \"km/h\",\n \"km_2\" = \"km²\",\n \"m_2\" = \"m²\",\n \"m_3\" = \"m³\",\n \"m_s_2\" = \"m/s²\",\n}\nexport interface NumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n defaultValue?: number;\n\n minimum?: number;\n maximum?: number;\n\n unitSi?: UnitSi;\n unitUs?: UnitUs;\n\n isInteger: boolean;\n}\n\nexport declare type CustomFieldDefinition =\n | BooleanFieldDefinition\n | NumberFieldDefinition\n | DateFieldDefinition\n | DropDownFieldDefinition\n | StringFieldDefinition\n | EmailFieldDefinition\n | PhoneNumberFieldDefinition\n | WebAddressFieldDefinition;\n\nexport interface AssetHomeExtensionManifest extends AbstractExtensionManifest {\n type: \"ASSET_HOME_EXTENSION\";\n /**\n * Conditions for the asset home app to be shown.\n * It is case insensitive so does not matter how you write the brand.\n * brand: \"trackunit\" and brand: \"Trackunit\" will be the same.\n *\n * If both model and brand are used/filled out then asset needs to match both model and brand.\n * If only brand or model is used/filled out then the asset needs to match the filled out property.\n **/\n conditions?: {\n model?: string[] | string;\n brand?: string[] | string;\n };\n menuItem: {\n name: string;\n };\n}\nexport interface FleetExtensionManifest extends AbstractExtensionManifest {\n type: \"FLEET_EXTENSION\";\n\n /**\n * Conditions for the asset home app to be shown.\n * It is case insensitive so does not matter how you write the brand.\n * brand: \"trackunit\" and brand: \"Trackunit\" will be the same.\n *\n * If both model and brand are used/filled out then asset needs to match both model and brand.\n * If only brand or model is used/filled out then the asset needs to match the filled out property.\n **/\n conditions?: {\n model?: string[] | string;\n brand?: string[] | string;\n };\n menuItem: {\n name: string;\n icon: string;\n };\n}\nexport interface ReportExtensionManifest extends AbstractExtensionManifest {\n type: \"REPORT_EXTENSION\";\n}\nexport declare type IrisAppExtension = AssetHomeExtensionManifest | FleetExtensionManifest | ReportExtensionManifest;\nexport interface Marketplace {\n /**\n * Name used for the marketplace.\n */\n name: string;\n /**\n * Description used for the marketplace.\n */\n description: string;\n /**\n * Tags used for describing the marketplace.\n */\n tags: string[];\n /**\n * Defines what subscription packages the Tile is available at.\n */\n allowForPackage: SubscriptionPackage[];\n /**\n * Homepage of the company building the app for the marketplace.\n */\n homePageUrl?: string;\n /**\n * The direct support page for this app.\n */\n supportUrl?: string;\n}\nexport declare type SubscriptionPackage = \"VIEW\" | \"COLLECT\" | \"INSIGHT\";\nexport declare type IrisAppExtensionType = \"REPORT_EXTENSION\" | \"FLEET_EXTENSION\" | \"ASSET_HOME_EXTENSION\";\ninterface Dependencies {\n [packageName: string]: string;\n}\nexport {};\n"]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
|
|
3
|
+
*/
|
|
4
|
+
export declare type Shared = (SharedItem | SharedObject)[] | SharedObject;
|
|
5
|
+
/**
|
|
6
|
+
* A module that should be shared in the share scope.
|
|
7
|
+
*/
|
|
8
|
+
export declare type SharedItem = string;
|
|
9
|
+
/**
|
|
10
|
+
* Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
|
|
11
|
+
*/
|
|
12
|
+
export interface SharedObject {
|
|
13
|
+
/**
|
|
14
|
+
* Modules that should be shared in the share scope.
|
|
15
|
+
*/
|
|
16
|
+
[k: string]: SharedConfig | SharedItem;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Advanced configuration for modules that should be shared in the share scope.
|
|
20
|
+
*/
|
|
21
|
+
export interface SharedConfig {
|
|
22
|
+
/**
|
|
23
|
+
* Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
|
|
24
|
+
*/
|
|
25
|
+
eager?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
|
|
28
|
+
*/
|
|
29
|
+
import?: false | SharedItem;
|
|
30
|
+
/**
|
|
31
|
+
* Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
|
|
32
|
+
*/
|
|
33
|
+
packageName?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Version requirement from module in share scope.
|
|
36
|
+
*/
|
|
37
|
+
requiredVersion?: false | string;
|
|
38
|
+
/**
|
|
39
|
+
* Module is looked up under this key from the share scope.
|
|
40
|
+
*/
|
|
41
|
+
shareKey?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Share scope name.
|
|
44
|
+
*/
|
|
45
|
+
shareScope?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Allow only a single version of the shared module in share scope (disabled by default).
|
|
48
|
+
*/
|
|
49
|
+
singleton?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
|
|
52
|
+
*/
|
|
53
|
+
strictVersion?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Version of the provided module. Will replace lower matching versions, but not higher.
|
|
56
|
+
*/
|
|
57
|
+
version?: false | string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
|
|
61
|
+
*/
|
|
62
|
+
export declare type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;
|
|
63
|
+
/**
|
|
64
|
+
* Module that should be exposed by this container.
|
|
65
|
+
*/
|
|
66
|
+
export declare type ExposesItem = string;
|
|
67
|
+
/**
|
|
68
|
+
* Modules that should be exposed by this container.
|
|
69
|
+
*/
|
|
70
|
+
export declare type ExposesItems = ExposesItem[];
|
|
71
|
+
/**
|
|
72
|
+
* Modules that should be exposed by this container. Property names are used as public paths.
|
|
73
|
+
*/
|
|
74
|
+
export interface ExposesObject {
|
|
75
|
+
/**
|
|
76
|
+
* Modules that should be exposed by this container.
|
|
77
|
+
*/
|
|
78
|
+
[k: string]: ExposesConfig | ExposesItem | ExposesItems;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Advanced configuration for modules that should be exposed by this container.
|
|
82
|
+
*/
|
|
83
|
+
export interface ExposesConfig {
|
|
84
|
+
/**
|
|
85
|
+
* Request to a module that should be exposed by this container.
|
|
86
|
+
*/
|
|
87
|
+
import: ExposesItem | ExposesItems;
|
|
88
|
+
/**
|
|
89
|
+
* Custom chunk name for the exposed module.
|
|
90
|
+
*/
|
|
91
|
+
name?: string;
|
|
92
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Source: https://github.com/webpack/webpack/blob/1c9b1b7a2136d4d9a27352fdbdf389490cca6460/declarations/plugins/container/ModuleFederationPlugin.d.ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
//# sourceMappingURL=modulefederation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modulefederation.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/modulefederation.ts"],"names":[],"mappings":";AAAA,sJAAsJ","sourcesContent":["// Source: https://github.com/webpack/webpack/blob/1c9b1b7a2136d4d9a27352fdbdf389490cca6460/declarations/plugins/container/ModuleFederationPlugin.d.ts\n\n/**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\nexport type Shared = (SharedItem | SharedObject)[] | SharedObject;\n\n/**\n * A module that should be shared in the share scope.\n */\nexport type SharedItem = string;\n\n/**\n * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.\n */\nexport interface SharedObject {\n /**\n * Modules that should be shared in the share scope.\n */\n [k: string]: SharedConfig | SharedItem;\n}\n\n/**\n * Advanced configuration for modules that should be shared in the share scope.\n */\nexport interface SharedConfig {\n /**\n * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.\n */\n eager?: boolean;\n /**\n * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.\n */\n import?: false | SharedItem;\n /**\n * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.\n */\n packageName?: string;\n /**\n * Version requirement from module in share scope.\n */\n requiredVersion?: false | string;\n /**\n * Module is looked up under this key from the share scope.\n */\n shareKey?: string;\n /**\n * Share scope name.\n */\n shareScope?: string;\n /**\n * Allow only a single version of the shared module in share scope (disabled by default).\n */\n singleton?: boolean;\n /**\n * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).\n */\n strictVersion?: boolean;\n /**\n * Version of the provided module. Will replace lower matching versions, but not higher.\n */\n version?: false | string;\n}\n\n/**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\nexport type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;\n/**\n * Module that should be exposed by this container.\n */\nexport type ExposesItem = string;\n/**\n * Modules that should be exposed by this container.\n */\nexport type ExposesItems = ExposesItem[];\n\n/**\n * Modules that should be exposed by this container. Property names are used as public paths.\n */\nexport interface ExposesObject {\n /**\n * Modules that should be exposed by this container.\n */\n [k: string]: ExposesConfig | ExposesItem | ExposesItems;\n}\n/**\n * Advanced configuration for modules that should be exposed by this container.\n */\nexport interface ExposesConfig {\n /**\n * Request to a module that should be exposed by this container.\n */\n import: ExposesItem | ExposesItems;\n /**\n * Custom chunk name for the exposed module.\n */\n name?: string;\n}\n"]}
|