diff options
| author | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
|---|---|---|
| committer | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
| commit | bce557cc2dc767628bed6aac87301a1be7c5431b (patch) | |
| tree | b51a051228d01fe3306cd7626d4a96768aadb944 /node_modules/@jet-app/app-store/tmp/src/api/models/hero-carousel.js | |
init commit
Diffstat (limited to 'node_modules/@jet-app/app-store/tmp/src/api/models/hero-carousel.js')
| -rw-r--r-- | node_modules/@jet-app/app-store/tmp/src/api/models/hero-carousel.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/node_modules/@jet-app/app-store/tmp/src/api/models/hero-carousel.js b/node_modules/@jet-app/app-store/tmp/src/api/models/hero-carousel.js new file mode 100644 index 0000000..85b9514 --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/api/models/hero-carousel.js @@ -0,0 +1,37 @@ +import { isSome } from "@jet/environment/types/optional"; +import * as models from "./index"; +/** @public */ +export class HeroCarouselItemOverlay extends models.ViewModel { + isValid() { + const hasButtonRequirements = this.callToActionText !== undefined && + this.callToActionText !== null && + this.clickAction !== undefined && + this.clickAction !== null; + const hasTitle = this.titleText !== undefined && this.titleText !== null; + const hasLockupRequirements = this.lockup !== undefined && this.lockup !== null; + const hasCollectionIcons = this.collectionIcons !== undefined && this.collectionIcons !== null; + return hasTitle && (hasLockupRequirements || hasCollectionIcons || hasButtonRequirements); + } +} +/** @public */ +export class HeroCarouselItem extends models.ViewModel { + isValid() { + const hasCollectionIcons = isSome(this.collectionIcons) && this.collectionIcons.length > 0; + const hasValidArtwork = isSome(this.artwork) && this.artwork.isValid(); + const hasValidVideo = isSome(this.video) && this.video.isValid(); + const hasMedia = hasValidArtwork || hasValidVideo || hasCollectionIcons; + const hasOverlay = isSome(this.overlay) && this.overlay.isValid(); + return hasMedia && hasOverlay; + } +} +/** @public */ +export class HeroCarousel extends models.ViewModel { + constructor() { + super(...arguments); + /// The different items to display in the carousel + this.items = []; + /// The different items to display in the carousel, in RTL + this.rtlItems = []; + } +} +//# sourceMappingURL=hero-carousel.js.map
\ No newline at end of file |
