@salesforce/platform-sdk 11.58.0 → 11.59.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/core/index.d.ts.map +1 -1
- package/dist/data/index.js +1 -1
- package/dist/data/plugins/index.d.ts +19 -0
- package/dist/data/plugins/index.d.ts.map +1 -0
- package/dist/data/plugins/index.js +84 -0
- package/dist/data/plugins/labels/index.d.ts +98 -0
- package/dist/data/plugins/labels/index.d.ts.map +1 -0
- package/dist/data/plugins/labels/query.d.ts +42 -0
- package/dist/data/plugins/labels/query.d.ts.map +1 -0
- package/package.json +10 -2
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACN,OAAO,EACP,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,YAAY,GACZ,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGnD,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGrD,YAAY,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,QAAQ,EACR,SAAS,GACT,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,SAAS,EACT,OAAO,EACP,QAAQ,EACR,OAAO,GACP,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACX,YAAY,EACZ,OAAO,EACP,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,WAAW,GACX,MAAM,QAAQ,CAAC;AAGhB,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7F,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC7E,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAGnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACN,OAAO,EACP,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,YAAY,GACZ,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGnD,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGrD,YAAY,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,QAAQ,EACR,SAAS,GACT,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,SAAS,EACT,OAAO,EACP,QAAQ,EACR,OAAO,GACP,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACX,YAAY,EACZ,OAAO,EACP,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,WAAW,GACX,MAAM,QAAQ,CAAC;AAGhB,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7F,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC7E,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAGnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAQ/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EACX,MAAM,EACN,SAAS,EACT,aAAa,EACb,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,eAAe,GACf,MAAM,gBAAgB,CAAC"}
|
package/dist/data/index.js
CHANGED
|
@@ -282,7 +282,7 @@ const Se = {
|
|
|
282
282
|
return u(t);
|
|
283
283
|
const [r, n] = t;
|
|
284
284
|
return (r instanceof Request && !n?.headers ? r.headers.has(v) : new Headers(n?.headers).has(v)) ? u(t) : u(b(v, e, t));
|
|
285
|
-
}, Ce = "X-SFDC-Client-Name", De = "X-SFDC-Client-Version", Pe = "@salesforce/platform-sdk", Ae = "11.
|
|
285
|
+
}, Ce = "X-SFDC-Client-Name", De = "X-SFDC-Client-Version", Pe = "@salesforce/platform-sdk", Ae = "11.59.0", Oe = (t) => {
|
|
286
286
|
let e = b(Ce, Pe, t);
|
|
287
287
|
return e = b(De, Ae, e), u(e);
|
|
288
288
|
}, Te = "X-CSRF-Token";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* First-party DataSDK plugin catalog. Import plugins from this subpath and
|
|
8
|
+
* attach them via `createDataSDK({ plugins: [...] })`:
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { createDataSDK } from "@salesforce/platform-sdk/data";
|
|
12
|
+
* import { labelsPlugin } from "@salesforce/platform-sdk/data/plugins";
|
|
13
|
+
*
|
|
14
|
+
* const sdk = await createDataSDK({ plugins: [labelsPlugin({ namespace: "MyApp" })] });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export { labelsPlugin } from './labels';
|
|
18
|
+
export type { LabelsApi, LabelsOptions, LabelFallback } from './labels';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineDataPlugin as b } from "../index.js";
|
|
2
|
+
const m = "BASE_VALUE", p = `
|
|
3
|
+
query Labels($namespace: String, $names: [String!]!, $locale: String, $fallback: LabelFallback) {
|
|
4
|
+
uiapi {
|
|
5
|
+
platform {
|
|
6
|
+
labels(namespace: $namespace, names: $names, locale: $locale, fallback: $fallback) {
|
|
7
|
+
name
|
|
8
|
+
value
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`, L = /* @__PURE__ */ new Set(["TRANSLATION_NOT_FOUND", "LABEL_NOT_FOUND"]), f = ["uiapi", "platform", "labels"];
|
|
14
|
+
function E(n) {
|
|
15
|
+
const e = n.path;
|
|
16
|
+
return e?.length !== f.length + 1 ? !1 : f.every((s, l) => e[l] === s) && typeof e[f.length] == "number";
|
|
17
|
+
}
|
|
18
|
+
function d(n) {
|
|
19
|
+
const e = n.extensions?.code;
|
|
20
|
+
return e != null && L.has(e) && E(n);
|
|
21
|
+
}
|
|
22
|
+
const h = 100;
|
|
23
|
+
function g(n, e) {
|
|
24
|
+
const s = [...new Set(n)], l = [];
|
|
25
|
+
for (let r = 0; r < s.length; r += e)
|
|
26
|
+
l.push(s.slice(r, r + e));
|
|
27
|
+
return l;
|
|
28
|
+
}
|
|
29
|
+
async function y(n, e, s, l, r) {
|
|
30
|
+
const t = { names: s, fallback: r };
|
|
31
|
+
e != null && (t.namespace = e), l != null && (t.locale = l);
|
|
32
|
+
const a = await n.query({
|
|
33
|
+
operationName: "Labels",
|
|
34
|
+
query: p,
|
|
35
|
+
variables: t
|
|
36
|
+
}), o = a.errors?.filter((i) => !d(i));
|
|
37
|
+
if (o?.length)
|
|
38
|
+
throw new Error(`Labels query failed: ${JSON.stringify(o)}`);
|
|
39
|
+
const c = a.data?.uiapi?.platform?.labels;
|
|
40
|
+
if (c == null)
|
|
41
|
+
throw new Error(
|
|
42
|
+
`Labels query failed: ${JSON.stringify(a.errors ?? "no labels in response")}`
|
|
43
|
+
);
|
|
44
|
+
return c;
|
|
45
|
+
}
|
|
46
|
+
async function A(n, e, s, l, r) {
|
|
47
|
+
const t = g(s, h), a = await Promise.all(
|
|
48
|
+
t.map((c) => y(n, e, c, l, r))
|
|
49
|
+
), o = {};
|
|
50
|
+
for (const c of a)
|
|
51
|
+
for (const i of c)
|
|
52
|
+
i?.value != null && (o[i.name] = i.value);
|
|
53
|
+
return o;
|
|
54
|
+
}
|
|
55
|
+
function u(n) {
|
|
56
|
+
const e = n?.trim();
|
|
57
|
+
return e || void 0;
|
|
58
|
+
}
|
|
59
|
+
function _(n = {}) {
|
|
60
|
+
const e = { ...n };
|
|
61
|
+
return b({
|
|
62
|
+
name: "labels",
|
|
63
|
+
setup: (s) => {
|
|
64
|
+
const l = s.graphql;
|
|
65
|
+
if (!l)
|
|
66
|
+
return {};
|
|
67
|
+
const r = async (t, a) => {
|
|
68
|
+
const o = u(a?.namespace) ?? u(e.namespace), c = u(a?.locale) ?? u(e.locale), i = a?.fallback ?? e.fallback ?? m;
|
|
69
|
+
return A(l, o, t, c, i);
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
async get(t, a) {
|
|
73
|
+
return (await r([t], a))[t];
|
|
74
|
+
},
|
|
75
|
+
async getAll(t, a) {
|
|
76
|
+
return r(t, a);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
_ as labelsPlugin
|
|
84
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { LabelFallback } from './query';
|
|
2
|
+
import { DataSDKPlugin } from '../../index';
|
|
3
|
+
export type { LabelFallback };
|
|
4
|
+
/**
|
|
5
|
+
* Where labels are read from and how they resolve. Supplied once when the
|
|
6
|
+
* plugin is configured (`labelsPlugin({ namespace: "MyApp" })`) to set defaults,
|
|
7
|
+
* and again per call ({@link LabelsApi.get}/{@link LabelsApi.getAll}) to override
|
|
8
|
+
* them for that call. Each field resolves independently as `call ?? config ??
|
|
9
|
+
* built-in default`.
|
|
10
|
+
*/
|
|
11
|
+
export interface LabelsOptions {
|
|
12
|
+
/**
|
|
13
|
+
* The custom-label namespace to read from (the GraphQL `labels(namespace:)`
|
|
14
|
+
* argument). Omit it — or pass an empty string — at both configure and call
|
|
15
|
+
* sites to let the server apply its default namespace, `"c"` (the standard
|
|
16
|
+
* custom-label namespace). An empty per-call value defers to the configured
|
|
17
|
+
* namespace, exactly as omitting it does.
|
|
18
|
+
*/
|
|
19
|
+
namespace?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Target locale (e.g. `"fr"`, `"en-US"`). Omit it — or pass an empty string —
|
|
22
|
+
* to let the server resolve the logged-in user's locale (the default). An
|
|
23
|
+
* empty per-call value defers to the configured locale, exactly as omitting
|
|
24
|
+
* it does.
|
|
25
|
+
*/
|
|
26
|
+
locale?: string;
|
|
27
|
+
/**
|
|
28
|
+
* How the server resolves a label with no translation for {@link locale}.
|
|
29
|
+
* Defaults to `"BASE_VALUE"` (the org-default value). @see {@link LabelFallback}
|
|
30
|
+
*/
|
|
31
|
+
fallback?: LabelFallback;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The `labels` namespace mounted on the DataSDK. Both methods resolve labels in
|
|
35
|
+
* a namespace (configured or per-call) and report an unresolved label as a miss
|
|
36
|
+
* — `undefined` from {@link get}, an absent key from {@link getAll}. The caller
|
|
37
|
+
* decides what a miss means; fall back to the name with
|
|
38
|
+
* `await sdk.labels.get?.(name) ?? name`.
|
|
39
|
+
*
|
|
40
|
+
* The methods are optional, mirroring the {@link DataSDK.graphql} namespace they
|
|
41
|
+
* depend on: a surface whose DataSDK has no `graphql` cannot fetch labels, so
|
|
42
|
+
* `get`/`getAll` are absent there. Feature-detect (`sdk.labels.get?.(name)`) or
|
|
43
|
+
* narrow once, exactly as you would `sdk.graphql`.
|
|
44
|
+
*/
|
|
45
|
+
export interface LabelsApi {
|
|
46
|
+
/**
|
|
47
|
+
* Resolve a single label. Returns its value, or `undefined` if the server did
|
|
48
|
+
* not resolve it. Absent when the surface's DataSDK has no `graphql`.
|
|
49
|
+
*
|
|
50
|
+
* @param name - The label name (developer name) to resolve.
|
|
51
|
+
* @param options - Per-call overrides of the configured {@link LabelsOptions}.
|
|
52
|
+
*/
|
|
53
|
+
get?(name: string, options?: LabelsOptions): Promise<string | undefined>;
|
|
54
|
+
/**
|
|
55
|
+
* Resolve many labels in one batched load. Returns a map keyed only by the
|
|
56
|
+
* names that resolved; a name that was not resolved is absent from the map
|
|
57
|
+
* (symmetric with {@link get} returning `undefined`), so `Object.keys` reflects
|
|
58
|
+
* exactly what the server supplied. Absent when the surface's DataSDK has no
|
|
59
|
+
* `graphql`.
|
|
60
|
+
*
|
|
61
|
+
* Intended for a bounded label set (an app's manifest — dozens to low
|
|
62
|
+
* hundreds). Names are deduped and split into batches of 100 (the server's
|
|
63
|
+
* per-call cap) that are fetched concurrently, so a very large input issues a
|
|
64
|
+
* proportional number of simultaneous requests; batch, cache, or throttle
|
|
65
|
+
* upstream if you expect to resolve thousands at once.
|
|
66
|
+
*
|
|
67
|
+
* @param names - The label names to resolve. Deduped and batched internally;
|
|
68
|
+
* order and duplicates in the input do not matter.
|
|
69
|
+
* @param options - Per-call overrides of the configured {@link LabelsOptions}.
|
|
70
|
+
*/
|
|
71
|
+
getAll?(names: readonly string[], options?: LabelsOptions): Promise<Record<string, string>>;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A first-party DataSDK plugin that mounts a `labels` namespace for reading
|
|
75
|
+
* custom labels. Attach it via `createDataSDK({ plugins: [labelsPlugin()] })`,
|
|
76
|
+
* then call `sdk.labels.get?.(name)` / `sdk.labels.getAll?.(names)` — the
|
|
77
|
+
* methods are optional, absent on a surface whose DataSDK has no `graphql`.
|
|
78
|
+
*
|
|
79
|
+
* Requires org API v264 or later (the release that introduced the
|
|
80
|
+
* `uiapi.platform.labels` GraphQL shape this plugin queries).
|
|
81
|
+
*
|
|
82
|
+
* @param config - Default {@link LabelsOptions} for every call; each field is
|
|
83
|
+
* overridable per call. Omit `namespace` (here and per call) to read from the
|
|
84
|
+
* server's default namespace, `"c"`.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* import { createDataSDK } from "@salesforce/platform-sdk/data";
|
|
89
|
+
* import { labelsPlugin } from "@salesforce/platform-sdk/data/plugins";
|
|
90
|
+
*
|
|
91
|
+
* const sdk = await createDataSDK({ plugins: [labelsPlugin({ namespace: "MyApp" })] });
|
|
92
|
+
* const greeting = (await sdk.labels.get?.("greeting")) ?? "greeting"; // uses "MyApp"; ?? name if you want the key
|
|
93
|
+
* const french = await sdk.labels.get?.("greeting", { locale: "fr" }); // string | undefined
|
|
94
|
+
* const many = await sdk.labels.getAll?.(["greeting", "farewell"]); // only resolved names
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare function labelsPlugin(config?: LabelsOptions): DataSDKPlugin<"labels", LabelsApi>;
|
|
98
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data/plugins/labels/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA0B,KAAK,aAAa,EAAiB,MAAM,SAAS,CAAC;AACpF,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEnE,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;CACzB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,SAAS;IACzB;;;;;;OAMG;IACH,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzE;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC5F;AAgBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,MAAM,GAAE,aAAkB,GAAG,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,CAsD3F"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DataSDK } from '../../../core';
|
|
2
|
+
/**
|
|
3
|
+
* How the server resolves a label with no translation for the requested locale.
|
|
4
|
+
* `BASE_VALUE` returns the org-default (base) value directly; `USER_DEFAULT`
|
|
5
|
+
* falls back to the logged-in user's language first, then the base value; `NONE`
|
|
6
|
+
* does not fall back — a label with no translation for the locale comes back as
|
|
7
|
+
* a null slot ({@link queryBatch} classifies its indexed error as a miss, not a
|
|
8
|
+
* failure), so the name surfaces as absent rather than as a fallback value.
|
|
9
|
+
*/
|
|
10
|
+
export type LabelFallback = "BASE_VALUE" | "USER_DEFAULT" | "NONE";
|
|
11
|
+
/**
|
|
12
|
+
* Return the org-default (base) value when a label has no translation for the
|
|
13
|
+
* requested locale, instead of the logged-in user's language (the server's
|
|
14
|
+
* `USER_DEFAULT` behavior). The plugin resolves an explicit target locale, so it
|
|
15
|
+
* opts into `BASE_VALUE`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DEFAULT_LABEL_FALLBACK: LabelFallback;
|
|
18
|
+
/** The DataSDK `graphql` namespace with its optionality removed. */
|
|
19
|
+
type GraphQL = NonNullable<DataSDK["graphql"]>;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve `names` in `namespace` to their label values.
|
|
22
|
+
*
|
|
23
|
+
* Dedupes and batches into `labels()` calls of at most 100 names (the server
|
|
24
|
+
* cap), fanning the batches out in parallel. Batches cover disjoint names, so
|
|
25
|
+
* `Promise.all` is safe; it also stays all-or-nothing — a single failed batch
|
|
26
|
+
* ({@link queryBatch} throws on any non-miss GraphQL error) rejects the whole
|
|
27
|
+
* load rather than returning a partial map that hides the failure.
|
|
28
|
+
*
|
|
29
|
+
* Returns a map keyed by the requested name. A *miss* — an unknown name, or no
|
|
30
|
+
* translation when `fallback` is `NONE` — comes back as a null slot (its indexed
|
|
31
|
+
* error already classified as a miss by {@link queryBatch}) and is dropped from
|
|
32
|
+
* the map, so this returns only the names the server actually resolved.
|
|
33
|
+
*
|
|
34
|
+
* @param namespace - Label namespace, or `undefined` to let the server apply
|
|
35
|
+
* its default namespace (`"c"`; the GraphQL `namespace` arg is nullable and
|
|
36
|
+
* defaulted, so the variable is omitted when this is `undefined`).
|
|
37
|
+
* @param locale - Target locale, or `undefined` to let the server resolve the
|
|
38
|
+
* logged-in user's locale (the GraphQL `locale` arg is nullable).
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveLabels(graphql: GraphQL, namespace: string | undefined, names: readonly string[], locale: string | undefined, fallback: LabelFallback): Promise<Record<string, string>>;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../src/data/plugins/labels/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,eAAe,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,MAAM,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAA4B,CAAC;AAiIlE,oEAAoE;AACpE,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;AA6D/C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,aAAa,CAClC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,QAAQ,EAAE,aAAa,GACrB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAuBjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/platform-sdk",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.59.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,6 +26,9 @@
|
|
|
26
26
|
"data": [
|
|
27
27
|
"./dist/data/index.d.ts"
|
|
28
28
|
],
|
|
29
|
+
"data/plugins": [
|
|
30
|
+
"./dist/data/plugins/index.d.ts"
|
|
31
|
+
],
|
|
29
32
|
"lightning": [
|
|
30
33
|
"./dist/lightning/index.d.ts"
|
|
31
34
|
],
|
|
@@ -72,6 +75,11 @@
|
|
|
72
75
|
"import": "./dist/data/index.js",
|
|
73
76
|
"default": "./dist/data/index.js"
|
|
74
77
|
},
|
|
78
|
+
"./data/plugins": {
|
|
79
|
+
"types": "./dist/data/plugins/index.d.ts",
|
|
80
|
+
"import": "./dist/data/plugins/index.js",
|
|
81
|
+
"default": "./dist/data/plugins/index.js"
|
|
82
|
+
},
|
|
75
83
|
"./lightning": {
|
|
76
84
|
"types": "./dist/lightning/index.d.ts",
|
|
77
85
|
"import": "./dist/lightning/index.js",
|
|
@@ -126,7 +134,7 @@
|
|
|
126
134
|
"@conduit-client/service-pubsub": "3.19.6",
|
|
127
135
|
"@conduit-client/service-retry": "3.19.6",
|
|
128
136
|
"@conduit-client/utils": "3.19.6",
|
|
129
|
-
"@salesforce/jsonrpc": "^11.
|
|
137
|
+
"@salesforce/jsonrpc": "^11.59.0",
|
|
130
138
|
"@salesforce/sf-embedding-bridge": "2.2.5-rc.2"
|
|
131
139
|
},
|
|
132
140
|
"peerDependencies": {
|