1
mirror of https://github.com/thepeacockproject/Peacock synced 2025-02-23 03:35:25 +01:00
Peacock/static/ContractSearchPageTemplate.json
Reece Dunham 6245e91624 Initial commit
Co-authored-by: Tino Roivanen <tino.roivanen98@gmail.com>
Co-authored-by: Govert de Gans <grappigegovert@hotmail.com>
Co-authored-by: Gray Olson <gray@grayolson.com>
Co-authored-by: Alexandre Sanchez <alex73630@gmail.com>
Co-authored-by: Anthony Fuller <24512050+anthonyfuller@users.noreply.github.com>
Co-authored-by: atampy25 <24306974+atampy25@users.noreply.github.com>
Co-authored-by: David <davidstulemeijer@gmail.com>
Co-authored-by: c0derMo <c0dermo@users.noreply.github.com>
Co-authored-by: Jeevat Singh <jeevatt.singh@gmail.com>
Signed-off-by: Reece Dunham <me@rdil.rocks>
2022-10-19 21:33:45 -04:00

900 lines
79 KiB
JSON

{
"buttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SELECT"
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK"
}
],
"body": {
"$setupcomponents": {
"favorites-removal": {}
},
"id": "root_list",
"controller": "list",
"data": {
"direction": "vertical"
},
"children": [
{
"controller": "group",
"id": "headline_container",
"row": 4.25,
"col": 0,
"selectable": false,
"pressable": false,
"_comment": "the container that will hold the HeadlineElement. It will show info on whatever item is selected",
"children": {
"id": "headline_element",
"view": "menu3.basic.HeadlineElement"
}
},
{
"controller": "list",
"id": "category_container"
},
{
"id": "category_controller",
"controller": "category",
"container": "category_container",
"view": "menu3.containers.ScrollingTabsContainer",
"direction": "horizontal",
"ncols": 10,
"data": {
"direction": "horizontal",
"overflowscrolling": "0.45",
"buttonprompts": [
{
"actiontype": ["lb", "rb"],
"actionlabel": "$loc UI_BUTTON_PROMPTS_BROWSE_CATEGORIES"
}
],
"topnavigation": {
"title": "$loc UI_MENU_PAGE_HUB_CONTRACTS",
"icon": "contract"
}
},
"children": [
{
"view": "menu3.basic.CategoryElement",
"data": {
"title": "$loc UI_MENU_PAGE_HITS_ELEMENT_CATEGORY_SEARCH",
"icon": "search"
},
"actions": {
"select": {
"set-background": "$res images/backgrounds/menu_bg.jpg"
}
},
"children": {
"controller": "list",
"row": 0.75,
"children": {
"id": "contractsearch_body",
"controller": "group",
"components": {
"search-manager": {
"always-reload-setup": false,
"setup": {
"submit-button": "go_search_button",
"input-textfield": "freetext_search",
"selected-filters-container": "selected_filter_container"
}
}
},
"actions": {
"on-add-child": {
"sm:set-active": true
},
"on-remove-child": {
"sm:set-active": false
}
},
"children": [
{
"id": "search_input",
"controller": "group",
"view": "menu3.containers.AnimationContainerSearchPage",
"pages": true,
"autoselectchildren": true,
"data": {
"move_col": -8.2,
"move_row": 0,
"moveduration": 0.5,
"blendoutduration": 0.2,
"callback_forward": "start_search",
"callback_reverse": "reset_input"
},
"actions": {
"start_search": {
"sm:submit-search-request": {
"load-async": {
"from": {
"url": "contractsearch",
"args": {
"sorting": ""
}
},
"post-load-action": {
"hide-node": "search_input",
"show-node": "search_results",
"set-selected": {
"target": "search_results_container"
}
},
"target": "search_results",
"showloadingindicator": true,
"blocksinput": true
}
},
"set-busystate": {
"set-active": false
}
},
"reset_input": {
"set-busystate": {
"set-active": false
},
"show-node": ["search_matrix"]
}
},
"children": [
{
"id": "search_matrix",
"controller": "group",
"pages": true,
"view": "menu3.containers.ScrollingListContainer",
"direction": "vertical",
"data": {
"direction": "vertical",
"overflowscrolling": 2,
"scrollbarspaceoffset": -10,
"animation": "blendout"
},
"ncols": 8,
"nrows": 3.96,
"children": [
{
"id": "freetext_search_group",
"controller": "group",
"pages": true,
"ncols": 8,
"nrows": 1.32,
"row": 0,
"col": 0,
"autoselectchildren": true,
"children": [
{
"id": "freetext_search_header",
"view": "menu3.search.SearchTagGroupHeader",
"ncols": 4.8,
"nrows": 0.32,
"selectable": false,
"pressable": true,
"data": {
"title": "$loc UI_SEARCH_PAGE_INPUT_TITLE",
"icon": "edit"
},
"buttons": [
{
"actiontype": "select",
"actionlabel": "$loc UI_BUTTON_PROMPTS_SHOW_TEXT_SEARCH_HELP"
}
]
},
{
"id": "freetext_search",
"view": "menu3.search.SearchTagElementCustomInput",
"ncols": 4.8,
"nrows": 1,
"data": {
"title": "$loc UI_SEARCH_PAGE_INPUT_TITLE",
"input-replace-token": "InputTextToken"
},
"buttons": [
{
"actiontype": "select",
"actionlabel": "$loc UI_BUTTON_PROMPTS_SHOW_TEXT_SEARCH_HELP"
}
],
"actions": {
"accept": {
"$switch $arg _platform": [
{
"case": "pc",
"return": {
"call": {
"target": "freetext_search",
"method": "doTextFieldAccept"
}
}
},
{
"case": "stadia",
"return": {
"call": {
"target": "freetext_search",
"method": "doTextFieldAccept"
}
}
},
{
"default": {
"open-virtual-keyboard": {
"target": "freetext_search",
"title": "$loc UI_SEARCH_PAGE_INPUT_TITLE",
"maxchars": 40,
"multiline": false
}
}
}
]
},
"on-input-entered": {
"$notransform": {
"sm:add-text-filter": {
"$setup": {
"$set Title": "$.InputTextToken",
"$set Key": "Text",
"$set Value": "$.InputTextToken",
"$in": {
"selected-filter-id": "$formatstring SELECTED_FILTER_Text_{$.InputTextToken}",
"filter-group-id": "$.Key",
"filter-element": {
"view": "menu3.search.SearchSelectedTagElement",
"id": "$formatstring SELECTED_FILTER_{$.Key}_{$.Value}",
"data": {
"title": {
"$switch $.Key": [
{
"case": "Text",
"return": "$formatstring \"{$.Title}\""
},
{
"default": "$.Title"
}
]
},
"key": "$.Key",
"value": "$.Value",
"active": false
},
"actions": {
"$switch $.Key": [
{
"case": "Text",
"return": {
"accept": {
"sm:remove-text-filter": ""
}
}
},
{
"default": {
"accept": {
"sm:remove-filter": ""
}
}
}
]
}
}
}
}
}
}
},
"action-select": {
"set-selectable": {
"freetext_search_header": true
},
"set-selected": {
"target": "freetext_search_header"
},
"show-modal": {
"config": {
"view": "menu3.modal.ModalDialogGeneric",
"buttons": [
{
"label": "$loc UI_DIALOG_OK",
"type": "cancel",
"icon": "arrowright"
}
],
"data": {
"title": "$loc UI_DIALOG_CONTRACT_TEXT_SEARCH_HELP_TITLE",
"description": "$loc UI_DIALOG_CONTRACT_TEXT_SEARCH_HELP_TEXT"
}
},
"onbutton": [
{
"set-selected": {
"target": "freetext_search"
},
"set-selectable": {
"freetext_search_header": false
}
}
]
}
}
}
},
{
"view": "menu3.search.SearchTagGroupHeader",
"ncols": 3.2,
"nrows": 0.32,
"selectable": false,
"pressable": false,
"data": {
"title": "$loc UI_SEARCH_PAGE_CATEGORY_FRIENDS",
"icon": "npc"
}
},
{
"$setup": {
"$set Key": "Friends",
"$set Value": "active",
"$set Title": "$loc UI_SEARCH_PAGE_TARGETS_FRIENDS_FILTER",
"$in": {
"view": "menu3.search.SearchTagElementCustom",
"id": "$formatstring FILTER_{$.Key}_{$.Value}",
"ncols": 3.2,
"nrows": 1,
"data": {
"defaulttext": "$.Title"
},
"actions": {
"accept": {
"sm:toggle-filter": {
"selected-filter-id": "$formatstring SELECTED_FILTER_{$.Key}_{$.Value}",
"filter-group-id": "$.Key",
"filter-element": {
"view": "menu3.search.SearchSelectedTagElement",
"id": "$formatstring SELECTED_FILTER_{$.Key}_{$.Value}",
"data": {
"title": {
"$switch $.Key": [
{
"case": "Text",
"return": "$formatstring \"{$.Title}\""
},
{
"default": "$.Title"
}
]
},
"key": "$.Key",
"value": "$.Value",
"active": false
},
"actions": {
"$switch $.Key": [
{
"case": "Text",
"return": {
"accept": {
"sm:remove-text-filter": ""
}
}
},
{
"default": {
"accept": {
"sm:remove-filter": ""
}
}
}
]
}
}
}
}
}
}
}
}
]
},
{
"$setup": {
"$set DataTemp": {
"$mergeobjects": {
"$each $.FilterData": {
"$expand $.Key": "$."
}
}
},
"$set Data": [
{
"Width": 3.2,
"SubData": [
"$.DataTemp.Location"
]
},
{
"Width": 1.6,
"SubData": [
"$.DataTemp.TargetCount",
"$.DataTemp.Disguises"
]
},
{
"Width": 1.6,
"SubData": [
"$.DataTemp.KillTypes"
]
},
{
"Width": 1.6,
"SubData": [
"$.DataTemp.Conditions"
]
}
],
"$in": {
"id": "tag_search_group",
"controller": "group",
"pages": true,
"ncols": 8,
"nrows": 2.88,
"row": 1.1,
"col": 0,
"navigationmode": "leaf-selection",
"autoselectchildren": true,
"children": {
"$each $.Data": {
"controller": "group",
"pages": true,
"autoselectchildren": true,
"navigationmode": "forward-to-parent",
"ncols": "$.Width",
"children": {
"$each $.SubData": {
"controller": "group",
"fillstrategy": "rowfirst",
"pages": true,
"autoselectchildren": true,
"navigationmode": "forward-to-parent",
"ncols": {
"$if $eqs ($.Key,Location)": {
"$then": 3.2,
"$else": 1.6
}
},
"nrows": {
"$if $eqs ($.Key,TargetCount)": {
"$then": 2.24
}
},
"children": {
"$merge": [
{
"view": "menu3.search.SearchTagGroupHeader",
"ncols": {
"$if $eqs ($.Key,Location)": {
"$then": 3.2,
"$else": 1.6
}
},
"nrows": 0.32,
"selectable": false,
"pressable": false,
"data": {
"title": "$loc $.Title",
"icon": {
"$switch $.Key": [
{
"case": "Location",
"return": "mission"
},
{
"case": "TargetCount",
"return": "target"
},
{
"case": "Disguises",
"return": "disguise"
},
{
"case": "KillTypes",
"return": "difficulty"
},
{
"case": "Conditions",
"return": "complication"
}
]
}
}
},
{
"view": {
"$switch $.Key": [
{
"case": "Location",
"return": "menu3.search.SearchTagElementBig"
},
{
"default": "menu3.search.SearchTagElement"
}
]
},
"ncols": {
"$switch $.Key": [
{
"case": "Location",
"return": 3.2
},
{
"default": 1.6
}
]
},
"nrows": 0.32,
"selectable": "true",
"pressable": "true",
"id": "$formatstring FILTER_ANY_{$.Key}",
"data": {
"title": "$loc $formatstring UI_SEARCH_PAGE_ANY_{$.Key}",
"active": true
},
"actions": {
"accept": {
"sm:remove-all-filters": {
"filter-group-id": "$.Key",
"reselect-on-last-filter-removed": false
}
},
"on-add-child": {
"sm:register-any-button": {
"filter-group-id": "$.Key"
}
}
}
},
{
"$each $.Values": {
"$setup": {
"$set View": {
"$switch $.Key": [
{
"case": "Location",
"return": "menu3.search.SearchTagElementBig"
},
{
"default": "menu3.search.SearchTagElement"
}
]
},
"$set Width": {
"$switch $.Key": [
{
"case": "Location",
"return": 3.2
},
{
"default": 1.6
}
]
},
"$set FilterEnabled": {
"$switch $.Key": [
{
"case": "Location",
"return": false
},
{
"default": true
}
]
},
"$set TitleTab01": {
"$switch $.Key": [
{
"case": "Location",
"return": {
"$setup": {
"$set City": "$loc $formatstring UI_{$.Value}_CITY",
"$in": "$formatstring {$.City}"
}
}
},
{
"default": null
}
]
},
"$set TitleTab02": {
"$switch $.Key": [
{
"case": "Location",
"return": "$loc $.Title"
},
{
"default": null
}
]
},
"$set Title": {
"$switch $.Key": [
{
"case": "Location",
"return": {
"$setup": {
"$set City": "$loc $formatstring UI_{$.Value}_CITY",
"$set Mission": "$loc $.Title",
"$in": "$formatstring {$.City} / {$.Mission}"
}
}
},
{
"case": "Conditions",
"return": {
"$if $stringcontains ($.Value,_secondary)": {
"$then": {
"$setup": {
"$set LocalizedTitle": "$loc $.Title",
"$set Optional": "$loc UI_DIALOG_OPTIONAL",
"$in": "$formatstring {$.LocalizedTitle} {$.Optional}"
}
},
"$else": "$loc $.Title"
}
}
},
{
"default": "$loc $.Title"
}
]
},
"$in": {
"view": "$.View",
"ncols": "$.Width",
"nrows": 0.32,
"selectable": "$.FilterEnabled",
"pressable": "$.FilterEnabled",
"id": "$formatstring FILTER_{$.Key}_{$.Value}",
"data": {
"title": "$.Title",
"titletab01": "$.TitleTab01",
"titletab02": "$.TitleTab02",
"tabposition": 180,
"disabled": "$not $.FilterEnabled"
},
"buttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SELECT"
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK"
}
],
"actions": {
"accept": {
"sm:toggle-filter": {
"selected-filter-id": "$formatstring SELECTED_FILTER_{$.Key}_{$.Value}",
"filter-group-id": "$.Key",
"filter-element": {
"view": "menu3.search.SearchSelectedTagElement",
"id": "$formatstring SELECTED_FILTER_{$.Key}_{$.Value}",
"data": {
"title": {
"$switch $.Key": [
{
"case": "Text",
"return": "$formatstring \"{$.Title}\""
},
{
"default": "$.Title"
}
]
},
"key": "$.Key",
"value": "$.Value",
"active": false
},
"actions": {
"$switch $.Key": [
{
"case": "Text",
"return": {
"accept": {
"sm:remove-text-filter": ""
}
}
},
{
"default": {
"accept": {
"sm:remove-filter": ""
}
}
}
]
}
}
}
}
}
}
}
}
}
]
}
}
}
}
}
}
}
}
]
},
{
"id": "search_matrix_selected",
"controller": "list",
"direction": "vertical",
"data": {
"direction": "vertical",
"animation": "move"
},
"row": 0,
"col": 8.1,
"ncols": 1,
"nrows": 3.9,
"children": [
{
"id": "go_search_button",
"view": "menu3.search.SearchButton",
"row": 0,
"col": 0,
"nrows": 1,
"ncols": 2,
"selectable": false,
"pressable": false,
"data": {
"title": "$loc UI_SEARCH_PAGE_GO_BUTTON",
"icon": "search",
"highcontrastmode": true,
"disabled": true
},
"buttons": [
{
"actiontype": "accept",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_SELECT"
},
{
"actiontype": "cancel",
"actionlabel": "$loc UI_BUTTON_PROMPTS_ACTION_BACK"
}
],
"actions": {
"accept": {
"hide-node": [
"search_matrix",
"search_results"
],
"set-busystate": {
"set-active": true,
"blocksinput": true
},
"call": {
"target": "search_input",
"method": "startAnimation",
"args": true
}
}
}
},
{
"id": "selected_filter_container",
"controller": "list",
"view": "menu3.search.SearchSelectedTagScrollingListContainer",
"direction": "vertical",
"data": {
"direction": "vertical",
"instantfirstscroll": true,
"usepersistentreloaddata": true,
"overflowscrolling": "1.15",
"scrollbarspaceoffset": -18,
"offsetCol": 0.056,
"emptycount": 8,
"emptyelementfillcount": 1,
"elementnrows": 0.32,
"icon": "tag",
"title": "$loc UI_SEARCH_PAGE_CATEGORY_SELECTEDTAGS"
},
"row": 1.071,
"col": 0.029,
"ncols": 1.94,
"nrows": 2.88,
"hidedefaultnocontent": true,
"actions": {
"last-child-removed": {
"set-selected": {
"target": "search_matrix"
}
}
}
}
]
}
]
},
{
"id": "search_results",
"controller": "group",
"children": []
},
{
"id": "locations_resourceavailability_check_container",
"children": {
"$each $.LocationsData.Data.Locations": {
"selectable": false,
"pressable": false,
"stateproviders": [
{
"type": "contractavailability",
"activate-on-page-opened": false,
"fire-actions-again-after-reactivating": true,
"contract": "$.Contract"
}
],
"actions": {
"on-content-available": {
"sm:enable-owned-location": {
"available-filter-element": "$formatstring FILTER_Location_{$.SubLocation.Id}",
"location-id": "$.SubLocation.Id"
}
},
"on-content-not-owned": {
"sm:disable-owned-location": {
"available-filter-element": "$formatstring FILTER_Location_{$.SubLocation.Id}",
"location-id": "$.SubLocation.Id"
}
},
"on-content-not-installed": {
"sm:disable-owned-location": {
"available-filter-element": "$formatstring FILTER_Location_{$.SubLocation.Id}",
"location-id": "$.SubLocation.Id"
}
},
"on-content-downloading": {
"sm:disable-owned-location": {
"available-filter-element": "$formatstring FILTER_Location_{$.SubLocation.Id}",
"location-id": "$.SubLocation.Id"
}
},
"on-content-update-required": {
"sm:disable-owned-location": {
"available-filter-element": "$formatstring FILTER_Location_{$.SubLocation.Id}",
"location-id": "$.SubLocation.Id"
}
},
"on-content-installing": {
"sm:disable-owned-location": {
"available-filter-element": "$formatstring FILTER_Location_{$.SubLocation.Id}",
"location-id": "$.SubLocation.Id"
}
}
}
}
}
}
]
}
}
}
]
}
]
}
}