@omnia/fx 7.11.19 → 7.11.23
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/events/package.json +1 -1
- package/internal-do-not-import-from-here/ux/UxModels.d.ts +5 -0
- package/internal-do-not-import-from-here/ux/icon/IconPresets.d.ts +1 -0
- package/internal-do-not-import-from-here/ux/layoutcanvas/editor/developertools/DeveloperTools.d.ts +28 -4
- package/internal-do-not-import-from-here/ux/layoutcanvas/editor/developertools/DeveloperToolsStyles.css.d.ts +8 -0
- package/internal-do-not-import-from-here/ux/layoutcanvas/shared/LayoutDefinitionValidator.d.ts +67 -0
- package/internal-do-not-import-from-here/ux/layoutcanvas/shared/LayoutManager.d.ts +5 -4
- package/internal-do-not-import-from-here/ux/layoutcanvas/stores/BlockCatalogStore.d.ts +6 -0
- package/internal-do-not-import-from-here/ux/profilecard/loc/localize.d.ts +1 -0
- package/internal-do-not-import-from-here/ux/richtexteditor/TextCompletionPanel/TextCompletionPanel.d.ts +4 -0
- package/internal-do-not-import-from-here/ux/richtexteditor/extensions/TextCompletion/TextCompletionHandler.d.ts +13 -2
- package/internal-do-not-import-from-here/ux/richtexteditor/extensions/TextCompletion/TextCompletionMenu.d.ts +1 -0
- package/internal-do-not-import-from-here/ux/richtexteditor/extensions/TextCompletion/TextCompletionToolbar.d.ts +1 -0
- package/messaging/package.json +1 -1
- package/models/package.json +1 -1
- package/package.json +2 -2
- package/services/package.json +1 -1
- package/sp/models/package.json +1 -1
- package/sp/package.json +1 -1
- package/spfx/package.json +1 -1
- package/spfx/tooling/package.json +1 -1
- package/stores/package.json +1 -1
- package/ux/admin/package.json +1 -1
- package/ux/app/package.json +1 -1
- package/ux/editor/package.json +1 -1
- package/ux/package.json +1 -1
- package/ux/richtexteditor/package.json +1 -1
- package/ux/vuetify/package.json +1 -1
- package/internal-do-not-import-from-here/workers/OmniaHubWorker.d.ts +0 -1
package/events/package.json
CHANGED
package/internal-do-not-import-from-here/ux/layoutcanvas/editor/developertools/DeveloperTools.d.ts
CHANGED
|
@@ -1,24 +1,48 @@
|
|
|
1
1
|
import { IWebComponentInstance } from "@omnia/fx";
|
|
2
2
|
import Vue from "vue";
|
|
3
3
|
import { OmniaTheming } from "@omnia/fx/ux";
|
|
4
|
-
import {
|
|
4
|
+
import { LayoutValidationIssue } from "@omnia/fx-models";
|
|
5
|
+
import { BlockCatalogStore, LayoutCanvasStore } from "../../";
|
|
5
6
|
import { IDeveloperTools } from "./IDeveloperTools";
|
|
7
|
+
interface ValidationState {
|
|
8
|
+
hasRun: boolean;
|
|
9
|
+
issues: LayoutValidationIssue[];
|
|
10
|
+
}
|
|
6
11
|
export default class DeveloperToolsComponent extends Vue implements IWebComponentInstance, IDeveloperTools {
|
|
7
12
|
private tabs;
|
|
8
13
|
private idForTextAreaToCopyToClipboard;
|
|
9
14
|
visible: boolean;
|
|
10
15
|
layoutCanvasStore: LayoutCanvasStore;
|
|
16
|
+
blockCatalogStore: BlockCatalogStore;
|
|
11
17
|
omniaTheming: OmniaTheming;
|
|
12
18
|
private model;
|
|
19
|
+
onVisibleChanged(value: boolean, wasVisible: boolean): void;
|
|
13
20
|
mounted(): void;
|
|
14
21
|
onUploadCompleted(): void;
|
|
15
|
-
onRestartImport(): void;
|
|
22
|
+
onRestartImport(clearInput?: boolean): void;
|
|
16
23
|
onUpdateImportedDefinition(): void;
|
|
17
24
|
onCopyToClipBoard(): void;
|
|
18
25
|
onUpdatePageDefinition(): void;
|
|
19
|
-
onGetPageDefinition(): void;
|
|
20
|
-
|
|
26
|
+
onGetPageDefinition(clearValidation?: boolean): void;
|
|
27
|
+
onCurrentDefinitionChanged(newValue: string): void;
|
|
28
|
+
onImportDefinitionChanged(newValue: string): void;
|
|
29
|
+
showSnackbar(message: string): void;
|
|
30
|
+
canOpenImportStep(step: number): boolean;
|
|
31
|
+
openImportStep(step: number): void;
|
|
32
|
+
onImportStepKeydown(event: KeyboardEvent, step: number): void;
|
|
33
|
+
private copyTextWithFallback;
|
|
34
|
+
private applyValidatedDefinition;
|
|
35
|
+
private getBlockRegistrations;
|
|
36
|
+
private getUnavailableBlockManifestIds;
|
|
37
|
+
private getLayoutDefinitionContext;
|
|
38
|
+
private requiresLayoutDefinitionContext;
|
|
39
|
+
private serializeDefinition;
|
|
40
|
+
private validateDefinition;
|
|
41
|
+
private setValidationState;
|
|
42
|
+
private clearValidationState;
|
|
43
|
+
renderValidationSummary(state: ValidationState): VueTsxSupport.JSX.Element;
|
|
21
44
|
renderCurrentDefinitionTab(): VueTsxSupport.JSX.Element;
|
|
22
45
|
renderImportDefinitionTab(): VueTsxSupport.JSX.Element;
|
|
23
46
|
render(): VueTsxSupport.JSX.Element;
|
|
24
47
|
}
|
|
48
|
+
export {};
|
|
@@ -7,11 +7,19 @@ export declare const IFrameDimension: {
|
|
|
7
7
|
};
|
|
8
8
|
export declare const DeveloperToolsStyles: {
|
|
9
9
|
stepWrapper: string;
|
|
10
|
+
disabledStep: string;
|
|
11
|
+
nonInteractiveStep: string;
|
|
10
12
|
container: string;
|
|
13
|
+
tabContent: string;
|
|
11
14
|
buttonContainer: string;
|
|
12
15
|
buttonStepperContent: string;
|
|
13
16
|
textarea: string;
|
|
14
17
|
omniaJsonViewer: string;
|
|
15
18
|
omniaJsonIFrame: string;
|
|
16
19
|
editor: string;
|
|
20
|
+
editorWithValidation: string;
|
|
21
|
+
validationSummary: string;
|
|
22
|
+
validationTitle: string;
|
|
23
|
+
validationCounts: string;
|
|
24
|
+
issueList: string;
|
|
17
25
|
};
|
package/internal-do-not-import-from-here/ux/layoutcanvas/shared/LayoutDefinitionValidator.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { BlockRegistration, ImportLayoutResult, Layout, LayoutDefinitionContext } from "@omnia/fx-models";
|
|
2
|
+
export type LayoutDefinitionValidationMode = "current" | "import" | "preparedImport";
|
|
3
|
+
export interface LayoutDefinitionValidationOptions {
|
|
4
|
+
blockCatalogLoaded?: boolean;
|
|
5
|
+
blockRegistrations?: BlockRegistration[];
|
|
6
|
+
mode?: LayoutDefinitionValidationMode;
|
|
7
|
+
preparedImportContext?: LayoutDefinitionContext;
|
|
8
|
+
preparedImportLayout?: Layout;
|
|
9
|
+
requireBlockCatalog?: boolean;
|
|
10
|
+
requireTargetContext?: boolean;
|
|
11
|
+
targetContext?: LayoutDefinitionContext;
|
|
12
|
+
unavailableBlockManifestIds?: string[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Validates a raw layout definition and only returns a layout when every hard
|
|
16
|
+
* invariant is satisfied. Repairs are deliberately limited to deterministic
|
|
17
|
+
* structural changes. Arbitrary values inside block settings are preserved
|
|
18
|
+
* because GUID-looking values there can be legitimate content IDs, except for
|
|
19
|
+
* registration-declared protected values such as executable block content.
|
|
20
|
+
*/
|
|
21
|
+
export declare class LayoutDefinitionValidator {
|
|
22
|
+
static validateAndRepairFromJsonString(json: string, currentLayout: Layout, options?: LayoutDefinitionValidationOptions): ImportLayoutResult;
|
|
23
|
+
private static validateAndRepair;
|
|
24
|
+
private static repairRootDefinition;
|
|
25
|
+
private static sanitizeChildren;
|
|
26
|
+
private static normalizeSectionType;
|
|
27
|
+
private static validateAndRepairBlock;
|
|
28
|
+
private static normalizeBlockSettings;
|
|
29
|
+
private static protectBlockSettings;
|
|
30
|
+
private static getCurrentBlockSettings;
|
|
31
|
+
private static getNestedSettingValue;
|
|
32
|
+
private static setNestedSettingValue;
|
|
33
|
+
private static getSourceBlockSettings;
|
|
34
|
+
private static migrateLegacyBlockSettings;
|
|
35
|
+
private static normalizeThemeDefinitions;
|
|
36
|
+
private static repairStructuralReferences;
|
|
37
|
+
private static validatePostconditions;
|
|
38
|
+
private static validateSafeObjectKeys;
|
|
39
|
+
private static collectBaselineItems;
|
|
40
|
+
private static getKnownNonRootItemStats;
|
|
41
|
+
private static hasInheritedLayoutItems;
|
|
42
|
+
private static collectThemeIds;
|
|
43
|
+
private static validateInheritedItemsPresent;
|
|
44
|
+
private static collectOwnerLayoutItemOverrides;
|
|
45
|
+
private static createBlockRegistrationMaps;
|
|
46
|
+
private static ensureItemsArray;
|
|
47
|
+
private static readBlockChildren;
|
|
48
|
+
private static ensureSettingsObject;
|
|
49
|
+
private static repairItemType;
|
|
50
|
+
private static repairValue;
|
|
51
|
+
private static repairOptionalStructuralReference;
|
|
52
|
+
private static removeRootStructuralReference;
|
|
53
|
+
private static normalizeItemType;
|
|
54
|
+
private static isAllowedChild;
|
|
55
|
+
private static toSectionType;
|
|
56
|
+
private static validateDefinitionContexts;
|
|
57
|
+
private static normalizeLayoutDefinitionContext;
|
|
58
|
+
private static describeLayoutDefinitionContext;
|
|
59
|
+
private static normalizeGuid;
|
|
60
|
+
private static createUniqueGuid;
|
|
61
|
+
private static isPlainObject;
|
|
62
|
+
private static cloneJson;
|
|
63
|
+
private static jsonEquals;
|
|
64
|
+
private static hasErrors;
|
|
65
|
+
private static addIssue;
|
|
66
|
+
private static createResult;
|
|
67
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ImportLayoutResult, Block, Section } from "../../../models";
|
|
2
2
|
import { Layout, LayoutItem } from "@omnia/fx-models";
|
|
3
3
|
import { LayoutCanvasStore } from "..";
|
|
4
|
+
import { LayoutDefinitionValidationOptions } from "./LayoutDefinitionValidator";
|
|
4
5
|
/**
|
|
5
6
|
* Manager to handle the layout
|
|
6
7
|
*/
|
|
@@ -11,14 +12,14 @@ export declare class LayoutManager {
|
|
|
11
12
|
* @param ownerLayoutId is the new ownerLayoutId to set
|
|
12
13
|
*/
|
|
13
14
|
static copyLayout(layout: Layout, layoutId?: string): Layout;
|
|
14
|
-
private static MigrateOldSettingsOnImport;
|
|
15
|
-
private static RemoveLayoutBackgroundImage;
|
|
16
|
-
private static MigrateBlockSettings;
|
|
17
15
|
/**
|
|
16
|
+
* Validates and repairs a JSON layout against the current canvas before it
|
|
17
|
+
* can be applied. Import mode is the safe default for compatibility with
|
|
18
|
+
* the original API; direct edits opt into current-layout mode explicitly.
|
|
18
19
|
* Imports a layout and applies all the ids from the current page layout
|
|
19
20
|
* @param pageLayoutDataString to import
|
|
20
21
|
*/
|
|
21
|
-
static importLayoutFromJsonString(layoutCanvasStore: LayoutCanvasStore, pageLayoutDataString: string): ImportLayoutResult;
|
|
22
|
+
static importLayoutFromJsonString(layoutCanvasStore: LayoutCanvasStore, pageLayoutDataString: string, options?: LayoutDefinitionValidationOptions): ImportLayoutResult;
|
|
22
23
|
/**
|
|
23
24
|
* Updates the ownerLayoutId for all layout items and its siblings
|
|
24
25
|
* @param layoutItem to update
|
|
@@ -13,6 +13,10 @@ export declare class BlockCatalogStore extends Store {
|
|
|
13
13
|
* State
|
|
14
14
|
*/
|
|
15
15
|
registrations: import("../../../stores").StoreState<LayoutItemRegistration[]>;
|
|
16
|
+
private registrationsLoaded;
|
|
17
|
+
private registrationsLoadPromise;
|
|
18
|
+
private sectionsLoaded;
|
|
19
|
+
private readonly loadedServiceIds;
|
|
16
20
|
onActivated(): void;
|
|
17
21
|
onDisposing(): void;
|
|
18
22
|
areItemsLoaded(): boolean;
|
|
@@ -52,6 +56,8 @@ export declare class BlockCatalogStore extends Store {
|
|
|
52
56
|
* Loads the blocks registered
|
|
53
57
|
*/
|
|
54
58
|
private loadBlocks;
|
|
59
|
+
private loadBlocksForService;
|
|
60
|
+
private getServiceIdKey;
|
|
55
61
|
/**
|
|
56
62
|
* Loads the default sections
|
|
57
63
|
*/
|
|
@@ -4,15 +4,19 @@ export declare const StepRowStyle: {
|
|
|
4
4
|
};
|
|
5
5
|
declare const _default: (import("vue").VueConstructor<import("vue-tsx-support")._TsxComponentInstanceV3<import("vue/types/umd"), {}, import("vue-tsx-support").PropsForOutside<{
|
|
6
6
|
triggerOnLoad: boolean;
|
|
7
|
+
closePanel: () => void;
|
|
7
8
|
}, never>, any, any, any>> & {
|
|
8
9
|
propsDefinition: import("vue-tsx-support").PropsForOutside<{
|
|
9
10
|
triggerOnLoad: boolean;
|
|
11
|
+
closePanel: () => void;
|
|
10
12
|
}, never>;
|
|
11
13
|
}) | (import("vue").VueConstructor<import("vue-tsx-support")._TsxComponentInstanceV3<import("vue/types/umd") & import("vue").ShallowUnwrapRef<() => VueTsxSupport.JSX.Element>, {}, import("vue-tsx-support").PropsForOutside<{
|
|
12
14
|
triggerOnLoad: boolean;
|
|
15
|
+
closePanel: () => void;
|
|
13
16
|
}, never>, any, any, any>> & {
|
|
14
17
|
propsDefinition: import("vue-tsx-support").PropsForOutside<{
|
|
15
18
|
triggerOnLoad: boolean;
|
|
19
|
+
closePanel: () => void;
|
|
16
20
|
}, never>;
|
|
17
21
|
});
|
|
18
22
|
export default _default;
|
|
@@ -12,12 +12,19 @@ export declare class TextCompletionHandler extends Store {
|
|
|
12
12
|
private prompt;
|
|
13
13
|
private forceClose;
|
|
14
14
|
private selectedText;
|
|
15
|
+
private dialogVisible;
|
|
16
|
+
private dialogTriggerOnLoad;
|
|
15
17
|
openAiService: AzureOpenAIService;
|
|
16
18
|
omniaContext: OmniaContext;
|
|
19
|
+
openTextCompletionUI(hostElement: Element, sidePanelContext: SidePanelContext, editor: TipTapEditor, menuBar: TextCompletionMenuBar, triggerOnLoad?: boolean): void;
|
|
17
20
|
onClickOpenEvent(sidePanelContext: SidePanelContext, editor: TipTapEditor, menuBar: TextCompletionMenuBar): void;
|
|
18
21
|
ensureOpenPanel(sidePanelContext: SidePanelContext, editor: TipTapEditor, menuBar: TextCompletionMenuBar, triggerOnLoad?: boolean): void;
|
|
19
|
-
ensureClosePanel(sidePanelContext: SidePanelContext): void;
|
|
20
|
-
forceClosePanel(sidePanelContext: SidePanelContext): void;
|
|
22
|
+
ensureClosePanel(sidePanelContext: SidePanelContext | null): void;
|
|
23
|
+
forceClosePanel(sidePanelContext: SidePanelContext | null): void;
|
|
24
|
+
setDialogContext(editor: TipTapEditor, menuBar: TextCompletionMenuBar): void;
|
|
25
|
+
openDialog(editor: TipTapEditor, menuBar: TextCompletionMenuBar, triggerOnLoad: boolean): void;
|
|
26
|
+
closeDialog(): void;
|
|
27
|
+
private isTextCompletionInDialogMode;
|
|
21
28
|
getters: {
|
|
22
29
|
getEditor: () => TipTapEditor;
|
|
23
30
|
getOnContentChanged: () => (content: string) => void;
|
|
@@ -25,6 +32,8 @@ export declare class TextCompletionHandler extends Store {
|
|
|
25
32
|
prompt: () => string;
|
|
26
33
|
forceClose: () => boolean;
|
|
27
34
|
selectedText: () => string;
|
|
35
|
+
dialogVisible: () => boolean;
|
|
36
|
+
dialogTriggerOnLoad: () => boolean;
|
|
28
37
|
};
|
|
29
38
|
setters: {
|
|
30
39
|
setEditor: (editor: TipTapEditor) => TipTapEditor;
|
|
@@ -35,6 +44,8 @@ export declare class TextCompletionHandler extends Store {
|
|
|
35
44
|
prompt: import("@omnia/fx/stores").StoreMutation<(prompt: string) => void, (prompt: string) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
|
|
36
45
|
forceClose: import("@omnia/fx/stores").StoreMutation<(forceClose: boolean) => void, (forceClose: boolean) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
|
|
37
46
|
selectedText: import("@omnia/fx/stores").StoreMutation<(prompt: string) => void, (prompt: string) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
|
|
47
|
+
dialogVisible: import("@omnia/fx/stores").StoreMutation<(visible: boolean) => void, (visible: boolean) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
|
|
48
|
+
dialogTriggerOnLoad: import("@omnia/fx/stores").StoreMutation<(triggerOnLoad: boolean) => void, (triggerOnLoad: boolean) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
|
|
38
49
|
};
|
|
39
50
|
actions: {
|
|
40
51
|
validateCount: import("@omnia/fx/stores").StoreAction<unknown, (text: string) => void, (result: number, text: string) => void, (failureReason: any, text: string) => void, (text: string) => Promise<number>>;
|
|
@@ -36,5 +36,6 @@ export default class TextCompletionMenu extends ToolbarExtension implements Text
|
|
|
36
36
|
renderLoadingMenu(): VueTsxSupport.JSX.Element;
|
|
37
37
|
renderMenu(isAnimatedGif: boolean, validated?: boolean): VueTsxSupport.JSX.Element;
|
|
38
38
|
renderDefaultButtonBehavior(isAnimatedGif: boolean): VueTsxSupport.JSX.Element;
|
|
39
|
+
private renderTextCompletionDialog;
|
|
39
40
|
render(): VueTsxSupport.JSX.Element;
|
|
40
41
|
}
|
package/messaging/package.json
CHANGED
package/models/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnia/fx",
|
|
3
3
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
4
|
-
"version": "7.11.
|
|
4
|
+
"version": "7.11.23",
|
|
5
5
|
"description": "Provide Omnia Fx typings and tooling for clientside Omnia development.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"author": "Omnia Digital Workplace AB",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@omnia/fx-models": "7.11.
|
|
23
|
+
"@omnia/fx-models": "7.11.23",
|
|
24
24
|
"@microsoft/signalr": "6.0.1",
|
|
25
25
|
"broadcast-channel": "4.8.0",
|
|
26
26
|
"dayjs": "1.10.7",
|
package/services/package.json
CHANGED
package/sp/models/package.json
CHANGED
package/sp/package.json
CHANGED
package/spfx/package.json
CHANGED
package/stores/package.json
CHANGED
package/ux/admin/package.json
CHANGED
package/ux/app/package.json
CHANGED
package/ux/editor/package.json
CHANGED
package/ux/package.json
CHANGED
package/ux/vuetify/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|