myrta-ui 1.1.77 → 1.1.78

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 (32) hide show
  1. package/esm2020/lib/components/button/button.component.mjs +17 -4
  2. package/esm2020/lib/components/button/button.enum.mjs +1 -1
  3. package/esm2020/lib/components/button/button.module.mjs +5 -4
  4. package/esm2020/lib/components/form/document-editor/document-editor.component.mjs +1 -1
  5. package/esm2020/lib/components/form/formula-editor/formula-editor.component.mjs +2 -2
  6. package/esm2020/lib/components/form/input-file/input-file.component.mjs +3 -3
  7. package/esm2020/lib/components/form/input-file-image/components/file-image-edit-modal/file-image-edit-modal.component.mjs +1 -1
  8. package/esm2020/lib/components/form/input-file-image/input-file-image.component.mjs +2 -2
  9. package/esm2020/lib/components/form/input-select/input-select.component.mjs +2 -2
  10. package/esm2020/lib/components/form/json-editor/json-editor.component.mjs +222 -0
  11. package/esm2020/lib/components/form/json-editor/json-editor.enum.mjs +2 -0
  12. package/esm2020/lib/components/form/json-editor/json-editor.module.mjs +26 -0
  13. package/esm2020/lib/components/form/json-editor/utils/jsoneditoroptions.mjs +17 -0
  14. package/esm2020/lib/components/gallery/components/gallery-confirm-modal/gallery-confirm-modal.component.mjs +1 -1
  15. package/esm2020/lib/components/gallery/gallery.component.mjs +1 -1
  16. package/esm2020/lib/components/modal/modal.component.mjs +2 -2
  17. package/esm2020/lib/components/pdf-viewer/pdf-viewer.component.mjs +12 -5
  18. package/esm2020/public-api.mjs +5 -1
  19. package/fesm2015/myrta-ui.mjs +298 -22
  20. package/fesm2015/myrta-ui.mjs.map +1 -1
  21. package/fesm2020/myrta-ui.mjs +298 -22
  22. package/fesm2020/myrta-ui.mjs.map +1 -1
  23. package/lib/components/button/button.component.d.ts +8 -2
  24. package/lib/components/button/button.enum.d.ts +1 -0
  25. package/lib/components/button/button.module.d.ts +2 -1
  26. package/lib/components/form/json-editor/json-editor.component.d.ts +58 -0
  27. package/lib/components/form/json-editor/json-editor.enum.d.ts +5 -0
  28. package/lib/components/form/json-editor/json-editor.module.d.ts +8 -0
  29. package/lib/components/form/json-editor/utils/jsoneditoroptions.d.ts +128 -0
  30. package/lib/components/pdf-viewer/pdf-viewer.component.d.ts +1 -0
  31. package/package.json +1 -1
  32. package/public-api.d.ts +4 -0
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { LoaderColorTypes, LoaderSizesTypes } from '../loader/loader.enum';
3
- import { ButtonAttrTypes, ButtonColorsTypes, ButtonIconPositionTypes, ButtonSizesTypes, ButtonTypes } from './button.enum';
3
+ import { ButtonAttrTypes, ButtonColorsTypes, ButtonIconPositionTypes, ButtonSizesTypes, ButtonTargetTypes, ButtonTypes } from './button.enum';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class ButtonComponent {
6
6
  size: ButtonSizesTypes;
@@ -16,6 +16,12 @@ export declare class ButtonComponent {
16
16
  icon: string;
17
17
  iconClass: string;
18
18
  buttonType: ButtonAttrTypes;
19
+ href: string;
20
+ target: ButtonTargetTypes;
21
+ routerLink: string;
22
+ queryParams: {
23
+ [key: string]: string;
24
+ };
19
25
  mrxClick: EventEmitter<MouseEvent>;
20
26
  get getLabel(): null | string;
21
27
  get isIcon(): boolean;
@@ -27,5 +33,5 @@ export declare class ButtonComponent {
27
33
  get getReplacedIcon(): string;
28
34
  buttonClick($event: MouseEvent): void;
29
35
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "mrx-button", never, { "size": "size"; "type": "type"; "color": "color"; "iconPosition": "iconPosition"; "active": "active"; "disabled": "disabled"; "isLoading": "isLoading"; "iconOnly": "iconOnly"; "customClasses": "customClasses"; "label": "label"; "icon": "icon"; "iconClass": "iconClass"; "buttonType": "buttonType"; }, { "mrxClick": "mrxClick"; }, never, ["*"]>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "mrx-button", never, { "size": "size"; "type": "type"; "color": "color"; "iconPosition": "iconPosition"; "active": "active"; "disabled": "disabled"; "isLoading": "isLoading"; "iconOnly": "iconOnly"; "customClasses": "customClasses"; "label": "label"; "icon": "icon"; "iconClass": "iconClass"; "buttonType": "buttonType"; "href": "href"; "target": "target"; "routerLink": "routerLink"; "queryParams": "queryParams"; }, { "mrxClick": "mrxClick"; }, never, ["*"]>;
31
37
  }
@@ -27,3 +27,4 @@ export declare enum ButtonIconPositionEnum {
27
27
  'right' = "icon-right"
28
28
  }
29
29
  export declare type ButtonIconPositionTypes = 'none' | 'left' | 'right';
30
+ export declare type ButtonTargetTypes = '_blank' | '_self' | '_parent' | '_top';
@@ -3,8 +3,9 @@ import * as i1 from "./button.component";
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "../../pipes/safe/safe.module";
5
5
  import * as i4 from "../loader/loader.module";
6
+ import * as i5 from "@angular/router";
6
7
  export declare class ButtonModule {
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonModule, [typeof i1.ButtonComponent], [typeof i2.CommonModule, typeof i3.SafeModule, typeof i4.LoaderModule], [typeof i1.ButtonComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonModule, [typeof i1.ButtonComponent], [typeof i2.CommonModule, typeof i3.SafeModule, typeof i4.LoaderModule, typeof i5.RouterModule], [typeof i1.ButtonComponent]>;
9
10
  static ɵinj: i0.ɵɵInjectorDeclaration<ButtonModule>;
10
11
  }
@@ -0,0 +1,58 @@
1
+ import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor } from "@angular/forms";
3
+ import { Field } from '../../../services';
4
+ import { JsonEditorMode, JsonEditorOptions } from './utils/jsoneditoroptions';
5
+ import { JsonEditorValueTypes, JsonEditorValueWithId } from './json-editor.enum';
6
+ import * as i0 from "@angular/core";
7
+ export declare class JsonEditorComponent implements ControlValueAccessor, OnInit, OnDestroy {
8
+ optionsChanged: boolean;
9
+ disabled: boolean;
10
+ isFocused: boolean;
11
+ uuid: string;
12
+ fields: Field[];
13
+ options: JsonEditorOptions;
14
+ debug: boolean;
15
+ changed: EventEmitter<JsonEditorValueTypes>;
16
+ modelChange: EventEmitter<JsonEditorValueWithId>;
17
+ jsonChange: EventEmitter<any>;
18
+ jsonEditorContainer: ElementRef;
19
+ private editor;
20
+ constructor();
21
+ private _data;
22
+ set data(value: Object);
23
+ ngOnInit(): void;
24
+ ngOnDestroy(): void;
25
+ onChangeJSON: () => void;
26
+ onChange: () => void;
27
+ /**
28
+ * JSON EDITOR FUNCTIONS
29
+ */
30
+ collapseAll(): void;
31
+ expandAll(): void;
32
+ focus(): void;
33
+ get(): JSON;
34
+ getMode(): JsonEditorMode;
35
+ getName(): string;
36
+ getText(): string;
37
+ set(json: JSON): void;
38
+ setMode(mode: JsonEditorMode): void;
39
+ setName(name: string): void;
40
+ setSelection(start: any, end: any): void;
41
+ getSelection(): any;
42
+ getValidateSchema(): any;
43
+ setSchema(schema: any, schemaRefs: any): void;
44
+ search(query: string): void;
45
+ setOptions(newOptions: JsonEditorOptions): void;
46
+ update(json: JSON): void;
47
+ destroy(): void;
48
+ getEditor(): any;
49
+ isValidJson(): boolean;
50
+ writeValue(value: any): void;
51
+ updateValue(insideValue: any): void;
52
+ registerOnChange(fn: any): void;
53
+ registerOnTouched(fn: () => {}): void;
54
+ private onChangeFn;
55
+ private onTouchedFn;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<JsonEditorComponent, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<JsonEditorComponent, "mrx-json-editor", never, { "fields": "fields"; "options": "options"; "debug": "debug"; "data": "data"; }, { "changed": "changed"; "modelChange": "modelChange"; "jsonChange": "jsonChange"; }, never, never>;
58
+ }
@@ -0,0 +1,5 @@
1
+ export declare type JsonEditorValueTypes = string;
2
+ export interface JsonEditorValueWithId {
3
+ value: JsonEditorValueTypes;
4
+ id: string;
5
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./json-editor.component";
3
+ import * as i2 from "@angular/common";
4
+ export declare class JsonEditorModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<JsonEditorModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<JsonEditorModule, [typeof i1.JsonEditorComponent], [typeof i2.CommonModule], [typeof i1.JsonEditorComponent]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<JsonEditorModule>;
8
+ }
@@ -0,0 +1,128 @@
1
+ export declare type JsonEditorMode = 'tree' | 'view' | 'form' | 'code' | 'text';
2
+ export interface JsonEditorTreeNode {
3
+ field: String;
4
+ value: String;
5
+ path: String[];
6
+ }
7
+ export interface IError {
8
+ path: (string | number)[];
9
+ message: string;
10
+ }
11
+ export declare class JsonEditorOptions {
12
+ ace: any;
13
+ ajv: Object;
14
+ /**
15
+ * {function} onChange Callback method, triggered
16
+ on change of contents.
17
+ Does not pass the contents itself.
18
+ See also `onChangeJSON` and
19
+ `onChangeText`.
20
+ */
21
+ onChange: () => void;
22
+ /**
23
+ * // {function} onChangeJSON Callback method, triggered
24
+ // in modes on change of contents,
25
+ // passing the changed contents
26
+ // as JSON.
27
+ // Only applicable for modes
28
+ // 'tree', 'view', and 'form'.
29
+ */
30
+ onChangeJSON?: () => void;
31
+ onNodeName: () => void;
32
+ onCreateMenu: (items: Array<any>, node: object) => Array<any>;
33
+ onColorPicker: () => void;
34
+ /**
35
+ // {function} onChangeText Callback method, triggered
36
+ // in modes on change of contents,
37
+ // passing the changed contents
38
+ // as stringified JSON.
39
+ */
40
+ onChangeText: (jsonstr: string) => void;
41
+ /**
42
+ * {function} onSelectionChange Callback method,
43
+ triggered on node selection change
44
+ Only applicable for modes
45
+ 'tree', 'view', and 'form'
46
+ */
47
+ onSelectionChange: () => void;
48
+ /**
49
+ * {function} onTextSelectionChange Callback method,
50
+ triggered on text selection change
51
+ Only applicable for modes
52
+ */
53
+ onTextSelectionChange: () => void;
54
+ /**
55
+ * // {function} onEvent Callback method, triggered
56
+ // when an event occurs in
57
+ // a JSON field or value.
58
+ // Only applicable for
59
+ // modes 'form', 'tree' and
60
+ // 'view'
61
+ */
62
+ onEvent: () => void;
63
+ /**
64
+ * // * {function} onFocus Callback method, triggered
65
+ // when the editor comes into focus,
66
+ // passing an object {type, target},
67
+ // Applicable for all modes
68
+ */
69
+ onFocus: () => void;
70
+ onBlur: () => void;
71
+ /**
72
+ * // * {function} onClassName Callback method, triggered
73
+ // when a Node DOM is rendered. Function returns
74
+ // a css class name to be set on a node.
75
+ // Only applicable for
76
+ // modes 'form', 'tree' and
77
+ // 'view'
78
+ */
79
+ onClassName: (node: JsonEditorTreeNode) => void;
80
+ onEditable: (node: JsonEditorTreeNode | {}) => boolean | {
81
+ field: boolean;
82
+ value: boolean;
83
+ };
84
+ /**
85
+ * {function} onError Callback method, triggered
86
+ when an error occurs
87
+ */
88
+ onError: (error: any) => void;
89
+ onModeChange: (newMode: JsonEditorMode, oldMode: JsonEditorMode) => void;
90
+ onValidate: (json: Object) => IError[];
91
+ onValidationError: (errors: object[]) => void;
92
+ enableSort: boolean;
93
+ enableTransform: boolean;
94
+ escapeUnicode: boolean;
95
+ expandAll?: boolean;
96
+ sortObjectKeys: boolean;
97
+ history: boolean;
98
+ mode: JsonEditorMode;
99
+ modes: JsonEditorMode[];
100
+ name: String;
101
+ schema: Object;
102
+ search: boolean;
103
+ indentation: Number;
104
+ templates: Object;
105
+ theme: Number;
106
+ language: String;
107
+ languages: Object;
108
+ /**
109
+ * Adds main menu bar - Contains format, sort, transform, search etc. functionality. True
110
+ * by default. Applicable in all types of mode.
111
+ */
112
+ mainMenuBar: boolean;
113
+ /**
114
+ * Adds navigation bar to the menu - the navigation bar visualize the current position on
115
+ * the tree structure as well as allows breadcrumbs navigation.
116
+ * True by default.
117
+ * Only applicable when mode is 'tree', 'form' or 'view'.
118
+ */
119
+ navigationBar: boolean;
120
+ /**
121
+ * Adds status bar to the bottom of the editor - the status bar shows the cursor position
122
+ * and a count of the selected characters.
123
+ * True by default.
124
+ * Only applicable when mode is 'code' or 'text'.
125
+ */
126
+ statusBar: boolean;
127
+ constructor();
128
+ }
@@ -57,6 +57,7 @@ export declare class PdfViewerComponent implements OnInit, OnChanges {
57
57
  onSidebarViewClick(): void;
58
58
  onExpandModeClick(): void;
59
59
  onSearchClick(): void;
60
+ onSearchClear(): void;
60
61
  onSearch($event: string): void;
61
62
  findNext(): void;
62
63
  findPrevious(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myrta-ui",
3
- "version": "1.1.77",
3
+ "version": "1.1.78",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.3.0",
6
6
  "@angular/core": "^13.3.0",
package/public-api.d.ts CHANGED
@@ -154,6 +154,10 @@ export * from './lib/components/form/radio-group/models/radio-group.model';
154
154
  export * from './lib/components/form/switch/switch.module';
155
155
  export * from './lib/components/form/switch/switch.component';
156
156
  export * from './lib/components/form/switch/switch.enum';
157
+ export * from './lib/components/form/json-editor/json-editor.module';
158
+ export * from './lib/components/form/json-editor/json-editor.component';
159
+ export * from './lib/components/form/json-editor/json-editor.enum';
160
+ export * from './lib/components/form/json-editor/utils/jsoneditoroptions';
157
161
  export * from './lib/components/wrappers/widget-wrapper/widget-wrapper.module';
158
162
  export * from './lib/components/wrappers/widget-wrapper/widget-wrapper.component';
159
163
  export * from './lib/components/wrappers/content-wrapper/content-wrapper.module';