@omnia/fx-models 8.0.229-dev → 8.0.231-dev

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.
Files changed (46) hide show
  1. package/package.json +1 -1
  2. package/properties/PropertyValue.d.ts +1 -0
  3. package/properties/definitions/TermSetPropertyDefinition.d.ts +1 -1
  4. package/properties/definitions/TermSetPropertyDefinition.js +3 -3
  5. package/properties/values/BirthdayPropertyValue.d.ts +1 -1
  6. package/properties/values/BirthdayPropertyValue.js +3 -3
  7. package/properties/values/BooleanPropertyValue.d.ts +1 -1
  8. package/properties/values/BooleanPropertyValue.js +3 -3
  9. package/properties/values/BusinessProfilePropertyValue.d.ts +1 -0
  10. package/properties/values/BusinessProfilePropertyValue.js +3 -0
  11. package/properties/values/DatePropertyValue.d.ts +1 -4
  12. package/properties/values/DatePropertyValue.js +3 -3
  13. package/properties/values/DateTimePropertyValue.d.ts +1 -1
  14. package/properties/values/DateTimePropertyValue.js +3 -3
  15. package/properties/values/EmailPropertyValue.d.ts +1 -1
  16. package/properties/values/EmailPropertyValue.js +3 -3
  17. package/properties/values/HtmlPropertyValue.d.ts +1 -1
  18. package/properties/values/HtmlPropertyValue.js +3 -3
  19. package/properties/values/IdentityPropertyValue.d.ts +1 -1
  20. package/properties/values/IdentityPropertyValue.js +2 -2
  21. package/properties/values/ImagePropertyValue.d.ts +1 -1
  22. package/properties/values/ImagePropertyValue.js +3 -3
  23. package/properties/values/IntegerPropertyValue.d.ts +1 -1
  24. package/properties/values/IntegerPropertyValue.js +3 -3
  25. package/properties/values/LanguagePropertyValue.d.ts +1 -1
  26. package/properties/values/LanguagePropertyValue.js +3 -3
  27. package/properties/values/LinkPropertyValue.d.ts +1 -1
  28. package/properties/values/LinkPropertyValue.js +3 -3
  29. package/properties/values/MediaPropertyValue.d.ts +1 -0
  30. package/properties/values/MediaPropertyValue.js +3 -0
  31. package/properties/values/MultilineTextPropertyValue.d.ts +1 -0
  32. package/properties/values/MultilineTextPropertyValue.js +3 -0
  33. package/properties/values/MultilingualTextPropertyValue.d.ts +1 -0
  34. package/properties/values/MultilingualTextPropertyValue.js +3 -0
  35. package/properties/values/PhoneNumberPropertyValue.d.ts +1 -0
  36. package/properties/values/PhoneNumberPropertyValue.js +3 -0
  37. package/properties/values/TagsPropertyValue.d.ts +1 -1
  38. package/properties/values/TagsPropertyValue.js +3 -3
  39. package/properties/values/TextPropertyValue.d.ts +1 -1
  40. package/properties/values/TextPropertyValue.js +3 -3
  41. package/properties/values/TimePropertyValue.d.ts +1 -0
  42. package/properties/values/TimePropertyValue.js +3 -0
  43. package/properties/values/UserTypePropertyValue.d.ts +1 -0
  44. package/properties/values/UserTypePropertyValue.js +3 -0
  45. package/ux/LayoutEditorCanvas.d.ts +0 -7
  46. package/ux/LayoutEditorCanvas.js +1 -5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.229-dev",
4
+ "version": "8.0.231-dev",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -11,4 +11,5 @@ export declare abstract class PropertyValue {
11
11
  containValue?(other: PropertyValue): boolean;
12
12
  appendValue?(other: PropertyValue): PropertyValue;
13
13
  getValue(): any;
14
+ abstract isEmpty(): any;
14
15
  }
@@ -22,7 +22,7 @@ export declare class SharePointTermSetPropertyValue extends PropertyValue {
22
22
  constructor(termIds: guid[]);
23
23
  containValue(other: SharePointTermSetPropertyValue): boolean;
24
24
  appendValue(other: SharePointTermSetPropertyValue): SharePointTermSetPropertyValue;
25
- getValue: () => string[];
25
+ isEmpty(): boolean;
26
26
  }
27
27
  export declare class SharePointTermSetPropertyDefinition extends PropertyDefinition<SharePointTermSetPropertyValue, SharePointTermSetPropertyDisplaySettings, SharePointTermSetPropertyEditorSettings, SharePointTermSetPropertySetupSettings> {
28
28
  id: guid;
@@ -9,9 +9,6 @@ class SharePointTermSetPropertyValue extends PropertyValue_1.PropertyValue {
9
9
  constructor(termIds) {
10
10
  super();
11
11
  this.termIds = termIds;
12
- this.getValue = () => {
13
- return this.termIds.map(termId => termId.toString());
14
- };
15
12
  }
16
13
  containValue(other) {
17
14
  if (this?.termIds?.length == 0)
@@ -29,6 +26,9 @@ class SharePointTermSetPropertyValue extends PropertyValue_1.PropertyValue {
29
26
  });
30
27
  return new SharePointTermSetPropertyValue(termIds);
31
28
  }
29
+ isEmpty() {
30
+ return this?.termIds?.length == 0;
31
+ }
32
32
  }
33
33
  exports.SharePointTermSetPropertyValue = SharePointTermSetPropertyValue;
34
34
  class SharePointTermSetPropertyDefinition extends PropertyDefinition_1.PropertyDefinition {
@@ -3,5 +3,5 @@ export declare class BirthdayPropertyValue extends PropertyValue {
3
3
  timeZoneId: string;
4
4
  birthday: string;
5
5
  constructor(birthday: Date, timeZoneId: string);
6
- getValue: () => string;
6
+ isEmpty(): boolean;
7
7
  }
@@ -6,10 +6,10 @@ class BirthdayPropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(birthday, timeZoneId) {
7
7
  super();
8
8
  this.timeZoneId = timeZoneId;
9
- this.getValue = () => {
10
- return this.birthday;
11
- };
12
9
  this.birthday = birthday.toJSON();
13
10
  }
11
+ isEmpty() {
12
+ return !this.birthday;
13
+ }
14
14
  }
15
15
  exports.BirthdayPropertyValue = BirthdayPropertyValue;
@@ -2,5 +2,5 @@ import { PropertyValue } from "../PropertyValue";
2
2
  export declare class BooleanPropertyValue extends PropertyValue {
3
3
  boolean: boolean;
4
4
  constructor(boolean: boolean);
5
- getValue: () => boolean;
5
+ isEmpty(): boolean;
6
6
  }
@@ -6,9 +6,9 @@ class BooleanPropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(boolean) {
7
7
  super();
8
8
  this.boolean = boolean;
9
- this.getValue = () => {
10
- return this.boolean;
11
- };
9
+ }
10
+ isEmpty() {
11
+ return !this.boolean;
12
12
  }
13
13
  }
14
14
  exports.BooleanPropertyValue = BooleanPropertyValue;
@@ -3,4 +3,5 @@ import { PropertyValue } from "../PropertyValue";
3
3
  export declare class BusinessProfilePropertyValue extends PropertyValue {
4
4
  id: guid;
5
5
  constructor(id: guid);
6
+ isEmpty(): boolean;
6
7
  }
@@ -7,5 +7,8 @@ class BusinessProfilePropertyValue extends PropertyValue_1.PropertyValue {
7
7
  super();
8
8
  this.id = id;
9
9
  }
10
+ isEmpty() {
11
+ return this.id == null;
12
+ }
10
13
  }
11
14
  exports.BusinessProfilePropertyValue = BusinessProfilePropertyValue;
@@ -3,8 +3,5 @@ export declare class DatePropertyValue extends PropertyValue {
3
3
  date: string;
4
4
  timeZoneId: string;
5
5
  constructor(date: Date, timeZoneId: string);
6
- getValue: () => {
7
- date: string;
8
- timeZoneId: string;
9
- };
6
+ isEmpty(): boolean;
10
7
  }
@@ -5,11 +5,11 @@ const PropertyValue_1 = require("../PropertyValue");
5
5
  class DatePropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(date, timeZoneId) {
7
7
  super();
8
- this.getValue = () => {
9
- return { date: this.date, timeZoneId: this.timeZoneId };
10
- };
11
8
  this.date = date.toJSON();
12
9
  this.timeZoneId = timeZoneId.toString();
13
10
  }
11
+ isEmpty() {
12
+ return this.date == null;
13
+ }
14
14
  }
15
15
  exports.DatePropertyValue = DatePropertyValue;
@@ -3,5 +3,5 @@ export declare class DateTimePropertyValue extends PropertyValue {
3
3
  timeZoneId: string;
4
4
  dateTime: string;
5
5
  constructor(dateTime: Date, timeZoneId: string);
6
- getValue: () => string;
6
+ isEmpty(): boolean;
7
7
  }
@@ -6,10 +6,10 @@ class DateTimePropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(dateTime, timeZoneId) {
7
7
  super();
8
8
  this.timeZoneId = timeZoneId;
9
- this.getValue = () => {
10
- return this.dateTime;
11
- };
12
9
  this.dateTime = dateTime.toJSON();
13
10
  }
11
+ isEmpty() {
12
+ return this.dateTime == null;
13
+ }
14
14
  }
15
15
  exports.DateTimePropertyValue = DateTimePropertyValue;
@@ -2,5 +2,5 @@ import { PropertyValue } from "../PropertyValue";
2
2
  export declare class EmailPropertyValue extends PropertyValue {
3
3
  email: string;
4
4
  constructor(email: string);
5
- getValue: () => string;
5
+ isEmpty(): boolean;
6
6
  }
@@ -6,9 +6,9 @@ class EmailPropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(email) {
7
7
  super();
8
8
  this.email = email;
9
- this.getValue = () => {
10
- return this.email;
11
- };
9
+ }
10
+ isEmpty() {
11
+ return !this.email;
12
12
  }
13
13
  }
14
14
  exports.EmailPropertyValue = EmailPropertyValue;
@@ -2,5 +2,5 @@ import { PropertyValue } from "../PropertyValue";
2
2
  export declare class HtmlPropertyValue extends PropertyValue {
3
3
  html: string;
4
4
  constructor(html: string);
5
- getValue: () => string;
5
+ isEmpty(): boolean;
6
6
  }
@@ -6,9 +6,9 @@ class HtmlPropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(html) {
7
7
  super();
8
8
  this.html = html;
9
- this.getValue = () => {
10
- return this.html;
11
- };
9
+ }
10
+ isEmpty() {
11
+ return this.html == null || this.html.trim() == "" || this.html.trim() == "<p></p>";
12
12
  }
13
13
  }
14
14
  exports.HtmlPropertyValue = HtmlPropertyValue;
@@ -3,5 +3,5 @@ import { PropertyValue } from "../PropertyValue";
3
3
  export declare class IdentityPropertyValue extends PropertyValue {
4
4
  identities: Identity[];
5
5
  constructor(identities: Identity[]);
6
- getValue(): Identity[];
6
+ isEmpty(): boolean;
7
7
  }
@@ -7,8 +7,8 @@ class IdentityPropertyValue extends PropertyValue_1.PropertyValue {
7
7
  super();
8
8
  this.identities = identities;
9
9
  }
10
- getValue() {
11
- return this.identities;
10
+ isEmpty() {
11
+ return this.identities?.length == 0;
12
12
  }
13
13
  }
14
14
  exports.IdentityPropertyValue = IdentityPropertyValue;
@@ -4,5 +4,5 @@ export declare class ImagePropertyValue extends PropertyValue {
4
4
  image: MediaPickerImage;
5
5
  queryValue: number;
6
6
  constructor(image: MediaPickerImage);
7
- getValue: () => MediaPickerImage;
7
+ isEmpty(): boolean;
8
8
  }
@@ -6,9 +6,9 @@ class ImagePropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(image) {
7
7
  super();
8
8
  this.image = image;
9
- this.getValue = () => {
10
- return this.image;
11
- };
9
+ }
10
+ isEmpty() {
11
+ return !this.image;
12
12
  }
13
13
  }
14
14
  exports.ImagePropertyValue = ImagePropertyValue;
@@ -2,5 +2,5 @@ import { PropertyValue } from "../PropertyValue";
2
2
  export declare class IntegerPropertyValue extends PropertyValue {
3
3
  integer: number;
4
4
  constructor(integer: number);
5
- getValue: () => number;
5
+ isEmpty(): boolean;
6
6
  }
@@ -6,9 +6,9 @@ class IntegerPropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(integer) {
7
7
  super();
8
8
  this.integer = integer;
9
- this.getValue = () => {
10
- return this.integer;
11
- };
9
+ }
10
+ isEmpty() {
11
+ return typeof this.integer !== "number" || this.integer == null;
12
12
  }
13
13
  }
14
14
  exports.IntegerPropertyValue = IntegerPropertyValue;
@@ -3,5 +3,5 @@ import { PropertyValue } from "../PropertyValue";
3
3
  export declare class LanguagePropertyValue extends PropertyValue {
4
4
  language: LanguageTags;
5
5
  constructor(language: LanguageTags);
6
- getValue: () => LanguageTags;
6
+ isEmpty(): boolean;
7
7
  }
@@ -6,9 +6,9 @@ class LanguagePropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(language) {
7
7
  super();
8
8
  this.language = language;
9
- this.getValue = () => {
10
- return this.language;
11
- };
9
+ }
10
+ isEmpty() {
11
+ return !this.language;
12
12
  }
13
13
  }
14
14
  exports.LanguagePropertyValue = LanguagePropertyValue;
@@ -2,5 +2,5 @@ import { PropertyValue } from "../PropertyValue";
2
2
  export declare class LinkPropertyValue extends PropertyValue {
3
3
  link: string;
4
4
  constructor(link: string);
5
- getValue: () => string;
5
+ isEmpty(): boolean;
6
6
  }
@@ -6,9 +6,9 @@ class LinkPropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(link) {
7
7
  super();
8
8
  this.link = link;
9
- this.getValue = () => {
10
- return this.link;
11
- };
9
+ }
10
+ isEmpty() {
11
+ return !this.link;
12
12
  }
13
13
  }
14
14
  exports.LinkPropertyValue = LinkPropertyValue;
@@ -3,4 +3,5 @@ import { PropertyValue } from "../PropertyValue";
3
3
  export declare class MediaPropertyValue extends PropertyValue {
4
4
  media: MediaPickerMedia;
5
5
  constructor(media: MediaPickerMedia);
6
+ isEmpty(): boolean;
6
7
  }
@@ -7,5 +7,8 @@ class MediaPropertyValue extends PropertyValue_1.PropertyValue {
7
7
  super();
8
8
  this.media = media;
9
9
  }
10
+ isEmpty() {
11
+ return !this.media;
12
+ }
10
13
  }
11
14
  exports.MediaPropertyValue = MediaPropertyValue;
@@ -2,4 +2,5 @@ import { PropertyValue } from "../PropertyValue";
2
2
  export declare class MultilineTextPropertyValue extends PropertyValue {
3
3
  texts: string[];
4
4
  constructor(texts: string[]);
5
+ isEmpty(): boolean;
5
6
  }
@@ -7,5 +7,8 @@ class MultilineTextPropertyValue extends PropertyValue_1.PropertyValue {
7
7
  super();
8
8
  this.texts = texts;
9
9
  }
10
+ isEmpty() {
11
+ return this.texts?.length == 0;
12
+ }
10
13
  }
11
14
  exports.MultilineTextPropertyValue = MultilineTextPropertyValue;
@@ -3,4 +3,5 @@ import { PropertyValue } from "../PropertyValue";
3
3
  export declare class MultilingualTextPropertyValue extends PropertyValue {
4
4
  multilingualText: MultilingualString;
5
5
  constructor(multilingualText: MultilingualString);
6
+ isEmpty(): boolean;
6
7
  }
@@ -7,5 +7,8 @@ class MultilingualTextPropertyValue extends PropertyValue_1.PropertyValue {
7
7
  super();
8
8
  this.multilingualText = multilingualText;
9
9
  }
10
+ isEmpty() {
11
+ return !this.multilingualText;
12
+ }
10
13
  }
11
14
  exports.MultilingualTextPropertyValue = MultilingualTextPropertyValue;
@@ -2,4 +2,5 @@ import { PropertyValue } from "../PropertyValue";
2
2
  export declare class PhoneNumberPropertyValue extends PropertyValue {
3
3
  number: string;
4
4
  constructor(number: string);
5
+ isEmpty(): boolean;
5
6
  }
@@ -7,5 +7,8 @@ class PhoneNumberPropertyValue extends PropertyValue_1.PropertyValue {
7
7
  super();
8
8
  this.number = number;
9
9
  }
10
+ isEmpty() {
11
+ return !this.number;
12
+ }
10
13
  }
11
14
  exports.PhoneNumberPropertyValue = PhoneNumberPropertyValue;
@@ -3,5 +3,5 @@ import { PropertyValue } from "../PropertyValue";
3
3
  export declare class TagsPropertyValue extends PropertyValue {
4
4
  tags: Array<Tag>;
5
5
  constructor(tags: Array<Tag>);
6
- getValue: () => Tag[];
6
+ isEmpty(): boolean;
7
7
  }
@@ -6,9 +6,9 @@ class TagsPropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(tags) {
7
7
  super();
8
8
  this.tags = tags;
9
- this.getValue = () => {
10
- return this.tags;
11
- };
9
+ }
10
+ isEmpty() {
11
+ return this.tags?.length == 0;
12
12
  }
13
13
  }
14
14
  exports.TagsPropertyValue = TagsPropertyValue;
@@ -2,5 +2,5 @@ import { PropertyValue } from "../PropertyValue";
2
2
  export declare class TextPropertyValue extends PropertyValue {
3
3
  text: string;
4
4
  constructor(text: string);
5
- getValue: () => string;
5
+ isEmpty(): boolean;
6
6
  }
@@ -6,9 +6,9 @@ class TextPropertyValue extends PropertyValue_1.PropertyValue {
6
6
  constructor(text) {
7
7
  super();
8
8
  this.text = text;
9
- this.getValue = () => {
10
- return this.text;
11
- };
9
+ }
10
+ isEmpty() {
11
+ return this.text == null || this.text.trim() == "";
12
12
  }
13
13
  }
14
14
  exports.TextPropertyValue = TextPropertyValue;
@@ -2,4 +2,5 @@ import { PropertyValue } from "../PropertyValue";
2
2
  export declare class TimePropertyValue extends PropertyValue {
3
3
  time: Date;
4
4
  timeZoneId: string;
5
+ isEmpty(): boolean;
5
6
  }
@@ -3,5 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimePropertyValue = void 0;
4
4
  const PropertyValue_1 = require("../PropertyValue");
5
5
  class TimePropertyValue extends PropertyValue_1.PropertyValue {
6
+ isEmpty() {
7
+ return this.time == null || this.time.toJSON() == null;
8
+ }
6
9
  }
7
10
  exports.TimePropertyValue = TimePropertyValue;
@@ -3,4 +3,5 @@ import { PropertyValue } from "../PropertyValue";
3
3
  export declare class UserTypePropertyValue extends PropertyValue {
4
4
  id: guid;
5
5
  constructor(id: guid);
6
+ isEmpty(): boolean;
6
7
  }
@@ -7,5 +7,8 @@ class UserTypePropertyValue extends PropertyValue_1.PropertyValue {
7
7
  super();
8
8
  this.id = id;
9
9
  }
10
+ isEmpty() {
11
+ return this.id == null;
12
+ }
10
13
  }
11
14
  exports.UserTypePropertyValue = UserTypePropertyValue;
@@ -21,10 +21,3 @@ export declare const LayoutEditorCanvasStyles: {
21
21
  closeButton: NestedCSSPropertiesExtends;
22
22
  rightResizer: (backgroundColor: string) => NestedCSSPropertiesExtends;
23
23
  };
24
- /**
25
- * Styles for the LayoutRendererCanvas component
26
- */
27
- export declare const LayoutRendererCanvasStyles: {
28
- container: NestedCSSPropertiesExtends;
29
- containerVerticalAlign: (isAlignVertical: boolean) => NestedCSSPropertiesExtends;
30
- };
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LayoutRendererCanvasStyles = exports.LayoutEditorCanvasStyles = void 0;
3
+ exports.LayoutEditorCanvasStyles = void 0;
4
4
  /**
5
5
  * Styles for the LayoutEditorCanvas component
6
6
  */
7
7
  exports.LayoutEditorCanvasStyles = {};
8
- /**
9
- * Styles for the LayoutRendererCanvas component
10
- */
11
- exports.LayoutRendererCanvasStyles = {};