@jsonforms/core 3.0.0-alpha.0 → 3.0.0-beta.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 -1
- package/docs/assets/js/search.json +1 -1
- package/docs/enums/ruleeffect.html +4 -4
- package/docs/globals.html +1095 -703
- package/docs/index.html +70 -43
- package/docs/interfaces/addcellrendereraction.html +3 -3
- package/docs/interfaces/addrendereraction.html +3 -3
- package/docs/interfaces/adduischemaaction.html +3 -3
- package/docs/interfaces/andcondition.html +2 -2
- package/docs/interfaces/arraycontrolprops.html +22 -22
- package/docs/interfaces/arraylayoutprops.html +22 -22
- package/docs/interfaces/categorization.html +5 -5
- package/docs/interfaces/category.html +5 -5
- package/docs/interfaces/cellprops.html +14 -14
- package/docs/interfaces/combinatorrendererprops.html +13 -13
- package/docs/interfaces/combinatorsubschemarenderinfo.html +3 -3
- package/docs/interfaces/composablecondition.html +2 -2
- package/docs/interfaces/condition.html +1 -1
- package/docs/interfaces/controlelement.html +5 -5
- package/docs/interfaces/controlprops.html +17 -17
- package/docs/interfaces/controlstate.html +2 -2
- package/docs/interfaces/controlwithdetailprops.html +18 -18
- package/docs/interfaces/dispatchcellprops.html +13 -13
- package/docs/interfaces/dispatchcellstateprops.html +13 -13
- package/docs/interfaces/dispatchpropsofarraycontrol.html +4 -4
- package/docs/interfaces/dispatchpropsofcontrol.html +1 -1
- package/docs/interfaces/dispatchpropsofmultienumcontrol.html +2 -2
- package/docs/interfaces/enumcellprops.html +15 -15
- package/docs/interfaces/enumoption.html +2 -2
- package/docs/interfaces/formatted.html +2 -2
- package/docs/interfaces/grouplayout.html +5 -5
- package/docs/interfaces/horizontallayout.html +4 -4
- package/docs/interfaces/initaction.html +6 -6
- package/docs/interfaces/initactionoptions.html +3 -3
- package/docs/interfaces/jsonformscellrendererregistryentry.html +2 -2
- package/docs/interfaces/jsonformscore.html +7 -7
- package/docs/interfaces/jsonformsdefaultdataregistryentry.html +2 -2
- package/docs/interfaces/jsonformsextendedstate.html +1 -1
- package/docs/interfaces/{jsonformslocalestate.html → jsonformsi18nstate.html} +20 -20
- package/docs/interfaces/jsonformsprops.html +9 -9
- package/docs/interfaces/jsonformsrendererregistryentry.html +2 -2
- package/docs/interfaces/jsonformsstate.html +1 -1
- package/docs/interfaces/jsonformsstore.html +5 -5
- package/docs/interfaces/jsonformssubstates.html +18 -8
- package/docs/interfaces/jsonformsuischemaregistryentry.html +2 -2
- package/docs/interfaces/labeldescription.html +2 -2
- package/docs/interfaces/labelelement.html +4 -4
- package/docs/interfaces/layout.html +4 -4
- package/docs/interfaces/layoutprops.html +10 -10
- package/docs/interfaces/leafcondition.html +3 -3
- package/docs/interfaces/orcondition.html +2 -2
- package/docs/interfaces/ownpropsofcell.html +10 -10
- package/docs/interfaces/ownpropsofcontrol.html +9 -9
- package/docs/interfaces/ownpropsofenum.html +1 -1
- package/docs/interfaces/ownpropsofenumcell.html +11 -11
- package/docs/interfaces/ownpropsofjsonformsrenderer.html +8 -8
- package/docs/interfaces/ownpropsoflayout.html +9 -9
- package/docs/interfaces/ownpropsofmasterlistitem.html +6 -6
- package/docs/interfaces/ownpropsofrenderer.html +8 -8
- package/docs/interfaces/registerdefaultdataaction.html +3 -3
- package/docs/interfaces/removecellrendereraction.html +3 -3
- package/docs/interfaces/removerendereraction.html +3 -3
- package/docs/interfaces/removeuischemaaction.html +2 -2
- package/docs/interfaces/rendererprops.html +9 -9
- package/docs/interfaces/rule.html +2 -2
- package/docs/interfaces/schemabasedcondition.html +3 -3
- package/docs/interfaces/scopable.html +1 -1
- package/docs/interfaces/setajvaction.html +3 -3
- package/docs/interfaces/setconfigaction.html +2 -2
- package/docs/interfaces/setlocaleaction.html +3 -3
- package/docs/interfaces/setschemaaction.html +2 -2
- package/docs/interfaces/{setlocalizedschemasaction.html → settranslatoraction.html} +29 -15
- package/docs/interfaces/setuischemaaction.html +2 -2
- package/docs/interfaces/setvalidationmodeaction.html +2 -2
- package/docs/interfaces/statepropsofarraycontrol.html +18 -18
- package/docs/interfaces/statepropsofarraylayout.html +18 -18
- package/docs/interfaces/statepropsofcell.html +13 -13
- package/docs/interfaces/statepropsofcombinator.html +12 -12
- package/docs/interfaces/statepropsofcontrol.html +16 -16
- package/docs/interfaces/statepropsofcontrolwithdetail.html +17 -17
- package/docs/interfaces/statepropsofenumcell.html +14 -14
- package/docs/interfaces/statepropsofjsonformsrenderer.html +9 -9
- package/docs/interfaces/statepropsoflayout.html +10 -10
- package/docs/interfaces/statepropsofmasteritem.html +7 -7
- package/docs/interfaces/statepropsofrenderer.html +9 -9
- package/docs/interfaces/statepropsofscopedrenderer.html +12 -12
- package/docs/interfaces/uischemaelement.html +3 -3
- package/docs/interfaces/unregisterdefaultdataaction.html +2 -2
- package/docs/interfaces/updateaction.html +3 -3
- package/docs/interfaces/updatecoreaction.html +6 -6
- package/docs/interfaces/updateerrorsaction.html +2 -2
- package/docs/interfaces/{setlocalizeduischemasaction.html → updatei18naction.html} +43 -15
- package/docs/interfaces/verticallayout.html +4 -4
- package/docs/interfaces/withclassname.html +1 -1
- package/lib/Helpers.d.ts +5 -0
- package/lib/actions/actions.d.ts +181 -0
- package/lib/actions/index.d.ts +1 -178
- package/lib/configDefault.d.ts +6 -6
- package/lib/generators/Generate.d.ts +6 -0
- package/lib/generators/index.d.ts +3 -10
- package/lib/generators/schema.d.ts +8 -8
- package/lib/generators/uischema.d.ts +12 -13
- package/lib/i18n/i18nTypes.d.ts +15 -0
- package/lib/i18n/i18nUtil.d.ts +18 -0
- package/lib/i18n/index.d.ts +2 -0
- package/lib/index.d.ts +11 -23
- package/lib/jsonforms-core.cjs.js +2445 -0
- package/lib/jsonforms-core.cjs.js.map +1 -0
- package/lib/jsonforms-core.esm.js +2164 -0
- package/lib/jsonforms-core.esm.js.map +1 -0
- package/lib/models/draft4.d.ts +198 -198
- package/lib/models/index.d.ts +5 -0
- package/lib/models/jsonSchema.d.ts +3 -3
- package/lib/models/jsonSchema4.d.ts +110 -110
- package/lib/models/jsonSchema7.d.ts +119 -119
- package/lib/models/uischema.d.ts +201 -201
- package/lib/reducers/cells.d.ts +11 -11
- package/lib/reducers/config.d.ts +3 -3
- package/lib/reducers/core.d.ts +24 -23
- package/lib/reducers/default-data.d.ts +10 -10
- package/lib/reducers/i18n.d.ts +8 -11
- package/lib/reducers/index.d.ts +9 -47
- package/lib/reducers/reducers.d.ts +29 -0
- package/lib/reducers/renderers.d.ts +10 -10
- package/lib/reducers/selectors.d.ts +15 -0
- package/lib/reducers/uischemas.d.ts +10 -10
- package/lib/store.d.ts +53 -56
- package/lib/testers/index.d.ts +1 -204
- package/lib/testers/testers.d.ts +203 -0
- package/lib/util/Formatted.d.ts +19 -19
- package/lib/util/array.d.ts +3 -3
- package/lib/util/cell.d.ts +79 -79
- package/lib/util/combinators.d.ts +10 -11
- package/lib/util/ids.d.ts +3 -3
- package/lib/util/index.d.ts +15 -49
- package/lib/util/label.d.ts +9 -10
- package/lib/util/path.d.ts +25 -24
- package/lib/util/renderer.d.ts +398 -395
- package/lib/util/resolvers.d.ts +25 -25
- package/lib/util/runtime.d.ts +18 -19
- package/lib/util/schema.d.ts +1 -1
- package/lib/util/type.d.ts +174 -174
- package/lib/util/uischema.d.ts +5 -5
- package/lib/util/util.d.ts +31 -0
- package/lib/util/validator.d.ts +3 -2
- package/package.json +18 -14
- package/rollup.config.js +44 -0
- package/{lib/models/jsonSchema4.js → src/Helpers.ts} +16 -8
- package/src/actions/actions.ts +345 -0
- package/src/actions/index.ts +1 -310
- package/src/configDefault.ts +1 -0
- package/{lib/util/validator.js → src/generators/Generate.ts} +18 -11
- package/src/generators/index.ts +3 -21
- package/src/generators/schema.ts +1 -1
- package/src/generators/uischema.ts +4 -4
- package/src/i18n/i18nTypes.ts +17 -0
- package/src/i18n/i18nUtil.ts +105 -0
- package/src/i18n/index.ts +2 -0
- package/src/index.ts +7 -31
- package/src/models/draft4.ts +1 -0
- package/{lib/util/type.js → src/models/index.ts} +10 -7
- package/src/models/jsonSchema.ts +1 -0
- package/src/models/uischema.ts +1 -0
- package/src/reducers/cells.ts +2 -1
- package/src/reducers/config.ts +2 -1
- package/src/reducers/core.ts +74 -52
- package/src/reducers/default-data.ts +2 -1
- package/src/reducers/i18n.ts +42 -35
- package/src/reducers/index.ts +9 -154
- package/src/reducers/reducers.ts +128 -0
- package/src/reducers/renderers.ts +2 -1
- package/src/reducers/selectors.ts +65 -0
- package/src/reducers/uischemas.ts +4 -2
- package/src/store.ts +11 -8
- package/src/testers/index.ts +1 -516
- package/src/testers/testers.ts +547 -0
- package/src/util/Formatted.ts +1 -0
- package/src/util/array.ts +25 -0
- package/src/util/cell.ts +45 -10
- package/src/util/combinators.ts +2 -4
- package/src/util/ids.ts +1 -0
- package/src/util/index.ts +11 -123
- package/src/util/label.ts +2 -2
- package/src/util/path.ts +4 -1
- package/src/util/renderer.ts +139 -66
- package/src/util/resolvers.ts +2 -1
- package/src/util/runtime.ts +3 -2
- package/src/util/schema.ts +26 -1
- package/src/util/uischema.ts +2 -1
- package/src/util/util.ts +127 -0
- package/src/util/validator.ts +5 -8
- package/stats.html +3279 -0
- package/{lib/configDefault.js → test/i18n/i18nUtil.test.ts} +25 -24
- package/test/reducers/core.test.ts +31 -44
- package/test/util/cell.test.ts +2 -2
- package/test/util/renderer.test.ts +543 -31
- package/docs/interfaces/labels.html +0 -157
- package/lib/actions/index.js +0 -125
- package/lib/actions/index.js.map +0 -1
- package/lib/configDefault.js.map +0 -1
- package/lib/generators/index.js +0 -12
- package/lib/generators/index.js.map +0 -1
- package/lib/generators/schema.js +0 -152
- package/lib/generators/schema.js.map +0 -1
- package/lib/generators/uischema.js +0 -167
- package/lib/generators/uischema.js.map +0 -1
- package/lib/index.js +0 -45
- package/lib/index.js.map +0 -1
- package/lib/jsonforms-core.js +0 -19
- package/lib/jsonforms-core.js.map +0 -1
- package/lib/models/draft4.js +0 -173
- package/lib/models/draft4.js.map +0 -1
- package/lib/models/jsonSchema.js +0 -3
- package/lib/models/jsonSchema.js.map +0 -1
- package/lib/models/jsonSchema4.js.map +0 -1
- package/lib/models/jsonSchema7.js +0 -30
- package/lib/models/jsonSchema7.js.map +0 -1
- package/lib/models/uischema.js +0 -31
- package/lib/models/uischema.js.map +0 -1
- package/lib/reducers/cells.js +0 -16
- package/lib/reducers/cells.js.map +0 -1
- package/lib/reducers/config.js +0 -44
- package/lib/reducers/config.js.map +0 -1
- package/lib/reducers/core.js +0 -259
- package/lib/reducers/core.js.map +0 -1
- package/lib/reducers/default-data.js +0 -42
- package/lib/reducers/default-data.js.map +0 -1
- package/lib/reducers/i18n.js +0 -66
- package/lib/reducers/i18n.js.map +0 -1
- package/lib/reducers/index.js +0 -92
- package/lib/reducers/index.js.map +0 -1
- package/lib/reducers/renderers.js +0 -17
- package/lib/reducers/renderers.js.map +0 -1
- package/lib/reducers/uischemas.js +0 -57
- package/lib/reducers/uischemas.js.map +0 -1
- package/lib/store.js +0 -3
- package/lib/store.js.map +0 -1
- package/lib/testers/index.js +0 -402
- package/lib/testers/index.js.map +0 -1
- package/lib/util/Formatted.js +0 -3
- package/lib/util/Formatted.js.map +0 -1
- package/lib/util/array.js +0 -19
- package/lib/util/array.js.map +0 -1
- package/lib/util/cell.js +0 -133
- package/lib/util/cell.js.map +0 -1
- package/lib/util/combinators.js +0 -56
- package/lib/util/combinators.js.map +0 -1
- package/lib/util/ids.js +0 -50
- package/lib/util/ids.js.map +0 -1
- package/lib/util/index.js +0 -132
- package/lib/util/index.js.map +0 -1
- package/lib/util/label.js +0 -70
- package/lib/util/label.js.map +0 -1
- package/lib/util/path.js +0 -84
- package/lib/util/path.js.map +0 -1
- package/lib/util/renderer.js +0 -447
- package/lib/util/renderer.js.map +0 -1
- package/lib/util/resolvers.js +0 -165
- package/lib/util/resolvers.js.map +0 -1
- package/lib/util/runtime.js +0 -159
- package/lib/util/runtime.js.map +0 -1
- package/lib/util/schema.js +0 -16
- package/lib/util/schema.js.map +0 -1
- package/lib/util/type.js.map +0 -1
- package/lib/util/uischema.js +0 -52
- package/lib/util/uischema.js.map +0 -1
- package/lib/util/validator.js.map +0 -1
- package/webpack.build.js +0 -13
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html class="default no-js">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>Labels | JSON Forms Core</title>
|
|
7
|
-
<meta name="description" content="Documentation for JSON Forms Core">
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<link rel="stylesheet" href="../assets/css/main.css">
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<header>
|
|
13
|
-
<div class="tsd-page-toolbar">
|
|
14
|
-
<div class="container">
|
|
15
|
-
<div class="table-wrap">
|
|
16
|
-
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
|
17
|
-
<div class="field">
|
|
18
|
-
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
19
|
-
<input id="tsd-search-field" type="text" />
|
|
20
|
-
</div>
|
|
21
|
-
<ul class="results">
|
|
22
|
-
<li class="state loading">Preparing search index...</li>
|
|
23
|
-
<li class="state failure">The search index is not available</li>
|
|
24
|
-
</ul>
|
|
25
|
-
<a href="../index.html" class="title">JSON Forms Core</a>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="table-cell" id="tsd-widgets">
|
|
28
|
-
<div id="tsd-filter">
|
|
29
|
-
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
30
|
-
<div class="tsd-filter-group">
|
|
31
|
-
<div class="tsd-select" id="tsd-filter-visibility">
|
|
32
|
-
<span class="tsd-select-label">All</span>
|
|
33
|
-
<ul class="tsd-select-list">
|
|
34
|
-
<li data-value="public">Public</li>
|
|
35
|
-
<li data-value="protected">Public/Protected</li>
|
|
36
|
-
<li data-value="private" class="selected">All</li>
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|
|
39
|
-
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
40
|
-
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
41
|
-
<input type="checkbox" id="tsd-filter-only-exported" />
|
|
42
|
-
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="tsd-page-title">
|
|
51
|
-
<div class="container">
|
|
52
|
-
<ul class="tsd-breadcrumb">
|
|
53
|
-
<li>
|
|
54
|
-
<a href="../globals.html">Globals</a>
|
|
55
|
-
</li>
|
|
56
|
-
<li>
|
|
57
|
-
<a href="labels.html">Labels</a>
|
|
58
|
-
</li>
|
|
59
|
-
</ul>
|
|
60
|
-
<h1>Interface Labels</h1>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</header>
|
|
64
|
-
<div class="container container-main">
|
|
65
|
-
<div class="row">
|
|
66
|
-
<div class="col-8 col-content">
|
|
67
|
-
<section class="tsd-panel tsd-hierarchy">
|
|
68
|
-
<h3>Hierarchy</h3>
|
|
69
|
-
<ul class="tsd-hierarchy">
|
|
70
|
-
<li>
|
|
71
|
-
<span class="target">Labels</span>
|
|
72
|
-
</li>
|
|
73
|
-
</ul>
|
|
74
|
-
</section>
|
|
75
|
-
<section class="tsd-panel tsd-kind-interface">
|
|
76
|
-
<h3 class="tsd-before-signature">Indexable</h3>
|
|
77
|
-
<div class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">[</span>additionalLabels: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">string</span></div>
|
|
78
|
-
</section>
|
|
79
|
-
<section class="tsd-panel-group tsd-index-group">
|
|
80
|
-
<h2>Index</h2>
|
|
81
|
-
<section class="tsd-panel tsd-index-panel">
|
|
82
|
-
<div class="tsd-index-content">
|
|
83
|
-
<section class="tsd-index-section ">
|
|
84
|
-
<h3>Properties</h3>
|
|
85
|
-
<ul class="tsd-index-list">
|
|
86
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="labels.html#default" class="tsd-kind-icon">default</a></li>
|
|
87
|
-
</ul>
|
|
88
|
-
</section>
|
|
89
|
-
</div>
|
|
90
|
-
</section>
|
|
91
|
-
</section>
|
|
92
|
-
<section class="tsd-panel-group tsd-member-group ">
|
|
93
|
-
<h2>Properties</h2>
|
|
94
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
95
|
-
<a name="default" class="tsd-anchor"></a>
|
|
96
|
-
<h3>default</h3>
|
|
97
|
-
<div class="tsd-signature tsd-kind-icon">default<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
98
|
-
<aside class="tsd-sources">
|
|
99
|
-
<ul>
|
|
100
|
-
<li>Defined in packages/core/src/util/renderer.ts:69</li>
|
|
101
|
-
</ul>
|
|
102
|
-
</aside>
|
|
103
|
-
</section>
|
|
104
|
-
</section>
|
|
105
|
-
</div>
|
|
106
|
-
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
107
|
-
<nav class="tsd-navigation primary">
|
|
108
|
-
<ul>
|
|
109
|
-
<li class="globals ">
|
|
110
|
-
<a href="../globals.html"><em>Globals</em></a>
|
|
111
|
-
</li>
|
|
112
|
-
</ul>
|
|
113
|
-
</nav>
|
|
114
|
-
<nav class="tsd-navigation secondary menu-sticky">
|
|
115
|
-
<ul class="before-current">
|
|
116
|
-
</ul>
|
|
117
|
-
<ul class="current">
|
|
118
|
-
<li class="current tsd-kind-interface">
|
|
119
|
-
<a href="labels.html" class="tsd-kind-icon">Labels</a>
|
|
120
|
-
<ul>
|
|
121
|
-
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
122
|
-
<a href="labels.html#default" class="tsd-kind-icon">default</a>
|
|
123
|
-
</li>
|
|
124
|
-
</ul>
|
|
125
|
-
</li>
|
|
126
|
-
</ul>
|
|
127
|
-
<ul class="after-current">
|
|
128
|
-
</ul>
|
|
129
|
-
</nav>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
<footer class="with-border-bottom">
|
|
134
|
-
<div class="container">
|
|
135
|
-
<h2>Legend</h2>
|
|
136
|
-
<div class="tsd-legend-group">
|
|
137
|
-
<ul class="tsd-legend">
|
|
138
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
|
139
|
-
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
|
|
140
|
-
</ul>
|
|
141
|
-
<ul class="tsd-legend">
|
|
142
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
|
143
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
|
144
|
-
</ul>
|
|
145
|
-
<ul class="tsd-legend">
|
|
146
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
|
|
147
|
-
</ul>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
</footer>
|
|
151
|
-
<div class="container tsd-generator">
|
|
152
|
-
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
|
153
|
-
</div>
|
|
154
|
-
<div class="overlay"></div>
|
|
155
|
-
<script src="../assets/js/main.js"></script>
|
|
156
|
-
</body>
|
|
157
|
-
</html>
|
package/lib/actions/index.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var generators_1 = require("../generators");
|
|
4
|
-
exports.INIT = 'jsonforms/INIT';
|
|
5
|
-
exports.UPDATE_CORE = "jsonforms/UPDATE_CORE";
|
|
6
|
-
exports.SET_AJV = 'jsonforms/SET_AJV';
|
|
7
|
-
exports.UPDATE_DATA = 'jsonforms/UPDATE';
|
|
8
|
-
exports.UPDATE_ERRORS = 'jsonforms/UPDATE_ERRORS';
|
|
9
|
-
exports.VALIDATE = 'jsonforms/VALIDATE';
|
|
10
|
-
exports.ADD_RENDERER = 'jsonforms/ADD_RENDERER';
|
|
11
|
-
exports.REMOVE_RENDERER = 'jsonforms/REMOVE_RENDERER';
|
|
12
|
-
exports.ADD_CELL = 'jsonforms/ADD_CELL';
|
|
13
|
-
exports.REMOVE_CELL = 'jsonforms/REMOVE_CELL';
|
|
14
|
-
exports.SET_CONFIG = 'jsonforms/SET_CONFIG';
|
|
15
|
-
exports.ADD_UI_SCHEMA = "jsonforms/ADD_UI_SCHEMA";
|
|
16
|
-
exports.REMOVE_UI_SCHEMA = "jsonforms/REMOVE_UI_SCHEMA";
|
|
17
|
-
exports.SET_SCHEMA = "jsonforms/SET_SCHEMA";
|
|
18
|
-
exports.SET_UISCHEMA = "jsonforms/SET_UISCHEMA";
|
|
19
|
-
exports.SET_VALIDATION_MODE = 'jsonforms/SET_VALIDATION_MODE';
|
|
20
|
-
exports.SET_LOCALE = "jsonforms/SET_LOCALE";
|
|
21
|
-
exports.SET_LOCALIZED_SCHEMAS = 'jsonforms/SET_LOCALIZED_SCHEMAS';
|
|
22
|
-
exports.SET_LOCALIZED_UISCHEMAS = 'jsonforms/SET_LOCALIZED_UISCHEMAS';
|
|
23
|
-
exports.ADD_DEFAULT_DATA = "jsonforms/ADD_DEFAULT_DATA";
|
|
24
|
-
exports.REMOVE_DEFAULT_DATA = "jsonforms/REMOVE_DEFAULT_DATA";
|
|
25
|
-
exports.init = function (data, schema, uischema, options) {
|
|
26
|
-
if (schema === void 0) { schema = generators_1.generateJsonSchema(data); }
|
|
27
|
-
return ({
|
|
28
|
-
type: exports.INIT,
|
|
29
|
-
data: data,
|
|
30
|
-
schema: schema,
|
|
31
|
-
uischema: typeof uischema === 'object' ? uischema : generators_1.generateDefaultUISchema(schema),
|
|
32
|
-
options: options
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
exports.updateCore = function (data, schema, uischema, options) { return ({
|
|
36
|
-
type: exports.UPDATE_CORE,
|
|
37
|
-
data: data,
|
|
38
|
-
schema: schema,
|
|
39
|
-
uischema: uischema,
|
|
40
|
-
options: options
|
|
41
|
-
}); };
|
|
42
|
-
exports.registerDefaultData = function (schemaPath, data) { return ({
|
|
43
|
-
type: exports.ADD_DEFAULT_DATA,
|
|
44
|
-
schemaPath: schemaPath,
|
|
45
|
-
data: data
|
|
46
|
-
}); };
|
|
47
|
-
exports.unregisterDefaultData = function (schemaPath) { return ({
|
|
48
|
-
type: exports.REMOVE_DEFAULT_DATA,
|
|
49
|
-
schemaPath: schemaPath
|
|
50
|
-
}); };
|
|
51
|
-
exports.setAjv = function (ajv) { return ({
|
|
52
|
-
type: exports.SET_AJV,
|
|
53
|
-
ajv: ajv
|
|
54
|
-
}); };
|
|
55
|
-
exports.update = function (path, updater) { return ({
|
|
56
|
-
type: exports.UPDATE_DATA,
|
|
57
|
-
path: path,
|
|
58
|
-
updater: updater
|
|
59
|
-
}); };
|
|
60
|
-
exports.updateErrors = function (errors) { return ({
|
|
61
|
-
type: exports.UPDATE_ERRORS,
|
|
62
|
-
errors: errors
|
|
63
|
-
}); };
|
|
64
|
-
exports.registerRenderer = function (tester, renderer) { return ({
|
|
65
|
-
type: exports.ADD_RENDERER,
|
|
66
|
-
tester: tester,
|
|
67
|
-
renderer: renderer
|
|
68
|
-
}); };
|
|
69
|
-
exports.registerCell = function (tester, cell) { return ({
|
|
70
|
-
type: exports.ADD_CELL,
|
|
71
|
-
tester: tester,
|
|
72
|
-
cell: cell
|
|
73
|
-
}); };
|
|
74
|
-
exports.unregisterCell = function (tester, cell) { return ({
|
|
75
|
-
type: exports.REMOVE_CELL,
|
|
76
|
-
tester: tester,
|
|
77
|
-
cell: cell
|
|
78
|
-
}); };
|
|
79
|
-
exports.unregisterRenderer = function (tester, renderer) { return ({
|
|
80
|
-
type: exports.REMOVE_RENDERER,
|
|
81
|
-
tester: tester,
|
|
82
|
-
renderer: renderer
|
|
83
|
-
}); };
|
|
84
|
-
exports.setConfig = function (config) { return ({
|
|
85
|
-
type: exports.SET_CONFIG,
|
|
86
|
-
config: config
|
|
87
|
-
}); };
|
|
88
|
-
exports.setValidationMode = function (validationMode) { return ({
|
|
89
|
-
type: exports.SET_VALIDATION_MODE,
|
|
90
|
-
validationMode: validationMode
|
|
91
|
-
}); };
|
|
92
|
-
exports.registerUISchema = function (tester, uischema) {
|
|
93
|
-
return {
|
|
94
|
-
type: exports.ADD_UI_SCHEMA,
|
|
95
|
-
tester: tester,
|
|
96
|
-
uischema: uischema
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
exports.unregisterUISchema = function (tester) {
|
|
100
|
-
return {
|
|
101
|
-
type: exports.REMOVE_UI_SCHEMA,
|
|
102
|
-
tester: tester
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
exports.setLocale = function (locale) { return ({
|
|
106
|
-
type: exports.SET_LOCALE,
|
|
107
|
-
locale: locale
|
|
108
|
-
}); };
|
|
109
|
-
exports.setLocalizedSchemas = function (localizedSchemas) { return ({
|
|
110
|
-
type: exports.SET_LOCALIZED_SCHEMAS,
|
|
111
|
-
localizedSchemas: localizedSchemas
|
|
112
|
-
}); };
|
|
113
|
-
exports.setSchema = function (schema) { return ({
|
|
114
|
-
type: exports.SET_SCHEMA,
|
|
115
|
-
schema: schema
|
|
116
|
-
}); };
|
|
117
|
-
exports.setLocalizedUISchemas = function (localizedUISchemas) { return ({
|
|
118
|
-
type: exports.SET_LOCALIZED_UISCHEMAS,
|
|
119
|
-
localizedUISchemas: localizedUISchemas
|
|
120
|
-
}); };
|
|
121
|
-
exports.setUISchema = function (uischema) { return ({
|
|
122
|
-
type: exports.SET_UISCHEMA,
|
|
123
|
-
uischema: uischema
|
|
124
|
-
}); };
|
|
125
|
-
//# sourceMappingURL=index.js.map
|
package/lib/actions/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":";;AA0BA,4CAA4E;AAM/D,QAAA,IAAI,GAAqB,gBAAgB,CAAC;AAC1C,QAAA,WAAW,GAA4B,uBAAuB,CAAC;AAC/D,QAAA,OAAO,GAAwB,mBAAmB,CAAC;AACnD,QAAA,WAAW,GAAuB,kBAAkB,CAAC;AACrD,QAAA,aAAa,GACxB,yBAAyB,CAAC;AACf,QAAA,QAAQ,GAAyB,oBAAoB,CAAC;AACtD,QAAA,YAAY,GAA6B,wBAAwB,CAAC;AAClE,QAAA,eAAe,GAC1B,2BAA2B,CAAC;AACjB,QAAA,QAAQ,GAAyB,oBAAoB,CAAC;AACtD,QAAA,WAAW,GAA4B,uBAAuB,CAAC;AAC/D,QAAA,UAAU,GAA2B,sBAAsB,CAAC;AAC5D,QAAA,aAAa,GAA8B,yBAAyB,CAAC;AACrE,QAAA,gBAAgB,GAAiC,4BAA4B,CAAC;AAC9E,QAAA,UAAU,GAA2B,sBAAsB,CAAC;AAC5D,QAAA,YAAY,GAA6B,wBAAwB,CAAC;AAClE,QAAA,mBAAmB,GAC9B,+BAA+B,CAAC;AAErB,QAAA,UAAU,GAA2B,sBAAsB,CAAC;AAC5D,QAAA,qBAAqB,GAChC,iCAAiC,CAAC;AACvB,QAAA,uBAAuB,GAClC,mCAAmC,CAAC;AAEzB,QAAA,gBAAgB,GAAiC,4BAA4B,CAAC;AAC9E,QAAA,mBAAmB,GAAoC,+BAA+B,CAAC;AAiDvF,QAAA,IAAI,GAAG,UAClB,IAAS,EACT,MAA6C,EAC7C,QAA0B,EAC1B,OAAqC;IAFrC,uBAAA,EAAA,SAAqB,+BAAkB,CAAC,IAAI,CAAC;IAG1C,OAAA,CAAC;QACJ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,CAG5D,CAAC;AAOU,QAAA,mBAAmB,GAAG,UACjC,gBAAyC,IACX,OAAA,CAAC;IAC/B,IAAI,EAAE,6BAAqB;IAC3B,gBAAgB,kBAAA;CACjB,CAAC,EAH8B,CAG9B,CAAC;AAOU,QAAA,SAAS,GAAG,UAAC,MAAkB,IAAsB,OAAA,CAAC;IACjE,IAAI,EAAE,kBAAU;IAChB,MAAM,QAAA;CACP,CAAC,EAHgE,CAGhE,CAAC;AAOU,QAAA,qBAAqB,GAAG,UACnC,kBAAgD,IAChB,OAAA,CAAC;IACjC,IAAI,EAAE,+BAAuB;IAC7B,kBAAkB,oBAAA;CACnB,CAAC,EAHgC,CAGhC,CAAC;AAOU,QAAA,WAAW,GAAG,UAAC,QAAyB,IAAwB,OAAA,CAAC;IAC5E,IAAI,EAAE,oBAAY;IAClB,QAAQ,UAAA;CACT,CAAC,EAH2E,CAG3E,CAAC"}
|
package/lib/configDefault.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configDefault.js","sourceRoot":"","sources":["../src/configDefault.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACW,QAAA,aAAa,GAAG;IAC3B;;;OAGG;IACH,QAAQ,EAAE,KAAK;IAEf;;;OAGG;IACH,IAAI,EAAE,KAAK;IAEX;;OAEG;IACH,wBAAwB,EAAE,KAAK;IAE/B;;OAEG;IACH,oBAAoB,EAAE,KAAK;CAC5B,CAAC"}
|
package/lib/generators/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var schema_1 = require("./schema");
|
|
4
|
-
exports.generateJsonSchema = schema_1.generateJsonSchema;
|
|
5
|
-
var uischema_1 = require("./uischema");
|
|
6
|
-
exports.generateDefaultUISchema = uischema_1.generateDefaultUISchema;
|
|
7
|
-
exports.Generate = {
|
|
8
|
-
jsonSchema: schema_1.generateJsonSchema,
|
|
9
|
-
uiSchema: uischema_1.generateDefaultUISchema,
|
|
10
|
-
controlElement: uischema_1.createControlElement
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":";;AA0BA,mCAA8C;AAkBrC,6BAlBA,2BAAkB,CAkBA;AAjB3B,uCAA2E;AAkBlE,kCAlBsB,kCAAuB,CAkBtB;AAhBnB,QAAA,QAAQ,GASjB;IACF,UAAU,EAAE,2BAAkB;IAC9B,QAAQ,EAAE,kCAAuB;IACjC,cAAc,EAAE,+BAAoB;CACrC,CAAC"}
|
package/lib/generators/schema.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
The MIT License
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2017-2019 EclipseSource Munich
|
|
6
|
-
https://github.com/eclipsesource/jsonforms
|
|
7
|
-
|
|
8
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
-
in the Software without restriction, including without limitation the rights
|
|
11
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
furnished to do so, subject to the following conditions:
|
|
14
|
-
|
|
15
|
-
The above copyright notice and this permission notice shall be included in
|
|
16
|
-
all copies or substantial portions of the Software.
|
|
17
|
-
|
|
18
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
-
THE SOFTWARE.
|
|
25
|
-
*/
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
var ADDITIONAL_PROPERTIES = 'additionalProperties';
|
|
28
|
-
var REQUIRED_PROPERTIES = 'required';
|
|
29
|
-
var distinct = function (properties, discriminator) {
|
|
30
|
-
var known = {};
|
|
31
|
-
return properties.filter(function (item) {
|
|
32
|
-
var discriminatorValue = discriminator(item);
|
|
33
|
-
if (known.hasOwnProperty(discriminatorValue)) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
known[discriminatorValue] = true;
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
var Gen = /** @class */ (function () {
|
|
43
|
-
function Gen(findOption) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
this.findOption = findOption;
|
|
46
|
-
this.schemaObject = function (data) {
|
|
47
|
-
var props = _this.properties(data);
|
|
48
|
-
var schema = {
|
|
49
|
-
type: 'object',
|
|
50
|
-
properties: props,
|
|
51
|
-
additionalProperties: _this.findOption(props)(ADDITIONAL_PROPERTIES)
|
|
52
|
-
};
|
|
53
|
-
var required = _this.findOption(props)(REQUIRED_PROPERTIES);
|
|
54
|
-
if (required.length > 0) {
|
|
55
|
-
schema.required = required;
|
|
56
|
-
}
|
|
57
|
-
return schema;
|
|
58
|
-
};
|
|
59
|
-
this.properties = function (data) {
|
|
60
|
-
var emptyProps = {};
|
|
61
|
-
return Object.keys(data).reduce(function (acc, propName) {
|
|
62
|
-
acc[propName] = _this.property(data[propName]);
|
|
63
|
-
return acc;
|
|
64
|
-
}, emptyProps);
|
|
65
|
-
};
|
|
66
|
-
this.property = function (data) {
|
|
67
|
-
switch (typeof data) {
|
|
68
|
-
case 'string':
|
|
69
|
-
return { type: 'string' };
|
|
70
|
-
case 'boolean':
|
|
71
|
-
return { type: 'boolean' };
|
|
72
|
-
case 'number':
|
|
73
|
-
if (Number.isInteger(data)) {
|
|
74
|
-
return { type: 'integer' };
|
|
75
|
-
}
|
|
76
|
-
return { type: 'number' };
|
|
77
|
-
case 'object':
|
|
78
|
-
if (data == null) {
|
|
79
|
-
return { type: 'null' };
|
|
80
|
-
}
|
|
81
|
-
return _this.schemaObjectOrArray(data);
|
|
82
|
-
default:
|
|
83
|
-
return {};
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
this.schemaObjectOrArray = function (data) {
|
|
87
|
-
if (data instanceof Array) {
|
|
88
|
-
return _this.schemaArray(data);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
return _this.schemaObject(data);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
this.schemaArray = function (data) {
|
|
95
|
-
if (data.length > 0) {
|
|
96
|
-
var allProperties = data.map(_this.property);
|
|
97
|
-
var uniqueProperties = distinct(allProperties, function (prop) {
|
|
98
|
-
return JSON.stringify(prop);
|
|
99
|
-
});
|
|
100
|
-
if (uniqueProperties.length === 1) {
|
|
101
|
-
return {
|
|
102
|
-
type: 'array',
|
|
103
|
-
items: uniqueProperties[0]
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
return {
|
|
108
|
-
type: 'array',
|
|
109
|
-
items: {
|
|
110
|
-
oneOf: uniqueProperties
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
return {
|
|
117
|
-
type: 'array',
|
|
118
|
-
items: {}
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
return Gen;
|
|
124
|
-
}());
|
|
125
|
-
/**
|
|
126
|
-
* Generate a JSON schema based on the given data and any additional options.
|
|
127
|
-
* @param {Object} instance the data to create a JSON schema for
|
|
128
|
-
* @param {any} options any additional options that may alter the generated JSON schema
|
|
129
|
-
* @returns {JsonSchema} the generated schema
|
|
130
|
-
*/
|
|
131
|
-
exports.generateJsonSchema = function (instance, options) {
|
|
132
|
-
if (options === void 0) { options = {}; }
|
|
133
|
-
var findOption = function (props) { return function (optionName) {
|
|
134
|
-
switch (optionName) {
|
|
135
|
-
case ADDITIONAL_PROPERTIES:
|
|
136
|
-
if (options.hasOwnProperty(ADDITIONAL_PROPERTIES)) {
|
|
137
|
-
return options[ADDITIONAL_PROPERTIES];
|
|
138
|
-
}
|
|
139
|
-
return true;
|
|
140
|
-
case REQUIRED_PROPERTIES:
|
|
141
|
-
if (options.hasOwnProperty(REQUIRED_PROPERTIES)) {
|
|
142
|
-
return options[REQUIRED_PROPERTIES](props);
|
|
143
|
-
}
|
|
144
|
-
return Object.keys(props);
|
|
145
|
-
default:
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
}; };
|
|
149
|
-
var gen = new Gen(findOption);
|
|
150
|
-
return gen.schemaObject(instance);
|
|
151
|
-
};
|
|
152
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/generators/schema.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;;AAIF,IAAM,qBAAqB,GAAG,sBAAsB,CAAC;AACrD,IAAM,mBAAmB,GAAG,UAAU,CAAC;AAIvC,IAAM,QAAQ,GAAG,UACf,UAAiB,EACjB,aAAoC;IAEpC,IAAM,KAAK,GAAoC,EAAE,CAAC;IAElD,OAAO,UAAU,CAAC,MAAM,CAAC,UAAA,IAAI;QAC3B,IAAM,kBAAkB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,KAAK,CAAC,cAAc,C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CAAC;iBACH;aACF;iBAAM;gBACL,OAAO;oBACL,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE;iBACV,CAAC;aACH;QACH,CAAC,CAAC;IAnFC,CAAC;IAoFN,UAAC;AAAD,CAAC,AAvFD,IAuFC;AAED;;;;;GAKG;AACU,QAAA,kBAAkB,GAAG,UAChC,QAAgB,EAChB,OAAiB;IAAjB,wBAAA,EAAA,YAAiB;IAEjB,IAAM,UAAU,GAAG,UAAC,KAAiB,IAAK,OAAA,UACxC,UAAkB;QAElB,QAAQ,UAAU,EAAE;YAClB,KAAK,qBAAqB;gBACxB,IAAI,OAAO,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE;oBACjD,OAAO,OAAO,CAAC,qBAAqB,CAAC,CAAC;iBACvC;gBAED,OAAO,IAAI,CAAC;YACd,KAAK,mBAAmB;gBACtB,IAAI,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAE;oBAC/C,OAAO,OAAO,CAAC,mBAAmB,CAAC,CAAC,KAAK,CAAC,CAAC;iBAC5C;gBAED,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B;gBACE,OAAO;SACV;IACH,CAAC,EAnByC,CAmBzC,CAAC;IAEF,IAAM,GAAG,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IAEhC,OAAO,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC,CAAC"}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
/*
|
|
5
|
-
The MIT License
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2019 EclipseSource Munich
|
|
8
|
-
https://github.com/eclipsesource/jsonforms
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in
|
|
18
|
-
all copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
26
|
-
THE SOFTWARE.
|
|
27
|
-
*/
|
|
28
|
-
var isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
|
|
29
|
-
var startCase_1 = tslib_1.__importDefault(require("lodash/startCase"));
|
|
30
|
-
var keys_1 = tslib_1.__importDefault(require("lodash/keys"));
|
|
31
|
-
var uischema_1 = require("../models/uischema");
|
|
32
|
-
var resolvers_1 = require("../util/resolvers");
|
|
33
|
-
var util_1 = require("../util");
|
|
34
|
-
/**
|
|
35
|
-
* Creates a new ILayout.
|
|
36
|
-
* @param layoutType The type of the laoyut
|
|
37
|
-
* @returns the new ILayout
|
|
38
|
-
*/
|
|
39
|
-
var createLayout = function (layoutType) { return ({
|
|
40
|
-
type: layoutType,
|
|
41
|
-
elements: []
|
|
42
|
-
}); };
|
|
43
|
-
/**
|
|
44
|
-
* Creates a IControlObject with the given label referencing the given ref
|
|
45
|
-
*/
|
|
46
|
-
exports.createControlElement = function (ref) { return ({
|
|
47
|
-
type: 'Control',
|
|
48
|
-
scope: ref
|
|
49
|
-
}); };
|
|
50
|
-
/**
|
|
51
|
-
* Wraps the given {@code uiSchema} in a Layout if there is none already.
|
|
52
|
-
* @param uischema The ui schema to wrap in a layout.
|
|
53
|
-
* @param layoutType The type of the layout to create.
|
|
54
|
-
* @returns the wrapped uiSchema.
|
|
55
|
-
*/
|
|
56
|
-
var wrapInLayoutIfNecessary = function (uischema, layoutType) {
|
|
57
|
-
if (!isEmpty_1.default(uischema) && !uischema_1.isLayout(uischema)) {
|
|
58
|
-
var verticalLayout = createLayout(layoutType);
|
|
59
|
-
verticalLayout.elements.push(uischema);
|
|
60
|
-
return verticalLayout;
|
|
61
|
-
}
|
|
62
|
-
return uischema;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Adds the given {@code labelName} to the {@code layout} if it exists
|
|
66
|
-
* @param layout
|
|
67
|
-
* The layout which is to receive the label
|
|
68
|
-
* @param labelName
|
|
69
|
-
* The name of the schema
|
|
70
|
-
*/
|
|
71
|
-
var addLabel = function (layout, labelName) {
|
|
72
|
-
if (!isEmpty_1.default(labelName)) {
|
|
73
|
-
var fixedLabel = startCase_1.default(labelName);
|
|
74
|
-
if (uischema_1.isGroup(layout)) {
|
|
75
|
-
layout.label = fixedLabel;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
// add label with name
|
|
79
|
-
var label = {
|
|
80
|
-
type: 'Label',
|
|
81
|
-
text: fixedLabel
|
|
82
|
-
};
|
|
83
|
-
layout.elements.push(label);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Returns whether the given {@code jsonSchema} is a combinator ({@code oneOf}, {@code anyOf}, {@code allOf}) at the root level
|
|
89
|
-
* @param jsonSchema
|
|
90
|
-
* the schema to check
|
|
91
|
-
*/
|
|
92
|
-
var isCombinator = function (jsonSchema) {
|
|
93
|
-
return (!isEmpty_1.default(jsonSchema) &&
|
|
94
|
-
(!isEmpty_1.default(jsonSchema.oneOf) ||
|
|
95
|
-
!isEmpty_1.default(jsonSchema.anyOf) ||
|
|
96
|
-
!isEmpty_1.default(jsonSchema.allOf)));
|
|
97
|
-
};
|
|
98
|
-
var generateUISchema = function (jsonSchema, schemaElements, currentRef, schemaName, layoutType, rootSchema) {
|
|
99
|
-
if (!isEmpty_1.default(jsonSchema) && jsonSchema.$ref !== undefined) {
|
|
100
|
-
return generateUISchema(resolvers_1.resolveSchema(rootSchema, jsonSchema.$ref), schemaElements, currentRef, schemaName, layoutType, rootSchema);
|
|
101
|
-
}
|
|
102
|
-
if (isCombinator(jsonSchema)) {
|
|
103
|
-
var controlObject = exports.createControlElement(currentRef);
|
|
104
|
-
schemaElements.push(controlObject);
|
|
105
|
-
return controlObject;
|
|
106
|
-
}
|
|
107
|
-
var types = util_1.deriveTypes(jsonSchema);
|
|
108
|
-
if (types.length === 0) {
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
if (types.length > 1) {
|
|
112
|
-
var controlObject = exports.createControlElement(currentRef);
|
|
113
|
-
schemaElements.push(controlObject);
|
|
114
|
-
return controlObject;
|
|
115
|
-
}
|
|
116
|
-
if (currentRef === '#' && types[0] === 'object') {
|
|
117
|
-
var layout_1 = createLayout(layoutType);
|
|
118
|
-
schemaElements.push(layout_1);
|
|
119
|
-
if (jsonSchema.properties && keys_1.default(jsonSchema.properties).length > 1) {
|
|
120
|
-
addLabel(layout_1, schemaName);
|
|
121
|
-
}
|
|
122
|
-
if (!isEmpty_1.default(jsonSchema.properties)) {
|
|
123
|
-
// traverse properties
|
|
124
|
-
var nextRef_1 = currentRef + '/properties';
|
|
125
|
-
Object.keys(jsonSchema.properties).map(function (propName) {
|
|
126
|
-
var value = jsonSchema.properties[propName];
|
|
127
|
-
var ref = nextRef_1 + "/" + propName;
|
|
128
|
-
if (value.$ref !== undefined) {
|
|
129
|
-
value = resolvers_1.resolveSchema(rootSchema, value.$ref);
|
|
130
|
-
}
|
|
131
|
-
generateUISchema(value, layout_1.elements, ref, propName, layoutType, rootSchema);
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
return layout_1;
|
|
135
|
-
}
|
|
136
|
-
switch (types[0]) {
|
|
137
|
-
case 'object': // object items will be handled by the object control itself
|
|
138
|
-
/* falls through */
|
|
139
|
-
case 'array': // array items will be handled by the array control itself
|
|
140
|
-
/* falls through */
|
|
141
|
-
case 'string':
|
|
142
|
-
/* falls through */
|
|
143
|
-
case 'number':
|
|
144
|
-
/* falls through */
|
|
145
|
-
case 'integer':
|
|
146
|
-
/* falls through */
|
|
147
|
-
case 'boolean':
|
|
148
|
-
var controlObject = exports.createControlElement(currentRef);
|
|
149
|
-
schemaElements.push(controlObject);
|
|
150
|
-
return controlObject;
|
|
151
|
-
default:
|
|
152
|
-
throw new Error('Unknown type: ' + JSON.stringify(jsonSchema));
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
/**
|
|
156
|
-
* Generate a default UI schema.
|
|
157
|
-
* @param {JsonSchema} jsonSchema the JSON schema to generated a UI schema for
|
|
158
|
-
* @param {string} layoutType the desired layout type for the root layout
|
|
159
|
-
* of the generated UI schema
|
|
160
|
-
*/
|
|
161
|
-
exports.generateDefaultUISchema = function (jsonSchema, layoutType, prefix, rootSchema) {
|
|
162
|
-
if (layoutType === void 0) { layoutType = 'VerticalLayout'; }
|
|
163
|
-
if (prefix === void 0) { prefix = '#'; }
|
|
164
|
-
if (rootSchema === void 0) { rootSchema = jsonSchema; }
|
|
165
|
-
return wrapInLayoutIfNecessary(generateUISchema(jsonSchema, [], prefix, '', layoutType, rootSchema), layoutType);
|
|
166
|
-
};
|
|
167
|
-
//# sourceMappingURL=uischema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uischema.js","sourceRoot":"","sources":["../../src/generators/uischema.ts"],"names":[],"mappings":";;;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