diff options
Diffstat (limited to 'node_modules/@jet-app/app-store/tmp/src/api/models/search')
4 files changed, 458 insertions, 0 deletions
diff --git a/node_modules/@jet-app/app-store/tmp/src/api/models/search/guided-search-actions.js b/node_modules/@jet-app/app-store/tmp/src/api/models/search/guided-search-actions.js new file mode 100644 index 0000000..047f60f --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/api/models/search/guided-search-actions.js @@ -0,0 +1,31 @@ +/** + * Actions for Guided Search Feature + */ +import * as actions from "../actions"; +/** + * @public + * An action that toggles a specified guided search token on and off. + * + * @note + * The same instance of this object must handle both selection and deselection + * as it can fire multiple times without JS refresh + */ +export class GuidedSearchTokenToggleAction extends actions.Action { + constructor(targetToken, searchOrigin) { + super("GuidedSearchTokenToggleAction"); + this.targetToken = targetToken; + this.searchOrigin = searchOrigin; + } +} +/** + * @public + * An action that changes the selected search entity (replacing existing, if any) + */ +export class SearchEntityChangeAction extends actions.Action { + constructor(entity, searchOrigin) { + super("SearchEntityChangeAction"); + this.entity = entity; + this.searchOrigin = searchOrigin; + } +} +//# sourceMappingURL=guided-search-actions.js.map
\ No newline at end of file diff --git a/node_modules/@jet-app/app-store/tmp/src/api/models/search/guided-search.js b/node_modules/@jet-app/app-store/tmp/src/api/models/search/guided-search.js new file mode 100644 index 0000000..cda8c16 --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/api/models/search/guided-search.js @@ -0,0 +1,48 @@ +import * as models from "../base"; +/** + * @public + * Returns the system image for the given search entity. + */ +export function searchEntitySystemImage(entity) { + switch (entity) { + case "developer": + return "person.crop.square"; + case "story": + return "appstore"; + case "watch": + return "applewatch"; + case "arcade": + return "joystickcontroller.fill"; + default: + return undefined; + } +} +/** + * @public + * Model representing selectable displayed token for Guided Search + */ +export class GuidedSearchToken extends models.ViewModel { + constructor(value, isSelected, leadingIcon, displayName, clickAction) { + super(); + this.value = value; + this.isSelected = isSelected; + this.leadingIcon = leadingIcon; + this.displayName = displayName; + this.clickAction = clickAction; + } +} +/** + * @public + * Object storing mapping of: + * Search Term + [Set of Guided Search Tokens] = Optimization Term. + * I.e. how the search term and token swill be comined for final query term search results are searched for. + */ +export class GuidedSearchQuery extends models.Model { + constructor(searchTerm, selectedTokens, optimizationTerm) { + super(); + this.searchTerm = searchTerm; + this.selectedTokens = selectedTokens; + this.optimizationTerm = optimizationTerm; + } +} +//# sourceMappingURL=guided-search.js.map
\ No newline at end of file diff --git a/node_modules/@jet-app/app-store/tmp/src/api/models/search/search-categories.js b/node_modules/@jet-app/app-store/tmp/src/api/models/search/search-categories.js new file mode 100644 index 0000000..1d0b588 --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/api/models/search/search-categories.js @@ -0,0 +1,96 @@ +import * as dynamicGenericPage from "../dynamic-generic-page"; +import * as models from "../base"; +export class SearchChartsAndCategoriesPage extends dynamicGenericPage.DynamicGenericPage { +} +/** + * @public + * Model representing a piece of UI for a chart or category on the search landing page. + */ +export class SearchChartOrCategory extends models.ViewModel { + constructor(title, artwork, collectionIcons, backgroundColor, badge, action, density, artworkSafeArea, textSafeArea) { + super(); + this.title = title; + this.artwork = artwork; + this.collectionIcons = collectionIcons; + this.backgroundColor = backgroundColor; + this.badge = badge; + this.action = action; + this.density = density; + this.artworkSafeArea = artworkSafeArea; + this.textSafeArea = textSafeArea; + } +} +/** + * @public + * Model representing a piece of UI for a medium ad lockup with custom creative artwork on the search landing page. + */ +export class MediumAdLockupWithAlignedRegionBackground extends models.ViewModel { + constructor(lockup, alignedRegionArtwork) { + super(); + this.lockup = lockup; + this.alignedRegionArtwork = alignedRegionArtwork; + } +} +/** + * @public + * Model representing a piece of UI for a medium ad lockup with screenshots on the search landing page. + */ +export class MediumAdLockupWithScreenshotsBackground extends models.ViewModel { + constructor(lockup, screenshots, isAnimated, secondaryTextColor, backgroundColor, riverSpeed) { + super(); + this.lockup = lockup; + this.screenshots = screenshots; + this.isAnimated = isAnimated; + this.secondaryTextColor = secondaryTextColor; + this.backgroundColor = backgroundColor; + this.riverSpeed = riverSpeed; + } +} +/** + * @public + * Model representing a piece of UI for a condensed ad lockup on the search landing page. + */ +export class CondensedAdLockupWithIconBackground extends models.ViewModel { + constructor(lockup, backgroundArtwork) { + super(); + this.lockup = lockup; + this.backgroundArtwork = backgroundArtwork; + } +} +export class SearchShelfAttributes { + constructor(id, title, displayStyle, displayCount, hasSeeAll, seeAllLink, searchLandingItemDisplayStyle = null, searchShelfKind) { + this.id = id; + this.title = title; + this.searchLandingItemDisplayStyle = searchLandingItemDisplayStyle; + this.displayStyle = displayStyle; + this.displayCount = displayCount; + this.hasSeeAll = hasSeeAll; + this.seeAllLink = seeAllLink; + this.searchShelfKind = searchShelfKind; + } +} +export var SearchLandingPageContentKind; +(function (SearchLandingPageContentKind) { + SearchLandingPageContentKind["Suggestion"] = "Query"; + SearchLandingPageContentKind["CategoriesAndCharts"] = "EditorialLink"; + SearchLandingPageContentKind["Apps"] = "AppsLockup"; + SearchLandingPageContentKind["EditorialCollection"] = "EditorialCollection"; +})(SearchLandingPageContentKind || (SearchLandingPageContentKind = {})); +export var SearchPageKind; +(function (SearchPageKind) { + SearchPageKind[SearchPageKind["Default"] = 0] = "Default"; + SearchPageKind[SearchPageKind["CategoriesAndCharts"] = 1] = "CategoriesAndCharts"; +})(SearchPageKind || (SearchPageKind = {})); +export var GenericSearchPageShelfDisplayStyleDensity; +(function (GenericSearchPageShelfDisplayStyleDensity) { + GenericSearchPageShelfDisplayStyleDensity["Density1"] = "density_1"; + GenericSearchPageShelfDisplayStyleDensity["Density2"] = "density_2"; + GenericSearchPageShelfDisplayStyleDensity["Density3"] = "density_3"; +})(GenericSearchPageShelfDisplayStyleDensity || (GenericSearchPageShelfDisplayStyleDensity = {})); +export var SearchLandingPageShelfItemIconKind; +(function (SearchLandingPageShelfItemIconKind) { + SearchLandingPageShelfItemIconKind["Chiclet"] = "chiclet"; + SearchLandingPageShelfItemIconKind["App"] = "app"; + SearchLandingPageShelfItemIconKind["Symbol"] = "symbol"; +})(SearchLandingPageShelfItemIconKind || (SearchLandingPageShelfItemIconKind = {})); +//# sourceMappingURL=search-categories.js.map
\ No newline at end of file diff --git a/node_modules/@jet-app/app-store/tmp/src/api/models/search/search.js b/node_modules/@jet-app/app-store/tmp/src/api/models/search/search.js new file mode 100644 index 0000000..4876f03 --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/api/models/search/search.js @@ -0,0 +1,283 @@ +/** + * Created by km on 2/13/17. + */ +import * as actions from "../actions"; +import * as base from "../base"; +import * as metrics from "../metrics/metrics"; +/** @public */ +export class BaseSearchPage extends base.Model { + constructor() { + super(); + this.pageMetrics = new metrics.PageMetrics(); + this.pageRenderMetrics = {}; + } +} +/** @public */ +export class SearchResults extends BaseSearchPage { +} +/** + * @public + * Message to show user when search results need additional context. + * Currently supported by: + * - iOS, for NLS Safety UI + */ +export class SearchResultsContextCard extends base.ViewModel { + constructor(message, action) { + super(); + this.message = message; + this.action = action; + } +} +/** @public */ +export class SearchResultsPage extends BaseSearchPage { + constructor(shelfModels = []) { + super(); + /// The shelves of the results page. + this.shelves = []; + this.shelves = shelfModels; + } +} +export class SegmentedSearchResultsPage { + constructor() { + this.selectedSegmentId = null; + this.segments = []; + } +} +export var SegmentedSearchResultsPageSegmentType; +(function (SegmentedSearchResultsPageSegmentType) { + SegmentedSearchResultsPageSegmentType["visionOS"] = "xros"; + SegmentedSearchResultsPageSegmentType["iOS"] = "ios"; +})(SegmentedSearchResultsPageSegmentType || (SegmentedSearchResultsPageSegmentType = {})); +export class SegmentedSearchResultsPageSegment { +} +/** @public */ +export class SearchFacetSet extends base.Model { + constructor(type, values) { + super(); + this.type = type; + this.values = values; + } +} +/** @public */ +export class SearchFacetValue extends base.Model { + constructor(name, value, selectedValue = null) { + super(); + this.name = name; + this.value = value; + this.isSelected = value === selectedValue; + } +} +/** @public */ +export class SearchAdOpportunity extends base.Model { + constructor(instanceId, searchLifecycleEventPayloads, searchAd) { + super(); + this.instanceId = instanceId; + this.eventPayloads = searchLifecycleEventPayloads; + this.searchAd = searchAd; + } + /** + * Sets the template type on the event payloads for metrics tracking + * @param templateType The native ad template type + */ + setTemplateType(templateType) { + this.eventPayloads.placed.iAdTemplateType = templateType; + } + /** + * Sets the duplicate position on the event payloads for metrics tracking. This is only expected for search results + * @param position The position of the duplicate organic app lockup that appeared in the shelf's contents + */ + setDuplicatePosition(position) { + this.eventPayloads.placed.duplicatePosition = position; + } + /** + * Sets the missed reason code on the event payloads for metrics tracking + * @param reasonCode The reason that the opportunity was not filled + */ + setMissedOpportunityReason(reasonCode) { + this.eventPayloads.placed.missedOpportunityReason = reasonCode; + } +} +/** @public */ +export class SearchAd extends base.Model { + constructor(instanceId, iAdObject, searchAdLifecycleEventPayloads, impressionId, transparencyAction) { + super(); + this.instanceId = instanceId; + this.iAd = iAdObject; + this.eventPayloads = searchAdLifecycleEventPayloads; + this.impressionId = impressionId; + this.transparencyAction = transparencyAction; + } + /** + * Sets the template type on the event payloads for metrics tracking + * @param templateType The native ad template type + */ + setTemplateType(templateType) { + this.eventPayloads.placed.iAdTemplateType = templateType; + } + /** + * Sets the duplicate position on the event payloads for metrics tracking. This is only expected for search results + * @param position The position of the duplicate organic app lockup that appeared in the shelf's contents + */ + setDuplicatePosition(position) { + this.eventPayloads.placed.duplicatePosition = position; + } +} +/** @public */ +export class AdTransparencyAction extends actions.Action { + constructor(adTransparencyData) { + super("AdTransparencyAction"); + this.adTransparencyData = adTransparencyData; + } +} +/** @public */ +export class SearchAction extends actions.Action { + constructor(title, term, url, origin, entity, source, presentationStyle, referrerData) { + super("SearchAction"); + /** + * Whether or not Search should opt-in to spell-checking, which will: + * - Correct high-confidence misspellings server-side. + * - Suggest queries for low-confidence misspellings + * + * This defaults to `false`. Currently `true` for user-typed term and hints terms. + */ + this.spellCheckEnabled = false; + this.title = title; + this.term = term; + this.url = url; + this.origin = origin; + this.entity = entity; + this.source = source; + this.presentationStyle = presentationStyle !== null && presentationStyle !== void 0 ? presentationStyle : ["textFollowsTintColor"]; + this.referrerData = referrerData; + } +} +// endregion +// region Search Hints +/** @public */ +export class SearchHintSet extends base.Model { + constructor(hints, ghostHintTerm) { + super(); + this.hints = hints; + this.ghostHintTerm = ghostHintTerm; + this.pageMetrics = new metrics.PageMetrics(); + this.pageRenderMetrics = {}; + } +} +// endregion +// region Trending Searches +/** @public */ +export class TrendingSearches extends base.Model { + constructor(title, searches) { + super(); + this.title = title; + this.searches = searches; + } +} +// endregion +// region Search Message +/** + * @public + * Message associated with a set of Search Results. + * Currently supported by: + * - iOS, for Spell Correction feature. + */ +export class SearchResultsMessage extends base.Model { + constructor(primaryText, secondaryText, messageClickAction = null) { + super(); + this.primaryText = primaryText; + this.secondaryText = secondaryText; + this.messageClickAction = messageClickAction; + } +} +/** @public */ +export class SearchResult extends base.ViewModel { + constructor(resultType) { + super(); + this.resultType = resultType; + this.clickAction = null; + } +} +/** + * @public + * Search result for a single app + */ +export class AppSearchResult extends SearchResult { + constructor(lockup) { + super("content"); + this.lockup = lockup; + } +} +/** @public */ +export class InAppPurchaseSearchResult extends SearchResult { + constructor(lockup) { + super("inAppPurchase"); + this.lockup = lockup; + } +} +/** @public */ +export class BundleSearchResult extends SearchResult { + constructor(lockup) { + super("bundle"); + this.lockup = lockup; + } +} +/** @public */ +export class AdvertsSearchResult extends SearchResult { + constructor() { + super("advert"); + this.lockups = []; + this.displaysScreenshots = true; + this.itemBackground = "ad"; + } +} +/** @public */ +export class AppEventSearchResult extends SearchResult { + constructor() { + super("appEvent"); + } +} +/** @public */ +export class EditorialSearchResult extends SearchResult { + constructor(title) { + super("editorial"); + this.title = title; + } +} +/** + * @public + * Collection of lockups with shared heading and title. + * May include an action to show additional details (e.g. FlowAction to Article) + */ +export class SearchLockupCollection extends SearchResult { + constructor(heading, title, items, detailAction, headingArtwork) { + super("lockupCollection"); + this.heading = heading; + this.headingArtwork = headingArtwork; + this.title = title; + this.items = items; + this.detailAction = detailAction; + } +} +/** + * @public + * Guided search suggestions shown mid-scroll alongside other search results. + */ +export class GuidedSearchResult extends SearchResult { + constructor(title, tokens) { + super("guidedSearch"); + this.title = title; + this.tokens = tokens; + } +} +/** + * @public + * A model for the search results learn more notice. + */ +export class SearchResultsLearnMoreNotice extends base.ViewModel { + constructor(linkableText) { + super(); + this.linkableText = linkableText; + } +} +// endregion +//# sourceMappingURL=search.js.map
\ No newline at end of file |
