@antelopejs/interface-dms-builder 0.3.0 → 0.3.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.
- package/dist/mapping.d.ts +5 -0
- package/dist/mapping.js +2 -1
- package/dist/mapping.js.map +1 -1
- package/docs/11.external-databases.md +1 -0
- package/package.json +1 -1
package/dist/mapping.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export interface MapResourcesInput {
|
|
|
52
52
|
connection: string;
|
|
53
53
|
resources: MappedResource[];
|
|
54
54
|
excluded?: ExcludedRelation[];
|
|
55
|
+
approvedPageRemovals?: PageRef[];
|
|
55
56
|
}
|
|
56
57
|
export interface LeftOutColumn {
|
|
57
58
|
relation: string;
|
|
@@ -69,4 +70,8 @@ export interface MapResourcesResult {
|
|
|
69
70
|
leftOut: LeftOutColumn[];
|
|
70
71
|
category?: CategoryRef;
|
|
71
72
|
}
|
|
73
|
+
export interface MapResourcesPreview {
|
|
74
|
+
pagesToRemove: PageRef[];
|
|
75
|
+
}
|
|
72
76
|
export declare const MapResources: (input: MapResourcesInput) => Promise<OpResult<MapResourcesResult>>;
|
|
77
|
+
export declare const PreviewMapResources: (input: MapResourcesInput) => Promise<OpResult<MapResourcesPreview>>;
|
package/dist/mapping.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MapResources = void 0;
|
|
3
|
+
exports.PreviewMapResources = exports.MapResources = void 0;
|
|
4
4
|
const interface_core_1 = require("@antelopejs/interface-core");
|
|
5
5
|
exports.MapResources = (0, interface_core_1.InterfaceFunction)();
|
|
6
|
+
exports.PreviewMapResources = (0, interface_core_1.InterfaceFunction)();
|
|
6
7
|
//# sourceMappingURL=mapping.js.map
|
package/dist/mapping.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../src/mapping.ts"],"names":[],"mappings":";;;AAAA,+DAA+D;
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../src/mapping.ts"],"names":[],"mappings":";;;AAAA,+DAA+D;AAiNlD,QAAA,YAAY,GACvB,IAAA,kCAAiB,GAEd,CAAC;AAOO,QAAA,mBAAmB,GAC9B,IAAA,kCAAiB,GAEd,CAAC"}
|
|
@@ -186,6 +186,7 @@ const result = await MapResources({
|
|
|
186
186
|
- **Where a proposal comes from.** `MapResources` reads the profile of a new relation through the catalog connection at map time, since D1 needs it. When the profile cannot be read, it takes the proposal from the connection's last `AnalyseDatabase`; when there is none either, D2 still applies by the column's name, no column becomes a badge, and the result warns `display_not_proposed`. A display that does not suit the column's declaration, such as a badge on a column declared `number`, is dropped when it was kept or proposed, and refused only when sent.
|
|
187
187
|
- **A TableView's `tabs`**: `tabs: { column }` writes "All" and a tab per value of that column's badge to the TableView, over the `tabs` it holds; the column must be filterable and drawn as a badge. Left out, a page already mapped keeps its tabs, and a new relation takes the tabs T1 proposes among its filterable badge columns: a column left unfilterable is not tabbed. `null` writes none: it adds no tabs to a new relation, and removes from a page already mapped the tabs a mapping wrote from a badge, as `display: null` removes the badge. Tabs edited by hand are kept.
|
|
188
188
|
- **Mapping again** a relation already mapped rewrites it from the new choices. Its page is created, kept or removed as `tableView` says, and takes the new `title`. The module's relation columns pointing at it take its new `label`.
|
|
189
|
+
- **Before a remap that removes a page**, `PreviewMapResources(input)` answers `pagesToRemove` for the same input and writes nothing, so a caller can ask a person first. It refuses what `MapResources` refuses.
|
|
189
190
|
- **The module's `package.json`** records the connection and the `excluded` tables with their reasons, so the next analysis does not propose those tables. Mapping one later removes it from the record:
|
|
190
191
|
|
|
191
192
|
```json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/interface-dms-builder",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "AntelopeJS interface for the DMS builder: create and edit pages, blocks, resources and queries in a DMS project from another module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|