@contentful/app-sdk 4.56.0 → 4.57.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.
|
@@ -11,6 +11,7 @@ export type CMAClient = {
|
|
|
11
11
|
appSignedRequest: Pick<PlainClientAPI['appSignedRequest'], 'create'>;
|
|
12
12
|
bulkAction: PlainClientAPI['bulkAction'];
|
|
13
13
|
comment: PlainClientAPI['comment'];
|
|
14
|
+
contentSemanticsIndex: Pick<PlainClientAPI['contentSemanticsIndex'], 'getManyForEnvironment'>;
|
|
14
15
|
contentType: PlainClientAPI['contentType'];
|
|
15
16
|
editorInterface: PlainClientAPI['editorInterface'];
|
|
16
17
|
environment: Pick<PlainClientAPI['environment'], 'get'>;
|
|
@@ -21,6 +22,10 @@ export type CMAClient = {
|
|
|
21
22
|
releaseAction: PlainClientAPI['releaseAction'];
|
|
22
23
|
role: Pick<PlainClientAPI['role'], 'get' | 'getMany'>;
|
|
23
24
|
scheduledActions: PlainClientAPI['scheduledActions'];
|
|
25
|
+
semanticDuplicates: PlainClientAPI['semanticDuplicates'];
|
|
26
|
+
semanticRecommendations: PlainClientAPI['semanticRecommendations'];
|
|
27
|
+
semanticReferenceSuggestions: PlainClientAPI['semanticReferenceSuggestions'];
|
|
28
|
+
semanticSearch: PlainClientAPI['semanticSearch'];
|
|
24
29
|
snapshot: PlainClientAPI['snapshot'];
|
|
25
30
|
space: Pick<PlainClientAPI['space'], 'get'>;
|
|
26
31
|
upload: PlainClientAPI['upload'];
|
|
@@ -18,7 +18,17 @@ interface FieldAPIBase {
|
|
|
18
18
|
setValue: <Value = any>(value: Value) => Promise<SerializedJSONValue | undefined>;
|
|
19
19
|
/** Removes the value for the field and locale. */
|
|
20
20
|
removeValue: () => Promise<void>;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Sets a visual invalid indicator (red error bar) on the field in the web app.
|
|
23
|
+
*
|
|
24
|
+
* **Constraints:**
|
|
25
|
+
* - Visual only — does NOT prevent publishing.
|
|
26
|
+
* - Only affects the field the app is assigned to. Calling this via
|
|
27
|
+
* `sdk.entry.fields['otherField'].getForLocale(...).setInvalid()` from
|
|
28
|
+
* a different field location has no effect.
|
|
29
|
+
* - To prevent publishing, use a built-in validation on a separate field and
|
|
30
|
+
* control its value with `sdk.field.setValue()`.
|
|
31
|
+
*/
|
|
22
32
|
setInvalid: (value: boolean) => void;
|
|
23
33
|
/** Calls the callback every time the value of the field is changed by an external event or when setValue() is called.
|
|
24
34
|
* the returned function can be called to remove the handler function
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@contentful/app-sdk","description":"A JavaScript library to develop custom apps for Contentful","version":"4.
|
|
1
|
+
{"name":"@contentful/app-sdk","description":"A JavaScript library to develop custom apps for Contentful","version":"4.57.0","author":"Contentful GmbH","license":"MIT","sideEffects":true,"repository":{"url":"https://github.com/contentful/ui-extensions-sdk.git","type":"git"},"homepage":"https://www.contentful.com/developers/docs/extensibility/app-framework/sdk/","main":"dist/cf-extension-api.js","unpkg":"dist/cf-extension-api.bundled.js","jsdelivr":"dist/cf-extension-api.bundled.js","types":"dist/index.d.ts","files":["dist/cf-extension-api.js","dist/cf-extension-api.js.map","dist/cf-extension-api.bundled.js","dist/cf-extension.css","dist/**/*.d.ts"],"scripts":{"test":"ts-mocha -p tsconfig.test.json 'test/unit/*.[jt]s' --reporter mocha-multi-reporters --reporter-options configFile=mocha.unit-reporters.json","lint":"eslint '{lib,test}/**/*.{t,j}s'","lint:fix":"npm run lint -- --fix","build":"npm run check-types && rollup -c --compact","build:debug":"npm run build -- --sourcemap","prepublishOnly":"npm run build","size":"echo \"Gzipped, estimate: $(gzip -9 -c dist/cf-extension-api.js | wc -c) bytes\"","semantic-release":"semantic-release","publish-all":"node ./scripts/publish.js","verify":"node ./scripts/verify.js","check-types":"tsc --noEmit -m commonjs","prepare":"husky","lint-staged":"lint-staged"},"dependencies":{"contentful-management":"^12.3.1"},"devDependencies":{"@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-node-resolve":"^16.0.0","@semantic-release/changelog":"6.0.3","@semantic-release/exec":"7.1.0","@semantic-release/git":"10.0.1","@testing-library/dom":"10.4.1","@types/chai-as-promised":"7.1.8","@types/cross-spawn":"6.0.6","@types/fs-extra":"11.0.4","@types/jsdom":"28.0.1","@types/mocha":"10.0.10","@types/nanoid":"3.0.0","@types/sinon":"^21.0.0","@types/sinon-chai":"^3.2.5","@typescript-eslint/eslint-plugin":"7.18.0","@typescript-eslint/parser":"7.18.0","babel-eslint":"10.1.0","chai":"4.5.0","chai-as-promised":"7.1.2","cross-spawn":"7.0.6","eslint":"8.57.1","eslint-config-prettier":"10.1.8","eslint-config-standard":"17.1.0","eslint-plugin-import":"2.32.0","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"5.5.5","eslint-plugin-promise":"6.6.0","eslint-plugin-react":"7.37.5","eslint-plugin-standard":"5.0.0","fs-extra":"11.3.4","husky":"9.1.7","jsdom":"29.1.0","lint-staged":"16.4.0","mocha":"11.7.5","mocha-junit-reporter":"2.2.1","mocha-multi-reporters":"1.5.1","mochawesome":"7.1.4","mochawesome-merge":"5.1.1","mochawesome-report-generator":"6.3.2","prettier":"3.8.3","rollup":"2.80.0","rollup-plugin-terser":"7.0.2","rollup-plugin-typescript2":"0.37.0","semantic-release":"^25.0.2","sinon":"21.1.2","sinon-chai":"3.7.0","ts-mocha":"11.1.0","tslib":"2.8.1","typescript":"5.9.3"},"lint-staged":{"*.ts":["prettier --write","eslint --fix"],"*.md":["prettier --write"]},"release":{"branches":["main",{"name":"canary","channel":"canary","prerelease":"alpha"}],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog",["@semantic-release/npm",{"npmPublish":false}],["@semantic-release/exec",{"verifyConditionsCmd":"node ./scripts/verify.js","publishCmd":"npm run publish-all"}],["@semantic-release/git",{"message":"chore: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}","assets":["CHANGELOG.md","package.json","package-lock.json"]}],"@semantic-release/github"]}}
|