@rlucan/ui 14.2.6 → 16.2.2
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/README.md +24 -24
- package/esm2022/lib/action-button/action-button.component.mjs +99 -99
- package/esm2022/lib/action-icon/action-icon.component.mjs +36 -36
- package/esm2022/lib/autocomplete/autocomplete.component.mjs +390 -390
- package/esm2022/lib/avatar/avatar.component.mjs +34 -34
- package/esm2022/lib/button/button.component.mjs +56 -56
- package/esm2022/lib/checkbox/checkbox.component.mjs +38 -38
- package/esm2022/lib/checkbox-group/checkbox-group.component.mjs +90 -90
- package/esm2022/lib/currency/currency.component.mjs +150 -150
- package/esm2022/lib/date/date.component.mjs +67 -67
- package/esm2022/lib/dialog/dialog.component.mjs +36 -36
- package/esm2022/lib/directives/force-visibility/force-visibility.directive.mjs +104 -104
- package/esm2022/lib/editor/editor.component.mjs +118 -118
- package/esm2022/lib/elements/burger/burger.component.mjs +20 -20
- package/esm2022/lib/elements/expander/expander.component.mjs +27 -27
- package/esm2022/lib/elements/validation-message/validation-message.component.mjs +46 -46
- package/esm2022/lib/file/file.component.mjs +144 -144
- package/esm2022/lib/file-uploader/ui-file-uploader.component.mjs +404 -404
- package/esm2022/lib/input/input.component.mjs +264 -264
- package/esm2022/lib/input-autocomplete/input-autocomplete.component.mjs +276 -276
- package/esm2022/lib/layouts/base/ui-base-layout.component.mjs +21 -21
- package/esm2022/lib/layouts/base/ui-base.component.mjs +73 -73
- package/esm2022/lib/layouts/simple/ui-simple-layout.component.mjs +17 -17
- package/esm2022/lib/layouts/simple/ui-simple.component.mjs +165 -165
- package/esm2022/lib/radio/radio.component.mjs +20 -20
- package/esm2022/lib/radio-group/radio-group.component.mjs +53 -53
- package/esm2022/lib/select/select.component.mjs +126 -115
- package/esm2022/lib/services/message-box.service.mjs +110 -110
- package/esm2022/lib/services/toast.service.mjs +23 -23
- package/esm2022/lib/services/ui-file.service.mjs +70 -70
- package/esm2022/lib/services/ui-translate.service.mjs +31 -31
- package/esm2022/lib/submit-button/submit-button.component.mjs +71 -71
- package/esm2022/lib/table/table.component.mjs +97 -97
- package/esm2022/lib/text-area/text-area.component.mjs +45 -45
- package/esm2022/lib/ui.model.mjs +1 -1
- package/esm2022/lib/ui.module.mjs +268 -268
- package/esm2022/public-api.mjs +34 -34
- package/esm2022/rlucan-ui.mjs +4 -4
- package/fesm2022/rlucan-ui.mjs +3285 -3274
- package/fesm2022/rlucan-ui.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/action-button/action-button.component.d.ts +28 -32
- package/lib/action-icon/action-icon.component.d.ts +15 -15
- package/lib/autocomplete/autocomplete.component.d.ts +57 -57
- package/lib/avatar/avatar.component.d.ts +14 -14
- package/lib/button/button.component.d.ts +18 -18
- package/lib/checkbox/checkbox.component.d.ts +15 -15
- package/lib/checkbox-group/checkbox-group.component.d.ts +18 -18
- package/lib/currency/currency.component.d.ts +31 -31
- package/lib/date/date.component.d.ts +24 -24
- package/lib/dialog/dialog.component.d.ts +13 -13
- package/lib/directives/force-visibility/force-visibility.directive.d.ts +22 -22
- package/lib/editor/editor.component.d.ts +24 -24
- package/lib/elements/burger/burger.component.d.ts +9 -9
- package/lib/elements/expander/expander.component.d.ts +10 -10
- package/lib/elements/validation-message/validation-message.component.d.ts +12 -12
- package/lib/file/file.component.d.ts +35 -35
- package/lib/file-uploader/ui-file-uploader.component.d.ts +102 -102
- package/lib/input/input.component.d.ts +42 -42
- package/lib/input-autocomplete/input-autocomplete.component.d.ts +44 -44
- package/lib/layouts/base/ui-base-layout.component.d.ts +8 -8
- package/lib/layouts/base/ui-base.component.d.ts +23 -23
- package/lib/layouts/simple/ui-simple-layout.component.d.ts +8 -8
- package/lib/layouts/simple/ui-simple.component.d.ts +40 -40
- package/lib/radio/radio.component.d.ts +8 -8
- package/lib/radio-group/radio-group.component.d.ts +18 -18
- package/lib/select/select.component.d.ts +37 -35
- package/lib/services/message-box.service.d.ts +58 -58
- package/lib/services/toast.service.d.ts +13 -13
- package/lib/services/ui-file.service.d.ts +33 -33
- package/lib/services/ui-translate.service.d.ts +11 -11
- package/lib/submit-button/submit-button.component.d.ts +21 -21
- package/lib/table/table.component.d.ts +36 -36
- package/lib/text-area/text-area.component.d.ts +18 -18
- package/lib/ui.model.d.ts +2 -2
- package/lib/ui.module.d.ts +59 -59
- package/package.json +1 -1
- package/public-api.d.ts +29 -29
- package/src/js/editorjs.mjs +9634 -9634
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
import { Component, HostListener, Input, Optional, Self } from '@angular/core';
|
|
2
|
-
import { UiSimpleComponent } from '../layouts/simple/ui-simple.component';
|
|
3
|
-
import EditorJS from '@editorjs/editorjs';
|
|
4
|
-
import List from '@editorjs/list';
|
|
5
|
-
import Header from '@editorjs/header';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "@angular/forms";
|
|
8
|
-
import * as i2 from "@angular/common";
|
|
9
|
-
import * as i3 from "../layouts/simple/ui-simple-layout.component";
|
|
10
|
-
export class EditorComponent extends UiSimpleComponent {
|
|
11
|
-
clickout(event) {
|
|
12
|
-
const cr = this.el.nativeElement.getBoundingClientRect();
|
|
13
|
-
const outside = event.x < cr.x || event.x > cr.x + cr.width || event.y < cr.y || event.y > cr.y + cr.height;
|
|
14
|
-
this.focused = !outside;
|
|
15
|
-
if (!this.focused) {
|
|
16
|
-
this.componentFormControl.markAsTouched();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
constructor(ngControl /*, private _ngZone: NgZone, private cdr: ChangeDetectorRef*/, el) {
|
|
20
|
-
super(ngControl);
|
|
21
|
-
this.ngControl = ngControl;
|
|
22
|
-
this.el = el;
|
|
23
|
-
this.rows = 5;
|
|
24
|
-
this.autoResize = false;
|
|
25
|
-
this.focused = false;
|
|
26
|
-
this.editorId = `editorJs${Math.round(Math.random() * 10000000)}`;
|
|
27
|
-
}
|
|
28
|
-
focus() {
|
|
29
|
-
this.focused = true;
|
|
30
|
-
this.editor.focus();
|
|
31
|
-
}
|
|
32
|
-
setDisabledState(isDisabled) {
|
|
33
|
-
}
|
|
34
|
-
ngAfterViewInit() {
|
|
35
|
-
this.editor = new EditorJS({
|
|
36
|
-
holder: this.editorId,
|
|
37
|
-
inlineToolbar: ['bold', 'italic'],
|
|
38
|
-
tools: {
|
|
39
|
-
header: {
|
|
40
|
-
class: Header,
|
|
41
|
-
inlineToolbar: true,
|
|
42
|
-
config: {
|
|
43
|
-
levels: [1, 2],
|
|
44
|
-
defaultLevel: 1
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
list: {
|
|
48
|
-
class: List,
|
|
49
|
-
inlineToolbar: true,
|
|
50
|
-
config: {
|
|
51
|
-
defaultStyle: 'unordered'
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
i18n: {
|
|
56
|
-
messages: {
|
|
57
|
-
ui: {
|
|
58
|
-
"inlineToolbar": {
|
|
59
|
-
"converter": {
|
|
60
|
-
"Convert to": "Odstavec změnit na"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
toolNames: {
|
|
65
|
-
"Heading": "Nadpis",
|
|
66
|
-
"List": "Seznam"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
minHeight: 90,
|
|
71
|
-
placeholder: 'Něco napiš...',
|
|
72
|
-
onChange: () => { this.focused = true; this.editor.save().then((r) => this.onChange(r)); },
|
|
73
|
-
onReady: () => {
|
|
74
|
-
const editorElement = document.getElementById(this.editorId); // your "holder" ID
|
|
75
|
-
editorElement.addEventListener('focusin', () => {
|
|
76
|
-
this.focused = true;
|
|
77
|
-
});
|
|
78
|
-
},
|
|
79
|
-
data: this.data
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
inputLength() {
|
|
83
|
-
let len = 0;
|
|
84
|
-
if (this.componentFormControl && this.componentFormControl.value && this.componentFormControl.value.blocks) {
|
|
85
|
-
this.componentFormControl.value.blocks.forEach(b => {
|
|
86
|
-
if (b.type === 'paragraph' || b.type === 'header') {
|
|
87
|
-
len += b.data.text.replace(/<\/?[^>]+(>|$)/g, '').replace(/ /, '').length;
|
|
88
|
-
}
|
|
89
|
-
if (b.type === 'list') {
|
|
90
|
-
b.data.items.forEach(i => {
|
|
91
|
-
len += i.replace(/<\/?[^>]+(>|$)/g, '').replace(/ /, '').length;
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
return len;
|
|
97
|
-
}
|
|
98
|
-
writeValue(obj) {
|
|
99
|
-
this.data = obj;
|
|
100
|
-
}
|
|
101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: EditorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
102
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: EditorComponent, selector: "ui-editor", inputs: { rows: "rows", autoResize: "autoResize" }, host: { listeners: { "document:click": "clickout($event)" } }, usesInheritance: true, ngImport: i0, template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"editor-wrapper\" [ngClass]=\"{focus: focused}\">\r\n <ng-container *ngIf=\"componentFormControl\">\r\n\r\n <p [id]=editorId></p>\r\n\r\n </ng-container>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n", ".editor-wrapper{max-height:140px;min-height:140px;overflow-y:auto;overflow-x:hidden}.editor-wrapper.focus{max-height:unset}.editor-wrapper ::ng-deep .codex-editor__redactor{margin-right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions{background-color:#fff;margin:0 4px;border-radius:6px;padding:3px;right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover-item__icon{margin-right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover--opened{width:unset;min-width:unset}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover--opened .ce-popover__items{display:flex}.editor-wrapper ::ng-deep .ce-popover--opened{margin-right:12px}.editor-wrapper ::ng-deep .cdx-search-field,.editor-wrapper ::ng-deep .ce-popover-item__title{display:none}.editor-wrapper ::ng-deep .ce-popover--open-top{top:calc(-1 * (var(--offset-from-target) + 48px))!important}.editor-wrapper ::ng-deep .ce-conversion-toolbar__tools{display:flex}.editor-wrapper ::ng-deep .ce-conversion-toolbar{width:210px}.editor-wrapper ::ng-deep h1.ce-header{font-size:1.3em;line-height:1.2em;margin:0 0 .4em;padding:0;letter-spacing:0;font-weight:700}.editor-wrapper ::ng-deep h2.ce-header{font-size:1.15em;line-height:1.1em;margin:0 0 .4em;padding:0;letter-spacing:0;font-weight:700}.editor-wrapper ::ng-deep .ce-paragraph{line-height:1.5em;font-size:1em;padding:0;margin:0 0 .5em}.editor-wrapper ::ng-deep .cdx-list{padding:0 0 0 2em;margin:0 0 .5em}.editor-wrapper ::ng-deep .cdx-list li{padding:0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.UiSimpleLayoutComponent, selector: "ui-simple-layout", inputs: ["ctx"] }] }); }
|
|
103
|
-
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: EditorComponent, decorators: [{
|
|
105
|
-
type: Component,
|
|
106
|
-
args: [{ selector: 'ui-editor', template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"editor-wrapper\" [ngClass]=\"{focus: focused}\">\r\n <ng-container *ngIf=\"componentFormControl\">\r\n\r\n <p [id]=editorId></p>\r\n\r\n </ng-container>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n", ".editor-wrapper{max-height:140px;min-height:140px;overflow-y:auto;overflow-x:hidden}.editor-wrapper.focus{max-height:unset}.editor-wrapper ::ng-deep .codex-editor__redactor{margin-right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions{background-color:#fff;margin:0 4px;border-radius:6px;padding:3px;right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover-item__icon{margin-right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover--opened{width:unset;min-width:unset}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover--opened .ce-popover__items{display:flex}.editor-wrapper ::ng-deep .ce-popover--opened{margin-right:12px}.editor-wrapper ::ng-deep .cdx-search-field,.editor-wrapper ::ng-deep .ce-popover-item__title{display:none}.editor-wrapper ::ng-deep .ce-popover--open-top{top:calc(-1 * (var(--offset-from-target) + 48px))!important}.editor-wrapper ::ng-deep .ce-conversion-toolbar__tools{display:flex}.editor-wrapper ::ng-deep .ce-conversion-toolbar{width:210px}.editor-wrapper ::ng-deep h1.ce-header{font-size:1.3em;line-height:1.2em;margin:0 0 .4em;padding:0;letter-spacing:0;font-weight:700}.editor-wrapper ::ng-deep h2.ce-header{font-size:1.15em;line-height:1.1em;margin:0 0 .4em;padding:0;letter-spacing:0;font-weight:700}.editor-wrapper ::ng-deep .ce-paragraph{line-height:1.5em;font-size:1em;padding:0;margin:0 0 .5em}.editor-wrapper ::ng-deep .cdx-list{padding:0 0 0 2em;margin:0 0 .5em}.editor-wrapper ::ng-deep .cdx-list li{padding:0}\n"] }]
|
|
107
|
-
}], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
|
|
108
|
-
type: Optional
|
|
109
|
-
}, {
|
|
110
|
-
type: Self
|
|
111
|
-
}] }, { type: i0.ElementRef }]; }, propDecorators: { rows: [{
|
|
112
|
-
type: Input
|
|
113
|
-
}], autoResize: [{
|
|
114
|
-
type: Input
|
|
115
|
-
}], clickout: [{
|
|
116
|
-
type: HostListener,
|
|
117
|
-
args: ['document:click', ['$event']]
|
|
118
|
-
}] } });
|
|
1
|
+
import { Component, HostListener, Input, Optional, Self } from '@angular/core';
|
|
2
|
+
import { UiSimpleComponent } from '../layouts/simple/ui-simple.component';
|
|
3
|
+
import EditorJS from '@editorjs/editorjs';
|
|
4
|
+
import List from '@editorjs/list';
|
|
5
|
+
import Header from '@editorjs/header';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/forms";
|
|
8
|
+
import * as i2 from "@angular/common";
|
|
9
|
+
import * as i3 from "../layouts/simple/ui-simple-layout.component";
|
|
10
|
+
export class EditorComponent extends UiSimpleComponent {
|
|
11
|
+
clickout(event) {
|
|
12
|
+
const cr = this.el.nativeElement.getBoundingClientRect();
|
|
13
|
+
const outside = event.x < cr.x || event.x > cr.x + cr.width || event.y < cr.y || event.y > cr.y + cr.height;
|
|
14
|
+
this.focused = !outside;
|
|
15
|
+
if (!this.focused) {
|
|
16
|
+
this.componentFormControl.markAsTouched();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
constructor(ngControl /*, private _ngZone: NgZone, private cdr: ChangeDetectorRef*/, el) {
|
|
20
|
+
super(ngControl);
|
|
21
|
+
this.ngControl = ngControl;
|
|
22
|
+
this.el = el;
|
|
23
|
+
this.rows = 5;
|
|
24
|
+
this.autoResize = false;
|
|
25
|
+
this.focused = false;
|
|
26
|
+
this.editorId = `editorJs${Math.round(Math.random() * 10000000)}`;
|
|
27
|
+
}
|
|
28
|
+
focus() {
|
|
29
|
+
this.focused = true;
|
|
30
|
+
this.editor.focus();
|
|
31
|
+
}
|
|
32
|
+
setDisabledState(isDisabled) {
|
|
33
|
+
}
|
|
34
|
+
ngAfterViewInit() {
|
|
35
|
+
this.editor = new EditorJS({
|
|
36
|
+
holder: this.editorId,
|
|
37
|
+
inlineToolbar: ['bold', 'italic'],
|
|
38
|
+
tools: {
|
|
39
|
+
header: {
|
|
40
|
+
class: Header,
|
|
41
|
+
inlineToolbar: true,
|
|
42
|
+
config: {
|
|
43
|
+
levels: [1, 2],
|
|
44
|
+
defaultLevel: 1
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
list: {
|
|
48
|
+
class: List,
|
|
49
|
+
inlineToolbar: true,
|
|
50
|
+
config: {
|
|
51
|
+
defaultStyle: 'unordered'
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
i18n: {
|
|
56
|
+
messages: {
|
|
57
|
+
ui: {
|
|
58
|
+
"inlineToolbar": {
|
|
59
|
+
"converter": {
|
|
60
|
+
"Convert to": "Odstavec změnit na"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
toolNames: {
|
|
65
|
+
"Heading": "Nadpis",
|
|
66
|
+
"List": "Seznam"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
minHeight: 90,
|
|
71
|
+
placeholder: 'Něco napiš...',
|
|
72
|
+
onChange: () => { this.focused = true; this.editor.save().then((r) => this.onChange(r)); },
|
|
73
|
+
onReady: () => {
|
|
74
|
+
const editorElement = document.getElementById(this.editorId); // your "holder" ID
|
|
75
|
+
editorElement.addEventListener('focusin', () => {
|
|
76
|
+
this.focused = true;
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
data: this.data
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
inputLength() {
|
|
83
|
+
let len = 0;
|
|
84
|
+
if (this.componentFormControl && this.componentFormControl.value && this.componentFormControl.value.blocks) {
|
|
85
|
+
this.componentFormControl.value.blocks.forEach(b => {
|
|
86
|
+
if (b.type === 'paragraph' || b.type === 'header') {
|
|
87
|
+
len += b.data.text.replace(/<\/?[^>]+(>|$)/g, '').replace(/ /, '').length;
|
|
88
|
+
}
|
|
89
|
+
if (b.type === 'list') {
|
|
90
|
+
b.data.items.forEach(i => {
|
|
91
|
+
len += i.replace(/<\/?[^>]+(>|$)/g, '').replace(/ /, '').length;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return len;
|
|
97
|
+
}
|
|
98
|
+
writeValue(obj) {
|
|
99
|
+
this.data = obj;
|
|
100
|
+
}
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: EditorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: EditorComponent, selector: "ui-editor", inputs: { rows: "rows", autoResize: "autoResize" }, host: { listeners: { "document:click": "clickout($event)" } }, usesInheritance: true, ngImport: i0, template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"editor-wrapper\" [ngClass]=\"{focus: focused}\">\r\n <ng-container *ngIf=\"componentFormControl\">\r\n\r\n <p [id]=editorId></p>\r\n\r\n </ng-container>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n", ".editor-wrapper{max-height:140px;min-height:140px;overflow-y:auto;overflow-x:hidden}.editor-wrapper.focus{max-height:unset}.editor-wrapper ::ng-deep .codex-editor__redactor{margin-right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions{background-color:#fff;margin:0 4px;border-radius:6px;padding:3px;right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover-item__icon{margin-right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover--opened{width:unset;min-width:unset}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover--opened .ce-popover__items{display:flex}.editor-wrapper ::ng-deep .ce-popover--opened{margin-right:12px}.editor-wrapper ::ng-deep .cdx-search-field,.editor-wrapper ::ng-deep .ce-popover-item__title{display:none}.editor-wrapper ::ng-deep .ce-popover--open-top{top:calc(-1 * (var(--offset-from-target) + 48px))!important}.editor-wrapper ::ng-deep .ce-conversion-toolbar__tools{display:flex}.editor-wrapper ::ng-deep .ce-conversion-toolbar{width:210px}.editor-wrapper ::ng-deep h1.ce-header{font-size:1.3em;line-height:1.2em;margin:0 0 .4em;padding:0;letter-spacing:0;font-weight:700}.editor-wrapper ::ng-deep h2.ce-header{font-size:1.15em;line-height:1.1em;margin:0 0 .4em;padding:0;letter-spacing:0;font-weight:700}.editor-wrapper ::ng-deep .ce-paragraph{line-height:1.5em;font-size:1em;padding:0;margin:0 0 .5em}.editor-wrapper ::ng-deep .cdx-list{padding:0 0 0 2em;margin:0 0 .5em}.editor-wrapper ::ng-deep .cdx-list li{padding:0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.UiSimpleLayoutComponent, selector: "ui-simple-layout", inputs: ["ctx"] }] }); }
|
|
103
|
+
}
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: EditorComponent, decorators: [{
|
|
105
|
+
type: Component,
|
|
106
|
+
args: [{ selector: 'ui-editor', template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"editor-wrapper\" [ngClass]=\"{focus: focused}\">\r\n <ng-container *ngIf=\"componentFormControl\">\r\n\r\n <p [id]=editorId></p>\r\n\r\n </ng-container>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n", ".editor-wrapper{max-height:140px;min-height:140px;overflow-y:auto;overflow-x:hidden}.editor-wrapper.focus{max-height:unset}.editor-wrapper ::ng-deep .codex-editor__redactor{margin-right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions{background-color:#fff;margin:0 4px;border-radius:6px;padding:3px;right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover-item__icon{margin-right:0}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover--opened{width:unset;min-width:unset}.editor-wrapper ::ng-deep .ce-toolbar__actions .ce-popover--opened .ce-popover__items{display:flex}.editor-wrapper ::ng-deep .ce-popover--opened{margin-right:12px}.editor-wrapper ::ng-deep .cdx-search-field,.editor-wrapper ::ng-deep .ce-popover-item__title{display:none}.editor-wrapper ::ng-deep .ce-popover--open-top{top:calc(-1 * (var(--offset-from-target) + 48px))!important}.editor-wrapper ::ng-deep .ce-conversion-toolbar__tools{display:flex}.editor-wrapper ::ng-deep .ce-conversion-toolbar{width:210px}.editor-wrapper ::ng-deep h1.ce-header{font-size:1.3em;line-height:1.2em;margin:0 0 .4em;padding:0;letter-spacing:0;font-weight:700}.editor-wrapper ::ng-deep h2.ce-header{font-size:1.15em;line-height:1.1em;margin:0 0 .4em;padding:0;letter-spacing:0;font-weight:700}.editor-wrapper ::ng-deep .ce-paragraph{line-height:1.5em;font-size:1em;padding:0;margin:0 0 .5em}.editor-wrapper ::ng-deep .cdx-list{padding:0 0 0 2em;margin:0 0 .5em}.editor-wrapper ::ng-deep .cdx-list li{padding:0}\n"] }]
|
|
107
|
+
}], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
|
|
108
|
+
type: Optional
|
|
109
|
+
}, {
|
|
110
|
+
type: Self
|
|
111
|
+
}] }, { type: i0.ElementRef }]; }, propDecorators: { rows: [{
|
|
112
|
+
type: Input
|
|
113
|
+
}], autoResize: [{
|
|
114
|
+
type: Input
|
|
115
|
+
}], clickout: [{
|
|
116
|
+
type: HostListener,
|
|
117
|
+
args: ['document:click', ['$event']]
|
|
118
|
+
}] } });
|
|
119
119
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3VpL3NyYy9saWIvZWRpdG9yL2VkaXRvci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy91aS9zcmMvbGliL2VkaXRvci9lZGl0b3IuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFpQixTQUFTLEVBQWMsWUFBWSxFQUFFLEtBQUssRUFBRSxRQUFRLEVBQUUsSUFBSSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTFHLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHVDQUF1QyxDQUFDO0FBQzFFLE9BQU8sUUFBUSxNQUFNLG9CQUFvQixDQUFDO0FBQzFDLE9BQU8sSUFBSSxNQUFNLGdCQUFnQixDQUFDO0FBQ2xDLE9BQU8sTUFBTSxNQUFNLGtCQUFrQixDQUFDOzs7OztBQVl0QyxNQUFNLE9BQU8sZUFBZ0IsU0FBUSxpQkFBaUI7SUFlcEQsUUFBUSxDQUFDLEtBQUs7UUFDVixNQUFNLEVBQUUsR0F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9ySlMoe1xyXG4gICAgICBob2xkZXI6IHRoaXMuZWRpdG9ySWQsXHJcbiAgICAgIGlubGluZVRvb2xiYXI6IFsnYm9sZCcsICdpdGFsaWMnXSxcclxuICAgICAgdG9vbHM6IHtcclxuICAgICAgICBoZWFkZXI6IHtcclxuICAgICAgICAgIGNsYXNzOiBIZWFkZXIsXHJcbiAgICAgICAgICBpbmxpbmVUb29sYmFyOiB0cnVlLFxyXG4gICAgICAgICAgY29uZmlnOiB7XHJcbiAgICAgICAgICAgIGxldmVsczogWyAxLCAyIF0sXHJcbiAgICAgICAgICAgIGRlZmF1bHRMZXZlbDogMVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgbGlzdDoge1xyXG4gICAgICAgICAgY2xhc3M6IExpc3QsXHJcbiAgICAgICAgICBpbmxpbmVUb29sYmFyOiB0cnVlLFxyXG4gICAgICAgICAgY29uZmlnOiB7XHJcbiAgICAgICAgICAgIGRlZmF1bHRTdHlsZTogJ3Vub3JkZXJlZCdcclxuICAgICAgICAgIH0sXHJcbiAgICAgICAgfSxcclxuICAgICAgfSxcclxuICAgICAgaTE4bjoge1xyXG4gICAgICAgIG1lc3NhZ2VzOiB7XHJcbiAgICAgICAgICB1aToge1xyXG4gICAgICAgICAgICBcImlubGluZVRvb2xiYXJcIjoge1xyXG4gICAgICAgICAgICAgIFwiY29udmVydGVyXCI6IHtcclxuICAgICAgICAgICAgICAgIFwiQ29udmVydCB0b1wiOiBcIk9kc3RhdmVjIHptxJtuaXQgbmFcIlxyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSxcclxuICAgICAgICAgIHRvb2xOYW1lczoge1xyXG4gICAgICAgICAgICBcIkhlYWRpbmdcIjogXCJOYWRwaXNcIixcclxuICAgICAgICAgICAgXCJMaXN0XCI6IFwiU2V6bmFtXCJcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgIH0sXHJcbiAgICA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gICAgICAgIH1cclxuICAgICAgICBpZiAoYi50eXBlID09PSAnbGlzdCcpIHtcclxuICAgICAgICAgIGIuZGF0YS5pdGVtcy5mb3JFYWNoKGkgPT4ge1xyXG4gICAgICAgICAgICBsZW4gKz0gaS5yZXBsYWNlKC88XFwvP1tePl0rKD58JCkvZywgJycpLnJlcGxhY2UoLyZuYnNwOy8sICcnKS5sZW5ndGg7XHJcbiAgICAgICAgICB9KVxyXG4gICAgICAgIH1cclxuICAgICAgfSlcclxuICAgIH1cclxuICAgIHJldHVybiBsZW47XHJcbiAgfVxyXG5cclxuICB3cml0ZVZhbHVlKG9iajogYW55KTogdm9pZCB7XHJcbiAgICB0aGlzLmRhdGEgPSBvYmo7XHJcbiAgfVxyXG59XHJcbiIsIjx1aS1zaW1wbGUtbGF5b3V0IFtjdHhdPVwidGhpc1wiPlxyXG5cclxuPGRpdiBjbGFzcz1cImVkaXRvci13cmFwcGVyXCIgW25nQ2xhc3NdPVwie2ZvY3VzOiBmb2N1c2VkfVwiPlxyXG4gIDxuZy1jb250YWluZXIgKm5nSWY9XCJjb21wb25lbnRGb3JtQ29udHJvbFwiPlxyXG5cclxuICAgIDxwIFtpZF09ZWRpdG9ySWQ+PC9wPlxyXG5cclxuICA8L25nLWNvbnRhaW5lcj5cclxuPC9kaXY+XHJcblxyXG48L3VpLXNpbXBsZS1sYXlvdXQ+XHJcbiJdfQ==
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Component, HostBinding, Input } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class BurgerComponent {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.open = false;
|
|
6
|
-
}
|
|
7
|
-
ngOnInit() {
|
|
8
|
-
}
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BurgerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: BurgerComponent, selector: "ui-burger", inputs: { open: "open" }, host: { properties: { "class.open": "this.open" } }, ngImport: i0, template: " <span></span>\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n", styles: [":host{width:40px;height:35px;position:relative;margin:10px auto 0;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer;display:block}:host span{display:block;position:absolute;height:4px;width:100%;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}:host span:nth-child(1){top:0}:host span:nth-child(2),:host span:nth-child(3){top:12px}:host span:nth-child(4){top:24px}:host.open span:nth-child(1){top:12px;width:0%;left:50%}:host.open span:nth-child(2){transform:rotate(45deg)}:host.open span:nth-child(3){transform:rotate(-45deg)}:host.open span:nth-child(4){top:18px;width:0;left:50%}\n"] }); }
|
|
11
|
-
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BurgerComponent, decorators: [{
|
|
13
|
-
type: Component,
|
|
14
|
-
args: [{ selector: 'ui-burger', template: " <span></span>\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n", styles: [":host{width:40px;height:35px;position:relative;margin:10px auto 0;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer;display:block}:host span{display:block;position:absolute;height:4px;width:100%;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}:host span:nth-child(1){top:0}:host span:nth-child(2),:host span:nth-child(3){top:12px}:host span:nth-child(4){top:24px}:host.open span:nth-child(1){top:12px;width:0%;left:50%}:host.open span:nth-child(2){transform:rotate(45deg)}:host.open span:nth-child(3){transform:rotate(-45deg)}:host.open span:nth-child(4){top:18px;width:0;left:50%}\n"] }]
|
|
15
|
-
}], ctorParameters: function () { return []; }, propDecorators: { open: [{
|
|
16
|
-
type: HostBinding,
|
|
17
|
-
args: ['class.open']
|
|
18
|
-
}, {
|
|
19
|
-
type: Input
|
|
20
|
-
}] } });
|
|
1
|
+
import { Component, HostBinding, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class BurgerComponent {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.open = false;
|
|
6
|
+
}
|
|
7
|
+
ngOnInit() {
|
|
8
|
+
}
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BurgerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: BurgerComponent, selector: "ui-burger", inputs: { open: "open" }, host: { properties: { "class.open": "this.open" } }, ngImport: i0, template: " <span></span>\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n", styles: [":host{width:40px;height:35px;position:relative;margin:10px auto 0;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer;display:block}:host span{display:block;position:absolute;height:4px;width:100%;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}:host span:nth-child(1){top:0}:host span:nth-child(2),:host span:nth-child(3){top:12px}:host span:nth-child(4){top:24px}:host.open span:nth-child(1){top:12px;width:0%;left:50%}:host.open span:nth-child(2){transform:rotate(45deg)}:host.open span:nth-child(3){transform:rotate(-45deg)}:host.open span:nth-child(4){top:18px;width:0;left:50%}\n"] }); }
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BurgerComponent, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{ selector: 'ui-burger', template: " <span></span>\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n", styles: [":host{width:40px;height:35px;position:relative;margin:10px auto 0;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer;display:block}:host span{display:block;position:absolute;height:4px;width:100%;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}:host span:nth-child(1){top:0}:host span:nth-child(2),:host span:nth-child(3){top:12px}:host span:nth-child(4){top:24px}:host.open span:nth-child(1){top:12px;width:0%;left:50%}:host.open span:nth-child(2){transform:rotate(45deg)}:host.open span:nth-child(3){transform:rotate(-45deg)}:host.open span:nth-child(4){top:18px;width:0;left:50%}\n"] }]
|
|
15
|
+
}], ctorParameters: function () { return []; }, propDecorators: { open: [{
|
|
16
|
+
type: HostBinding,
|
|
17
|
+
args: ['class.open']
|
|
18
|
+
}, {
|
|
19
|
+
type: Input
|
|
20
|
+
}] } });
|
|
21
21
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVyZ2VyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3VpL3NyYy9saWIvZWxlbWVudHMvYnVyZ2VyL2J1cmdlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy91aS9zcmMvbGliL2VsZW1lbnRzL2J1cmdlci9idXJnZXIuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFTLE1BQU0sZUFBZSxDQUFDOztBQU9wRSxNQUFNLE9BQU8sZUFBZTtJQUsxQjtRQUZTLFNBQUksR0FBRyxLQUFLLENBQUM7SUFFTixDQUFDO0lBRWpCLFFBQVE7SUFDUixDQUFDOytHQVJVLGVBQWU7bUdBQWYsZUFBZSxnSUNQNUIsOEVBSUE7OzRGREdhLGVBQWU7a0JBTDNCLFNBQVM7K0JBQ0UsV0FBVzswRUFPWixJQUFJO3NCQURaLFdBQVc7dUJBQUMsWUFBWTs7c0JBQ3hCLEtBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0NvbXBvbmVudCwgSG9zdEJpbmRpbmcsIElucHV0LCBPbkluaXR9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuQENvbXBvbmVudCh7XHJcbiAgc2VsZWN0b3I6ICd1aS1idXJnZXInLFxyXG4gIHRlbXBsYXRlVXJsOiAnLi9idXJnZXIuY29tcG9uZW50Lmh0bWwnLFxyXG4gIHN0eWxlVXJsczogWycuL2J1cmdlci5jb21wb25lbnQuc2NzcyddXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBCdXJnZXJDb21wb25lbnQgaW1wbGVtZW50cyBPbkluaXQge1xyXG5cclxuICBASG9zdEJpbmRpbmcoJ2NsYXNzLm9wZW4nKVxyXG4gIEBJbnB1dCgpIG9wZW4gPSBmYWxzZTtcclxuXHJcbiAgY29uc3RydWN0b3IoKSB7IH1cclxuXHJcbiAgbmdPbkluaXQoKTogdm9pZCB7XHJcbiAgfVxyXG5cclxufVxyXG4iLCIgIDxzcGFuPjwvc3Bhbj5cclxuICA8c3Bhbj48L3NwYW4+XHJcbiAgPHNwYW4+PC9zcGFuPlxyXG4gIDxzcGFuPjwvc3Bhbj5cclxuIl19
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { Component, HostBinding, Input } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/material/icon";
|
|
4
|
-
export class ExpanderComponent {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.expanded = false;
|
|
7
|
-
this.direction = 'right-down';
|
|
8
|
-
}
|
|
9
|
-
ngOnInit() {
|
|
10
|
-
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: ExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: ExpanderComponent, selector: "ui-expander", inputs: { expanded: "expanded", direction: "direction" }, host: { properties: { "class.expanded": "this.expanded", "class": "this.direction" } }, ngImport: i0, template: "<mat-icon>keyboard_arrow_up</mat-icon>\r\n", styles: [":host{display:inline-block;transition:transform .25s}:host.right-down{transform:rotate(90deg)}:host.expanded.up-down{transform:scaleY(-1)}:host.expanded.right-down{transform:rotate(180deg)}\n"], dependencies: [{ kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
13
|
-
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: ExpanderComponent, decorators: [{
|
|
15
|
-
type: Component,
|
|
16
|
-
args: [{ selector: 'ui-expander', template: "<mat-icon>keyboard_arrow_up</mat-icon>\r\n", styles: [":host{display:inline-block;transition:transform .25s}:host.right-down{transform:rotate(90deg)}:host.expanded.up-down{transform:scaleY(-1)}:host.expanded.right-down{transform:rotate(180deg)}\n"] }]
|
|
17
|
-
}], ctorParameters: function () { return []; }, propDecorators: { expanded: [{
|
|
18
|
-
type: HostBinding,
|
|
19
|
-
args: ['class.expanded']
|
|
20
|
-
}, {
|
|
21
|
-
type: Input
|
|
22
|
-
}], direction: [{
|
|
23
|
-
type: HostBinding,
|
|
24
|
-
args: ['class']
|
|
25
|
-
}, {
|
|
26
|
-
type: Input
|
|
27
|
-
}] } });
|
|
1
|
+
import { Component, HostBinding, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/material/icon";
|
|
4
|
+
export class ExpanderComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.expanded = false;
|
|
7
|
+
this.direction = 'right-down';
|
|
8
|
+
}
|
|
9
|
+
ngOnInit() {
|
|
10
|
+
}
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: ExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: ExpanderComponent, selector: "ui-expander", inputs: { expanded: "expanded", direction: "direction" }, host: { properties: { "class.expanded": "this.expanded", "class": "this.direction" } }, ngImport: i0, template: "<mat-icon>keyboard_arrow_up</mat-icon>\r\n", styles: [":host{display:inline-block;transition:transform .25s}:host.right-down{transform:rotate(90deg)}:host.expanded.up-down{transform:scaleY(-1)}:host.expanded.right-down{transform:rotate(180deg)}\n"], dependencies: [{ kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
13
|
+
}
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: ExpanderComponent, decorators: [{
|
|
15
|
+
type: Component,
|
|
16
|
+
args: [{ selector: 'ui-expander', template: "<mat-icon>keyboard_arrow_up</mat-icon>\r\n", styles: [":host{display:inline-block;transition:transform .25s}:host.right-down{transform:rotate(90deg)}:host.expanded.up-down{transform:scaleY(-1)}:host.expanded.right-down{transform:rotate(180deg)}\n"] }]
|
|
17
|
+
}], ctorParameters: function () { return []; }, propDecorators: { expanded: [{
|
|
18
|
+
type: HostBinding,
|
|
19
|
+
args: ['class.expanded']
|
|
20
|
+
}, {
|
|
21
|
+
type: Input
|
|
22
|
+
}], direction: [{
|
|
23
|
+
type: HostBinding,
|
|
24
|
+
args: ['class']
|
|
25
|
+
}, {
|
|
26
|
+
type: Input
|
|
27
|
+
}] } });
|
|
28
28
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwYW5kZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvc3JjL2xpYi9lbGVt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bGFzcy5leHBhbmRlZCcpXHJcbiAgQElucHV0KCkgZXhwYW5kZWQgPSBmYWxzZTtcclxuXHJcbiAgQEhvc3RCaW5kaW5nKCdjbGFzcycpXHJcbiAgQElucHV0KCkgZGlyZWN0aW9uOiAncmlnaHQtZG93bicgfCAndXAtZG93bicgPSAncmlnaHQtZG93bic7XHJcblxyXG4gIGNvbnN0cnVjdG9yKCkgeyB9XHJcblxyXG4gIG5nT25Jbml0KCk6IHZvaWQge1xyXG4gIH1cclxuXHJcbn1cclxuIiwiPG1hdC1pY29uPmtleWJvYXJkX2Fycm93X3VwPC9tYXQtaWNvbj5cclxuIl19
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { Component, Inject, Input } from '@angular/core';
|
|
2
|
-
import { UI_TRANSLATESERVICE } from '../../services/ui-translate.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class ValidationMessageComponent {
|
|
5
|
-
constructor(translateService) {
|
|
6
|
-
this.translateService = translateService;
|
|
7
|
-
}
|
|
8
|
-
ngOnInit() {
|
|
9
|
-
}
|
|
10
|
-
get errorMessage() {
|
|
11
|
-
let e = { code: 'Neznámá chyba' };
|
|
12
|
-
const errors = this.validationErrors;
|
|
13
|
-
if (errors) {
|
|
14
|
-
Object.keys(errors).find(a => {
|
|
15
|
-
e = { code: a, data: errors[a] };
|
|
16
|
-
return true;
|
|
17
|
-
});
|
|
18
|
-
switch (e.code) {
|
|
19
|
-
case 'required':
|
|
20
|
-
case 'cbGroupRequired':
|
|
21
|
-
case 'email':
|
|
22
|
-
case 'matDatepickerParse':
|
|
23
|
-
case 'maxlength':
|
|
24
|
-
case 'minlength':
|
|
25
|
-
return this.translateService.instant('ui.controls.validation.' + e.code, e.data);
|
|
26
|
-
case 'positive':
|
|
27
|
-
return this.translateService.instant(isNaN(Number(e.data)) ? 'ui.controls.validation.invalidNumber' : 'ui.controls.validation.positive');
|
|
28
|
-
case 'custom':
|
|
29
|
-
return this.translateService.instant(e.data);
|
|
30
|
-
default:
|
|
31
|
-
return this.translateService.instant(e.code);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: ValidationMessageComponent, deps: [{ token: UI_TRANSLATESERVICE }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: ValidationMessageComponent, selector: "ui-validation-message", inputs: { validationErrors: "validationErrors" }, ngImport: i0, template: "{{ errorMessage }}\r\n" }); }
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: ValidationMessageComponent, decorators: [{
|
|
39
|
-
type: Component,
|
|
40
|
-
args: [{ selector: 'ui-validation-message', template: "{{ errorMessage }}\r\n" }]
|
|
41
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
42
|
-
type: Inject,
|
|
43
|
-
args: [UI_TRANSLATESERVICE]
|
|
44
|
-
}] }]; }, propDecorators: { validationErrors: [{
|
|
45
|
-
type: Input
|
|
46
|
-
}] } });
|
|
1
|
+
import { Component, Inject, Input } from '@angular/core';
|
|
2
|
+
import { UI_TRANSLATESERVICE } from '../../services/ui-translate.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ValidationMessageComponent {
|
|
5
|
+
constructor(translateService) {
|
|
6
|
+
this.translateService = translateService;
|
|
7
|
+
}
|
|
8
|
+
ngOnInit() {
|
|
9
|
+
}
|
|
10
|
+
get errorMessage() {
|
|
11
|
+
let e = { code: 'Neznámá chyba' };
|
|
12
|
+
const errors = this.validationErrors;
|
|
13
|
+
if (errors) {
|
|
14
|
+
Object.keys(errors).find(a => {
|
|
15
|
+
e = { code: a, data: errors[a] };
|
|
16
|
+
return true;
|
|
17
|
+
});
|
|
18
|
+
switch (e.code) {
|
|
19
|
+
case 'required':
|
|
20
|
+
case 'cbGroupRequired':
|
|
21
|
+
case 'email':
|
|
22
|
+
case 'matDatepickerParse':
|
|
23
|
+
case 'maxlength':
|
|
24
|
+
case 'minlength':
|
|
25
|
+
return this.translateService.instant('ui.controls.validation.' + e.code, e.data);
|
|
26
|
+
case 'positive':
|
|
27
|
+
return this.translateService.instant(isNaN(Number(e.data)) ? 'ui.controls.validation.invalidNumber' : 'ui.controls.validation.positive');
|
|
28
|
+
case 'custom':
|
|
29
|
+
return this.translateService.instant(e.data);
|
|
30
|
+
default:
|
|
31
|
+
return this.translateService.instant(e.code);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: ValidationMessageComponent, deps: [{ token: UI_TRANSLATESERVICE }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: ValidationMessageComponent, selector: "ui-validation-message", inputs: { validationErrors: "validationErrors" }, ngImport: i0, template: "{{ errorMessage }}\r\n" }); }
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: ValidationMessageComponent, decorators: [{
|
|
39
|
+
type: Component,
|
|
40
|
+
args: [{ selector: 'ui-validation-message', template: "{{ errorMessage }}\r\n" }]
|
|
41
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
42
|
+
type: Inject,
|
|
43
|
+
args: [UI_TRANSLATESERVICE]
|
|
44
|
+
}] }]; }, propDecorators: { validationErrors: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}] } });
|
|
47
47
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGlvbi1tZXNzYWdlLmNvbXBv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