@routevn/creator-model 1.4.1 → 1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/model.js +31 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routevn/creator-model",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/model.js CHANGED
@@ -376,7 +376,7 @@ const LAYOUT_ELEMENT_BASE_TYPES = [
376
376
  "container-ref-confirm-dialog-ok",
377
377
  "container-ref-confirm-dialog-cancel",
378
378
  ];
379
- export const SCHEMA_VERSION = 4;
379
+ export const SCHEMA_VERSION = 5;
380
380
  const LAYOUT_CONTAINER_ELEMENT_TYPES = [
381
381
  "folder",
382
382
  "container",
@@ -3392,6 +3392,8 @@ const validateLayoutElementData = ({
3392
3392
  "hover",
3393
3393
  "click",
3394
3394
  "rightClick",
3395
+ "scrollUp",
3396
+ "scrollDown",
3395
3397
  "anchorToBottom",
3396
3398
  "thumbImageId",
3397
3399
  "barImageId",
@@ -3841,6 +3843,32 @@ const validateLayoutElementData = ({
3841
3843
  }
3842
3844
  }
3843
3845
 
3846
+ if (data.scrollUp !== undefined) {
3847
+ {
3848
+ const result = validateLayoutElementInteraction({
3849
+ interaction: data.scrollUp,
3850
+ path: `${path}.scrollUp`,
3851
+ errorFactory,
3852
+ });
3853
+ if (result?.valid === false) {
3854
+ return result;
3855
+ }
3856
+ }
3857
+ }
3858
+
3859
+ if (data.scrollDown !== undefined) {
3860
+ {
3861
+ const result = validateLayoutElementInteraction({
3862
+ interaction: data.scrollDown,
3863
+ path: `${path}.scrollDown`,
3864
+ errorFactory,
3865
+ });
3866
+ if (result?.valid === false) {
3867
+ return result;
3868
+ }
3869
+ }
3870
+ }
3871
+
3844
3872
  if (
3845
3873
  data.anchorToBottom !== undefined &&
3846
3874
  typeof data.anchorToBottom !== "boolean"
@@ -3940,6 +3968,8 @@ const validateLayoutElementItems = ({ items, path, errorFactory }) => {
3940
3968
  "hover",
3941
3969
  "click",
3942
3970
  "rightClick",
3971
+ "scrollUp",
3972
+ "scrollDown",
3943
3973
  "anchorToBottom",
3944
3974
  "thumbImageId",
3945
3975
  "barImageId",