@object-ui/data-objectstack 11.4.0 → 13.1.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 CHANGED
@@ -1,5 +1,50 @@
1
1
  # @object-ui/data-objectstack
2
2
 
3
+ ## 13.1.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @object-ui/types@13.1.0
8
+ - @object-ui/core@13.1.0
9
+
10
+ ## 13.0.0
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [619097e]
15
+ - @object-ui/types@13.0.0
16
+ - @object-ui/core@13.0.0
17
+
18
+ ## 12.1.0
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [c31874d]
23
+ - @object-ui/types@12.1.0
24
+ - @object-ui/core@12.1.0
25
+
26
+ ## 12.0.0
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [226fde9]
31
+ - Updated dependencies [e4de456]
32
+ - @object-ui/types@12.0.0
33
+ - @object-ui/core@12.0.0
34
+
35
+ ## 11.5.0
36
+
37
+ ### Minor Changes
38
+
39
+ - 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.
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [9255686]
44
+ - Updated dependencies [1072701]
45
+ - @object-ui/types@11.5.0
46
+ - @object-ui/core@11.5.0
47
+
3
48
  ## 11.4.0
4
49
 
5
50
  ### 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.4.0",
3
+ "version": "13.1.0",
4
4
  "description": "ObjectStack Data Adapter for Object UI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,14 +22,14 @@
22
22
  "LICENSE"
23
23
  ],
24
24
  "dependencies": {
25
- "@objectstack/client": "^11.5.0",
26
- "@object-ui/core": "11.4.0",
27
- "@object-ui/types": "11.4.0"
25
+ "@objectstack/client": "^12.3.0",
26
+ "@object-ui/core": "13.1.0",
27
+ "@object-ui/types": "13.1.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "tsup": "^8.5.1",
31
31
  "typescript": "^6.0.3",
32
- "vitest": "^4.1.9"
32
+ "vitest": "^4.1.10"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
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