@uniformdev/project-map 19.3.0 → 19.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/dist/index.d.ts +16 -4
- package/dist/index.esm.js +25 -32
- package/dist/index.js +25 -32
- package/dist/index.mjs +25 -32
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -189,14 +189,19 @@ interface paths {
|
|
|
189
189
|
limit?: number;
|
|
190
190
|
/** Number of records to skip before returning nodes */
|
|
191
191
|
offset?: number;
|
|
192
|
-
/** Depth of the tree to fetch */
|
|
192
|
+
/** Depth of the tree to fetch. Only applies when fetching by path. */
|
|
193
193
|
depth?: number;
|
|
194
194
|
/** State of compositions to fetch. 0 = draft, 64 = published. */
|
|
195
195
|
state?: number;
|
|
196
|
-
/** should the data be returned as a json tree object */
|
|
196
|
+
/** should the data be returned as a json tree object (or a flat array) */
|
|
197
197
|
tree?: boolean;
|
|
198
198
|
/** text search filter */
|
|
199
199
|
search?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Modifies the results to include all ancestors of matched nodes, in addition to the nodes themselves.
|
|
202
|
+
* Results are sorted by path. If multiple nodes are selected, ancestors are not duplicated.
|
|
203
|
+
*/
|
|
204
|
+
includeAncestors?: boolean;
|
|
200
205
|
/** include expanded helper computed properties, includes isLeaf, parentPath, pathSegment */
|
|
201
206
|
expanded?: boolean;
|
|
202
207
|
/** include basic composition information. ID, type, state, name, and definition id. */
|
|
@@ -416,12 +421,18 @@ interface components {
|
|
|
416
421
|
isSearchHit?: boolean;
|
|
417
422
|
/** @description Query strings that are allowed to be passed to the node */
|
|
418
423
|
queryStrings?: components["schemas"]["ProjectMapNodeAllowedQueryString"][];
|
|
424
|
+
/**
|
|
425
|
+
* @description For dynamic nodes, this is the preview value for the dynamic value.
|
|
426
|
+
* The preview value is used when editing a connected composition, and is the default
|
|
427
|
+
* dynamic node value unless the author has explicitly chosen a different value.
|
|
428
|
+
*/
|
|
429
|
+
previewValue?: string;
|
|
419
430
|
};
|
|
420
431
|
ProjectMapNodeAllowedQueryString: {
|
|
421
432
|
/** @description The name of the query string parameter */
|
|
422
|
-
name
|
|
433
|
+
name: string;
|
|
423
434
|
/** @description The default value of the query string if it is not provided by an incoming route path */
|
|
424
|
-
value
|
|
435
|
+
value: string;
|
|
425
436
|
/** @description Help text for authors who might be setting up a preview value for this query string */
|
|
426
437
|
helpText?: string;
|
|
427
438
|
};
|
|
@@ -587,6 +598,7 @@ declare class Route {
|
|
|
587
598
|
constructor(route: string);
|
|
588
599
|
get dynamicSegmentCount(): number;
|
|
589
600
|
matches(path: string): MatchedRoute | UnmatchedRoute;
|
|
601
|
+
static getDynamicRouteSegmentName(segment: string): string | undefined;
|
|
590
602
|
static dynamicSegmentPrefix: string;
|
|
591
603
|
}
|
|
592
604
|
|
package/dist/index.esm.js
CHANGED
|
@@ -117,12 +117,6 @@ var ProjectMapClient = class extends ApiClient {
|
|
|
117
117
|
};
|
|
118
118
|
this.getNodes = async (options) => {
|
|
119
119
|
const fetchOptions = this.setFetchOptions(options);
|
|
120
|
-
if (options.limit) {
|
|
121
|
-
fetchOptions["limit"] = options.limit.toString();
|
|
122
|
-
}
|
|
123
|
-
if (options.offset) {
|
|
124
|
-
fetchOptions["offset"] = options.offset.toString();
|
|
125
|
-
}
|
|
126
120
|
const fetchUri = this.createUrl("/api/v1/project-map-nodes", fetchOptions);
|
|
127
121
|
return await this.apiClient(fetchUri);
|
|
128
122
|
};
|
|
@@ -130,33 +124,25 @@ var ProjectMapClient = class extends ApiClient {
|
|
|
130
124
|
setFetchOptions(options) {
|
|
131
125
|
const { projectId } = this.options;
|
|
132
126
|
const fetchOptions = {
|
|
133
|
-
projectId
|
|
134
|
-
projectMapId: options.projectMapId
|
|
127
|
+
projectId
|
|
135
128
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
if (options.expanded) {
|
|
155
|
-
fetchOptions["expanded"] = "true";
|
|
156
|
-
}
|
|
157
|
-
if (options.state) {
|
|
158
|
-
fetchOptions["state"] = options.state.toString();
|
|
159
|
-
}
|
|
129
|
+
Object.entries(options).forEach(([key, value]) => {
|
|
130
|
+
if (value === void 0) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (typeof value === "boolean") {
|
|
134
|
+
if (!value) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
fetchOptions[key] = "true";
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (typeof value === "number") {
|
|
141
|
+
fetchOptions[key] = value.toString(10);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
fetchOptions[key] = value;
|
|
145
|
+
});
|
|
160
146
|
return fetchOptions;
|
|
161
147
|
}
|
|
162
148
|
cleanProjectMapNode(node) {
|
|
@@ -231,6 +217,13 @@ var _Route = class {
|
|
|
231
217
|
}
|
|
232
218
|
return possibleMatch;
|
|
233
219
|
}
|
|
220
|
+
static getDynamicRouteSegmentName(segment) {
|
|
221
|
+
var _a;
|
|
222
|
+
if (!__privateMethod(_a = _Route, _isDynamicRouteSegment, isDynamicRouteSegment_fn).call(_a, segment)) {
|
|
223
|
+
return void 0;
|
|
224
|
+
}
|
|
225
|
+
return segment.slice(_Route.dynamicSegmentPrefix.length);
|
|
226
|
+
}
|
|
234
227
|
};
|
|
235
228
|
var Route = _Route;
|
|
236
229
|
_routeInfo = new WeakMap();
|
package/dist/index.js
CHANGED
|
@@ -145,12 +145,6 @@ var ProjectMapClient = class extends import_api.ApiClient {
|
|
|
145
145
|
};
|
|
146
146
|
this.getNodes = async (options) => {
|
|
147
147
|
const fetchOptions = this.setFetchOptions(options);
|
|
148
|
-
if (options.limit) {
|
|
149
|
-
fetchOptions["limit"] = options.limit.toString();
|
|
150
|
-
}
|
|
151
|
-
if (options.offset) {
|
|
152
|
-
fetchOptions["offset"] = options.offset.toString();
|
|
153
|
-
}
|
|
154
148
|
const fetchUri = this.createUrl("/api/v1/project-map-nodes", fetchOptions);
|
|
155
149
|
return await this.apiClient(fetchUri);
|
|
156
150
|
};
|
|
@@ -158,33 +152,25 @@ var ProjectMapClient = class extends import_api.ApiClient {
|
|
|
158
152
|
setFetchOptions(options) {
|
|
159
153
|
const { projectId } = this.options;
|
|
160
154
|
const fetchOptions = {
|
|
161
|
-
projectId
|
|
162
|
-
projectMapId: options.projectMapId
|
|
155
|
+
projectId
|
|
163
156
|
};
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
if (options.expanded) {
|
|
183
|
-
fetchOptions["expanded"] = "true";
|
|
184
|
-
}
|
|
185
|
-
if (options.state) {
|
|
186
|
-
fetchOptions["state"] = options.state.toString();
|
|
187
|
-
}
|
|
157
|
+
Object.entries(options).forEach(([key, value]) => {
|
|
158
|
+
if (value === void 0) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (typeof value === "boolean") {
|
|
162
|
+
if (!value) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
fetchOptions[key] = "true";
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (typeof value === "number") {
|
|
169
|
+
fetchOptions[key] = value.toString(10);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
fetchOptions[key] = value;
|
|
173
|
+
});
|
|
188
174
|
return fetchOptions;
|
|
189
175
|
}
|
|
190
176
|
cleanProjectMapNode(node) {
|
|
@@ -259,6 +245,13 @@ var _Route = class {
|
|
|
259
245
|
}
|
|
260
246
|
return possibleMatch;
|
|
261
247
|
}
|
|
248
|
+
static getDynamicRouteSegmentName(segment) {
|
|
249
|
+
var _a;
|
|
250
|
+
if (!__privateMethod(_a = _Route, _isDynamicRouteSegment, isDynamicRouteSegment_fn).call(_a, segment)) {
|
|
251
|
+
return void 0;
|
|
252
|
+
}
|
|
253
|
+
return segment.slice(_Route.dynamicSegmentPrefix.length);
|
|
254
|
+
}
|
|
262
255
|
};
|
|
263
256
|
var Route = _Route;
|
|
264
257
|
_routeInfo = new WeakMap();
|
package/dist/index.mjs
CHANGED
|
@@ -117,12 +117,6 @@ var ProjectMapClient = class extends ApiClient {
|
|
|
117
117
|
};
|
|
118
118
|
this.getNodes = async (options) => {
|
|
119
119
|
const fetchOptions = this.setFetchOptions(options);
|
|
120
|
-
if (options.limit) {
|
|
121
|
-
fetchOptions["limit"] = options.limit.toString();
|
|
122
|
-
}
|
|
123
|
-
if (options.offset) {
|
|
124
|
-
fetchOptions["offset"] = options.offset.toString();
|
|
125
|
-
}
|
|
126
120
|
const fetchUri = this.createUrl("/api/v1/project-map-nodes", fetchOptions);
|
|
127
121
|
return await this.apiClient(fetchUri);
|
|
128
122
|
};
|
|
@@ -130,33 +124,25 @@ var ProjectMapClient = class extends ApiClient {
|
|
|
130
124
|
setFetchOptions(options) {
|
|
131
125
|
const { projectId } = this.options;
|
|
132
126
|
const fetchOptions = {
|
|
133
|
-
projectId
|
|
134
|
-
projectMapId: options.projectMapId
|
|
127
|
+
projectId
|
|
135
128
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
if (options.expanded) {
|
|
155
|
-
fetchOptions["expanded"] = "true";
|
|
156
|
-
}
|
|
157
|
-
if (options.state) {
|
|
158
|
-
fetchOptions["state"] = options.state.toString();
|
|
159
|
-
}
|
|
129
|
+
Object.entries(options).forEach(([key, value]) => {
|
|
130
|
+
if (value === void 0) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (typeof value === "boolean") {
|
|
134
|
+
if (!value) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
fetchOptions[key] = "true";
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (typeof value === "number") {
|
|
141
|
+
fetchOptions[key] = value.toString(10);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
fetchOptions[key] = value;
|
|
145
|
+
});
|
|
160
146
|
return fetchOptions;
|
|
161
147
|
}
|
|
162
148
|
cleanProjectMapNode(node) {
|
|
@@ -231,6 +217,13 @@ var _Route = class {
|
|
|
231
217
|
}
|
|
232
218
|
return possibleMatch;
|
|
233
219
|
}
|
|
220
|
+
static getDynamicRouteSegmentName(segment) {
|
|
221
|
+
var _a;
|
|
222
|
+
if (!__privateMethod(_a = _Route, _isDynamicRouteSegment, isDynamicRouteSegment_fn).call(_a, segment)) {
|
|
223
|
+
return void 0;
|
|
224
|
+
}
|
|
225
|
+
return segment.slice(_Route.dynamicSegmentPrefix.length);
|
|
226
|
+
}
|
|
234
227
|
};
|
|
235
228
|
var Route = _Route;
|
|
236
229
|
_routeInfo = new WeakMap();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/project-map",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.6.0",
|
|
4
4
|
"description": "Uniform Project Map",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"/dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@uniformdev/canvas": "19.
|
|
36
|
-
"@uniformdev/context": "19.
|
|
35
|
+
"@uniformdev/canvas": "19.6.0",
|
|
36
|
+
"@uniformdev/context": "19.6.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "a14550dd1caa33fa1310ada642d06ce79bbe4eac"
|
|
42
42
|
}
|