@omnia/fx-models 7.8.4-preview → 7.8.4
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/ActionHandler.d.ts +2 -1
- package/Constants.d.ts +9 -0
- package/Constants.js +11 -2
- package/Enums.d.ts +13 -4
- package/Enums.js +13 -3
- package/Exposes.d.ts +5 -0
- package/Exposes.js +5 -0
- package/FilterEngineStyles.d.ts +0 -1
- package/Layout.d.ts +1 -0
- package/LinkHandler/linktype/LinkTypeConfig.d.ts +4 -0
- package/ManifestIds.d.ts +18 -0
- package/ManifestIds.js +50 -1
- package/QueryFilter.d.ts +10 -7
- package/QueryFilter.js +9 -6
- package/README.md +2 -2
- package/Secrets.d.ts +5 -0
- package/Secrets.js +6 -0
- package/Tenant.d.ts +6 -1
- package/Tenant.js +4 -0
- package/aiengine/AIEngineApiKeyCredential.d.ts +4 -0
- package/aiengine/AIEngineApiKeyCredential.js +2 -0
- package/aiengine/AIEngineRAGSettings.d.ts +4 -0
- package/aiengine/AIEngineRAGSettings.js +2 -0
- package/aiengine/index.d.ts +2 -0
- package/aiengine/index.js +5 -0
- package/analytics/AnalyticsDimensionMappings.d.ts +10 -0
- package/analytics/AnalyticsDimensionMappings.js +8 -0
- package/analytics/AnalyticsSettings.d.ts +8 -0
- package/analytics/AnalyticsSettings.js +2 -0
- package/analytics/BusinessProfileAnalyticsSettings.d.ts +13 -0
- package/analytics/BusinessProfileAnalyticsSettings.js +17 -0
- package/analytics/EventAction.d.ts +6 -0
- package/analytics/EventAction.js +2 -0
- package/analytics/index.d.ts +4 -0
- package/analytics/index.js +7 -0
- package/azure-openai/settings/OpenAISettings.d.ts +3 -0
- package/filterbuilder/FilterBuilder.d.ts +40 -0
- package/filterbuilder/FilterBuilder.js +77 -0
- package/filterbuilder/FilterComponent.d.ts +23 -0
- package/filterbuilder/FilterComponent.js +27 -0
- package/filterbuilder/FilterOperatorBuilder.d.ts +67 -0
- package/filterbuilder/FilterOperatorBuilder.js +103 -0
- package/filterbuilder/helper/FilterHelper.d.ts +6 -0
- package/filterbuilder/helper/FilterHelper.js +13 -0
- package/filterbuilder/index.d.ts +5 -0
- package/filterbuilder/index.js +8 -0
- package/filterbuilder/transformers/FilterTransformer.d.ts +4 -0
- package/filterbuilder/transformers/FilterTransformer.js +2 -0
- package/filterbuilder/transformers/OmniaSearchFilterTransformer.d.ts +9 -0
- package/filterbuilder/transformers/OmniaSearchFilterTransformer.js +116 -0
- package/filterbuilder/transformers/index.d.ts +2 -0
- package/filterbuilder/transformers/index.js +5 -0
- package/filterengine/Shared.d.ts +1 -1
- package/identities/IdentityCreationRequest.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/Future.d.ts +8 -0
- package/internal-do-not-import-from-here/shared/models/Future.js +36 -0
- package/internal-do-not-import-from-here/shared/models/SharedConstants.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/SharedConstants.js +1 -0
- package/media-picker/MediaPickerMedia.d.ts +3 -0
- package/media-picker/Providers/IMediaPostProcess.d.ts +4 -0
- package/media-picker/Providers/IMediaPostProcess.js +2 -0
- package/media-picker/Providers/MediaPickerProvider.d.ts +2 -0
- package/media-picker/Providers/MediaflowProvider.d.ts +2 -1
- package/media-picker/Providers/UnsplashProvider.d.ts +18 -0
- package/media-picker/Providers/UnsplashProvider.js +25 -0
- package/media-picker/Providers/index.d.ts +1 -0
- package/media-picker/Providers/index.js +1 -0
- package/media-picker/index.d.ts +1 -0
- package/media-picker/index.js +1 -0
- package/media-picker/mediaflow/Mediaflow.d.ts +7 -0
- package/media-picker/mediaflow/Mediaflow.js +2 -0
- package/media-picker/mediaflow/index.d.ts +1 -0
- package/media-picker/mediaflow/index.js +4 -0
- package/mediaflow/MediaflowSettings.d.ts +0 -2
- package/omniasearch/IPagedSearchResult.d.ts +2 -0
- package/omniasearch/SearchPropertyFilter.d.ts +55 -0
- package/omniasearch/SearchPropertyFilter.js +16 -0
- package/omniasearch/SearchQuery.d.ts +1 -0
- package/omniasearch/SearchUserQuery.d.ts +1 -0
- package/omniasearch/index.d.ts +1 -0
- package/omniasearch/index.js +1 -0
- package/package.json +7 -9
- package/properties/IPropertyValueRenderer.d.ts +11 -0
- package/properties/PropertyValuePrimitiveConverter.d.ts +2 -1
- package/properties/definitions/PhoneNumberPropertyDefinition.d.ts +4 -0
- package/properties/definitions/TermSetPropertyDefinition.js +7 -5
- package/properties/values/BirthdayPropertyValue.js +1 -1
- package/properties/values/DatePropertyValue.js +2 -2
- package/properties/values/DateTimePropertyValue.js +1 -1
- package/semanticsearch/SemanticSearchQueryableProperty.d.ts +31 -0
- package/semanticsearch/SemanticSearchQueryableProperty.js +47 -0
- package/semanticsearch/SemanticSearchRequest.d.ts +5 -0
- package/semanticsearch/SemanticSearchRequest.js +2 -0
- package/semanticsearch/SemanticSearchResponse.d.ts +25 -0
- package/semanticsearch/SemanticSearchResponse.js +10 -0
- package/semanticsearch/index.d.ts +3 -0
- package/semanticsearch/index.js +6 -0
- package/unsplash/UnsplashAuthenticationInfo.d.ts +4 -0
- package/unsplash/UnsplashAuthenticationInfo.js +2 -0
- package/unsplash/index.d.ts +1 -0
- package/unsplash/index.js +4 -0
- package/ux/MediaPickerApi.d.ts +2 -0
package/filterengine/Shared.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ export interface BaseFilterEngineProperty {
|
|
|
117
117
|
entries?: Array<Refinement>;
|
|
118
118
|
}
|
|
119
119
|
export interface TypedFilterEnginePropertyOutput {
|
|
120
|
-
operator: FilterOperator.
|
|
120
|
+
operator: FilterOperator.Equal | FilterOperator.GreaterThan | FilterOperator.LessThan | FilterOperator.NotEqual | FilterOperator.In;
|
|
121
121
|
logicalOperator: FilterLogicalOperator;
|
|
122
122
|
internalName: string;
|
|
123
123
|
type: PropertyIndexedType.Boolean | PropertyIndexedType.Text | PropertyIndexedType.Number | PropertyIndexedType.Person | PropertyIndexedType.Taxonomy | PropertyIndexedType.EnterpriseKeywords | PropertyIndexedType.DateTime | PropertyIndexedType.Tags;
|
|
@@ -16,6 +16,7 @@ export interface UserRequestFormDisplaySetting {
|
|
|
16
16
|
userTypeId: GuidValue;
|
|
17
17
|
userTypeDisplayName: MultilingualString;
|
|
18
18
|
propertyBindings: Array<PropertyBindingDisplay>;
|
|
19
|
+
magicLinkExpiration: number;
|
|
19
20
|
}
|
|
20
21
|
export declare enum ConfirmEmailStatus {
|
|
21
22
|
Incomplete = 0,
|
|
@@ -15,6 +15,14 @@ export declare class Future<T> extends Promise<T> {
|
|
|
15
15
|
* @memberof Future
|
|
16
16
|
*/
|
|
17
17
|
tryCatch(): Future<[success: T, error: Error]>;
|
|
18
|
+
unwrapAxiosApiResponse<T2>(): Future<T2>;
|
|
19
|
+
unwrap<T2>(executor: (value: T, resolve: (value: T2) => void, reject: (reason?: any) => void) => void): Future<T2>;
|
|
20
|
+
/**
|
|
21
|
+
* Expose abort for other future to use.
|
|
22
|
+
* chain method for future
|
|
23
|
+
* @param onAbort
|
|
24
|
+
*/
|
|
25
|
+
abortIf(onAbort: (cb: (reason?: any) => void) => void): this;
|
|
18
26
|
/**
|
|
19
27
|
* Aborts the request
|
|
20
28
|
*
|
|
@@ -53,6 +53,42 @@ class Future extends Promise {
|
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
+
unwrapAxiosApiResponse() {
|
|
57
|
+
return new Future((resolve, reject, abort) => {
|
|
58
|
+
this.abortIf(abort);
|
|
59
|
+
return this.then(response => {
|
|
60
|
+
const apiResponse = response;
|
|
61
|
+
if (apiResponse?.data.success) {
|
|
62
|
+
resolve(apiResponse.data.data);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
reject(apiResponse.data.errorMessage);
|
|
66
|
+
}
|
|
67
|
+
}).catch(() => {
|
|
68
|
+
reject();
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
unwrap(executor) {
|
|
73
|
+
return new Future((resolve, reject, abort) => {
|
|
74
|
+
this.abortIf(abort);
|
|
75
|
+
return this.then(q => executor(q, resolve, reject));
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Expose abort for other future to use.
|
|
80
|
+
* chain method for future
|
|
81
|
+
* @param onAbort
|
|
82
|
+
*/
|
|
83
|
+
abortIf(onAbort) {
|
|
84
|
+
//to avoid "Illegal invocation" from lost context of this
|
|
85
|
+
const abort = (reason) => { this.abort(reason); };
|
|
86
|
+
onAbort(abort);
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
// then<TResult1 = T, TResult2 = never>(onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2> {
|
|
90
|
+
// this.then();
|
|
91
|
+
// }
|
|
56
92
|
/**
|
|
57
93
|
* Aborts the request
|
|
58
94
|
*
|
|
@@ -13,6 +13,7 @@ export interface IMediaMetadata {
|
|
|
13
13
|
caption?: string;
|
|
14
14
|
altText?: string;
|
|
15
15
|
providerId?: GuidValue;
|
|
16
|
+
providerMetadata?: ProviderMetadata;
|
|
16
17
|
}
|
|
17
18
|
export interface IVideoMetadata extends IMediaMetadata {
|
|
18
19
|
}
|
|
@@ -20,6 +21,8 @@ export interface MediaPickerImage extends MediaPickerMedia, MediaPickerImageMeta
|
|
|
20
21
|
omniaImageId: number;
|
|
21
22
|
omniaServiceId: GuidValue;
|
|
22
23
|
}
|
|
24
|
+
export interface ProviderMetadata {
|
|
25
|
+
}
|
|
23
26
|
export interface MediaPickerVideo extends MediaPickerMedia, IVideoMetadata {
|
|
24
27
|
html: string;
|
|
25
28
|
thumbnailUrl?: string;
|
|
@@ -3,6 +3,7 @@ import { MediaPickerEnums } from "../../Enums";
|
|
|
3
3
|
import { IIcon } from "../../Icon";
|
|
4
4
|
import { MediaPickerPersistedImage } from "..";
|
|
5
5
|
import { MediaPickerVideo } from "../MediaPickerMedia";
|
|
6
|
+
import { IMediaPostProcess } from "./IMediaPostProcess";
|
|
6
7
|
export declare abstract class MediaPickerProvider {
|
|
7
8
|
abstract readonly id: GuidValue;
|
|
8
9
|
abstract readonly category: string;
|
|
@@ -18,5 +19,6 @@ export declare abstract class MediaPickerProvider {
|
|
|
18
19
|
selectableMediaTypes: Array<MediaPickerEnums.OmniaMediaTypes>;
|
|
19
20
|
providerComponentId: GuidValue;
|
|
20
21
|
abstract supportGalleryFeature?: boolean;
|
|
22
|
+
abstract postProcess?: IMediaPostProcess;
|
|
21
23
|
constructor();
|
|
22
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MediaPickerProvider } from ".";
|
|
1
|
+
import { IMediaPostProcess, MediaPickerProvider } from ".";
|
|
2
2
|
import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
|
3
3
|
import { MediaPickerEnums } from "../../Enums";
|
|
4
4
|
import { IIcon } from "../../Icon";
|
|
@@ -13,6 +13,7 @@ export declare class MediaPickerMediaflowProvider implements MediaPickerProvider
|
|
|
13
13
|
selectableMediaTypes: MediaPickerEnums.OmniaMediaTypes[];
|
|
14
14
|
providerComponentId: GuidValue;
|
|
15
15
|
supportGalleryFeature?: boolean;
|
|
16
|
+
postProcess?: IMediaPostProcess;
|
|
16
17
|
constructor();
|
|
17
18
|
hasEditorForMedia: (media: MediaPickerVideo | MediaPickerPersistedImage) => boolean;
|
|
18
19
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MediaPickerProvider } from ".";
|
|
2
|
+
import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
|
3
|
+
import { MediaPickerEnums } from "../../Enums";
|
|
4
|
+
import { IIcon } from "../../Icon";
|
|
5
|
+
import { MediaPickerVideo } from "../MediaPickerMedia";
|
|
6
|
+
import { MediaPickerPersistedImage } from "../Shared";
|
|
7
|
+
export declare class MediaPickerUnsplashProvider implements MediaPickerProvider {
|
|
8
|
+
id: GuidValue;
|
|
9
|
+
category: string;
|
|
10
|
+
name: string;
|
|
11
|
+
icon: IIcon;
|
|
12
|
+
sortOrder?: number;
|
|
13
|
+
selectableMediaTypes: MediaPickerEnums.OmniaMediaTypes[];
|
|
14
|
+
providerComponentId: GuidValue;
|
|
15
|
+
supportGalleryFeature?: boolean;
|
|
16
|
+
constructor();
|
|
17
|
+
hasEditorForMedia: (media: MediaPickerVideo | MediaPickerPersistedImage) => boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaPickerUnsplashProvider = void 0;
|
|
4
|
+
const Constants_1 = require("../../Constants");
|
|
5
|
+
const Enums_1 = require("../../Enums");
|
|
6
|
+
const ManifestIds_1 = require("../../ManifestIds");
|
|
7
|
+
const Icon_1 = require("../../Icon");
|
|
8
|
+
class MediaPickerUnsplashProvider {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.hasEditorForMedia = (media) => {
|
|
11
|
+
return false;
|
|
12
|
+
};
|
|
13
|
+
this.id = Constants_1.Constants.ux.components.mediaPicker.providerIds.unsplash;
|
|
14
|
+
this.category = "image";
|
|
15
|
+
this.name = "Omnia.Ux.UnsplashProvider.Title";
|
|
16
|
+
this.icon = new Icon_1.SvgIcon("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32px\" height=\"32px\" viewBox=\"0 0 32 32\">" +
|
|
17
|
+
"<path d=\"M32 16.4v13.6H0V16.4h10.1v4.3h11.8v-4.3H32zm-10.1-11.2H10.1v4.3h11.8V5.2z\" fill=\"#fff\" fill-opacity=\"1\"></path>" +
|
|
18
|
+
"</svg>");
|
|
19
|
+
this.providerComponentId = ManifestIds_1.OmniaWebComponentManifests.FxUxUnsplashProvider;
|
|
20
|
+
this.selectableMediaTypes = [Enums_1.MediaPickerEnums.OmniaMediaTypes.Image];
|
|
21
|
+
this.sortOrder = 40;
|
|
22
|
+
this.supportGalleryFeature = true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.MediaPickerUnsplashProvider = MediaPickerUnsplashProvider;
|
|
@@ -10,3 +10,4 @@ tslib_1.__exportStar(require("./PexelProvider"), exports);
|
|
|
10
10
|
tslib_1.__exportStar(require("./YoutubeProvider"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./DallEProvider"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("./MediaflowProvider"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./IMediaPostProcess"), exports);
|
package/media-picker/index.d.ts
CHANGED
package/media-picker/index.js
CHANGED
|
@@ -19,3 +19,4 @@ tslib_1.__exportStar(require("./Shared"), exports);
|
|
|
19
19
|
tslib_1.__exportStar(require("./Providers"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./SharePointVideoResult"), exports);
|
|
21
21
|
tslib_1.__exportStar(require("./InlineMediaNodeDisplayOptions"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./mediaflow"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Mediaflow";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ISearchResult } from "./ISearchResult";
|
|
2
2
|
import { IndexedDocument } from "./IndexedDocument";
|
|
3
|
+
import { OmniaRefiner } from "./OmniaRefiner";
|
|
3
4
|
export interface IPagedSearchResultToken {
|
|
4
5
|
}
|
|
5
6
|
export interface IPagedSearchResult<TIndexedDocument extends IndexedDocument> extends ISearchResult<TIndexedDocument> {
|
|
6
7
|
totalPages: number;
|
|
7
8
|
error: string;
|
|
9
|
+
refiners?: Array<OmniaRefiner>;
|
|
8
10
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Language } from "highlight.js";
|
|
2
|
+
import { PropertyIndexedType } from "../Enums";
|
|
3
|
+
import { Identity } from "../identities";
|
|
4
|
+
import { RollupEnums, DatePropertyFilterCustomValue } from "../RollupQuery";
|
|
5
|
+
import { Tag } from "../Tags";
|
|
6
|
+
import { GuidValue } from "@omnia/fx-models";
|
|
7
|
+
export declare enum OmniaSearchScopes {
|
|
8
|
+
Tenant = 1,
|
|
9
|
+
PublishingApps = 2,
|
|
10
|
+
PageCollections = 3,
|
|
11
|
+
Channels = 4,
|
|
12
|
+
BusinessProfiles = 5
|
|
13
|
+
}
|
|
14
|
+
export declare enum OmniaSearchFilterTypes {
|
|
15
|
+
FixedValue = 1,
|
|
16
|
+
User = 2
|
|
17
|
+
}
|
|
18
|
+
export interface OmniaSearchPropertyFilter {
|
|
19
|
+
property: string;
|
|
20
|
+
type: PropertyIndexedType.Boolean | PropertyIndexedType.DateTime | PropertyIndexedType.Text | PropertyIndexedType.Number | PropertyIndexedType.Person | PropertyIndexedType.Taxonomy | PropertyIndexedType.EnterpriseKeywords | PropertyIndexedType.Language | PropertyIndexedType.Tags;
|
|
21
|
+
valueObj: OmniaSearchPropertyFilterValue;
|
|
22
|
+
}
|
|
23
|
+
export interface OmniaSearchPropertyFilterValue {
|
|
24
|
+
}
|
|
25
|
+
export interface OmniaSearchBooleanPropertyFilterValue extends OmniaSearchPropertyFilterValue {
|
|
26
|
+
value: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface OmniaSearchNumberPropertyFilterValue extends OmniaSearchPropertyFilterValue {
|
|
29
|
+
value: number;
|
|
30
|
+
}
|
|
31
|
+
export interface OmniaSearchTextPropertyFilterValue extends OmniaSearchPropertyFilterValue {
|
|
32
|
+
value: string;
|
|
33
|
+
text?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface OmniaSearchPersonPropertyFilterValue extends OmniaSearchPropertyFilterValue {
|
|
36
|
+
value: Array<Identity>;
|
|
37
|
+
}
|
|
38
|
+
export interface OmniaSearchDatePropertyFilterValue extends OmniaSearchPropertyFilterValue {
|
|
39
|
+
value: RollupEnums.DatePeriods;
|
|
40
|
+
customValueDetails?: {
|
|
41
|
+
from: DatePropertyFilterCustomValue;
|
|
42
|
+
to: DatePropertyFilterCustomValue;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface OmniaSearchTagPropertyFilterValue extends OmniaSearchPropertyFilterValue {
|
|
46
|
+
value: Array<Tag>;
|
|
47
|
+
}
|
|
48
|
+
export interface OmniaSearchTaxonomyPropertyFilterValue extends OmniaSearchPropertyFilterValue {
|
|
49
|
+
fixedTermIds?: Array<GuidValue>;
|
|
50
|
+
includeEmpty: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface OmniaSearchLanguageFilterValue extends OmniaSearchPropertyFilterValue {
|
|
53
|
+
value: Language;
|
|
54
|
+
filterType: OmniaSearchFilterTypes;
|
|
55
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OmniaSearchFilterTypes = exports.OmniaSearchScopes = void 0;
|
|
4
|
+
var OmniaSearchScopes;
|
|
5
|
+
(function (OmniaSearchScopes) {
|
|
6
|
+
OmniaSearchScopes[OmniaSearchScopes["Tenant"] = 1] = "Tenant";
|
|
7
|
+
OmniaSearchScopes[OmniaSearchScopes["PublishingApps"] = 2] = "PublishingApps";
|
|
8
|
+
OmniaSearchScopes[OmniaSearchScopes["PageCollections"] = 3] = "PageCollections";
|
|
9
|
+
OmniaSearchScopes[OmniaSearchScopes["Channels"] = 4] = "Channels";
|
|
10
|
+
OmniaSearchScopes[OmniaSearchScopes["BusinessProfiles"] = 5] = "BusinessProfiles";
|
|
11
|
+
})(OmniaSearchScopes = exports.OmniaSearchScopes || (exports.OmniaSearchScopes = {}));
|
|
12
|
+
var OmniaSearchFilterTypes;
|
|
13
|
+
(function (OmniaSearchFilterTypes) {
|
|
14
|
+
OmniaSearchFilterTypes[OmniaSearchFilterTypes["FixedValue"] = 1] = "FixedValue";
|
|
15
|
+
OmniaSearchFilterTypes[OmniaSearchFilterTypes["User"] = 2] = "User";
|
|
16
|
+
})(OmniaSearchFilterTypes = exports.OmniaSearchFilterTypes || (exports.OmniaSearchFilterTypes = {}));
|
|
@@ -6,6 +6,7 @@ export interface SearchUserQuery {
|
|
|
6
6
|
sorts?: Array<SourceRelatedOmniaSortProperty>;
|
|
7
7
|
filters?: Array<Array<ConditionalSearchProperty>>;
|
|
8
8
|
refiners?: Array<SourceRelatedOmniaRefinerProperty>;
|
|
9
|
+
pickUsers?: Array<string>;
|
|
9
10
|
}
|
|
10
11
|
export interface ConditionalSearchProperty {
|
|
11
12
|
operator: ConditionalOperator;
|
package/omniasearch/index.d.ts
CHANGED
package/omniasearch/index.js
CHANGED
|
@@ -21,3 +21,4 @@ tslib_1.__exportStar(require("./PagedOmniaSearchResult"), exports);
|
|
|
21
21
|
tslib_1.__exportStar(require("./SearchUserQuery"), exports);
|
|
22
22
|
tslib_1.__exportStar(require("./OmniaRefiner"), exports);
|
|
23
23
|
tslib_1.__exportStar(require("./OmniaSearchUser"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./SearchPropertyFilter"), exports);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnia/fx-models",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "7.8.4
|
|
4
|
+
"version": "7.8.4",
|
|
5
5
|
"description": "Provide Omnia Fx Models Stuffs.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/
|
|
11
|
+
"url": "git+https://github.com/omniaintranet/OmniaFx"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
|
14
14
|
"omnia",
|
|
@@ -17,13 +17,11 @@
|
|
|
17
17
|
"office365",
|
|
18
18
|
"sharepoint"
|
|
19
19
|
],
|
|
20
|
-
"author": "
|
|
21
|
-
"dependencies": {
|
|
22
|
-
|
|
23
|
-
},
|
|
20
|
+
"author": "Omnia Digital Workplace AB",
|
|
21
|
+
"dependencies": {},
|
|
24
22
|
"typings": "./index.d.ts",
|
|
25
23
|
"bugs": {
|
|
26
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/omniaintranet/OmniaFx/issues"
|
|
27
25
|
},
|
|
28
|
-
"homepage": "https://github.com/
|
|
29
|
-
}
|
|
26
|
+
"homepage": "https://github.com/omniaintranet/OmniaFx#readme"
|
|
27
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ScopedSlots } from "../../ux";
|
|
1
2
|
import { MultilingualContext } from "../../ux/MultilingualContext";
|
|
2
3
|
import { PropertyConfiguration } from "./PropertyConfiguration";
|
|
3
4
|
import { PropertyDefinition, PropertyDisplaySettingsType, PropertyEditorSettingsType, PropertySetupSettingsType, PropertyValueType } from "./PropertyDefinition";
|
|
@@ -10,6 +11,10 @@ export interface IPropertyDisplayRenderer<TPropertyDef extends PropertyDefinitio
|
|
|
10
11
|
setupSettings?: PropertySetupSettingsType<TPropertyDef>;
|
|
11
12
|
renderTextOnly?: boolean;
|
|
12
13
|
persistentLabels?: boolean;
|
|
14
|
+
scopedSlots?: ScopedSlots<IPropertyRendererScopedSlots>;
|
|
15
|
+
}
|
|
16
|
+
export interface IPropertyRendererScopedSlots {
|
|
17
|
+
empty?: JSX.Element;
|
|
13
18
|
}
|
|
14
19
|
export interface IPropertyEditorRenderer<TPropertyDef extends PropertyDefinition<any, any, any>> {
|
|
15
20
|
valueBind: PropertyValueType<TPropertyDef>;
|
|
@@ -18,6 +23,7 @@ export interface IPropertyEditorRenderer<TPropertyDef extends PropertyDefinition
|
|
|
18
23
|
setupSettings?: PropertySetupSettingsType<TPropertyDef>;
|
|
19
24
|
onValueBindChanged(newValue: PropertyValueType<TPropertyDef>): void;
|
|
20
25
|
disabled?: boolean;
|
|
26
|
+
propertyStyles?: PropertyStyles;
|
|
21
27
|
}
|
|
22
28
|
export interface IPropertyConfigurationRenderer<TPropertyDef extends PropertyDefinition<any, any, any>> {
|
|
23
29
|
valueBind: PropertyConfiguration<TPropertyDef>;
|
|
@@ -32,3 +38,8 @@ export interface IPropertyConfigurationRenderer<TPropertyDef extends PropertyDef
|
|
|
32
38
|
defaultConfiguration?: PropertyConfiguration<TPropertyDef>;
|
|
33
39
|
multilingualContext?: MultilingualContext;
|
|
34
40
|
}
|
|
41
|
+
export interface PropertyStyles {
|
|
42
|
+
outlined: boolean;
|
|
43
|
+
rounded: boolean;
|
|
44
|
+
filled: boolean;
|
|
45
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { PropertyValue } from "@omnia/fx-models";
|
|
1
|
+
import { PropertyConfiguration, PropertyValue } from "@omnia/fx-models";
|
|
2
2
|
export declare abstract class PropertyValuePrimitiveConverter {
|
|
3
3
|
abstract toPrimitiveString(propertyValue: PropertyValue): string;
|
|
4
|
+
abstract toDisplayString(propertyValue: PropertyValue, propertyConfiguration?: PropertyConfiguration<any>): Promise<string>;
|
|
4
5
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
|
2
|
+
import { LockStatusExcludeChildren, PropertyLockStatusType } from "../../../ux";
|
|
2
3
|
import { PropertyDefinition, PropertyDisplaySettingsBase } from "../PropertyDefinition";
|
|
3
4
|
import { PhoneNumberPropertyValue } from "../values";
|
|
4
5
|
export declare class PhoneDisplaySettings extends PropertyDisplaySettingsBase {
|
|
6
|
+
locks?: PropertyLockStatusType<LockStatusExcludeChildren<Omit<PhoneDisplaySettings, "locks">, "label">>;
|
|
5
7
|
}
|
|
6
8
|
export type PhoneEditorSettings = {
|
|
9
|
+
locks?: PropertyLockStatusType<Omit<PhoneEditorSettings, "locks">>;
|
|
7
10
|
required: boolean;
|
|
11
|
+
multiple?: boolean;
|
|
8
12
|
};
|
|
9
13
|
export declare const PhoneNumberPropertyDefinitionId: Guid;
|
|
10
14
|
export declare class PhoneNumberPropertyDefinition extends PropertyDefinition<PhoneNumberPropertyValue, PhoneDisplaySettings, PhoneEditorSettings> {
|
|
@@ -11,7 +11,7 @@ class SharePointTermSetPropertyValue extends PropertyValue_1.PropertyValue {
|
|
|
11
11
|
this.termIds = termIds;
|
|
12
12
|
}
|
|
13
13
|
containValue(other) {
|
|
14
|
-
if (this?.termIds?.length == 0)
|
|
14
|
+
if (this?.termIds?.length == 0 && other?.termIds?.length == 0)
|
|
15
15
|
return true;
|
|
16
16
|
if (other?.termIds?.length > 0) {
|
|
17
17
|
return this.termIds.filter(termId => other.termIds.findIndex(id => termId.toString() == id.toString()) > -1).length == this.termIds.length;
|
|
@@ -19,10 +19,12 @@ class SharePointTermSetPropertyValue extends PropertyValue_1.PropertyValue {
|
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
21
|
appendValue(other) {
|
|
22
|
-
|
|
23
|
-
other?.termIds?.forEach(termId =>
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
const termIds = this?.termIds || [];
|
|
23
|
+
other?.termIds?.forEach(termId => {
|
|
24
|
+
const exist = termIds.find(q => q.toString() == termId.toString());
|
|
25
|
+
if (!exist) {
|
|
26
|
+
termIds.push(termId);
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
return new SharePointTermSetPropertyValue(termIds);
|
|
28
30
|
}
|
|
@@ -6,7 +6,7 @@ class BirthdayPropertyValue extends PropertyValue_1.PropertyValue {
|
|
|
6
6
|
constructor(birthday, timeZoneId) {
|
|
7
7
|
super();
|
|
8
8
|
this.timeZoneId = timeZoneId;
|
|
9
|
-
this.birthday = birthday.toJSON();
|
|
9
|
+
this.birthday = birthday ? birthday.toJSON() : undefined;
|
|
10
10
|
}
|
|
11
11
|
isEmpty() {
|
|
12
12
|
return !this.birthday;
|
|
@@ -5,8 +5,8 @@ const PropertyValue_1 = require("../PropertyValue");
|
|
|
5
5
|
class DatePropertyValue extends PropertyValue_1.PropertyValue {
|
|
6
6
|
constructor(date, timeZoneId) {
|
|
7
7
|
super();
|
|
8
|
-
this.date = date.toJSON();
|
|
9
|
-
this.timeZoneId = timeZoneId.toString();
|
|
8
|
+
this.date = date ? date.toJSON() : undefined;
|
|
9
|
+
this.timeZoneId = timeZoneId ? timeZoneId.toString() : undefined;
|
|
10
10
|
}
|
|
11
11
|
isEmpty() {
|
|
12
12
|
return this.date == null;
|
|
@@ -6,7 +6,7 @@ class DateTimePropertyValue extends PropertyValue_1.PropertyValue {
|
|
|
6
6
|
constructor(dateTime, timeZoneId) {
|
|
7
7
|
super();
|
|
8
8
|
this.timeZoneId = timeZoneId;
|
|
9
|
-
this.dateTime = dateTime.toJSON();
|
|
9
|
+
this.dateTime = dateTime ? dateTime.toJSON() : undefined;
|
|
10
10
|
}
|
|
11
11
|
isEmpty() {
|
|
12
12
|
return this.dateTime == null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GuidValue } from "@omnia/fx/internal-do-not-import-from-here/shared";
|
|
2
|
+
import { EnterprisePropertyDefinition } from "../enterprise-properties";
|
|
3
|
+
export declare class SemanticSearchQueryableProperty {
|
|
4
|
+
internalName: string;
|
|
5
|
+
dataType: SemanticSearchPropertyDataType;
|
|
6
|
+
constructor(internalName: string, dataType: SemanticSearchPropertyDataType);
|
|
7
|
+
isEnterpriseProperty: () => boolean;
|
|
8
|
+
getProviderInternalName: () => string;
|
|
9
|
+
}
|
|
10
|
+
export declare class SemanticSearchQueryableEnterpriseProperty extends SemanticSearchQueryableProperty {
|
|
11
|
+
constructor(definition: EnterprisePropertyDefinition);
|
|
12
|
+
private static getSemanticSearchDataType;
|
|
13
|
+
}
|
|
14
|
+
export interface SemanticSearchQueryablePropertyCreation {
|
|
15
|
+
internalName: string;
|
|
16
|
+
dataType: SemanticSearchPropertyDataType;
|
|
17
|
+
isEnterpriseProperty: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare enum SemanticSearchPropertyDataType {
|
|
20
|
+
String = 0,
|
|
21
|
+
StringCollection = 1,
|
|
22
|
+
Int32 = 2,
|
|
23
|
+
Int32Collection = 3,
|
|
24
|
+
DateTimeOffset = 4
|
|
25
|
+
}
|
|
26
|
+
export interface SemanticSearchPropertyDefinition {
|
|
27
|
+
property: SemanticSearchQueryableProperty;
|
|
28
|
+
multilingualTitle: string;
|
|
29
|
+
displayTypeTitle: string;
|
|
30
|
+
providerId: GuidValue;
|
|
31
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SemanticSearchPropertyDataType = exports.SemanticSearchQueryableEnterpriseProperty = exports.SemanticSearchQueryableProperty = void 0;
|
|
4
|
+
const Constants_1 = require("../Constants");
|
|
5
|
+
const Enums_1 = require("../Enums");
|
|
6
|
+
class SemanticSearchQueryableProperty {
|
|
7
|
+
constructor(internalName, dataType) {
|
|
8
|
+
this.isEnterpriseProperty = () => this.internalName.startsWith(Constants_1.Constants.aiEngine.semanticSearchEnterprisePropertyPrefix);
|
|
9
|
+
this.getProviderInternalName = () => {
|
|
10
|
+
if (this.isEnterpriseProperty()) {
|
|
11
|
+
return this.internalName.substring(Constants_1.Constants.aiEngine.semanticSearchEnterprisePropertyPrefix.length);
|
|
12
|
+
}
|
|
13
|
+
return this.internalName;
|
|
14
|
+
};
|
|
15
|
+
this.internalName = internalName;
|
|
16
|
+
this.dataType = dataType;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.SemanticSearchQueryableProperty = SemanticSearchQueryableProperty;
|
|
20
|
+
class SemanticSearchQueryableEnterpriseProperty extends SemanticSearchQueryableProperty {
|
|
21
|
+
constructor(definition) {
|
|
22
|
+
const dataType = SemanticSearchQueryableEnterpriseProperty.getSemanticSearchDataType(definition);
|
|
23
|
+
super(Constants_1.Constants.aiEngine.semanticSearchEnterprisePropertyPrefix + definition.internalName, dataType);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.SemanticSearchQueryableEnterpriseProperty = SemanticSearchQueryableEnterpriseProperty;
|
|
27
|
+
SemanticSearchQueryableEnterpriseProperty.getSemanticSearchDataType = (definition) => {
|
|
28
|
+
switch (definition.enterprisePropertyDataType.indexedType) {
|
|
29
|
+
case Enums_1.PropertyIndexedType.Text:
|
|
30
|
+
return SemanticSearchPropertyDataType.String;
|
|
31
|
+
case Enums_1.PropertyIndexedType.Boolean:
|
|
32
|
+
return SemanticSearchPropertyDataType.Int32;
|
|
33
|
+
case Enums_1.PropertyIndexedType.Taxonomy:
|
|
34
|
+
return SemanticSearchPropertyDataType.StringCollection;
|
|
35
|
+
case Enums_1.PropertyIndexedType.DateTime:
|
|
36
|
+
return SemanticSearchPropertyDataType.DateTimeOffset;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
var SemanticSearchPropertyDataType;
|
|
41
|
+
(function (SemanticSearchPropertyDataType) {
|
|
42
|
+
SemanticSearchPropertyDataType[SemanticSearchPropertyDataType["String"] = 0] = "String";
|
|
43
|
+
SemanticSearchPropertyDataType[SemanticSearchPropertyDataType["StringCollection"] = 1] = "StringCollection";
|
|
44
|
+
SemanticSearchPropertyDataType[SemanticSearchPropertyDataType["Int32"] = 2] = "Int32";
|
|
45
|
+
SemanticSearchPropertyDataType[SemanticSearchPropertyDataType["Int32Collection"] = 3] = "Int32Collection";
|
|
46
|
+
SemanticSearchPropertyDataType[SemanticSearchPropertyDataType["DateTimeOffset"] = 4] = "DateTimeOffset";
|
|
47
|
+
})(SemanticSearchPropertyDataType = exports.SemanticSearchPropertyDataType || (exports.SemanticSearchPropertyDataType = {}));
|