@object-ui/data-objectstack 11.4.0 → 11.5.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 +13 -0
- package/dist/index.cjs +19 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +19 -0
- package/package.json +3 -3
- package/src/index.ts +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @object-ui/data-objectstack
|
|
2
2
|
|
|
3
|
+
## 11.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1072701: Import wizard: use registered server-side import mappings (framework #2611). When an object has `mapping` metadata artifacts targeting it, the wizard shows a "Saved mapping" selector; picking one hands rename + transforms + write semantics to the server (the artifact is authoritative), replaces the manual column table with a read-only summary of the mapping, and submits `mappingName` over source-header rows (mutually exclusive with the inline column rename). `ImportRequestOptions` gains `mappingName`; the objectstack adapter gains `listImportMappings(objectName)` (feature-detected — the selector simply doesn't appear when unsupported). New `grid.import.*` strings added across all locales.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [9255686]
|
|
12
|
+
- Updated dependencies [1072701]
|
|
13
|
+
- @object-ui/types@11.5.0
|
|
14
|
+
- @object-ui/core@11.5.0
|
|
15
|
+
|
|
3
16
|
## 11.4.0
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2645,6 +2645,25 @@ var ObjectStackAdapter = class {
|
|
|
2645
2645
|
return [];
|
|
2646
2646
|
}
|
|
2647
2647
|
}
|
|
2648
|
+
/**
|
|
2649
|
+
* List registered import `mapping` artifacts targeting a given object
|
|
2650
|
+
* (framework #2611). Reads the `mapping` metadata kind via the overlay API
|
|
2651
|
+
* and filters by `targetObject` client-side (the metadata index is
|
|
2652
|
+
* name-only). Feeds the import wizard's "saved mapping" selector; a failure
|
|
2653
|
+
* (older server without the `mapping` kind) degrades to an empty list, so
|
|
2654
|
+
* the selector simply doesn't appear.
|
|
2655
|
+
*/
|
|
2656
|
+
async listImportMappings(objectName) {
|
|
2657
|
+
await this.connect();
|
|
2658
|
+
try {
|
|
2659
|
+
const result = await this.client.meta.getItems("mapping");
|
|
2660
|
+
const items = Array.isArray(result?.items) ? result.items : Array.isArray(result) ? result : [];
|
|
2661
|
+
return items.filter((m) => m && m.targetObject === objectName);
|
|
2662
|
+
} catch (err) {
|
|
2663
|
+
console.warn("[OBJECTSTACKDataSource] listImportMappings failed:", err);
|
|
2664
|
+
return [];
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2648
2667
|
/**
|
|
2649
2668
|
* Create a new overlay view for an object. The view's `name` is the
|
|
2650
2669
|
* stable identifier — must be unique within the project scope. Returns
|
package/dist/index.d.cts
CHANGED
|
@@ -1621,6 +1621,15 @@ declare class ObjectStackAdapter<T = unknown> implements DataSource<T> {
|
|
|
1621
1621
|
* client-side because the metadata index is name-only, not field-typed.
|
|
1622
1622
|
*/
|
|
1623
1623
|
listViews(objectName: string): Promise<any[]>;
|
|
1624
|
+
/**
|
|
1625
|
+
* List registered import `mapping` artifacts targeting a given object
|
|
1626
|
+
* (framework #2611). Reads the `mapping` metadata kind via the overlay API
|
|
1627
|
+
* and filters by `targetObject` client-side (the metadata index is
|
|
1628
|
+
* name-only). Feeds the import wizard's "saved mapping" selector; a failure
|
|
1629
|
+
* (older server without the `mapping` kind) degrades to an empty list, so
|
|
1630
|
+
* the selector simply doesn't appear.
|
|
1631
|
+
*/
|
|
1632
|
+
listImportMappings(objectName: string): Promise<any[]>;
|
|
1624
1633
|
/**
|
|
1625
1634
|
* Create a new overlay view for an object. The view's `name` is the
|
|
1626
1635
|
* stable identifier — must be unique within the project scope. Returns
|
package/dist/index.d.ts
CHANGED
|
@@ -1621,6 +1621,15 @@ declare class ObjectStackAdapter<T = unknown> implements DataSource<T> {
|
|
|
1621
1621
|
* client-side because the metadata index is name-only, not field-typed.
|
|
1622
1622
|
*/
|
|
1623
1623
|
listViews(objectName: string): Promise<any[]>;
|
|
1624
|
+
/**
|
|
1625
|
+
* List registered import `mapping` artifacts targeting a given object
|
|
1626
|
+
* (framework #2611). Reads the `mapping` metadata kind via the overlay API
|
|
1627
|
+
* and filters by `targetObject` client-side (the metadata index is
|
|
1628
|
+
* name-only). Feeds the import wizard's "saved mapping" selector; a failure
|
|
1629
|
+
* (older server without the `mapping` kind) degrades to an empty list, so
|
|
1630
|
+
* the selector simply doesn't appear.
|
|
1631
|
+
*/
|
|
1632
|
+
listImportMappings(objectName: string): Promise<any[]>;
|
|
1624
1633
|
/**
|
|
1625
1634
|
* Create a new overlay view for an object. The view's `name` is the
|
|
1626
1635
|
* stable identifier — must be unique within the project scope. Returns
|
package/dist/index.js
CHANGED
|
@@ -2597,6 +2597,25 @@ var ObjectStackAdapter = class {
|
|
|
2597
2597
|
return [];
|
|
2598
2598
|
}
|
|
2599
2599
|
}
|
|
2600
|
+
/**
|
|
2601
|
+
* List registered import `mapping` artifacts targeting a given object
|
|
2602
|
+
* (framework #2611). Reads the `mapping` metadata kind via the overlay API
|
|
2603
|
+
* and filters by `targetObject` client-side (the metadata index is
|
|
2604
|
+
* name-only). Feeds the import wizard's "saved mapping" selector; a failure
|
|
2605
|
+
* (older server without the `mapping` kind) degrades to an empty list, so
|
|
2606
|
+
* the selector simply doesn't appear.
|
|
2607
|
+
*/
|
|
2608
|
+
async listImportMappings(objectName) {
|
|
2609
|
+
await this.connect();
|
|
2610
|
+
try {
|
|
2611
|
+
const result = await this.client.meta.getItems("mapping");
|
|
2612
|
+
const items = Array.isArray(result?.items) ? result.items : Array.isArray(result) ? result : [];
|
|
2613
|
+
return items.filter((m) => m && m.targetObject === objectName);
|
|
2614
|
+
} catch (err) {
|
|
2615
|
+
console.warn("[OBJECTSTACKDataSource] listImportMappings failed:", err);
|
|
2616
|
+
return [];
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2600
2619
|
/**
|
|
2601
2620
|
* Create a new overlay view for an object. The view's `name` is the
|
|
2602
2621
|
* stable identifier — must be unique within the project scope. Returns
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/data-objectstack",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.5.0",
|
|
4
4
|
"description": "ObjectStack Data Adapter for Object UI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@objectstack/client": "^11.5.0",
|
|
26
|
-
"@object-ui/core": "11.
|
|
27
|
-
"@object-ui/types": "11.
|
|
26
|
+
"@object-ui/core": "11.5.0",
|
|
27
|
+
"@object-ui/types": "11.5.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"tsup": "^8.5.1",
|
package/src/index.ts
CHANGED
|
@@ -1889,6 +1889,28 @@ export class ObjectStackAdapter<T = unknown> implements DataSource<T> {
|
|
|
1889
1889
|
}
|
|
1890
1890
|
}
|
|
1891
1891
|
|
|
1892
|
+
/**
|
|
1893
|
+
* List registered import `mapping` artifacts targeting a given object
|
|
1894
|
+
* (framework #2611). Reads the `mapping` metadata kind via the overlay API
|
|
1895
|
+
* and filters by `targetObject` client-side (the metadata index is
|
|
1896
|
+
* name-only). Feeds the import wizard's "saved mapping" selector; a failure
|
|
1897
|
+
* (older server without the `mapping` kind) degrades to an empty list, so
|
|
1898
|
+
* the selector simply doesn't appear.
|
|
1899
|
+
*/
|
|
1900
|
+
async listImportMappings(objectName: string): Promise<any[]> {
|
|
1901
|
+
await this.connect();
|
|
1902
|
+
try {
|
|
1903
|
+
const result: any = await this.client.meta.getItems('mapping');
|
|
1904
|
+
const items: any[] = Array.isArray(result?.items)
|
|
1905
|
+
? result.items
|
|
1906
|
+
: Array.isArray(result) ? result : [];
|
|
1907
|
+
return items.filter((m: any) => m && m.targetObject === objectName);
|
|
1908
|
+
} catch (err) {
|
|
1909
|
+
console.warn('[OBJECTSTACKDataSource] listImportMappings failed:', err);
|
|
1910
|
+
return [];
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1892
1914
|
/**
|
|
1893
1915
|
* Create a new overlay view for an object. The view's `name` is the
|
|
1894
1916
|
* stable identifier — must be unique within the project scope. Returns
|