@omnia/fx-models 8.0.31-vnext → 8.0.32-vnext
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/ClientManifests.d.ts +9 -8
- package/ClientManifests.js +8 -0
- package/identities/Identity.d.ts +7 -2
- package/identities/Identity.js +15 -0
- package/internal-do-not-import-from-here/shared/models/Equals.d.ts +3 -0
- package/internal-do-not-import-from-here/shared/models/Equals.js +11 -0
- package/internal-do-not-import-from-here/shared/models/Guid.d.ts +8 -2
- package/internal-do-not-import-from-here/shared/models/Guid.js +23 -2
- package/internal-do-not-import-from-here/shared/models/index.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/index.js +1 -0
- package/package.json +1 -1
package/ClientManifests.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { WebComponentDefinition } from "./ComponentComposer";
|
|
|
3
3
|
import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
|
4
4
|
import { OmniaNamedModel } from ".";
|
|
5
5
|
export interface OmniaManifests {
|
|
6
|
+
target: ClientManifestTargetTypes;
|
|
6
7
|
omniaServiceId: GuidValue;
|
|
7
8
|
webcomponent: Array<WebComponentBundleManifest>;
|
|
8
9
|
resource: Array<ResourcesBundleManifest>;
|
|
@@ -13,7 +14,12 @@ export interface OmniaManifests {
|
|
|
13
14
|
export interface OmniaServiceManifests {
|
|
14
15
|
[omniaServiceId: string]: OmniaManifests;
|
|
15
16
|
}
|
|
16
|
-
export
|
|
17
|
+
export declare enum ClientManifestTargetTypes {
|
|
18
|
+
Public = 1,
|
|
19
|
+
Admin = 2,
|
|
20
|
+
Editor = 4,
|
|
21
|
+
Docs = 8
|
|
22
|
+
}
|
|
17
23
|
export interface ClientManifest {
|
|
18
24
|
manifestType: ClientManifestTypes;
|
|
19
25
|
target?: ClientManifestTargetTypes;
|
|
@@ -25,11 +31,11 @@ export interface BundleIdentity {
|
|
|
25
31
|
/**
|
|
26
32
|
The unique id of the manifest, this will be the id of the resources added.
|
|
27
33
|
*/
|
|
28
|
-
resourceId:
|
|
34
|
+
resourceId: GuidValue;
|
|
29
35
|
/**
|
|
30
36
|
The unique id of the omnia service to which the resource id belong.
|
|
31
37
|
*/
|
|
32
|
-
omniaServiceId?:
|
|
38
|
+
omniaServiceId?: GuidValue;
|
|
33
39
|
}
|
|
34
40
|
export interface BundleManifest extends ClientManifest, BundleIdentity {
|
|
35
41
|
/**
|
|
@@ -45,11 +51,6 @@ export type ClientManifestByTargetCollection = {
|
|
|
45
51
|
target: ClientManifestTargetTypes;
|
|
46
52
|
omniaServiceId: GuidValue;
|
|
47
53
|
} | ClientManifestByTypeCollection;
|
|
48
|
-
} & {
|
|
49
|
-
public: {
|
|
50
|
-
target: string;
|
|
51
|
-
omniaServiceId: GuidValue;
|
|
52
|
-
} | ClientManifestByTypeCollection;
|
|
53
54
|
};
|
|
54
55
|
export interface ManifestLoadResult {
|
|
55
56
|
manifest: LoadableBundleManifest;
|
package/ClientManifests.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientManifestTargetTypes = void 0;
|
|
4
|
+
var ClientManifestTargetTypes;
|
|
5
|
+
(function (ClientManifestTargetTypes) {
|
|
6
|
+
ClientManifestTargetTypes[ClientManifestTargetTypes["Public"] = 1] = "Public";
|
|
7
|
+
ClientManifestTargetTypes[ClientManifestTargetTypes["Admin"] = 2] = "Admin";
|
|
8
|
+
ClientManifestTargetTypes[ClientManifestTargetTypes["Editor"] = 4] = "Editor";
|
|
9
|
+
ClientManifestTargetTypes[ClientManifestTargetTypes["Docs"] = 8] = "Docs";
|
|
10
|
+
})(ClientManifestTargetTypes = exports.ClientManifestTargetTypes || (exports.ClientManifestTargetTypes = {}));
|
package/identities/Identity.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
|
1
|
+
import { GuidValue, IEquals } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
|
2
2
|
import { PropertyValueBinding } from "../properties";
|
|
3
3
|
import { IdentityTypes } from "./IdentityTypes";
|
|
4
4
|
export interface IResolvedIdentity {
|
|
@@ -8,10 +8,15 @@ export interface IResolvedIdentity {
|
|
|
8
8
|
propertyValues: PropertyValueBinding<any>[];
|
|
9
9
|
toIdString?: () => string;
|
|
10
10
|
}
|
|
11
|
-
export declare abstract class Identity {
|
|
11
|
+
export declare abstract class Identity implements IEquals<{
|
|
12
|
+
identity(value: Identity): boolean;
|
|
13
|
+
}> {
|
|
12
14
|
readonly id: GuidValue;
|
|
13
15
|
abstract readonly type: IdentityTypes;
|
|
14
16
|
constructor(id: GuidValue);
|
|
17
|
+
equals: {
|
|
18
|
+
identity(value: Identity): boolean;
|
|
19
|
+
};
|
|
15
20
|
toIdString(): string;
|
|
16
21
|
static parse(identity: Identity | IResolvedIdentity | string): Identity;
|
|
17
22
|
static isValid(identity: Identity): boolean;
|
package/identities/Identity.js
CHANGED
|
@@ -6,6 +6,11 @@ const IdentityTypes_1 = require("./IdentityTypes");
|
|
|
6
6
|
class Identity {
|
|
7
7
|
constructor(id) {
|
|
8
8
|
this.id = id;
|
|
9
|
+
this.equals = {
|
|
10
|
+
identity(value) {
|
|
11
|
+
return this.toIdString() === value.toIdString();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
9
14
|
}
|
|
10
15
|
toIdString() {
|
|
11
16
|
return Identity.getIdAsString(this.id, this.type);
|
|
@@ -92,4 +97,14 @@ if (globalThis.omnia) {
|
|
|
92
97
|
configurable: false,
|
|
93
98
|
enumerable: false
|
|
94
99
|
});
|
|
100
|
+
Object.defineProperty(String.prototype["equals"], "identity", {
|
|
101
|
+
value: function () {
|
|
102
|
+
return function (value) {
|
|
103
|
+
return this.toIdString() === value.toIdString();
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
writable: false,
|
|
107
|
+
configurable: false,
|
|
108
|
+
enumerable: false
|
|
109
|
+
});
|
|
95
110
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const _equalsObject = {};
|
|
4
|
+
Object.defineProperty(String.prototype, "equals", {
|
|
5
|
+
value: function () {
|
|
6
|
+
return _equalsObject;
|
|
7
|
+
},
|
|
8
|
+
writable: false,
|
|
9
|
+
configurable: false,
|
|
10
|
+
enumerable: false
|
|
11
|
+
});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { IEquals } from "./Equals";
|
|
2
|
+
export interface GuidValue extends Partial<IEquals<{
|
|
3
|
+
guid(value: GuidValue): boolean;
|
|
4
|
+
}>> {
|
|
2
5
|
toString: () => string;
|
|
3
6
|
}
|
|
4
7
|
/**
|
|
@@ -6,10 +9,13 @@ export interface GuidValue {
|
|
|
6
9
|
*/
|
|
7
10
|
export declare class Guid implements GuidValue {
|
|
8
11
|
private static _empty;
|
|
12
|
+
private value;
|
|
13
|
+
equals: {
|
|
14
|
+
guid(value: GuidValue): boolean;
|
|
15
|
+
};
|
|
9
16
|
static newGuid(): GuidValue;
|
|
10
17
|
static get empty(): GuidValue;
|
|
11
18
|
static isValid(guid: string | GuidValue): boolean;
|
|
12
|
-
private value;
|
|
13
19
|
constructor(guid: string);
|
|
14
20
|
toString(): string;
|
|
15
21
|
toJSON: () => string;
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
//}
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Guid = void 0;
|
|
7
|
+
// export interface GuidValue {
|
|
8
|
+
// toString: () => string;
|
|
9
|
+
// }
|
|
7
10
|
/**
|
|
8
11
|
* Class to create a guid
|
|
9
12
|
*/
|
|
@@ -26,7 +29,12 @@ class Guid {
|
|
|
26
29
|
return validRegex.test(guid.toString());
|
|
27
30
|
}
|
|
28
31
|
constructor(guid) {
|
|
29
|
-
this.value =
|
|
32
|
+
this.value = "";
|
|
33
|
+
this.equals = {
|
|
34
|
+
guid(value) {
|
|
35
|
+
return this.toString() === value.toString();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
30
38
|
//We serialize as string value
|
|
31
39
|
this.toJSON = () => {
|
|
32
40
|
return this.value.toLowerCase();
|
|
@@ -47,5 +55,18 @@ class Guid {
|
|
|
47
55
|
return this.value.toLowerCase();
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
|
-
Guid._empty = "00000000-0000-0000-0000-000000000000";
|
|
58
|
+
Guid._empty = new Guid("00000000-0000-0000-0000-000000000000");
|
|
51
59
|
exports.Guid = Guid;
|
|
60
|
+
// only add extension methods when running in browser, not in node.js
|
|
61
|
+
if (globalThis.omnia) {
|
|
62
|
+
Object.defineProperty(String.prototype["equals"], "guid", {
|
|
63
|
+
value: function () {
|
|
64
|
+
return function (value) {
|
|
65
|
+
return this.toString() === value.toString();
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
writable: false,
|
|
69
|
+
configurable: false,
|
|
70
|
+
enumerable: false
|
|
71
|
+
});
|
|
72
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
//! <omnia-transform-resource path="9a75501c-254b-46d1-9010-7b13681e06f4" />
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./Equals"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./Guid"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./Broadcasting"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./Topic"), exports);
|