@drayman/elements 1.4.30 → 1.6.0
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 +1 -0
- package/dist/code-editor/3rdpartylicenses.txt +634 -0
- package/dist/code-editor/favicon.ico +0 -0
- package/dist/code-editor/main.js +1 -0
- package/dist/code-editor/polyfills.js +1 -0
- package/dist/code-editor/styles.css +0 -0
- package/dist/grid/main.js +1 -1
- package/dist/monaco-editor/3rdpartylicenses.txt +406 -0
- package/dist/monaco-editor/favicon.ico +0 -0
- package/dist/monaco-editor/main.js +1 -0
- package/dist/monaco-editor/polyfills.js +1 -0
- package/dist/monaco-editor/styles.css +1 -0
- package/dist/nebula/main.js +1 -1
- package/dist/ngx-graph/3rdpartylicenses.txt +25 -0
- package/dist/ngx-graph/favicon.ico +0 -0
- package/dist/ngx-graph/main.js +1 -1
- package/dist/select/main.js +1 -1
- package/dist/table/main.js +1 -1
- package/dist/text-field/main.js +1 -1
- package/dist/types/code-editor/src/app/models/code-editor-options.d.ts +29 -0
- package/dist/types/nebula/src/app/models/nebula-options.d.ts +11 -14
- package/dist/types/ngx-graph/src/app/models/ngx-graph-options.d.ts +14 -0
- package/dist/types/select/src/app/models/select-options.d.ts +4 -0
- package/dist/types/table/src/app/models/table-options.d.ts +1 -0
- package/dist/types/text-field/src/app/models/text-field-options.d.ts +1 -0
- package/package.json +10 -2
- package/types/index.d.ts +31 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface DraymanCodeEditor {
|
|
2
|
+
/**
|
|
3
|
+
* The language of the code editor.
|
|
4
|
+
* By default, the language is set to 'javascript'.
|
|
5
|
+
*/
|
|
6
|
+
language?: 'javascript' | 'json' | 'sql';
|
|
7
|
+
/**
|
|
8
|
+
* Wether code editor should be disabled.
|
|
9
|
+
*/
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Wether code editor should be read only.
|
|
13
|
+
*/
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Value of the code editor.
|
|
17
|
+
*/
|
|
18
|
+
value?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Executed with an input value from user.
|
|
21
|
+
*/
|
|
22
|
+
onValueChange?: ElementEvent<{
|
|
23
|
+
value: string;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Label shown above the editor.
|
|
27
|
+
*/
|
|
28
|
+
label?: string;
|
|
29
|
+
}
|
|
@@ -3,38 +3,35 @@ export interface DraymanNebula {
|
|
|
3
3
|
* Executed when user makes selections.
|
|
4
4
|
*/
|
|
5
5
|
onSelections?: ElementEvent<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
method: 'selectHyperCubeValues' | 'rangeSelectHyperCubeValues';
|
|
9
|
-
};
|
|
6
|
+
selections: any;
|
|
7
|
+
method: 'selectHyperCubeValues' | 'rangeSelectHyperCubeValues';
|
|
10
8
|
}>;
|
|
11
9
|
/**
|
|
12
10
|
* Executed when viz method must be called.
|
|
13
11
|
*/
|
|
14
12
|
onVizMethod?: ElementEvent<{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
name: 'getEffectiveProperties' | 'getHyperCubeReducedData' | 'getHyperCubeData';
|
|
18
|
-
};
|
|
13
|
+
args: any;
|
|
14
|
+
name: 'getEffectiveProperties' | 'getHyperCubeReducedData' | 'getHyperCubeData';
|
|
19
15
|
}>;
|
|
20
16
|
/**
|
|
21
17
|
* Executed when measure needs to be returned
|
|
22
18
|
*/
|
|
23
19
|
onGetMeasure?: ElementEvent<{
|
|
24
|
-
|
|
25
|
-
measureId: string;
|
|
26
|
-
};
|
|
20
|
+
measureId: string;
|
|
27
21
|
}>;
|
|
28
22
|
/**
|
|
29
23
|
* Executed when object needs to be returned
|
|
30
24
|
*/
|
|
31
25
|
onGetObject?: ElementEvent<{
|
|
32
|
-
|
|
33
|
-
objectId: string;
|
|
34
|
-
};
|
|
26
|
+
objectId: string;
|
|
35
27
|
}>;
|
|
36
28
|
/**
|
|
37
29
|
* Initial qLayout of the object to render.
|
|
38
30
|
*/
|
|
39
31
|
qLayout: any;
|
|
32
|
+
/**
|
|
33
|
+
* Custom JSON theme for the viz.
|
|
34
|
+
* Structure can be found here - https://help.qlik.com/en-US/sense-developer/Subsystems/Extensions/Content/Sense_Extensions/CustomThemes/custom-themes-properties.htm.
|
|
35
|
+
*/
|
|
36
|
+
theme: any;
|
|
40
37
|
}
|
|
@@ -27,4 +27,18 @@ export interface DraymanNgxGraph {
|
|
|
27
27
|
* Automatically zoom the graph to fit in the avialable viewport when the graph is updated.
|
|
28
28
|
*/
|
|
29
29
|
autoZoom?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Executed when user clicks on a node.
|
|
32
|
+
*/
|
|
33
|
+
onNodeClick?: ElementEvent<{
|
|
34
|
+
nodeId: any;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Executed when user clicks on a link.
|
|
38
|
+
* Emits IDs of the source and target nodes.
|
|
39
|
+
*/
|
|
40
|
+
onLinkClick?: ElementEvent<{
|
|
41
|
+
sourceNodeId: any;
|
|
42
|
+
targetNodeId: any;
|
|
43
|
+
}>;
|
|
30
44
|
}
|
|
@@ -22,4 +22,8 @@ export interface DraymanSelect extends FieldOptionsBase<any> {
|
|
|
22
22
|
* Whether the user should be allowed to select multiple options.
|
|
23
23
|
*/
|
|
24
24
|
multiple?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether clearing of the select field should be disabled.
|
|
27
|
+
*/
|
|
28
|
+
allowSelectionClear?: boolean;
|
|
25
29
|
}
|
|
@@ -276,6 +276,7 @@ export interface DraymanTableFileUploaderCell extends DraymanTableCellBase<strin
|
|
|
276
276
|
}
|
|
277
277
|
export interface DraymanTableTextFieldCell extends DraymanTableCellBase<string>, InputMaskOptionsBase {
|
|
278
278
|
type: 'text-field';
|
|
279
|
+
inputType?: 'text' | 'password';
|
|
279
280
|
/**
|
|
280
281
|
* Error text to be shown underneath the form field control.
|
|
281
282
|
*/
|
|
@@ -2,4 +2,5 @@ import { InputMaskOptionsBase } from '../../../../shared/models/input-mask-optio
|
|
|
2
2
|
import { AutocompleteOptionsBase } from '../../../../shared/models/autocomplete-options-base';
|
|
3
3
|
import { InputFieldOptionsBase } from '../../../../shared/models/input-field-options-base';
|
|
4
4
|
export interface DraymanTextField extends InputFieldOptionsBase<string>, AutocompleteOptionsBase<string>, InputMaskOptionsBase {
|
|
5
|
+
type?: 'text' | 'password';
|
|
5
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drayman/elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "A collection of web components for Drayman.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"build:types": "tsc -p ./tsconfig.types.json",
|
|
13
13
|
"typedoc": "npm run build:types && typedoc --tsconfig ./tsconfig.types.json",
|
|
14
14
|
"lint": "ng lint",
|
|
15
|
-
"build": "npm run build:button && npm run build:text-field && npm run build:claviz-charts && npm run build:file-uploader && npm run build:number-field && npm run build:select && npm run build:table && npm run build:checkbox && npm run build:textarea-field && npm run build:radio-group && npm run build:datepicker && npm run build:timepicker && npm run build:pdf-viewer && npm run build:ngx-charts && npm run build:menu && npm run build:ngx-graph && npm run build:youtube-player && npm run build:nebula && npm run build:grid && npm run build:picasso && npm run typedoc",
|
|
15
|
+
"build": "npm run build:code-editor && npm run build:button && npm run build:text-field && npm run build:claviz-charts && npm run build:file-uploader && npm run build:number-field && npm run build:select && npm run build:table && npm run build:checkbox && npm run build:textarea-field && npm run build:radio-group && npm run build:datepicker && npm run build:timepicker && npm run build:pdf-viewer && npm run build:ngx-charts && npm run build:menu && npm run build:ngx-graph && npm run build:youtube-player && npm run build:nebula && npm run build:grid && npm run build:picasso && npm run typedoc",
|
|
16
|
+
"build:code-editor": "ng build code-editor --prod --single-bundle --output-hashing=none",
|
|
16
17
|
"build:button": "ng build button --prod --single-bundle --output-hashing=none",
|
|
17
18
|
"build:text-field": "ng build text-field --prod --single-bundle --output-hashing=none",
|
|
18
19
|
"build:claviz-charts": "ng build claviz-charts --prod --single-bundle --output-hashing=none",
|
|
@@ -46,6 +47,9 @@
|
|
|
46
47
|
"drayman-button": {
|
|
47
48
|
"script": "./dist/button/main.js"
|
|
48
49
|
},
|
|
50
|
+
"drayman-code-editor": {
|
|
51
|
+
"script": "./dist/code-editor/main.js"
|
|
52
|
+
},
|
|
49
53
|
"drayman-claviz-charts": {
|
|
50
54
|
"script": "./dist/claviz-charts/main.js"
|
|
51
55
|
},
|
|
@@ -118,6 +122,7 @@
|
|
|
118
122
|
"@angular/youtube-player": "^10.1.0",
|
|
119
123
|
"@babel/core": "^7.11.5",
|
|
120
124
|
"@compodoc/compodoc": "^1.1.11",
|
|
125
|
+
"@ctrl/ngx-codemirror": "^4.1.1",
|
|
121
126
|
"@drayman/types": "latest",
|
|
122
127
|
"@nebula.js/stardust": "2.3.1",
|
|
123
128
|
"@ngneat/spectator": "^5.13.2",
|
|
@@ -131,6 +136,7 @@
|
|
|
131
136
|
"babel-loader": "^8.1.0",
|
|
132
137
|
"claviz-charts": "0.5.0",
|
|
133
138
|
"codelyzer": "6.0.0",
|
|
139
|
+
"codemirror": "^5.65.2",
|
|
134
140
|
"d3-require": "^1.2.4",
|
|
135
141
|
"dayjs": "^1.9.6",
|
|
136
142
|
"deepmerge": "4.2.2",
|
|
@@ -141,6 +147,8 @@
|
|
|
141
147
|
"filepond-plugin-get-file": "1.0.6",
|
|
142
148
|
"jest": "26.4.2",
|
|
143
149
|
"jest-preset-angular": "^8.3.1",
|
|
150
|
+
"jshint": "^2.13.4",
|
|
151
|
+
"jsonlint": "^1.6.3",
|
|
144
152
|
"mat-single-overlay": "^0.0.2",
|
|
145
153
|
"ng-lazyload-image": "9.1.0",
|
|
146
154
|
"ng2-date-picker": "^10.0.1",
|
package/types/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { DraymanTimepicker } from '../dist/types/timepicker/src/app/models/timep
|
|
|
17
17
|
import { DraymanYoutubePlayer } from '../dist/types/youtube-player/src/app/models/youtube-player-options';
|
|
18
18
|
import { DraymanNebula } from '../dist/types/nebula/src/app/models/nebula-options';
|
|
19
19
|
import { DraymanGrid } from '../dist/types/grid/src/app/models/grid-options';
|
|
20
|
+
import { DraymanCodeEditor } from '../dist/types/code-editor/src/app/models/code-editor-options';
|
|
20
21
|
|
|
21
22
|
declare global {
|
|
22
23
|
interface DraymanElementsProps {
|
|
@@ -338,6 +339,35 @@ declare global {
|
|
|
338
339
|
* ```
|
|
339
340
|
*/
|
|
340
341
|
interface DraymanDatepickerProps extends DraymanDatepicker, DraymanElementsProps { }
|
|
342
|
+
/**
|
|
343
|
+
* # <drayman-code-editor \/>
|
|
344
|
+
*
|
|
345
|
+
* Code Editor powered by [CodeMirror](https://codemirror.net/) library.
|
|
346
|
+
*
|
|
347
|
+
* ## Example of usage
|
|
348
|
+
*
|
|
349
|
+
* ```typescript
|
|
350
|
+
* export const component: DraymanComponent = async ({ forceUpdate }) => {
|
|
351
|
+
* let code = `console.log('Hello, World!')`;
|
|
352
|
+
*
|
|
353
|
+
* return () => {
|
|
354
|
+
*
|
|
355
|
+
* return (
|
|
356
|
+
* <drayman-code-editor
|
|
357
|
+
* label="Amazing code"
|
|
358
|
+
* language="javascript"
|
|
359
|
+
* value={code}
|
|
360
|
+
* onValueChange={async ({ value }) => {
|
|
361
|
+
* code = value;
|
|
362
|
+
* await forceUpdate();
|
|
363
|
+
* }}
|
|
364
|
+
* />
|
|
365
|
+
* );
|
|
366
|
+
* }
|
|
367
|
+
* }
|
|
368
|
+
* ```
|
|
369
|
+
*/
|
|
370
|
+
interface DraymanCodeEditorProps extends DraymanCodeEditor, DraymanElementsProps { }
|
|
341
371
|
/**
|
|
342
372
|
* # <drayman-file-uploader \/>
|
|
343
373
|
*
|
|
@@ -1137,6 +1167,7 @@ declare global {
|
|
|
1137
1167
|
'drayman-youtube-player': DraymanYoutubePlayerProps;
|
|
1138
1168
|
'drayman-nebula': DraymanNebulaProps;
|
|
1139
1169
|
'drayman-grid': DraymanGridProps;
|
|
1170
|
+
'drayman-code-editor': DraymanCodeEditorProps;
|
|
1140
1171
|
}
|
|
1141
1172
|
}
|
|
1142
1173
|
}
|