Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
15e016d
fix: update field event is not sent when input event does not occur i…
faraazb-contentstack Mar 28, 2025
7aecf09
test: update focusOverlayWrapper test
faraazb-contentstack Apr 2, 2025
696a803
chore: remove formatting changes and do a global mock for getEntryPer…
faraazb-contentstack Apr 17, 2025
6d31575
fix: disable variant entry actions when no entry edit permission
faraazb-contentstack Apr 17, 2025
c4711b4
test: createCachedFetch
faraazb-contentstack Apr 17, 2025
57e1fc4
fix: only set previous value when noTrigger is true
faraazb-contentstack Apr 22, 2025
1d1fd4f
fix: clear field schema map on variant change
faraazb-contentstack Apr 23, 2025
5d4a695
test: update fieldSchemaMap tests and add tests for variant event han…
faraazb-contentstack Apr 23, 2025
15452fc
Merge branch 'main' into VE-5361-no-update-on-no-input
faraazb Apr 24, 2025
638637b
Merge branch 'develop_v3' into VE-5851-no-update-permission-disable-f…
faraazb-contentstack May 5, 2025
c05998b
test: update failing tests
faraazb-contentstack May 5, 2025
be0e784
Merge pull request #432 from contentstack/VE-6191-enable-disable-fiel…
faraazb May 6, 2025
ce30b02
test: add tests for various modules
faraazb-contentstack May 7, 2025
8e6a56d
test: not sending field event in handleFieldInput
faraazb-contentstack May 7, 2025
9a7b64a
Merge pull request #425 from contentstack/VE-5851-no-update-permissio…
faraazb May 7, 2025
6a2c5d8
Merge pull request #422 from contentstack/VE-5361-no-update-on-no-input
faraazb May 7, 2025
f2b038a
Merge remote-tracking branch 'origin/main' into develop_v3
hitesh-shetty-cstk May 13, 2025
d5f29dd
3.2.2
hitesh-shetty-cstk May 13, 2025
5da31f1
chore: update Contentstack Live Preview utils to version 3.2.2 in README
hitesh-shetty-cstk May 13, 2025
7640872
chore: add README.md to talismanrc file with checksum
hitesh-shetty-cstk May 13, 2025
25b1be6
fix: error handling for getEntryPermissionsCached usages
faraazb-contentstack May 13, 2025
16306dd
test: update field mouse hover tests
faraazb-contentstack May 13, 2025
166ddc5
Merge pull request #434 from contentstack/VE-5851-no-update-permissio…
hiteshshetty-dev May 13, 2025
72548d9
Merge pull request #433 from contentstack/develop_v3
hiteshshetty-dev May 14, 2025
6dc5eed
chore: add CHANGELOG.md and fieldToolbar.test.tsx to talismanrc with …
hitesh-shetty-cstk May 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ fileignoreconfig:
- filename: .github/workflows/secrets-scan.yml
ignore_detectors:
- filecontent
- filename: README.md
checksum: f9e1aee750713c9c4aea3c1027686a1aefcebd759de0ffd06dbea6fdf9f576e6
- filename: CHANGELOG.md
checksum: 677807c38f5135fac7ca0377e92953fb09097150ddd3c4f68667fe0368f916ee
- filename: src/visualBuilder/components/__test__/fieldToolbar.test.tsx
checksum: 3badd6a142456b6a361569e6fc546349a38ac6b366bef7fd5255d1e93220444e
version: "1.0"
86 changes: 66 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,49 @@
# Changelog

## [v3.2.2](https://github.com/contentstack/live-preview-sdk/compare/v3.2.1...v3.2.2)

> 13 May 2025

### New Features

- feat(VE-5851): disable fields of update restricted entries (Faraaz Biyabani - [#425](https://github.com/contentstack/live-preview-sdk/pull/425))

### Fixes

- fix(VE-5361): update field event is not sent when input event does not occur in inline editable fields (Faraaz Biyabani - [#422](https://github.com/contentstack/live-preview-sdk/pull/422))
- fix(VE-6191): clear field schema map on variant change (Faraaz Biyabani - [#432](https://github.com/contentstack/live-preview-sdk/pull/432))

### Fixes

- fix: update field event is not sent when input event does not occur in inline editable fields (Faraaz Biyabani - [15e016d](https://github.com/contentstack/live-preview-sdk/commit/15e016da1d5801fe0770ff31387e47b3b4835d71))
- fix: disable variant entry actions when no entry edit permission (Faraaz Biyabani - [6d31575](https://github.com/contentstack/live-preview-sdk/commit/6d315751c128d6231f15ee76d8ef83e5fdb1a1bf))
- fix: clear field schema map on variant change (Faraaz Biyabani - [1d1fd4f](https://github.com/contentstack/live-preview-sdk/commit/1d1fd4fc5c0220486a7eef2470a7bb62464ee2f0))
- fix: only set previous value when noTrigger is true (Faraaz Biyabani - [57e1fc4](https://github.com/contentstack/live-preview-sdk/commit/57e1fc4c52bed3663078e5686a697bb37bfa6369))

### Chores And Housekeeping

- chore: remove formatting changes and do a global mock for getEntryPermissionsCached (Faraaz Biyabani - [696a803](https://github.com/contentstack/live-preview-sdk/commit/696a80376028204dfa3e44b5342426c84f052d6c))

### Changes to Test Assests

- test: update fieldSchemaMap tests and add tests for variant event handlers (Faraaz Biyabani - [5d4a695](https://github.com/contentstack/live-preview-sdk/commit/5d4a6956a2a4cd653ba8b852eb24270cc3db4653))
- test: add tests for various modules (Faraaz Biyabani - [ce30b02](https://github.com/contentstack/live-preview-sdk/commit/ce30b02e94c5f7ceae8bf754518a764a59b530ea))
- test: createCachedFetch (Faraaz Biyabani - [c4711b4](https://github.com/contentstack/live-preview-sdk/commit/c4711b4527982766d480b294af9b9d7bf2e4c8f3))
- test: not sending field event in handleFieldInput (Faraaz Biyabani - [8e6a56d](https://github.com/contentstack/live-preview-sdk/commit/8e6a56d55e9f0d9a097a91f1ca06db8002a154b6))
- test: update failing tests (Faraaz Biyabani - [c05998b](https://github.com/contentstack/live-preview-sdk/commit/c05998bca1aea2d010856d5bd41fd699817cc145))
- test: update focusOverlayWrapper test (Faraaz Biyabani - [7aecf09](https://github.com/contentstack/live-preview-sdk/commit/7aecf09829f433bb39537e9aae9a99e7ad9733ee))

### General Changes

- secrets-scan.yml (Aravind Kumar - [f9c5068](https://github.com/contentstack/live-preview-sdk/commit/f9c5068f3996d39aa73dcabac788950903513e32))
- talismanrc file updated (Aravind Kumar - [8a70888](https://github.com/contentstack/live-preview-sdk/commit/8a70888d24083ff4f5f9c2878d3b94661dabbd08))
- Updated codeowners (Aravind Kumar - [86bc538](https://github.com/contentstack/live-preview-sdk/commit/86bc538fc3f1bb42f2d86cf39ae8568be94880dd))
- issues-jira.yml (Aravind Kumar - [84a292c](https://github.com/contentstack/live-preview-sdk/commit/84a292cc28491bdab4ea9ab819594de320a99e8e))
- policy-scan.yml (Aravind Kumar - [55a2765](https://github.com/contentstack/live-preview-sdk/commit/55a2765deefc7ba4ebc91e2af07496834ee3dce3))

## [v3.2.1](https://github.com/contentstack/live-preview-sdk/compare/v3.2.0...v3.2.1)

> 23 April 2025
> 24 April 2025

### Fixes

Expand All @@ -14,6 +55,7 @@

### General Changes

- v3.2.1 (Faraaz Biyabani - [#430](https://github.com/contentstack/live-preview-sdk/pull/430))
- Stage-v3.2.1 (Faraaz Biyabani - [#428](https://github.com/contentstack/live-preview-sdk/pull/428))

### Fixes
Expand All @@ -39,6 +81,7 @@
- Delete jira.yml (Aravind Kumar - [80a496c](https://github.com/contentstack/live-preview-sdk/commit/80a496c805ce52542221f9bafa11116211f24f73))
- issues-jira.yml (Aravind Kumar - [a429983](https://github.com/contentstack/live-preview-sdk/commit/a4299833949c80c274abd8af8ae81062fd78556f))
- policy-scan.yml (Aravind Kumar - [a4b69a0](https://github.com/contentstack/live-preview-sdk/commit/a4b69a07a50b0d8145122bf99b330c3b22d91e8f))
- policy-scan.yml (Aravind Kumar - [7ae545b](https://github.com/contentstack/live-preview-sdk/commit/7ae545b3167869dc01874c8a75ffaff118d0d00a))
- Delete sast-scan.yml (Aravind Kumar - [c0bffef](https://github.com/contentstack/live-preview-sdk/commit/c0bffefd3a100a96117b080bd5cd7d2f6302deea))
- Updated codeowners (Aravind Kumar - [b759727](https://github.com/contentstack/live-preview-sdk/commit/b759727225ca20ee5e4b5addb8783a87eb8bc385))
- codeql-analysis.yml (Aravind Kumar - [d90af9f](https://github.com/contentstack/live-preview-sdk/commit/d90af9f61ed6fca7f4fdfac6ad6993006ed771ea))
Expand All @@ -52,6 +95,11 @@

> 11 April 2025

### General Changes

- v3.1.3 (Sairaj - [#413](https://github.com/contentstack/live-preview-sdk/pull/413))
- Stage-v3.1.3 (Hitesh Shetty - [#412](https://github.com/contentstack/live-preview-sdk/pull/412))

### New Features

- feat(collab): add ui-components and collab feature handling (MohammedZuhairAhmed - [8d15af3](https://github.com/contentstack/live-preview-sdk/commit/8d15af302c1129cfeee6acf39e99c282ed275f00))
Expand Down Expand Up @@ -92,6 +140,8 @@

- chore(collab): addressed pr comments (MohammedZuhairAhmed - [0a2e644](https://github.com/contentstack/live-preview-sdk/commit/0a2e6447ee9912136927aaab3b0d27eb717d10a1))
- chore(collab): fix email styles (Pratyush Biswas - [ecfde0a](https://github.com/contentstack/live-preview-sdk/commit/ecfde0ae403807c7e36461e3777d0a720eb82ae1))
- chore: add tagPattern to auto-changelog configuration in package.json (hiteshshetty-dev - [e0a208b](https://github.com/contentstack/live-preview-sdk/commit/e0a208bab316535abfb9c0e1ead19dab95b76f2d))
- chore: update ContentstackLivePreview import to version 3.1.3 in README.md (hiteshshetty-dev - [6b52088](https://github.com/contentstack/live-preview-sdk/commit/6b52088ec4605c5d95358f3bc06002ef136e4f2c))

### Refactoring and Updates

Expand Down Expand Up @@ -122,10 +172,15 @@
- remove unused styles (Pratyush Biswas - [1db60c4](https://github.com/contentstack/live-preview-sdk/commit/1db60c49ae5f2decd6ec57a825d8d55206171096))
- Fix resolve button style (Pratyush Biswas - [e0ecaaa](https://github.com/contentstack/live-preview-sdk/commit/e0ecaaaa0fbf04b1bc61736541302cb0d62e8a9b))
- added id to tousers list (diwakarmk7 - [df62756](https://github.com/contentstack/live-preview-sdk/commit/df6275625518c222909b8039eb55d21ca38df7aa))
- Update src/visualBuilder/utils/handleInlineEditableField.ts (Hitesh Shetty - [3052877](https://github.com/contentstack/live-preview-sdk/commit/30528770bec19e0ca4a5b29b778fb53b1739bd60))

## [v3.1.3](https://github.com/contentstack/live-preview-sdk/compare/v3.1.2...v3.1.3)

> 4 April 2025
> 28 March 2025

### New Features

- feat: v3.1.2 (Faraaz Biyabani - [#381](https://github.com/contentstack/live-preview-sdk/pull/381))

### Fixes

Expand All @@ -134,15 +189,18 @@
- fix(VE-5555): add instance button loading state (Faraaz Biyabani - [#406](https://github.com/contentstack/live-preview-sdk/pull/406))
- fix: call onChangeCallback when live_preview parameter is present in URL (Faraaz Biyabani - [#363](https://github.com/contentstack/live-preview-sdk/pull/363))

### Chores And Housekeeping

- chore: rename `editButtonBulider` to `editInVisualBuilderButton` (Hitesh Shetty - [#379](https://github.com/contentstack/live-preview-sdk/pull/379))

### Changes to Test Assests

- test(VE-5478): add unit test for inline editing related functions (Faraaz Biyabani - [#398](https://github.com/contentstack/live-preview-sdk/pull/398))

### General Changes

- v3.1.3 (Sairaj - [#413](https://github.com/contentstack/live-preview-sdk/pull/413))
- Stage-v3.1.3 (Hitesh Shetty - [#412](https://github.com/contentstack/live-preview-sdk/pull/412))
- VE-5544: Investigate button click issue with `data-cslp` attribute (Sairaj - [#408](https://github.com/contentstack/live-preview-sdk/pull/408))
- Stage: v3.1.2 (Faraaz Biyabani - [#377](https://github.com/contentstack/live-preview-sdk/pull/377))

### New Features

Expand All @@ -156,26 +214,22 @@

### Chores And Housekeeping

- chore: add tagPattern to auto-changelog configuration in package.json (hiteshshetty-dev - [e0a208b](https://github.com/contentstack/live-preview-sdk/commit/e0a208bab316535abfb9c0e1ead19dab95b76f2d))
- chore: update ContentstackLivePreview import to version 3.1.3 in README.md (hiteshshetty-dev - [6b52088](https://github.com/contentstack/live-preview-sdk/commit/6b52088ec4605c5d95358f3bc06002ef136e4f2c))
- chore: rename editButtonBulider to editInVisualBuilderButton (Sairaj Chouhan - [bd8be29](https://github.com/contentstack/live-preview-sdk/commit/bd8be29d97c151fc85aad98f55573a6821b3d4fc))
- chore: update integrity (hiteshshetty-dev - [ad2c8aa](https://github.com/contentstack/live-preview-sdk/commit/ad2c8aa3780b973233a82e5a978254f777773af2))

### Changes to Test Assests

- test: add unit test for inline editing related functions (Faraaz Biyabani - [50a2167](https://github.com/contentstack/live-preview-sdk/commit/50a21675271c7ec65d0959a1e20334011119a729))
- test: fix unit tests related to add instance button (Faraaz Biyabani - [b6af0cc](https://github.com/contentstack/live-preview-sdk/commit/b6af0cc1d6142c9cfcbcdbef745ac245d0f271ca))
- test: add test for replace button visibility in multiple file fields (Sairaj Chouhan - [aa1d818](https://github.com/contentstack/live-preview-sdk/commit/aa1d818533f8759cfc428c6a2c32691041beef93))

### General Changes

- Update src/visualBuilder/utils/handleInlineEditableField.ts (Hitesh Shetty - [3052877](https://github.com/contentstack/live-preview-sdk/commit/30528770bec19e0ca4a5b29b778fb53b1739bd60))
- test: fix failing test cases (Sairaj Chouhan - [6d36acb](https://github.com/contentstack/live-preview-sdk/commit/6d36acbd5c4e717f92ce40e2e4490df28a857948))

## [v3.1.2](https://github.com/contentstack/live-preview-sdk/compare/v3.1.1...v3.1.2)

> 7 March 2025
> 3 March 2025

### New Features

- feat: v3.1.2 (Faraaz Biyabani - [#381](https://github.com/contentstack/live-preview-sdk/pull/381))
- feat: improve edit button rendering (Faraaz Biyabani - [#371](https://github.com/contentstack/live-preview-sdk/pull/371))
- feat(VE-5170): add plus button configuration (Sairaj - [#349](https://github.com/contentstack/live-preview-sdk/pull/349))
- feat: allow click on elements with studio-ui attribute (Faraaz Biyabani - [#355](https://github.com/contentstack/live-preview-sdk/pull/355))
Expand All @@ -190,17 +244,12 @@
- fix(VE-5012): add variant classes in case of adding multiple instances (srinad007 - [#351](https://github.com/contentstack/live-preview-sdk/pull/351))
- fix(VE-5080): fix z-index for hover outline and add button (srinad007 - [#341](https://github.com/contentstack/live-preview-sdk/pull/341))

### Chores And Housekeeping

- chore: rename `editButtonBulider` to `editInVisualBuilderButton` (Hitesh Shetty - [#379](https://github.com/contentstack/live-preview-sdk/pull/379))

### Documentation Changes

- docs: add docs for start edit button configuration (Sairaj - [#376](https://github.com/contentstack/live-preview-sdk/pull/376))

### General Changes

- Stage: v3.1.2 (Faraaz Biyabani - [#377](https://github.com/contentstack/live-preview-sdk/pull/377))
- Ve 5139 (srinad007 - [#343](https://github.com/contentstack/live-preview-sdk/pull/343))

### New Features
Expand All @@ -218,16 +267,13 @@

### Chores And Housekeeping

- chore: rename editButtonBulider to editInVisualBuilderButton (Sairaj Chouhan - [bd8be29](https://github.com/contentstack/live-preview-sdk/commit/bd8be29d97c151fc85aad98f55573a6821b3d4fc))
- chore: remove else block (Sairaj Chouhan - [834c3e7](https://github.com/contentstack/live-preview-sdk/commit/834c3e78250f36b32e21c948bda313818f0db7bc))
- chore: update integrity (hiteshshetty-dev - [ad2c8aa](https://github.com/contentstack/live-preview-sdk/commit/ad2c8aa3780b973233a82e5a978254f777773af2))
- chore: remove `describe.only` (Faraaz Biyabani - [5aa5958](https://github.com/contentstack/live-preview-sdk/commit/5aa59587217ff7f64d495240f9e252bcf5b60a9c))

### Changes to Test Assests

- test: isPointerWithinEditButtonSafeZone (Faraaz Biyabani - [3c340e8](https://github.com/contentstack/live-preview-sdk/commit/3c340e8ce52d768f06fbb6b2050ab541a6ac47cb))
- test: add tests for start editing button in builder (Sairaj Chouhan - [f9988a7](https://github.com/contentstack/live-preview-sdk/commit/f9988a74ed9416cc99ce30ed9f3d25314f7eef5c))
- test: fix failing test cases (Sairaj Chouhan - [6d36acb](https://github.com/contentstack/live-preview-sdk/commit/6d36acbd5c4e717f92ce40e2e4490df28a857948))
- test: increase timeout for contenteditable tests (Sairaj Chouhan - [66fee50](https://github.com/contentstack/live-preview-sdk/commit/66fee50387f0a8a9b0ec61b945bec00418dc34f9))

### General Changes
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ npm install @contentstack/live-preview-utils
Alternatively, if you want to include the package directly in your website HTML code, use the following command:

```html
<script type='module' integrity='sha384-A8av+t5rI9uSevzozgzaoIRdBTs5pn1tt7F&#x2F;ekJQ7NAE1l3RenCKeJeMUTdrbtcM' crossorigin="anonymous">
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@3.2.1';
<script type='module' integrity='sha384-SHUnMbbEHjE8k0KW44O7mqfIkMq3FXetFL0TBcsLnyje7aLZch0lhjcp2HxvHC8B' crossorigin="anonymous">
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@3.2.2';

ContentstackLivePreview.init({
stackDetails: {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/live-preview-utils",
"version": "3.2.1",
"version": "3.2.2",
"description": "Contentstack provides the Live Preview SDK to establish a communication channel between the various Contentstack SDKs and your website, transmitting live changes to the preview pane.",
"type": "module",
"types": "dist/legacy/index.d.ts",
Expand Down
7 changes: 5 additions & 2 deletions src/visualBuilder/__test__/hover/fields/boolean.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { VisualBuilder } from "../../../index";
import { FieldSchemaMap } from "../../../utils/fieldSchemaMap";
import { mockDomRect } from "./mockDomRect";
import visualBuilderPostMessage from "../../../utils/visualBuilderPostMessage";
import { act } from "@testing-library/preact";

vi.mock("../../../utils/visualBuilderPostMessage", async () => {
const { getAllContentTypes } = await vi.importActual<
Expand Down Expand Up @@ -64,7 +65,7 @@ describe("When an element is hovered in visual builder mode", () => {
let booleanField: HTMLParagraphElement;
let visualBuilder: VisualBuilder;

beforeEach( async () => {
beforeEach(async () => {
booleanField = document.createElement("p");
booleanField.setAttribute(
"data-cslp",
Expand All @@ -86,7 +87,9 @@ describe("When an element is hovered in visual builder mode", () => {
});

test("should have outline and custom cursor", async () => {
booleanField.dispatchEvent(mousemoveEvent);
await act(async () => {
booleanField.dispatchEvent(mousemoveEvent);
});
await waitForHoverOutline();
expect(booleanField).toHaveAttribute("data-cslp", "all_fields.bltapikey.en-us.boolean");
expect(booleanField).not.toHaveAttribute("contenteditable");
Expand Down
5 changes: 4 additions & 1 deletion src/visualBuilder/__test__/hover/fields/date.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Config from "../../../../configManager/configManager";
import { VisualBuilder } from "../../../index";
import { FieldSchemaMap } from "../../../utils/fieldSchemaMap";
import { mockDomRect } from "./mockDomRect";
import { act } from "@testing-library/preact";

vi.mock("../../../utils/visualBuilderPostMessage", async () => {
const { getAllContentTypes } = await vi.importActual<
Expand Down Expand Up @@ -84,7 +85,9 @@ describe("When an element is hovered in visual builder mode", () => {
});

test("should have outline and custom cursor", async () => {
dataField.dispatchEvent(mousemoveEvent);
await act(async () => {
dataField.dispatchEvent(mousemoveEvent);
});
await waitForHoverOutline();
expect(dataField).toHaveAttribute("data-cslp", "all_fields.bltapikey.en-us.date");
expect(dataField).not.toHaveAttribute("contenteditable");
Expand Down
Loading
Loading