@disy/cadenza.js 1.7.0 → 1.8.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/CHANGELOG.md +4 -0
- package/apidoc/classes/AbortError.html +2 -2
- package/apidoc/classes/CadenzaClient.html +16 -18
- package/apidoc/classes/CadenzaError.html +3 -3
- package/apidoc/functions/cadenza.html +1 -1
- package/apidoc/interfaces/CadenzaEvent.html +3 -3
- package/apidoc/interfaces/ExternalLinkKey.html +3 -3
- package/apidoc/interfaces/Geometry.html +2 -2
- package/apidoc/interfaces/PageSource.html +2 -2
- package/apidoc/interfaces/WorkbookKey.html +3 -3
- package/apidoc/interfaces/WorkbookViewKey.html +4 -4
- package/apidoc/interfaces/WorksheetKey.html +4 -4
- package/apidoc/types/CadenzaErrorEvent.html +1 -1
- package/apidoc/types/EmbeddingTargetId.html +1 -1
- package/apidoc/types/Extent.html +1 -1
- package/apidoc/types/FilterVariables.html +2 -2
- package/apidoc/types/GeometryType.html +1 -1
- package/apidoc/types/GlobalId.html +1 -1
- package/apidoc/types/MediaType.html +1 -1
- package/apidoc/types/OperationMode.html +1 -1
- package/apidoc/types/TablePart.html +1 -1
- package/apidoc/types/UiFeature.html +1 -1
- package/apidoc/types/WorkbookSource.html +1 -1
- package/apidoc/types/WorkbookViewSource.html +1 -1
- package/apidoc/types/WorksheetSource.html +1 -1
- package/cadenza.d.ts +4 -8
- package/cadenza.js +12 -17
- package/package.json +1 -1
- package/sandbox.html +43 -13
package/sandbox.html
CHANGED
|
@@ -28,7 +28,21 @@
|
|
|
28
28
|
form, fieldset {
|
|
29
29
|
display: flex;
|
|
30
30
|
flex-direction: column;
|
|
31
|
-
gap:
|
|
31
|
+
gap: 12px;
|
|
32
|
+
}
|
|
33
|
+
fieldset > div {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 4px;
|
|
37
|
+
}
|
|
38
|
+
fieldset small {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
gap: 4px;
|
|
42
|
+
|
|
43
|
+
& > * {
|
|
44
|
+
margin-block: 0;
|
|
45
|
+
}
|
|
32
46
|
}
|
|
33
47
|
main {
|
|
34
48
|
flex: 1;
|
|
@@ -57,11 +71,13 @@
|
|
|
57
71
|
const action = actionSelect.value;
|
|
58
72
|
const settingsTemplate = document.querySelector(`[data-action=${action}]`);
|
|
59
73
|
settingsContainer.append(settingsTemplate.content.cloneNode(true));
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
if (settingsTemplate.dataset.common) {
|
|
75
|
+
settingsTemplate.dataset.common.split(',').forEach(commonId => {
|
|
76
|
+
const commonSettingsTemplate = document.getElementById(`common-${commonId}`);
|
|
77
|
+
settingsContainer.append(
|
|
78
|
+
document.createElement('hr'),
|
|
79
|
+
commonSettingsTemplate.content.cloneNode(true));
|
|
80
|
+
})
|
|
65
81
|
}
|
|
66
82
|
|
|
67
83
|
const data = localStorage.getItem(`cadenzajs-sandbox-${action}`);
|
|
@@ -118,6 +134,7 @@
|
|
|
118
134
|
function getOptions ({
|
|
119
135
|
disabledUiFeatures,
|
|
120
136
|
expandNavigator,
|
|
137
|
+
filter,
|
|
121
138
|
geometry,
|
|
122
139
|
hideMainHeaderAndFooter,
|
|
123
140
|
hideWorkbookToolBar,
|
|
@@ -129,12 +146,12 @@
|
|
|
129
146
|
minScale,
|
|
130
147
|
parts,
|
|
131
148
|
simplifiedOperationMode,
|
|
132
|
-
useMapSrs
|
|
133
|
-
filter
|
|
149
|
+
useMapSrs
|
|
134
150
|
}) {
|
|
135
151
|
return {
|
|
136
152
|
disabledUiFeatures: disabledUiFeatures && disabledUiFeatures.split(','),
|
|
137
153
|
expandNavigator: (expandNavigator === 'on'),
|
|
154
|
+
filter: filter && parseFilterVariables(filter),
|
|
138
155
|
geometry: geometry && JSON.parse(geometry),
|
|
139
156
|
hideMainHeaderAndFooter: (hideMainHeaderAndFooter === 'on'),
|
|
140
157
|
hideWorkbookToolBar: (hideWorkbookToolBar === 'on'),
|
|
@@ -146,8 +163,7 @@
|
|
|
146
163
|
minScale,
|
|
147
164
|
parts: parts && parts.split(','),
|
|
148
165
|
...(simplifiedOperationMode === 'on' && { operationMode: 'simplified' }),
|
|
149
|
-
useMapSrs: useMapSrs === 'on'
|
|
150
|
-
filter: filter && parseFilterVariables(filter)
|
|
166
|
+
useMapSrs: useMapSrs === 'on'
|
|
151
167
|
};
|
|
152
168
|
}
|
|
153
169
|
|
|
@@ -224,11 +240,25 @@
|
|
|
224
240
|
</div>
|
|
225
241
|
<div>
|
|
226
242
|
<label for="disabledUiFeatures">Disabled UI features</label>
|
|
227
|
-
<input name="disabledUiFeatures" id="disabledUiFeatures" placeholder="feature1,feature2
|
|
243
|
+
<input name="disabledUiFeatures" id="disabledUiFeatures" placeholder="feature1,feature2,...">
|
|
244
|
+
|
|
245
|
+
<small>
|
|
246
|
+
<p>Comma-separated list of features</p>
|
|
247
|
+
|
|
248
|
+
Supported features:
|
|
249
|
+
<ul>
|
|
250
|
+
<li>workbook-design</li>
|
|
251
|
+
<li>workbook-view-management</li>
|
|
252
|
+
</ul>
|
|
253
|
+
</small>
|
|
228
254
|
</div>
|
|
229
255
|
<div>
|
|
230
256
|
<label for="filter">Filter</label>
|
|
231
|
-
<
|
|
257
|
+
<textarea name="filter" id="filter" rows="3"></textarea>
|
|
258
|
+
<small>
|
|
259
|
+
<p>A JSON object with filter variable names and values</p>
|
|
260
|
+
<p>Dates need to be ISO strings<br>(e.g. <code>"2023-11-17T17:12:06.175Z"</code>).<br>Use <code>"{{currentDate}}"</code> for the current date.</p>
|
|
261
|
+
</small>
|
|
232
262
|
</div>
|
|
233
263
|
</template>
|
|
234
264
|
|
|
@@ -301,7 +331,7 @@
|
|
|
301
331
|
</div>
|
|
302
332
|
</template>
|
|
303
333
|
|
|
304
|
-
<template data-action="showMap" data-common="show">
|
|
334
|
+
<template data-action="showMap" data-common="map,show">
|
|
305
335
|
<div>
|
|
306
336
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
307
337
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|