@omnia/fx-models 8.0.30-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.
@@ -1,6 +1,6 @@
1
1
  import { TextAlignment, BorderPositions, IconPositions, IconSizes } from "./Enums";
2
2
  import { IIcon } from "./Icon";
3
- import { SpacingSettings } from "./SpacingSetting";
3
+ import { SpacingSettings } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
4
4
  import { BusinessProfileProperty } from "./BusinessProfile";
5
5
  import { ShapeDividerSettings } from "./ShapeDividerSettingsModel";
6
6
  export declare class BusinessProfileBlockTitleSettings extends BusinessProfileProperty implements BlockTitleSettings {
@@ -3,6 +3,8 @@ 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;
7
+ omniaServiceId: GuidValue;
6
8
  webcomponent: Array<WebComponentBundleManifest>;
7
9
  resource: Array<ResourcesBundleManifest>;
8
10
  groupedResouresAndComponents: Array<GroupedBundleManifest>;
@@ -12,8 +14,15 @@ export interface OmniaManifests {
12
14
  export interface OmniaServiceManifests {
13
15
  [omniaServiceId: string]: OmniaManifests;
14
16
  }
17
+ export declare enum ClientManifestTargetTypes {
18
+ Public = 1,
19
+ Admin = 2,
20
+ Editor = 4,
21
+ Docs = 8
22
+ }
15
23
  export interface ClientManifest {
16
24
  manifestType: ClientManifestTypes;
25
+ target?: ClientManifestTargetTypes;
17
26
  }
18
27
  export interface RegiterApiConfiguration {
19
28
  disableAutoLoadingManifests?: boolean;
@@ -22,11 +31,11 @@ export interface BundleIdentity {
22
31
  /**
23
32
  The unique id of the manifest, this will be the id of the resources added.
24
33
  */
25
- resourceId: string;
34
+ resourceId: GuidValue;
26
35
  /**
27
36
  The unique id of the omnia service to which the resource id belong.
28
37
  */
29
- omniaServiceId: string;
38
+ omniaServiceId?: GuidValue;
30
39
  }
31
40
  export interface BundleManifest extends ClientManifest, BundleIdentity {
32
41
  /**
@@ -37,6 +46,12 @@ export interface BundleManifest extends ClientManifest, BundleIdentity {
37
46
  export interface ClientManifestByTypeCollection {
38
47
  [manifestType: string]: Array<ClientManifest>;
39
48
  }
49
+ export type ClientManifestByTargetCollection = {
50
+ [target in ClientManifestTargetTypes]: {
51
+ target: ClientManifestTargetTypes;
52
+ omniaServiceId: GuidValue;
53
+ } | ClientManifestByTypeCollection;
54
+ };
40
55
  export interface ManifestLoadResult {
41
56
  manifest: LoadableBundleManifest;
42
57
  status: ManifestLoadStatus;
@@ -45,7 +60,7 @@ export interface LoadableBundleManifest extends BundleManifest, ManifestSupporti
45
60
  version: {
46
61
  [bundleType: string]: string;
47
62
  };
48
- dependingOnManifests: Array<BundleIdentity>;
63
+ dependingOnManifests?: Array<BundleIdentity>;
49
64
  availableBundleTargetTypes: Array<BundleTargetTypes>;
50
65
  }
51
66
  export interface ApiBundleManifest {
@@ -72,7 +87,7 @@ export interface WebComponentBundleManifest extends LoadableBundleManifest, ApiB
72
87
  e.g. use project as prefix myuniqueprojectname-componentName.
73
88
  i.e. <myuniqueprojectname-componentName></myuniqueprojectname-componentName> */
74
89
  elementName: string;
75
- definition: WebComponentDefinition;
90
+ definition?: WebComponentDefinition;
76
91
  }
77
92
  export interface GroupedBundleManifest extends LoadableBundleManifest, SecurityBundleManifest {
78
93
  /** The manifest id's in this group */
@@ -118,7 +133,7 @@ export interface ClientResolvableLoadRule {
118
133
  resolver?: () => Promise<boolean>;
119
134
  }
120
135
  export interface ManifestSupportingCombinedLoadRules {
121
- combinedLoadRules: Array<ClientResolvableLoadRule>;
136
+ combinedLoadRules?: Array<ClientResolvableLoadRule>;
122
137
  }
123
138
  /**
124
139
  Rules applied clientside
@@ -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/Exposes.d.ts CHANGED
@@ -35,7 +35,6 @@ export * from "./Store";
35
35
  export * from "./SiteLogo";
36
36
  export * from "./PermissionInputSettings";
37
37
  export * from "./Security";
38
- export * from "./SpacingSetting";
39
38
  export * from "./SecurityContextParamRegistrationHandler";
40
39
  export * from "./TargetingProperty";
41
40
  export * from "./TimeZone";
package/Exposes.js CHANGED
@@ -41,7 +41,6 @@ tslib_1.__exportStar(require("./Store"), exports);
41
41
  tslib_1.__exportStar(require("./SiteLogo"), exports);
42
42
  tslib_1.__exportStar(require("./PermissionInputSettings"), exports);
43
43
  tslib_1.__exportStar(require("./Security"), exports);
44
- tslib_1.__exportStar(require("./SpacingSetting"), exports);
45
44
  tslib_1.__exportStar(require("./SecurityContextParamRegistrationHandler"), exports);
46
45
  tslib_1.__exportStar(require("./TargetingProperty"), exports);
47
46
  tslib_1.__exportStar(require("./TimeZone"), exports);
@@ -3,7 +3,7 @@ import { EnterprisePropertyDefinition } from "../enterprise-properties/Enterpris
3
3
  import { AppInstanceScopedQueryTypes, PropertyIndexedType } from "../Enums";
4
4
  import { MultilingualString } from "../MultilingualString";
5
5
  import { OrderBy, RollupEnums, RollupFilter } from "../RollupQuery";
6
- import { SpacingSettings } from "../SpacingSetting";
6
+ import { SpacingSettings } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
7
7
  import { AppInstance, AppInstanceInfo, AppInstanceInfoUser, AppInstanceTemplateFilter } from "./App";
8
8
  export declare class AppInstanceRollupConstants {
9
9
  static AppInstanceProperties: {
@@ -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;
@@ -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,3 @@
1
+ export interface IEquals<T extends Object> {
2
+ equals: T;
3
+ }
@@ -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
- export interface GuidValue {
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 = Guid._empty;
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
+ }
@@ -1,3 +1,4 @@
1
+ export * from "./Equals";
1
2
  export * from "./Guid";
2
3
  export * from "./Broadcasting";
3
4
  export * from "./Topic";
@@ -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);
@@ -1,5 +1,5 @@
1
- import { SpacingSettings } from "@omnia/fx-models";
2
1
  import { Guid } from "../Guid";
2
+ import { SpacingSettings } from "./SpacingSetting";
3
3
  import { ColorSchemaType, ColorSchemaTypes } from "./ThemeDefinitionV2";
4
4
  import { TypographyDefinition } from "./TypographyDefinition";
5
5
  export interface BoxDimensions extends SpacingSettings {
@@ -13,11 +13,12 @@ export interface BluePrintDefinitions {
13
13
  variant2: BlueprintDefinition;
14
14
  variant3: BlueprintDefinition;
15
15
  }
16
- export type WebBlueprintDefintionType = "button" | "block" | "typography";
16
+ export type WebBlueprintDefintionType = "button" | "block" | "typography" | "searchbox";
17
17
  export declare enum WebBlueprintDefintionTypes {
18
18
  button = "button",
19
19
  block = "block",
20
- typography = "typography"
20
+ typography = "typography",
21
+ searchbox = "searchbox"
21
22
  }
22
23
  export type VelcronBlueprintDefintionType = "button" | "typography";
23
24
  export declare enum VelcronBlueprintDefintionTypes {
@@ -29,6 +30,7 @@ export interface BlueprintItemDefinition {
29
30
  type: any;
30
31
  }
31
32
  export interface BlockBlueprint extends BlueprintItemDefinition {
33
+ type: "block";
32
34
  header?: {
33
35
  definitionId: Guid;
34
36
  };
@@ -41,8 +43,14 @@ export interface BlockBlueprint extends BlueprintItemDefinition {
41
43
  };
42
44
  }
43
45
  export interface TypographyBlueprint extends BlueprintItemDefinition {
46
+ type: "typography";
44
47
  definition: TypographyDefinition;
45
48
  }
49
+ export interface SearchBoxBlueprint extends BlueprintItemDefinition {
50
+ type: "searchbox";
51
+ borderRadius?: BoxDimensions;
52
+ variant?: "outlined" | "solo" | "regular" | "plain" | "underlined";
53
+ }
46
54
  export interface BlueprintDefinition {
47
55
  id: Guid;
48
56
  definitions: Array<BlueprintItemDefinition>;
@@ -6,6 +6,7 @@ var WebBlueprintDefintionTypes;
6
6
  WebBlueprintDefintionTypes["button"] = "button";
7
7
  WebBlueprintDefintionTypes["block"] = "block";
8
8
  WebBlueprintDefintionTypes["typography"] = "typography";
9
+ WebBlueprintDefintionTypes["searchbox"] = "searchbox";
9
10
  })(WebBlueprintDefintionTypes = exports.WebBlueprintDefintionTypes || (exports.WebBlueprintDefintionTypes = {}));
10
11
  var VelcronBlueprintDefintionTypes;
11
12
  (function (VelcronBlueprintDefintionTypes) {
@@ -3,3 +3,4 @@ export * from "./TypographyDefinition";
3
3
  export * from "./OmniaThemes";
4
4
  export * from "./UseThemeMethods";
5
5
  export * from "./BlueprintDefinition";
6
+ export * from "./SpacingSetting";
@@ -6,3 +6,4 @@ tslib_1.__exportStar(require("./TypographyDefinition"), exports);
6
6
  tslib_1.__exportStar(require("./OmniaThemes"), exports);
7
7
  tslib_1.__exportStar(require("./UseThemeMethods"), exports);
8
8
  tslib_1.__exportStar(require("./BlueprintDefinition"), exports);
9
+ tslib_1.__exportStar(require("./SpacingSetting"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.30-vnext",
4
+ "version": "8.0.32-vnext",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"