@omnia/fx 8.0.248-dev → 8.0.249-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.
@@ -3,11 +3,11 @@ import { JourneyBladeProps } from "./JourneyBlade";
3
3
  import { VNodeChild } from "vue";
4
4
  import { ConstructComponentProps } from "../InternalDefineComponent";
5
5
  import { type OListProps } from "../oxide/list/List";
6
- import { DataTableProps } from "../oxide/datatable/DataTable";
6
+ import { DataTablePropsBase } from "../oxide/datatable/DataTable";
7
7
  import { type JourneyMenuProps } from "./JourneyMenu";
8
8
  type BladeElement = (props: ConstructComponentProps<Omit<JourneyBladeProps, "id" | "getApi">>) => any;
9
9
  type BladeMenuElement = (props: ConstructComponentProps<Omit<JourneyMenuProps, "id" | "getApi">>) => any;
10
- type DatatTableComponentTypings = <T1>(props: ConstructComponentProps<Omit<DataTableProps<T1>, "draggable">>) => any;
10
+ type DatatTableComponentTypings = <T1>(props: ConstructComponentProps<Omit<DataTablePropsBase<T1>, "draggable">>) => any;
11
11
  type ListComponentTypings = <T1>(props: ConstructComponentProps<OListProps<T1>>) => any;
12
12
  export declare function defineBlade<TRoute extends JourneyBladeRoute = {}>(bladeId: guid, renderer?: (blade: BladeElement) => VNodeChild): {
13
13
  readonly Blade: BladeElement;
@@ -1,6 +1,6 @@
1
1
  import { guid, IIcon } from "@omnia/fx-models";
2
2
  import { BladeContext, BladeContexts, BladeSizeTypes, BladeVariantTypes, ConfirmDialogOptions, DefineEmit, DefineProp, DefineSlot, useJourneyStore } from "@omnia/fx/ux";
3
- import { VNodeChild } from "vue";
3
+ import { Ref, VNodeChild } from "vue";
4
4
  export interface SwitchValue {
5
5
  value: boolean;
6
6
  label: string;
@@ -11,7 +11,7 @@ export interface DisabledButtonTooltips {
11
11
  delete?: string;
12
12
  remove?: string;
13
13
  }
14
- export type JourneyBladeProps = DefineProp<"getApi", (store: ReturnType<typeof useJourneyStore>) => void, false, null, "callback to get a reference to the journey store. The store is used to navigate the journey blades."> & DefineProp<"title", string, false, null, "Specify the title of the blade."> & DefineProp<"toned", boolean, false, null, "IF the color is toned"> & DefineProp<"subTitle", string, false, null, "Specify a subtitle for the blade and the title is displayed in a breadcrumb style where the subTittle is prominent."> & DefineProp<"id", guid, true, null, "The id of the blade. Used to identify the blade in the journey store."> & DefineProp<"size", BladeSizeTypes, false, "x-small", "Specify the size of the blade. Small will show the header buttons as icons."> & DefineProp<"loading", boolean, false, false, "Displays linear progress bar."> & DefineProp<"ok", boolean, false, false, "Specify if the blade should show a ok button. If a ok button is shown, a cancel button will also be shown."> & DefineProp<"save", boolean, false, false, "Specify if the blade should show a save button. If a save button is shown, a cancel button will also be shown."> & DefineProp<"searchable", boolean, false, false, "Specify if the blade should show a search field."> & DefineProp<"delete", boolean, false, false, "Specify if the blade should show a delete button."> & DefineProp<"remove", boolean, false, false, "Specify if the blade should show a remove button."> & DefineProp<"disabled", boolean, false, false, "Specify if the blade should shoud be read only."> & DefineProp<"manageList", boolean, false, false, "Specify if the blade shoud be draggable on items."> & DefineProp<"switch", SwitchValue, false, null, "Specify if the blade should show switch."> & DefineProp<"settings", boolean, false, false, "Specify if the blade should show a settings button."> & DefineProp<"create", boolean, false, false, "Specify if the blade should show a create button."> & DefineProp<"add", boolean, false, false, "Specify if the blade should show a add button."> & DefineProp<"bladeContext", BladeContexts | BladeContext, false, null, "Specify context of the journey."> & DefineProp<"icon", IIcon, false, null, "Specify an icon for the blade header. This should be used to hightlight the blade type such as create blades, edit blades etc."> & DefineProp<"variant", BladeVariantTypes, false, null, "Applies a distinct style to the component."> & DefineProp<"onOk", () => boolean | Promise<boolean>, false, null, "Trigger when user click ok, return true if ok to close the blade."> & DefineProp<"onRemove", () => boolean | Promise<boolean>, false, null, "Trigger when user click remove, return true if ok to close the blade."> & DefineProp<"onSave", () => boolean | Promise<boolean>, false, null, "Trigger when user click save, return true if ok to close the blade."> & DefineProp<"onDelete", () => boolean | Promise<boolean>, false, null, "Trigger when user click delete, return true if ok to close the blade."> & DefineProp<"onSwitch", (value: boolean) => boolean | Promise<boolean>, false, null, "Trigger when user toggle switch, return true if ok to close the blade."> & DefineProp<"confirmDeleteDialogOption", ConfirmDialogOptions, false, null, "Specify a set of options for the confirm dialog shown before deleting."> & DefineProp<"disabledButtonTooltips", DisabledButtonTooltips, false, null, "Specify a set of options for the confirm dialog shown before deleting."> & DefineSlot<"actions", () => VNodeChild> & DefineSlot<"actionsFooter", () => VNodeChild> & DefineEmit<"click:create", (id: guid) => true> & DefineEmit<"click:add", (id: guid) => true> & DefineEmit<"click:back", (id: guid) => true> & DefineEmit<"click:cancel", (id: guid) => true> & DefineEmit<"click:settings", (id: guid) => true> & DefineEmit<"click:confirm", () => true> & DefineEmit<"search", (searchText: string) => true> & DefineEmit<"click:manageList", () => true>;
14
+ export type JourneyBladeProps = DefineProp<"getApi", (store: ReturnType<typeof useJourneyStore>) => void, false, null, "callback to get a reference to the journey store. The store is used to navigate the journey blades."> & DefineProp<"title", string, false, null, "Specify the title of the blade."> & DefineProp<"toned", boolean, false, null, "IF the color is toned"> & DefineProp<"subTitle", string, false, null, "Specify a subtitle for the blade and the title is displayed in a breadcrumb style where the subTittle is prominent."> & DefineProp<"id", guid, true, null, "The id of the blade. Used to identify the blade in the journey store."> & DefineProp<"size", BladeSizeTypes, false, "x-small", "Specify the size of the blade. Small will show the header buttons as icons."> & DefineProp<"loading", boolean, false, false, "Displays linear progress bar."> & DefineProp<"ok", boolean, false, false, "Specify if the blade should show a ok button. If a ok button is shown, a cancel button will also be shown."> & DefineProp<"save", boolean, false, false, "Specify if the blade should show a save button. If a save button is shown, a cancel button will also be shown."> & DefineProp<"searchable", boolean, false, false, "Specify if the blade should show a search field."> & DefineProp<"delete", boolean, false, false, "Specify if the blade should show a delete button."> & DefineProp<"remove", boolean, false, false, "Specify if the blade should show a remove button."> & DefineProp<"disabled", boolean, false, false, "Specify if the blade should shoud be read only."> & DefineProp<"manageList", boolean | Ref<boolean>, false, false, "Specify if the blade shoud be draggable on items."> & DefineProp<"switch", SwitchValue, false, null, "Specify if the blade should show switch."> & DefineProp<"settings", boolean, false, false, "Specify if the blade should show a settings button."> & DefineProp<"create", boolean, false, false, "Specify if the blade should show a create button."> & DefineProp<"add", boolean, false, false, "Specify if the blade should show a add button."> & DefineProp<"bladeContext", BladeContexts | BladeContext, false, null, "Specify context of the journey."> & DefineProp<"icon", IIcon, false, null, "Specify an icon for the blade header. This should be used to hightlight the blade type such as create blades, edit blades etc."> & DefineProp<"variant", BladeVariantTypes, false, null, "Applies a distinct style to the component."> & DefineProp<"onOk", () => boolean | Promise<boolean>, false, null, "Trigger when user click ok, return true if ok to close the blade."> & DefineProp<"onRemove", () => boolean | Promise<boolean>, false, null, "Trigger when user click remove, return true if ok to close the blade."> & DefineProp<"onSave", () => boolean | Promise<boolean>, false, null, "Trigger when user click save, return true if ok to close the blade."> & DefineProp<"onDelete", () => boolean | Promise<boolean>, false, null, "Trigger when user click delete, return true if ok to close the blade."> & DefineProp<"onSwitch", (value: boolean) => boolean | Promise<boolean>, false, null, "Trigger when user toggle switch, return true if ok to close the blade."> & DefineProp<"confirmDeleteDialogOption", ConfirmDialogOptions, false, null, "Specify a set of options for the confirm dialog shown before deleting."> & DefineProp<"disabledButtonTooltips", DisabledButtonTooltips, false, null, "Specify a set of options for the confirm dialog shown before deleting."> & DefineSlot<"actions", () => VNodeChild> & DefineSlot<"actionsFooter", () => VNodeChild> & DefineEmit<"click:create", (id: guid) => true> & DefineEmit<"click:add", (id: guid) => true> & DefineEmit<"click:back", (id: guid) => true> & DefineEmit<"click:cancel", (id: guid) => true> & DefineEmit<"click:settings", (id: guid) => true> & DefineEmit<"click:confirm", () => true> & DefineEmit<"search", (searchText: string) => true> & DefineEmit<"click:manageList", () => true>;
15
15
  declare const _default: (props: import("@omnia/fx/ux").ConstructComponentProps<JourneyBladeProps>) => {
16
16
  $: import("vue").ComponentInternalInstance;
17
17
  $data: {};
@@ -104,7 +104,7 @@ export declare const useJourneyStore: () => {
104
104
  readonly Blade: (props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../JourneyBlade").JourneyBladeProps, "id" | "getApi">>) => any;
105
105
  readonly Menu: (props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../JourneyMenu").JourneyMenuProps, "id" | "getApi">>) => any;
106
106
  readonly ManageList: <T1>(props: import("@omnia/fx/ux").ConstructComponentProps<import("../../oxide/list/List").OListProps<T1>>) => any;
107
- readonly ManageDataTable: <T1_1>(props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../../oxide/datatable/DataTable").DataTableProps<T1_1>, "draggable">>) => any;
107
+ readonly ManageDataTable: <T1_1>(props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../../oxide/datatable/DataTable").DataTablePropsBase<T1_1>, "draggable">>) => any;
108
108
  id: guid;
109
109
  readonly route: import("@omnia/fx-models").JourneyBladeRoute;
110
110
  moveNext(): void;
@@ -147,7 +147,7 @@ export declare const useJourneyStore: () => {
147
147
  readonly Blade: (props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../JourneyBlade").JourneyBladeProps, "id" | "getApi">>) => any;
148
148
  readonly Menu: (props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../JourneyMenu").JourneyMenuProps, "id" | "getApi">>) => any;
149
149
  readonly ManageList: <T1>(props: import("@omnia/fx/ux").ConstructComponentProps<import("../../oxide/list/List").OListProps<T1>>) => any;
150
- readonly ManageDataTable: <T1_1>(props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../../oxide/datatable/DataTable").DataTableProps<T1_1>, "draggable">>) => any;
150
+ readonly ManageDataTable: <T1_1>(props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../../oxide/datatable/DataTable").DataTablePropsBase<T1_1>, "draggable">>) => any;
151
151
  id: guid;
152
152
  readonly route: import("@omnia/fx-models").JourneyBladeRoute;
153
153
  moveNext(): void;
@@ -190,7 +190,7 @@ export declare const useJourneyStore: () => {
190
190
  readonly Blade: (props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../JourneyBlade").JourneyBladeProps, "id" | "getApi">>) => any;
191
191
  readonly Menu: (props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../JourneyMenu").JourneyMenuProps, "id" | "getApi">>) => any;
192
192
  readonly ManageList: <T1>(props: import("@omnia/fx/ux").ConstructComponentProps<import("../../oxide/list/List").OListProps<T1>>) => any;
193
- readonly ManageDataTable: <T1_1>(props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../../oxide/datatable/DataTable").DataTableProps<T1_1>, "draggable">>) => any;
193
+ readonly ManageDataTable: <T1_1>(props: import("@omnia/fx/ux").ConstructComponentProps<Omit<import("../../oxide/datatable/DataTable").DataTablePropsBase<T1_1>, "draggable">>) => any;
194
194
  id: guid;
195
195
  readonly route: import("@omnia/fx-models").JourneyBladeRoute;
196
196
  moveNext(): void;
@@ -1,15 +1,11 @@
1
- import { VelcronAppDefinition } from "@omnia/fx-models";
2
- export type TextNode = {
3
- type: "text";
4
- content: string;
5
- format?: Array<"b" | "i" | "s">;
6
- body: Array<TextNode>;
7
- };
8
- export type LinkNode = TextNode & {
9
- type: "link";
10
- href: string;
11
- };
12
- export type VelcronNode = {
13
- type: "velcron";
14
- definition: VelcronAppDefinition;
15
- };
1
+ export interface EditorContent {
2
+ version: string;
3
+ nodes: EditorNode[];
4
+ }
5
+ export interface EditorNode {
6
+ type: string;
7
+ name: string;
8
+ data?: any;
9
+ content?: string;
10
+ children?: EditorNode[];
11
+ }
@@ -0,0 +1,33 @@
1
+ export interface ExtractedMarkdownPart {
2
+ type: "inline" | "component" | "text" | string;
3
+ content: string;
4
+ children?: ExtractedMarkdownPart[];
5
+ name?: string;
6
+ matchedRule?: MarkdownParserRule;
7
+ }
8
+ export interface ExtractedTagMarkdownPart extends ExtractedMarkdownPart {
9
+ attributes: Array<MarkdownTagAttribute>;
10
+ }
11
+ export interface MarkdownTagAttribute {
12
+ name: string;
13
+ value: string;
14
+ }
15
+ export interface MarkdownItemParser {
16
+ rules: Array<MarkdownParserRule>;
17
+ excludedMatchPatterns?: Array<string>;
18
+ }
19
+ export interface MarkdownParserContext {
20
+ markdown: string;
21
+ parsedResult: ExtractedMarkdownPart[];
22
+ match: {
23
+ rule: MarkdownParserRule;
24
+ result: RegExpExecArray;
25
+ };
26
+ childParser: (markdown: any) => Array<ExtractedMarkdownPart>;
27
+ }
28
+ export interface MarkdownParserRule {
29
+ name: string;
30
+ regex: RegExp;
31
+ mark?: string;
32
+ parse: (context: MarkdownParserContext) => string;
33
+ }
@@ -1,15 +1,11 @@
1
1
  import { MarkdownEditorActionRegistration } from "@omnia/fx-models";
2
2
  import { useMarkdownStore } from "../stores/MarkdownStore";
3
- export interface MdNode {
4
- startMark: string;
5
- endMark?: string;
6
- content?: string;
7
- }
3
+ import { EditorNode } from "./EditorModels";
8
4
  export interface MarkdownPlugin {
9
5
  name: string;
10
6
  type: "inline" | "component";
11
- toMarkdown: (el: HTMLElement) => MdNode;
12
- toHtml: (el: HTMLDivElement, data: string | object, ctx: MarkdownPluginContext) => HTMLDivElement;
7
+ toJSON: (el: HTMLElement) => EditorNode;
8
+ toHtml: (node: EditorNode, ctx: MarkdownPluginContext) => HTMLElement;
13
9
  commands?: object;
14
10
  actions?: Array<MarkdownEditorActionRegistration>;
15
11
  }
@@ -1,6 +1,7 @@
1
1
  import { MarkdownPlugin } from "../models/MarkdownPlugin";
2
2
  export declare function useHtmlParser(state: {
3
3
  editor: HTMLDivElement;
4
- }, plugins: Array<MarkdownPlugin>): {
5
- toMarkdown: () => string;
4
+ plugins: Array<MarkdownPlugin>;
5
+ }): {
6
+ toJSONString: () => string;
6
7
  };
@@ -0,0 +1,7 @@
1
+ import { EditorContent } from "../models/EditorModels";
2
+ import { MarkdownPluginContext } from "../models/MarkdownPlugin";
3
+ export declare function useJSONParser(state: {
4
+ editor: HTMLDivElement;
5
+ }, pluginContext: MarkdownPluginContext): {
6
+ loadJSONToEditor: (editorContent: EditorContent) => any;
7
+ };
@@ -1,7 +0,0 @@
1
- import { useEditorCommands } from "../commands/EditorCommands";
2
- import { MarkdownPlugin, MarkdownPluginContext } from "../models/MarkdownPlugin";
3
- export declare function useMarkdownParser(state: {
4
- editor: HTMLDivElement;
5
- }, plugins: Array<MarkdownPlugin>, editorCommands: ReturnType<typeof useEditorCommands>, pluginContext: MarkdownPluginContext): {
6
- toHtml: (markdown: string) => string;
7
- };
@@ -3,6 +3,7 @@ import { MarkdownPlugin, MarkdownPluginContext } from "../models/MarkdownPlugin"
3
3
  export declare const useMarkdownStore: () => {
4
4
  state: {
5
5
  markdownContent: string;
6
+ plugins: MarkdownPlugin[];
6
7
  editMode: boolean;
7
8
  toolbarActions: MarkdownEditorActionRegistration[];
8
9
  editor: HTMLDivElement;
@@ -13,6 +14,7 @@ export declare const useMarkdownStore: () => {
13
14
  };
14
15
  events: {
15
16
  onMutatedMarkdownContent: import("@omnia/fx-models/internal-do-not-import-from-here/shared").MessageBusExposeOnlySubscription<string>;
17
+ onMutatedPlugins: import("@omnia/fx-models/internal-do-not-import-from-here/shared").MessageBusExposeOnlySubscription<MarkdownPlugin[]>;
16
18
  onMutatedEditMode: import("@omnia/fx-models/internal-do-not-import-from-here/shared").MessageBusExposeOnlySubscription<boolean>;
17
19
  onMutatedToolbarActions: import("@omnia/fx-models/internal-do-not-import-from-here/shared").MessageBusExposeOnlySubscription<MarkdownEditorActionRegistration[]>;
18
20
  onMutatedEditor: import("@omnia/fx-models/internal-do-not-import-from-here/shared").MessageBusExposeOnlySubscription<HTMLDivElement>;
@@ -23,14 +25,14 @@ export declare const useMarkdownStore: () => {
23
25
  } & Record<string, import("@omnia/fx-models").IMessageBusTopicPublishSubscriber<any>>;
24
26
  actions: {
25
27
  onDispatching: {
26
- registerPlugin: {
27
- subscribe(fn: (pluginSettings: MarkdownPluginSettings) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
28
+ registerPlugins: {
29
+ subscribe(fn: (pluginSettings: MarkdownPluginSettings | MarkdownPluginSettings[]) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
28
30
  };
29
31
  toMarkdown: {
30
32
  subscribe(fn: () => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
31
33
  };
32
34
  setContent: {
33
- subscribe(fn: (markdown: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
35
+ subscribe(fn: (content: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
34
36
  };
35
37
  setEditorMode: {
36
38
  subscribe(fn: (editMode: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
@@ -55,14 +57,14 @@ export declare const useMarkdownStore: () => {
55
57
  };
56
58
  };
57
59
  onDispatched: {
58
- registerPlugin: {
59
- subscribe(fn: (result: void, pluginSettings: MarkdownPluginSettings) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
60
+ registerPlugins: {
61
+ subscribe(fn: (result: void, pluginSettings: MarkdownPluginSettings | MarkdownPluginSettings[]) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
60
62
  };
61
63
  toMarkdown: {
62
64
  subscribe(fn: (result: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
63
65
  };
64
66
  setContent: {
65
- subscribe(fn: (result: void, markdown: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
67
+ subscribe(fn: (result: void, content: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
66
68
  };
67
69
  setEditorMode: {
68
70
  subscribe(fn: (result: void, editMode: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
@@ -100,14 +102,14 @@ export declare const useMarkdownStore: () => {
100
102
  };
101
103
  };
102
104
  onFailure: {
103
- registerPlugin: {
104
- subscribe(fn: (failureReason: any, pluginSettings: MarkdownPluginSettings) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
105
+ registerPlugins: {
106
+ subscribe(fn: (failureReason: any, pluginSettings: MarkdownPluginSettings | MarkdownPluginSettings[]) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
105
107
  };
106
108
  toMarkdown: {
107
109
  subscribe(fn: (failureReason: any) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
108
110
  };
109
111
  setContent: {
110
- subscribe(fn: (failureReason: any, markdown: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
112
+ subscribe(fn: (failureReason: any, content: string) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
111
113
  };
112
114
  setEditorMode: {
113
115
  subscribe(fn: (failureReason: any, editMode: boolean) => void): import("@omnia/fx-models").IMessageBusSubscriptionHandler;
@@ -132,9 +134,9 @@ export declare const useMarkdownStore: () => {
132
134
  };
133
135
  };
134
136
  } & {
135
- registerPlugin: (pluginSettings: MarkdownPluginSettings) => void;
137
+ registerPlugins: (pluginSettings: MarkdownPluginSettings | MarkdownPluginSettings[]) => Promise<void>;
136
138
  toMarkdown: () => string;
137
- setContent: (markdown: string) => void;
139
+ setContent: (content: string) => void;
138
140
  setEditorMode: (editMode: boolean) => void;
139
141
  setEditorContainer: (el: HTMLDivElement) => void;
140
142
  registerPluginContext: (ctx: MarkdownPluginContext) => void;