@jsonforms/angular-material 3.1.0-alpha.0 → 3.1.0-alpha.1

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 (74) hide show
  1. package/lib/cjs/controls/autocomplete.renderer.d.ts +2 -2
  2. package/lib/cjs/other/master-detail/master.js +3 -0
  3. package/lib/cjs/other/master-detail/master.js.map +1 -1
  4. package/lib/cjs/other/master-detail/master.metadata.json +1 -1
  5. package/lib/esm/controls/autocomplete.renderer.d.ts +2 -2
  6. package/lib/esm/other/master-detail/master.js +4 -1
  7. package/lib/esm/other/master-detail/master.js.map +1 -1
  8. package/lib/esm/other/master-detail/master.metadata.json +1 -1
  9. package/package.json +23 -8
  10. package/src/controls/autocomplete.renderer.ts +2 -2
  11. package/src/layouts/layout.renderer.ts +2 -2
  12. package/src/other/master-detail/master.ts +5 -0
  13. package/docs/assets/css/main.css +0 -1
  14. package/docs/assets/images/icons.png +0 -0
  15. package/docs/assets/images/icons@2x.png +0 -0
  16. package/docs/assets/images/widgets.png +0 -0
  17. package/docs/assets/images/widgets@2x.png +0 -0
  18. package/docs/assets/js/main.js +0 -51
  19. package/docs/assets/js/search.json +0 -1
  20. package/docs/classes/arraylayoutrenderer.html +0 -1256
  21. package/docs/classes/autocompletecontrolrenderer.html +0 -887
  22. package/docs/classes/booleancontrolrenderer.html +0 -771
  23. package/docs/classes/categorizationtablayoutrenderer.html +0 -384
  24. package/docs/classes/datecontrolrenderer.html +0 -739
  25. package/docs/classes/grouplayoutrenderer.html +0 -396
  26. package/docs/classes/horizontallayoutrenderer.html +0 -396
  27. package/docs/classes/jsonformsangularmaterialmodule.html +0 -133
  28. package/docs/classes/jsonformsdetailcomponent.html +0 -227
  29. package/docs/classes/labelrenderer.html +0 -363
  30. package/docs/classes/layoutchildrenrenderpropspipe.html +0 -189
  31. package/docs/classes/layoutrenderer.html +0 -436
  32. package/docs/classes/masterlistcomponent.html +0 -1054
  33. package/docs/classes/numbercontrolrenderer.html +0 -893
  34. package/docs/classes/objectcontrolrenderer.html +0 -761
  35. package/docs/classes/rangecontrolrenderer.html +0 -792
  36. package/docs/classes/tablerenderer.html +0 -1222
  37. package/docs/classes/textarearenderer.html +0 -739
  38. package/docs/classes/textcontrolrenderer.html +0 -760
  39. package/docs/classes/togglecontrolrenderer.html +0 -771
  40. package/docs/classes/verticallayoutrenderer.html +0 -396
  41. package/docs/globals.html +0 -610
  42. package/docs/index.html +0 -378
  43. package/docs/interfaces/columndescription.html +0 -192
  44. package/docs/interfaces/ownpropsofautocomplete.html +0 -327
  45. package/example/app/app.component.ts +0 -122
  46. package/example/app/app.module.ts +0 -42
  47. package/example/index.html +0 -25
  48. package/example/main.ts +0 -37
  49. package/test/autocomplete-control.spec.ts +0 -322
  50. package/test/boolean-control.spec.ts +0 -76
  51. package/test/categorization-tab-layout.spec.ts +0 -330
  52. package/test/date-control.spec.ts +0 -280
  53. package/test/group-layout.spec.ts +0 -105
  54. package/test/horizontal-layout.spec.ts +0 -96
  55. package/test/label-renderer.spec.ts +0 -78
  56. package/test/master-detail.spec.ts +0 -408
  57. package/test/number-control.spec.ts +0 -208
  58. package/test/object-control.spec.ts +0 -247
  59. package/test/range-control.spec.ts +0 -104
  60. package/test/table-control.spec.ts +0 -369
  61. package/test/text-area.spec.ts +0 -108
  62. package/test/text-control.spec.ts +0 -89
  63. package/test/toggle-control.spec.ts +0 -77
  64. package/test/tsconfig.test.json +0 -18
  65. package/test/util.ts +0 -28
  66. package/test/vertical-layout.spec.ts +0 -115
  67. package/test-config/karma-test-shim.js +0 -21
  68. package/test-config/karma.conf.js +0 -58
  69. package/test-config/protractor.conf.js +0 -28
  70. package/test-config/webpack.test.js +0 -65
  71. package/tsconfig.cjs.json +0 -9
  72. package/tsconfig.json +0 -16
  73. package/webpack/webpack.build.js +0 -13
  74. package/webpack/webpack.dev.js +0 -37
@@ -1,115 +0,0 @@
1
- /*
2
- The MIT License
3
-
4
- Copyright (c) 2017-2019 EclipseSource Munich
5
- https://github.com/eclipsesource/jsonforms
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in
15
- all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- THE SOFTWARE.
24
- */
25
- import { ComponentFixture } from '@angular/core/testing';
26
- import { UISchemaElement, VerticalLayout } from '@jsonforms/core';
27
- import { beforeEachLayoutTest, setupMockStore } from '@jsonforms/angular-test';
28
- import { FlexLayoutModule } from '@angular/flex-layout';
29
- import {
30
- VerticalLayoutRenderer,
31
- verticalLayoutTester
32
- } from '../src/layouts/vertical-layout.renderer';
33
- import { LayoutChildrenRenderPropsPipe } from '../src/layouts/layout.renderer';
34
-
35
- describe('Vertical layout tester', () => {
36
- it('should succeed', () => {
37
- expect(verticalLayoutTester({ type: 'VerticalLayout' }, undefined, undefined)).toBe(1);
38
- });
39
- });
40
- describe('Vertical layout', () => {
41
- let fixture: ComponentFixture<any>;
42
- let component: any;
43
-
44
- beforeEach(() => {
45
- fixture = beforeEachLayoutTest(VerticalLayoutRenderer, {
46
- declarations: [LayoutChildrenRenderPropsPipe],
47
- imports: [FlexLayoutModule]
48
- });
49
- component = fixture.componentInstance;
50
- });
51
-
52
- it('render with undefined elements', () => {
53
- const uischema: UISchemaElement = {
54
- type: 'VerticalLayout'
55
- };
56
- setupMockStore(fixture, {
57
- data: {},
58
- schema: {},
59
- uischema
60
- });
61
- fixture.componentInstance.ngOnInit();
62
- fixture.detectChanges();
63
- expect(fixture.nativeElement.children[0].children.length).toBe(0);
64
- // the component is wrapped in a div
65
- expect(fixture.nativeElement.children[0].style.display).not.toBe('none');
66
- });
67
-
68
- it('render with null elements', () => {
69
- const uischema: VerticalLayout = {
70
- type: 'VerticalLayout',
71
- elements: null
72
- };
73
-
74
- setupMockStore(fixture, {
75
- data: {},
76
- schema: {},
77
- uischema
78
- });
79
- fixture.componentInstance.ngOnInit();
80
- fixture.detectChanges();
81
- expect(fixture.nativeElement.children[0].children.length).toBe(0);
82
- });
83
-
84
- it('render with children', () => {
85
- const uischema: VerticalLayout = {
86
- type: 'VerticalLayout',
87
- elements: [{ type: 'Control' }, { type: 'Control' }]
88
- };
89
- setupMockStore(fixture, {
90
- data: {},
91
- schema: {},
92
- uischema
93
- });
94
- fixture.componentInstance.ngOnInit();
95
- fixture.detectChanges();
96
- expect(fixture.nativeElement.children[0].children.length).toBe(2);
97
- expect(fixture.nativeElement.children[0].hidden).toBe(false);
98
- });
99
-
100
- // TODO: broken due to https://github.com/angular/flex-layout/issues/848
101
- xit('can be hidden', () => {
102
- const uischema: VerticalLayout = {
103
- type: 'VerticalLayout',
104
- elements: [{ type: 'Control' }, { type: 'Control' }]
105
- };
106
- component.visible = false;
107
- setupMockStore(fixture, {
108
- data: {},
109
- schema: {},
110
- uischema
111
- });
112
- component.ngOnInit();
113
- expect(fixture.nativeElement.children[0].style.display).toBe('none');
114
- });
115
- });
@@ -1,21 +0,0 @@
1
- Error.stackTraceLimit = Infinity;
2
-
3
- require('core-js/es6');
4
- require('core-js/es7/reflect');
5
-
6
- require('zone.js/dist/zone');
7
- require('zone.js/dist/long-stack-trace-zone');
8
- require('zone.js/dist/proxy');
9
- require('zone.js/dist/sync-test');
10
- require('zone.js/dist/jasmine-patch');
11
- require('zone.js/dist/async-test');
12
- require('zone.js/dist/fake-async-test');
13
-
14
- var appContext = require.context('../test', true, /\.spec\.ts/);
15
-
16
- appContext.keys().forEach(appContext);
17
-
18
- var testing = require('@angular/core/testing');
19
- var browser = require('@angular/platform-browser-dynamic/testing');
20
-
21
- testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
@@ -1,58 +0,0 @@
1
- var webpackConfig = require('./webpack.test.js');
2
-
3
- module.exports = function(config) {
4
- var _config = {
5
- basePath: '../',
6
-
7
- frameworks: ['jasmine'],
8
-
9
- files: [
10
- {
11
- pattern: './test-config/karma-test-shim.js',
12
- watched: true
13
- }
14
- ],
15
-
16
- preprocessors: {
17
- './test-config/karma-test-shim.js': ['webpack', 'sourcemap']
18
- },
19
-
20
- webpack: webpackConfig,
21
-
22
- webpackMiddleware: {
23
- stats: 'errors-only'
24
- },
25
-
26
- webpackServer: {
27
- noInfo: true
28
- },
29
-
30
- browserConsoleLogOptions: {
31
- level: 'log',
32
- format: '%b %T: %m',
33
- terminal: true
34
- },
35
-
36
- coverageIstanbulReporter: {
37
- reports: [ 'html', 'lcovonly' ],
38
- fixWebpackSourcePaths: true
39
- },
40
-
41
- reporters: config.coverage ? ['kjhtml', 'dots', 'coverage-istanbul'] : ['kjhtml', 'dots'],
42
- port: 9876,
43
-
44
- colors: true,
45
- logLevel: config.LOG_INFO,
46
- autoWatch: true,
47
- browsers: ['ChromeHeadlessNoSandbox'],
48
- customLaunchers: {
49
- ChromeHeadlessNoSandbox: {
50
- base: 'ChromeHeadless',
51
- flags: ['--no-sandbox']
52
- }
53
- },
54
- singleRun: false
55
- };
56
-
57
- config.set(_config);
58
- };
@@ -1,28 +0,0 @@
1
- // Protractor configuration file, see link for more information
2
- // https://github.com/angular/protractor/blob/master/lib/config.ts
3
-
4
- const { SpecReporter } = require('jasmine-spec-reporter');
5
-
6
- exports.config = {
7
- allScriptsTimeout: 11000,
8
- specs: [
9
- '../e2e/**/*.e2e-spec.ts'
10
- ],
11
- capabilities: {
12
- 'browserName': 'chrome'
13
- },
14
- directConnect: true,
15
- baseUrl: 'http://localhost:8100/',
16
- framework: 'jasmine',
17
- jasmineNodeOpts: {
18
- showColors: true,
19
- defaultTimeoutInterval: 30000,
20
- print: function() {}
21
- },
22
- onPrepare() {
23
- require('ts-node').register({
24
- project: 'e2e/tsconfig.e2e.json'
25
- });
26
- jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27
- }
28
- };
@@ -1,65 +0,0 @@
1
- var webpack = require('webpack');
2
- var path = require('path');
3
-
4
- module.exports = {
5
- devtool: 'inline-source-map',
6
-
7
- resolve: {
8
- extensions: ['.ts', '.js']
9
- },
10
-
11
- module: {
12
- rules: [
13
- {
14
- test: /\.jsx?$/,
15
- loader: 'babel-loader',
16
- options: {
17
- plugins: [
18
- '@babel/plugin-proposal-optional-chaining',
19
- '@babel/plugin-proposal-nullish-coalescing-operator'
20
- ]
21
- },
22
- exclude: /node_modules/
23
- },
24
- {
25
- test: /\.ts$/,
26
- loaders: [
27
- {
28
- loader: 'ts-loader'
29
- },
30
- 'angular2-template-loader'
31
- ]
32
- },
33
- {
34
- test: /.+\.ts$/,
35
- exclude: /(index.ts|mocks.ts|\.spec\.ts|\.test\.ts$)/,
36
- loader: 'istanbul-instrumenter-loader',
37
- enforce: 'post',
38
- query: {
39
- esModules: true
40
- }
41
- },
42
- {
43
- test: /\.html$/,
44
- loader: 'html-loader?attrs=false'
45
- },
46
- {
47
- test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
48
- loader: 'null-loader'
49
- }
50
- ]
51
- },
52
-
53
- plugins: [
54
- new webpack.ContextReplacementPlugin(
55
- // The (\\|\/) piece accounts for path separators in *nix and Windows
56
- /(angular(\\|\/)core(\\|\/)@angular)/,
57
- root('./src'), // location of your src
58
- {} // a map of your routes
59
- )
60
- ]
61
- };
62
-
63
- function root(localPath) {
64
- return path.resolve(__dirname, localPath);
65
- }
package/tsconfig.cjs.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./tsconfig",
3
- "compilerOptions": {
4
- "outDir": "./lib/cjs",
5
- "sourceMap": true,
6
- "target": "es5",
7
- "module": "commonjs"
8
- },
9
- }
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base",
3
- "compilerOptions": {
4
- "outDir": "./lib/esm",
5
- "sourceMap": true,
6
- "target": "es5"
7
- },
8
- "exclude": ["node_modules"],
9
- "files": ["./src/index.ts"],
10
- "angularCompilerOptions": {
11
- "strictMetadataEmit": true,
12
- "generateCodeForLibraries": false,
13
- "skipTemplateCodegen": true,
14
- "enableIvy": false
15
- }
16
- }
@@ -1,13 +0,0 @@
1
- const merge = require('webpack-merge');
2
- const baseConfig = require('../../../webpack/webpack.build.base.js');
3
-
4
- module.exports = merge(baseConfig, {
5
- output: {
6
- filename: "jsonforms-angular-material.js",
7
- library: "JSONFormsAngularMaterial"
8
- },
9
- externals: {
10
- '@jsonforms/core': 'JSONFormsCore',
11
- '@jsonforms/angular': 'JSONFormsAngular'
12
- },
13
- });
@@ -1,37 +0,0 @@
1
- var webpack = require('webpack');
2
- const path = require("path");
3
- const merge = require('webpack-merge');
4
- var copyWebpackPlugin = require("copy-webpack-plugin");
5
- const baseConfig = require('../../../webpack/webpack.base.js');
6
-
7
- module.exports = merge(baseConfig, {
8
- entry: [
9
- 'webpack-dev-server/client?http://localhost:8080',
10
- 'webpack/hot/dev-server',
11
- './example/main.ts'
12
- ],
13
- output: {
14
- publicPath: "/assets/",
15
- filename: "bundle.js"
16
- },
17
-
18
- devServer: {
19
- contentBase: './example'
20
- },
21
- plugins: [
22
- new webpack.HotModuleReplacementPlugin(),
23
- new copyWebpackPlugin([
24
- { from: '../../node_modules/@angular/material/prebuilt-themes/indigo-pink.css' }
25
- ])
26
-
27
- ],
28
- module: {
29
- rules: [
30
- { test: /\.html$/, exclude: /node_modules/, loader: 'html-loader?exportAsEs6Default'}
31
- ]
32
- },
33
- resolve: {
34
- // manually link to angular path in case of dev
35
- modules: [path.resolve(__dirname, "../../angular/node_modules"), "node_modules"]
36
- }
37
- });