@datarailsshared/datarailsshared 1.5.284 → 1.5.286
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/assets/styles/_styles.scss +4 -0
- package/datarailsshared-datarailsshared-1.5.286.tgz +0 -0
- package/esm2022/lib/dr-code-editor/components/code-editor-hint-wrapper.component.mjs +15 -0
- package/esm2022/lib/dr-code-editor/components/dr-codemirror.component.mjs +201 -0
- package/esm2022/lib/dr-code-editor/dr-code-editor.component.mjs +292 -0
- package/esm2022/lib/dr-code-editor/dr-code-editor.module.mjs +42 -0
- package/esm2022/lib/dr-code-editor/models/code-editor-hint.mjs +6 -0
- package/esm2022/lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component.mjs +12 -2
- package/esm2022/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.mjs +7 -2
- package/esm2022/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.mjs +3 -2
- package/esm2022/lib/utils/dr-shared-utils.mjs +4 -1
- package/esm2022/public-api.mjs +6 -1
- package/fesm2022/datarailsshared-datarailsshared.mjs +617 -68
- package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
- package/lib/dr-code-editor/components/code-editor-hint-wrapper.component.d.ts +7 -0
- package/lib/dr-code-editor/components/dr-codemirror.component.d.ts +47 -0
- package/lib/dr-code-editor/dr-code-editor.component.d.ts +44 -0
- package/lib/dr-code-editor/dr-code-editor.module.d.ts +17 -0
- package/lib/dr-code-editor/models/code-editor-hint.d.ts +14 -0
- package/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.d.ts +3 -2
- package/lib/utils/dr-shared-utils.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -0
- package/styles.css +526 -0
- package/datarailsshared-datarailsshared-1.5.284.tgz +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CodeEditorHintWrapperComponent {
|
|
3
|
+
content: string;
|
|
4
|
+
tooltip: string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CodeEditorHintWrapperComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CodeEditorHintWrapperComponent, "dr-code-editor-hint-wrapper", never, {}, {}, never, never, false, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AfterViewInit, DoCheck, ElementRef, EventEmitter, KeyValueDiffers, NgZone, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { Editor, EditorChange, EditorFromTextArea, ScrollInfo } from 'codemirror';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DrCodemirrorComponent implements AfterViewInit, OnDestroy, ControlValueAccessor, DoCheck {
|
|
6
|
+
private _differs;
|
|
7
|
+
private _ngZone;
|
|
8
|
+
className: string;
|
|
9
|
+
name: string;
|
|
10
|
+
autoFocus: boolean;
|
|
11
|
+
set options(value: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
});
|
|
14
|
+
preserveScrollPosition: boolean;
|
|
15
|
+
cursorActivity: EventEmitter<Editor>;
|
|
16
|
+
focusChange: EventEmitter<boolean>;
|
|
17
|
+
scroll: EventEmitter<ScrollInfo>;
|
|
18
|
+
drop: EventEmitter<[Editor, DragEvent]>;
|
|
19
|
+
codeMirrorLoaded: EventEmitter<DrCodemirrorComponent>;
|
|
20
|
+
ref: ElementRef<HTMLTextAreaElement>;
|
|
21
|
+
value: string;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
isFocused: boolean;
|
|
24
|
+
codeMirror?: EditorFromTextArea;
|
|
25
|
+
private _codeMirror;
|
|
26
|
+
private _differ?;
|
|
27
|
+
private _options;
|
|
28
|
+
constructor(_differs: KeyValueDiffers, _ngZone: NgZone);
|
|
29
|
+
get codeMirrorGlobal(): any;
|
|
30
|
+
ngAfterViewInit(): void;
|
|
31
|
+
ngDoCheck(): void;
|
|
32
|
+
ngOnDestroy(): void;
|
|
33
|
+
codemirrorValueChanged(cm: Editor, change: EditorChange): void;
|
|
34
|
+
setOptionIfChanged(optionName: string, newValue: any): void;
|
|
35
|
+
focusChanged(focused: boolean): void;
|
|
36
|
+
scrollChanged(cm: Editor): void;
|
|
37
|
+
cursorActive(cm: Editor): void;
|
|
38
|
+
dropFiles(cm: Editor, e: DragEvent): void;
|
|
39
|
+
writeValue(value: string): void;
|
|
40
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
41
|
+
registerOnTouched(fn: () => void): void;
|
|
42
|
+
setDisabledState(isDisabled: boolean): void;
|
|
43
|
+
private onChange;
|
|
44
|
+
private onTouched;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DrCodemirrorComponent, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DrCodemirrorComponent, "dr-codemirror", never, { "className": { "alias": "className"; "required": false; }; "name": { "alias": "name"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "options": { "alias": "options"; "required": false; }; "preserveScrollPosition": { "alias": "preserveScrollPosition"; "required": false; }; }, { "cursorActivity": "cursorActivity"; "focusChange": "focusChange"; "scroll": "scroll"; "drop": "drop"; "codeMirrorLoaded": "codeMirrorLoaded"; }, never, never, false, never>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ComponentFactoryResolver, Injector } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
|
+
import { ICodeEditorHint } from './models/code-editor-hint';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DrCodeEditorComponent implements ControlValueAccessor {
|
|
6
|
+
private cdr;
|
|
7
|
+
private cfr;
|
|
8
|
+
private injector;
|
|
9
|
+
constructor(cdr: ChangeDetectorRef, cfr: ComponentFactoryResolver, injector: Injector);
|
|
10
|
+
innerValue: any;
|
|
11
|
+
private onTouchedCallback;
|
|
12
|
+
private onChangeCallback;
|
|
13
|
+
private existMarkers;
|
|
14
|
+
private highlightedHints;
|
|
15
|
+
private parenthesesMarkers;
|
|
16
|
+
private parenthesisColors;
|
|
17
|
+
private parenthesesMap;
|
|
18
|
+
private doc;
|
|
19
|
+
private _hints;
|
|
20
|
+
private hintRefsStack;
|
|
21
|
+
codeMirrorOptions: any;
|
|
22
|
+
isFocused: boolean;
|
|
23
|
+
private markers;
|
|
24
|
+
highlightHints: boolean;
|
|
25
|
+
set hints(values: ICodeEditorHint[]);
|
|
26
|
+
control: FormControl | any;
|
|
27
|
+
private codeEditor;
|
|
28
|
+
get value(): string;
|
|
29
|
+
set value(v: string);
|
|
30
|
+
writeValue(value: string): void;
|
|
31
|
+
registerOnChange(fn: any): void;
|
|
32
|
+
registerOnTouched(fn: any): void;
|
|
33
|
+
focusChanged(bool: any): void;
|
|
34
|
+
afterCodeMirrorLoaded(): void;
|
|
35
|
+
private isClosedParenthesis;
|
|
36
|
+
private colorizeParentheses;
|
|
37
|
+
private highlightCustomFunctionsInEditor;
|
|
38
|
+
pasteText(text: string, goCharLeft?: boolean): void;
|
|
39
|
+
private registerHints;
|
|
40
|
+
private destroyHints;
|
|
41
|
+
private updateHighlightHints;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DrCodeEditorComponent, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DrCodeEditorComponent, "dr-code-editor", never, { "markers": { "alias": "markers"; "required": false; }; "highlightHints": { "alias": "highlightHints"; "required": false; }; "hints": { "alias": "hints"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, {}, never, never, false, never>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import 'codemirror/mode/javascript/javascript';
|
|
2
|
+
import 'codemirror/addon/edit/matchbrackets';
|
|
3
|
+
import 'codemirror/addon/hint/show-hint';
|
|
4
|
+
import '@codemirror/autocomplete';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "./components/dr-codemirror.component";
|
|
7
|
+
import * as i2 from "./dr-code-editor.component";
|
|
8
|
+
import * as i3 from "./components/code-editor-hint-wrapper.component";
|
|
9
|
+
import * as i4 from "@angular/common";
|
|
10
|
+
import * as i5 from "@angular/forms";
|
|
11
|
+
import * as i6 from "../dr-tooltip/dr-tooltip.module";
|
|
12
|
+
import * as i7 from "../dr-error/dr-error.module";
|
|
13
|
+
export declare class DrCodeEditorModule {
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DrCodeEditorModule, never>;
|
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DrCodeEditorModule, [typeof i1.DrCodemirrorComponent, typeof i2.DrCodeEditorComponent, typeof i3.CodeEditorHintWrapperComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.DrTooltipModule, typeof i7.DrErrorModule], [typeof i1.DrCodemirrorComponent, typeof i2.DrCodeEditorComponent, typeof i3.CodeEditorHintWrapperComponent]>;
|
|
16
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DrCodeEditorModule>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ICodeEditorHint {
|
|
2
|
+
icon: ICodeEditorHintIcon;
|
|
3
|
+
value: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
hint?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare enum ICodeEditorHintIcon {
|
|
8
|
+
VALUE = "#",
|
|
9
|
+
CALCULATED_VALUE = "="
|
|
10
|
+
}
|
|
11
|
+
export interface ICodeEditorMarker {
|
|
12
|
+
name: string;
|
|
13
|
+
title: string;
|
|
14
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DrDatePickerComponent } from '../dr-date-picker/dr-date-picker.component';
|
|
3
3
|
import { DateAdapter } from '@angular/material/core';
|
|
4
4
|
import { DrDatePickerService } from '../services/dr-date-picker.service';
|
|
@@ -6,7 +6,7 @@ import { ControlValueAccessor } from '@angular/forms';
|
|
|
6
6
|
import { DateTags, IDatePickerFormatConfig, TimeframeOption } from '../../../models/datePicker';
|
|
7
7
|
import { Moment } from 'moment';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class DrDatePickerWithTimeframeComponent extends DrDatePickerComponent implements ControlValueAccessor, AfterViewInit, OnDestroy, OnInit {
|
|
9
|
+
export declare class DrDatePickerWithTimeframeComponent extends DrDatePickerComponent implements ControlValueAccessor, AfterViewInit, OnDestroy, OnInit, OnChanges {
|
|
10
10
|
protected cdr: ChangeDetectorRef;
|
|
11
11
|
protected dateAdapter: DateAdapter<any>;
|
|
12
12
|
datePickerService: DrDatePickerService;
|
|
@@ -30,6 +30,7 @@ export declare class DrDatePickerWithTimeframeComponent extends DrDatePickerComp
|
|
|
30
30
|
private onChangeDebounced$;
|
|
31
31
|
constructor(cdr: ChangeDetectorRef, dateAdapter: DateAdapter<any>, datePickerService: DrDatePickerService);
|
|
32
32
|
ngOnInit(): void;
|
|
33
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
33
34
|
pagingClicked(forward: boolean): void;
|
|
34
35
|
pagingDateChange(newValue: Moment): void;
|
|
35
36
|
/**
|
|
@@ -9,4 +9,5 @@ export declare class DrSharedUtils {
|
|
|
9
9
|
static getTimeframeByDateFormat(format: string): TimeframeOption;
|
|
10
10
|
static getDateByTag(tag: string): any;
|
|
11
11
|
static fromResizeObserver: (target: Element) => Observable<ResizeObserverEntry[]>;
|
|
12
|
+
static normalizeLineEndings: (str: string) => string;
|
|
12
13
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -47,6 +47,9 @@ export * from './lib/dr-spinner/dr-spinner.directive';
|
|
|
47
47
|
export * from './lib/dr-inputs/button/button.component';
|
|
48
48
|
export * from './lib/dr-badge-status/dr-badge-status.component';
|
|
49
49
|
export * from './lib/dr-alert/dr-alert.component';
|
|
50
|
+
export * from './lib/dr-code-editor/dr-code-editor.component';
|
|
51
|
+
export * from './lib/dr-code-editor/components/dr-codemirror.component';
|
|
52
|
+
export * from './lib/dr-code-editor/components/code-editor-hint-wrapper.component';
|
|
50
53
|
export * from './lib/dr-scenario/components/dr-scenario-tag-configuration/dr-scenario-tag-configuration.component';
|
|
51
54
|
export * from './lib/dr-scenario/components/dr-scenario-configuration/dr-scenario-configuration.component';
|
|
52
55
|
export * from './lib/dr-tags-constructor/dr-tags-constructor.component';
|
|
@@ -103,6 +106,7 @@ export * from './lib/models/badgeStatus';
|
|
|
103
106
|
export * from './lib/models/feedback';
|
|
104
107
|
export * from './lib/models/toastr';
|
|
105
108
|
export * from './lib/models/datePickerRange';
|
|
109
|
+
export * from './lib/dr-code-editor/models/code-editor-hint';
|
|
106
110
|
export { ScenarioService } from './lib/dr-scenario/services/scenario.service';
|
|
107
111
|
export { TagsConstructorService } from './lib/dr-tags-constructor/tags-constructor.service';
|
|
108
112
|
export { DrAvatarService } from './lib/dr-avatar/services/dr-avatar.service';
|
|
@@ -132,3 +136,4 @@ export { ClickOutsideModule } from './lib/directives/click-outside/click-outside
|
|
|
132
136
|
export { DrAlertModule } from './lib/dr-alert/dr-alert.module';
|
|
133
137
|
export { DrTagsConstructorModule } from './lib/dr-tags-constructor/dr-tags-constructor.module';
|
|
134
138
|
export { DrToastrModule } from './lib/dr-toastr/dr-toastr.module';
|
|
139
|
+
export { DrCodeEditorModule } from './lib/dr-code-editor/dr-code-editor.module';
|